DuplicateMovieClip in Flash ActionScript 2help me correct mine?

job CreateRectangles(firstNum)
trace(firstNum);
in the event that (firstNum==1)
_root.rectangles1.gotoAndStop(2);
else
_root.rectangles1.gotoAndStop(2);
regarding (i==2; i==firstNum; i++)
duplicateMovieClip(_root”rectangle + my partner and i – 1, “rectangles” + my partner and i, 3)
_root”rectangles” + my partner and i._x = _root”rectangles” + my partner and i – 1._x;
_root”rectangles” + my partner and i._y = _root”rectangles” + my partner and i – 1._y + 20;
_root”rectangles” + my partner and i.gotoAndStop(2);

Almost any help is appreciated:)

Maybe this will assist you to out some.

http://www.swinburne.edu.au/design/tutorials/P-flash/T-Using-attachMovie-duplicateMovieClip/ID-3/#five

OK that should do for attachMovie.Let’s take a look at duplicateMovieClip.A common difference in between attachMovie in addition to duplicateMovieClip usually attachMovie will take your mc our out from the library through its linkage appoint and would make a text of the idea, whereas duplicateMovieClip wants the mc you should copy to be on the particular stage using an illustration name.Lets make one among duplicateMovieClip.

Make a new insurance coverage in Adobe flash – your default dimensions and everything will conduct.

Draw the rectangle down the underside of the particular stage anywhere and transform it to somewhat of a button — name the item myButton as well as give the idea an case name with “button1”.OK currently draw the circle as well as convert it to some movieclip.Appoint it myCircle plus give the idea an case name regarding “circle1”.Move circle1 off for the left belonging to the stage.Make a new decisions layer plus place this course of action on the best frame.

button1.onRelease=function()
for(hiThere=1; hiThere<8; hiThere++)
circle1.duplicateMovieClip(“circleCopy” hiThere);
_root”circleCopy”+hiThere._y=100;
_root”circleCopy”+hiThere._x=hiThere*

OK the first line tells us until this is the action that could happen when we click upon button1.We then enter into another intended for loop.This occassion I possess used “hiThere” since our variable the choices prove to your account that the item really will not matter what exactly you identify your varaibles (“i” seriously isn’t a mysterious letter).To help you see through the parameters connected with out pertaining to loop how the code directly below with go 7 times.Each time it’s run, your circle1 mc is duplicated, given an innovative (and unique) instance name and subjected to a degree between ONE PARTICULAR and 6.We next position our duplicate from 100 ful.To find the new back button position, we many hiThere with the width with circle, which is likely to make all the copies line up right next together.

Test your current movie and visit the switch.

___________

Maybe this line needs a “root rectangle” before duplicateMovieClip(_root”rectangle + my spouse and i – A SINGLE, “rectangles” + my partner and i, 3).

Leave a Reply