PDA

View Full Version : stopping many movie clips



flash_legend
August 27th, 2003, 05:28 PM
good day members
small help i need
first of all i use FLASH 5

i have for exmaple 5 movie clips on the main stage

Now i want to stop all the movies in on code
is that possible guys???????????


thanks guys

Voetsjoeba
August 27th, 2003, 05:32 PM
Sure, say your mc's have the instance names mc1, mc2, mc3, mc4, mc5, and they're on the main timeline, then use:

for(i=0;i<=5;i++){
_root["mc"+i].gotoAndStop(3);
}

Where 3 is the frame to stop at.

flash_legend
August 27th, 2003, 05:39 PM
waweeeeeeeeeeee
what a quick answer thanks for you pal

now if i want to use a button,,,,,,,,,,,the code will be like this


on (release){
for(i=0;i<=5;i++){
_root["mc"+i].gotoAndStop(3);
}
}

Voetsjoeba
August 27th, 2003, 05:47 PM
If they are on the main timeline, yep :)

flash_legend
August 28th, 2003, 07:09 AM
If they are on the main timeline, yep

============================

what about if this button is inside a movie clip
the code in this matter will be deffernet?
:q: :-\

Voetsjoeba
August 28th, 2003, 07:24 AM
No, it will still target the same movieclips on the main timeline.

*Oh I just realized this is Flash 5 ! I'm not sure if it will work for Flash 5, I'm an MX guy. If it doesn't, sorry.

*Just checked (http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary026.html), it should work in F5

flash_legend
August 28th, 2003, 07:36 AM
no problem pal at least you tried to help

and i am thanking you for that

the link you just added ,,,,,,,,,,,, i will see it


thanks alot

Voetsjoeba
August 28th, 2003, 08:07 AM
The link was just to make sure that it also worked in Flash 5. But you can view it too, you can learn a lot from it :) So did it work out for you ?

flash_legend
August 28th, 2003, 08:10 AM
still am trying
in case i found what i want
i really will add the code............is that ok for you

Voetsjoeba
August 28th, 2003, 08:22 AM
Can I see the FLA so I can solve it for you ?