|
Post by Alyce on Nov 10, 2007 8:21:48 GMT -5
This is simple. It just includes a "next" button. I'll probably enhance it later.
It requires a sub directory called "public" in your RBP folder.
html "</div>" call SetCSS graphic #p, 700,400 dim pix$(200)
files #f, DefaultDir$ + "\public\*.*" n=#f hasanswer() if n<>0 then rc=#f rowcount() for i=1 to min(200,rc) r$=#f nextfile$() im$ = #f name$() ext$ = lower$(right$(im$,3)) if (ext$ ="jpg") or (ext$="gif") then k = k + 1 pix$(k)=DefaultDir$ + "\public\" + im$ end if next i j = 0 'initialize slideshow index 'k now contains total number of images end if
'wait
[doNext] cls j = j+1 'increment counter if j>k then j=1 loadimage "newpic", pix$(j) #p cls() #p drawimage("newpic",0,0) link #test, "Next",[doNext] #test cssclass("fancyButton") print:print pix$(j) print render #p wait
sub SetCSS CSSClass "a.fancyButton", "{ Text-Decoration: None; Font-Size: 16pt; Font-Weight: Bold; Font-Family: Verdana; Width: 140px; Height: 30px; Display: Block; Background: #FFCC00; Color: #000000; Text-Align: Center; Border-Width: Thick; Border-Style: Outset; Border-Color: #DDAA00; }" end sub
|
|
|
Post by Alyce on Nov 10, 2007 14:34:18 GMT -5
New version. This one uses "loadgraphic" instead of a graphic object and "loadimage". I also added Mike's check for valid folder/files.
html "</div>" call SetCSS dim pix$(200) files #f, DefaultDir$ + "\public\*.*" n=#f hasanswer() if n=0 then print "No images found in 'public' folder" wait else rc=#f rowcount() for i=1 to min(200,rc) r$=#f nextfile$() im$ = #f name$() ext$ = lower$(right$(im$,3)) if (ext$ ="jpg") or (ext$="gif") then k = k + 1 pix$(k)=DefaultDir$ + "\public\" + im$ end if next i j = 0 'initialize slideshow index 'k now contains total number of images end if [doNext] cls j = j+1 'increment counter if j>k then j=1 loadgraphic #p, pix$(j) link #test, "Next",[doNext] #test cssclass("fancyButton") print:print pix$(j) print render #p wait sub SetCSS CSSClass "a.fancyButton", "{ Text-Decoration: None; Font-Size: 16pt; Font-Weight: Bold; Font-Family: Verdana; Width: 140px; Height: 30px; Display: Block; Background: #FFCC00; Color: #000000; Text-Align: Center; Border-Width: Thick; Border-Style: Outset; Border-Color: #DDAA00; }" end sub
|
|