5 Replies Latest reply: Jul 24, 2013 6:35 AM by kglad RSS

    Flash Shape Tween Colour Issue

    panvulcon Community Member

      Hi, i havent used Flash in a few years and was just after a bit of help regarding shape tweens. I'm attempting to import two png's and make the colours morph when a user hovers their cursor over the button. Heres what i have so far:

       

      - imported two png images (one red and one green)

      - converted the first png into a button symbol

      - converted the hover keyframe to a movie clip

      - i have then created two keyframes within the movie clip and dragged my second image from the library onto the timeline at frame 20

      - i have then broken apart both images into shapes

      - i have managed to shape tween the two shapes so that they morph BUT the colours dont morph?

       

      Can somebody please explain what im doing wrong please?

       

      Thanks,

       

      Andy

        • 1. Re: Flash Shape Tween Colour Issue
          kglad CommunityMVP

          you can tween vector colors.

           

          to convert a bitmap (like png) to a vector, select it>modify>bitmap>trace bitmap>etc

          • 2. Re: Flash Shape Tween Colour Issue
            panvulcon Community Member

            I've had a go at this using the method above and the colour does morph however, the tween doesnt preseve the original shape of the button. Perhaps i'm going about this the wrong way, if you had a graphic that you wanted to colour morph when a user hovered their cursor over it how whould you go about doing it?

            • 3. Re: Flash Shape Tween Colour Issue
              kglad CommunityMVP

              create a movieclip.  add the bitmap to the movieclips timeline and convert it to a vector.  create a new keyframe at about frame 10 and click the vector in that keyframe and change its color.  add a shape tween.  copy those frames and paste them from 11 to 20.  select frames 11 to 20 and reverse them.  remove frame 10.

               

              add a new layer and attach a stop() to frame 1 of the new layer and a stop() at frame 10.

               

              add your movieclip to a timeline and assign rollover and rollout listeners.  in your rollout listener you'll probably want to gotoAndPlay(20-MovieClip(e.currentTarget).currentFrame)

              • 4. Re: Flash Shape Tween Colour Issue
                panvulcon Community Member

                This was helpfull, however i'm still getting the same results as before. I think this is because i'm using a graphic that has gradients like the one below. I was thinking a tint would do the trick but it seems you cant tint a vector graphic, so i'm still a little stuck tbh. I found that changing the colour seems to fill the vector graphic with a solid colour, when i would like to acheive a colour morph where the button would morph into say a green verison of the button. Hope this makes sense and thanks for your input so far.

                 

                http://www.clker.com/cliparts/9/1/5/2/119498475589498995button-red_benji_park_01.svg.med.png

                • 5. Re: Flash Shape Tween Colour Issue
                  kglad CommunityMVP

                  if you want to tween multiple colors, each must be on its own layer.  ie, after converting to a vector select a color>right click>click cut, create a new layer and paste in place in that layer.  continue until all colors are in their own layer.  now tween each layer.