Home     |     Photoshop    |     Flash General    |     Flash Actionscript    |     Dreamweaver    |     Macromedia Fireworks


Cervo Technologies
The Right Source to Outsource

Macromedia Flash Actionscript

_root alternative in AS3


So, I made the decision to start using AS3. Turns out it wasn't that great of
an ideas because now I'm trying to meet a deadline and figure out stupid little
problems, like for an example:

 I have a preloader that runs a movie clip. I want this movie clip to play
through regardless of whether or not the preloading has completed. In AS2 I had
a single line that said _root.preloader_done = 1; This no longer works. I get
1120: Access of undefined property _root.

j0mills,

> In AS2 I had a single line that said _root.preloader_done = 1;
> This no longer works. I get 1120: Access of undefined property _root.

    The closest analogue is the DisplayObject.stage property.  Anything that
inherits from DisplayObject (say, MovieClip) has an instanceName.stage
property that points to what is arguably the "_root" of the movie (there is
only one Stage object in a Flash application).

David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc