Share Pastebin
Guest
Public paste!

resampled

By: a guest | Mar 20th, 2010 | Syntax: ActionScript 3 | Size: 0.84 KB | Hits: 100 | Expires: Never
Copy text to clipboard
  1. //container das peças
  2. var menu_:MovieClip = new MovieClip();
  3.  
  4. //----Layout Liquido----
  5. stage.scaleMode = StageScaleMode.NO_SCALE;
  6. stage.align = StageAlign.TOP_LEFT;
  7. stage.addEventListener(Event.RESIZE, reposStage);
  8.  
  9. reposStage();
  10.  
  11. function reposStage(e:Event = null):void{
  12.         var WIDTH = stage.stageWidth;
  13.         var HEIGHT = stage.stageHeight;
  14.         menu_btn.x = 0;
  15.         menu_btn.y = 0;
  16. }
  17. //EventListener
  18. menu_btn.addEventListener(MouseEvent.MOUSE_OVER, exibirMenu);
  19. menu_.addEventListener(MouseEvent.ROLL_OUT, esconderMenu);
  20. //criar itens
  21. criarItensMenu();
  22.  
  23. function exibirMenu(event:MouseEvent):void{
  24.         addChild(menu_);
  25. }
  26. function esconderMenu(event:MouseEvent):void{
  27.         removeChild(menu_);
  28. }
  29. function criarItensMenu():void{
  30.         menu_.addChild(new menu_mc());
  31.         menu_.addChild(new itemMenu1()).y = 32;
  32.         menu_.addChild(new itemMenu2()).y = 64;
  33. }