Hungry? Join our RSS Feed

Send to a friend

Featured Videos

This tutorial will teach you some of the basics of the third part..

This is a very rare tutorial that will teach you how to use Photo..

This tutorial will teach you how to create huge print resolution ..

One of the most important stages of search engine optimisation is..

Iam going to warn you that if you’re a web developer and you watc..

Popular Tutorials

Gradient Mapping

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

Realistic Eye Animation

Create animated eyes that blink, wink and following the mouse pointer using Flash...

Creating Gradient Buttons

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

Creating a 3D Tunnel Effect in Flash

Learn how to create this very cool 3D tunnel effect in Flash using some simple 2D animatio..

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 here’s 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, let’s 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 (0)

Comments:

Author:  

What colour is the sky?

More Content

Clean your CD's/DVD's with toothpaste!

Clean your CD's/DVD's with toothpaste!

The low-cost answer to keeping your CD's/DVD's clean and functional...

Internet Explorer CSS bug fixes

Internet Explorer CSS bug fixes

Fixes for some of the most common CSS bugs in internet Explorer..

Web Development Guide

Web Development Guide

A large selection of expert tips and advice to help you design and market the perfect web ..

Building your website with includes

Building your website with includes

Using server side includes to design and code your web site allows you to keep your develo..

Ideas for Business Card Layouts

Ideas for Business Card Layouts

Heres a few ideas for those struggling to come up with professional business card designs,..

Graphics Design Guide

Graphics Design Guide

The second in a series of help and reference guides, this one covers graphics design and h..

 Subscribe to our feed

Send to a friend