Flash Components      Flash Menu      Flash Gallery      Flash Slideshow      FLV Player      Flash Form      MP3 Player      PhotoFlow      Flash CMS      3D Wall      Flash Scroller
 tutorials:
  Flash 8
  Flash MX 2004
  Flash MX
  Flash 5
  ActionScript
  Graphics | Motion
  PHP and XML
  Web Technologies
    Swift 3D
  Review
  Tutorials
  Help
   
 
 

 

 

 

 

 
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:

  1. Create a new document in Flash. You may set the dimensions of your movie to anything you want.
     
  2. 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.
     
  3. 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.
     
  4. 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 ]

  1. The Create New Symbol dialog box will appear. Select Movie Clip and press OK.
     
  2. 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 ]
 

  1. 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.
     
  2. 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.
     
  3. 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 ]

  1. 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:

How to use the Forums
New, Upcoming, and In-Progress Tutorials
How to Help out kirupa.com
Writing Tutorials
 
Cheers!
Kirupa Chinnathambi
kirupaBlog

 

 


kirupa.com's fast and reliable hosting provided by Media Temple. flash components
The Text Animation Component for Flash CS3
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.
Check out our high quality vector-based design packs! Flash Effect Components
flash menus, buttons and components Digicrafts Components
The best flash components ever! Entheos Flash Website Templates
Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com Purchase & Download Flash Components
flash components Free Website | Make a Website
Streamsolutions Content Delivery Networks Learn how to advertise on kirupa.com