sixtyten
04-22-2009, 02:38 AM
Hi,
I'm working on a Flash game using the Flex framework, Flexbuilder, and Flash CS4, and I'm having trouble with frame actions not firing in a MovieClip that I load from an .swf file.
Basically, what I'm trying to do is setup my MovieClip so I have a bunch of different labeled sections, and an action at the end of each labeled section that sends the playhead back to the beginning of the label, so the animation will loop appropriately.
Right now I only have two sections: "run" and "idle". I created an "Actions" layer in my flash file in addition to a "Label" layer and the layer with the animation itself, and placed a gotoAndPlay("run") action in a keyframe in the "Action" layer at the end of the "run" section. The problem is that when I export the MovieClip to .swf and embed it in my flex code the action doesn't seem to be firing, because the MovieClip just loops through every frame, "idle" section included. The label stuff works fine, because in my flex code i can tell the MovieClip to play from a particular label based on user input or whatever, but I'm not sure how to get the actions to fire.
Anyone have an idea what I need to do? Or maybe I'm going about this wrong. Any help is greatly appreciated. Thanks!
- John
I'm working on a Flash game using the Flex framework, Flexbuilder, and Flash CS4, and I'm having trouble with frame actions not firing in a MovieClip that I load from an .swf file.
Basically, what I'm trying to do is setup my MovieClip so I have a bunch of different labeled sections, and an action at the end of each labeled section that sends the playhead back to the beginning of the label, so the animation will loop appropriately.
Right now I only have two sections: "run" and "idle". I created an "Actions" layer in my flash file in addition to a "Label" layer and the layer with the animation itself, and placed a gotoAndPlay("run") action in a keyframe in the "Action" layer at the end of the "run" section. The problem is that when I export the MovieClip to .swf and embed it in my flex code the action doesn't seem to be firing, because the MovieClip just loops through every frame, "idle" section included. The label stuff works fine, because in my flex code i can tell the MovieClip to play from a particular label based on user input or whatever, but I'm not sure how to get the actions to fire.
Anyone have an idea what I need to do? Or maybe I'm going about this wrong. Any help is greatly appreciated. Thanks!
- John