Flash question - Can you force it to load last?
Moderator: General Moderators
Flash question - Can you force it to load last?
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?
- 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?
Maybe make the movie not start loading until after a few seconds? Just curious, how would one delay the load with Javascript?
- 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?
All I can think of is the use of javascript and settimeout() to add the player to the container after x seconds. 
Re: Flash question - Can you force it to load last?
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.