difference between _root and _level

Answers were Sorted based on User's Feedback



difference between _root and _level..

Answer / mohammed sunely

The property _root refers to the main timeline of the movie
from which the property was referenced, or the top-most
timeline within the current hierarchy of timelines.

The property _level0 references the main timeline of the
movie loaded into level 0. This property can be referenced
from any level and still reference the same timeline, that
on level 0.

Is This Answer Correct ?    20 Yes 1 No

difference between _root and _level..

Answer / anmol saraf

Every level has a root inside it, like _level0 has a root
timeline of its own, level1 has its own and so on..

Untechnically and in explanation point of view a root can
be said as a child of level.

We use levels whenever we need to load new swf, jpg or gif
files inside our current working swf but not in a movieclip
and need to be placed above the current elements without
replacing any.

Any swf loaded in at level0 will replace all the contents
with the new but placed in level1 with bring every new
content above the old.

So level0 refers to one root of his own and level1 refers
to another root of his own. Every level has a root and then
corresponding child movieclips and elements inside one
another.

Is This Answer Correct ?    7 Yes 1 No

difference between _root and _level..

Answer / amjad hussain ghazi

Ok.. welll here is what the difference is:

Every SWF file runs at some unique level. Let us say we
have two swf files namely parentSWF and childSWF, with
childSWF loaded into parentSWF file.

As said, each swf runs at a unique level, assume that
parentSWF is running at level0 and childSWF is running at
level1. Therefore, if level0 will refer to the main
timeline of parentSWF and level1 will refer to the main
timeline of childSWF.

_root will always refer to the maintimeline of its own swf.
In other words, if we say _root in childSWF, it will point
to the maintimeline of childSWF. Similarly, if we say _root
in parentSWF, it will refer to the maintimeline of
parentSWF.

It is therefore important to note that _root and level0
will only be same if they are being referenced from the swf
file that is running at level0. Similarly, _root and leveln
will be same only in the swf that is running at leveln.

As per the above explanation, if you refer to _root and
level0 in an swf file that is running at leve5, the _root
will point to the maintimeline of this particular swf
(running at level 5) and level0 will point to another swf
that is running at level 0.

Hope that helps :)

Is This Answer Correct ?    5 Yes 0 No

difference between _root and _level..

Answer / kunal

Differences between _root and _level0

At first glance it may seem that _root and _level0 refer to
the same thing. However, they are not identical.

The property _root refers to the main timeline of the movie
from which the property was referenced, or the top-most
timeline within the current hierarchy of timelines. If an
instance of the Flash Player has multiple levels, the main
or root timeline is on the level containing the currently
executing script.

The property _level0 references the main timeline of the
movie loaded into level 0. This property can be referenced
from any level and still reference the same timeline, that
on level 0.

When a SWF file is loaded into the Flash player, it's main
timeline is loaded into level 0. In this movie and this
movie only will _root and _level0 reference the same
timeline. Additional SWF files can be loaded into
additional levels using loadMovie or loadMovieNum.
References of _root in those files then reference the level
in which that SWF referencing _root was loaded. For
example, if a SWF is loaded into level 2, a reference to
_root in that SWF will reference the same timeline that
_level2 references, but will not reference the same
timeline as _level0. A reference to _root will only equal
_level0 in the SWF that was first loaded into the player
(level 0).

If you are working with levels in ActionScript, you should
always use _root to reference the main timeline in your
movies. Using _level0 may incorrectly reference the main
timeline of another SWF, the first movie loaded into the
player.

Note: ActionScript 3 no longer uses the concept of levels.

Is This Answer Correct ?    5 Yes 1 No

difference between _root and _level..

Answer / karthikeyan

_root is the main movie clip on flash

but vritualy multiple _level holds multiple _root

eg:
_level0._root.mc_1
and
_level0.mc_1

refers one object

Is This Answer Correct ?    0 Yes 1 No

difference between _root and _level..

Answer / dinesh anand

_root:It reffers to the stage
_level:It reffers to current level of the swf.We have to
mention the level in "loadMovieNum" function.

Is This Answer Correct ?    0 Yes 1 No

difference between _root and _level..

Answer / hari

They are same, which denotes the parent stage

Is This Answer Correct ?    7 Yes 21 No

Post New Answer

More Flash Action Scripting Interview Questions

when does the accessibility . Isactive () method return true? : Adobe flash

0 Answers  


which of the following is not a key benefit of usability testing? : Adobe flash

0 Answers  


what are the statements uses proper for loop syntax? : Adobe flash

0 Answers  


Hello! I would like to learn the technique (I don't know if there is a name for it) used by Stu Campbell (a.k.a. Sutu) in his flash comic book Nawlz for animating the image of whale in episode one. The the three tutorials that the artist made explain the basic scenario of the working process but they do not at all go into coding and such.

0 Answers  


What does the void function and object contain in actionscript?

0 Answers  






what is default frame rate of the time line in frame per second? : Adobe flash

0 Answers  


you are creating a form that will fade out when the user submits it. What must you do to with the text fields to ensure that text entered by the user will fade out? : Adobe flash

0 Answers  


what is the key advantage of flash being a true clientside application? : Adobe flash

0 Answers  


which two panels can be used to change the label text of a button component? : Adobe flash

0 Answers  


in which level does the original movie resides? : Adobe flash

0 Answers  


which statement best describes what the #initclip num and #endinitclip commands indicate? : Adobe flash

0 Answers  


How we can create a scrolling gallary in a portfolio,what is the script?

2 Answers  


Categories