Search the web
Sign In
New User? Sign Up
FLASHmacromedia · Moderated Flash discussion group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Applying the same basic action to multiple movieclips   Message List  
Reply | Forward Message #59705 of 59817 |
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");
> }






Tue Dec 16, 2008 6:20 pm

tactics2337
Offline Offline
Send Email Send Email

Forward
Message #59705 of 59817 |
Expand Messages Author Sort by Date

I've got 50 child movieclips inside of another movieclip. When you click on one, it swaps out an xml file. The name of the child movieclips and the xml docs...
Dean Hamack
tactics2337
Offline Send Email
Dec 16, 2008
8:51 am

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() { ...
karen berx
littleporpoise
Offline Send Email
Dec 16, 2008
2:11 pm

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() { ...
Dean Hamack
tactics2337
Offline Send Email
Dec 16, 2008
6:21 pm

A coworker of mine figured it out using something like this: // function to set color to active state var setActive:Function = function() { this.myColor = new...
Dean Hamack
tactics2337
Offline Send Email
Dec 16, 2008
10:30 pm

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 =...
karen berx
littleporpoise
Offline Send Email
Dec 17, 2008
10:57 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help