icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old March 11th, 2005, 10:21 PM   #1 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in May 2004
142 posts
Gave thanks: 0
Thanked 0 times
Angry Script Help

Hello i just got this image preloader script and i got an error with it when it gets to like 99% it dosnt do anything. you can see for yourself at www.ninechat.com

The code for the script is:

Quote:
<html>
<head>
<title>Loading Images</title>

<script language="JavaScript1.1">
<!-- begin hiding

/*
Preload Image With Update Bar Script (By Marcin Wojtowicz [one_spook[at]hotmail.com])
Submitted to and permission granted to Dynamicdrive.com to feature script in it's archive
For full source code to this script and 100's more, visit http://dynamicdrive.com
*/

// You may modify the following:
var locationAfterPreload = "http://www.ninechat.com/index.php" // URL of the page after preload finishes
var lengthOfPreloadBar = 150 // Length of preload bar (in pixels)
var heightOfPreloadBar = 15 // Height of preload bar (in pixels)
// Put the URLs of images that you want to preload below (as many as you want)
var yourImages = new Array("http://www.ninechat.com/images/banner.jpg", "http://www.ninechat.com/images/banner.jpg",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_home.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_search.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_members.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_calendar.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_downloads.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_arcade.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_affiliates.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_rules.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/atb_help.gif",
"http://www.ninechat.com/images/members.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/nav.gif",
"http://www.ninechat.com/admin1.gif",
"http://www.ninechat.com/admin2.gif",
"http://www.ninechat.com/admin3.gif",
"http://www.ninechat.com/mod1.gif",
"http://www.ninechat.com/mod2.gif",
"http://www.ninechat.com/mod3.gif",
"http://www.ninechat.com/member1.gif",
"http://www.ninechat.com/member2.gif",
"http://www.ninechat.com/member3.gif",
"http://www.ninechat.com/html/avatars/1.gif",
"http://www.ninechat.com/html/avatars/2.gif",
"http://www.ninechat.com/html/avatars/3.gif",
"http://www.ninechat.com/html/avatars/4.gif",
"http://www.ninechat.com/html/avatars/5.gif",
"http://www.ninechat.com/html/avatars/6.gif",
"http://www.ninechat.com/html/avatars/7.gif",
"http://www.ninechat.com/html/avatars/8.gif",
"http://www.ninechat.com/html/avatars/9.gif",
"http://www.ninechat.com/html/avatars/10.gif",
"http://www.ninechat.com/html/avatars/11.gif",
"http://www.ninechat.com/html/avatars/12.gif",
"http://www.ninechat.com/html/avatars/13.gif",
"http://www.ninechat.com/html/avatars/14.gif",
"http://www.ninechat.com/html/avatars/15.gif",
"http://www.ninechat.com/html/avatars/16.gif",
"http://www.ninechat.com/html/avatars/17.gif",
"http://www.ninechat.com/html/avatars/18.gif",
"http://www.ninechat.com/html/avatars/19.gif",
"http://www.ninechat.com/html/avatars/20.gif",
"http://www.ninechat.com/html/avatars/21.gif",
"http://www.ninechat.com/html/avatars/22.gif",
"http://www.ninechat.com/html/avatars/23.gif",
"http://www.ninechat.com/html/avatars/24.gif",
"http://www.ninechat.com/html/avatars/25.gif",
"http://www.ninechat.com/html/avatars/26.gif",
"http://www.ninechat.com/html/avatars/27.gif",
"http://www.ninechat.com/html/avatars/28.gif",
"http://www.ninechat.com/html/avatars/29.gif",
"http://www.ninechat.com/html/avatars/30.gif",
"http://www.ninechat.com/html/avatars/31.gif",
"http://www.ninechat.com/html/avatars/32.gif",
"http://www.ninechat.com/html/avatars/33.gif",
"http://www.ninechat.com/html/avatars/34.gif",
"http://www.ninechat.com/html/avatars/35.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/t_new.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/t_poll.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_norm.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_norm_no.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_hot.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_hot_no.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_poll.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_poll_no.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_closed.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/f_moved.gif",
"http://www.ninechat.com/html/emoticons/72_72.gif",
"http://www.ninechat.com/html/emoticons/71_71.gif",
"http://www.ninechat.com/html/emoticons/63_63.gif",
"http://www.ninechat.com/html/emoticons/62_62.gif",
"http://www.ninechat.com/html/emoticons/57_57.gif",
"http://www.ninechat.com/html/emoticons/60_60.gif",
"http://www.ninechat.com/html/emoticons/64_64.gif",
"http://www.ninechat.com/html/emoticons/47_47.gif",
"http://www.ninechat.com/html/emoticons/48_48.gif",
"http://www.ninechat.com/html/emoticons/49_49.gif",
"http://www.ninechat.com/html/emoticons/50_50.gif",
"http://www.ninechat.com/html/emoticons/52_52.gif",
"http://www.ninechat.com/html/emoticons/73_73.gif",
"http://www.ninechat.com/html/emoticons/74_74.gif",
"http://www.ninechat.com/html/emoticons/75_75.gif",
"http://www.ninechat.com/html/emoticons/77_77.gif",
"http://www.ninechat.com/html/emoticons/angry_smile.gif",
"http://www.ninechat.com/html/emoticons/beer_mug.gif",
"http://www.ninechat.com/html/emoticons/broken_heart.gif",
"http://www.ninechat.com/html/emoticons/cake.gif",
"http://www.ninechat.com/html/emoticons/cat.gif",
"http://www.ninechat.com/html/emoticons/clock.gif",
"http://www.ninechat.com/html/emoticons/confused_smile.gif",
"http://www.ninechat.com/html/emoticons/cry_smile.gif",
"http://www.ninechat.com/html/emoticons/dog.gif",
"http://www.ninechat.com/html/emoticons/envelope.gif",
"http://www.ninechat.com/html/emoticons/heart.gif",
"http://www.ninechat.com/html/emoticons/kiss.gif",
"http://www.ninechat.com/html/emoticons/note.gif",
"http://www.ninechat.com/html/emoticons/omg_smile.gif",
"http://www.ninechat.com/html/emoticons/present.gif",
"http://www.ninechat.com/html/emoticons/red_smile.gif",
"http://www.ninechat.com/html/emoticons/regular_smile.gif",
"http://www.ninechat.com/html/emoticons/rose.gif",
"ttp://www.ninechat.com/html/emoticons/sad_smile.gif",
"http://www.ninechat.com/html/emoticons/shades_smile.gif",
"http://www.ninechat.com/html/emoticons/star.gif",
"http://www.ninechat.com/html/emoticons/teeth_smile.gif",
"http://www.ninechat.com/html/emoticons/thumbs_down.gif",
"http://www.ninechat.com/html/emoticons/thumbs_up.gif",
"http://www.ninechat.com/html/emoticons/tongue_smile.gif",
"http://www.ninechat.com/html/emoticons/what_smile.gif",
"http://www.ninechat.com/html/emoticons/wink_smile.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon1.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon2.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon3.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon4.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon5.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon6.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon7.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon8.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon9.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon10.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon11.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon12.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon13.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/icon14.gif",
"http://www.ninechat.com/html/team_icons/administrator.gif",
"http://www.ninechat.com/html/team_icons/moderator.gif",
"http://www.ninechat.com/html/team_icons/srmoderator.gif",
"http://www.ninechat.com/html/team_icons/fullmember.gif",
"http://www.ninechat.com/html/team_icons/member.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/p_pm.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/tile_sub.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/tile_back.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/bf_nonew.gif",
"http://www.ninechat.com/style_images/SunnyDay-116/bf_new.gif")

// Do not modify anything beyond this point!
if (document.images) {
var dots = new Array()
dots[0] = new Image(1,1)
dots[0].src = "images/black.gif" // default preloadbar color (note: You can substitute it with your image, but it has to be 1x1 size)
dots[1] = new Image(1,1)
dots[1].src = "images/blue.gif" // color of bar as preloading progresses (same note as above)
var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0
var loaded = new Array(),i,covered,timerID
var leftOverWidth = lengthOfPreloadBar%coverage
}
function loadImages() {
for (i = 0; i < yourImages.length; i++) {
preImages[i] = new Image()
preImages[i].src = yourImages[i]
}
for (i = 0; i < preImages.length; i++) {
loaded[i] = false
}
checkLoad()
}
function checkLoad() {
if (currCount == preImages.length) {
location.replace(locationAfterPreload)
return
}
for (i = 0; i <= preImages.length; i++) {
if (loaded[i] == false && preImages[i].complete) {
loaded[i] = true
eval("document.img" + currCount + ".src=dots[1].src")
currCount++
}
}
timerID = setTimeout("checkLoad()",10)
}
// end hiding -->
</script>

</head>

<body bgcolor="#FFFFFF">

<center>
<font size="4">Please be patient while some images<br>
are being preloaded...</font><p>
0%
<script language="JavaScript1.1">
<!-- begin hiding
// It is recommended that you put a link to the target URL just in case if the visitor wants to skip preloading
// for some reason, or his browser doesn't support JavaScript image object.
if (document.images) {
var preloadBar = ''
for (i = 0; i < yourImages.length-1; i++) {
preloadBar += '<img src="' + dots[0].src + '" width="' + coverage + '" height="' + heightOfPreloadBar + '" name="img' + i + '" align="absmiddle">'
}
preloadBar += '<img src="' + dots[0].src + '" width="' + (leftOverWidth+coverage) + '" height="' + heightOfPreloadBar + '" name="img' + (yourImages.length-1) + '" align="absmiddle">'
document.write(preloadBar)
loadImages()
}
document.write('<p><small><a href="javascript:window.location=locationAfterPrel oad">Skip Preloading</a> &nbsp;| &nbsp;<a href="http://dynamicdrive.com/">Script Credits</a></small></p>')
// end hiding -->
</script>
</center>

</body>
</html>
Does anyone know what i did wrong??
Tidal Wave is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 11th, 2005, 10:27 PM   #2 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,058 posts
Gave thanks: 48
Thanked 129 times
One of your images starts with "ttp"

We discussed this over MSN and it's resolved, correct?
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 12th, 2005, 5:59 AM   #3 (permalink)
L'Awesome Advocate
Super #1
 
Ancyru's Avatar
 
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
Good eye Haugland.
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.
Ancyru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On