How are Flash library symbols constructed? Why are width/height already available in constructor?
- by Triynko
Suppose I draw a square on the stage, convert it to a symbol, export it for ActionScript with a classname of "MySquare" (and of course a base class of MovieClip).
How is it that in the MySquare constructor, the width and height of this MovieClip are already available? In fact, any named instances in the clip are also available.
I'm confused about how the Flash player seems to be able to pre-construct my movie clip by populating its properties and child clips before my constructor for the class ever runs.
I thought that it would have to first construct the clip, calling my constructor code, and then construct and add any children, but obviously the player is doing something special for clips designed in the Flash authoring environment.