Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Javascript/Actionscript image refresh

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Go with flash. How are you updating the images?
 
0
Close
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
Close
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
Close
thanks a lot! :D
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Search: choose where to search from the All tab
Open the search at the top of any page. On the All tab, the list next to the search box lets you choose where to search: everything, all...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back