Skip to main content
Participating Frequently
October 8, 2008
Question

Alpha Tween help?

  • October 8, 2008
  • 1 reply
  • 311 views
Having a problem with the function below:

The alpha tween var tweenAlpha works on the event target clientsSub, fading the menu in from an alpha of 0-100.

However, I can't the alpha tween for var closeWorkAlpha to work.
Trying to get the workSub element to fade out from an alpha of 100-0.
The y tween works fine, just not the alpha tween.

Any suggestions?

I'd greatly appreciate any help.
Thanks!
TGC


function clientMenu(evt:MouseEvent):void {
var tweenMenuY:Tween = new Tween(clientsSub,"y",Regular.easeOut,141,121,1,true);
var tweenAlpha:Tween = new Tween(clientsSub,"alpha",Regular.easeOut,0,100,150,true);

var closeWorkY:Tween = new Tween(workSub,"y",Regular.easeOut,121,327,1,true);
var closeWorkAlpha:Tween = new Tween(workSub,"alpha",Regular.easeOut,100,0,150,true);
}
bClients.addEventListener(MouseEvent.CLICK, clientMenu);




This topic has been closed for replies.

1 reply

October 8, 2008
Couple of issues:

1) alpha value is measured from 0 to 1 in AS3, not 0 to 100. That can cause some funky behavior to set it to 100, that's 10000%

2) You should define the tween variable outside the event. Garbage collection might delete the Tween because ones the function completes, there are no references to them.

Don't know if that will fix your problem, but start there.