Re: [Flashcoders] Re: Why is my setInterval only firing once ...
sorry, i thought the problem was you using: tweenClip() which would execute it straight away.. A.Cicak wrote: how it fired even once in that case?! <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] nInterval = setInterval(tweenClip, 50); should be: nInterval = setInterval("tweenClip", 50); Stephen Ford wrote: I have a setInterval call that is only firing once. Here is the part of my class where it's occuring: --- public function repositionClip():Void{ nWidth = Math.round(Stage.width); nHeight = Math.round(Stage.height); nMidX = nStageWidth/2; nMidY = nStageHeight/2; mcMain._x = nMidX; mcMain._y = nMidY; nInterval = setInterval(tweenClip, 50); } public static function tweenClip():Void{ trace("function called: tweenClip()");} --- Can anyone advise as to what is happening here ? Thanks, Stephen.___ 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 ___ 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
Re: [Flashcoders] Re: Why is my setInterval only firing once ...
class flashCoders { var nInterval; public function flashCoders() { repositionClip(); } private function repositionClip():Void { nInterval = setInterval(tweenClip, 50); } public static function tweenClip():Void { trace("TweenClip"); } } this code works for me, so i dint find anything wroing in your code may be there is somethign conflicting in your code ? try the above given code, if that also dosent works for you let me know . Pranav A.Cicak wrote: how it fired even once in that case?! <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] nInterval = setInterval(tweenClip, 50); should be: nInterval = setInterval("tweenClip", 50); Stephen Ford wrote: I have a setInterval call that is only firing once. Here is the part of my class where it's occuring: --- public function repositionClip():Void{ nWidth = Math.round(Stage.width); nHeight = Math.round(Stage.height); nMidX = nStageWidth/2; nMidY = nStageHeight/2; mcMain._x = nMidX; mcMain._y = nMidY; nInterval = setInterval(tweenClip, 50); } public static function tweenClip():Void{ trace("function called: tweenClip()");} --- Can anyone advise as to what is happening here ? Thanks, Stephen.___ 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 ___ 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
[Flashcoders] Re: Why is my setInterval only firing once ...
how it fired even once in that case?! <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > nInterval = setInterval(tweenClip, 50); > > should be: > > nInterval = setInterval("tweenClip", 50); > > > > > Stephen Ford wrote: >> I have a setInterval call that is only firing once. >> Here is the part of my class where it's occuring: >> >> --- >> public function repositionClip():Void{ nWidth = >> Math.round(Stage.width); >> nHeight = Math.round(Stage.height); >> nMidX = nStageWidth/2; >> nMidY = nStageHeight/2; >> mcMain._x = nMidX; mcMain._y = nMidY; >> nInterval = setInterval(tweenClip, 50); >> } >> public static function tweenClip():Void{ trace("function called: >> tweenClip()");} >> --- >> Can anyone advise as to what is happening here ? >> Thanks, >> Stephen.___ >> 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 > ___ 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