2

[Embed(source="data/fire.swf")] static public var movieFire:Class;

我有一些多帧 swf 文件,我想控制它们。例如,我可以使用 gotoandplay 和 gotoandstop 功能。

我尝试了类似的方法: var m:MovieClip = new movieFire() as MovieClip;但事实证明,当我尝试获取 totalFrames, 时m.totalFrames,它给了我零,并且 gotoand* 函数也不起作用。如何正确控制 actionript 3.0(无 Flex 组件)中嵌入的 swf 文件?

4

1 回答 1

0

Basically you need make swf file, where is needed movieClips exported for actionscript. After what you need embed these symbols to your flex code:

    [Embed(source="../lib/trash.swf", symbol="emptytrash")]
    private static const _trash:Class;
    private static var trash:MovieClip = new _trash();

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.

于 2010-04-08T18:01:14.807 回答