Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorviane
    • CommentTimeNov 8th 2006
     
    hello,

    Im trying to understand the idea about shape tweens. Ive understood that for a motin tween, the object has to be converted to a symbol(movie clip), then a motion tween is applied.

    However for shape tweens, perhaps im getting it all wrong.

    This is what i want to do: i import 2 .jpg images on stage, and i just want one to tween into another. I observed that these images are not tweening into each other.

    However, if i draw up a circle and a square, both aligned at the middle of the stage, and I select a shape-tween for each, running the file shows me the circle(tweening- changing in shape until it becomes a square).

    Pls can you help me clarify both of these issues, at least in lay mans terms. Im following some tutorials I found online.
    • CommentAuthorwebguy
    • CommentTimeNov 8th 2006
     
    huh? what exactly are you trying to do? probably you need a fade tween.
    shape tween means a shape transforming to another .... an image is a square, the other image is another square ... so at most there can be a square becoming a bigger or a lesser one, and then bump ... the second image appears.
    • CommentAuthorviane
    • CommentTimeNov 8th 2006
     
    ok, yes, both images are squares......maybe a fade tween then. I just want one image to become another.

    but among the tween options in the properties section, there are only options for shape, motion and none. I didnt see anything like fade-tween. How do i achieve this fade tween.
    • CommentAuthorwebguy
    • CommentTimeNov 8th 2006
     
    ok, here you go: 2 layers, one for each image. Transform each image in a symbol (select image -> press F8 -> make it shape)

    First image start from frame1.
    in frame 15 for the first image, right click -> insert frame
    then right click -> Create Motion Tween.
    Again right click in frame 15 -> insert key frame.
    click on the image in frame 15, go to Properties panel, select alpha from Color -> set alpha to 0.

    Second image starts in frame 7.
    same steps as for image 1, only the last keyframe will be in frame 22.
    And in frame 22 -> Color set to none
    In frame 7 -> Color -> alpha -> 0.

    then test your movie.

    Or, by actionscript (transform the images in movie clips. name their instances to mcImage and mcImage2):

    import mx.transitions.Tween;
    import mx.transitions.easing.*;

    var tFadeOut:Tween  = new  Tween(mcImage, "_alpha", None.easeIn, 100 , 0, 20);
    var tFadeIn:Tween  = new  Tween(mcImage2, "_alpha", None.easeOut, 0 , 100, 30);
    stop();


    for a given number of images ... N, when one image is half faded out the next image starts to fade in. For this you need to have the instance of all your images on the scene, also make sure all of them are alpha 0.


    import mx.transitions.Tween;
    import mx.transitions.easing.*;

    function GetNextID(crtID, maxCount)
    {
       crtID++;
       if (crtID >= maxCount)
       {
          crtID = 0;
       }
       return crtID;
    }

    function SetFade()
    {
       mcFadeOutImg = this["mcImage"+crtImgID];
       crtImgID = GetNextID(crtImgID, maxImgCount);
       mcFadeInImg = this["mcImage"+crtImgID];
       trace(mcFadeOutImg+":in:"+mcFadeInImg);
       tFadeOut = new  Tween(mcFadeOutImg, "_alpha", None.easeOut, 100 , 0, 20);
       tFadeIn = new  Tween(mcFadeInImg, "_alpha", None.easeOut, 0 , 100, 20);
       tFadeIn.stop();

    }
    var tFadeOut:Tween;
    var tFadeIn:Tween;
    var crtImgID = 0;
    var maxImgCount = 2;
    var bFadeIn = false;
    SetFade();

    onEnterFrame = function()
    {
       if (tFadeOut.position < 60 && !bFadeIn)
       {
          tFadeIn.start();
          bFadeIn = true;
       }
       if (tFadeIn.position == 100)
       {
          delete tFadeOut;
          delete tFadeIn;
          bFadeIn = false;
          SetFade();
       }
    }
    stop();
    • CommentAuthorjustnajm
    • CommentTimeNov 16th 2006
     
    Hi all,

    I think you don't want to do it through script, if so then:

    As you know the method of shape-tween, I can take a short cut...

    Just do everything you do for shape-tween but don't give the shape tween to the layer.

    In your first frame or where your first object or image exist select it and then press "Ctrl+B" to break a part image into its pixels form. Then do the similar step with your second image on the last frame or where your second image is.

    Now they are ready to give them shape tween.

    Try it and tell me that have you learn id or not.