General Procedure
Create the object | Normally using the Set various parameters
| Such as displayed text and position
| Add the object to the form
| Required to actually display the object
| |
var submitBtn:Button = new Button(); // This creates the object submitBtn.label = "Submit Player"; submitBtn.addEventListener(MouseEvent.CLICK, submitPlayer); submitBtn.move(350,40); addChild(submitBtn); // This displays the object
goalsTI = new TextInput(); goalsTI.move(170,40); goalsTI.setSize(40,24); goalsTI.restrict = "0123456789"; // Forces a numeric value addChild(goalsTI);
leagueCB = new ComboBox(); leagueCB.addItem( { label:"Northern", data: 0 } ); leagueCB.addItem( { label:"Southern", data: 1 } ); leagueCB.move(220,40); leagueCB.setSize(120,24); addChild(leagueCB);Author: Robert Clemenzi - clemenzi@cpcug.org