3 Replies Latest reply on Jan 5, 2007 9:57 AM by FlightGuy

    reload the same Image every second

      Has anyone load an Image and refreshed it automatically?

      What I would like to do is....
      1. Load Image on document creation.
      2. Refresh the image every 100 ml secs
      3. Its the same image.... another app that we wrote writes over the original

      thanks in advance

      This doesn't work at all

      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" initialize="initTimer()">
      import flash.utils.Timer;
      import flash.events.TimerEvent;
      public function initTimer():void {
      // The first parameter is the interval (in milliseconds). The
      // second parameter is number of times to run (0 means infinity).
      var myTimer:Timer = new Timer(1000, 0);
      myTimer.addEventListener("timer", timerHandler);

      public function timerHandler(event:TimerEvent):void {

      var url:String = " http://localhost/frame.png";
      var urlReq:URLRequest = new URLRequest(url);
      framePNG.url= sURL; //to avoid caching



      <mx:Image id="framePNG" />