Be a Supporter!

duplicateMovieClip

  • 575 Views
  • 2 Replies
New Topic Respond to this Topic
Vorp
Vorp
  • Member since: Apr. 24, 2004
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
duplicateMovieClip 2005-09-02 12:18:39 Reply

I want to duplicate a MC twice. This is what i got:
I got a MC named human.
I got a button with this AS:
on (release) {
duplicateMovieClip("human", "human2", 1);
setProperty ("human2", _x, random(550));
setProperty ("human2", _y, random(400));
}

I can duplicate once but I want to duplicate twice. How should i do?
(The second time i press the button human2 dissappeares)

Darkaxl
Darkaxl
  • Member since: Oct. 23, 2004
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to duplicateMovieClip 2005-09-02 12:24:11 Reply

When Duplicating Movie Clips it isnt very easy For the simple fact that If u need to change one of them not meanin to change the other they both change Found this hard in most Of my projects ^_^ best thing u can do is to just make a new MC and just C/a/p the AS ^_^


BBS Signature
ShotInTheHead
ShotInTheHead
  • Member since: Dec. 20, 2002
  • Offline.
Forum Stats
Member
Level 31
Blank Slate
Response to duplicateMovieClip 2005-09-02 12:25:52 Reply

change the 1 at the end of ur duplicatemoveiclip to _root.mcvar

on the maintimeline define mcvar to any number you want thats higher than 0.

then at the end of your code put _root.mcvar++ to put the other duplicated mc on a different layer.