0

I have an swf file embedded into my webpage and I want to control it. I know that the controls are not available for an swf file, so I'm controlling it using JavaScript. I've managed get a Play and Pause button, but I really need to Stop button which will Stop the movie and rewind it to the beginning.

    <a style="color: #ffffff;" href="javascript:document.movie.Play()">►</a> &nbsp; &nbsp; &nbsp; <a style="color: #ffffff;" href="javascript:document.movie.StopPlay()">║</a>

This is code I'm using so far. I'm using ASCII codes to get the Play and Pause symbol and I can easily get a stop one but is there a way I can Stop and reset the movie?

1 Answer 1

0

From what I understand, this works, if the Flash movie has hooks for Javascript:

This answer has more information:

Possible to control SWF through Javascript?

Sign up to request clarification or add additional context in comments.

2 Comments

I've found a solution. You can set the file to go to a specific frame so I set it to go back to frame one. This also stops it so it works like a stop button. It means if it combined we a play command, it could also be used as a reset button.javascript:document.movie.GotoFrame(1)
Good find; it would benefit this community if you post that as an answer to your own question; future users can then search and find the benefit of your discovery!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.