Here’s a flash .swf file containing a sample image that is streaming from a live webcam. This is a live stream of Shamu the killer Whale at San Diego zoo. It runs between 9am - 5:30pm Pacific Standard Time daily, so it may be off depending on what time you view it. I have been looking at different ways to get moving images onto my Chumby and thinking about what sort of interface might represent a human form in a more complete way. I think that webcams are definitely one way of doing this. Skype is also an option, but becasue it is closed proprietry software, itmeans there is no option to hack it and appropriate for my exact purposes. Pretty glad to get the .swf running though. Here is the source code with some of the cam options inserted. //url = "http://os1.prod.camzone.com/still?cam=8"; // link to the cam feed //url = "http://www.niwascience.co.nz/services/free/cam-era/raglana/raglana.jpg?sq_content_src=%2BdXJsPWh0dHAlM0ElMkYlMkZzZXJ2aWNlcy5uaXdhLmNv Lm56JTJGc2VydmljZXMlMkZjYW0tZXJhJTJ Gc2l0ZXMlMkZyYWdsYW53ZWJhJTJGUkFfV18yMDA4XzA5Xz A2XzEzXzAwXzI1LmpwZyZhbGw9MQ%3D %3D"; //url = "http://www.citynews.co.nz/webcams/bayfair.php"; // link to the cam feed url = "http://os9.prod.camzone.com:80/frame?name=Shamu&camlabel=&intrographic=camzone_320_seaworld.jpg";delay = 1000; // one second refresh rate // // this handles simple JPEG-based webcams // // set 'url' to URL of JPEG image feed // set 'delay' to frame rate in ms (best to avoid faster than 1s) // create library item with linkage "proxy" to hold image // // Note that the site hosting the cam must allow Flash access // from arbitrary domains, typically by using a "crossdomain.xml" file // // This movie also counts on the images being exactly 320x240 - you may bee to get fancier // if they're not. // // // The strategy here is to have three "proxy" movie clips that // each load and rotate to front. If you have just one clip, then // it will go blank during the load. Having three also allows // some latency in the response for the image load. // createEmptyMovieClip("image0",0); // create some initial empty images createEmptyMovieClip("image1",1); createEmptyMovieClip("image2",2); index=0; // // onEnterFrame-based loading // // We aren't using setInterval/clearInterval to avoid // potential memory/timer leaks in the Flash player // then = 0; // long, long ago.... this.onEnterFrame = function () { now = (new Date()).getTime(); // get current time in ms from the epoch if (now-then>delay) { // enough time elapsed since last image loaded? doLoadImage(); // yup, load image then = now; // and reset the last load time } } // // rotate the images, load the next one // function doLoadImage() { var name0 = 'image'+(index%3); var name1 = 'image'+((index+1)%3); var name2 = 'image'+((index+2)%3); var m0 = eval(name0); var m1 = eval(name1); var m2 = eval(name2); m0.swapDepths(0); // rotate the clips m1.swapDepths(1); m2.removeMovieClip(); // throw away the oldest one createEmptyMovieClip(name2,2); // make a new one m2 = eval(name2); m2.loadMovie(url); // load image into it index = (index+1)%3; } Massive help from: ChumbyWIKI
Thank you so much for posting this this simple webcam gadget is going to help me so much