Jump to content
Search Community

zoom in & out

Dece test
Moderator Tag

Recommended Posts

Hi All,

I have a sprite on stage conceptually representing a timeline in history.

A number of circles representing certain times in history appear on this timeline (you can imagine a timeline scale).

I want my users to be able to zoom in on a particular circle that would then expand into a new timeline with some specific events for this time.

 

I am trying to tween the scaleX, scaleY, alpha properties when the user clicks on a specific timeline circle. Something like:

{scaleX:5, scaleY:5, alpha:0} // this object feeds the tweener

 

This gives me the effect of zooming in. Once the tween completes, I make the new timeline visible.

 

Is there a better way to achieve something like this? My visualization looks ok but does not look very clean.

 

Thank you

Dece

Link to comment
Share on other sites

This is the perfect scenario for using the transformAroundPoint plugin which is a membership benefit of Club GreenSock (http://www.greensock.com/club/). It allows you to define a point around which all transformations (scale, rotation, and movement) occurs. It's like dynamically defining the registration point of your object. Otherwise, your zooming will always occur around your Sprite's/MovieClip's registration point. You can see an interactive example of the transformAroundPoint plugin in the Plugin Explorer.

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.
×
×
  • Create New...