Flash as3 question
- Started
- Last post
- 7 Responses
- redant
this._parent._parent.clip01.goto... ("pressdirectory");
How is the above written now in as3? I'm searching haven't found out yet. Any help - Thanks!
- redant0
when I am loading a clip in one timeline I want to target another timeline to play a frame. This shouldnt be difficult. Can anyone help? Thank you. -red
- zaq0
first you need to make sure you are loading into a MovieClip, not a sprite. Then try to use stage.mc_name.gotoAndStop("whate...
- redant0
ok thanks zaq. I'm pretty sure its an mc. I'll try.
- fugged0
fyi, "_parent" is "parent" in as3.
make sure you get a valid reference to the "clip01" instance. you should probably use the displayObjectContainers traversal methods (getChildByName, getChildAt, etc...)
you might want to consider storing a reference to the targeted movieclip in "this", rather than hard coding it's path directly (parent.parent... ect) . If you ever change the nesting of the clips, there's no need to go update all the paths.
- redant0
how can I store a reference in "this" is there a tut anywhere for the traversal methods?
- fugged0
sorry, i was probably getting more complicated than you needed...
to store a reference, you'd need to set a variable = clip01. in the lovely world of OOP, you'd create a class that extends sprite that has a property to store the reference. like I said, more complicated than you need.
just go about as you are :)
for a list of the methods for "getting" stuff and examples, checkout livedocs for the DisplayObjectContainer:
http://livedocs.adobe.com/flash/…
- redant0
well i can learn! ok.