Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setClickHandler property not working

Status
Not open for further replies.

womblies

Programmer
Feb 28, 2003
62
IE
i attaching a button to the stage by the means of attach movie and i want to set the click hander to call a function(click) but it is not doing this, it will set the label .

createEmptyMovieClip("button", 1);
button.attachMovie("FPushButtonSymbol", "my_button2", 0);
button.my_button2.setLabel("click");
button.my_button2.setClickHandler("click");

function click(){
trace("hello2");
}
i know it can be done another way ie.
shane.my_button2.onRelease = function(){
trace("hello");
}
but this is of no use to me
has anyone got any ideas on why setClickHandler is not working
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top