Problem with loading an External SWF

Posted on 2001-06-14
Last Modified: 2008-03-04

I am preparing a website in Flash. The layout is as follows : A base movie, which will load smaller subject SWFs onto the base movie. The smaller swfs are self contained topical units, which will be calling sub-topical swfs later depending upon which button the user clicked.

Base Movie Details:
The base movie contains 5 parallellogram shaped buttons, which are used to load each topical swf onto the base movie. This can be accomplished in two ways: either using Levels, or using Targets.

Topical Movie Details:
The topical movie is a self contained unit, which basically uses a set of circular buttons, a small preview screen and a name display movie, for the sub-topical movie to be loaded. Whenever the user mouses over one of the circular buttons, the picture in the preview screen changes. Again, this will be used to load smaller movies using Levels or Targets.

The Problem:
I have been able to get the Topical movie working fine. Basically, it works like this: a movie clip containing pictures follows a control clip. Whenever the user mouses over a circular button, the control clip's parameters are altered, and it moves off in the x direction. The picture MC is tied to this, and faithfully follows it wherever it goes. A mask is used to show only one pic at a time. The SWF file works fine on its own.

I next tried to get this SWF into the Base Movie, using Load Movie. This is where the problems begin :(!

a. If I used Load Movie with Levels, the SWF works fine. The rollovers happen, pic is shown properly. However, the SWF is loaded at an awkward position on top of the base movie, which I don't want. I tried setting the property but to no avail.

b. I tried using Load Movie with Target. Here, I loaded the SWF into a empty MC called Viewport. I aligned it so that the SWF shows exactly where I want it to. However, the pics are no longer showing at all. I checked the Variables, and I found that the control clip in the SWF has gone to some weird location, and so the pic movie clip has dutifully followed it there. Also, most of the variables in the SWF have now become 'undeclared', and have no value. But they show up for the Topical movie, when I run that independently in Flash!

You can see the movies in action and download the source at this location:

I'd really appreciate it if somebody could help me out with this. It would be perfect if I could use Targets, since that would help me achieve control over the loaded movies. However, if somebody could suggest to me how to modify the properties of a loaded movie on a new level, even that would be fine.

And, as a bonus, if you can modify my source file/s and get them working, I'll definitely jack up the points!

Question by:shekarkr

Accepted Solution

ssdesign earned 150 total points
ID: 6197486
there is a simple solution to this one.

You should make your Base movie size as the movie size for all the .swf files that you are loading.

So alll your smaller .swf files which you want to load in the base movie will have the .fla movie size equal to your Base movie size.

Then in these files place your objects in the location where you want them to appear in your Base movie. (Take reference from Base movie).

Then when you load these movies in your Base movie they will display exaclty where you want them.

This is because when you load a movie, it takes the x and y coordinates of Base movie and places the loaded movie with its x and y coordinates at x and y of the base movie.

This is the solution for you.

I have used this method to load external movies at many places.

One example can be seen at and go to Graphic design section. Here everytime when you drag and drop the target in the right place a movie clip is loaded.

Author Comment

ID: 6201052
Hi Sajid.

Thanks for pointing me in the right direction. Actually, I was under the impression that if I create the submovie the same size as that of the base movie, when I load it, the loaded SWF would go and 'sit' on top of the base navigation menu, thus cutting it off!

Anyway, I have been able to get it working using Levels itself. Pity I couldn't get the target thing to work, since that would have cut down on the size of the submovies to be loaded.

Thanks for the response...

Best Rgds,

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now