8 Replies Latest reply on Jul 3, 2007 11:02 AM by 3-Putt

    Image Flip

    3-Putt Level 1
      I need a actionscript solution to flip three sections of picture around on the vertical axis one at a time from left to right to form one image on the back side of the flip.

      Is it best not to use actionscript and manually do this? I'm an After Effects user that does this easily through a plug in.

      Any help would be great.
      Thanks Brian
        • 1. Re: Image Flip
          Damon Edwards Level 3
          your_mc._yscale *= -1
          • 2. Re: Image Flip
            3-Putt Level 1
            Do I attach the code to the first frame of the movie clip? or do I place it on a another layer?
            Do I place it after some other code like, onClipEvent? or is that the only code for that image?
            Sorry for the questions...hopefully I'm on the right track
            Brian
            • 3. Re: Image Flip
              Damon Edwards Level 3
              if you want your image to be flipped on frame one, then yes, place it on frame one.. and change your_mc to the instance name of your movie clip. by placing that code on frame one, your image will be flipped on the vertical axis.. you will more than likely need to change the _y position to get it back to the desired location.. EX:
              your_mc._yscale *= -1;
              your_mc._y = 200; //thus bringing down the mc to its original location, change 200 as needed.

              also, if you are nesting the movie clip inside another movie clip, then you'll need to target it like
              first_mc.your_mc

              if you are placing this inside the movie clip, then you'll need to use
              _root.your_mc

              if it's on the main timeline, and the movie clip is not nested, then the code i provided first will work
              • 4. Re: Image Flip
                3-Putt Level 1
                I might be asking too much but, here is my code:

                onClipEvent(enterFrame){
                this._xscale += -10;
                }

                My question is how do I reveal the back side of the flip (a different picture or layer) half way thru the turn while making the front dissappear at the same time? and it seems the current code flips the front side around and just keeps stretching the image and not keeping the current dimension of the picture.

                Any direction?
                Brian
                • 5. Re: Image Flip
                  Damon Edwards Level 3
                  what are you trying to do here... what i gave flips it on the vertical axis, and doesnt stretch it.
                  • 6. Re: Image Flip
                    3-Putt Level 1
                    Sorry for the confusion with the vertical axis. I'm trying to flip the image not like a flip book and reveal an image underneath, but rotate the front one around on the x axis to reveal its backside which is a different picture.

                    Whatever I was doing was stretching the picture off the document . I wanted the dimensions the image to stay fixed.

                    I got this far without any success. My movie clip are now called first_mc and second_mc. the first being the top image and the second being the back image.

                    onClipEvent(enterFrame){
                    second_mc._xscale = 0;
                    first_mc._xscale -= 10;
                    if(first_mc._xscale = 0)
                    {
                    first_mc._visible = false;
                    second_mc._xscale += 10;
                    }

                    Nothing is happening

                    Hopefully I'm on the right track with a little help
                    Thanks Brian
                    • 7. Re: Image Flip
                      Damon Edwards Level 3
                      what you're trying to achieve would require a lot of scripting... what you have now isn't going to transition it smoothly, it's going to be jumpy, doing the xscales at the same rate as your document's fps.. you would need a 'z' axis to do what you want to do, therefore, making it 3d. look up flashsandy.org, but i think you're way over your head.
                      • 8. Re: Image Flip
                        3-Putt Level 1
                        Thanks for all your help... I think doing this the old fashion way with shape tweens is the best option.
                        Brian