1 decade ago by neogope
Hi all,
at the moment I am a little bit stuck. If I trigger an event in Ejecta with:
How do I listen to it in the ImpactJS App? I've tried this
but the callback function never gets executed, even if the event is triggered in the Ejecta code. Do I miss something here with the EventListener? (If I check for the event "touchstart" it is called as soon as I touch the screen .. )
Thanks for your help!
EDIT: Okay, never mind, found it. Had to attach the EventListener to the Object, where I fired the event ..
at the moment I am a little bit stuck. If I trigger an event in Ejecta with:
[self triggerEvent:@"XYZ" argc:0 argv:NULL]; ... EJ_BIND_EVENT(XYZ)
How do I listen to it in the ImpactJS App? I've tried this
document.addEventListener( "XYZ", function() { ig.game.indicators.x = 'success'; }, false );
but the callback function never gets executed, even if the event is triggered in the Ejecta code. Do I miss something here with the EventListener? (If I check for the event "touchstart" it is called as soon as I touch the screen .. )
Thanks for your help!
EDIT: Okay, never mind, found it. Had to attach the EventListener to the Object, where I fired the event ..