All you have to do is assign the alert to an object. In the code below, I've
imported the alert class and initialized it as an alert, but it will work just
as well if you have an alert in the library, don't import, and initialize it as
a generic object().
import mx.controls.Alert;
var myAlert:Alert = Alert.show("Test Alert", "Test", Alert.OK | Alert.CANCEL,
null, myClickHandler, "testIcon", Alert.OK);
myAlert._x = 0
myAlert._y = 0