Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Problem with loading an External SWF

Posted on 2001-06-14
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

ssdesign earned 450 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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,…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
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.

704 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