I’m building a site with a “preloader” swf that loads the “main” swf.
From there I load in the “content” swfs into a movie clip on the “main” swf’s timeline. Inside one of the “content” swfs I need to load in “sub-content” swfs and preload them. I have the preloader script on the _root timeline of the “content” swf and it works perfect when I test the movie by itself. But when I test the movie through the original preloader/main/content path nothing loads.
Here is the preloader script:
=================================================
this.loaderElements._visible = false;
// Define custom function as seen below
function preload(MyCache) {
this.loaderElements._visible = true;
// if the Cache is Loaded do the following
if (!MyCache.doneLoading) {
if (MyCache._framesloaded>0 && MyCache._framesloaded == MyCache._totalframes) {
//MyCache.doneLoading = true;
this.loaderElements._visible = false;
}
//declares the local variable ‘percentLoaded’ is equal to MyCache Loaded Bytes Divided by MyCache Total Bytes
var percentLoaded = Math.round((MyCache.getBytesLoaded()/MyCache.getBytesTotal())100)+" %";
// set up the Outputs
this.loaderElements.OutputLoaded = percentLoaded;
this.loaderElements.OutputTotal = MyCache.getBytesTotal();
//this.loaderElements.fileName = myNewSwf;
// var declares a local variable ‘Slash’
var Slash = MyCache._url.lastIndexOf("/");
// make the Output File equal my Cache URL
this.loaderElements.OutputFile = MyCache._url.substring(Slash+1, MyCache._url.length);
// make the Bar variable width equal the BarBorders width multiplied by the Percent Loaded
this.loaderElements.Bar._width = this.loaderElements.BarBorder._widthpercentLoaded ;
}
}
================================================
If anyone can target the elements differently it would be greatly appreciated.