Flas Eff 2 ActionScript 3.0 Usage

anthropologistbarrenSoftware and s/w Development

Jul 4, 2012 (2 years and 3 months ago)

337 views


1

FlasEff2
ActionScript
3.0
Usage



Apply
FlashEff2
patterns
by
script



Important
!

For
applying
FlashEff2
with
code
you
must
use
the
FlashEff2Code
component
found
in

the
Components
panel.
Both,
the
FlashEff2
and
FlashEff2Code
components
contain
the
same

pr
operties
and
methods
and
dispatch
the
same
events.
This
is
a
modified
version
of
the
FlashEff2

component,
which
contains
all
the
necessary
assets
embedded
into
it.
This
way
you
only
need
to

use
the
FlashEff2Code
component
and
the
desired
FlashEff2
pattern

(they
need
to
be
in
the

Library),
without
the
extra
assets
the
regular
FlashEff2
component
needs:
the
presets
and
easing

functions.
The
downside
of
the
FlashEff2Code
is
the
larger
size
compared
to
the
FlashEff2

component
(up
to
6
kB
larger).


Creating
Flas
hEff2
animations
with
actionscript
is
not
so
difficult
and
requires
a
few
steps:


1.
Create
a
FlashEff2Code
instance


To
create
FlashEff2Code
instance
simply
instantiate
the
FlashEff2Code
class.
In
order
to
do
this,

the
FlashEff2Code
component
must
be
plac
ed
in
the
Library
of
your
project.
Also
the

FlashEff2Code
component

must

be
added
to
the
display
list
otherwise
it
will
not
work.
Finally
it

must
be
applied
on
the
target
display
object
(Sprite,
MovieClip
or
dynamic
TextField).


var myEffect:FlashEff2Code
= new FlashEff2Code();

myEffect.showAutoPlay = true;

myEffect.hideDelay = 3;

addChild(myEffect);


...
set
up
the
FlashEff2
pattern
...


myEffect._targetInstanceName = "myClip";



2.
Apply
the
FlashEff2
pattern


FlashEff2
patterns
can
be
applied
in
two
diff
erent
ways:
either
by
creating
an
instance
of
that

pattern
and
assigning
it
to
the
FlashEff2Code
instance
or
by
setting
the
pattern
class
name.


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


var myPattern:FESAlpha = new FESAlpha();

myPattern.tweenDu
ration = 0.5;

myEffect.showTransition = myPattern;


...
or
...


myEffect.showTransitionName = "com.jumpeye.flashEff2.symbol.alpha.FESAlpha";


2

myEffect.showTransition.tweenDuration = 0.5;



3.
Check
to
see
when
the
transition
ends


The
beginning
and
ending
o
f
an
effect
is
announced
by
the
component
through
events.
You
need

to
add
listeners
for
the
FLASHEFFEvents.TRANSITION_START
(the
event
for
the
beginning
of
the

effect)
and
FLASHEFFEvents.TRANSITION_END
(the
event
for
the
end
of
the
effect)
events.


import
com.jumpeye.Events.FLASHEFFEvents;


myEffect.addEventListener(FLASHEFFEvents.TRANSITION_START, effectStarting);

myEffect.addEventListener(FLASHEFFEvents.TRANSITION_END, effectEnding);


function effectStarting(evt:FLASHEFFEvents):void {


trace("The effect h
as started");

}


function effectEnding(evt:FLASHEFFEvents):void {


trace("The effect has endded");

}



Examples


Create
a
looping
show/hide
effect


Create
a
new
ActionScript
3.0
file,
set
the
frame
rate
to
30
fps
and
place
an
image
on
the
stage.

Convert
it

into
a
MovieClip
and
give
it
the
instance
name
of
"myImage".


Open
the
Components
Panel
and
drag
the
FlashEff2Code
component
(FlashEff2
folder)
over
the

Library
panel.
Do
so
with
the
FESBrightSquares
and
FESEqualizer
patterns
too
(FlashEff2
Patterns

folde
r).
We
will
be
creating
a
show
effect
using
the
FESBrightSquares
pattern
and
a
hide
effect

using
the
FESEqualizer
pattern.


Next,
in
the
timeline
panel,
create
a
new
layer
and
name
it
"Actions".
This
is
where
you
will
be

placing
the
code.
Select
the
first

frame
in
the
"Actions"
layer,
open
the
Actions
panel
(F9)
and

paste
the
code
below
in
the
panel:


// Import the necessary classes.

import com.jumpeye.Events.FLASHEFFEvents;

import com.jumpeye.flashEff2.symbol.brightSquares.FESBrightSquares;

import com.jump
eye.flashEff2.symbol.equalizer.FESEqualizer;


// Create the FlashEff2Code instance and add it to the stage. The FlashEff2Code

// component must be in the display list in order for it to work.

var effect:FlashEff2Code = new FlashEff2Code();

effect.addEventL
istener(FLASHEFFEvents.TRANSITION_END, replay);

addChild(effect);


// Create the show pattern instance (FESBrightSquares) and set it

// so the effect looks as you like.

var showEffect:FESBrightSquares = new FESBrightSquares();


3

showEffect.scaleXAmount = 1.5
;

showEffect.scaleYAmount = 1.5;

showEffect.preset = 19; // random

showEffect.tweenDuration = 2;


// Create the hide pattern instance (FESEqualizer) and set it

// so the effect looks as you like.

var hideEffect:FESEqualizer = new FESEqualizer();

hideEffect
.squareWidth = 15;

hideEffect.squareHeight = 15;

hideEffect.preset = 3; // T2B

hideEffect.tweenDuration = 3;


// Assign the show and hide transitions to the FlashEff2Code instance.

effect.showTransition = showEffect;

effect.hideTransition = hideEffect;

//
There will be a 3 seconds pause between the show and hide transitions.

effect.hideDelay = 3;

// Set the target object to the FlashEff2Code instance. Once you do this,

// the show effect will start immediately (except the case when the

// show effect has a
delay too).

effect._targetInstanceName = "myImage";


// When the "hide" transition ends, start the show effect again.

function replay(evt:FLASHEFFEvents):void {


if (effect.currentTransitionType == "hide") {



effect.show();


}

}


Test
your
clip
by
pressin
g
Ctr+Enter
for
Windows
or
Cmd+Enter
on
Mac
OS.



Apply
a
FlashEff2
filter


Create
a
new
ActionScript
3.0
file,
set
the
frame
rate
to
30
fps
and
place
an
image
on
the
stage.

Convert
it
into
a
MovieClip
and
give
it
the
instance
name
of
"myImage".


Open
the

Components
Panel
and
drag
the
FlashEff2Code
component
(FlashEff2
folder)
over
the

Library
panel.
Do
so
with
the
FEFReflection
pattern
too
(FlashEff2
Patterns
folder).
We
will
be

applying
a
reflection
to
the
target
image,
through
the
FlashEff2Code
component
.


Next,
in
the
timeline
panel,
create
a
new
layer
and
name
it
"Actions".
This
is
where
you
will
be

placing
the
code.
Select
the
first
frame
in
the
"Actions"
layer,
open
the
Actions
panel
(F9)
and

paste
the
code
below
in
the
panel:


// Import the necessary
classes.

import com.jumpeye.Events.FLASHEFFEvents;

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


// Create the FlashEff2Code instance and add it to the stage. The FlashEff2Code

// component must be in the display list in order for it to w
ork.

var effect:FlashEff2Code = new FlashEff2Code();

addChild(effect);


// Create the reflection filter instance and set it up as you need.


4

var reflection:FEFReflection = new FEFReflection();

reflection.refresh = false;

reflection.reflectionAlpha = 0.8;

re
flection.reflectionRatio = 160;


// Add the filter to the FlashEff2Code instance.

effect.addFilter(reflection);

// Set the target object to the FlashEff2Code instance. Once you do this,

// the filter will be applied immediately.

effect._targetInstanceName
= "myImage";


Test
your
clip
by
pressing
Ctr+Enter
for
Windows
or
Cmd+Enter
on
Mac
OS.



Create
a
FlashEff2
button


Create
a
new
ActionScript
3.0
file,
set
the
frame
rate
to
30
fps
and

draw
a
graphical
object
that

will
be
used
as
button.
Select
the
object,
convert
it
into
a
Movie
Clip
and
give
it
the
instance
na
me

of
"myButton"
.


Open
the
Components
Panel
and
drag
the
FlashEff2Code
component
(FlashEff2
folder)
over
the

Library
panel.
Do
so
with
the
FEBEffect
pattern
too
(FlashEff2
Patterns
folder).
All
the
button

effects
are
applied
using
a
single
pat
tern.


Now,
applying
settings
on
the
FEBEffect
pattern
instance
is
done
through
XML
objects.
Each

FlashEff2
button
has

six

states
(up,
over
,

down
,
selected
up,
selected
over
and
selected
down
)
and

you
can
apply
different
settings
for
each
of
the
states.
Th
is
however,
is
done
not
by
assigning

values
to
the
pattern
parameters
but
by
assigning
an
XML
object
to
each
of
the

six

states,
that

actually
are
the
button
parameters
(upState,
overState
,

downState
,
selectedUpState,

selecetdOverState
and
selectedDownState
).
You
can
see
all
the
possible
button
settings
inside
the

FlashEff2
Panel
>
Button
tab.


It
is
not
required
to
set
all
the
states
of
the
button.
FlashEff2
will
automatically
apply
the
existing

states
(if
it
is
possible)
or
will
leave
the
target
display
ob
ject
in
the
original
form
if
a
button
state

cannot
be
applied.
For
example,

if
the

down
state
is
not
set,
the
component
will
apply
the
over

state
(if
this
one
exists)
or
the
up
state.


Note:

This
is
why
it
is
harder
to
create
the
button
effects
by
code
and

we
recommend
using
the

FlashEff2
Panel
to
apply
button
effects.
The
easiest
way
to
get
the
XML
object
corresponding
to

the
button
states
is
to
make
the
button
settings
first
using
the
FlashEff2
Panel
and
then
click
on

the
Copy
button.
This
will
copy
the
X
ML
object
corresponding
to
the
entire
FlashEff2
instance
into

the
clipboard
and
from
there
you
can
paste
it
into
any
text
editor
you
like.
Then,
simply
copy
the

contents
of
the
<value>
nodes
inside
the
<upState>,
<overState>
,

<downState>
,

<selectedUpState>
,
<selectedOverState>
and
<selectedDownState>

nodes
and
paste
them
into

the
code
in
your
.fla
file.


Next,
in
the
timeline
panel,
create
a
new
layer
and
name
it
"Actions".
This
is
where
you
will
be

placing
the
code.
Select
the
first
frame
in
the
"Actions"

layer,
open
the
Actions
panel
(F9)
and

paste
the
code
below
in
the
panel:


5


// Import the necessary classes.

import com.jumpeye.Events.FLASHEFFEvents;

import com.jumpeye.flashEff2.buttonEffect.FEBEffect;


// Create the FlashEff2Code instance and add it to
the stage. The FlashEff2Code

// component must be in the display list in order for it to work.

var effect:FlashEff2Code = new FlashEff2Code();

addChild(effect);


var overStateXML:XML = <value>







<tweenDuration>







<type>Number</type>







<valu
e>0.3</value>







<defaultValue>0.3</defaultValue>







<enterValue>0.3</enterValue>







</tweenDuration>







<tweenType>







<type>String</type>







<value>Quadratic</value>







<defaultValue>Quadratic</defaultValue>







<enterV
alue>Quadratic</enterValue>







</tweenType>







<easeType>







<type>String</type>







<value>easeOut</value>







<defaultValue>easeOut</defaultValue>







<enterValue>easeOut</enterValue>







</easeType>







<glowFilter>







<t
ype>Object</type>







<value>








<color>








<type>uint</type>








<value>26367</value>









<defaultValue>14492194</defaultValue>








</color>








<alpha>








<type>Number</type>








<value>1</value>








<default
Value>1</defaultValue>








</alpha>








<blurX>








<type>Number</type>








<value>10</value>








<defaultValue>10</defaultValue>








</blurX>








<blurY>








<type>Number</type>








<value>10</value>








<defaultV
alue>10</defaultValue>








</blurY>








<strength>








<type>Number</type>








<value>3</value>








<defaultValue>2</defaultValue>








</strength>








<quality>








<type>Number</type>








<value>3</value>


6








<def
aultValue>2</defaultValue>








</quality>








<inner>








<type>Boolean</type>








<value>false</value>








<defaultValue>false</defaultValue>








</inner>








<knockout>








<type>Boolean</type>








<value>false</value
>








<defaultValue>false</defaultValue>








</knockout>







</value>







</glowFilter>






</value>;



var downStateXML:XML = <value>







<tweenDuration>







<type>Number</type>







<value>0.15</value>







<defaultValue>0.15
</defaultValue>







<enterValue>0.3</enterValue>







</tweenDuration>







<tweenType>







<type>String</type>







<value>Strong</value>







<defaultValue>Strong</defaultValue>







<enterValue>Quadratic</enterValue>







</tweenType
>







<easeType>







<type>String</type>







<value>easeOut</value>







<defaultValue>easeOut</defaultValue>







<enterValue>easeOut</enterValue>







</easeType>







<glowFilter>







<type>Object</type>







<value>








<col
or>








<type>uint</type>








<value>0</value>








</color>








<alpha>








<type>Number</type>








<value>0.7</value>








</alpha>








<blurX>








<type>Number</type>








<value>8</value>








</blurX>








<b
lurY>








<type>Number</type>








<value>8</value>








</blurY>








<quality>








<type>Number</type>








<value>2</value>








</quality>








<inner>








<type>Boolean</type>








<value>true</value>


7








</inner>








<knockout>








<type>Boolean</type>








<value>false</value>








</knockout>








<strength>








<type>Number</type>








<value>2</value>








</strength>







</value>







</glowFilter>







<blurFilter>







<t
ype>Object</type>







<value>








<blurX>








<type>Number</type>








<value>4</value>








</blurX>








<blurY>








<type>Number</type>








<value>4</value>








</blurY>








<quality>








<type>Number</type>








<value>1</value>








</quality>







</value>







</blurFilter>






</value>;


// Create the button pattern instance.

var btnEffect:FEBEffect = new FEBEffect();

// The up state of the button will have no effects so the upState

// property w
ill not be set.

btnEffect.overState = overStateXML;

btnEffect.downState = downStateXML;


// Apply the button pattern to the FlashEff2Code instance.

effect.buttonEffect = btnEffect;

effect.useHandCursor = true;

// Set the target object to the FlashEff2Code
instance. Once you do this,

// the button pattern will be immediately applied.

effect._targetInstanceName = "myButton";


Test
your
clip
by
pressing
Ctr+Enter
for
Windows
or
Cmd+Enter
on
Mac
OS.



Create
a
looping
show/hide
effect
on
text


Create
a
new
Acti
onScript
3.0
file
and
set
the
frame
rate
to
30
fps.
This
example
shows
you
how

to
create
and
set
up
a
text
field
to
be
used
with
FlashEff2.


Open
the
Components
Panel
and
drag
the
FlashEff2Code
component
(FlashEff2
folder)
over
the

Library
panel.
Do
so
wit
h
the
FETMagneticWind
and
FETXYScale
patterns
too
(FlashEff2
Patterns

folder).
We
will
be
creating
a
show
effect
using
the
FETMagneticWind
pattern
and
a
hide
effect

using
the
FETXYScale
pattern.



8

The
font
used
for
the
text
is
"Lucida
Sans"
so
this
font
sho
uld
be
placed
into
the
Library
Panel
to

be
compiled
into
the
final
.swf
clip.
To
embed
a
font
into
the
Library,
please
follow
our
tutorial
on

the
JumpeyeComponents
site:

http://ww
w.jumpeyecomponents.com/Flash

Components/Transition

Effects/TxEff

Full

Licens
e

123/embed

fonts.htm
.


Next,
in
the
timeline
panel,
select
the
current
layer
and
name
it
"Actions".
This
is
where
you
will

be
placing
the
code.
This
file
will
not
contain
objects
on
the
stage,
instead
they
will
be
created
by

code.
Select
the
first
frame
i
n
the
"Actions"
layer,
open
the
Actions
panel
(F9)
and
paste
the
code

below
in
the
panel:


// Import the necessary classes.

import com.jumpeye.Events.FLASHEFFEvents;

import com.jumpeye.flashEff2.text.magneticWind.FETMagneticWind;

import com.jumpeye.flashEf
f2.text.xyscale.FETXYScale;


// Create the text format for the font.

var txtFormat:TextFormat = new TextFormat();

txtFormat.font = "Lucida Sans";

txtFormat.align = "center";

txtFormat.color = 0x0099FF;

txtFormat.size = 40;


// Create the text field, set it
up and add it to the display list.

var myText:TextField = new TextField();

myText.type = "dynamic";

myText.embedFonts = true;

myText.antiAliasType = "advanced";

myText.multiline = true;

myText.wordWrap = true;

myText.autoSize = "center";

addChild(myText);

// Add the text into the text field (text should be as HTML).

myText.defaultTextFormat = txtFormat;

myText.htmlText = "The quick brown fox jumps over the lazy dog";

// Center the text field on the stage.

myText.width = 350;

myText.x = (stage.stageWidth
-

myText.width) / 2;

myText.y = (stage.stageHeight
-
myText.height) / 2;



// Create the FlashEff2Code instance and add it to the stage. The FlashEff2Code

// component must be in the display list in order for it to work.

var effect:FlashEff2Code = new FlashE
ff2Code();

effect.addEventListener(FLASHEFFEvents.TRANSITION_END, replay);

addChild(effect);


// Create the show pattern instance (FESBrightSquares) and set it

// so the effect looks as you like.

var showEffect:FETMagneticWind = new FETMagneticWind();

show
Effect.randomX = 200;

showEffect.randomY = 50;

showEffect.groupDuration = 1.5;

showEffect.tweenDuration = 2;


// Create the hide pattern instance (FESEqualizer) and set it

// so the effect looks as you like.

var hideEffect:FETXYScale = new FETXYScale();

hi
deEffect.positionX =
-
15;


9

hideEffect.positionY =
-
50;

hideEffect.preset = 9; // char: random

hideEffect.groupDuration = 1.5;

hideEffect.tweenDuration = 2;


// Assign the show and hide transitions to the FlashEff2Code instance.

effect.showTransition = showE
ffect;

effect.hideTransition = hideEffect;

// There will be a 3 seconds pause between the show and hide transitions.

effect.hideDelay = 3;

// Set the target text field to the FlashEff2Code instance. Once you do this,

// the show effect will start immediate
ly (except the case when the

// show effect has a delay too).

effect.target = myText;


// When the "hide" transition ends, start the show effect again.

function replay(evt:FLASHEFFEvents):void {


if (effect.currentTransitionType == "hide") {



effect.show(
);


}

}


Test
your
clip
by
pressing
Ctr+Enter
for
Windows
or
Cmd+Enter
on
Mac
OS.



Properties

Property

Type/

FlashEff2
panel

Description

_targetInstanceName

String

Yes

The
instance
name
of
the
target
object
on
which
the
effect
will
be

applied.
If
the
tar
get
object
and
the
FlashEff2Code
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,
only
if
the

showAutoPlay

or

hideAutoPlay

property
is
set
to

true
.
This

property
must
be
set
after
both
the
target
object
and
the

FlashEff2Code
component
were
added
to
the
display
list.


Example

The
next
exa
mple
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
FlashEff2Code

component
and
the
FESAl
pha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.showTransitionName =
"
com.jumpeye.flashEff2
.symbol.alpha.FESAlpha";

this.addChild(myEffect);

myEffect
._targetInstanceName = "myClip";

trace(myEffect._targetInstanceName); // myClip



10

buttonEffect


IFlashEffButtonEffect

No


A
reference
to
the
instance
of
the

FEB
Effect
pattern
currently

applied
to
the
target
object,
through
the
current
instance
of

FlashEff
2.
This
reference
is
created
separately
by
using
the
pattern's

constructor.

Settings
to
the
button
pattern
can
only
be
made
by
using
XML.


Example

The
next
example
will
create
a

button
from
a
simple
movie
clip,
using

FlashEff2
Code
.


Create
a
movie
clip
on

the
stage
that
will
be
used
as
button

and
g
ive

it

the

instance
name

of
"myButton
".

Next,
from
the
Components

panel
drag
the
FlashEff2Code
component
and
the
FEBEffect
pattern

into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
following

code
into
it:


import
com.jumpeye.flashEff2.buttonEffect.FEBEffect;


var overState:XML = <value>

<tweenDuration>

<type>Number</type>

<value>1</value>

<defaultValue>1</defaultValue>

</tweenDuration>


<tweenType>

<type>String</type>

<value>Strong</value>

<defaultValue>Strong</defaultValue>

</tweenType>

<easeType>

<type>String</type>

<value>easeOut</value
>

<defaultValue>easeOut</defaultValue>

</easeType>

<blurFilter>

<type>Object</type>

<value/>

</blurFilter>

<glowFilter>

<type>Object</type>


<value>

<color hasCheck="false">

<type>uint</type>

<value>26367</value>

<defaultValue>14492194</defaultValue>

</color>

<alpha hasCheck="false">


<type>Number</type>

<value>1</value>

<defaultValue>1</defaultValue>

</alpha>

<blurX hasCheck="false">

<type>Number</type>

<value>12</value>


<defaultValue>10</defaultValue>

</blurX>

<blurY hasCheck="false">

<type>Number</type>

<value>12</value>

<defaultValue>10</defaultValue>

</
blurY>

<strength hasCheck="false">

<type>Number</type>

<value>2</value>

<defaultValue>2</defaultValue>

</strength>

<quality hasCheck="false">


<type>Number</type>


11

<value>2</value>

<defaultValue>2</defaultValue>

</quality>

<inner hasCheck="false">

<type>Boolean</type>

<value>false</value>

<defaultValue>false</defaultValue>

</inner>

<knockout hasCheck="false">

<type>Boolean</type>

<value>false</value>

<defaultValue>false</defaultValue>


</knockout>

</value>

</glowFilter>

</value>;


var selectedUpState:XML = <value>

<blurFilter>

<type>Object</type>

<value/>

</blurFilter>

<glowFi
lter>

<type>Object</type>

<value>

<color hasCheck="false">

<type>uint</type>

<value>52224</value>

</color>

<alpha hasCheck="false">


<type>Number</type>

<value>1</value>

</alpha>

<blurX hasCheck="false">

<type>Number</type>

<value>12</value>

</blurX>

<blurY hasChec
k="false">

<type>Number</type>

<value>12</value>

</blurY>

<quality hasCheck="false">

<type>Number</type>

<value>2</value>

</quality>


<inner hasCheck="false">

<type>Boolean</type>

<value>false</value>

</inner>

<knockout hasCheck="false">

<type>Boolean</type>

<value>false</
value>

</knockout>

<strength hasCheck="false">

<type>Number</type>

<value>2</value>

</strength>

</value>

</glowFilter>

<tweenDuration>

<type>Number</type>

<value>0.3</value>

<defaultValue>0.3</defaultValue>

</tweenDuration>

<tweenType>

<type>String</type>

<value>Quadratic</value>

<
defaultValue>Quadratic</defaultValue>

</tweenType>

<easeType>

<type>String</type>

<value>easeOut</value>

<defaultValue>easeOut</defaultValue>

</easeType>

</value>;



12

//
Create the button effect for the
target

//
movie clip (
myButton
).

var btn
:FEBEffect = new FEBEffect();

btn
.overState = overState;

btn
.selectedUpState = selectedUpState;


// Create the FlashEff2
Code
instance and

//
add it to the

display list.

var effect
:Fl
ashEff2Code = new FlashEff2Code();

effect
.useHandCursor = true;

effect.buttonEffect = btn
;

addChild(effect
);


// Apply the FlashEff2Code instance to the

// movie clip.

effect._targetInstanceName = "myButton
";


commands

Array

No

[read

only]
The
list
of
Com
mand
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
a
n
Array
object:


var myCommand:FECNavigateToURL =
myEffect.commands[2];


In
the
FlashEff2
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
FlashEff2Code

component
and
the
FECNavigateToURL
pattern
into
the
Library.
Bring

up

the
Actions
panel
and
paste
the
following
code
into
it:


import
com.jumpeye.flashEff2
.command.navigateToURL.FEC
NavigateToURL;


var myPattern:FECNavigateToURL = new
FECNavigateToURL();

myPattern.url = "http://www.flasheff.com/";

var myEffect:FlashEff2Code
= new FlashEff2Code
();

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
FECNavigateToU
RL]


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.


13


Example

The
next
example
applies
a
show
transition
based
on
the
Alpha

pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The

FlashEff2Code
component
instance
will
dispatch
events
when
the

transition
starts
and
whe
n
it
ends.


Create
a
movie
clip
on
the
stage
and
give
it
an
instance
name
of

myClip.
Next,
from
the
Components
panel
drag
the
FlashEff2Code

component
and
the
FETAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it
:


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

import com.jumpeye.Events.FLASHEFFEvents;


var myPattern:FESAlpha = new FESAlpha();

var myEffect:FlashEff2Code = new FlashEff2Code
();

myEffect.showTransition = myPattern;

this.addChild(myEffect);

myEf
fect._targetInstanceName = "myClip";


myEffect.addEventListener(FLASHEFFEvents.TRANSI
TION_START, transitionStartHandler);

myEffect.addEventListener(FLASHEFFEvents.TRANSI
TION_END, transitionEndHandler);


function
transitionStartHandler(evtObj:FLASHEFFEvents
):v
oid {


trace("The
"+evtObj.target.currentTransitionType+"
transition has started.");

}


function
transitionEndHandler(evtObj:FLASHEFFEvents):voi
d {


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
affecting
the
other
patterns

it
might
have,
for

example
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
m
ouse
actions.



The
default
value
is

true
.


Example


14

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
FlashEff2Code

component
and
the
FEFReflection
pattern
into
the
Library.
Bring
up

the
Actions
panel
and
paste
the
following
code
into
it:


import
com.jumpeye.flashEf
f2
.filter.reflection.FEFRefl
ection;

import
com.jumpeye.flashEff2
.buttonEffect.scale.FEBSca
le;


var reflection:FEFReflection = new
FEFReflection();

var myEffect:FlashEff2Code = new FlashEff2Code
();

myEffect.addFilter(reflection);

var myPattern:FEBScale = n
ew FEBScale();

myPattern.tweenDuration = 0.25;

myEffect.buttonEffect = myPattern;

myEffect.drawAfterFilters = false;

this.addChild(myEffect);

myEffect._targetInstanceName = "myClip";

filterList

Array

No

The
list
of
Filter
patterns
applied
to
the
target
ob
ject.
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:FilterEffe
ct =
myEffect.filterList[2];


In
the
FlashEff2
panel,
the
desired
panel
can
be
selected
from
the

Filter
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
FlashEff2Code

component
and
the
FEFReflection
pattern
into
the
Library.
Bring
up

the
Actions
panel
and
paste
the
following
code
into
it:


i
mport
com.jumpeye.flashEff2
.filter.reflection.FEFRefl
ection;


var myPattern:FEFReflection = new
FEFReflection();

var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.addFilter(myPattern);

this.addChild(myEffect);

myEffect._targetInstanceName = "myCli
p";

for(var i:int = 0; i <

15

myEffect.filterList.length; i++) trace(i+" ::
"+myEffect.filterList[i]); // 0 :: [object
FEFReflection]


groupName

String

No

The
group
name
for

the
target
display
object
that
will
be
used
as
a

radio
button
instance.
You
can
use

this
property
to
get
or
set
a
group

name
for

target
display
objects
used
as

radio
button
instance
s

or
for

a
radio
button
group.


You
can
have
multiple
radio
button
groups
by
setting
different
group

names
to
your
target
display
objects.
Each
radio
button
g
roup
will

work
independently
of
the
others
and
each
group
will
have
a
single

target
object
in
the
selected
state,
at
one
moment.


The
default
value
is

"feGroup"
.


Example

The
next
example
will
create
a
group
of
radio
buttons
using

FlashEff2.


Create
a
movi
e
clip
on
the
stage
that
will
be
used
as
button
and

duplicate
it.
Give
each
one
an
instance
name:
"button1"
and

"button2".

Next,
from
the
Components
panel
drag
the
FlashEff2Code

component
and
the
FEBEffect
pattern
into
the
Library.
Bring
up
the

Actions
pan
el
and
paste
the
following
code
into
it:


import
com.jumpeye.flashEff2.buttonEffect.FEBEffect;


var overState:XML = <value>

<tweenDuration>

<type>Number</type>

<value>1</value>

<defaultValue>1</defaultV
alue>

</tweenDuration>

<tweenType>

<type>String</type>

<value>Strong</value>

<defaultValue>Strong</defaultValue>

</tweenType>

<easeType>

<type>String</t
ype>

<value>easeOut</value>

<defaultValue>easeOut</defaultValue>

</easeType>

<blurFilter>

<type>Object</type>

<value/>

</blurFilter>

<glowFilter>


<type>Object</type>

<value>

<color hasCheck="false">

<type>uint</type>

<value>26367</value>

<defaultValue>14492194</defaultValue>

</color>


<alpha hasCheck="false">

<type>Number</type>

<value>1</value>

<defaultValue>1</defaultValue>

</alpha>

<blurX hasCheck="false">

<type>Number</type
>

<value>12</value>

<defaultValue>10</defaultValue>


16

</blurX>

<blurY hasCheck="false">

<type>Number</type>

<value>12</value>

<defaultVa
lue>10</defaultValue>

</blurY>

<strength hasCheck="false">

<type>Number</type>

<value>2</value>

<defaultValue>2</defaultValue>

</strength>


<quality hasCheck="false">

<type>Number</type>

<value>2</value>

<defaultValue>2</defaultValue>

</quality>

<inner hasCheck="false">

<type>Boolean</type>

<value>false</value>

<defaultValue>false</defaultValue>

</inner>

<knockout hasCheck="false">

<type>Boolean</type>

<value>false</value>


<defaultValue>false</defaultValue>

</knockout>

</value>

</glowFilter>

</value>;


var selectedUpState:XML = <value>

<blurFilter>

<type>Object</type>

<value/>


</blurFilter>

<glowFilter>

<type>Object</type>

<value>

<color hasCheck="false">

<type>uint</type>

<value>52224</value>

</color>


<alpha hasCheck="false">

<type>Number</type>

<value>1</value>

</alpha>

<blurX hasCheck="false">

<type>Number</type>

<value>12</value>


</blurX>

<blurY hasCheck="false">

<type>Number</type>

<value>12</value>

</blurY>

<quality hasCheck="false">

<type>Number</type>

<value>
2</value>

</quality>

<inner hasCheck="false">

<type>Boolean</type>

<value>false</value>

</inner>

<knockout hasCheck="false">

<type>Boolean
</type>

<value>false</value>

</knockout>

<strength hasCheck="false">

<type>Number</type>

<value>2</value>

</strength>

</value>

<
/glowFilter>

<tweenDuration>

<type>Number</type>

<value>0.3</value>

<defaultValue>0.3</defaultValue>


17

</tweenDuration>

<tweenType>

<type>String</type>


<value>Quadratic</value>

<defaultValue>Quadratic</defaultValue>

</tweenType>

<easeType>

<type>String</type>

<value>easeOut</value>

<defaultValue>easeOut</defaultValue>


</easeType>

</value>;


// Create the button effect for the first

//
movie clip (button1).

var btn1:FEBEffect = new FEBEffect();

btn1.overState = overState;

btn1.selectedUpState = selectedUpState;


// Create t
he button effect for the second

/
/
movie clip (button2).

var btn2:FEBEffect = new FEBEffect();

btn2.overState = overState;

btn2.selectedUpState = selectedUpState;


// Create the first FlashEff2 instance and

//
add it to the

display list.

var effect1:FlashEff2Code = new
FlashEff2Code();

e
ffect1.useHandCursor = true;

effect1.groupName = "myGroup";

effect1.buttonEffect = btn1;

addChild(effect1);


// Create the second FlashEff2 instance and

//
add it to the

display list.

var effect2:FlashEff2Code = new
FlashEff2Code();

effect2.useHandCursor
= true;

effect2.groupName = "myGroup";

effect2.buttonEffect = btn2;

addChild(effect2);


// Apply the two FlashEff2 instances to the

// two movie clips.

effect1._targetInstanceName = "button1";

effect2._targetInstanceName = "button2";


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
tran
sition
will
have
to
be

called
through
ActionScript
code,
using
the

transitionEffect()

or

hide()

methods.
This
property
can

also
be
set
in
the
FlashEff2
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


18

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
compon
ent
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
FlashEff2Code

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Ac
tions
panel
and
paste
the
following
code
into
it:


var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.showTransitionName =
"
com.jumpeye.flashEff2
.symbol.alpha.FESAlpha";

myEffect.hideTransitionName =
"
com.jumpeye.flashEff2
.symbol.alpha.FESAlpha";

t
his.addChild(myEffect);

myEffect.showAutoPlay = true;

myEffect.hideAutoPlay = false;

myEffect._targetInstanceName = "myClip";


myClip.addEventListener(MouseEvent.CLICK,
clickHandler);


function clickHandler(event:MouseEvent):void {


myEffect.hide();

}


hi
deDelay

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
precisi
on.
This
property
can
be
set
in

the
FlashEff2
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

second
s
delay.


Create
a
movie
clip
on
the
stage
and
give
it
an
instance
name
of

myClip.
Next,
from
the
Components
panel
drag
the
FlashEff2Code

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.hideTransitionName =
"
com.jumpeye.flashEff2
.symbol.alpha.FESAlpha";

this.addChild(myEffect);

myEffect.hideDelay = 5;

myEffect._targetInstanceName = "myClip";


hideTransition

IFlashEffSymbolText

N
o

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


19

selected
from
FlashEff2
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
FlashEff2C
ode

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


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


var myPattern:FESAlpha = new FESAlpha();

var myEffect:FlashEff2Code = new
FlashE
ff2Code();

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
tra
nsition
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
FlashEff2Code
instance
either
by

setting
the

hideTransitionName

or
the

hideTransition

property
or
by
selecting
a
pattern
in
FlashEff2
panel


>
Hide
tab


>

Pattern
list.


Example

The
next
example
applies
a
hide
transition
based
on
the
Alpha

pattern
(FESAlpha),
to
a
clip
(symbol)
called
myC
lip.
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,
f
rom
the
Components
panel
drag
the
FlashEff2Code

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.hideTransitionName =
"
com.jump
eye.flashEff2
.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
o
riginal
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
t
he
actual
effect
was
applied.



20


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
i
s
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
defa
ult
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
anima
tion",
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
FlashEff2Code

component
and
the
FETAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


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


var myPattern:FETAlpha = new FETAlpha();

var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.showTransition = myPattern;

myEffect.isTargetVisible
AtEnd = 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
v
alue.
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
FlashEff2Code

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel

and
paste
the
following
code
into
it:


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


21


var isTransitionHappening:Boolean;

var myPattern:FESAlpha = new FESAlpha();

var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.showTransition = myPattern;

m
yEffect.showDelay = 1;

this.addChild(myEffect);

myEffect._targetInstanceName = "myClip";

isTransitionHappening = true;


this.addEventListener(Event.ENTER_FRAME, loop);


function loop(event:Event):void {


if (isTransitionHappening !=
myEffect.isTransitionin
g) {



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
i
s
running:


no transition at the moment

transition in course

no transition at the moment


selected

Boolean

No

Specifies
whether
the
target
display
object
used
as
button
is
selected

or
not.


The
default
value
is

false
.


showAutoPlay

Boolean

Yes

This
prope
rty
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
FlashEff2
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
FlashEff2Co
de


22

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.showTransitionName =
"com.jumpeye.flashEff2.symbol.alpha.FESAlpha";

myEffec
t.hideTransitionName =
"com.jumpeye.flashEff2.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
proper
ty
also
accepts
floating
point
numbers,
so
you
can
set

time
intervals
with
milliseconds
precision.
This
property
can
be
set

from
the
FlashEff2
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
FlashEff2Code

component
and
the
FES
Alpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.showTransitionName =
"com.jumpeye.flashEff2.symbol.alpha.FESAlpha";

this.addChild(myEffect);

myEffe
ct.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
t
he
show
pattern
can
be
selected
from

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



23

Create
a
movie
clip
on
the
stage
and
give
it
an

instance
name
of

myClip.
Next,
from
the
Components
panel
drag
the
FlashEff2Code

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


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


var
myPattern:FESAlpha = new FESAlpha();

var myEffect:FlashEff2Code = new
FlashEff2Code();

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
t
hat
pattern
to
the
FlashEff2Code
instance
either
by

setting
the

showTransitionName

or
the

showTransition

property
or
by
selecting
a
pattern
in
FlashEff2
panel


>
Show
tab


>

Pattern
list.


Example

The
next
example
applies
a
show
transition
based
on
the
Alp
ha

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
FlashEff2Code

component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the

Acti
ons
panel
and
paste
the
following
code
into
it:


var myEffect:FlashEff2Code = new
FlashEff2Code();

myEffect.showTransitionName =
"com.jumpeye.flashEff2.symbol.alpha.FESAlpha";

this.addChild(myEffect);

myEffect._targetInstanceName = "myClip";


swapDelay

Nu
mber

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
o
n
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
o
ne
called
myTextField2.
The
swap


24

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
firs
t

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
FlashEff2Code
component
and

the
FETAlpha
and
FETBlur
patterns
i
nto
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


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

import com.jumpeye.flashEff2.text.blur.FETBlur;


var showPattern1:FETAlpha = new FETAlpha();

var showPattern2:FETAlpha = ne
w FETAlpha();

var hidePattern:FETBlur = new FETBlur();

var myEffect:FlashEff2Code = new
FlashEff2Code();


myEffect.targetVisibility = false;

myEffect.showTransition = showPattern1;

myEffect.hideTransition = hidePattern;

myEffect.useSwapInsteadHide = true;

myEffect.swapType =
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;

myEffect.swapTransition = showPattern2;

myEffect.swapDelay = 0;

myEffect.swapTargetVisibility = false;


this.addChild(myEffect);

myEffect.swapTargetInstanceName =
"myTextField2";

myEffect._targetInstan
ceName = "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

af
ter
both
the
target
object
and
the
FlashEff2Code
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
anot
her
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


25

the
first
text
field
and
myTextField2
for
the
second
one.
Change
the

anti

alias
setting
to
"Anti

alias
for
anim
ation",
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
FlashEff2Code
component
and

the
FETAlpha
and
FETBlur
patte
rns
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


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

import com.jumpeye.flashEff2.text.blur.FETBlur;


var showPattern1:FETAlpha = new FETAlpha();

var showPattern2:FETAlpha
= new FETAlpha();

var hidePattern:FETBlur = new FETBlur();

var myEffect:FlashEff2Code = new
FlashEff2Code();


myEffect.targetVisibility = false;

myEffect.showTransition = showPattern1;

myEffect.hideTransition = hidePattern;

myEffect.useSwapInsteadHide = t
rue;

myEffect.swapType =
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;

myEffect.swapTransition = showPattern2;

myEffect.swapDelay = 0;

myEffect.swapTargetVisibility = false;


this.addChild(myEffect);

myEffect.swapTarget = myTextField2;

myEffect._targetInstanceName =
"myTextField1";


swapTargetInstanceNa
me

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

a
fter
both
the
target
object
and
the
FlashEff2Code
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
ano
ther
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
th
e
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
ani
mation",
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
FlashEff2Code
component
and

the
FETAlpha
and
FETBlur
patt
erns
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:



26

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

import com.jumpeye.flashEff2.text.blur.FETBlur;


var showPattern1:FETAlpha = new FETAlpha();

var showPattern2:FETAlph
a = new FETAlpha();

var hidePattern:FETBlur = new FETBlur();

var myEffect:FlashEff2Code = new
FlashEff2Code();


myEffect.targetVisibility = false;

myEffect.showTransition = showPattern1;

myEffect.hideTransition = hidePattern;

myEffect.useSwapInsteadHide =
true;

myEffect.swapType =
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;

myEffect.swapTransition = showPattern2;

myEffect.swapDelay = 0;

myEffect.swapTargetVisibility = false;


this.addChild(myEffect);

myEffect.swapTargetInstanceName =
"myTextField2";

myEffect._target
InstanceName = "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
fiel
d
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

tr
ansition
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
dia
log
box
for
both
text
fields.
Next,

from
the
Components
panel
drag
the
FlashEff2Code
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.flashEff2.text.alpha
.FETAlpha;

import com.jumpeye.flashEff2.text.blur.FETBlur;


var showPattern1:FETAlpha = new FETAlpha();


27

var showPattern2:FETAlpha = new FETAlpha();

var hidePattern:FETBlur = new FETBlur();

var myEffect:FlashEff2Code = new
FlashEff2Code();


myEffect.targetV
isibility = false;

myEffect.showTransition = showPattern1;

myEffect.hideTransition = hidePattern;

myEffect.useSwapInsteadHide = true;

myEffect.swapType =
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;

myEffect.swapTransition = showPattern2;

myEffect.swapDelay = 0;

myE
ffect.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
sw
ap

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
fi
rst

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
animati
on",
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
FlashEff2Code
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.flashEff2.text.alpha.FETAlpha;

import com.jumpeye.flashEff2.text.blur.FETBlur;


var showPattern1:FETAlpha = new FETAlpha();

var showPattern2:FETAlpha =
new FETAlpha();

var hidePattern:FETBlur = new FETBlur();

var myEffect:FlashEff2Code = new
FlashEff2Code();


myEffect.targetVisibility = false;

myEffect.showTransition = showPattern1;

myEffect.hideTransition = hidePattern;

myEffect.useSwapInsteadHide = true
;

myEffect.swapType =

28

FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;

myEffect.swapTransition = showPattern2;

myEffect.swapDelay = 0;

myEffect.swapTargetVisibility = false;


this.addChild(myEffect);

myEffect.swapTargetInstanceName =
"myTextField2";

myEffect._targetInst
anceName = "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
n
ame

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
sw
aps

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
s
tage,
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
set
ting
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
FlashEff2Code
component
and

th
e
FETAlpha
and
FETBlur
patterns
into
the
Library.
Bring
up
the

Actions
panel
and
paste
the
following
code
into
it:


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

import com.jumpeye.flashEff2.text.blur.FETBlur;


var showPattern1:FETAlpha = new FETAlpha(
);

var showPattern2:FETAlpha = new FETAlpha();

var hidePattern:FETBlur = new FETBlur();

var myEffect:FlashEff2Code = new
FlashEff2Code();


myEffect.targetVisibility = false;

myEffect.showTransition = showPattern1;

myEffect.hideTransition = hidePattern;

myE
ffect.useSwapInsteadHide = true;

myEffect.swapType =
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;

myEffect.swapTransitionName =
"com.jumpeye.flashEff2.text.alpha.FETAlpha";

myEffect.swapDelay = 0;

myEffect.swapTargetVisibility = false;


this.addChild(myEffect);

myEf
fect.swapTargetInstanceName =

29

"myTextField2";

myEffect._targetInstanceName = "myTextField1";


swapType

String

Yes

The
type
of
the
swap
transition.
Possible
values
are

FlashEff2.SWAP_TYPE_SHOW
,

FlashEff2.SWAP_TYPE_HIDE

and

FlashEff2.SWAP_TYPE_HIDE_AND_SHOW





*

FlashEff2.SWAP_TYPE_SHOW

or
"show"



leaves
the

current
target
in
place,
without
hiding
it
and
executes
only
a
show

transition
on
the
next
target





*

FlashEff2.SWAP_TYPE_HIDE

or
"hide"



executes
only
a

hide
transition
on
the
current
target
and
th
e
next
target
is
made

visible
(if
it
was
invisible
prior
to
the
operation)
without
any

transition
effects





*

FlashEff2.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
c
alled
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

te
xt
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",
e
nable
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
FlashEff2Code
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.flashEff2.text.alpha.FETAlpha;

import com.jumpeye.flashEff2.text.blur.FETBlur;


var showPattern1:FETAlpha = new FETAlpha();

var showPattern2:FETAlpha = new FE
TAlpha();

var hidePattern:FETBlur = new FETBlur();

var myEffect:FlashEff2Code = new
FlashEff2Code();


myEffect.targetVisibility = false;

myEffect.showTransition = showPattern1;

myEffect.hideTransition = hidePattern;

myEffect.useSwapInsteadHide = true;

myEf
fect.swapType =
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;

myEffect.swapTransition = showPattern2;


30

myEffect.swapDelay = 0;

myEffect.swapTargetVisibility = false;


this.addChild(myEffect);

myEffect.swapTargetInstanceName =
"myTextField2";

myEffect._targetInstanceNa
me = "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
FlashEff2Code
instance