如何控制嵌入的多帧 swf 文件?
[Embed(source="data/fire.swf")] static public var movieFire:Class;
我有一些多帧 swf 文件,我想控制它们。例如,我可以使用 gotoandplay 和 gotoandstop 功能。
我尝试过类似的东西: var m:MovieClip = new movieFire() as MovieClip;
但事实证明,当我尝试获取 TotalFrames、m.totalFrames
时,它给了我零和 gotoand* 函数也不行。如何正确控制actionsript 3.0(无Flex组件)中嵌入的swf文件?
[Embed(source="data/fire.swf")] static public var movieFire:Class;
I have some multiframe swf file and I want to have control of them. For example, I can use gotoandplay and gotoandstop functionality.
I tried something like:var m:MovieClip = new movieFire() as MovieClip;
but it turns out when I tried to get totalFrames, m.totalFrames
, it gives me zero, and gotoand* functions don't work either. How can I correctly control the swf file embedded in actionsript 3.0 (No Flex component)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上你需要制作swf文件,其中需要为actionscript导出的movieClips。在您需要将这些符号嵌入到您的 Flex 代码中之后:
在 FlashDevelop 中您可以轻松做到这一点。
不要忘记以 ActionScript 3 语言和相同版本发布 SWF,就像您用于编译 Flex 应用程序一样。
Basically you need make swf file, where is needed movieClips exported for actionscript. After what you need embed these symbols to your flex code:
in FlashDevelop can you easily do that.
Don't forget to publish SWF in actionscript 3 language and same version, as you use for compiling flex application.