addChild in the same layer

Posted by CEAFDC on Stack Overflow See other posts from Stack Overflow or by CEAFDC
Published on 2012-09-13T15:34:01Z Indexed on 2012/09/13 15:38 UTC
Read the original article Hit count: 223

I'm doing an application that puts tons of sprites on the screen in random position, like throwing cards on a table, but after a while it starts to drop the fps, because all the sprites still there. What I would like to do is adding the sprites but like an image, what's behind isn't stored. There are some way to do that?

the code looks like this:

var mySprite:MySprite = new MySprite();
mySprite.x = random;
mySprite.y = random;
mySprite.rotation = random;
addChild(mySprite);

Ps: I will not have to mess with them after they are on the screen.

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about flash