Describe ChangeWatcher.watch. - Flash
Describe ChangeWatcher.watch.
- Similar to watch on AS2.
- All changes to the variable are watched.
- An event is fired on certain changes.
- Call the canWatch that ensures the watch.
- It has 3 ways to specify the second parameter of the watch() function.
1. A public bindable property for hosting object.
ChangeWatcher.watch(this, “var”, handler)
2. An object that contains public bindable property and a function to serve a getter property.
ChangeWatcher.watch(this, {name:”var”,getter:function():String { return “valid string”} }, handler);
3. A non-empty array, which contains the combination of two options which binds properties that is accessible from the host.
ChangeWatcher.watch(host,[“a”,”b”,”c”], where a b and c are hosts.