Jump to content


Overwrite not working in AS2

Moderator Tag

Recommended Posts

I'm having problems with the code below. For some reason when I export I only see the last tween appear and thats it. I'm using the overwrite manager but I'm not sure if it's working correctly or not. I'm not a advanced Flash user so any help would be greatly appreciated. I have the file attached as well.


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

// Intro Animations
TweenLite.from (gfx7, 1,   { _alpha:0 });
TweenLite.from (statement, .7, { _x:7, _y:175, _alpha:0, _delay:0.5 });
TweenLite.to (statement, .7, { _x:7, _y:175, _alpha:0, _delay:3.5 });

Link to comment
Share on other sites

I'm pretty sure the problem is that you are using the wrong syntax for delay. There isn't an underscore:


_delay should be delay


so the 2nd and third tween were running at the same time (no delay) and since the from tween got overwritten, statement was being tweened TO where it was so there was no animation.


your first tween on gfx7 should have worked fine though.


try using delay with out the underscore and let us know how it goes.

  • Like 1
Link to comment
Share on other sites

Wow...I'm an idiot. Thanks for your help.


I do have another question, as I'm converting a Flash ad to AS2, I had some onComplete functions on 2 of my tweens that worked fine in AS3, but not so much in AS2. I have a example of it below. Any ideas?

TweenLite.to(drawnBldg, 0,  { delay:18.2, _alpha:1, onComplete:bldgFunction });


function bldgFunction()

Link to comment
Share on other sites

hmmm. I think because it has a duration of 0 seconds. try making the duration .001


tweens with no durations are kind of tricky. when do they begin? when do they end? kind of a brain twister. stick with a really short duration and you should be fine.

Link to comment
Share on other sites

Thanks for your help Carl. I figured out the problem. I forgot that in AS2 the "alpha" ranges from 0-100 and in AS3 it goes from 0-1. I still had it set to 1 which is why I couldn't see the onComplete working. Thanks for your help though....definitely saved me some frustration :-P

Link to comment
Share on other sites

Oh snap. Good catch. Totally didn't think of that.

Glad you got it working.

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.