Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- com.greensock importação .*;
- com.greensock.easing importação .*;
- / Ajustar / o Fundo
- flash.display.Stage de importação;
- flash.display.StageScaleMode de importação;
- flash.display.StageAlign de importação;
- flash.system.Capabilities de importação;
- velocidadeX var: Number = 2;
- / / CRIA OS X com constante Valores e Y da Resolução da Tela do Sistema.
- const TelaX = Capabilities.screenResolutionX;
- const TelaY = Capabilities.screenResolutionY;
- Stage.scaleMode = StageScaleMode.NO_SCALE;
- stage.align = StageAlign.TOP_LEFT;
- / / Inicializa Valores parágrafo Tamanho dos Objetos sem palco Baseado nd Resolução da Tela
- flores.width TelaX *. = 8;
- flores.height TelaY *. = 4;
- logo_mc.width TelaX *. = 3;
- logo_mc.height TelaY *. = 1;
- menu_mc.width TelaX *. = 3;
- stage.addEventListener ("resize" arrumaLayout);
- arrumaLayout função (e: Event = null): void (
- stage.stageWidth fundo_mc.width =;
- stage.stageHeight fundo_mc.height =;
- / / Posicionando como flores
- TweenLite.to (Flores, 2, (x: stage.stageWidth / 2, y: * TelaY 0.1, a facilidade: Elastic.easeOut));
- / / Posicionar escalonar e um logotipo
- TweenLite.to (logo_mc, 2, (x: stage.stageWidth / 2, y: TelaY *. 02, facilidade: Bounce.easeOut));
- / Posicionar / e escalonar o menu
- TweenLite.to (menu_mc, 3, (x: stage.stageWidth / 2, y: * TelaY 0.2, a facilidade: Bounce.easeOut));
- / / Posicionando barra um
- stage.stageWidth barra_mc.width =;
- TweenLite.to (barra_mc, 1, (y: stage.stageHeight, facilidade: Elastic.easeOut));
- / Posicionar / e animar o Endereço
- TweenLite.to (endereco_mc, 2, (y: stage.stageHeight, facilidade: Bounce.easeOut));
- / / Chama funcao ajusta parágrafo arrumar uma galeria
- ajusta ();
- )
- var container: MovieClip = new MovieClip ();
- addChild (container);
- / / Criei esse mês quadradro tão parágrafo teste simulando uma galeria
- / Quad / var: Quadrado Quadrado = new ();
- / / Container.addChild (quad);
- / FIM / do quadrado
- var loader: Loader;
- menu_mc.home.addEventListener (MouseEvent.CLICK, chama);
- / Menu_mc.empresa.addEventListener / (MouseEvent.CLICK, chama);
- / Menu_mc.colecao.addEventListener / (MouseEvent.CLICK, chama);
- / Menu_mc.contato.addEventListener / (MouseEvent.CLICK, chama);
- chama de função (e: MouseEvent): void (
- e.target.name switch () (
- casa "caso":
- if (carregador! = null) (
- container.removeChild (carregador);
- loader = null;
- )
- loader = novo Loader ();
- loader.load (novo URLRequest ("galeria_3D.swf"));
- break;
- )
- loader.contentLoaderInfo.addEventListener (Event.COMPLETE, carregou);
- )
- carregou função (e: Event): void (
- container.addChild (carregador);
- ajusta ();
- )
- ajusta a função (): void (
- / / Para a POSIÇÃO variáveis X e Y da galeria
- contX var: Number;
- Conty var: Number;
- / / Tamanho da galeria vai Ser uma altura do palco - POSIÇÃO do menu - Um Pouco Maior Que Tamanho da barra_mc
- container.height = stage.stageHeight - (TelaY * 0,25) - (barra_mc.height * 1.1);
- / Ajusto / a com uma largura manter parágrafo altura uma Proporção
- container.scaleX = container.scaleY;
- / Valor / de X não vai Ser centro do palco
- contX = * stage.stageWidth 0,5;
- / Valor / de Y vai Ser. Abaixo do menu e acima da barra_mc
- Conty = (container.height * 0.5) + (TelaY * 0,25);
- / / N º POSIÇÃO movo corretra
- TweenLite.to (container, 4, (x: contX, y: Conty, a facilidade: Elastic.easeOut));
- )
- endereco_mc.addEventListener (Event.ENTER_FRAME, _pronto);
- função _pronto (e: Event): void (
- endereco_mc.x + = velocidadeX;
- if (> = endereco_mc.x stage.stageWidth-540) (
- velocidadeX *=- 1;
- ) Else if <(endereco_mc.x = 0) (
- velocidadeX *=- 1;
- )
- )
- arrumaLayout ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement