Senhor
public class websiteDocClass extends MovieClip { public static const LARGURAMIN:Number = 700; public static const ALTURAMIN:Number = 520; public var full:Full; public var loader = new Loader(); public var loader1 = new Loader(); public var path:String = "images\logo.png"; public var rq:URLRequest = new URLRequest("background.jpg"); public var logo:URLRequest = new URLRequest(path); //////////////////////// ////// CONSTRUTOR ////// //////////////////////// public function websiteDocClass() { ////////////////////////////////////// ////// VARS GERAIS - CONSTRUTOR ////// ////////////////////////////////////// avisoTam.visible = false; //////////////////////////////////////
stage.addEventListener(Event.ENTER_FRAME, actualizar); carregaBackground(); criarBtns(); stage.addEventListener(Event.RESIZE, resizeEcran); stage.dispatchEvent(new Event(Event.RESIZE)); }
///////////////////// ////// FUNÇÕES ////// ///////////////////// function carregaBackground(evt:Event=null):void { loader.load(rq); bg.addChild(loader); bg.x = (stage.stageWidth / 2) - 950; bg.y = 0 loader1.load(logo); imgHolder.addChild(loader1); imgHolder.x = (stage.stageWidth / 2); imgHolder.y = 0 } private function actualizar(evt:Event):void { if (stage.stageWidth < LARGURAMIN || stage.stageHeight < ALTURAMIN) { avisoTam.visible = true; avisoTam.x = stage.stageWidth/2; avisoTam.y = stage.stageHeight/2; } else { avisoTam.visible = false; } } function criarBtns(evt:Event=null):void { full = new Full(); addChild(full); full.x = stage.stageWidth - 55; full.y = stage.stageHeight - 20;