View Full Version : multiple movie clips
ssjogus
12-05-2002, 08:25 AM
can we have somethinl like this:
on Press
show movie: mv1 & mv2 & mv3 & mv4
please help me out.
shruti.
What are those movies? Are they seperate SWFs?
SFA
ssjogus
12-05-2002, 09:47 AM
no they are not different swf files, just different movie clips.
ssjogus.
simontheak
12-05-2002, 10:16 AM
There's probably a better way of scripting this, but this should do the job if you put it on a button:
on (release){
_root.movieClip1.gotoAndPlay(1);
_root.movieClip2.gotoAndPlay(1);
_root.movieClip3.gotoAndPlay(1);
_root.movieClip4.gotoAndPlay(1);
}
Any good??
simontheak
12-05-2002, 10:20 AM
Actually, just thought - a loop would probably be more efficient if you name your movieClip instances movieClip1, movieClip2 etc.:
for(i=1; i<4; i++){
root._movieClip+i.gotoAndPlay(1);
}
Does someone want to check I've got that right?? :rolleyes:
Originally posted by simontheak
Does someone want to check I've got that right?? :rolleyes: [/B]
close, but no cigar ;)
this will do:
for(i=1; i<=4; i++){
_root["movieClip"+i].gotoAndPlay(1);
}
regards,
tost
The syntax is correct but I dont see what the gotoAndPlay(1) has to do with it. How did you figure out what he wanted exactly?
I am puzzled....:confused:
SFA
simontheak
12-05-2002, 12:42 PM
Thanks Tost ... I had a feeling it would be something funny like that. Ah well, maybe next time ;)
sfa - the 1 in the brackets after the gotoAndPlay function tells Flash to start playing the relative movie clip at Frame 1 (ie the beginning). I assume that's where you want it to start ... if not then just change the number or place a frame label in quotation marks inside the brackets
:D I know how the gotoAndPlay function works, what I didnt undersant is how you figured what he was asking, it makes more sense not but I thought he was talking about clips with their _visible turned to false when he said "show the clips".
SFA
simontheak
12-05-2002, 01:05 PM
Oops ... sorry. Just realised it was you. Thought you had started the post. Well you know sfa and ssjogus are easy to confuse :rolleyes:
As for knowing what he wanted ... maybe it's because i'm pretty much a newbie too - some kind of a link I guess!
Don't know, this is happening too often, I dont understand what people want and ask for clarification....I think I need a loooooooooooooong holiday.
SFA
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.