pseudo.PushButton class
View Sample :: Return to index  
pseudo.PushButton.PushButton(pThis:MovieClip)
Push Button constructor. You never use the constructor to create this component.

Parameters None
Returns Nothing
Example
    None


pseudo.PushButton.create(pOwner:MovieClip, strName:String, nDepth:Number):pseudo.PushButton
Use this static function to create new push buttons on the specified movie clip. Never use constructor directly to do this.

Parameters pOwner The movie clip on which the new PushButton will be drawn.
strName The new PushButton instance name.
nDepth The new PushButton instance depth.
Returns The reference to new push button instance
Example
    var btn = pseudo.PushButton.create(this, "btn", 1);
    btn.setSize(100, 20);
    
    //Apply the skin to the button
    
    btn.setLook(pseudo.look.XPLook.getInstance());
    
    //Here we add a label to the button, what is a little bit tricky
    
    var lbl:pseudo.Label = pseudo.Label(btn.addItem(pseudo.Label));
    lbl.setAlign("center");
    lbl.setText("XP Button");
    
    //Calling these functions will finally draw the component
    
    btn.update();
    btn.draw();
    
    // This code will draw the button using XP look and feel skin.
    // Please notice that you should always use some skin to create the component.
    // This can be done like in this example, and the skin will be complied into the swf file,
    // or you can use another technique and load the skin at a run time in which case the users of
    // the application will be able to change its skin dynamically.
            
Flash UI Components (c)TUFaT.com, All Rights Reserved.