Swap transitions on more than two textfields

Posted by mindspace 
Swap transitions on more than two textfields
January 13, 2009 06:12PM
I have a file set up with 3 textfields, called myTextField1, myTextField2 and myTextField3. I want to create a swap transition between the textfields to display one after the other, with the last one fading out at the end. I can do it just fine with two textfields (thanks to the documentation!), but can't figure out how to create more than two. Here's my code:

import com.jumpeye.flashEff.symbol.pixelate.FESPixelate 
 
var pattern:FESPixelate = new FESPixelate(); 
var myEffect:TxEff2;

for (var i = 0; i<3; i++)
{
	myEffect = new TxEff2(); 
 	myEffect.targetVisibility = false; 
	myEffect.showTransition = myEffect.hideTransition = pattern; 
	myEffect.useSwapInsteadHide = true; 
	myEffect.swapType = TxEff2.SWAP_TYPE_HIDE_AND_SHOW; 
	myEffect.swapTransition = showPattern; 
	myEffect.swapDelay = .5;
	myEffect.hideDelay = 0;
	myEffect.swapTargetVisibility = false;
	showPattern.tweenDuration = hidePattern.tweenDuration = 1;
	this.addChild(myEffect);
	myEffect._targetInstanceName = "myTextField"+(i+1);
	myEffect.swapTargetInstanceName = "myTextField"+(i+2);
}
Re: Swap transitions on more than two textfields
January 15, 2009 06:32AM
Here is an example on how to use 'useSwapInsteadHide' property on more than three textfields using the timer class of Adobe's framework.This example is done with flasheff, but can be used with txeff2 instead of flasheff.
Attachments:
open | download - useSwapInsteadHide.fla (576 KB)
Sorry, you do not have permission to post/reply in this forum.