Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Adam Atomic's game Capsule is a flash projector. If you press escape, the game goes out of fullscreen and just shows windowed. How do I get my (FLIXEL/AS3) game to show up centered like that?

enter image description here

enter image description here

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I'm not into Flixel, but don't you simply need this?

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = '';

stage.align is '' by default.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html#align

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html#scaleMode

share|improve this answer
    
awesome. If I don't add the stage.align ='' it didn't work, and I Wasn't aware the property existed. –  joon Sep 23 '12 at 22:44
    
There's nothing in the docs about it, StageAlign.CENTER_CENTER doesn't exist, but you can check stage.align on start and it's '', and it's effect is centering. Maybe Flixel changes your stage.align ? –  Markus von Broady Sep 24 '12 at 5:54
    
I'm sorry if my reply was confusing, but it works with align='' ! –  joon Sep 24 '12 at 9:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.