Jump to content
Search Community

scaleX and scaleY not working in sequence [SOLVED]

gilbejam test
Moderator Tag

Recommended Posts

Hi there. Hope somebody is able to help me on this one.

I've only just started using TimelineMax for tween sequences and I've come across some strange behaviour.

Basically, the problem is that I can tween in sequence other properties of my movieclip EXCEPT the scaleX or scaleY.

 

Here's the code:

 

var myTimeline:TimelineMax = new TimelineMax({align:TweenAlign.SEQUENCE, onComplete:gotoProfile});

myTimeline.append(new TweenMax(theClip, 1, {x:theClip.x + 10, scaleX:2, scaleY:2, ease:Circ.easeOut}));
myTimeline.append(new TweenMax(theClip, 0.75, {x:theClip.x - 10,scaleX:1, scaleY:1, ease:Cubic.easeIn}));
myTimeline.append(new TweenMax(theClip, 1, {alpha:0}));

 

I can't think why this might be occurring. Any help is greatly appreciated.

Thanks,

J

Link to comment
Share on other sites

Thanks for having a look at this. Hopefully its just something simple i'm doing wrong.

 

There's a big comment in the code where the error occurs.

Basically just look for this:

var myTimeline:TimelineMax = new TimelineMax({align:TweenAlign.SEQUENCE, onComplete:gotoProfile});

 

Thanks in advance,

Yep, the whole project is in AS3

James

Link to comment
Share on other sites

Yep, it was a problem in your code - you were creating a conflicting tween that was overwriting the one in your TimelineMax. When you click one of the polaroids, TransOutPolaroids() gets called and then MouseUpPolaroid() gets called immediately as well. Both are trying to scale the clip in different directions (one to scaleX/scaleY 200 and the other to scaleX/scaleY of 1). The one that got created last overwrites the first one (as it should). See the problem now?

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