The error I have is
Error opening URL "http://www.website.com/something.php?query=someinvalidquery"
The query isn't actually supposed to go through, but I'd like some sort of error message saying so.
The error I have is
Error opening URL "http://www.website.com/something.php?query=someinvalidquery"
The query isn't actually supposed to go through, but I'd like some sort of error message saying so.
Assuming you're using a URLLoader
or something, you want to attach an event to it to catch the error. Then you can display a text field or whatever you want.
var url = "http://www.website.com/something.php?query=someinvalidquery";
var loader = new URLLoader();
loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.load(url);
function errorHandler(event:IOErrorEvent):void {
trace('do whatever to handle the error here.');
}
You can also track the httpstatus etc, in case you want to handle redirects and whatnot. The event used are in the docs