How to make .on and .addEventListener code versions work?
Hi, I'm just trying to figure out how the codes work. I know .on is like a shortcut and it works like this:
this.circle_mc.on("pressmove", function (evt) {
var point = stage.globalToLocal(evt.stageX, evt.stageY)
evt.currentTarget.x = point.x;
evt.currentTarget.y = point.y;
});
so I thought the .addEventListener way would work too, but it doesn't.
this.circle_mc.addEventListener("pressmove", evt.bind(this));
function evt() {
var point = stage.globalToLocal(evt.stageX, evt.stageY)
this.circle_mc.x = point.x;
this.circle_mc.y = point.y;
}
but it doesn't. How do you make the .addEventListener version work?
