FlashEff Properties


General | Patterns | Properties | Methods | Events | XML

FlashEff Properties


Property Type
FlashEff Panel
Description
_targetInstanceName String
Yes
The instance name of the target object on which the effect will be applied. If the target object and the FlashEff instance do not have the same direct parent, then the target property should be used instead of _targetInstanceName, to set the reference to the target object using its path on the time line. Once this property is set, the component immediately tries to apply the effects, if the showAutoPlay or hideAutoPlay property is set to true.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
trace(myEffect._targetInstanceName); // myClip
buttonEffect String
No
A reference to the instance of the ButtonEffect pattern currently applied to the target object, through the current instance of FlashEff. This reference is created separately by using the pattern's constructor.

In the FlashEff panel, the desired button effect can be selected from the Button tab -> Pattern list.

Example
The next example applies scaling actions (FEBScale) to a clip (symbol) called myClip, executed when mouse actions take place on the target clip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEBScale pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.buttonEffectName = "com.jumpeye. flashEff.buttonEffect.scale.FEBScale";
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
buttonEffectName String
No
The name of the ButtonEffect pattern applied to the target object. This represents the full path and class name of the pattern.

In the FlashEff panel, the desired panel can be selected from the Button tab -> Pattern list.

Example
The next example applies scaling actions (FEBScale) to a clip (symbol) called myClip, executed when mouse actions take place on the target clip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEBScale pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.buttonEffectName = "com.jumpeye. flashEff.buttonEffect.scale.FEBScale";
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
commands Array
No
[read-only] The list of Command patterns applied to the target object. The patterns are inserted into the list in the order they are applied to the target object. If you need the reference to the third pattern applied, you can retrieve it just like you would retrieve any item from an Array object:
var myCommand:FECNavigateToURL = myEffect.commands[2];

In the FlashEff panel, Command patterns can be selected from the Commands area in the Button tab.

Example
This example lists all the commands applied to the target object, in this case, a single navigateToURL command (FECNavigateToURL).

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FECNavigateToURL pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.command. navigateToURL.FECNavigateToURL;

var myPattern:FECNavigateToURL = new FECNavigateToURL();
myPattern.url = "http://www.flasheff.com/";
var myEffect:FlashEff = new FlashEff();
myEffect.addCommand(myPattern, "release");
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
for(var i:int = 0; i < myEffect.commands. length; i++)
     trace(i+" :: "+myEffect.commands[i]); // 0 :: [object FECNavigateToURL]
currentTransitionType String
No
[read-only] Specifies the type of the current transition on a symbol or text object. Possible values are show, hide and swap. Useful when a FLASHEFFEvents.TRANSITION_END is dispatched and you want to find out the type of transition that has just finished.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The FlashEff component instance will dispatch events when the transition starts and when it ends.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FETAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.symbol.alpha. FESAlpha;
import com.jumpeye.Events.FLASHEFFEvents;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";

myEffect.addEventListener(FLASHEFFEvents. TRANSITION_START, transitionStartHandler);
myEffect.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);

function transitionStartHandler(evtObj: FLASHEFFEvents):void {
     trace("The "+evtObj.target.currentTransitionType+" transition has started.");
}

function transitionEndHandler(evtObj: FLASHEFFEvents):void {
     trace("The "+evtObj.target.currentTransitionType+" transition has ended.");
}
drawAfterFilters Boolean
Yes
If true, the button effect will be applied on the entire target object, including any auxiliary elements it might have, like filter patterns. Otherwise the button pattern will be applied only to the target object, without other patterns it might have, like filter patterns.

For example, if a reflection filter has been applied to the target object and drawAfterFilters is true, the FEBScale button pattern will scale the target object, including the reflection, on rollover and press mouse actions.

The default value is true.

Example
This example adds a button filter (FEBScale) which scales the target on mouse actions. The target object, in this case, also has a reflection filter applied on it (FEFReflection).

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEFReflection pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.filter. reflection.FEFReflection;
import com.jumpeye.flashEff.buttonEffect. scale.FEBScale;

var reflection:FEFReflection = new FEFReflection();
var myEffect:FlashEff = new FlashEff();
myEffect.addFilter(reflection);
var myPattern:FEBScale = new FEBScale();
myPattern.tweenDuration = 0.25;
myEffect.buttonEffect = myPattern;
myEffect.drawAfterFilters = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
filterList Array
No
[read-write] The list of Filter patterns applied to the target object. The patterns are inserted into the list in the order they are applied to the target object. If you need the reference to the third filter applied, you can retrieve it just like you would retrieve any item from an Array object:
var myFilter:FilterEffect = myEffect. filterList[2];

In the FlashEff panel, the desired panel can be selected from theFilter tab -> Pattern list.

Example
This example lists all the filters applied to the target object, in this case, a single reflection filter (FEFReflection).

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEFReflection pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.filter. reflection.FEFReflection;

var myPattern:FEFReflection = new FEFReflection();
var myEffect:FlashEff = new FlashEff();
myEffect.addFilter(myPattern);
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
for(var i:int = 0; i < myEffect.filterList. length; i++)
     trace(i+" :: "+myEffect.filterList[i]); // 0 :: [object FEFReflection]
hideAutoPlay Boolean
No
This property controls the hide transition applied to the target object (symbol or text field). If true, the transition will be applied after the time delay specified at hideDelay and after all the necessary properties were set. If false, the hide transition will have to be called through ActionScript code, using the transitionEffect() or hide() methods. This property can also be set in the FlashEff panel by selecting the "autoPlay" option in the Hide tab.

The default value is true.

Example
The next example applies automatically a show transition based on the Alpha pattern (FESAlpha), on a target clip (symbol) called myClip. Since hideAutoPlay is set to false, the hide transition will not occur automatically. We'll have to specifically tell the component to hide the clip when a mouse click is executed on it.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
myEffect.hideTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect.showAutoPlay = true;
myEffect.hideAutoPlay = false;
myEffect._targetInstanceName = "myClip";

myClip.addEventListener(MouseEvent.CLICK, clickHandler);

function clickHandler(event:MouseEvent):void {
     myEffect.hide();
}
hideDelay Number
Yes
The time interval, measured in seconds, until the hide transition should start. This property is used only if hideAutoPlay is true. The property also accepts floating point numbers, so you can set time intervals with milliseconds precision. This property can be set in the FlashEff panel -> Hide tab -> "delay" option.

The default value is 2.

Example
The next example applies a hide transition based on the Alpha pattern (FESAlpha), on a target clip (symbol) called myClip, after a 5 seconds delay.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.hideTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect.hideDelay = 5;
myEffect._targetInstanceName = "myClip";
hideTransition IFlashEffSymbolText
Yes
A reference to the instance of the pattern used for the hide transition. When used from code, this reference is created separately by using the pattern's constructor. Otherwise the hide pattern can be selected from FlashEff panel -> Hide tab -> Pattern list.

Example
The next example applies a hide transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.symbol.alpha. FESAlpha;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.hideTransition = myPattern;
myEffect.hideDelay = 0;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
hideTransitionName String
No
The full path and class name of the pattern used for the hide transition. This hide transition switches the target from a visible state to an invisible state, using an effect provided by the selected pattern. If you need to apply a hide transition on a target object, first you have to set that pattern to the FlashEff instance either by setting the hideTransitionName or the hideTransition property or by selecting a pattern in FlashEff panel -> Hide tab -> Pattern list.

Example
The next example applies a hide transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The transition is applied with a two seconds delay because, by default, hideDelay is 2. If you would like the effect to run immediately, set the hideDelay property to 0.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.hideTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
isTargetVisibleAtEnd Boolean
No
Controls the way the text looks after the effect applied on it has ended. If true, the text will be displayed in the original form (might slightly differ in position from the text with effect). If false, the text will remain in the final state after the effect has ended. This final state is not necessarily the original text field, it might by only a copy of it, on which the actual effect was applied.

If removeEffect() is called during the show on the text field and the property is set to true after the transition stops, the object displayed will be the original text field and not the Bitmap copy of it.

If the property is set to true, it is recommended that the x and y coordinates of the target object are integer values, otherwise you may experience some position shifting after the transition has ended and the target text field is displayed in the initial state.

The default value is false.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha), to a text field called myTextField and after the transition has finished and leaves the original text field displayed and not a Bitmap copy of it, the text field will be selectable.

Place a dynamic, selectable text field on the stage, enter the "The quick brown fox jumps over the lazy dog" text into it and give it an instance name of myTextField. Set the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box. Next, from the Components panel drag the FlashEff component and the FETAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;

var myPattern:FETAlpha = new FETAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.isTargetVisibleAtEnd = true;
this.addChild(myEffect);
myEffect._targetInstanceName = "myTextField";
isTransitioning Boolean
No
Specifies whether there is a transition going on (true) or not (false).

Example
The next example applies a hide transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The transition is applied with a 1 second delay. We are also setting up a handler for the ENTER_FRAME event, so each time the clip enters a new frame, the isTransitioning property is checked for it's value. Once it changes, the value is displayed.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.symbol.alpha. FESAlpha;

var isTransitionHappening:Boolean;
var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.showDelay = 1;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
isTransitionHappening = true;

this.addEventListener(Event.ENTER_FRAME, loop);

function loop(event:Event):void {
     if (isTransitionHappening != myEffect.isTransitioning)
     {
          trace((myEffect.isTransitioning ? "transition in course" : "no transition at the moment"));
          isTransitionHappening = myEffect.isTransitioning;
     }
}


In the Output panel the clip will trace the values of the isTransitioning property while the clip us running:

no transition at the moment
transition in course
no transition at the moment
showAutoPlay Boolean
Yes
This property controls the show transition applied to the target object. If true, the transition will be applied after the time delay specified at showDelay and after all the necessary properties were set. If false, the show transition will have to be called through ActionScript code, using the transitionEffect() or show() methods. This property can also be set in the FlashEff panel by selecting the "autoPlay" option in the Show tab.

The default value is true.

Example
The next example applies a consecutive show and hide transition based on the Alpha pattern (FESAlpha), on a target clip (symbol) called myClip. Since hideAutoPlay is set to true, the hide transition will occur automatically after 3 seconds after the show transition. The show transition however will not occur (showAutoPlay is false) until we specifically tell the component to show the clip when a mouse click is executed on it.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
myEffect.hideTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect.showAutoPlay = false;
myEffect.hideDelay = 5;
myEffect.hideAutoPlay = true;
myEffect._targetInstanceName = "myClip";

myClip.addEventListener(MouseEvent.CLICK, clickHandler);

function clickHandler(event:MouseEvent):void {
     myEffect.show();
}
showDelay Number
Yes
The time interval, measured in seconds, until the show transition should start. This property is used only if showAutoPlay is true. The property also accepts floating point numbers, so you can set time intervals with milliseconds precision. This property can be set from the FlashEff panel -> Show tab -> "delay" option.

The default value is 2.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), on a target clip (symbol) called myClip, after a 5 seconds delay.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect.showDelay = 5;
myEffect._targetInstanceName = "myClip";
showTransition IFlashEffSymbolText
No
A reference to the instance of the pattern used for the show transition. This reference is created separately by using the pattern's constructor. Otherwise the show pattern can be selected from FlashEff panel -> Show tab -> Pattern list.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.symbol.alpha. FESAlpha;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
showTransitionName String
No
The full path and class name of the pattern used for the show transition. This show transition switches the target from an invisible state to a visible state, using an effect provided by the selected pattern. If you need to apply a show transition to a target object, first you have to set that pattern to the FlashEff instance either by setting the showTransitionName or the showTransition property or by selecting a pattern in FlashEff panel -> Show tab -> Pattern list.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
swapDelay Number
Yes
The delay used for the swap transition - the time interval between the start of the hide transition on the current target and the start of the show transition on the next target. If swapDelay is 0 then the hide on the current target and the show on the next target take place in the same time, meaning that this is a crossfade-like transition between the two objects. If swapDelay is larger than the duration of the hide transition then the two target objects will be displayed one after the other (the current target hides and then the next target is displayed).

The default value is 0.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = false;

this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
swapTarget DisplayObject
No
The reference to the second target object used for the swap transition. The second target object of the swap transition is the one on which the show transition is executed. This property must be set after both the target object and the FlashEff component were added to the display list.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = false;

this.addChild(myEffect);
myEffect.swapTarget = myTextField2;
myEffect._targetInstanceName = "myTextField1";
swapTargetInstanceName String
Yes
The instance name of the second target object used for the swap transition. The second target object of the swap transition is the one on which the show transition is executed. This property must be set after both the target object and the FlashEff component were added to the display list.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = false;

this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
swapTargetVisibility Boolean
Yes
A Boolean value which specifies whether the second target object of the swap transition is visible (true) before the swap transition starts or invisible (false). The second target object of the swap transition is the one on which the show transition is executed.

The default value is false.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern. The second text field will be visible before the swap transition starts, because swapTargetVisibility is set to true.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = true;

this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
swapTransition IFlashEffSymbolText
No
A reference to the instance of the pattern used for the swap transition. This reference is created separately by using the pattern's constructor.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = false;

this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
swapTransitionName String
Yes
The full path and class name of the pattern used for the swap transition. Practically this is the pattern that will execute the show transition on the second target object. If there is no pattern name specified, the pattern used will be the one specified at showTransitionName or showTransition (if it is the case).

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransitionName = "com.jumpeye. flashEff.text.alpha.FETAlpha";
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = false;

this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
swapType String
Yes
The type of the swap transition. Possible values are FlashEff.SWAP_TYPE_SHOW, FlashEff.SWAP_TYPE_HIDE and FlashEff.SWAP_TYPE_HIDE_AND_SHOW
* FlashEff.SWAP_TYPE_SHOW or "show" - leaves the current target in place, without hiding it and executes only a show transition on the next target
* FlashEff.SWAP_TYPE_HIDE or "hide" - executes only a hide transition on the current target and the next target is made visible (if it was invisible prior to the operation) without any transition effects
* FlashEff.SWAP_TYPE_HIDE_AND_SHOW or "hideAndShow" - executes a hide transition on the current target and a show transition on the next target, using the time interval specified at swapDelay

The default value is hideAndShow.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = false;

this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
target DisplayObject
No
The reference to the target object. The target can be set using the full path in the time line, if this object and the FlashEff instance do not have the same direct parent (e.g. The FlashEff instance was added to the display list as a child of clip1 and the target object is myClip.container.targetClip).

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye. flashEff.symbol.alpha.FESAlpha";
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
trace(myEffect.target+" :: "+myEffect.target.name); // [object MovieClip] :: myClip
targetVisibility Boolean
Yes
Specifies whether the target object is visible at the beginning, before applying the show or hide transitions. If true, the target object will be displayed during the time interval specified at showDelay or hideDelay and, after that, the show or hide transition will start. In case of a show transition, the target will be displayed for the amount of time specified by showDelay and then hidden, before the transition starts. This property can also be set from the FlashEff panel by selecting the "target is visible" option in the Show or Hide tab.

The default value is true.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. Before the executing the transition, there is a 3 second delay while the target object is kept invisible because targetVisibility is set to false.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.symbol.alpha. FESAlpha;

var myPattern:FESAlpha = new FESAlpha();

var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.showDelay = 3;
myEffect.targetVisibility = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
textField TextField
No
The reference to the target text field on which the effect is applied. You can directly access the properties and methods of the target text field by accessing this property of the FlashEff component instance.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha), on a text field called myTextField.

Place a dynamic text field on the stage, enter the "The quick brown fox jumps over the lazy dog" text into it and give it an instance name of myTextField. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box. Next, from the Components panel drag the FlashEff component and the FETAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

var myEffect:FlashEff = new FlashEff();
myEffect.showTransitionName = "com.jumpeye. flashEff.text.alpha.FETAlpha";
this.addChild(myEffect);
myEffect._targetInstanceName = "myTextField";
trace(myEffect.target+" :: "+myEffect.target.name);
useHandCursor Boolean
Yes
A Boolean value that indicates whether the pointing hand (hand cursor) appears when the mouse rolls over the target object. If this property is set to true the buttonMode property is set to true automatically and the pointing hand used for buttons appears when the mouse rolls over the target object. If useHandCursor is false, the arrow pointer is used instead. You can change the useHandCursor property any time, either by code or from the FlashEff panel itself.

The default value is false.
useSwapInsteadHide Boolean
Yes
A Boolean value which indicates whether a swap transition should be made instead of a hide transition. If true, a swap transition will take place and not the hide transition. This property must always be set to true, if you wan to swap the current target object with another one. The swap transition will apply a hide transition on the current text field if swapType is FlashEff.SWAP_TYPE_HIDE or FlashEff.SWAP_TYPE_HIDE_AND_SHOW and perform a show transition on the second text field if swapType is FlashEff.SWAP_TYPE_SHOW or FlashEff.SWAP_TYPE_HIDE_AND_SHOW.

The default value is false.

Example
The next example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern.

Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha. FETAlpha;
import com.jumpeye.flashEff.text.blur. FETBlur;

var showPattern1:FETAlpha = new FETAlpha();
var showPattern2:FETAlpha = new FETAlpha();
var hidePattern:FETBlur = new FETBlur();
var myEffect:FlashEff = new FlashEff();

myEffect.targetVisibility = false;
myEffect.showTransition = showPattern1;
myEffect.hideTransition = hidePattern;
myEffect.useSwapInsteadHide = true;
myEffect.swapType = FlashEff.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.swapDelay = 0;
myEffect.swapTargetVisibility = false;

this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
xmlPath String
Yes
The path and name of the .xml file used to set up the current FlashEff instance. If such a file is defined and set to the component instance, then when the component initializes, the settings from the .xml file will override any other settings done through the FlashEff panel or through ActionScript code (if those were made before setting the xmlPath property).

Example

var myEffect:FlashEff = new FlashEff();
this.addChild(myEffect);
myEffect.xmlPath = "files/config/xml/setup.xml";


General | Patterns | Properties | Methods | Events | XML




FREE Flash Components

Check out these free, fully functional AS3.0 Flash components by Jumpeye:

FlashEff 2.0 Free
(free for non-commercial use)

JC Panorama
(free for non-commercial use)

JC Play List
(fully free)

Basic Menu Pack V3
(free AS3 version)

MCTE V3
(free AS3 version)

JC Player
(free for non-commercial use)

JC Flash Map
(free for non-commercial use)

Flash Bookmarks
(fully free)

ActionScript Bridge AS2-AS3
(fully free)

JS Charts
(free for non-commercial use - JavaScript comp.)