andrewkhan
asked on
What is more efficient
Hi,
Can somebody tell me what is more efficient performance wise - using _global variables or referencing a variable on the root with _parent._parent all the time? Taking note that I cannot use _root as it is an embeded SWF file.
Thanks
Can somebody tell me what is more efficient performance wise - using _global variables or referencing a variable on the root with _parent._parent all the time? Taking note that I cannot use _root as it is an embeded SWF file.
Thanks
ASKER
Yes, unfortunately I am tied to ActionScript 2 as the system I am using relies on that. (See www.yudu.com).
Just looked up _lockroot. If that does what I think it does it is going to be very useful and save me a lot of headaches...
Will get back if it works.
Thanks
Just looked up _lockroot. If that does what I think it does it is going to be very useful and save me a lot of headaches...
Will get back if it works.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No, no that's not my design! ( I wish ;) ) Just the system i'm using. The magazines use flash in which you can place Flash to 'enhance' the design.
ASKER
I managed to solve the problem caused by optimization through the another means (turns out it wasn't my bad coding, few!)
But this _lockroot is going to be very useful and would of solved my problem if that was the cause.
So thanks, dgofman!
But this _lockroot is going to be very useful and would of solved my problem if that was the cause.
So thanks, dgofman!
As I know in AS3 we cannot use _root or _global variables
Anyway I will recommend to use _global, because if you declare your values as _global you
will able to access to values from loaded external SWF
Usually when we are loading SWF into SWF we are using _lookroot = true;
In this case you may not able to access to _root values