RE: [Flashcoders] Timer (AS3 newbie question)

2008-12-16 Thread Cor
Why use a timer? It is not necessary to do it on exact time because you use a random. So in this case Event.ENTER_FRAME would do the trick for you. HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of

Re: [Flashcoders] Timer (AS3 newbie question)

2008-12-16 Thread Nate Beck
Without getting too technical, you don't want to use timers move things. You want to use frames instead of timers. Save yourself some headache and don't use timers for movement. (unless you're using them to invalidate properties and such, but that's a more complex topic) Now if you want the

RE: [Flashcoders] Timer (AS3 newbie question)

2008-12-16 Thread Cor
addEventListener(Event.ENTER_FRAME, onEnterFrame); function onEnterFrame(event:Event):void { ball1.x += Math.round(Math.random()*5); ball2.x += Math.round(Math.random()*5); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] Timer (AS3 newbie question)

2008-12-16 Thread Mendelsohn, Michael
...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor Sent: Tuesday, December 16, 2008 11:49 AM To: 'Flash Coders List' Subject: RE: [Flashcoders] Timer (AS3 newbie question) Why use a timer? It is not necessary to do it on exact time because you use a random. So

Re: [Flashcoders] Timer (AS3 newbie question)

2008-12-16 Thread Glen Pike
] Timer (AS3 newbie question) Why use a timer? It is not necessary to do it on exact time because you use a random. So in this case Event.ENTER_FRAME would do the trick for you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http

Re: [Flashcoders] Timer (AS3 newbie question)

2008-12-16 Thread Taka Kojima
to the target, but I guess not. Thanks! - MM -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor Sent: Tuesday, December 16, 2008 11:49 AM To: 'Flash Coders List' Subject: RE: [Flashcoders] Timer