Can't make my animation invisible when large swf download completes
Hi All,
I have a website that loads a large gallery .swf in the background. If you navigate to gallery before the download I have a small loading animation (on main timeline, on the gallery frame 7) while you wait. The gallery fits snugly over the loading animation so you don't see it anymore.
It's a rollover gallery that changes image when you rollover different buttons.
The problem is that you can see the loading animation underneath in the split second the images change and it looks like a glitch.
Here's the site: www.ithacaviews.com.au
I have tried to make the load animation invisible when the gallery.swf completes download but can't work out the correct code for this.
Here's the code I use to show the gallery on download complete (code is in main timeline actions layer frame 1):
stop();
//make gallery invisible in this frame, but visible in frame 7 (gallery button)
stage.addEventListener(Event.ENTER_FRAME, galleryShowHide);
function galleryShowHide (event:Event):void
{
if(currentFrame == 7)
{
galleryLoader.visible = true;
}
else
{
galleryLoader.visible = false;
}
}
var galleryLoader:Loader = new Loader();
galleryLoader.load(new URLRequest("gallery.swf"));
galleryLoader.contentLoaderInfo.addEventListener(E vent.COMPLETE, galleryLoaded);
function galleryLoaded(event:Event):void
{
addChild(galleryLoader);
}
I tried this but with no luck:
stage.addEventListener(Event.ENTER_FRAME, preloaderShowHide);
function preloaderShowHide (event:Event):void
{
if(galleryLoader.complete = true)
{
load_mc.visible = false;
}
}
Any helpers out there?