I have question on which I can’t find any answear.
Example:
In _root exists function “path=load_Path()” which is triggered when an button is pressed. The result of this function can be “photos/folder1/image.jpg” or “folder1/textpage/” or any other path.
What I’m trying to find out is how to get value of “path” automatically when it’s changed or get callback whenever function “load_Path()” is triggered.
I don’t have possibility to access this function because it’s in _root SWF which I can’t edit.
Thanks for any reply.
Regards, Artur.
It sounds like the ‘watch’ method is what you need.
It’s method signature is:
public watch(name: String, callback: Function, [userData: Object]) : Boolean
It will let you define a property to watch and a callback function that gets triggered when the property changes.
Was this helpful to you?