Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image preloader?

Status
Not open for further replies.

PS1983

Technical User
Nov 6, 2001
83
0
0
AT
hi!
i just got really shocked cause i noticed how many Mb pictures i have on my homesite 8MB!!(no i'm not making a Porn homepage =)!!)

so i know i can preload pictures with e.g

Image1 = new Image(440,250)
Image1.src = "produkte/6images/gr6.gif"...

well now i'm caching like 130 pics on the index page!
is there a way to make a flash look alike preloader (loading ...) then loading the pics and when ready show the frame?
would be cool when the loading Points ... go like:

.
..
...
and so on=)

so is this possible or any other suggestions or pages with tutorials where i may look that up?

thx ladies and gents =) Pornstar
 
you can call a function that is called when your image loads ...

Image1.onload = yourFunction;

get this function to update the screen with the number of loaded images
 
ok i'll try that one thx for help =) =) Pornstar
 
flash: faq250-630
javascript (not so very good): thread216-162718 Victor
 
i love this forum!!!
its like a chat =)
helpful answers come soooo fast!
thx vic
=) Pornstar
 
glad you're enjoing to chat here :)
Victor
 
I have been working on image preloaders in javascript over the last two years, with the requirement that I need good cross browser support. Run away now while you are still sane this is a minefield ( especially if you need Mac IE support ). Also Netscape 6.1 and 6.2 on the PC have some interesting issues with items not reporting correctly when in the cache already. The best solutions seem to be Flash/Shockwave based and then get the to redirect the main page once all the preloading is done.
However Dynapi on Sourceforge has some good preloading code in it, also on Tek Tips there is a very good OO preloader in javascript "OO Javascript - Image Preloader" "thread216-95551".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top