Hi guys,
I'm trying to build a 2 way tween (in 4 quadrants) using TweenLite with the colorTransform plugin. I'm doing this on a stage with a mouse move listener, so for example:
stage.addEventListener(MouseEvent.MOUSE_MOVE, mve)
function mve(evt:Event):void{
var percY = (stage.mouseY / stage.height).toFixed(2)
TweenLite.to(mc, 1, {colorTransform:{tint:0xff0000, tintAmount:percY}});
}
This works fine in 1 direction (top and bottom), but I want it to work 4 ways - have a look at screenshot which hopefully explains it better..
As you move towards each corner, top left, top right, bottom left, bottom right - the color should tween to that target (i.e. 100% or 0% of stage in both directions)
I hope this question makes sense, any help would be appreciated, a little bit of an AS3 newb.
Cheers