Don,
Yes, Karl is correct. In my post 'index' is a variable of type Number which
you would increment upon successive calls to function goOn(). You access
elements of an array by using the array access operator '[]'. The indices of
arrays are zero based, so the index of the first element is 0, the index of
the second element is 1, the index of the third element is 2, and so on. You
can use the length property of an array to find out how many elements there
are in the array. In your case you have an array with 9 elements so you
would want to use index values between 0 and 8. Note that mOnemTwo.length
(9) is one higher than the highest index value you can use with this array
(8). The sample code below includes an if/else block to manage index values.
// initialize index
var index:Number = 0;
function goOn(){
gotoAndPlay(mOnemTwo[index]);
// manage the index
if(index < mOnemTwo.length - 1){
// increment index by one
index++;
}else{
// set index back to zero
index = 0;
}
};
I have to echo Karl's questions about how you are planning to make
subsequent calls to function goOn(). What you have, setTimeout(goOn,+8),
will kick off the first one (although I don't understand the '+8' in the
delay parameter) but what about the rest? Any suggestions I could make here
would be pure guesswork without knowing more about the structure of your
file.
HTH
Regards,
Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders