hi, lets say I create a btn and named it “sample1” in a mc named “aboutus”. then I want when this btn inside the aboutus mc clicked, will pass it to a function named btnclicked() and then the function will perform some animation according to the mc name the parameters sent. The mc script is as below:
onClipEvent(enterFrame)
{
this.sample1.onRelease = btnclicked("aboutus");
}
And I coding the function at the timeline of this mc:
function btnclicked(aaa)
{
_root.aaa.gotoAndPlay(1);
}
It failed to run. I think I dunno how to passing the parameter from the mc to the function and in the function execute the animation by referencing the mc name. Someone pls corrent me. Thanks!