Jump to content
GreenSock

learner_7n

Code for zoom in, zoom out effect ...

Moderator Tag

Recommended Posts

Hi,

 

What is the code to create zoom in & zoom out effect on images/movie clips?

 

Thanks.

Link to comment
Share on other sites

You can scale something up/down by tweening its scaleX and scaleY:

 

TweenLite.to(mc, 1, {scaleX:5, scaleY:5});

 

If you need to zoom in on a particular spot that isn't the registration point, you can use the transformAroundPoint plugin that comes with "Really Green" Club GreenSock memberships and above. It allows you to make it act as though the DisplayObject has a custom registration point - there's an interactive demo in the Plugin Explorer at http://www.greensock.com/tweenlite/#plugins

 

I'm growing a little concerned with how much you're leaning on this forum for doing your project(s). It's not generally a place where you ask people to write your code for you - it's better to try on your own and then come back with very specific questions while showing what you've already tried. That also helps us to see the context of the question which will get you even better, more relevant answers. For example, maybe you're trying to "zoom" a whole bunch of objects together that don't have a common parent, or maybe you just want to scale an object up/down - without any details it's tough to know. If you're totally clueless about how to do something, it's fine to ask for general guidance - there just seems to be a lot of that lately :)

 

You've gone through all the learning materials on the site, right? http://www.greensock.com/learning/ would probably be really good to explore before posting here.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×