Unstoppable Domains โ€” Get your daily AI drops report

Javascript/Actionscript image refresh

SpaceshipSpaceship
Watch

PoorDoggie

Soon to be RICHdoggie!VIP Member
Impact
18
I have currently an image in the middle of a page, and it is a feed from a webcam. The webcam takes and image, and saves it. The webpage is an easy "<img" thing with a meta refresh. The only problem is that to have a decent feed, the page needs to refresh at a rate of 0.1secs. This means that the page is clicking and flickering.

There isn't a way in which I can use javascript to "refresh" the image every 0.1 secs?

Likewise, a Macromedia Flash actionscript would do the trick too.

Please help, thanks in advance! :)
Tom
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Go with flash. How are you updating the images?
 
0
•••
at the moment, i am just updatng them by refreshing the page every 0,1 secs. :lol:

I just need a script that will refresh the image every 0.1 secs, insted of the whole page. I really dosen't matter, I am setting up a CCTV camera system for my house, and thought I would output it to the web. Unfortunately, I am just using a web cam, and it dosen't come with an integrated web server, so I am stuck with making my own script. I have got the webcam to out put images every 0.1 secs, and just need to run the webpage like that.

If you could tell me how to do it using flash, I will be very grateful! :)

Thanks
Tom
 
0
•••
Try this code:

Code:
<IMG src="image_name.jpg" width="275" height="200" border="1" name="refresh">
      <SCRIPT language="JavaScript" type="text/javascript">
      <!--
      var t = 120 // interval in seconds
      image = "image_name.jpg" //name of the image
      function Start() {
      tmp = new Date();
      tmp = "?"+tmp.getTime()
      document.images["refresh"].src = image+tmp
      setTimeout("Start()", t*1000)
      }
      Start();
      // -->
      </SCRIPT>
 
0
•••
thanks a lot! :D
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back