If I want to switch between using MouseEvents or TouchEvents, can I use a global variable to switch between the two?
var myEvent:String = new String();
myEvent = "MouseEvent.MOUSE_UP" ;
// myEvent = "TouchEvent.TOUCH_TAP" ;
This does not work, but was wondering if there was a correct way to accomplish this so that I could switch between input modes easily when testing across different devices?
don't use quotes:
myEvent = MouseEvent.MOUSE_UP;
// myEvent = TouchEvent.TOUCH_TAP;