Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

duplicate movie clip problem

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
GB
Hi, i would like to duplicate a movie clip and have it start at a specific position on the stage. e.g. Y = 40 & X = 18.

I want it to increment Y by 20 everytime.

This is what i tried:
Code:
var j = 1;
for (i = 0; i < videos.length; i++) {
		duplicateMovieClip(_root.mcCat, "mcCater" + i, i);
		_root["mcCater" + i]._y = 20* i;
                
        j++;
}
Any Ideas??

Regards,

Martin

Computing Help And Info:
 
for (i=0; i<videos.length; i++) {
duplicateMovieClip(_root.mcCat, "mcCater"+i, i);
_root["mcCater"+i]._y = 60+20*i;
}

You can put any number you want there.

Alternative:

for (var i = 0, n = videos.length; i<n; i++) {
mcCat.duplicateMovieClip("mcCater"+i, i, {_y:60+20*i});
}

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top