How to change the coordinate origin in Flash's stage with Actionscript?

Posted by Petruza on Stack Overflow See other posts from Stack Overflow or by Petruza
Published on 2010-01-16T22:23:17Z Indexed on 2010/04/29 19:37 UTC
Read the original article Hit count: 358

I think I did this before but can't find the code.

Flash as many other graphical frameworks use the top-left corner as the coordinate origin (0,0) because it's how the underlying memory model is by convention.

But it would be really simpler for my calculations if the origin was in the center of the stage, because all the game revolves around the center and uses a lot of trigonometry, angles, etc.

Is there some built-in method like Stage::setOrigin( uint, uint ); or something like that?

© Stack Overflow or respective owner

Related posts about actionscript

Related posts about flash