Not sure if I am on the right track or not even close. I have this code in frame 1 in root timeline:
gotoAndStop (random (6)+1);
I have 6 movieclips created with nothing in frame one except a stop action script and in frame 2 another stop action script with another movieclip that plays an animation. These movieclips are labeled mc1, mc2, mc3, mc4, mc5, mc6.
I have a button in frame 1 in the root timeline with this code:
on (press) {
ran = random(6)+1;
tellTarget (("/mc") + ran) {
play ();
}
Currently when you push the button it occassionally will randomly play one of the 6 MCs but usually requires pressing the button several times for it to advance to the next MC. I want it to randomly access one of 6 MC's and goto frame 2 each time you press the button.
Does anyone have any insight into what I am doing wrong or another approach?
thanks!!
gotoAndStop (random (6)+1);
I have 6 movieclips created with nothing in frame one except a stop action script and in frame 2 another stop action script with another movieclip that plays an animation. These movieclips are labeled mc1, mc2, mc3, mc4, mc5, mc6.
I have a button in frame 1 in the root timeline with this code:
on (press) {
ran = random(6)+1;
tellTarget (("/mc") + ran) {
play ();
}
Currently when you push the button it occassionally will randomly play one of the 6 MCs but usually requires pressing the button several times for it to advance to the next MC. I want it to randomly access one of 6 MC's and goto frame 2 each time you press the button.
Does anyone have any insight into what I am doing wrong or another approach?
thanks!!