| Example |
//Get an instance of the look to be used in our example
var look:Object = pseudo.look.XPLook.getInstance();
//Create movie clip using pseudo.BaseMovie.create() method this movie clip will be
// used as the area in which all our components will be drawn
_global.main = pseudo.BaseMovie.create(_root, "main", 1);
// set look and feel for the movie and everything that will be drawn on it
_global.main.setLook(look);
//Create alert windows manger
var mng = _global.main.addItem(pseudo.WindowManager, "alertMng", 2);
mng.setWorkArea(0, 0, Stage.width, Stage.height);
//this code line will make our alerts appear in the center of the working area
mng.setStart("center", "middle");
//Create the button. Pressing this button will display the alert
var btn = _global.main.addItem(pseudo.PushButton, "btn", 1);
btn.setSize(90, 20);
// add label
var lbl = btn.addItem(pseudo.Label);
lbl.setAlign("center");
lbl.setText("Show Alert");
// add listener
btn.addListener("mouseRelease", this, onRelease);
//Draw everything in our working movie clip
_global.main.update();
_global.main.draw();
//Function that displays the alert
function onRelease():Void
{
classes.Global.alert("test", "test", "iconError", "ok,OK");
}
|