Good actor scaling technique

DoguzDoguz Member Posts: 500
edited February 2012 in Working with GS (Mac)
What is a great way to make an image actor scale to nothing (or real small) when tapped, then grow again to the original size, but as a different image (Same sized images of course).

And are there different techniques that can be used to alter the motion. Speed, elasticity etc. It would be nice for the image to pop down, then pop up again with nice velocity motion. Kind of like a spring motion.

Or am I hoping too much. At the moment I'm using the interpolate attribute behaviour and it really isn't cutting it.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Try this,

    When touch is pressed:
    -interpolate self.size.width to 5, duration of 0.7
    -interpolate self.size.height to 5 duration of 0.7
    In the same when touch is pressed rule have a timer after 0.7 seconds run to completion checked
    and in that timer have a change image changing to the image you want, interpolate self.size.width back to the original size duration 0.7, and interpolate self.size.height to the original size duration of 0.7

    cheers
  • DoguzDoguz Member Posts: 500
    Thanks, John,
    That's what I have at the moment, but it's a very static down then up. Do you know of any other technique that'll give it a spring pop motion.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    In the interpolates the make it smaller, try changing it from linear to ease in, and change the ones in the timer that make it bigger to ease out. See how that is
  • DoguzDoguz Member Posts: 500
    I think I have something I'm happy with. I've done what you have described above, but also added another timer with interpolate before the last interpolate, that makes the image slightly bigger than the original size. It gives it nice little spring effect.

    Also changed the durations to 0.2
Sign In or Register to comment.