Component/sub-movieclips initialization in AS2

Here’s a thing. You attach some MovieClip to the stage and try to style or set a components properties that resides within it, only to find your efforts are ignored. Imagine you have a library symbol containing a button, and with the following AS2 class bound to it: import mx.controls.*; class App extends MovieClip { var a_button:Button; public function App() { a_button.enabled = false; // ignored } } The reason the setting of .enabled is ignored, according to EAS2 is that Flash works from the outside in, so a child movie can see it’s parent upon creation, but not the other way around. Now this doesn’t apply to intrinsic properties, such as _rotation or _alpha, just properties and methods you have attached to a MovieClip sub-class/component through a class. ...

December 2, 2004