flash - Actionscript - listening to property changed event on the object -


in actionscript3, there event can listen whenever property of object gets updated?

i found propertychangeevent dealing flex event objects. i'm not familiar flex , mean application use it's components. application writtien strictly in actionscript3.

update looks there in actionscript-2 - object.watch

in actionscript3, there event can listen whenever property of object gets updated?

no, or @ least not default!

in flex, custom properties on objects implemented get/set methods , set methods dispatch property change event. this:

private var _myvar : someclass; public function myvar():someclass{   return _myvar; }  public function set myvar(value:someclass):void{   _myvar = value;   dispatchevent(new event('myvarchanged')); } 

this used binding in flex framework , of these 'propertychanged' events not documented. every once in while become useful.

in non-flex code; you're more welcome write properties in same exact manner. not expect default flash classes dispatch 'propertychanged' events.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -