Hi all,
I am new to flash and ActionScript 3.0.I am learning ActionScript 3.0.
My requirement/need is the AS3 code for placing any type of Component(viz., Button, CheckBox, ComboBox, ListBox, radiobutton, Slider, Scrollbar,Label,TextField, etc.,) on the stage with desired width,height, X and Y parameters(values) which we mention in "Properties" tab of Properties Window in flash.
Hence, What i need is, (say)a generic ActionScript 3.0 method/function, which places any of the components present in "Components Panel" onto the stage.
i.e., As per my idea, the function prototype or signature may be like this:
**function addComponent(int <width>, int <height>, int <XPos>, int <YPos>)**
Plzzz... Can anyone help me in this context.... It is a general query i think so. i.e., A basic programmer's task for defining a function for my requirement.
I think,if I want to add a Button onto the stage at 100,100 pixel position and the button component's width and height are 50,50 respectively,
**(i.e., button.X=button.Y=100 && button.width=button.height=50).**
So, a button must be placed at 100,100, then, the sample code looks like this:
**Button <btn_instance> = new Button(); //creates Button instance
<btn_instance>.addComponent(50,50,100,100);// properties of button.**
I hope someone is there for me and will help me.
Thanks in advanceā¦
Srihari.Ch