2

[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)?

liuliu
  • 721
  • 1
  • 8
  • 19

1 Answers1

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.

neworld
  • 7,757
  • 3
  • 39
  • 61