PDA

View Full Version : banner should load after html site that embeds it


miiiriam
03-07-2005, 08:01 PM
Hi,
I created a flash banner. What I promised the client, though, was that it wouldn't interfere with the site's loading. I imagined the surrounding text would load much faster anyway. But looking at the site now it seems to load the banner first. It wasn't my job to embed the file into the final dreamweaver doc, but I wanted to at least recommend them a way of doing it, so that it has the effect the client wanted.

Is there a way to hold off the loading of the swf until it finished loading?

(The banner runs a preloader upfront so that it doesn't start prematurely but that of course doesn't include the loading of the html.)

tg
03-07-2005, 09:22 PM
have a javascript function that actually writes out the <object> & <embed> tags.
trigger the javascript function on the 'onLoad' event for the html document. that way the flash piece wont be written/embedded into the page until after the page has been loaded.

miiiriam
03-08-2005, 05:30 PM
sweet, I knew there would be a way around it. Thanks TG. The problem is I know no javascript, I only use the little javascript dreamweaver generates in my pages. Could you elaborate a little on this issue? If I knew some key javascript commands to use for this I could probably look it up somewhere.

Thanks anyway.

miiiriam
05-12-2005, 10:06 AM
could somebody help me out with the javascript for this? I know no js whatshowever to try out what tg proposed. (Thanks tg)