Schrodinger
Golden Member
I have two layers: 'actions' and 'display' both 1 frame long
On the 'display' layer I have a button component, buttonFooBar
In the 'action' layer actionscript, I added:
lo = new Object();
lo.click = function(evt){
trace("TESTING 1 2 3...");
}
buttonFooBar.addEventListener("click", lo);
And it doesnt output when I click! (I open the output dialog when I run the movie)
same goes for:
function click(evt){
trace("TESTING 1 2 3...");
}
buttonFooBar.addEventListener("click", this);
I don't know what I'm doing wrong. I tried even doing _root. and root. before the button name.addEventListener
Any ideas? Its probably something simple and stupid but I can't see it for the life of me.
Keep in mind this code to add the event listener is in the 'actions' layer and the button is on another ('display')
thanks for lookin 🙂
On the 'display' layer I have a button component, buttonFooBar
In the 'action' layer actionscript, I added:
lo = new Object();
lo.click = function(evt){
trace("TESTING 1 2 3...");
}
buttonFooBar.addEventListener("click", lo);
And it doesnt output when I click! (I open the output dialog when I run the movie)
same goes for:
function click(evt){
trace("TESTING 1 2 3...");
}
buttonFooBar.addEventListener("click", this);
I don't know what I'm doing wrong. I tried even doing _root. and root. before the button name.addEventListener
Any ideas? Its probably something simple and stupid but I can't see it for the life of me.
Keep in mind this code to add the event listener is in the 'actions' layer and the button is on another ('display')
thanks for lookin 🙂