Re: [Flashcoders] Passing a Function as Parameter and call functionlater

2007-02-19 Thread T. Michael Keesey
On 2/18/07, Jesse Graupmann [EMAIL PROTECTED] wrote: var callback:Function = mx.utils.Delegate.create ( _root, nextFrame ); anyOtherObject.func = function(){ callback () }; anyOtherObject.func (); You can combine the first two lines (and simplify the second) to just: anyOtherObj.func =

Re: [Flashcoders] Passing a Function as Parameter and call functionlater

2007-02-19 Thread Felipe Hefler
Thank you all guys! Great job. But I still have something to ask, silly or not. One thing eval does for me and I don't know if I'm right or wrong, is when I use it (despite I know it's not the better solution), it let's me leave my function like this: _anywhere.rew(mcToRewind,

RE: [Flashcoders] Passing a Function as Parameter and call functionlater

2007-02-18 Thread Jesse Graupmann
Felipe - call (Function.call method) uses comma separated values; currentScope.func.call ( alternateScope, arg1, arg2, arg3 ) apply (Function.apply method) uses an array of elements; var args = [arg1, arg2, arg3]; currentScope.func.apply (alternateScope, args );