A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jun 2004
    Location
    south korea
    Posts
    5

    Error #2032: - what does this mean?

    Hi,

    Im trying to load in some HTML text which is formatted by CSS (both are external) and i get this message:

    "The following file could not be loaded: Error #2032: Stream Error. URL: file:///C|/Users/Ben/Documents/Productivity/sites/mySite/welcome.html"

    I've been searching about this for a few hours but cant make any sense of it. The path to the html file is correct, i've never seen this before. Can anyone explain whats happening or how to get around this??

    here is the code i am using...

    Code:
    public function LoadHTMLCSS() {
    			_cssFile = new URLLoader();
    			_cssFile.addEventListener(Event.COMPLETE, onLoadCSS, false, 0, true);
                _cssFile.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler, false, 0, true);
    			_cssFile.load(new URLRequest("welcome.css"));
    		}
    		
    		private function onLoadCSS(evt:Event):void {
    			_css = new StyleSheet();
    			_css.parseCSS(evt.target.data);
    			_htmlFile = new URLLoader();
    			_htmlFile.addEventListener(Event.COMPLETE, onLoadHTML, false, 0, true);
                _htmlFile.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler, false, 0, true);
    			_htmlFile.load(new URLRequest("demo.html"));
    		}
    		
    		private function onLoadHTML(evt:Event):void {
    			_html = evt.target.data;
    			initTextField();
    		}
    
    		private function initTextField():void {
    			_txtFld = new TextField();
    			_txtFld.x = _txtFld.y = 20;
    			_txtFld.width = 500;
    			_txtFld.multiline = true;
    			_txtFld.wordWrap = true;
    			_txtFld.autoSize = TextFieldAutoSize.LEFT;
    			_txtFld.selectable = false;
    			_txtFld.styleSheet = _css;
    			_txtFld.htmlText = _html;
    			_txtFld.addEventListener(TextEvent.LINK, onTextEvent);
    			addChild(_txtFld);
    			
    			_cssFile.removeEventListener(Event.COMPLETE, onLoadCSS);
                _cssFile.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    			_htmlFile.removeEventListener(Event.COMPLETE, onLoadHTML);
                _htmlFile.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    		}
    		
    		private function onTextEvent(evt:TextEvent):void {
    			trace(evt.text);
    		}
    
            private function ioErrorHandler(evt:IOErrorEvent):void {
                trace("The following file could not be loaded: " + evt.text);
            }
    	}
    }
    Thanks for any help (this is killing me!!)

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,425
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Location
    south korea
    Posts
    5
    hi cancerinform,

    thanks for the reply...yeah, i checked that out but my url address is correct, this is what i don tunderstand...hmmm....

    thanks anyway

  4. #4
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,425
    You have welcome.css but the error says welcome.html.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  5. #5
    Junior Member
    Join Date
    Mar 2013
    Posts
    1

    Smile Some help...

    Hi,
    I have had exactly the same prroblem, I found that if you just turned your computer off and then back on it should load properly. If not, get some one with a lot more brains than me to help you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts




Click Here to Expand Forum to Full Width


HTML5 Development Center