views:

67

answers:

1

I'm used to J2ME where you actually set the view size of the window and you can render just that view size (so anything off the screen doesn't get rendered).

After a google/stakcoverflow search I came up with nothing (maybe bad terms) but anyways how would I go about setting a render area in my flash AS3 game? I dont want anything off the stage to be rendered which uses up a lot of resources.

+2  A: 

The Flash player does this automatically. It never renders anything outside of the visible screen area (unless you render something manually into a bitmap, programmatically). The player also makes an attempt not to re-render areas of the visible screen that haven't changed since the previous frame. (If you use the debug version of the player, right-click the movie and select "Show Redraw Regions", and it will draw a red rectangle around the portion being redrawn each frame.)

With that said, there is no way to change the above behavior. You can't, for example, tell the player to redraw some parts of the visible screen but not others.

fenomas
Thanks a lot for a quick answer!
CodeJustin.com