A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [RESOLVED] Error #2124 when download a text file.

  1. #1
    Member
    Join Date
    Mar 2008
    Location
    the Netherland, near Amsterdam
    Posts
    34

    resolved [RESOLVED] Error #2124 when download a text file.

    Hello people,

    For my flash applet I need to download two text files.
    Both they are in ANSI format, both have Windows line breaks.

    The first one does download:
    Code:
    var loader:URLLoader = new URLLoader()
    var url:URLRequest = new URLRequest("http://www.utr-online.com/IVAORealtime.txt")
    loader.addEventListener(Event.COMPLETE, loadcomplete)
    loader.load(url)
    function loadcomplete(event:Event) {
    	var textt:String = loader.data
    	var tmp3:Array = new Array()
    	tmp3 = textt.split("\u000A")
    	trace(tmp3)
    }
    The second one returns error #2124:
    Code:
    var loader2:Loader = new Loader()
    var FIRs:Array = new Array()
    var FIRURL:URLRequest = new URLRequest("http://www.utr-online.com/FIRs.txt")
    loader2.addEventListener(Event.COMPLETE, processFIRs)
    loader2.load(FIRURL)
    function processFIRs(event:Event):void {
    	var tmp:String = loader2.data
    	FIRs = tmp.split("\u000A")
    	trace(FIRs)
    }
    The first file contains information about all the people online at the network of IVAO.
    The second file contains information about which airports are in which FIRs (Flight Information Region). The four letter codes are the ICAO-codes of the Airports and FIRs.

    What did I do wrong??

    Jasper

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Your second file is not recognized by Flash. It is of unknown file type.

    PS: Please change your footer, Maximum dimensions: 300x40 pixels (1).
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Member
    Join Date
    Mar 2008
    Location
    the Netherland, near Amsterdam
    Posts
    34
    Yes I know what Error #2124 means, but why doesn't Flash recognize it?

    It is just a .txt file ...

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    The extension doesn't mean anything to flash only the content. You should go back to your text program and resave the file.
    - The right of the People to create Flash movies shall not be infringed. -

  5. #5
    Member
    Join Date
    Mar 2008
    Location
    the Netherland, near Amsterdam
    Posts
    34
    Stupid Flash...

    Opened the file in notepad and resaved it making sure the format is ANSI (same as the other file which DOES work), but it still doesn't work...

  6. #6
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Copy and paste it into a new file or one which is working like the one which is accepted and then save it. I have a Mac, so using Mac programs (BBedit) does not get me into trouble
    - The right of the People to create Flash movies shall not be infringed. -

  7. #7
    Member
    Join Date
    Mar 2008
    Location
    the Netherland, near Amsterdam
    Posts
    34
    I put the content of the file into the swf itself.
    It is hardcoded now, but that doesn't matter that much.

    Thanks for the help anyway...

    Jasper

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