Questions about ScaleMode

  • Hello everybody!

    I'm new to HaxeFlixel, so sorry if I ask dumb questions.

    1. Changing the scaleMode has no effect on iOS, it is always using the default one. Is this the expected behavior?
    2. Is there a way to programatically change the background color of the window? Actually, I want to change the color of the black bars when the game is scaled according to the current state.

  • Hi, welcome!

    1. You can change the scaleMode programmatically with FlxG.scaleMode and ScaleModes for example:
      FlxG.scaleMode = new FixedScaleMode();
    2. You can change the background color with changing the for example: = FlxColor.BLUE;
      or = FlxColor.setRGB( 0, 0, 255, 255); // (RGBA)

    We are making a MMORPG w/HaxeFlixel => Click Here to go to the Facebook Page


    1. I already tried, and this works fine in flash, but won't work on iOS.
    2. This changes the background of the state, not the window:

    1. It seems that the only to change the window background color is through the background value in the Project.xml file:
    <window width="800" height="600" fps="60" background="#000000" hardware="true" vsync="false" />

  • Probably this could work:

    FlxG.stage.opaqueBackground = 0xffff0000;

  • None of those help.

    Looks like haxe is building the app in the size I defined in the Project.xml instead of using the original device resolution and scaling the game itself, and the black bars are added by iOS, so there is no way to change their color.

Log in to reply