PDA

View Full Version : Instance name changing


DrPS314
06-12-2005, 11:55 PM
Ok. This is really annoying. So I have these movie clips inside a another movie clip, and I want to use those to control a movie clip on the main scene. Their actions are this:

onClipEvent(enterFrame){
if(this.hitTest(_level0.car)){
_level0.instance12.life._xscale-=5;
}
}

But each time I add a movie clip, the _level0.instance12.life keeps changing numbers, like from 12 to 13. Then I have to go and change all of the movie clips. Is there an easier way to do this? :confused:

senocular
06-12-2005, 11:59 PM
name it yourself and use that name. The instance# name is just the default give to un-named movie clips. You shouldnt use that, you should use your own custom names that you specify in the properties panel when the movie clip is selected :)

DrPS314
06-13-2005, 12:03 AM
yes, I have named it "life", but the instance number keeps changing, so it wont react unless it's "_level0.instanceNumber.life"...

senocular
06-13-2005, 12:50 AM
you need to name the instanceNumber clip too

DrPS314
06-17-2005, 02:29 AM
whats an instanceNumber clip?