I have some problems creating a slideshow. I've used the following tutorial to create a video element with webcam acces, combined with the canvas element so that I can take screenshots:
http://joshondesign.com/p/books/canvasdeepdive/chapter13.html
What I'm trying to do, is to create a slideshow that contains a few images and the freshly taken screenshot. Does anybody know if there's a way, just by using javascript, to accomplish this?
My code so far:
var image1 = new Image()
image1.src = "images/slide1.png"
var image2 = new Image()
image2.src = "images/slide2.png"
var image3 = new Image()
image3.src = "the screenshot here"
var step = 1;
function slideit() {
document.images.slide.src = eval("image"+step+".src");
if(step<3)
step++;
else
step=1;
setTimeout("slideit()",2500);
}
slideit();