开发者

Control an swf file using JavaScript

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开发者_如何学C 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?


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜