package { import fl.controls.Label; import fl.controls.TextInput; import flash.display.Sprite; import flash.events.Event; [SWF(backgroundColor='0x00FF00',width='400',height='400',frameRate='29')] public class Main extends Sprite { private var userName:TextInput; private var userPassword:TextInput; private var userNameInfo:Label; private var userPasswordInfo:Label; public function Main() { this.init(); } private function init():void { } } }
如上,可以通过SWF元数据的width及height来设置舞台的高度与宽度
转载于:https://blog.51cto.com/quietnight/1673449