Flash function help
Flash function help
Out of context: Reply #5
- Started
- Last post
- 10 Responses
- Boz0
koriner's code is valid and approach is ok. You need to pass the object reference to your function as well. So his code will work, however there is a lot of things wrong with using _root. It's bad coding practice.
_root shouldn't be used at all. Instead use _parent to target timelines. The reason is that if you need to load this movie inside another movie, or even copy paste your object inside a different clip in another FLA your _root reference will pretty much make headaches.
_parent will work properly in all instances and you can always target several levels deep timelines with _parent._parent._parent etc.