Topic: Main preloading bar - position glitch

Hi there,

I'm having a little glitch while Flash embedding SV (with API control).

Usually when SV loads there's a simple loading bar and then the first image appears.
But when embedded I have a problem because TWO loading bars are showing up, not at the same place !

Check it out here : http://antoinegrasset.com/SV/

I think that the first loading bar (which is not centered) is the loading of the gallery.xml
and the second is loading of the image (perfectly centered) (I chose an heavy pattern as a first image to make it slow).

Can't manage to solve this issue (I have no control on this right ?).
Any idea ?

Thanks,
Antoine

Re: Main preloading bar - position glitch

The first load bar is the swf loader and is centered in the swf. The second load bar is the image load bar and is centered in the main image.

To hide the first load bar, set the loading sprite to be invisible until the 'svComplete' event is fired.

Felix Turner
SimpleViewer Support Team.

Re: Main preloading bar - position glitch

By "loading sprite" do you mean the mcLoader instance ?

Re: Main preloading bar - position glitch

yes.

Felix Turner
SimpleViewer Support Team.

Re: Main preloading bar - position glitch

Thanks !

Not managed to do it yet...
In the meantime another question just pop into my head :
is it possible to listen to any % of the loading of the first image, to create a loading effect accordingly, to create our own preload bar ?

The hiding of the loading sprite and/or the listening of it should happen here right ?

/**
* Fired when preloader is available
* Can set flashvars at this point
*/ 
function onViewerInit(e:Event):void{
    trace("onViewerInit");
    
    //listen for
    Object(svLoader.content).addEventListener("svComplete", onGalleryLoaded); 
    
    trace("setViewerFlashVars");
    var options:Object = Object(svLoader.content).embedOptions;
     //set gallery.xml url based on current galleryId
    options.galleryURL = galleryURL;    
    
}