11 Replies Latest reply on Mar 6, 2007 6:52 AM by kglad

    Transitions assistance please

    Voddie
      Hi

      I am trying to get my head around the transitions and started looking at the samples available in Flash 8. My as coding skills are quite limited, but the transitions are so cool I have to use it in one of my projects.

      I have created a movie clip called img1_mc ( just a white sqaure at the moment but will be images) and by following two of the help samples added the following code

      The idea being that the img would appear from 600px,(off stage) ease over left to 300px and then double in size.

      The final project would involve a row of 7 imgs that slide left 300px, double in size, wait two seconds, shrink back to original, and the 7 images would move over 300px and the next image doubles in size. A little like a slideshow or one of those rollover thumbnails and the image doubles in size when you mouseover.
        • 1. Re: Transitions assistance please
          Voddie Level 1
          Sorry posted before Id finished....

          The questions are.

          1. Does zoom just goes from 0 to 100 'IN' and 100 - 0 'OUT'? So do I need to use another transistion to enlarge the image other than zoom?

          2. Is the attached coding ok? Would I need to duplicate this for each img movie clip? Can I continue to use onMotionFinished functions after every movement.

          3. Ive seen a transition that uses inertia, i.e slows down and then nudges finaly into postion. What transition or combination of transitions would I need to get that effect?

          Thanks for any assitance offered
          • 2. Re: Transitions assistance please
            kglad Adobe Community Professional & MVP
            1. yes, if you use the transition mangager. no if you use the tween class on your movieclip's _xscale and _yscale properties.

            2. you need to duplicate that coding for each movieclip unless you put that code in a function a pass a variable (the instance name of the movieclip).

            and you can use the same onMotionFinished but then you'll be directing the same movieclip. define it in your function using the movieclip parameter.

            3. play with the tween class. check the help documents under components language reference/tween class.

            • 3. Re: Transitions assistance please
              Voddie Level 1
              Hi

              Thanks for helping me out.

              I was playing around and used the scale instead of zoom

              I triggered the movie to go to next frame and then move the movie on again

              I need to stall the movie for a couple of seconds before triggering a down size to original, then move onto next frame.

              is that using the setInterval function, and if so how do I use it please

              • 4. Re: Transitions assistance please
                kglad Adobe Community Professional & MVP
                try:

                • 5. Re: Transitions assistance please
                  Voddie Level 1
                  Hi kglad

                  Sorry, but you've completely lost me.


                  Couyld you please explain what is:

                  clearInterval(downSizeI);
                  downSizeI=setInterval(downSizeF,3000);

                  };

                  function downSizeF(){
                  clearInterval(downSizeI);
                  // start your down size
                  // advance to frame 2 when your down size is completed?

                  Does this reverse my img scale back to orginal size?

                  Where is the code to move onto next frame?

                  clearInterval(downSizeI);
                  downSizeI=setInterval(downSizeF,3000);

                  way beyond my head

                  Thanks
                  • 6. Re: Transitions assistance please
                    kglad Adobe Community Professional & MVP
                    clearInterval(downSizeI);
                    downSizeI=setInterval(downSizeF,3000);

                    does nothing for 3000 milliseconds, then it calls downSizeF(). in downSizeF() you start your down sizing and advance to frame 2, as explained by the comments.
                    • 7. Re: Transitions assistance please
                      Voddie Level 1
                      Hi

                      Thank you for explaining the code to me..

                      Sorry if appear a little dim, I will try it out.

                      In the meanwhile could you please recommend a relevant actionscript book for me to read that covers these transitions (I am using flash 8) and maybe a general starter book on actionscript in general. I take it I should be looking a as2...yes?

                      Thanks in advance

                      • 8. Re: Transitions assistance please
                        Voddie Level 1
                        Hi

                        Ive used your suggestion, but have run into a couple of problems.

                        I have attached the code below to frame 1 but the movie clip doesn't resize down properly. I told the clip to resize up from 150 x100 to 300x200 and on resize down from 300x200 to 150x100 but the clip ends up at about 225 x100. What am I doing wrong?

                        I also notice that when the movie moves on to frame two, the img1 is above img2 when img2 resizes, do I need some sort of swap depths applying? Could you give an example please.

                        Have online version running at ( http://www.voddie.com/testbed/tween_transition/tweenmovie ) with the first three frames having code.

                        To download the fla used ( http://www.voddie.com/testbed/tween_transition/tweenmovie/test4e.fla )

                        Thanks again for your assistance

                        • 9. Re: Transitions assistance please
                          kglad Adobe Community Professional & MVP
                          you were using _xscale and _yscale properties, not _width and _height properties. and yes, you can use swapDepths() to change the depth of objects:

                          http://www.gladstien.com/Files/tweentest4.fla
                          • 10. Re: Transitions assistance please
                            Voddie Level 1
                            Hi

                            I see where I was going wrong, that works a treat.

                            Thank you for taking the time out to help

                            In the meanwhile could you please recommend a relevant actionscript book for me to read that covers these transitions (I am using flash 8) - and maybe a useful starter book on actionscript in general.

                            Thanks in advance
                            • 11. Re: Transitions assistance please
                              kglad Adobe Community Professional & MVP
                              you're welcome.

                              and i don't have any actionscript books that i can recommend. i'm only familiar with one (the actionscript bible) and i don't think it's very good.

                              i've learned actionscript from this forum and after i gained some competence from my own experimentation and searching google for help on specific issues.