I'd say look into TweenLite, it supports tween delay and tween length which I think would solve your problem and also wouldn't entail having to deal with a bunch of ENTER_FRAME event listeners.
- Taka On Tue, Dec 16, 2008 at 10:20 AM, Glen Pike <postmas...@glenpike.co.uk>wrote: > Hi, > > You can still make a "component" to do this. I would recommend extending > the Sprite / MovieClip class as your custom component. > > Add a variable called speed and add an "Enter Frame" handler to your > code, then in there, work out your next position based on the speed. > > It would be a nice way of getting to grips with extending classes and > using event listeners too.. > > Glen > > > Mendelsohn, Michael wrote: > >> In AS2, I would have made a component with a parameter for speed. I'm >> just not sure how to do that in AS3, so I was guessing with a timer, I >> could add and event listerner to dispatch an event 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 (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://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> >> >> > > -- > > Glen Pike > 01326 218440 > www.glenpike.co.uk <http://www.glenpike.co.uk> > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders