Package | com.greensock.easing |
Class | public class EaseLookup |
Inheritance | EaseLookup Object |
Copyright 2008-2012, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
Method | Defined By | ||
---|---|---|---|
[static]
Finds the easing function associated with a particular name (String), like "strongEaseOut". | EaseLookup |
find | () | method |
public static function find(name:String):Ease
Finds the easing function associated with a particular name (String), like "strongEaseOut". This can be useful when loading in XML data that comes in as Strings but needs to be translated to native function references. You can pass in the name with or without the period, and it is case insensitive, so any of the following will find the Strong.easeOut function:
EaseLookup.find("Strong.easeOut")
EaseLookup.find("strongEaseOut")
EaseLookup.find("strongeaseout")
You can translate strings directly when tweening, like this:
TweenLite.to(mc, 1, {x:100, ease:EaseLookup.find(myString)});
Parameters
name:String — The name of the easing function, with or without the period and case insensitive (i.e. "Strong.easeOut" or "strongEaseOut")
|
Ease — The easing function associated with the name
|