Slideshows in iRev

Sarah Reichelt sarah.reichelt at gmail.com
Sun Dec 20 02:01:40 EST 2009


On Sun, Dec 20, 2009 at 3:55 PM, Sivakatirswami <katir at hindu.org> wrote:
> while waiting for the plug-in to settle down ( I can't deploy revlets until
> the update function is working)
>
> I've been playing with iRev engine.
>
> Here's a slide show that uses an iRev template in an iFrame.
>
> http://www.himalayanacademy.com/resources/lexicon/images/backgrounds/
>
> this code is generated by iRev functions to set up links behind the previous
> and next buttons, where the buttons post the next slide and previous slide
> numbers and path to the irev page which then returns the slide with a new
> set of update buttons. I'm not really worried about the round trip to the
> server because the html here is so small, the CSS (not shown) is cached and
> you have to fetch the photos anyway, a little more html text is hardly an
> issue.
>
> Now, I'm wondering if there is a way to make this thing drive itself, so the
> user does not have to click the next button, using iRev code.
>
> I suspect I can't really do that with iRev but will need some Javascript
> (which I don't know at all.)


Have a look at <http://www.troz.net/onrev/samples/slideshow.irev>
where I use JavaScript & AJAX to do this. The JavaScript sets up a
timer and every 5 seconds, this sends an AJAX request to another irev
file returns the html to display a random image.

This link will show you the script of the secondary file
<http://www.troz.net/onrev/samples/showscript.irev?showscript=includes/photolink.irev>

HTH,
Sarah



More information about the Use-livecode mailing list