In my FLA I have a movieclip in the Library named “ContentPanel1”. I have it’s Linkage properties to export on first frame - class “ContentPanel1” and base class flash.display.MovieClip.
In my code I’m trying to attach an instance of this movieclip:
var instanceClass:Class = getDefinitionByName("ContentPanel1") as Class;
Now, here’s the error I get:
ReferenceError: Error #1065: Variable ContentPanel1 is not defined.
at global/flash.utils::getDefinitionByName()
The weird thing is that this DID work, but when I went into Publish Settings > Actionscript Settings and then unchecked the “Automatically Declare Stage Instances” checkbox, now it doesn’t work.
Do stage instances need to be automatically declared now in order for this to work?
Nate