as3 Watcher

hi

as2 code


var Watcher:Function = function(prop, oldVal, newVal ):Number {
 trace( newVal )
    return newVal;
}
_root.watch("x_var", Watcher, 55);
x_var = 10

as3 code

  ?...  

(maybe much too late to pic up this thread, but I’ll try…)

what if you’re trying to ‘watch()’ a system level var/prop, such as loaderInfo.parameters for update ( see http://www.kirupa.com/forum/showthread.php?t=289313 , for context - communication with a c++ or vb wrapper )… in that case a custom ‘set’ accessor method won’t work ( ie, set loaderInfo.parameters.myParam(val:*)… )

thoughts?

SOL. You’ll have to set up a poller or create your own get/set API if possible