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
Comment Utility
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

Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

744 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

10 Experts available now in Live!

Get 1:1 Help Now