Check out this simple attachment. You got your as
my_btn.onRelease = function() {
trace(“It worked”);
}
The Instance Name on the button is my_btn. Ok, why does it work if the as is on the same frame as the button but not if you move the button over a frame. I thought the point of using a function was that you only need to write it once. I don’t want to put this function on every frame where the button is located.
What am I missing here?