Flash question - Can you force it to load last?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Flash question - Can you force it to load last?

Post by onion2k »

On a new site I'm working on there's a whopping great Flash movie on the index page. When a user hits the page for the first time obviously the HTML loads, then the Flash and images. Most of the time about half the images load, then Flash movie starts streaming in, and while that's running the rest of the images slowly load. It'd look a lot nicer if the Flash movie loaded last. The problem I have though is that the page needs to work without Javascript. Otherwise this would be simple. What options are open to me?
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Flash question - Can you force it to load last?

Post by Jonah Bron »

Maybe make the movie not start loading until after a few seconds? Just curious, how would one delay the load with Javascript?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Flash question - Can you force it to load last?

Post by John Cartwright »

All I can think of is the use of javascript and settimeout() to add the player to the container after x seconds. :banghead:
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Flash question - Can you force it to load last?

Post by pickle »

I'm not sure it is possible without Javascript. You could unobtrusively use JS by changing SRC of the <embed>/<object> tags to something fake when the DOM is ready, then change it back to the legitimate SRC once the page is fully loaded. It would still look like it currently does for non-JS users, but look nicer for those that have it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply