|
-
[MX04] Actionscript help
Hi there,
Since ive started using actionscript ive always had the same problem that comes up time and time again. Locating items.
_root. is the base of your application
_parent. is one level up
_child. is one level down
but how do you located an item which is neither of these.
i.e. i always try _root.mc1.mc2.mc3(1);
but never works. Can anyone help.
Thanks in advance
-
FK'n_dog
if you have trouble finding paths, add this code to frame#1
of any movieclip and it will trace its path in the output window -
trace(this);
if you have - mc1.mc2.mc3
and place the code on frame#1 of mc3, the output will be -
_level0.mc1.mc2.mc3
from mc3, if you want to reach the timeline of mc2 -
_parent.gotoAndPlay("a_label");
from mc3, if you want to reach the timeline of mc1 -
_parent._parent.gotoAndPlay("a_label");
from mc3, if you want to reach the main timeline -
_root.gotoAndPlay("a_label");
or
_level0.gotoAndPlay("a_label");
-
 Originally Posted by a_modified_dog
if you have trouble finding paths, add this code to frame#1
of any movieclip and it will trace its path in the output window -
trace(this);
if you have - mc1.mc2.mc3
and place the code on frame#1 of mc3, the output will be -
_level0.mc1.mc2.mc3
from mc3, if you want to reach the timeline of mc2 -
_parent.gotoAndPlay("a_label");
from mc3, if you want to reach the timeline of mc1 -
_parent._parent.gotoAndPlay("a_label");
from mc3, if you want to reach the main timeline -
_root.gotoAndPlay("a_label");
or
_level0.gotoAndPlay("a_label");
ah I see. Theres a few things in there ive never used before such as level1 and also _parent. twice. Il have to try these out over the coming days. Thank You
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|