Thought some of you might be interested in this.
I've not seen any mention of OO Javascript on this forum - yet it's simple and flaxible.
Here's a little example. Image preloading is very simple - just load the blighters into an array and Robert is your Mother's Brother...
Yet - how many times have you seen a flashy effect started before the images it uses are loaded? Looks pretty crummy really
With this script you can:
1: preload specific sets of images depending upon your requirements as and when you need to
a. when the page has loaded
b. on user action however you code it
2: trigger actions
a. on each or any image on load
b. or wait until they all load and then trigger something
c. don't trigger anything
3. at any time you can check on progress of loading when you need to - the example I used was a slideshow - you don't want the user to be able to page past the slides which have been loaded.
4. there's a progress bar using RoyW 's JSFX_Layer.js to show...well...progress.
5. to create an ImageLoad object: myobject = new JSFX.ImageLoad("Text to show in bar", imageArray, Xpos, Ypos, Width, Height, foreColour, backColour, either array of command/nulls for each image on load or command to execute at end );
6. it works in NS and IE - though I didn't make the slideshow work in NS for the demo
The demo page isn't a work of art but attempts to show it in action:
Image Preloader Object Demo Page:
Stephen C-E
I've not seen any mention of OO Javascript on this forum - yet it's simple and flaxible.
Here's a little example. Image preloading is very simple - just load the blighters into an array and Robert is your Mother's Brother...
Yet - how many times have you seen a flashy effect started before the images it uses are loaded? Looks pretty crummy really
With this script you can:
1: preload specific sets of images depending upon your requirements as and when you need to
a. when the page has loaded
b. on user action however you code it
2: trigger actions
a. on each or any image on load
b. or wait until they all load and then trigger something
c. don't trigger anything
3. at any time you can check on progress of loading when you need to - the example I used was a slideshow - you don't want the user to be able to page past the slides which have been loaded.
4. there's a progress bar using RoyW 's JSFX_Layer.js to show...well...progress.
5. to create an ImageLoad object: myobject = new JSFX.ImageLoad("Text to show in bar", imageArray, Xpos, Ypos, Width, Height, foreColour, backColour, either array of command/nulls for each image on load or command to execute at end );
6. it works in NS and IE - though I didn't make the slideshow work in NS for the demo
The demo page isn't a work of art but attempts to show it in action:
Image Preloader Object Demo Page:
Stephen C-E