?
Solved

What is more efficient

Posted on 2011-05-11
5
Medium Priority
?
310 Views
Last Modified: 2013-11-11
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
0
Comment
Question by:andrewkhan
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 35739239
Is this for ActionScript 2?
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
0
 
LVL 2

Author Comment

by:andrewkhan
ID: 35739283
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
0
 
LVL 29

Accepted Solution

by:
dgofman earned 2000 total points
ID: 35739335
Nice design I like it!
0
 
LVL 2

Author Comment

by:andrewkhan
ID: 35739353
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.
0
 
LVL 2

Author Comment

by:andrewkhan
ID: 35746936
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!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses
Course of the Month17 days, 1 hour left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question