Jump to content
xisto Community
Live-Dimension

Flash As3 Question Alternitives to root

Recommended Posts

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.

Edited by Live-Dimension (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.