use a Timer() so everytime it elapses it triggers a function to generate a 
single heart and add it to the display list in a random place and size. 
increment a counter variable every time the function runs and when it gets to 
1000 then get it to cancel your timer.
hope that helps.
david

> From: gdue...@leftandrightsolutions.com
> To: flashcoders@chattyfig.figleaf.com
> Date: Thu, 4 Feb 2010 15:00:26 -0500
> Subject: [Flashcoders] making a repeating effect
> 
> Hi Guys, I'm trying to accomplish this:
> so far I a mac named heart which is hence a heart, so I'm trying to  
> make a repetition of it along the screen until it reach the number of  
> 1000
> or less, but so far I don't have the effect of its repeating one to  
> one, instead I have all of them at the same time, there is a way to do  
> this, maybe I'm losing something if anyone of you knows a site where  
> that effects is explained for not left brainers as me, let me know.
> 
> Gus.
> 
> here is my code
> 
> stop()
> 
> import flash.display.*;
> 
> 
> 
> for(var i:Number=0; i<5000; i++){
> 
> var heart:MovieClip = new Heart();
> 
> heart.width= Math.random()*i *2;
> heart.height=Math.random()*i * 2;
> heart.x=Math.random()*i *2;
> heart.y=Math.random()*i *2;
> addChild(heart);
> trace(heart);
> }
> 
> //true is I have a lot of hearts on the screen but I would like those  
> to start appearing one to one.
> 
> 
> 
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
                                          
_________________________________________________________________
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to