Jump to content
GreenSock

caffrey75

EaseLookup.find

Recommended Posts

Was really pleased when I came across this, as I'm having to define Easing as strings a lot of the time, although for some reason it isn't working for me. I always get -

ReferenceError: EaseLookup is not defined

 

- whenever I try to put it into action.

 

I tried to get it to work in one of the example files (carousel.html), just in case my own files were missing something or had something in them that was interfering but no dice.

 

TweenLite.fromTo(boxes[i], 1, {css:{marginTop:-500}}, {css:positions[boxes[i].attr("data-pos")], delay:i * 0.1 + 0.25, ease:EaseLookup.find("Elastic.easeOut")});

 

Same error as above, and EasePack.min. js is loaded in the header etc.

Link to comment
Share on other sites

Sorry about any confusion there, but EaseLookup isn't available in the JS flavor yet - that's just for the ActionScript/Flash version. However, you should still be able to get the eases you want because they're all stored in the com.greensock.easing object, so Elastic.easeOut would be at com.greensock.easing.Elastic.easeOut. Therefore, you can simply parse your string and do the lookup yourself. See what I mean? Maybe something like this (rough/untested):

 

var str = "Elastic.easeOut";
var ease = com.greensock.easing[ str.split(".")[0] ][ str.split(".")[1] ];

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

Check out this thread:

http://forums.greensock.com/topic/7074-jquery-wrapper-animate-stop/#entry26360

 

It's now integrated into GSAP. :) Just download the latest version. http://www.greensock.com/gsap-js/ (or if you're a Club GreenSock member, get it with all your bonus stuff at https://www.greensock.com/account/)

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