0 Replies Latest reply on Oct 4, 2006 12:38 AM by Marnix01

    Browser crashes with Flash 9

    Marnix01
      Hi,
      We have a very simple flash program to connect to a XML server. This all worked fine in flashplayer 7 and 8 but now version 9 is released some people get a browser crash when the flash application is launched. Does someone now what is changed in version 9 that can make this browser crash happen?

      The code is:
      mySocket = new XMLSocket();
      //var userID = "Marnix50";
      //var IP = "127.0.0.1";
      var connectCount=0;

      function debug(str)
      {
      statusText.text=str;
      }

      mySocket.onConnect = function(success)
      {
      if (success) {
      mySocket.send("register " + userID + "\n");
      debug("connected");
      }
      else
      {
      if (connectCount<2) {
      mySocket.close();
      mySocket.connect(IP, 8080);
      connectCount++;
      }
      debug("connection failed");
      }

      }

      mySocket.onClose = function()
      {
      debug("Server connection lost");
      }

      mysocket.onXML = myOnXML;

      XMLSocket.prototype.onData = function(msg)
      {
      this.onXML(new XML(msg));
      }

      function myOnXML(doc) {
      var e = doc.firstChild;

      if (e != null && e.nodeName == "MESSAGE") {
      alert(e.attributes.text);
      }
      }



      function alert(strAlert) {
      if ((strAlert.substring(0,4)!="ping") && (typeof strAlert != "undefined") && (strAlert != "\0")) {
      getURL("javascript:messageAlert('" + strAlert + "')");
      }
      }


      mySocket.connect(IP, 8080);