![]() |
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Title:
Load Movie In this toturial, you're going to learn how to load external swf files to your main swf and set a specific position for it. A Flash file consists of different levels. The main file is considered Level 0. Imagin the level as one of Photoshop layers on which you can have different objects. In this case, levels can hold your different swf files.
LoadMovie action is a simple one, here's an example of how it looks like: loadMovieNum("yourfile.swf", 1); That action loads a file called yourfile.swf and places it on level 1.
Now the question is, where is that movie going to be positioned on the main movie clip? Can we force the loaded movie to be placed wherever we want?
This tutorial is going to answer that. We're going to do that following 2 methods, one with Flash5 and the other with FlashMX.
|
||||||||||||||||||||||||||||
Using Flash 5 1: Even if u are using Flash MX, I highly recommend you understand the mothod used for Flash 5 as this will give you a better idea of how it works.
We are going to use a movie clip on the main file and use it as a target to be replaced by the loaded movie.
2: Ok, good. Now right-click the button for loading a movie, go to actions and add the following action:
What does that do?
Now observe Fig 2, here's what happens normally:
If you click the movie clip on the stage, you'll notice a ( + ) in the middle. The top left of your external movie will be placed in the center of the Movie Clip on the main stage, as shown in Fig 2
The horizontal ruler represents the X value, and the vertical represents the Y value. You can choose wherever you want your loaded movie to be placed by changing those values!
Now only thing is left is to remove the circle from the movie clip, you don't want your movie to start with a weird circle in the middle. So, double click the movie clip, and remove the circle from the movie clip. We could have started by creating an empty movie clip anyway, but like i said this was just for demonstration.
on (release) {
Using FlashMX On the next page we will see how simple this can be when using Flash MX :)
|
Fig 1
Fig 2
|
|||||||||||||||||||||||||||
AEvision
Tutorials 2.1 - All rights reserved AEvision
Designs 2002-2007 |
||||||||||||||||||||||||||||
Icons
provided by iconpacks.com |
||||||||||||||||||||||||||||