Menu

onUpdate

Help
unscene
2007-05-03
2013-04-01
  • unscene

    unscene - 2007-05-03

    Here is my code: 

    import de.alex_uhlmann.animationpackage.*;
    import de.alex_uhlmann.animationpackage.animation.*;
    import de.alex_uhlmann.animationpackage.drawing.*;
    import de.alex_uhlmann.animationpackage.utility.*;
    import com.robertpenner.easing.*;
    APCore.initialize();
    var myListener:Object = new Object();
    APCore.addListener(myListener);
    var maskText:MaskMoveFX = new MaskMoveFX(cvm_text);
    var dropBall:Move = new Move(cvm_orb);
    var listenerObj:Object = new Object();
    dropBall.addEventListener("onUpdate", listenerObj);
    listenerObj.onUpdate = function(eventObject:Object) {
        if (maskText.getCurrentPercentage() == 70) {
            eventObject.animationStyle(250, Circ.easeIn);
            eventObject.run(cvm_orb._x, 300);
        }
    };
    maskText.animationStyle(2000, Circ.easeInOut);
    maskText.run("L", 0, 100);

    I have an MC of text that I want to mask and then when the movemask is at 70 percent complete, I want to start the ball drop animation.

    I may be going about this all wrong can someone please help me.

     
    • Alex Uhlmann

      Alex Uhlmann - 2007-05-06

      Hi there,

      you are mixing up the two different event handling systems in AP. I recommend using the EventDispatcher since this is the standard for ActionScript. Check out the Event Handling paragraph in the readme.htm.

      Best,
      Alex

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.