Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Owen Corso

How do i Tween all of a MovieClip's children uniformly

Recommended Posts

the following code only tweens the floating window and not the textFields, the text fields just snap visibility on and off.

i tried using autoAlpha plugin but kept getting errors and couldn't find examples on how to "remove" the autoAlpha...

 

what is wrong with my code?

 

/**
	 * Handles the over state of the Product Info button, 
	 * fades in the infoModule movieClip which is basically just 3 display objects
	 * a floating window and 2 dynamic text fields 
	 * 
	 * @param e:MouseEvent.ROLL_OVER
	 * 
	 */		
	private function infoOverHandler(e:MouseEvent):void{
		trace("over");
		if(infoModule.alpha!=0)	infoModule.alpha = 0;
		infoModule.visible = true;
		TweenLite.to(infoModule, .5, {alpha:1, ease:Circ.easeIn});
	}
	/**
	 * Handles the out state of the Product Info button, 
	 * fades out a floating window containing the product description text 
	 * 
	 * @param e:MouseEvent.ROLL_OUT
	 * 
	 */		
	private function infoOutHandler(e:MouseEvent):void{
		trace("out");
		var tweenObject:Object = {};
		tweenObject.alpha = 0;
		tweenObject.ease = Circ.easeOut;
		tweenObject.onComplete = toggleInfoVis;				
		TweenLite.to(infoModule, .5, tweenObject);
	}

Link to comment
Share on other sites

I don't quite follow your question - could you restate it?

 

The reason autoAlpha didn't work (most likely at least) is that you forgot to activate the AutoAlphaPlugin. It's super simple and the Plugin Explorer will even write the code for you. You just need to do this once in your SWF before trying to do any autoAlpha tweens:

 

import com.greensock.plugins.*;
TweenPlugin.activate([AutoAlphaPlugin]);

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