Hey guys
I'm currently banging my head against a brick wall trying to call a parent function with the HTML5 Canvas.
I have the following code on the stage:
function fromStage()
{
console.log("This is on the stage");
}
fromStage();
This correctly outputs that message to the console in the browser.
However, I have a button within a movie clip that I want to call this function from, my code in that movie clip is as follows:
this.theButton.addEventListener("click", fl_MouseClickHandler.bind(this));
this.theButton.name = "theButton";
function fl_MouseClickHandler(e)
{
this.parent.fromStage();
}
However, this doesn't appear to be working, any ideas?
Thanks