Jump to content
Search Community

Guilherme

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Guilherme

  1. Hello..

     

    I'm sorry I should have written all the code. I thought it that would be enough.

     

    import com.greensock.*;
    import com.greensock.easing.*;
    import com.greensock.plugins.*;
    import fl.transitions.Tween;
    
    
    var pontoFinal: Point = new Point (0,0);
    
    
    var chegadaTween: TweenLite = newTweenLite(chegada_mc, 2, {y: pontoFinal.y + 43, ease:Bounce.easeOut, onComplete: DelayfadeChegada});
    
    chegadaTween.pause();
    
    
    function DelayfadeChegada(){
    TweenLite.delayedCall(2, fadeChegada);
    }
    function fadeChegada(){
     TweenLite.to(chegada_mc, 5, { autoAlpha:0, onComplete: chegadaReverse});
    }
    
    function chegadaReverse(){
    
    chegadaTween.reverse();
    }
    
    
    function detPontoFinal(){
    pontoFinal.y = pontoFinal.y - 43;
    pontoFinal.x = pontoFinal.x - 2;
    return pontoFinal;
    }
    
    
    detPontoFinal();
    
    chegadaTween.currentTime = 0;
    TweenLite.to(chegada_mc, 0, { autoAlpha:1});
    
    ///////////////////////////////////////*
    
    I have tried chegada_mc.y but for some reason my swf doesn't load.
    So as TweenLite.to(chegada_mc, 0, {y:pontoFinal.y, x:pontoFinal.x});
    
    *///////////////////////////////////////
    
    TweenLite.to(chegada_mc, 0, {y:pontoFinal.y});
    TweenLite.to(chegada_mc, 0, {x:pontoFinal.x});
    chegadaTween.play();
    
    

     

     

    Keep in mind that pontoFinal is defined in another section of the code.

    Sorry, I have forgot that I changed the code and there is no more bezier in the tween.

     

    Hope is clear now.

  2. Hello.

    This is my first post. And I believe this is a noob question, in fact.

     

    I have a tween that has a bezier effect on it and I want it to receive the "y" position through a variable.

    Something like this:

     

    var myTween: TweenLite = new TweenLite(my_mc, 2, {y: myVar + 43 , ease:Bounce.easeOut, onComplete: myFunction});
    

     

    Is there a simple way to pass this value?

     

     

    Thx in advance.

×
×
  • Create New...