Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-24-2003, 09:45 PM   #1
scot
actionscript junkie
 
scot's Avatar
 
Join Date: Mar 2003
Location: dark alley
Posts: 489
Default duplicating MC's help

I'm new to this so.......


for (i=0; i<10; i++) {
duplicateMovieClip("item0", ["item"+i], _root.mc);
_root.mc["item"+i]._y = _root.mc["item"+i]._y + 20 ;
_root.mc["item"+i].itemId = i;
_root.mc["item"+i].qty = _root.arraytemp.items[i][5];
_root.mc["item"+i].name = _root.arraytemp.items[i][0];
}


for some reason it doesnt create the item+i and move it down a little bit.............. any ideas.... or does this code a piece of !(%$#_@!$
scot is offline   Reply With Quote
Old 03-24-2003, 09:55 PM   #2
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

the last parameter for duplicateMovieClip is for depth

http://www.tableau.com.au/tutorials/attachmovie/

cheers
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 03-24-2003, 10:01 PM   #3
binkyboo
Senior Member
 
binkyboo's Avatar
 
Join Date: Mar 2002
Location: Madison, Wisconsin
Posts: 1,312
Send a message via MSN to binkyboo
Default

Try this:

ActionScript Code:
menuItemSpacing = 20; numberOfButtons = 10; for (i=1; i<=numberOfButtons; i++) {     _root.item0._x = 21;     _root.item0._y = 93;     _root.item0.duplicateMovieClip("item"+i, i);     _root["item"+i]._y = _root["item"+(i-1)]._y+_root["item"+(i-1)]._height+menuitemspacing; }
binkyboo is offline   Reply With Quote
Old 03-24-2003, 10:12 PM   #4
scot
actionscript junkie
 
scot's Avatar
 
Join Date: Mar 2003
Location: dark alley
Posts: 489
Default

thanks.... just added .i to my depth parameter.... thanks again... darn brain farts......
scot is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:12 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.