Jump to content
Search Community

Search the Community

Showing results for tags 'tweening javascript variables'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Right off the bat, the JS TweenMax is picking up where they left off in Flash. Digging it. I demoed out EaselJS and KineticJS. Not sure if you need a framework, but a good animation engine and some basic prototype Javascript Objects, and I"m getting pretty close to what I could do with Flash. MouseOver and MouseOut are the biggest challenges of this platform. So, I got to a point that I want to use TweenMax to animate specific values in the javascript space. This is what I have so far. Tweening a javascript number variable, with ease. var siteY; var maxY = 800; var wheel_speed = .2; function MouseWheelHandler(event) { event.preventDefault(); var wheelY = event.wheelDelta || event.detail; var newSiteY = (siteY*1) + (wheelY*-wheel_speed); if(newSiteY < 0) newSiteY = 0; if(newSiteY > maxY) newSiteY = maxY; /// This is where I'm not sure. How do I animate the value of "siteY"? It's in the main javascript file that does all of the logic. It also drives positioning of page elements. I want the TweenLite to give that mouse wheel value ease. TweenLite.to(siteY, 1, {value:newSiteY, ease:Elastic.easeOut, onUpdate:drawCanvas}); } Is there some type of variable declaration I'm missing for declaring the DOM space, or Javascript space or something? I think this would come in handy for a lot of values, and animation techniques. Or, is my approach wrong?
×
×
  • Create New...