Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Melrose

Suspended
Original poster
Dec 12, 2007
7,806
399
I have searched high and low trying to find a javascript preloader for SWF files - I've seen it done with Shadowbox in a popup layer, but is there any way to have it done on the page itself when they visitor loads it for the first time?

I've been all over Google the better part of this morning trying various methods but can't seem to find it..

Any help is greatly appreicated! Thanks :)
 
I don't think Shadowbox is preloading anything, at least from the way it shows a loading message before it shows the item.

Image preloading with JavaScript is done by creating a new image tag and assigning the src attribute. The same technique might work for swf files. I've never tried.
 
I was wandering how sites made those pop-up windows do that, here is what I found.

1. Shadowbox.js - http://mjijackson.com/shadowbox/ Does not appear to have the little pre-load image like you want.

2. Lightbox JS - http://www.lokeshdhakar.com/projects/lightbox/ - Sample Images have a preloader bar not sure movies.

3. Lightwindow v2.0 - http://www.stickmanlabs.com/lightwindow/ - Sample Movies had a preloader.


I will keep looking and see if I can find something to answer your question about the pre-load on the html pages.
 

Attachments

  • preload_Images.png
    preload_Images.png
    79.3 KB · Views: 272
  • pre_load_video.png
    pre_load_video.png
    131.5 KB · Views: 259
the Lightbox I've used before - it really is a great tool for portfolios and galleries, but it doesn't provide a preloader for the items on the page, you have activate the popup first to get to the preloading content.

I've seen it done with images (preloader shown on the static page while the content loads) but was wondering if it can be done with an SWF file. It would make sense it could, since I've seen preloaders for AJAX-imported text content.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.