Loading
Flix Movies into
Flash
by
kirupa chinnathambi
While Flix produces Flash files on its own
without the need for Flash, sometimes you may want to have
the movie load into Flash for some extra special effects and
interactivity. While you could directly import a Flix movie
into Flash MX (won't work!), there are more efficient ways
that work.
In this tutorial you will learn how to use
the loadMovie action to load a Flix movie into your animation:
[ press the Click Here button ]
Loading a Flix Movie into Flash:
-
Create a new document in Flash.
You may set the dimensions of your movie to anything you
want.
-
You will need a Flix SWF
file. If you do not have a SWF file handy, click
here
to download a ZIP file containing a SWF file that you can
use. I will be using the above movie in this tutorial.
-
Once you downloaded the SWF
file (if you needed to) make sure you extract the file to
the same folder containing your Flash MX document.
-
Let's go back to Flash! In
Flash, go to Windows | Library. You will see the Library
dialog box appear. Click the strange-looking symbol in the
top-right corner of the dialog box. From the menu that
appears, select New Symbol:

[ the New
Symbol command in the Library dialog box ]
-
The Create New Symbol dialog
box will appear. Select Movie Clip and press OK.
-
In your Library, you will see
the movie clip symbol you created listed. Drag and drop
that movie clip symbol from the Library dialog box and
into your working area.

[ your movie
clip will appear as a hollow circle ]
-
Select the hollow circle that
is your movie clip! In the Properties panel that appears
toward the bottom of your Flash MX window, click the
Instance Name text field and enter the instance name
flixmovie.
-
Now, create a button. Draw a
simple shape and select it. Press F8 and select Button
from the Convert to Symbol dialog box that appears.
-
Right click on your button
and select Actions. The Actions dialog box will appear.
Copy and paste the following code:
[ copy and
paste the above code into the actions dialog box ]
-
Preview the animation. Click
your button and the video SWF file will load in the movie
clip you named flixmovie.
Explanation
As usual, I will give you a brief rundown
on what the code accomplishes. The following is the code you
copied and pasted into your Actions dialog box:
on (release) {
loadMovie("qt_video.swf",
_root.flixmovie);
}
The loadMovie function is quite
straightforward. Unless you are doing something complicated
with loadMovie, you should use the Normal view and simply
plug in the data as you see fit. One word of caution
when using Normal view; if you are going to use variables or
other syntax such as _root in the URL or Target fields, make
sure you check the Expression checkbox in normal view. If
not, Flash is going to think the strange chars referring to
a variable is the actual file name and will try to load that
file without processing the actions:

[ the
Expression check box checked because data is not "normal" ]
This concludes this tutorial. This is
pretty much the only way you can get your Flix movies into
Flash. The Flix SWF does not Import well in Flash, so you
cannot do a straight-out File | Import. If you are
interested in learning more about the LoadMovie function,
check out the following great tutorials:
I hope the information helped.
If you have any questions or comments, please don't hesitate to post them on the
kirupa.com Forums. Just post your question and I, or our friendly
forum helpers, will help answer it.
The following is a list of related tutorial and help resources that you may find
useful:
|