|
Categories
|
|
|
|
|
|
Using the Alert component
|
|
Published
06/19/2006
|
Macromedia Flash
|
|
|
|
|
|
Using the Alert component Drag an Alert component onto the Stage. Then delete it. Then put this code on the main Timeline. - import mx.controls.Alert;
- var listenerObj:Object = new Object();
- listenerObj.click = function(evt) {
- switch (evt.detail) {
- case Alert.OK :
- trace("you hit \"OK\".");
- break;
- case Alert.CANCEL :
- trace("you hit \"CANCEL\".");
- break;
- }
- };
- Alert.show("ALERT! Do you want to delete the Internet?", "Error", Alert.OK | Alert.CANCEL, this, listenerObj);
|