Guest User

Untitled

a guest
Jan 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     import flash.desktop.NativeApplication;
  4.     import flash.display.Bitmap;
  5.     import flash.events.Event;
  6.     import flash.display.Sprite;
  7.     import flash.display.StageAlign;
  8.     import flash.display.StageScaleMode;
  9.     import flash.ui.Multitouch;
  10.     import flash.ui.MultitouchInputMode;
  11.    
  12.     public class Main extends Sprite
  13.     {
  14.        
  15.         public function Main():void
  16.         {
  17.             stage.scaleMode = StageScaleMode.NO_SCALE;
  18.             stage.align = StageAlign.TOP;
  19.             stage.addEventListener(Event.DEACTIVATE, deactivate);
  20.            
  21.             // touch or gesture?
  22.             Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
  23.            
  24.             // entry point
  25.             var hud:Bitmap = new Resources.HudBitmap();
  26.             addChild(hud);
  27.             trace(hud.x)
  28.         }
  29.        
  30.         private function deactivate(e:Event):void
  31.         {
  32.             // auto-close
  33.             NativeApplication.nativeApplication.exit();
  34.         }
  35.        
  36.     }
  37.    
  38. }
Add Comment
Please, Sign In to add comment