Jump to content
Search Community

Tween Scale and Position to a specific point on stage

Deon test
Moderator Tag

Recommended Posts

Hi,

 

I'm trying to scale (zoom in) on a point based on a hover event handler.

 

The way this is supposed to work:

 

on the baseImage, which is an installation with a bunch of products, we have info icons displayed wherever a relevant product is used. If a user hovers over one of these icons, the baseImage zooms in on that point (info icon). I got it to zoom, but not to the point where I want it to.

 

Is this even possible? I can't help but feel that this isn't as complicated as it's turning out to be. I've hit a wall and any help would be greatly appreciated.

 

See the attached image to get an idea of what I'm talking about.

post-14677-0-17794500-1366288331_thumb.jpg

Link to comment
Share on other sites

It's actually not a trivial thing, no, but this might be the perfect job for the TransformAroundPointPlugin. That way, you can define the coordinates of the point you want to act as the "origin", and then tween the scale and the plugin will handle all the complexities under the hood. Disclaimer: TransformAroundPointPlugin is a members-only plugin for Club GreenSock (it's not in the public downloads). http://www.greensock.com/club/

 

Docs: http://api.greensock.com/as/com/greensock/plugins/TransformAroundPointPlugin.html

Link to comment
Share on other sites

If you're looking for us to provide you with a free alternative to TransformAroundPointPlugin, sorry. There's a considerable amount of thought and logic that went into that plugin that makes things smooth and easy. Yes, there are ways to offset the position of the element as it scales, but we can't give out the secret sauce in TransformAroundPointPlugin. TransformAroundPointPlugin is one of the tools we use to show appreciation for folks that support us through their Club GreenSock Memberships. It just wouldn't be fair to them if we started making special exceptions. 

  • Like 1
Link to comment
Share on other sites

I wasn't expecting special exceptions or free alternatives or anything of the sort.

 

I was just hoping someone on this forum could point me in the right direction in the form of an article or tutorial. I would like to exhaust all other possibilties before I resort to buying a plugin or membership. Seeing as I've already payed a significant amount on the flash as it is.

 

But thanks anyway.

Link to comment
Share on other sites

My two cents: back when I was a free user of GreenSock and before I discovered that TransformAroundPointPlugin existed, I tried to implement this very thing myself. In short I spent days trying to get it perfect but it was a pain to use and not as complete as I would have liked. Maybe you'd be able to get a limited implementation up and running in a few hours, but Club GreenSock is really very cheap.

 

There's an interactive demo of the plugin that you can play with to see how it works in the plugin explorer at http://www.greensock.com/tweenlite/#plugins

  • Like 2
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...