220
Total Views
220
Views on TechyLib
0
Views from Embeds
0
Favorites
0
Downloads
After making your selection, copy and paste the embed code above.
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
do
not
have
the
same
direct
parent
(e.g.
The
FlashEff2Code
instance
was
added
to
the
display
list
as
a
child
of
clip1
and
the
target
object
is
myClip.container.targetClip).
This
property
must
be
set
after
both
the
target
object
and
the
FlashEff2Code
component
were
added
to
the
display
list.
Example
The
next
example
appli
es
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
FESAlpha
patter
n
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._targetIn
stanceName = "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
showD
elay
and
then
hidden,
before
the
transition
starts.
This
property
can
also
be
set
from
the
FlashEff2
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
an
d
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:
31
import
com.jumpeye.flashEff2.symbol.alpha.FE
SAlpha;
var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff2Code = new
FlashEff2Code();
myEffect.showTransition = myPattern;
myEffect.showDelay = 3;
myEffect.targetVisibility = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "my
Clip";
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
FlashEff2Code
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
na
me
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
FlashEf
f2Code
component
and
the
FETAlpha
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.text.alpha.FETAlpha";
this.
addChild(myEffect);
myEffect._targetInstanceName = "myTextField";
trace(myEffect.target+" ::
"+myEffect.target.name);
toggle
Boolean
No
This
property
indicates
whether
the
target
display
object
used
as
a
button
(a
button
effect
is
applied
on
it)
can
be
t
oggled
or
not.
If
it
is
set
to
false
,
the
button
will
not
have
a
selected
state.
The
default
value
is
true
.
useHandCursor
Boolean
Yes
A
Boolean
value
that
indicates
whether
the
pointing
hand
(hand
cursor)
appears
when
the
mouse
rolls
over
the
target
obj
ect.
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
chan
ge
the
useHandCursor
property
any
time,
either
by
code
or
from
the
FlashEff2
panel
itself.
32
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
FlashEff2.SWAP_TYPE_HIDE
or
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW
and
perform
a
show
transition
on
the
second
text
field
if
swapType
is
FlashEff2.SWAP_TYPE_SHOW
or
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW
.
The
default
value
is
false
.
Example
The
next
e
xample
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)
an
d
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
Emb
ed
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.fla
shEff2.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 =
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW;
myEffect.swapTransition = showPattern2;
myEffect.s
wapDelay = 0;
myEffect.swapTargetVisibility = false;
this.addChild(myEffect);
myEffect.swapTargetInstanceName =
"myTextField2";
33
myEffect._targetInstanceName = "myTextField1";
xmlPath
String
Yes
The
path
and
name
of
the
.xml
file
used
to
set
up
the
curre
nt
FlashEff2Code
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
FlashEff2
panel
or
through
ActionScript
code
(if
those
were
made
before
setting
the
xmlPath
property).
Example
var myEffect:FlashEff2Code = new
FlashEff2Code();
this.addChild(myEffect);
myEffect.xmlPath =
"files/config/xml/setup.xml";
Methods
Method
Description
addCommand
Adds
a
new
command
patte
rn
to
the
target
object.
The
new
command
will
be
executed
on
the
event
specified
as
argument.
Parameters
command:IFlashEffCommand
—
The
reference
to
the
command
pattern
created
by
code.
eventType:String
—
The
event
on
which
the
selected
command
will
be
executed.
Possible
values
are
rollOver
,
rollOut
,
press
and
release
.
Returns
IFlashEffCommand
—
A
reference
to
the
newly
created
command
pattern.
Example
This
example
lists
all
the
commands
applied
to
the
target
object,
in
this
case,
a
single
navigateToU
RL
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
pas
te
the
following
code
into
it:
import
com.jumpeye.flashEff2.command.navigateToURL.FECNavigat
eToURL;
var myPattern:FECNavigateToURL = new
FECNavigateToURL();
myPattern.url = "http://www.flasheff.com/";
34
var myEffect:FlashEff2Code = new FlashEff2Code();
myE
ffect.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]
addCommandByName
Add
s
a
new
command
pattern
to
the
target
object.
The
new
command
will
be
executed
on
the
event
specified
as
argument.
Parameters
commandName:String
—
The
full
path
of
the
command
pattern
class
added
to
the
target
object.
eventType:String
—
The
event
on
whic
h
the
selected
command
will
be
executed.
Possible
values
are
rollOver
,
rollOut
,
press
and
release
.
initObj:Object
(default
=
null
)
—
An
object
used
to
initialize
the
command
pattern.
Returns
IFlashEffCommand
—
A
reference
to
the
newly
created
command
patt
ern.
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:
var myEffect:FlashEff2Code = new FlashEff2Code();
var initObj:Object = new Object();
initObj.url = "http://www
.flasheff.com/";
myEffect.addCommandByName("com.jumpeye.flashEff2.comma
nd.navigateToURL.FECNavigateToURL", "release",
initObj);
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
for(var i:int = 0; i < myEffect.commands.length; i++)
trace(i
+" :: "+myEffect.commands[i]); // 0 :: [object
FECNavigateToURL]
addFilter
Adds
a
new
filter
pattern
to
target
symbol
or
text
field.
Parameters
filter:IFlashEffFilter
—
The
reference
to
the
filter
pattern,
created
separately
by
code.
Example
This
exam
ple
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
an
d
the
35
FEFReflection
pattern
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
following
code
into
it:
import
com.jumpeye.flashEff2.filter.reflection.FEFReflection;
var myPattern:FEFReflection = new FEFReflection();
var myEffect:FlashEff2Code = n
ew FlashEff2Code();
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]
addFilter
ByName
Adds
a
new
Filter
pattern
to
target
symbol
or
text.
Parameters
filterName:String
—
The
full
package
and
class
name
of
the
filter
that
will
be
applied.
initObject:Object
(default
=
null
)
—
[optional]
An
object
used
to
set
up
the
new
filter.
Returns
IFlashEffFilter
—
A
reference
to
the
newly
created
filter
pattern.
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
instan
ce
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:
var myEffect:FlashEff2Code = new FlashEff2Code();
var init
Obj:Object = new Object();
initObj.reflectionDistance = 0;
myEffect.addFilterByName("com.jumpeye.flashEff2.filter
.reflection.FEFReflection", initObj);
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
for(var i:int = 0; i < myEffect.filter
List.length;
i++) trace(i+" :: "+myEffect.filterList[i]); // 0 ::
[object FEFReflection]
applyButtonEffect
Reapplies
the
ButtonEffect
pattern
to
the
target
object,
after
it
has
been
removed
with
the
removeButtonEffect()
method.
buttonPress
Manually
ap
plies
the
mouse
press
state
to
the
target
object,
without
the
mouse
press
action,
and
dispatches
the
FLASHEFFEvents.MOUSE_DOWN
event.
This
is
useful
when
the
component
should
visually
change
the
state
of
the
target
object
but
not
as
a
result
of
mouse
inter
action.
buttonRelease
Manually
applies
the
mouse
release
state
to
the
target
object,
without
the
mouse
release
action,
and
dispatches
the
FLASHEFFEvents.MOUSE_UP
36
event.
This
is
useful
when
the
component
should
visually
change
the
state
of
the
target
obje
ct
but
not
as
a
result
of
mouse
interaction.
buttonRollOut
Manually
applies
the
roll
out
state
to
the
target
object,
without
the
mouse
moving
out
of
it,
and
dispatches
the
FLASHEFFEvents.ROLL_OUT
event.
This
is
useful
when
the
component
should
visually
c
hange
the
state
of
the
target
object
but
not
as
a
result
of
mouse
interaction.
buttonRollOver
Manually
applies
the
roll
over
state
to
the
target
object,
without
the
mouse
getting
over
it,
and
dispatches
the
FLASHEFFEvents.ROLL_OVER
event.
This
is
useful
when
the
component
should
visually
change
the
state
of
the
target
object
but
not
as
a
result
of
mouse
interaction.
changeTarget
Changes
the
target
of
the
FlashEff2Code
instance
by
applying
a
hide
first
on
the
last
visible
target,
then
it
shows
the
newTar
get
object
with
the
selected
show
pattern.
The
method
does
suppress
autoPlay
and
will
count
the
delays.
Parameters
newTarget:DisplayObject
The
object
to
be
used
instead
the
current
target.
Example
myEffect.changeTarget(myNewTarget);
dispatchEvent
Disp
atches
a
FLASHEFFEvent
type
of
event.
Parameters
ev:Event
—
The
event
object
dispatched
as
parameter.
This
object
has
a
type
which
usually
is
one
of
the
types
described
in
the
FLASHEFFEvent
class
and
additional
information
about
the
event
that
is
being
di
spatched.
Returns
Boolean
—
A
value
of
true
if
the
event
was
successfully
dispatched.
A
value
of
false
indicates
failure
or
that
preventDefault()
was
called
on
the
event.
getFilter
Returns
a
reference
to
the
filter
pattern
specified
in
the
argument.
P
arameters
filterName:String
—
The
full
package
and
class
name
of
the
filter
pattern
that
should
be
returned.
Returns
IFlashEffFilter
—
A
reference
to
the
desired
filter
pattern
or
the
value
null
if
it
was
not
found
among
the
filter
patterns
applied
to
the
target
object.
Example
This
example
adds
a
filter
to
a
clip
(symbol)
called
myClip
and
lists
the
filter
by
using
the
appropriate
methods.
Create
a
movie
clip
on
the
stage
and
give
it
an
instance
name
of
myClip.
Next,
from
the
Components
panel
drag
the
F
lashEff2Code
component
and
the
FEFReflection
pattern
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
37
following
code
into
it:
var myEffect:FlashEff2Code = new FlashEff2Code();
var initObj:Object = new Object();
initObj.reflectionDistance = 0;
m
yEffect.addFilterByName("com.jumpeye.flashEff2.filter
.reflection.FEFReflection", initObj);
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
trace(myEffect.getFilter("com.jumpeye.flashEff2.filter
.reflection.FEFReflection")); // [object
FE
FReflection]
trace(myEffect.getFilterAt(0)); // [object
FEFReflection]
getFilterAt
Returns
the
filter
pattern
that
exists
at
the
specified
index.
Parameters
index:uint
—
The
index
which
the
target
filter
pattern
has
in
the
list
of
filters
applied
to
th
e
target
symbol
or
text.
Returns
IFlashEffFilter
—
The
filter
pattern
that
is
located
at
the
specified
index.
Example
This
example
adds
a
filter
to
a
clip
(symbol)
called
myClip
and
lists
the
filter
by
using
the
appropriate
methods.
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:
var myEffect:FlashEff2Co
de = new FlashEff2Code();
var initObj:Object = new Object();
initObj.reflectionDistance = 0;
myEffect.addFilterByName("com.jumpeye.flashEff2.filter
.reflection.FEFReflection", initObj);
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
tra
ce(myEffect.getFilter("com.jumpeye.flashEff2.filter
.reflection.FEFReflection")); // [object
FEFReflection]
trace(myEffect.getFilterAt(0)); // [object
FEFReflection]
getNumGroupButtons
Returns
the
number
of
group
buttons
(target
display
objects
with
but
ton
effects)
that
have
the
group
name
of
the
current
FlashEff2Code
instance.
Returns
uint
‐
The
number
of
group
buttons
in
the
current
button
group.
Example
38
The
next
example
will
create
a
group
of
radio
buttons
using
FlashEff2.
Create
a
movie
clip
on
th
e
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
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>
<typ
e>Object</type>
<value>
<color hasCheck="false">
<type>uint</type>
<value>26367</value>
<defaultValue>14492194</defaultValue>
</color>
<alph
a 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</defa
ultValue>
</blurY>
<strength hasCheck="false">
<type>Number</type>
<value>2</value>
<defaultValue>2</defaultValue>
</strength>
<quality ha
sCheck="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>
<defaultVa
lue>false</defaultValue>
</knockout>
</value>
39
</glowFilter>
</value>;
var selectedUpState:XML = <value>
<blurFilter>
<type>Object</type>
<value/>
</blu
rFilter>
<glowFilter>
<type>Object</type>
<value>
<color hasCheck="false">
<type>uint</type>
<value>52224</value>
</color>
<alpha ha
sCheck="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>
</tweenDuration>
<tweenType>
<type>String</type>
<value>Quadr
atic</value>
<defaultValue>Quadratic</defaultValue>
</tweenType>
<easeType>
<type>String</type>
<value>easeOut</value>
<defaultValue>easeOut</defaultValue>
</easeTy
pe>
</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;
40
// Create the first FlashEff2 instance and
//
add it to the
display list.
var effect1:FlashEff2Code = new FlashEff2Code();
effect1.useHa
ndCursor = 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;
effe
ct2.groupName = "myGroup";
effect2.buttonEffect = btn2;
addChild(effect2);
// Apply the two FlashEff2 instances to the
// two movie clips.
effect1._targetInstanceName = "button1";
effect2._targetInstanceName = "button2";
trace("Number of
grouped
buttons:
"+effect1.getNumGroupButtons());
// Number of group
ed
buttons: 2
hide
Hides
the
target
object
using
the
pattern
currently
applied
to
the
target
object
(symbol
or
text
field).
If
the
FlashEff2Code
instance
does
not
have
a
symbol
or
text
pattern
applied,
it
will
not
execute
anything.
Example
The
next
example
applies
a
hide
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The
hide
transition
will
not
execute
automatically
since
the
hide
AutoPlay
property
is
set
to
false
,
b
ut
it
will
execute
on
mouse
click
over
the
target
clip.
Create
a
movie
clip
on
the
stage,
give
it
an
instance
name
of
myClip
and
also
place
a
button
on
the
stage
and
name
it
buttonInstance.
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();
myE
ffect.hideTransition = myPattern;
myEffect.hideDelay = 0;
myEffect.hideAutoPlay = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
buttonInstance.addEventListener(MouseEvent.CLICK,
clikHandler);
function clikHandler(evt:MouseEvent
):void {
myEffect.hide();
}
41
removeAll
Removes
all
the
show/hide
effects,
filters,
commands
and
button
effects
added
through
the
FlashEff2Code
component
instance,
to
the
target
object
(symbol
or
text
field),
canceling
any
functionality
provided
by
them.
This
method
will
not
remove
the
FlashEff2Code
instance.
To
remove
the
FlashEff2Code
instance
too,
you'll
need
to
remove
it
from
the
display
list.
removeAllCommands
Removes
all
the
command
patterns
applied
to
the
target
object.
Example
This
example
adds
the
navigateToURL
command
to
a
clip,
on
both,
the
mouse
press
and
mouse
release
actions
and
displays
the
list
of
commands.
When
a
button
is
pressed,
the
commands
are
removed.
Create
a
movie
clip
on
the
stage,
give
it
an
instance
name
of
myClip
and
also
pl
ace
a
button
on
the
stage
and
name
it
buttonInstance.
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.f
lashEff2.command.navigateToURL.FECNavigat
eToURL;
var myPattern1:FECNavigateToURL = new
FECNavigateToURL();
myPattern1.url = "http://www.flasheff.com/";
var myPattern2:FECNavigateToURL = new
FECNavigateToURL();
myPattern2.url = "http://www.jumpeyecomponent
s.com/";
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.addCommand(myPattern1, "press");
myEffect.addCommand(myPattern2, "release");
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
trace(myEffect.commands.length+" commands ap
plied to
the target object");
for(var i:int = 0; i < myEffect.commands.length; i++)
trace(i+" :: "+myEffect.commands[i]);
/* output:
2 commands applied to the target object
0 :: [object FECNavigateToURL]
1 :: [object FECNavigateToURL]
*/
buttonInstance.a
ddEventListener(MouseEvent.CLICK,
clikHandler);
function clikHandler(evt:MouseEvent):void {
myEffect.removeAllCommands();
trace(myEffect.commands.length+" commands
applied to the target object");
for(var i:int = 0; i < myEffect.commands.length;
i++) tr
ace(i+" :: "+myEffect.commands[i]);
/* output:
0 commands applied to the target object
*/
}
42
removeAllCommandsByEventType
Removes
all
the
command
patterns
from
the
target
object,
that
are
executed
on
a
specified
event.
Parameters
eventType:String
—
Th
e
type
of
event
for
which
all
the
command
patterns
will
be
removed.
Possible
values
are
rollOver
,
rollOut
,
press
and
release
.
Example
This
example
adds
the
navigateToURL
command
to
a
clip,
on
both
the
mouse
press
and
mouse
release
actions
and
displays
the
list
of
commands.
When
a
button
is
pressed,
the
command
added
for
the
mouse
press
event
is
removed.
Create
a
movie
clip
on
the
stage,
give
it
an
instance
name
of
myClip
and
also
place
a
button
on
the
stage
and
name
it
buttonInstance.
Next,
from
the
Compo
nents
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.FECNavigat
eToURL;
var myPattern1:FECNaviga
teToURL = new
FECNavigateToURL();
myPattern1.url = "http://www.flasheff.com/";
var myPattern2:FECNavigateToURL = new
FECNavigateToURL();
myPattern2.url = "http://www.jumpeyecomponents.com/";
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.addCom
mand(myPattern1, "press");
myEffect.addCommand(myPattern2, "release");
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
trace(myEffect.commands.length+" commands applied to
the target object");
for(var i:int = 0; i < myEffect.commands.len
gth; i++)
trace(i+" :: "+myEffect.commands[i]);
/* output:
2 commands applied to the target object
0 :: [object FECNavigateToURL]
1 :: [object FECNavigateToURL]
*/
buttonInstance.addEventListener(MouseEvent.CLICK,
clikHandler);
function clikHandler(evt:
MouseEvent):void {
myEffect.removeAllCommandsByEventType("press");
trace(myEffect.commands.length+" commands
applied to the target object");
for(var i:int = 0; i < myEffect.commands.length;
i++) trace(i+" :: "+myEffect.commands[i]);
/* output:
1 comma
nds applied to the target object
0 :: [object FECNavigateToURL]
*/
}
43
removeAllFilters
Removes
all
the
filter
patterns
applied
on
the
current
FlashEff2Code
component
instance,
visually
removing
them
from
the
target
symbol
or
text,
but
leaving
all
the
oth
er
types
of
patterns.
removeButtonEffect
Removes
the
current
ButtonEffect
pattern
applied
to
the
target
object.
removeCommand
Removes
the
specified
command
pattern
instance
from
the
target
object.
Parameters
command:IFlashEffCommand
—
The
pattern
inst
ance
that
should
be
removed.
Example
This
example
adds
a
navigateToURL
and
a
goToFrame
command
to
a
clip,
on
the
mouse
press
action
and
displays
the
list
of
commands.
When
a
button
is
pressed,
the
goToFrame
command
is
removed.
Create
a
movie
clip
on
the
stage,
give
it
an
instance
name
of
myClip
and
also
place
a
button
on
the
stage
and
name
it
buttonInstance.
Next,
from
the
Components
panel
drag
the
FlashEff2Code
component,
the
FECNavigateToURL
and
the
FECGoToFrame
patterns
into
the
Library.
Bring
up
the
A
ctions
panel
and
paste
the
following
code
into
it:
import
com.jumpeye.flashEff2.command.navigateToURL.FECNavigat
eToURL;
import
com.jumpeye.flashEff2.command.goToFrame.FECGoToFrame;
var myPattern1:FECNavigateToURL = new
FECNavigateToURL();
myPattern1.url
= "http://www.flasheff.com/";
var myPattern2:FECGoToFrame = new FECGoToFrame();
myPattern2.frame = "10";
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.addCommand(myPattern1, "release");
myEffect.addCommand(myPattern2, "release");
this.addChild
(myEffect);
myEffect._targetInstanceName = "myClip";
trace(myEffect.commands.length+" commands applied to
the target object");
for(var i:int = 0; i < myEffect.commands.length; i++)
trace(i+" :: "+myEffect.commands[i]);
/* output:
2 commands applied to the
target object
0 :: [object FECNavigateToURL]
1 :: [object FECGoToFrame]
*/
buttonInstance.addEventListener(MouseEvent.CLICK,
clikHandler);
function clikHandler(evt:MouseEvent):void {
myEffect.removeCommand(myPattern2);
trace(myEffect.commands.length+"
commands
applied to the target object");
for(var i:int = 0; i < myEffect.commands.length;
44
i++) trace(i+" :: "+myEffect.commands[i]);
/* output:
1 commands applied to the target object
0 :: [object FECNavigateToURL]
*/
}
removeCommandByName
Removes
from
the
target
object
the
command
pattern
identified
by
its
full
path
and
class
name.
Parameters
commandName:String
—
The
full
path
and
class
name
of
the
command
pattern
to
be
removed.
Example
This
example
adds
a
navigateToURL
and
a
goToFrame
command
to
a
clip,
on
the
mouse
press
action
and
displays
the
list
of
commands.
When
a
button
is
pressed,
the
goToFrame
command
is
removed.
Create
a
movie
clip
on
the
stage,
give
it
an
instance
name
of
myClip
and
also
place
a
button
on
the
stage
and
name
it
buttonI
nstance.
Next,
from
the
Components
panel
drag
the
FlashEff2Code
component,
the
FECNavigateToURL
and
the
FECGoToFrame
patterns
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
following
code
into
it:
import
com.jumpeye.flashEff2.command.navigateT
oURL.FECNavigat
eToURL;
import
com.jumpeye.flashEff2.command.goToFrame.FECGoToFrame;
var myPattern1:FECNavigateToURL = new
FECNavigateToURL();
myPattern1.url = "http://www.flasheff.com/";
var myPattern2:FECGoToFrame = new FECGoToFrame();
myPattern2.frame =
"10";
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.addCommand(myPattern1, "release");
myEffect.addCommand(myPattern2, "release");
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
trace(myEffect.commands.length+" commands ap
plied to
the target object");
for(var i:int = 0; i < myEffect.commands.length; i++)
trace(i+" :: "+myEffect.commands[i]);
/* output:
2 commands applied to the target object
0 :: [object FECNavigateToURL]
1 :: [object FECGoToFrame]
*/
buttonInstance.addEve
ntListener(MouseEvent.CLICK,
clikHandler);
function clikHandler(evt:MouseEvent):void {
myEffect.removeCommandByName("com.jumpeye.flashE
ff2.command.goToFrame.FECGoToFrame");
trace(myEffect.commands.length+" commands
45
applied to the target object");
for(v
ar i:int = 0; i < myEffect.commands.length;
i++) trace(i+" :: "+myEffect.commands[i]);
/* output:
1 commands applied to the target object
0 :: [object FECNavigateToURL]
*/
}
removeEffect
Stops
and
removes
an
effect
applied
to
the
target
object,
while
that
effect
is
still
playing.
This
function
will
not
have
any
effect
if
it's
applied
before
the
effect
starts
or
after
the
effect
has
finished
(except
when
isTargetVisibleAtEnd
is
set
to
true
and
the
transition
type
was
hide
).
Depending
on
the
value
of
th
e
internalCall
argument,
it
can
trigger
a
FLASHEFFEvents.TRANSITION_END
event
or
not.
If
the
method
was
called
from
within
an
internal
class
or
a
pattern
object,
this
parameter
should
be
true
and
the
event
will
not
trigger.
If
the
method
was
called
from
ou
tside
the
FlashEff2
class
or
outside
the
patterns,
then
the
parameter's
value
should
be
false
(the
default
value)
and
the
FLASHEFFEvents.TRANSITION_END
event
will
be
triggered.
This
also
has
the
possibility
to
remove
a
specific
symbol
or
text
pattern
fro
m
the
target
object,
by
specifying
a
second
argument.
If
that
pattern
argument
is
not
specified,
the
method
removes
the
current
symbol
or
text
pattern
that
is
being
applied
(while
the
transition
is
going
on).
In
the
case
of
a
hide
transition,
either
on
a
symbol
or
a
text
object,
the
target
object
will
be
rendered
invisible
in
the
end,
by
the
transition.
If
removeEffect()
is
called
after
the
transition
has
finished,
the
target
object
will
be
displayed
only
if
the
isTargetVisibleAtEnd
is
set
to
true
,
otherwi
se
the
target
object
will
remain
hidden
(the
method
has
no
effect).
Parameters
internalCall:Boolean
(default
=
false
)
—
[optional]
Instructs
the
method
to
dispatch
a
FLASHEFFEvents.TRANSITION_END
event,
if
the
value
is
false
,
that
is
if
the
method
is
not
called
from
inside
a
pattern
object.
pattern:IFlashEffSymbolText
(default
=
null
)
—
The
symbol
or
text
pattern
that
should
be
removed
from
the
list
of
patterns
applied
to
the
target
object.
That
type
of
pattern
is
a
show/hide
pattern,
meaning
that
it
can
o
nly
apply
show
or
hide
transitions
on
symbols
or
text
fields.
Example
The
next
example
applies
a
hide
transition
based
on
the
Alpha
pattern
(FETAlpha),
on
a
text
field
called
myTextField.
The
hide
transition
will
be
executed
automatically,
with
a
delay
of
a
second.
By
pressing
the
button
on
the
stage,
the
removeEffect()
method
will
be
called.
In
both
cases
(button
pressed
during
and
after
the
transition),
a
FLASHEFFEvents.TRANSITION_END
event
will
be
dispatched.
Place
a
dynamic
text
field
on
the
stage,
en
ter
the
text
"The
quick
brown
fox
jumps
over
the
lazy
dog"
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
o
ption
in
the
Embed
characters
dialog
box.
Also
place
a
Button
on
the
stage
and
give
it
an
instance
name
of
buttonInstance.
Next,
from
the
Components
panel
drag
the
46
FlashEff2Code
component
and
the
FETAlpha
pattern
into
the
Library.
Bring
up
the
Actions
pan
el
and
paste
the
following
code
into
it:
import com.jumpeye.flashEff2.text.alpha.FETAlpha;
import com.jumpeye.Events.FLASHEFFEvents;
var myPattern:FETAlpha = new FETAlpha();
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.hideTransition = myPa
ttern;
myEffect.hideDelay = 1;
myEffect.isTargetVisibleAtEnd = true;
this.addChild(myEffect);
myEffect._targetInstanceName = "myTextField";
buttonInstance.addEventListener(MouseEvent.CLICK,
clikHandler);
function clikHandler(evt:MouseEvent):void {
myEff
ect.removeEffect();
}
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_EN
D, transitionEndHandler);
function
transitionEndHandler(evtObj:FLASHEFFEvents):void {
trace("The transition has ended.");
}
removeFilter
Removes
a
specified
filter
from
the
ta
rget
symbol
or
text.
It
returns
a
Boolean
value
(true)
if
it’s
successful.
Parameters
filter:IFlashEffFilter
—
The
reference
to
the
filter
pattern
created
separately,
by
code.
removeFromGroupList
Removes
one
of
the
target
objects
used
as
grouped
button
from
the
group
it
is
part
of.
Parameters
target:DisplayObject
‐
The
target
display
object
with
a
button
effect
applied.
If
the
button
is
part
of
a
group,
it
will
be
removed
from
that
group.
The
name
of
the
group
is
specified
on
the
FlashEff2
instance
appl
ied
on
the
target
display
object.
removeHideTransition
Removes
the
last
symbol
or
text
pattern
used
for
the
hide
transition.
removeShowTransition
Removes
the
last
symbol
or
text
pattern
used
for
the
show
transition.
setXML
Allows
setting
up
the
compo
nent
according
to
xml
data
passed
as
parameter.
Parameters
xml:*
—
The
XML
object
that
contains
setup
information
for
the
FlashEff2Code
component
instance.
It
can
be
either
of
type
XML
,
a
XML
object
created
by
code,
or
of
type
String
,
the
same
xml
data
pa
ssed
as
String
argument.
47
show
Applies
a
show
transition
to
the
target
object,
if
a
symbol
or
text
pattern
has
been
applied
to
it.
If
the
FlashEff2
object
does
not
have
a
symbol
or
text
pattern
applied,
it
will
not
execute
any
actions.
Parameters
forceAu
toHide:*
(default
=
null
)
—
[optional]
If
true
,
the
show
method
will
execute
a
show
transition
and
then,
force
FlashEff2
to
execute
a
hide
transition
after
the
time
interval
specified
at
hideDelay
,
even
if
hideAutoPlay
is
set
to
false
.
Otherwise,
only
the
show
transition
will
be
executed.
Example
The
next
example
applies
a
show
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The
show
transition
will
not
execute
automatically
since
the
showAutoPlay
property
is
set
to
fals
e
,
but
it
will
execute
on
mouse
click
over
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
FlashEff2Code
component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the
A
ctions
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;
myEffect.showDelay = 0;
myEffect.showAutoPlay = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
myClip.addEventListener(MouseEvent.CLICK,
clikHandler);
function clikHandler(evt:MouseEvent):void {
myEffect.show();
}
swap
Applies
the
swap
transition
b
etween
two
target
objects.
The
first
target
object
is
the
one
that
is
currently
visible
and
will
be
hidden
with
a
hide
transition
if
swapType
is
FlashEff2.SWAP_TYPE_HIDE
or
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW
.
The
second
target
object
is
the
one
that
will
be
made
visible
after
the
transition,
using
a
show
transition,
if
swapType
is
FlashEff2.SWAP_TYPE_SHOW
or
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW
.
Parameters
newTarget:DisplayObject
(
default
=
null
)
—
The
second
target
object
that
will
replace
the
current
target
object.
If
this
is
null,
then
the
object
specified
at
swapTarget
will
be
used.
swType:String
(
default
=
"")
—
The
type
of
swap
transition
applied.
If
it
is
a
blank
String
(""),
then
the
transition
type
will
be
the
one
specified
at
swapType
.
Example
48
The
ne
xt
example
uses
the
swap()
method
to
apply
a
swap
transition
between
two
text
fields,
by
pressing
on
a
button.
The
example
applies
a
show
transition
based
on
the
Alpha
pattern
(FETAlpha)
to
a
text
field
called
myTextField1
and
then
swaps
the
text
field
wit
h
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
fo
r
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,
place
a
button
on
the
Stage
and
give
it
the
instance
name
of
swapButton.
Finally,
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.t
ext.blur.FETBlur;
myTextField2.visible = false;
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;
this.addChild(myEffect);
myEffect.swapTargetInstanceName = "myTextField2";
myEffect._targetInstanceName = "myTextField1";
this.addChild(myEffect);
myEffect._targetIns
tanceName = "myTextField1";
swapButton.addEventListener(MouseEvent.CLICK,
makeSwap);
function makeSwap(evtObj:MouseEvent):void {
myEffect.swap(myTextField2,
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW);
}
transitionEffect
Starts
a
show
or
hide
effect,
according
to
the
argument's
value.
Parameters
type:String
(default
=
"
show
"
)
—
The
type
of
transition
to
be
executed.
Possible
values
are
show
and
hide
.
Example
The
next
example
applies
a
show
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
c
alled
myClip.
The
show
transition
will
not
execute
automatically
since
the
showAutoPlay
property
is
set
to
false
,
but
it
will
execute
on
mouse
click
over
the
target
clip.
49
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;
myEffect.showDelay = 0;
myEffect.showAutoPlay = false;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
myClip.addEventListener(MouseEvent.CLICK,
clik
Handler);
function clikHandler(evt:MouseEvent):void {
myEffect.transitionEffect("show");
}
Events
Event
Description
IOErrorEvent.IO_ERROR
Dispatched
when
the
FlashEff2Code
component
instance
encounters
an
error
while
the
.xml
setup
file
is
being
load
ed.
Example
This
example
sets
up
the
FlashEff2Code
component
instance
from
an
external
.xml
file
and
displays
an
error
message
if
the
.xml
file
cannot
be
read.
Create
a
movie
clip
on
the
stage
and
give
it
an
instance
name
of
myClip.
Next,
from
the
Compon
ents
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 flash.events.IOErrorEvent;
import com.jumpeye.Events.FLASHEFFEvents;
var myEffect:FlashEff2Code
= new FlashEff2Code();
this.addChild(myEffect);
myEffect.xmlPath = "setup.xml";
myEffect.addEventListener(IOErrorEvent.IO_ERROR,
errorHandler);
myEffect.addEventListener(FLASHEFFEvents.COMPLETE,
completeHandler);
function errorHandler(evtObj:IOErrorEven
t):void {
trace("Could not read the XML data !");
}
50
function completeHandler(evtObj:FLASHEFFEvents):void
{
trace("XML data loaded completely");
trace(evtObj.data);
}
FLASHEFFEvents.COMPLETE
Dispatched
when
the
FlashEff2Code
component
instance
is
set
up
from
a
.xml
file
and
the
file
has
been
completely
loaded.
The
event
object
passed
as
an
argument
to
the
event
handler
function
has
a
property
called
data
that
gives
you
access
to
the
XML
object
used
to
set
up
the
component
instance.
This
event
is
dispat
ched
before
the
FLASHEFFEvents.INIT
event.
Example
This
example
sets
up
the
FlashEff2Code
component
instance
from
an
external
.xml
file
and
displays
a
text
when
the
component
finished
reading
the
.xml
file.
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 flash.events.IOErrorEvent;
import com.jumpeye.Eve
nts.FLASHEFFEvents;
var myEffect:FlashEff2Code = new FlashEff2Code();
this.addChild(myEffect);
myEffect.xmlPath = "setup.xml";
myEffect.addEventListener(IOErrorEvent.IO_ERROR,
errorHandler);
myEffect.addEventListener(FLASHEFFEvents.COMPLETE,
completeHand
ler);
function errorHandler(evtObj:IOErrorEvent):void {
trace("Could not read the XML data !");
}
function completeHandler(evtObj:FLASHEFFEvents):void
{
trace("XML data loaded completely");
trace(evtObj.data);
}
FLASHEFFEvents.INIT
Dispatched
when
t
he
FlashEff2Code
component
completes
the
initialization
process.
This
event
is
dispatched
after
the
FLASHEFFEvents.COMPLETE
event.
Example
This
example
sets
up
the
FlashEff2Code
component
instance
from
an
external
.xml
file
and
displays
a
traced
message
w
hen
the
component
finished
initializing.
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
pa
ste
the
following
code
into
it:
51
import com.jumpeye.Events.FLASHEFFEvents;
var myEffect:FlashEff2Code = new FlashEff2Code();
this.addChild(myEffect);
myEffect.xmlPath = "setup.xml";
myEffect.addEventListener(FLASHEFFEvents.INIT,
initHandler);
function i
nitHandler(evtObj:FLASHEFFEvents):void {
trace(evtObj.target+" finished initializing.");
}
FLASHEFFEvents.DOUBLE_CLICK
Dispatched
by
the
FlashEff2Code
component
when
the
target
object
has
been
clicked
twice
(double
click
action).
Example
The
next
examp
le
applies
a
show
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The
show
transition
will
be
executed
with
a
2
second
delay
and
the
FlashEff2Code
component
instance
will
dispatch
the
mouse
events
executed
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
FlashEff2Code
component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
following
code
into
it:
im
port com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.symbol.alpha.FESAlpha;
var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.addChi
ld(myEffect);
myEffect._targetInstanceName = "myClip";
myEffect.addEventListener(FLASHEFFEvents.DOUBLE_CLICK
, dblClickHandler);
function dblClickHandler(evtObj:FLASHEFFEvents):void
{
trace("DOUBLE CLICK on target object");
}
FLASHEFFEvents.MOUSE_DOWN
Dispatched
by
the
FlashEff2Code
component
when
a
mouse
button
has
been
pressed
on
the
target
object.
Example
The
next
example
applies
a
show
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The
show
transition
will
be
ex
ecuted
with
a
2
second
delay
and
the
FlashEff2Code
component
instance
will
dispatch
the
mouse
events
executed
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
FlashEff2Co
de
component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
52
following
code
into
it:
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.symbol.alpha.FESAlpha;
var myPattern:FESAlpha = new FESAlpha()
;
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
myEffect.addEventListener(FLASHEFFEvents.MOUSE_DOWN,
mouseDownHandler);
myEf
fect.addEventListener(FLASHEFFEvents.MOUSE_UP,
mouseUpHandler);
function mouseDownHandler(evtObj:FLASHEFFEvents):void
{
trace("MOUSE DOWN on target object");
}
function mouseUpHandler(evtObj:FLASHEFFEvents):void {
trace("MOUSE UP on target object");
}
FLASHEFFEvents.MOUSE_UP
Dispatched
by
the
FlashEff2Code
component
when
a
mouse
button
has
been
released
over
the
target
object,
regardless
of
whether
the
mouse
down
action
has
happened
to
the
target
object
or
on
another
DisplayObject.
Example
The
next
e
xample
applies
a
show
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The
show
transition
will
be
executed
with
a
2
second
delay
and
the
FlashEff2Code
component
instance
will
dispatch
the
mouse
events
executed
on
the
tar
get
clip.
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.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.symbol.alpha.FESAlpha;
var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.ad
dChild(myEffect);
myEffect._targetInstanceName = "myClip";
myEffect.addEventListener(FLASHEFFEvents.MOUSE_DOWN,
mouseDownHandler);
myEffect.addEventListener(FLASHEFFEvents.MOUSE_UP,
mouseUpHandler);
function mouseDownHandler(evtObj:FLASHEFFEvents):void
{
trace("MOUSE DOWN on target object");
53
}
function mouseUpHandler(evtObj:FLASHEFFEvents):void {
trace("MOUSE UP on target object");
}
FLASHEFFEvents.ROLL_OVER
Dispatched
by
the
FlashEff2Code
component
when
the
mouse
rolls
over
the
target
object's
surfa
ce.
Example
The
next
example
applies
a
show
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The
show
transition
will
be
executed
with
a
2
second
delay
and
the
FlashEff2Code
component
instance
will
dispatch
the
mouse
eve
nts
executed
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
FlashEff2Code
component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
following
code
into
it:
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.symbol.alpha.FESAlpha;
var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.showTransition = myPattern;
myEffect
.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
myEffect.addEventListener(FLASHEFFEvents.ROLL_OVER,
rollOverHandler);
myEffect.addEventListener(FLASHEFFEvents.ROLL_OUT,
rollOutHandler);
function rollOverHandler(evtObj:FL
ASHEFFEvents):void
{
trace("ROLL OVER on target object");
}
function rollOutHandler(evtObj:FLASHEFFEvents):void {
trace("ROLL OUT on target object");
}
FLASHEFFEvents.ROLL_OUT
Dispatched
by
the
FlashEff2Code
component
when
the
mouse
rolls
out
of
the
t
arget
object's
surface.
Example
The
next
example
applies
a
show
transition
based
on
the
Alpha
pattern
(FESAlpha),
to
a
clip
(symbol)
called
myClip.
The
show
transition
will
be
executed
with
a
2
second
delay
and
the
FlashEff2Code
component
instance
will
di
spatch
the
mouse
events
executed
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
FlashEff2Code
component
and
the
FESAlpha
pattern
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
following
code
into
it:
54
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.symbol.alpha.FESAlpha;
var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.showTransition =
myPattern;
myEffect.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
myEffect.addEventListener(FLASHEFFEvents.ROLL_OVER,
rollOverHandler);
myEffect.addEventListener(FLASHEFFEvents.ROLL_OUT,
rollOutHandler);
function rollO
verHandler(evtObj:FLASHEFFEvents):void
{
trace("ROLL OVER on target object");
}
function rollOutHandler(evtObj:FLASHEFFEvents):void {
trace("ROLL OUT on target object");
}
FLASHEFFEvents.TRANSITION_END
Dispatched
by
the
FlashEff2Code
component
when
th
e
transition
of
a
symbol
or
text
pattern
has
ended.
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
s
tarts
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
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;
import com.jumpeye.Events.FLASHEFFEvents;
var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.showTransition = myPattern;
this.addChild(myE
ffect);
myEffect._targetInstanceName = "myClip";
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_S
TART, transitionStartHandler);
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_E
ND, transitionEndHandler);
function
transitionStartHandler(evtObj:FL
ASHEFFEvents):void {
trace("The transition has started.");
}
function
transitionEndHandler(evtObj:FLASHEFFEvents):void {
55
trace("The transition has ended.");
}
FLASHEFFEvents.TRANSITION_START
Dispatched
by
the
FlashEff2Code
component
when
the
transitio
n
of
a
symbol
or
text
pattern
has
started.
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
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
FlashEff2Code
component
and
the
FETAlpha
pattern
into
the
Library.
Bring
up
the
Actions
panel
and
paste
the
following
code
int
o
it:
import com.jumpeye.flashEff2.text.alpha.FETAlpha;
import com.jumpeye.Events.FLASHEFFEvents;
var myPattern:FETAlpha = new FETAlpha();
var myEffect:FlashEff2Code = new FlashEff2Code();
myEffect.showTransition = myPattern;
this.addChild(myEffect);
myE
ffect._targetInstanceName = "myTextField";
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_S
TART, transitionStartHandler);
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_E
ND, transitionEndHandler);
function
transitionStartHandler(evtObj:FLASHEFF
Events):void {
trace("The transition has started.");
}
function
transitionEndHandler(evtObj:FLASHEFFEvents):void {
trace("The transition has ended.");
}
Comments 0
Log in to post a comment