Starling自適應設備大小的作法

var viewRect:Rectangle = new Rectangle(0,0,stage.fullScreenWidth,stage.fullScreenHeight);//獲取設備的窗口大小
_starling = new Starling(MainScreen,stage,viewRect);//將設備窗口大小作爲starling的視窗大小
_starling.stage.stageWidth = 1280;//設置starling舞臺寬爲咱們製做時寬
_starling.stage.stageHeight = 800;//設置starling舞臺高爲咱們製做時高
Global.stage = _starling.stage;//將starling的stage作爲全局靜態變量使用
相關文章
相關標籤/搜索