This
tutorial shows explains how to preload and use Wildform
Wild FX animated Flash text effects as buttons
in a menu and is meant to explain the FLA listed
above. Here is the swf of the FLA that will be
discussed:
In
the first frame of the main timeline, define
the names of the external .swf files that will
need to be loaded. You will find the following
actionscript:
Set Variable: "swf1" = "external1.swf"
Set Variable: "swf2" = "external2.swf"
Set Variable: "swf3" = "external3.swf"
Set Variable: "swf4" = "external4.swf"
You are not bound to use this numeration, but
remember that the Movie Clip containers (see
explanation below) will search for the value
of Wild FX (where X is the number) according
to their instance name (e.g. external2 or external7
etc). If you have not defined this particular Wild
FX value, the movie will `hang'.
In the next 3 frames you see a simple system
/ loop, which checks if the main movie is completely
loaded. If it is, then it plays label "go".
In
the following frames, the Movie Clip "external" is
placed as many times as you need to show/load
external .swf's. The instance names are named
numerically (i.e "external1", "external2")
and will load the external .swf based on its
name.
Flash uses a substring actionscript to see what
the name is and loads the value of swf + 'that_number'
where 'that_number' is the number of the Movie
Clip instance. For example, "external4" will
load the value of "swf4". Since you
defined these values in frame 1 of the main timeline,
it will read this value and load this particular
.swf file.
Notice that the swfs appear on stage/keyframe
in sequence. The preloading system is based on
this order. The MC 'external' is a self-preloading
movieclip. You should not start more than one
moveiclip on the same keyframe because every
clip does the following:
pauses the main timeline
waits until the appropriate external .swf
is loaded
tells the main timeline to continue playing
If you start more than one at the same keyframe,
then it will start the main timeline as soon
as one of the clips is loaded. This might lead
to effects not showing up when they are told
to (see the next step) because they may not have
been fully preloaded.
In
the main timeline, to start one of the external
.swf's when you roll over one of the buttons,
simply add the actionscript telling it to play.
For example button 3 (Contact) has the script:
On (Roll Over,
Drag Over)
Begin Tell Target ("/external3")
Play
End Tell Target
End On
This tells the MovieClip "external3" to
play. The buttons can also be set to show the
external effects when clicked instead of when
moused-over. The way the external .swf appears
(movement/alpha etc) can be edited inside the
MovieClip "external".
Wildform
provides a 100% satisfaction guarantee on all our Flash software.
If you are not completely satisfied with our Flash multimedia software
for any reason you may request a refund within 15 days
of purchase.