This content has been marked as final. Show 3 replies
onEnterFrame isn't really a performance concern in this case, but it is icky.
Try looking into the Object.watch() method. Unfortunately if I recall it doesn't work on getter/setter properties like _visible, but look into it.
thanks for the help but the watch() method doesn't work for getter/setter properties. is ._visible a getter/setter property?
I have tried the watch function and I couldn’t get it to work and i tried lots of variations including adding the visible property to a new object but that only stores the first value and doesn't update
> thanks for the help but the watch() method doesn't work for getter/setter
> properties. is ._visible a getter/setter property?
I was afraid of that. Yes, _visible is a getter/setter, most properties are. Basically watch() only works on read-only properties and custom variables, which is a shame.
So I don't know of any more elegant way than constantly checking to see if the value changed. Centralize it and maybe package it in a nice class and you might feel a little better about it...