HOME       >>       Programming

Flash As3 Question Alternitives to root


Live-Dimension

Hi. Basically, the MovieClip(root) thing is dodgy at the best of times. Besides - it's not recommended to use root at all. In fact, it's highly discouraged. I've seen plenty of posts about this, but for the life of me, I can't find anything about what else I should use. What alternative should I be using to access properties/mc's/etc from the root/parent time lines?? edit:Cleanup/spelling fixes, etc.


dimumurray

Hi.
Basically, the MovieClip(root) thing is dodgy at the best of times. Besides - it's not recommended to use root at all. In fact, it's highly discouraged. I've seen plenty of posts about this, but for the life of me, I can't find anything about what else I should use. What alternative should I be using to access properties/mc's/etc from the root/parent time lines??

edit:Cleanup/spelling fixes, etc.


I'm not that familiar with 'root' work-arounds in AS3 (still in the process of learning AS3 myself). But in AS2 the usual solution was to use '_level0' instead of root. '_level0' basically gives you a reference to the Stage movieclip. I don't know if this would still work in AS3 but with a little 'google'-ing you might just come up with something. And check out Adobe's official documentation, something's bound to be in there somewhere.

gnitsuk

I'm not that familiar with 'root' work-arounds in AS3 (still in the process of learning AS3 myself). But in AS2 the usual solution was to use '_level0' instead of root. '_level0' basically gives you a reference to the Stage movieclip. I don't know if this would still work in AS3 but with a little 'google'-ing you might just come up with something. And check out Adobe's official documentation, something's bound to be in there somewhere.

This is the solution to your problem and the way to do it in the newest Flash - Global Variables

This will give you the ability to add global variables and objects that you can access from anywhere in your AS code.


VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.