 |
 |
   |
 |
|
| Load,
Unload and Chain Wild FX Flash Text
Effects in Macromedia Flash 5 |
 |
 |
| Contents
|
 |
 |
 |
| Part
4 |
 |
| Why
Levels Aren't As Useful |
 |
|
Still in Flash:
- Save As loadtest with
the name loadtest1. Delete
the empty_clip from the stage.
Double-click on the first frame
of the movie. Once again, the Frame
Actions appears. Type or paste:
loadMovieNum ("ani1.swf", 1);
This line of code loads ani1.swf
into _level 1 of the main movie.
- Click Control, and choose Test to
see the effect load. No problem!
Now how to unload it if you want
to take it off the stage? Since
ani1.swf does have that end variable
in it, it seems as if you could
re-use the previous code above
to check for the variable and unload
it. You might think about using
code like this:
loadMovieNum ("ani1.swf", 1);
if (_level1.end == true) {
unloadMovieNum (1);
endif;
}
Or can you? Try it
if you have the time. You'll see
it doesn't work. Why not? Because
when loadtest goes through the frame
action, end isn't yet true. And because
we're not looping loadtest, the movie
never gets back to the code to see
if end has become true. At this point
you might say, ok, well let's add
a second frame with a gotoAndPlay(1)
on it.
But that doesn't work
either, as you can see by trying
it. We could unload ani1.swf
from the level by loading something
else in its place, but it's not as
easy as using the movie clip!
This is why using movie
clips is the preferred method - they
loop on one frame and it's so easy
to use onClipEvents to load and unload
whatever you need! Further, what
if you wanted to resize ani2.swf,
or change its _alpha? How would you
do that with all those key frames
scattered over all those levels?
Take a look at ani2.swf with the
Debugger running by clicking Control and
choosing Debug Movie, and
you'll see how many submovie clips
and stuff are involved! It can be
done of course, but why work so hard
if you don't have to?
Now you can see the
usefulness of the movie clip as a
container, because it's so easy to
tell a movie clip what to do. If
you just need to toss several effects
into a larger movie, let 'em play,
and then forget about 'em, it's ok
to load them into levels. But
if you need to do anything else to
them, levels just aren't handy.
|
 |
| Top |
 |
 |
| Part
5 |
 |
| Changing
the _X and _Alpha of the Movie Clip |
 |
|
When you see how simple this
really is, you'll want to weep with
joy. Let's start a new movie to show
quickly how easy it easy to change
properties of our effects when they're
in a movie clip. And we'll easily change
the x and alpha of our effect. Remember,
when we made the effect in Wild FX
we set its x to 20.
- Create a New movie. Create
a new movie clip and again name it empty.
Drag an instance of it onto the stage
and name it empty_clip. Double-click
on the first frame to open Frame
Actions. Set the dialog to Expert
Mode and type or paste:
with (empty_clip) {
loadMovie ("ani1.swf", 1);
_alpha = 50;
_x = 300;
}
with is the Flash 5 equivalent of
tellTarget, but it does a little
more. The main difference between
the two is that tellTarget requires
a target path and can't target objects.
with also allows you to handle multiple
properties of a movie clip in script
with less code and to do it more
easily.
- Test the movie and see how
ani1.swf looks now. It has that nice
faded alpha look and has been moved
over to the left.
|
 |
| Top |
 |
 |
| Conclusion |
 |
| Ok, so now you can load your Wild FX
effects into levels or movie clips, unload
them, time them, set variables in them,
and change their properties. You're a
manipulative genius. You should be well
on your way to see how you can create
more complex effects! Good luck! |
 |
 |
| This tutorial was written
by FR Elkins. |
| | Page
1 | Page
2 | Page
3 | Page 4 |
|
|
 |
   |
| |
| ©2007
Wildform, Inc | Policies | Contact
Us | Newsletter
Options |
| |
|
| ©2010
Wildform, Inc | Policies | Contact
Us | Newsletter
Options |
| |
| 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.
|
|
|
 |
 |
|