all groups > flash actionscript > january 2007 >
You're in the

flash actionscript

group:

Duplicating movie clip AS ... and assigning a different button to each clone


Duplicating movie clip AS ... and assigning a different button to each clone Kaneon
1/26/2007 9:14:22 PM
flash actionscript: hi everybody...

At the moment I am working on a navigation system for a project and have
encountered the following problem

stop();

mcPos = new Array();
for (i=0; i<24; i++) {
duplicateMovieClip("mc", "mc"+i, i);
eval(eval("mc"+i)+".d") = i*15;
}
mc._visible = false;
fscommand("allowscale", "false");

this code is duplicating the the movie clip "mc" however within the movie clip
there is a button.
Since it is a navigation I need a different button for each clone. anyone have
any ideas about how
to assign a different button to each clone`??


Any ideas ??? I am totally lost and a newbee in AS. thanks ;-D


stop();

mcPos = new Array();
for (i=0; i<24; i++) {
duplicateMovieClip("mc", "mc"+i, i);
eval(eval("mc"+i)+".d") = i*15;
}
mc._visible = false;
fscommand("allowscale", "false");
Re: Duplicating movie clip AS ... and assigning a different button to each clone kglad
1/26/2007 11:07:32 PM
each duplicate will have the child button no matter what you do so there's no
need to assign a different button for each duplicate.

do you mean you want to assign different code for each button? if so, what's
the instance name of the button?
Re: Duplicating movie clip AS ... and assigning a different button to each clone Kaneon
1/27/2007 2:29:27 AM
Re: Duplicating movie clip AS ... and assigning a different button to each clone kglad
1/27/2007 7:43:26 AM
:



for (i=0; i<24; i++) {
tempMC=duplicateMovieClip("mc", "mc"+i, i);
tempMC.d= i*15;
tempMC.Schalter.onPress=function(){
// do whatever
}
}
AddThis Social Bookmark Button