/    Sign up×
Community /Pin to ProfileBookmark

Desperate help with image loading script

This page

[url]http://www.dannyvuart.com/gallery/gallery_new3.html[/url]

has a series of images that it cycles through, but it seems to preload all images

I attempted to change it to the next link to not preload, but load on call, but no luck????

[url]http://www.dannyvuart.com/gallery/gallery_new9.html[/url]

Any help would be greatly appreciated.

Thank you

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@gomisuteSep 07.2007 — I think this might work for you

[code=html]<html>
<head>
<title>slide show</title>

<script language="JavaScript" type="text/javascript">

var pictures = new Array
(
"pic1.JPG",
"pic2.JPG",
"pic3.JPG",
"pic4.JPG"
);

var picture_num = 0;
var current_picture = new Image();
current_picture.src = pictures[picture_num];

function start_show() {
setInterval("slideshow()", 3000);
}

function slideshow() {
picture_num++;
if (picture_num == pictures.length) {
picture_num = 0;
}
current_picture.src = pictures[picture_num];
document["rotating_picture"].src = current_picture.src;
}

</script>
</head>

<body onLoad="start_show()">

<img src="pic1.JPG" name="rotating_picture">
</body>
</html>[/code]
Copy linkTweet thisAlerts:
@mwscrlauthorSep 09.2007 — great job. this works great
×

Success!

Help @mwscrl spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...