I have a Flash movie and stop and play button for it. When the user click on stop, it should stop. I'm using the follo开发者_StackOverflow中文版wing JavaScript code for it:
document.getElementById("FLVPlayer").StopPlay();
This stops the movie but when I click back on Play it resumes the movie instead if playing it from the start... Can any one help?
StopPlay
is a method exposed by the flash object - it is not a part of the video player - so the logic is defined by the flash plugin. Best way to achieve what you want is to expose methods from ActionScript for javascript to use via ExternalInterface
.
I wouldn't use the flash-object command StopPlay
for controlling the video. Even if it kinda works.
Try: document.getElementById("FLVPlayer").gotoAndPlay(1);
精彩评论