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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

840 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