Newb mistake, visible vs alpha

Damn it! Our app uses a movieclip to skin one of the flex components, and it basically requires a boundingbox to help with positioning and layout, so it can fit into the framework. Stupidly, I was drawing an rectangle with alpha colored border, so it wouldn’t display in the animation (its only there so I can read its X/Y position), and this was causing a small performance lag. When you set an items alpha value to zero, the flash player still has to render it to the screen, and thus waste valuable cycles drawing an item you can’t even see. Realising the error of my ways, the component on startup automatically sets the visible property of the sprite to false, thus the flash player won’t waste time rendering it. I’ve only gained a few FPS extra but its a start!

Leave a Reply