Hi there,
I have this simple function that is used in my application to generate a
TitleWindow.
private function loadAddCustomerForm():void {
var form:addCustomer=addCustomer(PopUpManager.createPopUp( this,
addCustomer , true));
var dx:Number = (mainPanel.width - form.width)/2;
var dy:Number = (mainPanel.height - form.height)/2;
form.x=dx;
form.y=dy;
}
This works perfect but I want to alter this so that I can use the same
function to generate similar forms. i.e. I don't want to declare this
function for every single form that I want to create. All I want is to pass
a parameter, let's say loadForm('addCustomer'), which will do exactly the
same thing as the above, but also assign the name 'addCustomer' into the
form.
Any help ? :-)
Thanks,
George