[FONT=Arial]Hi,[/FONT]
[FONT=Arial]I have 20 buttons on stage and I want to make rollover and rollout effect on them. So I make function for rollover and out effect and that function needs argument (name of button on which rollover effect will be used).[/FONT]
[FONT=Arial]How can I pass arguments to function ??[/FONT]
[FONT=Arial]In this example function is called automatically but I wan to call only on rollover event.[/FONT]
[FONT=Arial]Thanks[/FONT]
[FONT=Courier New]var out:TextFormat = new TextFormat();[/FONT]
[FONT=Courier New]out.font = "Arial";[/FONT]
[FONT=Courier New]out.size = 11;[/FONT]
[FONT=Courier New]out.color = 0xffffff;[/FONT]
[FONT=Courier New]var over:TextFormat = new TextFormat();[/FONT]
[FONT=Courier New]over.font = "Arial";[/FONT]
[FONT=Courier New]over.size = 11;[/FONT]
[FONT=Courier New]over.color = 0x000000;[/FONT]
[FONT=Courier New]button1_mc.onRollOver = on_roll_over(this);[/FONT]
[FONT=Courier New]button1_mc.onRollOut = on_roll_out(this);[/FONT]
[FONT=Courier New]function on_roll_over(button_Name){[/FONT]
[FONT=Courier New] button_Name.label_txt.setTextFormat(over);[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New]function on_roll_out(button_Name){[/FONT]
[FONT=Courier New] button_Name.label_txt.setTextFormat(out);[/FONT]
[FONT=Courier New]}[/FONT]