Action Script and "this"
Action Script and "this"
Out of context: Reply #4
- Started
- Last post
- 5 Responses
- MACAS00
Ok, out with the jokes:
So, what about _root?
You use _root when it's on reference to the main timeline._root.variable.target whatever
_parent is when you want to refer to another timeline, that means another clip.
_parent.variable
Is like the ball object is on the timeline, and you want to target the ball then you use _root, cause it's on the timeline, right, but then you have a variable or another object "on" the ball timeline, then you can use _parent.theVariable
If you want to make it easier then you can name your objects or variables _global, and then target it using the reference to any timeline.
Same can happen with levels
_level0.ball
_level3.ballEtc, etc.