As an alteration to my last post

S

Stephan Hauduc

What I think is the best way for me to do what I want to do is have a text
file which contains the following, the number of slides at the top, then the
time lengths that each file should be displayed for in the slideshow in
sequence.

SO what I'd like to do is have a slide show that displays files named as
slide1.jpg, slide2.jpg to slidexx.jpg with varying times for each files
display time as specifed in the external file.

So... any ideas how I would go about this please

TIA

Chris
 
S

Stephan Hauduc

serverside

Evertjan. said:
Stephan Hauduc wrote on 16 jul 2003 in comp.lang.javascript:

this depends on the platform you want to use:

Internet + Browser ?

Serverside script ?

.hta ?
 
E

Evertjan.

Stephan Hauduc wrote on 16 jul 2003 in comp.lang.javascript:
serverside

read the txt file into arrays nd execute this
[sort of pseudo code, asp-vbs + client js, not ready coding]

<%
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set ListFile = fs.OpenTextFile(FilePath, ForReading)
%>
<script>
max=<%..read.%>
n=0
<% for m=0 to max %>
imag[++n]=<%..read..%>
imagtime[n]=<%..read..%>
<% next%>
</script>

<img src="" id="photo">

<script>
n=0
nextimg()

function nextimg(){
photo.src=imag[n]
nn = n
n = (n<max)? n+1 : 0
setTimeout("nextimg()",imagtime(nn)*1000)
}
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top