Re: [Flashcoders] Q:Watch vs listener/broadcaster

2007-08-13 Thread Muzak
The only time I really use watch is when extending the MovieClip class and have a need to know when a built-in property changes, like MovieClip.enabled class Comp extends MovieClip { private var __enabled:Boolean = true; function Comp { watch("enabled", setEnabled); }

RE: [Flashcoders] Q:Watch vs listener/broadcaster

2007-08-13 Thread Jesse Graupmann
I like to think of the watch like a filter. I first started using watch because you can get immediate notification of a change and then run an event because of that change. But because you have to return the value in order for it to get set, it makes more sense to use a getter/setter if you want to

Re: [Flashcoders] Q:Watch vs listener/broadcaster

2007-08-11 Thread chris duke
I have used watch in the past to check for when a Boolean swaps between true and false and use that to trigger functions to make things visible/invisible. It allowed for a way to link a variable that changes (Number, Boolean, String) to a function without implementing a full listener. On 8/11/07,