Jump to content
Search Community

Stuck at "Getting Started" Basic Tweening for AS2 Tweenlite

dgbenner test
Moderator Tag

Recommended Posts

Hi,

Im just getting started and am excited about the prospect of a new door to flash. However, I am stumped right off the bat going through "Getting Started" for Tweenlite.

 

I downloaded TweenLite for AS2. Created a test folder. Put the com folder inside. Created a test fla. I imported the classes as was instructed on the first frame of the timeline:

import com.greensock.TweenLite;
import com.greensock.*;
import com.greensock.easing.*;


TweenLite.to(poly_mc, 1.5, {x:100});

I created a polygon called poly_mc, and also named the instance poly_mc. I extended my timeline in the event it needed 1.5 seconds of frames to run the animation.

 

Nothing happened. No errors either. Am I doing something wrong?

 

I'm on Flash CS6, but wouldnt imagine it matters since it's AS libraries.

Link to comment
Share on other sites

Also, my question above relates to me downloading AS2 V11. I tried the same thing with V12.

import com.greensock.TweenLite;
import com.greensock.*;
import com.greensock.easing.*;

TweenLite.to(circle_mc, 1.5, {x:500});

Link to comment
Share on other sites

thanks, Carl. So my code should be for AS2/v11:

import com.greensock.TweenLite;
import com.greensock.*;
import com.greensock.easing.*;

TweenLite.to(circle_mc, 1.5, {_x:500});

I tried that, and that did not work.

 

I also noticed after countless attempts that when typing "import" i don't get any code suggestions/autocompletions. is it possible it's not loading the classes?

 

"import" does appear purple, as if recognized. and the * and "easing" but everything else is all black, and doesn't autofill.

 

I have the unaltered 'com' folder in the same folder as my fla. And have saved the fla.

Link to comment
Share on other sites

I added the underscore to your code in your file and it worked with no problems.

 

import com.greensock.TweenLite;
import com.greensock.*;
import com.greensock.easing.*;

TweenLite.to(poly_mc, 5, {_x:500});
trace(TweenLite.version); //12.0.11

I've attached a zip of your working fla WITH the as2 v12 greensock files, so give it a shot, it should work perfect.

 

Basic_as2_v12_tween_CS5.zip

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