Jump to content
GreenSock

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

Problems creating RoughEase

Recommended Posts

I am trying to create a rough ease by copying the sample code on the site (switching random from 'false' to 'true') but am getting errors.

The code

var rough:RoughEase = new RoughEase({strength:3, points:50, template:Strong.easeInOut, taper:"both", randomize:true});
And the error


1118: Implicit coercion of a value with static type Object to a possibly unrelated type Number.

I'm unclear what I'm doing wrong. Any help appreciated.

UPDATE: Tried using the default RoughEase.ease easing

tl.to($objects[i],TTUtils.getRandomNumber(0.25,.5),{rotationZ:rotationZ,ease:RoughEase.ease});

and got this error:

1119: Access of possibly undefined property ease through a reference with static type Class.

I'm including com.greensock.easing.*. Hmmmmm…

Link to comment
Share on other sites

Ok it looks like you are using GSAP v11, but following the v12 API.

 

v11

// constructor
RoughEase(strength:Number = 1, points:uint = 20, restrictMaxAndMin:Boolean = false, templateEase:Function = null, taper:String = "none", randomize:Boolean = true, name:String = "")

// e.g.
var rough:RoughEase = new RoughEase(1.5, 30, true, Strong.easeOut, "none", true, "superRoughEase");

v12

// constructor
RoughEase(vars:* = null, ... args)

// e.g.
var rough:RoughEase = new RoughEase({strength:3, points:50, template:Strong.easeInOut, taper:"both", randomize:false});
Link to comment
Share on other sites

Yup, I just tested this with version 0.8 of RoughEase and that is the exact error I got. Switching to the latest files will certainly solve the problem.

Link to comment
Share on other sites

Thanks very much —

I thought I was using V12 — that's what I'd downloaded -- but somehow it wasn't.  In any case, now I've got it working fine.

I'm a bit confused as the difference between "GSAP V12 beta" and "V12" — could someone explain the difference?

Link to comment
Share on other sites

Those are the same - v12 is technically in beta, but not because of any unresolved issues - it just has to do with porting a few more things over on the JS side (from AS) and a few other minor things. All flavors (AS3, AS2, and JS) are rock solid as far as we know. Zero known bugs. In fact, I'd highly recommend that everyone uses v12 now instead of v11 - it addresses several deficiencies and makes a bunch of improvements. 

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