Jump to content
Search Community

domi85

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by domi85

  1. Hello,

    I would like to make some tweens with movieclips, but these movie clips change from a var . I made this code :

     

    activite = function() { // function that determines the movieclips concerned by the tween
    var clipactif:MovieClip = this["clip_"+actif];
    var imagegauche:MovieClip = this["image_"+synopsis+"_gauche"];
    var imagedroite:MovieClip = this["image_"+synopsis+"_droite"];
    };
    bouton_rubrique2.onRelease = function() {
    activite();
    TweenLite.to(clipactif,1,{autoAlpha:0}); // the movieclips determined with activite() disappear
    TweenLite.to(imagegauche,1,{_x:-460});
    clip_rubrique2._x = 38;
    TweenLite.to(clip_rubrique2,1,{autoAlpha:100}); // the new movieclips appear
    TweenLite.to(image_rubrique2_droite,1,{_x:1000});
    }
    

     

    You would help me very much !

    Thanks in advance,

  2. thank you for your answer, but im afraid it works even worse...

    with my code, it traced clipactif as "clipPEDAtele", what i wanted, but now with this code it says undefined...

    I think the non-working line is :

    TweenLite.to(clipactif, 2, {autoAlpha:0});

    Written like this, will it recognize it has to replace the var clipactif by its value ? It seems not to... is there another way to write it ?

    Thanks again

  3. Hello,

    I would like to make a tween with a dynamic name of movie clip, but i dont know well how to call that name of clip :

     

    var actif:String = "PEDApres";
    
    teleactif = function() {
    actif = "PEDAtele";
    }
    
    clipPEDAmenu.boutonPEDAtele.onRelease = function() {
    var clipactif:String = "clip".concat(actif);
    trace(clipactif);
    TweenLite.to(clipactif, 2, {autoAlpha:0});
    TweenLite.to(clipPEDAtele,2 , {autoAlpha:100, delay:1, onStart:teleactif });
    }
    

     

    The name of the movieclip is created, and traced, but the Tween with clipactif doesnt work (the second one with clipPEDAtele does). How can i write that ? Does it need a $ or something ?

     

    Thanks !

  4. Hi,

    im a total beginner in tweening and in importing classes... i followed the instructions given on the website but it doesnt work and i dont know why.

    Here is what i wrote, in ActionScript2

     

    stop();

    import com.greensock.TweenLite;

    import com.greensock.*;

    import com.greensock.easing.*;

    bentrer1.onRelease = function() {

    trace("release");

    TweenLite.to(haut1, 5, {x:100, y:200, alpha:0});

    TweenLite.to(bentrer1, 3, {x:1020, y:437.1, alpha:0});

    TweenLite.to(bentrer2, 3, {x:1020, y:479.1, alpha:0});

    TweenLite.to(bentrer3, 3, {x:1020, y:521.1, alpha:0});

    }

     

    haut1 is a movieclip, bentrer1, 2 and 3 are buttons, and noting happens at all.

    I wrote that code in my main scene. Does anyone can help ?

    Thanks!

×
×
  • Create New...