| Example |
The following example demonstrates how to create curtain instance using pseudo.Curtain class and to add pane into it.
Create a new fla file and save it somewhere , for example, as test.fla. Into the folder where you saved test.fla file copy the package with our pseudo components and other folders that are shipped with them (namely, pseudo and classes folders). Open Actions panel and insert into the code editor the following code..
//Create the instance of curtain
var curtain = pseudo.Curtain.create(this, "curtain", 1);
//set the size of the curtain movie clip
curtain.setW(100);
curtain.setH(200);
//Set the pane that will be displayed within the curtain var pane:pseudo.Pane = pseudo.Pane(curtain.setPane(pseudo.Pane));
curtain.setLook(pseudo.look.StdLook.getInstance());
//This function set the layout of the component
curtain.setAlign("bottom");
//Set the class that will be used to trigger the "showHide" event
curtain.setResize(classes.ResizeTitle);
//finally render the component
curtain.update();
curtain.draw();
// This code will draw the Curtain 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.
|