Skip to main content
June 9, 2011
Question

Duplicate Movieclip Function

  • June 9, 2011
  • 1 reply
  • 388 views

Hi all,

I'm working on a creating a button that will create (preferably unlimited) duplicates of one movie clip. I have something that works for Flash, pre-2004, but I'd like to update it to Actionscript 2.

Any suggestions? (Movieclip's instance name is "Cat").

Button:

on (press) {

i = i + 1;

duplicateMovieClip (_root.cat, "cat" + i, i);

}

Actionscript on the Movieclip object:

onClipEvent (load) {

   scale = (random(10) + 50)

   this._x = random(400);

   this._y = random(400);

   this._alpha = random(100);

   this._xscale = scale;

   this._yscale = scale;

}

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
June 9, 2011

With the exception of taking the code off the objects and putting it on the timeline, I see no reason to change it.  The functions you would use will still involve AS1 code.

June 9, 2011

Thanks, Ned. Just confused: I'm trying to achieve the same effect, but with Actionscript 2. Do you have any recommendations how I could do so? When I publish to Actionscript 2 (and any Flashplayer above 5) it doesn't work.