Flash Player 7.
myError.toString()
myError An instance of the Error object.
A string.
Method; returns the string "Error" by default, or the value contained in Error.message, if defined.
In this example, an attempt is made to connect
var sock = new XMLSocket();
try {
// Try to connect to server, throwing exception
// if it fails.
if (!sock.connect("www.mybiz.com", 8080)) {
throw new Error("Couldn't connect socket.");
}
// Display success message in text field.
outField = "Connection in progress...";
} catch (e) {
// Display error message in text field.
outField = e.toString();
}