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

flash actionscript : how do i make movie clip be created twice when i click?



mattyspatty
9/11/2005 9:42:59 PM
i have a movie clip of an object moving horizontally and when it get to X it
goes back to the start. how can i make it so when i click it it will create the
clip twice at the start? i can do all the positioning and stuff im not sure how
to make multiple instances of it though.
kglad
9/11/2005 11:55:53 PM
mattyspatty
9/12/2005 12:00:00 AM
im not very good at this, what do have to assign? do you mean like this
yourMC.duplicateMovieClip("clipname", "clip", "1")??

kglad
9/12/2005 12:00:00 AM
you can repeatedly use duplicateMovieClip() to make more than one copy. for
example:

dep=1;
yourMC.onPress=function(){
rclip=this.duplicateMovieClip("yourMC"+dep,dep);
dep++;
rclip._x=22;
rclip.onEnterFrame=function(){
this._x+=3;
if(this._x>400){
this._x=22;
}
}
}
kglad
9/12/2005 12:00:00 AM
mattyspatty
9/12/2005 12:19:52 PM
i had to change it slightly because it didnt work, but how i did it sort of
does... it plays the clip but if i click the object to start it again it just
sends the clip back to the start of its loop?!? it wont seem to increment i
tried dep++ and dep += 1 (lol)
AddThis Social Bookmark Button