views:

68

answers:

1

Just curious, if I have a sprite on the stage with the alpha set to 0 does that take up just as much memory as a sprite that is visible?

I imagine it does because it draws the sprite to the stage and then it has to set the alpha to zero.

It may seem like a stupid question but I just wanted to verify.

+4  A: 

Yes, the memory footprint will be the same, and much worse, it will use up gpu/cpu resources as well, as it is, as you say, drawn to the stage, albeit invisibly.

If you don't need to display a sprite removeChild it or set visible = false, which neither will save up on memory, but will reduce gpu/cpu load.

nikc
k, thanks, I think I might try to visible = false
numerical25
Don't forget to accept his answer numerical25. :p
Tom
See this article for more details: http://insideria.com/2008/11/visible-false-versus-removechi.html
Richard M