# Tween Max Skew Problems

## Recommended Posts

my code is below the TweenMax skew doesn't work when I add a second line of code altering the skew in waterSkew function. It works fine when the second line of the waterSkew function is not in there.

import com.greensock.*;

import com.greensock.easing.*;

import com.greensock.plugins.*;

TweenPlugin.activate([TransformMatrixPlugin]);

//CHANTEL Timeline variables

var cMoveTimeline:TimelineLite = new TimelineLite();

function init():void{

waterSkew();

cMove();

}

function cMove():void{

cMoveTimeline.to(C,2,{x:166.9, y:479.55});

cMoveTimeline.to(C,1,{x:166.9, y:467.7, rotation:5}, "+=.15");

cMoveTimeline.to(C,1,{x:163.3, y:471.25, rotation:-5}, "+=.25");

cMoveTimeline.to(C,1,{x:166.9, y:467.7, rotation:5});

cMoveTimeline.to(C,1,{x:166.9, y:479.55, rotation:-5}, "+=.25");

cMoveTimeline.to(C,1,{x:170.5, y:469.5, rotation:0});

}

function waterSkew():void{

TweenMax.to(water, 8, {transformMatrix:{skewX:1, skewY:-1}});

TweenMax.from(water, 8, {transformMatrix:{skewX:1, skewY:1}});

}

init();

##### Share on other sites

Hi and welcome to the GreenSock forums,

I think the issue here is that you are creating two tweens at the same time on the same properties of the same object.

First you tell water to skew one way and then you immediately tell it to skew from the same way.

In more basic English, Imagine I told you "Hey, go to the store, no wait, come from the store". You would probably look at me funny and say "what are you talking about, I can only do one of those things?"

If you are trying to build a sequence, you may want to put a delay on the second tween (delay:8) OR use a timeline as you are elsewhere in your code.

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

• ### Recently Browsing   0 members

• No registered users viewing this page.
×