Jump to content
Search Community

Flash Builder 4.7 - Greensock 12 - Animation Error

jetacer test
Moderator Tag

Recommended Posts

I've included the greensock.SWC into my project. It knows its there because if I type com.gr.... it starts to fill in the data

 

I included these to libraries:

import com.greensock.*

import com.greensock.easing.*

 

Tried to run this command in the code:

TweenLite.to(mybackground, .25, {x:0, y:0, motionBlur:true, ease:Cubic.easeInOut});

 

When I try to compile I get this error:

VerifyError: Error #1014: Class com.greensock.core::Animation could not be found.

 

If I comment out the TweenLite command the program will compile.

Does anyone know what I'm doing wrong or what I'm suppose to import?

 

I tried importing all of these and still the same result

import com.greensock.TweenLite;
import com.greensock.TweenMax;
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.core.*;
 
Do I have to run another command to start some animation library?
Thanks for your help
 
Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

When using motionBlur, its best to start with the code we provide in the docs so that you have a solid starting point:

import com.greensock.*;
import com.greensock.plugins.*;
TweenPlugin.activate([MotionBlurPlugin]); //only do this once in your SWF to activate the plugin
TweenMax.to(mc, 2, {x:400, y:300, motionBlur:{strength:1.5, fastMode:true, padding:15}});

http://greensock.com/asdocs/com/greensock/plugins/MotionBlurPlugin.html

 

 

Also, be sure you are using the GreenSock files that you download from your Dashboard.

MotionBlurPlugin is a benefit to Club GreenSock members, its not available in the public downloads.

If you are not a member, you can learn more here http://greensock.com/club/ Just be sure to select "Flash" from the menu in the "What you get" section.

 

Also, to verify the version of GSAP you are using add this to your code

trace(TweenLite.version)

This is a great way to ensure Flash Builder isn't caching an older version somehow.

Link to comment
Share on other sites

Thanks Carl. I didn't understand that motion was a special add on. Even without using MotionBlur I still can't compile. It gives me the same error which is VerifyError: Error #1014: Class com.greensock.core::Animation could not be found. I must be missing something during the setup. I'm using Flash Builder 4.7, Air 17, Starling and trying to get greensock to work with that.... should it work? Also, just a side question when you call a greensock function your examples show MC (movieclip) as the object being sent into the method/function, can that be a Starling Image/Sprite or does this only work with a Flash MovieClip? I have done a few hours of searching the web for answers and not coming up with much that is helpful so that's why I'm using this forum. I usually don't use forums to get answers but I'm really struggling with this one and have been spinning my wheels trying to figure it out for about 5 hours.

 

So, here's what I have imported:

import com.greensock.*;
import com.greensock.TweenMax;
 
Here's the code I'm using and mybackround is a Starling Image
TweenMax.to(mybackground, 3, {alpha:0.5});
 
When I compile I get this error:
VerifyError: Error #1014: Class com.greensock.core::Animation could not be found
 
If I comment out the TweenMax line the program compiles just fine.
Jerry
Link to comment
Share on other sites

Unfortunately we have absolutely zero experience with Starling. 

We have heard countless times, and I'm sure your research shows, that plenty of folks have great success with TweenLite and Starling.

Although TweenLite was designed specifically for animating normal AS3 DisplayObjects (MovieClip, TextField, Sprite, Button, etc) it can animate any numeric property of any ActionScript object (which is why it does work with Starling). 

 

However, where people typically run into problems is when they try to use our plugins like MotionBlur, ColorTransform, TransformAroundPoint... that is where things break down as the code in those plugins is VERY specific to properties and methods of native Display Objects and Starling objects are quite different. Keep in mind that the core of the animation platform TweenLite, TweenMax, TimelineLite, and TimelineMax are fully up to the task of animating with Starling.

 

From your description and error, I'm doubtful the problems you are having are related to Starling at all, but at this point its probably worth removing it and our swc from the equation.

 

Ditch the swc, and start a new project with a new class path pointing to the AS files (not swc)

 

Add a simple MovieClip named mc and try this very basic code

import com.greensock.*;
trace(TweenLite.version);
TweenLite.to(mc, 1, {x:500});

Any better? What version of TweenLite is reported?

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.
×
×
  • Create New...