Guest User

Untitled

a guest
Aug 14th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     import flash.display.StageAlign;
  4.     import flash.display.StageScaleMode;
  5.     import flash.events.Event;
  6.     import flash.system.Worker;
  7.    
  8.     import shapesinmotion.base.BaseMainClass;
  9.    
  10.     import simandroid.base.ShapesInMotionAndroidInitializer;
  11.    
  12.     [SWF(frameRate="60", backgroundColor="0x000000")]
  13.     public class Main extends BaseMainClass
  14.     {
  15.         public function Main()
  16.         {
  17.             super();
  18.            
  19.             if(Worker.current.isPrimordial)
  20.             {
  21.                 // support autoOrients
  22.                 stage.align = StageAlign.TOP_LEFT;
  23.                 stage.scaleMode = StageScaleMode.NO_SCALE;
  24.                
  25.                 this.startMainThread();            
  26.             }
  27.             else
  28.             {
  29.                 this.startPhysicsEngineThread();
  30.             }
  31.         }
  32.        
  33.         override protected function loaderInfoLoadCompleteEventHandler(event:Event):void
  34.         {
  35.             shapesInMotionInitializer = new ShapesInMotionAndroidInitializer(stage);
  36.            
  37.             super.loaderInfoLoadCompleteEventHandler(event);
  38.         }
  39.     }
  40. }
Add Comment
Please, Sign In to add comment