1 Reply Latest reply on Nov 18, 2007 9:41 PM by joeflashTO

    Error #2044: Unhandled StatusEvent:. level=error, code=

    jackhas
      Receiving message: Error #2044: Unhandled StatusEvent:. level=error, code=

      I have just added these three lines to a previously working fla:

      import flash.net.LocalConnection;

      var sender:LocalConnection = new LocalConnection();
      sender.send("_exampleChannel", "example", "a string", 6.5, true);

      My intent is to test passing data back to another fla. Right now the data I'm sending is nonsense. I'm just trying to test the connection and get it working. Any help is appreciated.

      Here is the entire block of code:

      import fl.controls.RadioButton;
      import flash.net.LocalConnection;

      var seqNum:Number = new Number();
      var question:String = new String();
      var actual_answer;
      var submit_answer;

      var end_result:uint = new uint();

      function setVariable(quext:String) {
      trace("Quext = "+quext);
      Question_display.text = quext;
      }

      //*************** from the parent program ***************************
      seqNum = 1;
      //question = "New York is the capitol of the USA."
      actual_answer = "FALSE";
      //*******************************************************************

      Question_display.backgroundColor = 0x0000FF;


      //********* EventListeners for the buttons **************************
      Answer_a.addEventListener(MouseEvent.CLICK, clickHandler);
      addChild(Answer_a);
      Answer_b.addEventListener(MouseEvent.CLICK, clickHandler);
      addChild(Answer_b);
      //*******************************************************************
      //********* Radio button Handler Function ***************************
      function clickHandler(event:MouseEvent):void {
      submit_answer = event.currentTarget.label;
      }
      //*******************************************************************
      function sub_answer(event:MouseEvent):void
      {
      trace("The submitted answer is "+submit_answer+", and the actual answer is "+actual_answer+".");
      if (actual_answer == submit_answer) {
      end_result = 1;
      }
      else {
      end_result = 0;
      }
      //*************** send to the parent program ********************
      trace("Your conclusions are "+end_result+".");
      //*************** send to the parent program ********************
      var sender:LocalConnection = new LocalConnection();
      sender.send("_exampleChannel", "example", "a string", 6.5, true);

      }

      Submit_btn.addEventListener(MouseEvent.CLICK, sub_answer);