Howdy,
I’m trying to have 2 move-character buttons next to each other for a side-scroller. I had button widgets working perfectly so that if I started a new tap on it it would run and if I moved off of the button it’d stop, and if (in the same touch event) the touch slid back on it’d reactivate. That was great but I was missing the ability to slide from one button onto the other and have it activate the other button.
My first question is, is there some sort of slick way to do this(slide off of one button on the same touch event and have it activate the other button)?
If the first isn’t possible, I’ve also integrated a method that creates my own button with a spritesheet. That is fine and dandy using button:addEventListener(“touch”,button) and a touch function in button; the other button will activate when slid onto. However, I can’t seem to get a moved event once the touch drags off of the button like I could with the button widget, and hence can’t cancel the stuff happening when I slide off of the buttons.
I realize that the event is local to the button and tried doing a touch event at the runtime level, but I can’t get anything to work short of hard-coding in every single coordinate set which doesn’t really work in my implementation. Is there a slick way for a Runtime touch event to realize what object it is currently in?
I’d prefer a solution to the first scenario because the implementation is much easier with that.
Also, I would post the code itself but it’s incredibly modularized and… sprawling :wacko:. It would only give you a headache to sort through it hehe.
Thanks
