Groups | Blog | Home
all groups > flash actionscript > december 2005 >

flash actionscript : Action Script needed!



GellyBean
12/28/2005 10:14:59 PM
Hello everyone and Merry Xmas and Happy New Year!!


I want to play 3 different movies (same size), continuously, one after
another.
I just want to know (the script) how I can make all those three movies play.
Thank you for your help!
G
kglad
12/28/2005 10:32:56 PM
GellyBean
12/29/2005 6:05:57 AM
Hello once again, Kglad.

The thing is that want to place the 3 movies in an HTML banner. I first
thought of using an HTML code, to replay and animate the same banner,with the 3
different .swf files; but this was difficult.

Then I thought of placing three movieclips within 1 .swf file.
If I have 3 movieclips in 1 swf, which script should I use so that it would
continuously play, one after the other?


GellyBean
12/29/2005 6:06:12 AM
Hello once again, Kglad.

The thing is that want to place the 3 movies in an HTML banner. I first
thought of using an HTML code, to replay and animate the same banner,with the 3
different .swf files; but this was difficult.

Then I thought of placing three movieclips within 1 .swf file.
If I have 3 movieclips in 1 swf, which script should I use so that it would
continuously play, one after the other?
Thanks for your help!!!
G


kglad
12/29/2005 6:44:13 AM
if you have 3 movieclips in 1 swf, you could use attachMovie() to instantiate
them. you need to give them linkage ids (right click on a movieclip in your
library, click linkage, tick export for actionscript and type a linkage id in
the id box). if you use id1,id2 and id3 you can use the following code:

idNum=2;
_root.attachMovie("id1","mc1",1);
checkI=setInterval(checkF,50);
function checkF(){
if(_root.mc1._currentframe==_root.mc1._totalframes){
_root.attachMovie("id"+idNum,"mc1",1);
idNum++;
if(idNum>3){
idNum=1;
}
}
AddThis Social Bookmark Button