SyNow.org Web Site Design & Web Hosting Tutorials


Articles

Domain Name Registration - Free Web Hosting Email Tips and Tricks -  Home Based Web Business - Work at Home - Chat Rooms  - Voice Chat - Cell Phone - Phone Calls - Love Dating - Online Dating Services


 

Macromedia Flash >> ActionScript  >> Flash 5: Using Load Movie

Flash 5: Using Load Movie

Version: Flash 5
Source Files: Download
Objectives: Using Load Movie to load external movies as part of a Flash website.
Tools & Techniques: Load Movie, levels, buttons

This lesson will demonstrate how to load external Flash movies. A major benefit of loading external movies is file size. By loading only the movies you or your visitors want to view, you can keep your initial movie size considerably lower. For example, in this tutorial we created a sample Flash website with separate, external movies for the About, Product, and Contact sections.

If a viewer only wanted to view the info on Products, he/she can click the Products button and that info will load without having to wait for the other areas to load as well. This technique is great for larger, more content-rich movies.

We'll assume you know how to create a basic Flash movie for this lesson.

Step 1: Create several flash movies

I used 5 movies for this example

  1. Create one main movie to serve as the "container" or background movie
  2. This movie will always remain at Level 0 and we'll load the other 4 movies on top of it at Level 1

Step 2: Open the movie you want to use as the background or main movie

This will be the movie that you use to load the other movies on top of. In my example, it's "loadmovie.swf"

I don't have any buttons on this movie, only graphics and some text. Instead of using a button to load the first movie, I'm going to apply a frame action that loads the first external movie when the movie begins.

Step 3: Create the Load Move action at Frame 1

  1. To load the first movie when the main movie is launched, create a frame action that loads the movie.
  2. Click in Frame 1 of the background movie and in the Basic Actions Panel, click Load Movie. The loadMovieNum action appears in the first line.
  3. In the URL field, type in the exact name of the first movie you want to load. In my example, I typed in: main.swf. This is the path to the movie so be sure to type the path correctly. I'm using relative paths here to keep things simple.
  4. For Level, choose any number greater than 0. Level O is where the background layer is stored so you want to load your other movies on top of it. You can load the other movies into Level 0 but it will replace your current background movie. There are times when that's more appropriate, but in this example, we'll just load the other movies in Level 1, above our main, background movie.

 Be sure to include the ".swf" extension. Keep the Expression box unchecked.

The Framerate of the original movie is the framerate all other movies will play, regardless of their individual settings.

Page 1 | Page 2 | Page 3

Domain Hosting | Dedicated Servers| Link Exchange Directory