I have a flash file (a flash navigation bar actually, which gets loaded in all the webpages inside the website). What I am trying to do is place an external swf file on it in a desired position when the corresponding page is being loaded.
I am using FlashVars (variable name -> ‘movieName’) to pass the name of the movie clips. These variables are read by the navigation swf file and the corresponding swf file should be loaded in the area specified. Now, to create a container, I am using createEmptyMovieClip() method which will host all the external swf files.
The swf files are all being loaded but with a lot of problems. First, no matter what I try, the swf file comes at a fixed place (which is way off from where it is supposed to be). I have tried checking if the container loaded the movie before fixing its position but it changed nothing. Although it did change the position of a weird background colour box I am getting when the movie starts loading - which brings me to the second problem.
A rectangular box flashes once when the external swf is loaded, and its position is being affected by whatever I am setting the _x & _y values of the container movies to. I have no idea why it is happening as it doesn’t happen when I test that swf seperately.
Lastly, the swf content loads as zoomed out (font sizes all smaller) but the total movie size (dimensions) is the same. Moreover, everything outside the stage of the swf (a couple of anitmations which move crisscrossing the screen) is visible !
I have tried everything I can get my hands on the net. Searched Kirupa for a previous victim of this problem but nada. Will really appreacite if anyone can help me out on this one. The code used (its on the first frame of actions layer in the main flash file) to load the swf is below:
var movieLoader = new MovieClipLoader();
this.createEmptyMovieClip("blank_mc",this.getNextHighestDepth());
var myListener = new Object();
myListener.onLoadInit = function (blank_mc:MovieClip) {
blank_mc._x = -80;(--putting anything here doesn't change the position
blank_mc._y = -80;(of swf, only the initial flashing box--)
}
movieLoader.addListener(myListener);
movieLoader.loadClip(movieName,blank_mc);
stop();
One more thing, there are two more flash files on the page which loads up. I don’t think that is messing up the loading but just in case.
Thanks