1 Reply Latest reply on Nov 4, 2010 5:01 AM by BhaskerChari

    Error Message Help

    Whitetimer

      Hi All

       

      When i run a test app, i get this message

       

      Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: Data/Text/welcome.txt

       

              private function loadTXT(event:Event):void
              {
                  // Create the URLLoader instance to be able to load data
                  var loader:URLLoader = new URLLoader();
                  // Define the event handlers to listen for success and failure
                  loader.addEventListener ( IOErrorEvent.IO_ERROR, handleIOError );
                  loader.addEventListener ( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
                  loader.addEventListener ( SecurityErrorEvent.SECURITY_ERROR, handleSecurityError );
                  // Attempt to load some data
                  loader.load(new URLRequest('Data/Text/welcome.txt'));
                  loader.addEventListener(Event.COMPLETE, onComplete);
              }
      
              private function onComplete(event:Event):void
              {
                  //Alert.show( "The data has successfully loaded" )
                  var myData:String = new String(event.target.data)
                  welcomeTXT.text = myData;
              }
      
              private function handleIOError ( event:IOErrorEvent ):void
              {
                  Alert.show( "Load failed: IO error: " + event.text );
              }
              private function handleHttpStatus ( event:HTTPStatusEvent ):void
              {
                  Alert.show( "Load failed: HTTP Status = " + event.status );
              }
              private function handleSecurityError ( event:SecurityErrorEvent ):void
              {
                  Alert.show( "Load failed: Security Error: " + event.text );
              }
      

       

      Any suggestions please ?

       

      Many thanks