Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
vdubplate

ThrowProps question

Recommended Posts

I was checking out the the new plugin and I was thinking about how I could use this for a new rich media ad I'm going to be working on soon.

What my question is and there is prob not a short answer for this question.

 

I want to make my ad function like this sweet HTML5 site for Tron : http://disneydigitalbooks.go.com/tron/

(Drag the site from right to left)

 

How hard would it be to figure out how to move things on the stage based on position of the dragged portion of the stage or scroller on the stage?

I want to move the ad from right to left and as a certain portion of the stage comes into view so would products videos and text in the way that the Tron site is functioning

Link to comment
Share on other sites

I think it actually wouldn't be very difficult at all. [disclaimer]

 

You could just build your entire sequenced animation into a TimelineLite and pause() it. Then you make the draggable part and link it to the TimelineLite's "progress" property so that as the drag occurs (or a tween with throwProps), the TimelineLite's progress is changed accordingly. Like if there's a total of 500 pixels that you can drag it across the screen, you'd check the position on each frame (like with an onUpdate in a tween or an ENTER_FRAME event handler) and divide it into 500 to figure out what the ratio is. At the beginning it'd be 0. At 250 pixels, it'd be 0.5. At 500 pixels it'd be 1. See what I mean? Relatively simple actually.

 

Hope that helps.

Link to comment
Share on other sites

Cool. I'm going to give it a try. Thanks for the reply.

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.
×