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
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