Hi Muzak,
And when you trace out you do get the contents of the file?
Sid
On Apr 21, 2009, at 4:38 PM, Muzak wrote:
Works fine here (Flex+Air).
----- Original Message ----- From: "Sidney de Koning" <sid...@funky-monkey.nl
>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Tuesday, April 21, 2009 3:41 PM
Subject: Re: [Flashcoders] Loading string data in a file from a server
Anybody?
I just want to know how to load an file from a server that holds
string data (xml or txt file) without getting the 2032 error.
Please help,
Sid
On Apr 20, 2009, at 4:14 PM, Sidney de Koning wrote:
Hi List,
I want to load textfile from my own server from an AIR app but i
keep getting a 2032 Error, a Stream Error. Event though when i
load this from the browser it works.
The docs about this on the net are very limited. This is what i
thought of so far:
- It could be a crossdomain error?
- I do handle all events?
- I tried a loading in a PHP file that uses fopen to serve me the
file
Do anyone have any ideas? I just want to read in this text file
( or any other file with string data from my server ) or should i
use FileStream to read in the file? Eventually the contents of
the file i load in will will need to be a File Object ().
Thanks in advance,
Sidney
Below is my code:
var xmlURL:String = "http://www.funky-monkey.nl/air/stringtest/serveFile.php
";
var xmlReq:URLRequest = new URLRequest( xmlURL );
var xmlLoader:URLLoader = new URLLoader( xmlReq );
//listen for error events
xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError );
xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR ,
onSecurityError );
xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded );
function xmlLoaded(evt:Event):void {
trace( evt.target.data)
}
function onIOError(evt:IOErrorEvent):void {
trace( evt.text)
}
function onSecurityError(evt:SecurityErrorEvent):void {
trace( evt.text )
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders