Hola everyone! Question: is there way to pass other variables with an event handler? Example:
touchHander = (event, layer, othervariable)
layer.on(Events.TouchStart, touchHandler <-- pass othervariable here)
If I were to do (..., touchHandler(other variable)), it just executes the function when I am setting up the handler.
Not like this. I'd recommend using a closure in coffee script like this: http://stackoverflow.com/questions/11869270/coffeescript-do-pass-argument
Koen Bok Thanks Koen, I'll check it out.
Nice. I've wondered that before as well. Post an example here when you get an example together Joshua.
Jordan Robert Dobson Will do!