actionscript question
actionscript question
Out of context: Reply #3
- Started
- Last post
- 3 Responses
- nearestexit0
Figured it out.
Thanks for the other responses, but I was trying to keep all my actionscript on the main timeline -- not in the mc's.
Here's how I did it. You'll need three movie clips with linkage names 'mc_1', 'mc_2', and 'mc_3'.
Here's the actionscript. Add this to frame 1 of the main timeline.
var mcArray:Array = new Array( 'mc_1', 'mc_2', 'mc_3' );
var nIndex:Number = 0;
function ShowNextClip() {
var mcClip:MovieClip = _root.attachMovie( mcArray[nIndex], 'showMe', 10 );mcClip.onEnterFrame = function() {
if( mcClip._currentframe == mcClip._totalframes ) {
_root.ShowNextClip();
}}
nIndex ++;
if( nIndex > mcArray.length -1 ) {
nIndex = 0;
}
}ShowNextClip();
stop();