Hi all,
I’m having some trouble with using a Document class in Flash CS3 that is an extension of another class. When I do this, I can no longer make references to MovieClips with instance names on the stage.
Here’s an example. I have a class called Minigame that extends MovieClip and then a class Shooter that extends Minigame. So the relationship looks like:
MovieClip <-- Minigame <-- Shooter
I want to use Shooter as my Document class in the Flash file Shooter.FLA. However, when I do this, I am unable to directly access any instance names of MovieClips on the stage of Shooter.FLA from Shooter.as. In other words, if I try to write the line:
var mc:MovieClip = this.instanceName;
in Shooter.as, I get the error:
1120: Access of undefined property instanceName.
even though there is a MovieClip on the stage with that instance name. Does anyone know what’s going on under the hood well enough to explain why this isn’t working and perhaps suggest a workaround? Thanks.
-John