0 Replies Latest reply on Apr 16, 2006 8:00 AM by JESUS1000000

    updateAfterEvent - onData

    JESUS1000000
      I am making online multiplayer for flash. not the simplest of things ive attempted to do and not made very easy by flash.

      The problem is i want to redraw the screen after i recieve a certain character from the socket (the end of frame data character). Ive found when using a regular frame rate to draw the screen i get conflicts and with 30fps of data streaming to you over the internet i really cant afford to have conflicts and a juddery frame rate out of sync with the server.

      I know updateAfterEvent is not supported by onData. Allthough surely there msut be a way around this.
      I thoguht the best way would be to use setInterval like this:

      onrecieval of next frame character:
      intervalId = setInterval(drawNextFrame(),10);

      function drawNextFrame() {
      clearInterval(_root.intervalId);
      updateAfterEvent();
      }

      Basically it doesn't work. the function is deffinately being called but updateAfterEvent has no affect.
      any ideas why this isn't working or how i can get around this?
      thanks, lewis