Add second param when instantiate Timer which indicates how many times it 
should repeat. If don't specify, then defaults to 0 which means run forever.
Add an event listener for the Timer.timerComplete event.
I think the listener you've already got should be registering for 
the Timer.timer event instead of "timer".


--- On Thu, 2/4/10, Gustavo Duenas <gdue...@leftandrightsolutions.com> wrote:


From: Gustavo Duenas <gdue...@leftandrightsolutions.com>
Subject: Re: [Flashcoders] making a repeating effect
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Date: Thursday, February 4, 2010, 4:14 PM


I've downloaded thanks
on other matters, when you say using a timer, you mean something like this ( 
I've have this from a tutorial, mixing with my idea);

something like this?

import flash.utils.*;

var timer:Timer = new Timer(5000);

timer.addEventListener("timer",TimedFunction);


timer.start();

function timedFuntion(e:TimerEvent):void{
var heart:MovieClip = new Heart();
heart.x = Math.random * stage.stageWidth;
heart.y = Math.random * stage.stageHeight;

}

the question is , how can I stop this?

Gus
On Feb 4, 2010, at 3:40 PM, Jer Brand wrote:

> Completely un-helpful for your code, but you could also give HYPE a
> whirl. Have been having a blast playing with it lately. I think the
> above task is one of the examples.
> 
> http://hype.joshuadavis.com/
> _______________________________________________
> 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




_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to