How To Determine An Instance Name When Adding A Movie Clip From The Library In Animate CC
Hi,
I have the following code -
var fl_MyInstance = new lib.ResetBtns();
this.ShowReset.addEventListener("click", fl_MouseClickHandler_2.bind(this));
function fl_MouseClickHandler_2() {
this.addChild(fl_MyInstance);
fl_MyInstance.x = 219.05;
fl_MyInstance.y = 110.55;
} //This code adds a MC from the library and works just fine
//This code should call the alert command and does not work
this.ResetButtons.ResetSVDU.addEventListener("click", fl_MouseClickHandler.bind(this));
function fl_MouseClickHandler() {
alert("Mouse clicked");
}
The name of the libary item I'm adding is ResetButtons. The Linkage name is ResetBtns.
ResetSVDU is a button within the ResetButtons MC.
I've tried ResetButtons, ResetBtns, and fl_MyInstance but I can't get to the ResetSVDU button to trigger the alert command.
My question is, what name should I use in the following line?
this.????.ResetSVDU.addEventListener("click", fl_MouseClickHandler.bind(this));
Thanks
