If you want to see the hearts to appear one at a time you need to add them at a 
rate slower than your frame rate (give the stage a chance to update). Might 
want to use setInterval to add the hearts.
 
hth

--- On Thu, 2/4/10, Nathan Mynarcik <nat...@mynarcik.com> wrote:


From: Nathan Mynarcik <nat...@mynarcik.com>
Subject: Re: [Flashcoders] making a repeating effect
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Date: Thursday, February 4, 2010, 3:16 PM


Add each heart to the stage with alpha at 0. Then use a tween engine to fade 
the heart in with a delay. Use your "i" variable as the delay in seconds. 


------Original Message------
From: Gustavo Duenas
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: [Flashcoders] making a repeating effect
Sent: Feb 4, 2010 2:00 PM

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


Nathan Mynarcik
Interactive Web Developer
nat...@mynarcik.com
254.749.2525
www.mynarcik.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

Reply via email to