PDA

View Full Version : Please please help me with a blimmin Preloader problem!



Reverend
February 7th, 2007, 10:04 AM
Hi all

First post... I'll try to explain carefully what I need...

I've built an animated movie for a website,

The client wants a preloader. No problem right?

Nope. They specifically want a SEPERATE preloader which will sit in "index.php". This will load the Main.SWF in the background while the user watches the loader animations.

Then when the Main.SWF has finished loading, the Preloader.SWF will redirect to a new PHP page, "welcome.php". It's that page, welcome.php, that actually has the Main.SWF embedded.

ie. I cannot use a 'holder' and load Main.SWF into the preloader.SWF file - the browser MUST open a whole new page.

How can this be done?

Please help I'm pulling my hair out here! :hangover:

duncanhall
February 7th, 2007, 11:08 AM
On index.php have a preloader, say loader.swf. This swf contains a movieClipLoader which loads main.swf but does not display it (ie just set the visibility of the containing mc to false). Then, in the onLoadComplete method of the movieClipLoader, just call the getURL function to redirect to welcome.php where main.swf will be loaded instantly as it will have been already loaded into the browsers cache.

Reverend
February 7th, 2007, 11:16 AM
If that works, you're my favourite person so far today :)

duncanhall
February 7th, 2007, 11:20 AM
What do you mean IF?!

It definately will work, there's no reason it shouldn't. If it doesn't, I think it's just because Adobe hates you. :P

Reverend
February 7th, 2007, 12:57 PM
Dude

It worked great - thank you very much indeed.

Here it is (basic loader at tthe mo but that's an 'in progress')

http://www.fishgraphics.co.uk/mazda2/

duncanhall
February 7th, 2007, 01:18 PM
Damn, I was hoping for a reply something along the lines of "Why does Adobe hate me....?"

That second swf looks nice, be interested to see the finished project.

Reverend
February 7th, 2007, 01:40 PM
lol, I don't know why Adobe hates me - but they must, or they wouldn't keep screwing up Adobe Illustrator so badly :)

Thanks for your help with this one. I'll try to remember to post the final version when it's done. It's actually only ever going to be a portal to further PHP pages - to click on the mountains for instance will go to a 'resources.php' page which has just a static image as a background. Unfortunately it's never going to be on a public website either as it's for the client's intranet site - which will only be used by dealers.