difference between _root and _level

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which is not a benefit when adding a title in the document properties? : Adobe flash

468


Tell me what are the features involved in updating a language?

534


What is the use of pre-loader?

506


which keyword is used to attach methods and properties to a class? : Adobe flash

564


what is the downside of macromedia ui components making extensive use of ingeritance and encapsulation? : Adobe flash

552






how many levels does flash mx support? : Adobe flash

477


Can you explain what does the void function and object contain in actionscript?

473


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

448


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

510


where is the data pulled by a load variables function stored? : Adobe flash

481


can some organizations block flash movies from being received through the internet? : Adobe flash

466


what happens if an .swf is loaded into a already occupied level? : Adobe flash

488


which methods is most likely an event handler? : Adobe flash

495


Can you explain what are the differences between javascript and actionscript?

476


where to start the adobe flash? : Adobe flash

510