Be a Supporter!

Control Every Instance

  • 177 Views
  • 1 Reply
New Topic Respond to this Topic
tcc85811
tcc85811
  • Member since: Oct. 12, 2008
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Control Every Instance 2009-02-10 10:19:58 Reply

when i created a character model for my game, I created movie clips of all the body parts, put them together in the first of MANY character animations. My intentions were to create alternate frames on all the body part MCs for various appearances (customization). However, I never assigned any of the first MCs instance names, so I have no way of referring to them from the outside.

Is it possible to assign an instance name to every instance of an MC in the library, no matter how deeply nested?

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to Control Every Instance 2009-02-10 10:45:00 Reply

At 2/10/09 10:19 AM, tcc85811 wrote: Is it possible to assign an instance name to every instance of an MC in the library, no matter how deeply nested?

Unfortunately I don't think so. You could use

for(var i in mc){
mc._name="blabla";
}

once they're on stage, but that would name things randomly. I think you're probably going to have to head in to each MC and do it manually :(


- - Flash - Music - Images - -

BBS Signature