Here was the only workaround...
public static function doSomething(param:Number=0):void {
var t:Timer = new Timer( 300, 1 );
//I can't pass arguments/parameters to my timer method???
var f:Function = function():void{
callTheRealFunc( param);
}
t.addEventListener( TimerEvent.TIMER, f );
t.start();
}
On 10/23/07, Clint Modien <[EMAIL PROTECTED]> wrote:
>
> Looks like this solution is broken.
>
> On 10 Apr 2007 12:29:19 -0700, Gordon Smith <[EMAIL PROTECTED]> wrote:
> >
> > You could also subclass Timer and store any additional data you want
> > on MyTimer.
> >
> > - Gordon
> >
> > ------------------------------
> > *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> > Behalf Of *Erik Price
> > *Sent:* Tuesday, April 10, 2007 10:53 AM
> > *To:* [email protected]
> > *Subject:* Re: [flexcoders] passing variables to Timer handler routine
> >
> > On 4/10/07, dougco2000 <[EMAIL PROTECTED] <doug%40dougco.com>> wrote:
> >
> > > But since Timer calls a new function, how to best pass along any
> > > objects or strings that it will need, other than have these as global
> > > vars?
> >
> > Excellent question. It's answered here:
> > http://flexblog.faratasystems.com/?p=125
> >
> > e
> >
> >
> >
>
>