actionscript 3 - AS3 Starling: How to remove black bars on top and bottom of iPhone 6+/...? -
i'm trying out starling framework actionscript 3 , have "big" problem removing these ugly black bars on top , bottom of iphone 6+.
i tried fix with: http://wiki.starling-framework.org/manual/multi-resolution_development , http://forum.starling-framework.org/topic/game-not-full-screen-when-testing-in-ios
but still wont work :(
any ideas?
package { import flash.display.sprite; import flash.display.stagealign; import flash.display.stagescalemode; import flash.events.event; import flash.geom.rectangle; import starling.core.starling; import starling.events.resizeevent; import starling.utils.halign; import starling.utils.valign; public class foobar extends sprite { private var _starling: starling; public function chouseapp() { super(); stage.align = stagealign.top_left; stage.scalemode = stagescalemode.no_scale; starling.handlelostcontext = true; var screenwidth: int = stage.fullscreenwidth; var screenheight: int = stage.fullscreenheight; var viewport: rectangle = new rectangle(0, 0, screenwidth, screenheight) _starling = new starling(mainapplication, stage, viewport); _starling.stage.stagewidth = 320; _starling.stage.stageheight = 480; _starling.showstats = true; _starling.showstatsat(halign.left, valign.bottom); _starling.start(); } } }
screnshot:
(black bars marked red arrow)
you need include launch image of name default-568h@2x.png, of size 640x1136, default-667h@2x of size 750x1334, default-736h@3x of size 1242x2208 or ios launch app resolution of 640x960, giving black bars. can read official documentation here
Comments
Post a Comment