Home
> FlashEff 1 (Discontinued version)
> Topic
Swap transitions on more than two textfields
Posted by mindspace
Swap transitions on more than two textfields January 13, 2009 06:12PM | Registered: 15 years ago Posts: 1 |
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 | Admin Registered: 15 years ago Posts: 310 |
Sorry, you do not have permission to post/reply in this forum.