hi,
any tutorials on using _ parent.._root..global...
Could you please tell me somethin about these terms?
thanks
Printable View
hi,
any tutorials on using _ parent.._root..global...
Could you please tell me somethin about these terms?
thanks
if you prefix anything by _root. whatever follows applies to the main timeline (an important thing to remember is if you use _root in a movie loaded into a movie clip, _root. will target the main timeline of the movie the file is loaded into and no longer it's own main timeline) so for example,
_root.gotoAndPlay("framelabel");
sends the main timeline to play the frame "framelabel"
_root.getBytesLoaded();
finds the bytes loaded in the main timeline.
_parent can be used in the same way as _root except instead of going back to the main timeline it targets the timeline containing the movie clip with the action in. (so if you have a movie clip placed on the main timeline within that clip, _root and _parent will both target the main timeline)
for example
_parent.stop();
_parent._parent._parent.play();
you can string together sequences of _parent's to navigate back through multiple nested clips.
this means the current timeline,
this.gotoAndPlay(2);
would send the current timeline to play frame 2.
_global is an object, it can be used to hold variables so they are available to any timeline within the movie. for example,
_global.bestWebsite = "flashkit";
now from any movie clip in that movie you can use
trace(bestWebsite); // this will display flashkit
Great explanation
Thanks