Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Make a Loading Screen

    • 0
    • 7
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 524
    Comment on it

    In app development their are many steps where we have to hang on for a while, like we are waiting for the server response, or the loading of assets or any other function to complete. Sometime to manage these such task we need a loading screen, which will appear during gap and after completion of program it will removed. So here is the code to make a loading screen.

    1- We add a quad

    _overlay = new Quad(Starling.current.stage.stageWidth,Starling.current.stage.stageHeight , 0x000000); 
                _overlay.alpha = 0.9;

    2- loading image

            loadinImage= new Image(AssetLoader.getTexture("LoadingCircle"));
            loadinImage.x=stage.stageWidth/2 - loadinImage.width/2;
            loadinImage.y=stage.stageHeight/2 - loadinImage.height /2;
            loadinImage.scaleX = Constant.SCALE;
            loadinImage.scaleY = Constant.SCALE;
            timer= new Timer(10);
            timer.addEventListener(TimerEvent.TIMER, rotate);
        private function rotate(evt:TimerEvent):void

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: