RE: [FLASHmacromedia] Re: Applying the same basic action to multiple movieclips
How are your 50 movieclips created? Have you put them on stage manually or have
you created them by a code like this:
myOR_mc = map.createEmptyMovieClip("OR"+i, map.getNextHighestDepth());
It is easier to create the child movieclips with code, especially when they
occur in big numbers. Create a loop around the createEmptyMovieClip with i from
0 to 50.
Within the loop use the
myOR_mc.id=i;
map["OR" + i].onrelease=function()
{
my_xml.load("OR" + this.id + ".xml"); //not this.i, my mistake
}
Doing it this way, you only have to write the onrelease function ones instead of
50 times
If you don't get it work, you can always send me the code. The I can take a look
at it.
Kind regards,
Karen
To:
FLASHmacromedia@...:
bushidodesigns@...: Tue, 16
Dec 2008 18:20:57 +0000Subject: [FLASHmacromedia] Re: Applying the same basic
action to multiple movieclips
Hi Karen,Unless I'm misunderstanding you, I would still have to write out an
action for each state that way like:map["OR" +
i].onRelease=function(){my_xml.load("OR"+this.i + ".xml");}What I'm trying to do
is write a single function for all 50.--- In
FLASHmacromedia@yahoogroups.com,
karen berx <irowake_iruka@...> wrote:>> > add a variable to each of your
childmovieclips> map.WA.id=i;> > Then you can write your function ones as:>
map["WA" + i].onRelease=function()> {> my_xml.load("WA"+this.i + ".xml");> }
_________________________________________________________________
Send e-mail faster without improving your typing skills.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_12200\
8
[Non-text portions of this message have been removed]