Featured Videos

Even with its limited tools and palette, someone has managed to d..

Learn how to use the Photoshop lasso tool to great effect allowin..

This tutorial will teach you some of the basics of controling mov..

A very easy photoshop tutorial that shows you how to create a stu..

Here's a great tutorial for beginners to modeling in 3D Studio Ma..

Popular Tutorials

3D Hologram Effect

An extension to the Iris Porthole effect that incorporates 3D animation, to create a reall..

Creating Gradient Buttons

In this crazy new world of web 2.0 some designs call for some bright, shiny gradient butto..

Iris Porthole Door Animation in Flash

Very cool effect that could be used for an intro or as an enter button for any web site...

Futuristic city, 3D techniques in Flash

See the tricks behing the advanced Flash animation that was used to bring this futuristic ..

Setting position of an external SWF file in Flash

 

Loading an external SWF, levels in Flash

For those who don't even know about loading external flash files here's a quick explanation.

You basically start with your main or parent flash movie, now when working with multiple movies you have to remember that each movie including the parent is situated in its own level within the flash environment. The main thing to remember is that all parent flash movies (i.e. the main mo vie from which you wish to load external movies) is running on the _level0. So for example every time you add the action play(); to a frame you are in the eyes of the flash world actually doing this

_level0.play();

When loading a movie into flash you are asked to input the path to your movie for example external1.swf and the level in which you want this to be loaded into:

LoadMovieNum("external1.swf",2)

The above action script will load the external1.swf into _level2 of the flash environment, so after reading the above the way in which you control these movies should be pretty obvious, if not here's some examples:

Once you've loaded the movie with

LoadMovieNum("external1.swf",2)

You can control it like so:

_level2.gotoAndPlay(25);

if (_level2.variable=="yes") {
_level2.play();
}

 

Set the position of an external SWF

As some of you may have noticed when you load an external swf into your flash movie it will always be positioned to the top left of the parent clip. This is all well and good for most tasks but heres how you can set the position of a loaded SWF."

First you will need to create a new movie clip (drawing something in this clip like a simple shape or cross will help you with positioning in the final stage)

Now give it an instance name, lets say for this example we call it "Testing"

Next right click on the frame containing our new "Testing" movie clip and go down to the Actions menu. Now this is the part where we would normally add in some action script similar to this:

LoadMovieNum("external1.swf",2);

But because we now want to insert our external clip into our "Testing" movie clip you must use the following action script instead:

Loadintomovie("external2.swf","_level0.Testing",2);

That's pretty much it, all you need to do now is move the "Testing" movie clip to where you want your external movie to appear.

Comments (4)

hello, when i load an external movie "contat _form.swf" into a placeholder movie resided in my main movie, all combobox componets of the external movie wont work. i know that the movies are all loaded into _level0 caus i dont use loadMovieNum. when i load the "contact-form" into _level1 of the placeholder movie it appears in the upper left corner but the comboboxe work. i tried to use _level1._x and _y in the main, in the placeholdr and in the contact movie but it wont work. what am i doing wrong?

Posted by: anonymousshame on 07/08/2008

AS is case sensitive. If won't work. Its if. ;)

Posted by: UnknownFury on 19/07/2008

This works, follow carefully, thanks

Posted by: Anonymous on 17/06/2008

'Loadintomovie ', that doesn't work + there's a comma in the wrong place.. try this: _level0.Testing.loadMovie("external.swf", 2)

Posted by: smartypants on 27/05/2008

Comments:

Author:  

What colour is the sky?

Related Content

Creating Gradient Buttons

Creating Gradient Buttons

In this crazy new world of web 2.0 some designs call for some bright, shiny gradient butto..

Creating Dinosaur or Dragon Skin Textures in Photoshop

Creating Dinosaur or Dragon Skin Textures in Photoshop

This texture tutorial will teach you how to use some simple effects and filters in Photosh..

Flash Firework Frenzy

Flash Firework Frenzy

Create a realistic particle based firework display using Flash. This technique was once us..

Futuristic city, 3D techniques in Flash

Futuristic city, 3D techniques in Flash

See the tricks behing the advanced Flash animation that was used to bring this futuristic ..

Gradient Mapping

Gradient Mapping

How to transform a standard photograph for use with a specific colour scheme or brand imag..

Recommended Sites

 Subscribe to our feed

Send to a friend