Changes

Active WebCam Video Surveillance Software

2,214 bytes added, 16:26, 28 January 2009
/* Broadcasting and Web Server */
The following lines were added (+) and removed (-):
HTML "Stills" page:HTML page on local web server that refreshes still images.  Utilizes JavaScript.  The following code is embedded in the HTML page by the creation wizard.  This is the minimal code necessary to create the refreshing.1. Goes inbetween <HEAD> tags right after <TITLE> tags:  <nowiki><SCRIPT LANGUAGE="JavaScript"></nowiki>  <nowiki><!--</nowiki>  <nowiki></nowiki>  <nowiki>function ShowButton(objName, ImageName) {</nowiki>  <nowiki>  objName.src=ImageName;</nowiki>  <nowiki>}</nowiki>  <nowiki></nowiki>  <nowiki>function PreloadImages() {</nowiki>  <nowiki>  if(document.images) {</nowiki>  <nowiki>      if (!document.tmpImages)</nowiki>  <nowiki>        document.tmpImages=new Array();</nowiki>  <nowiki>      with(document) {</nowiki>  <nowiki>      var</nowiki>  <nowiki>          i, j=tmpImages.length,</nowiki>  <nowiki>          a=PreloadImages.arguments;</nowiki>  <nowiki>      for(i=0; i<a.length; i++)</nowiki>  <nowiki>          if (a[i].indexOf("#")!=0) {</nowiki>  <nowiki>            tmpImages[j]=new Image;</nowiki>  <nowiki>            tmpImages[j++].src=a[i];</nowiki>  <nowiki>          }</nowiki>  <nowiki>      }</nowiki>  <nowiki>  }</nowiki>  <nowiki>  startClock();</nowiki>  <nowiki>}</nowiki>  <nowiki></nowiki>  <nowiki>//--></nowiki>  <nowiki></SCRIPT></nowiki>  <nowiki></nowiki>  <nowiki></nowiki>  <nowiki><!--  Function is refreshing web page</nowiki>  <nowiki>//  --></nowiki>  <nowiki><script language="JavaScript"></nowiki>  <nowiki><!--</nowiki>  <nowiki>var x = 500;</nowiki>  <nowiki> function startClock(){</nowiki>  <nowiki>  x = x - 200;</nowiki>  <nowiki>  if (x % 1000 == 0)</nowiki>  <nowiki>    document.form1.clock.value = x / 1000;</nowiki>  <nowiki>  timerID = setTimeout("startClock()", 200);</nowiki>  <nowiki>  if (x <= 0) {</nowiki>  <nowiki>    window.location.reload(true);</nowiki>  <nowiki>    x = 500;</nowiki>  <nowiki>  }</nowiki>  <nowiki> }</nowiki>  <nowiki>//  --></nowiki>2. JavaScript that goes in <BODY> tag to activate refresh script  <nowiki>onLoad="startClock();"</nowiki>3. Display Still Image to be refreshed  <IMG WIDTH=640 HEIGHT=480 SRC="capture1.jpg">
Bureaucrat, administrator
16,195
edits