PDA

View Full Version : 1 swf preloading another, only works in IE on PC


someoneelse
11-28-2006, 01:28 PM
i apologize in advance if i should have posted this in the components category. i wasn't really sure where my thread fits in, but I really hope someone out there has dealt with this or can provide me some help/insight!

We have 1 swf file that is almost 4 mb. I have broken out the initial preloader to be it’s own file (it is 36 Kb). This file has the loader and progress bar components in it, and it is preloading the swf file that is close to 4 megs. I am sure the code to preload the other swf is correct; I can see the loading count all the way up to 100% and then it uses getURL to go to an html page that holds the larger swf (close to 4 megs), that has already been preloaded.

This works beautifully on PC in IE. I decided to check it on the MAC and the initial page comes up, and I can see it loading the second swf. When the second swf is loaded, and the getURL command is called, I see the introduction sequence of the second file. After this finishes, I “should” see the site. However, all I see is the background picture of the SWF. I do not see any buttons, any content, any movie clips, all I can see is the background image everything else is placed on top of. Wondering what I had done wrong, I checked it in Firefox on my PC and got the same results.

(Maybe a little background on the second swf file: The large swf file has 3 or 4 scenes, an intro scene, the main content scene, and a few other scenes that are called by parts of the movie. It is not small, and it is not 1 scene)

My confusion comes in a) why the intro sequence is there (completely) but when it goes to the next scene of the second swf, I don’t see anything but the bg image and b) what I have done wrong to make this work on a PC in IE, but not a PC in Firefox, and why not at all on a Mac.

Before I tried this new preloader, the file worked just fine on MAC/PC, any browsers; so it must be related someway to my preloader. The code I am using in the initial file to preload the 2nd swf is as follows:

myLoader._visible = false;
// Create a listener object event function. The progress bar is an object so it needs an object function to work
//myProgressBar._visible=false; //hide the prelaoding bar for the real site
myProgressBarListener = new Object();
// When the progress bar is complete and has preloaded the loader component content, the listener will call and run this code below:
myProgressBarListener = function (eventObject) {
// Hide the progress bar now as we don’t need it any more
//myProgressBar._visible = false;
myProgressBar.setStyle("themeColor", 0x385A67);
getURL("records.asp");
// Closes the above function
};
// Sets whether the content being loading into the loader component scales to fit the loader (true), or the loader scales to fit the content (false)
myLoader.scaleContent = true;
// Set the location of the content to be loaded. Examples are:
myLoader.contentPath = "records.swf";
// Declares a listener that detects when the progress bar component has loaded the loader component content and is complete. Then calls the function myProgressBarListener
myProgressBar.addEventListener("complete", myProgressBarListener);
// Set up the progress bar component variable to polled mode which determines the maths behind the % counter.
myProgressBar.mode = "polled";
// The location of the Loader Component
myProgressBar.source = "myLoader";
// Sets the conversion to 1. This basically means the component divides the current and total values loaded and to be loaded. Then it floors them (works out the difference between them) and displays the converted value in the label property
myProgressBar.conversion = "1";
// Set the label to display the word 'loading' followed by the percentage value loaded so far
myProgressBar.label = "LOADING %3%%";
// The direction the progress bar moves when loading
myProgressBar.direction = "right";
// The location of the label that displays the percentage loaded so far
myProgressBar.labelPlacement = "bottom";
// Stops the Playhead in the current frame until the Movie has been preloaded
//stop();