Bosworth
11-02-2009, 04:49 PM
So - still new to AS 3.0 -
I have a set of SWFs loaded, and have successfully added them to the stage, and can assign basic methods ( gotoAndPlay(), stop() etc..) based on MouseEvents. I can't quite figure out, however, how to assign methods based on frame number or label, triggered by labels on the currently playing SWF timeline.
So, for example: externally loaded swf starts playing, and a listener is set up to listen for a "stop" label, which would activate stop();
I can obviously just drop a stop(); in the timeline of the loaded swf, but I am really trying to banish all code from timelines, period.
I could set up a frame-based listener to decide if a label exists at the current frame, and then to evaluate if that frame label == "stop"... but that seems pretty messy, and because it has to run at every frame, CPU heavy...
So - the question is really about listeners, I guess. What event would I listen for? Something like a MouseEvent - but ... a LabelEvent instead ;) Obviously - this doesn't exist, but something like it would be perfect.
Any ideas?
Or am I just overcomplicating things, and, a couple simple actions scattered here and there isn't that big of a deal...
cheers -
~[b{}x]~
I have a set of SWFs loaded, and have successfully added them to the stage, and can assign basic methods ( gotoAndPlay(), stop() etc..) based on MouseEvents. I can't quite figure out, however, how to assign methods based on frame number or label, triggered by labels on the currently playing SWF timeline.
So, for example: externally loaded swf starts playing, and a listener is set up to listen for a "stop" label, which would activate stop();
I can obviously just drop a stop(); in the timeline of the loaded swf, but I am really trying to banish all code from timelines, period.
I could set up a frame-based listener to decide if a label exists at the current frame, and then to evaluate if that frame label == "stop"... but that seems pretty messy, and because it has to run at every frame, CPU heavy...
So - the question is really about listeners, I guess. What event would I listen for? Something like a MouseEvent - but ... a LabelEvent instead ;) Obviously - this doesn't exist, but something like it would be perfect.
Any ideas?
Or am I just overcomplicating things, and, a couple simple actions scattered here and there isn't that big of a deal...
cheers -
~[b{}x]~