Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Flashing Effect on an Object

    • 0
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 529
    Comment on it

    Now you can give your object(image, button etc.) a flashing or glowing effect. We can either play with the size by making shrink and grow effect of an object.
    Greensock library helps us in various aspect to make the object animation. Their are lot of things we can do with the this library. Here is the simple code for flashing effect on an object using TweenMax class of Greensock library

    //create an object
    
    var playButton:Button = new Button(Assetloader.getTexture("PlayButton"));
    
    this.addChild(playButton); // now add the effect using greensock TweenMax.to("playButton", 1 , {alpha:0.5 , repeat: -1, yoyo: true });

    Here the by default alpha of playButton is 1 , we just make the alpha propagate from 1 to 0.5 and vice-versa


    In the line

    speed = 1

    yoyo is the property which helping the alpha to propagate between the values.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
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: