inside a class i have to use _global.setTimeout since its not in the
intrinsics, maybe use Delegate, but that car should be available from
anywhere within the class, no?

eric

On 6/7/07, Danny Kodicek <[EMAIL PROTECTED]> wrote:

> I have a simple class and I can't access a private var after
> using setTimeout... I typed this up to show whats happening:
>
> class foo extends MovieClip
> {
> private var nTime:Number = 0.75;
> private var delay:Number;
>
> function foo()
> {
> // stuff
> };
>
> public function doSomething():Void
> {
> trace( nTime ); // works fine [0.75]
> var delay = _global.setTimeout( delayedFunc, 1000 ); };
>
> private function delayedFunc():Void
> {
> trace( nTime ); //undefined ?
> };
> }
>
> ?? I could use setInterval and kill it after the first fire,
> but setTimeout is nicer. This is AS2 obviously.

Is this a case for Delegate? Looks to me like you've lost scope as a
result
of going to _global.

Danny

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to