Effect Preset

Posted by beon 
Effect Preset
September 09, 2008 09:00AM
I'm trying to change the effect preset. I'm using the following code, but the effect doesn't change. What is the correct code for preset change?

import com.jumpeye.flashEff.symbol.flip.FESFlip;
var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye.flashEff.symbol.flip.FESFlip";
myEffect.showDelay = 1;
myEffect.preset = 3;
myEffect.showTransition.tweenDuration = 1;
myEffect.targetVisibility = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "Calendar";
Re: Effect Preset
September 10, 2008 06:07AM
As you can see on the component's help web page, the preset property is not among the component's properties, this is why it has no effect when you set it. The preset is a property of the patterns, so in order to set it you'll need to access the show or hide pattern you use. This can be done by using the showTransition or hideTransition properties of the FlashEff component:
myEffct.showTransition.preset = 3;
or
myEffct.hideTransition.preset = 3;
Re: Effect Preset
September 11, 2008 03:41PM
I tried your solution, but I keep getting this error:

ReferenceError: Error #1056: Cannot create property preset on com.jumpeye.flashEff.symbol.flip.FESFlip.

Here's my code:

import com.jumpeye.flashEff.buttonEffect.flip.FEBFlip;
import com.jumpeye.flashEff.symbol.flip.FESFlip;

var myPattern:FEBFlip = new FEBFlip();
myPattern.preset = 3;
myPattern.backClip = "button1over";
myPattern.tweenDuration = 0.3;
var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye.flashEff.symbol.flip.FESFlip";
myEffect.showTransition.preset = 3;
myEffect.showTransition.tweenDuration = 0.5;
myEffect.buttonEffect = myPattern;
this.addChild(myEffect);
myEffect._targetInstanceName = "button1";
myEffect.useHandCursor = true;
Re: Effect Preset
September 12, 2008 06:33AM
Sorry about that.

You need to set the pattern properties dynamically, using the [ ] notation:
myEffect.showTransition["preset"] = 3;
This goes to all patterns and all their properties, when set through the showTransition or hideTransition references.



Edited 1 time(s). Last edit at 09/12/2008 06:33AM by negush.
Sorry, you do not have permission to post/reply in this forum.