I swear I’ve never seen Flash do this before:
I gave 5 movie clips objects (let me abbreviate them mcs) 5 unique instance names. Then I told them to stop. e.g., gear1.stop(); and so on. When this did not work on some of them, I put in a bit of code that returned each object’s instance name and current frame number.
On the two that did stop, the instance names came back as I expected - what I had typed into the properties panel. On the other three, the instance names were returned as “instance##” (where ## was a 2-digit integer) instead of “gear1” “gear2” etc.
So I deleted them and dragged fresh instances of them out of the library and onto the stage. I didn’t give any of them instance names and tested the movie: it returned the same instance names as the ones that had been deleted a minute ago!
Here’s what the output window looks like:
gear5’s cur frame = 2
gear4’s cur frame = 2
instance85’s cur frame = 2
instance82’s cur frame = 2
instance79’s cur frame = 2…
I’ve been working with Flash all day long. Perhaps my brain is just tired, but I could swear this isn’t supposed to happen. Here’s what I’ve been trying to do code-wise:
gear1.onEnterFrame = function():Void{
stop();
}
gear2.onEnterFrame = function():Void{
stop();
}
gear3.onEnterFrame = function():Void{
this.stop();
}
gear4.onEnterFrame = function():Void{
this.stop();
}
gear5.onEnterFrame = function():Void{
this.stop();
}
onEnterFrame = function():Void{
//trace(gear1._currentframe());
this.gear2.stop();
this.gear3.stop();
this.gear4.stop();
this.gear5.stop();
}
Does anyone have an idea as to what is going on?