PDA

View Full Version : Preloader problems with gallery


bbruno
08-27-2008, 06:54 PM
Ok. Built a photo gallery.
http://www.royalrivergraphics.com/morningstar/flash/k_gallery.swf
Pretty simple. All works fine.

Here is my problem. Built a preloader.
http://www.royalrivergraphics.com/morningstar/flash/preloader.swf

Couple different ways of putting in the "1 of 13" pics. Just need something that numbers my frames so person has an idea of just how many photos are in the gallery. Why does it work outside the preloader but not when i load the gallery through the preloader?

Must something wrong with the preloader?

ActionScript Code:
var myMCL:MovieClipLoader = new MovieClipLoader ();
var myListener:Object = new Object ();

myMCL.addListener(myListener);

myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) { var loaded:Number = Math.round((bytesLoaded/bytesTotal) * 100);
progressBar.gotoAndStop (loaded);
} myListener.onLoadInit = function (target_mc:MovieClip) { progressBar._visible = false;

} myListener.onLoadStart = function (target_mc:MovieClip) { progressBar._visible = true;
} myMCL.loadClip("http://www.royalrivergraphics.com/morningstar/flash/k_gallery.swf", "container");