Your addNewLinkButton1 function is expecting a MouseEvent object.
So the function should look something like this:
public function addNewLinkButton1( event:MouseEvent ):void
{
Alert.show('Clicked');
}
The reason this is different than the addNewLinkButton function is
because of the way compiler generates actionscript from MXML. The
generated actionscript calls your addNewLinkButton
function from the Click listener function of the LinkButton object
created in the MXML.
Something like this:
linkButton0.addEventListener( MouseEvent.CLICK,
linkButton0_click_listener );
function linkButton0_click_listener( event:MouseEvent ):void
{
this.addNewLinkButton();
}
--- In [email protected], "yourName" <[EMAIL PROTECTED]> wrote:
>
> Plz Help me in this code when i clicked newly created button i got
following error
>
> ArgumentError: Error #1063: Argument count mismatch on copy/
addNewLinkButton1(). Expected 0, got 1.
>