How check for Events?

Made events in the editor, they are showing up in the exported .json all fine. But how do you check for them?

Tried the following within the enterFrame runtime function. Example here trying to find “titleIn” event name.

– Check for events
if skeleton.state.Event == “titleIn” then
print(“titleIn”); end

This doesn’t work because the field ‘state’ is nil but I can’t find anywhere in the user guide which describes how to do this more accurately…

You have different event listeners for different events. enterFrame events occur every frame (hence the name). If you are doing events which are (say) collisions, or transition points in composer you have to listen for them explicitly.

Oh cool, thanks for the help Paul. So another runtime, enterFrame eventListener (already have one updating skeleton and delta)?

What would be the kind of function to listen for Spine events? Your help here would be great as it’s been really difficult to get a response out there on matters Spine/Corona.

Would depend on spine :slight_smile: But they are basically the same idea - there are generic system ones - runtime event listeners (like enterFrame) that anyone can listen for, and the ones specific to individual things - like say tap and touch, which send a message only to the thing that has been tapped or touch.

It’s the same basic idea - there is a function/method called whenever some event happens, and you tell the message source that you want to be told about events.

Spine is a bit of a mess I think ; the library is v1 only ?

Oh ok yeah, I get the runtime event aspect, in fact I already have one updating state and delta. I’m looking specifically for the method to obtain the event information in the .json file exported from the Spine editor. Any ideas there?

No idea, sorry, you’ll have to ask the Spine people. As their lib is o/s it should be possible to find it :slight_smile:

I have posted on the Esoteric Spine forum. This is also a Spine thread so if anyone on here knows how to check for Events in Corona, it would be great to hear how it’s done?

Just in case anyone is following, the answer is here:

http://esotericsoftware.com/forum/viewtopic.php?f=7&t=2663

You have different event listeners for different events. enterFrame events occur every frame (hence the name). If you are doing events which are (say) collisions, or transition points in composer you have to listen for them explicitly.

Oh cool, thanks for the help Paul. So another runtime, enterFrame eventListener (already have one updating skeleton and delta)?

What would be the kind of function to listen for Spine events? Your help here would be great as it’s been really difficult to get a response out there on matters Spine/Corona.

Would depend on spine :slight_smile: But they are basically the same idea - there are generic system ones - runtime event listeners (like enterFrame) that anyone can listen for, and the ones specific to individual things - like say tap and touch, which send a message only to the thing that has been tapped or touch.

It’s the same basic idea - there is a function/method called whenever some event happens, and you tell the message source that you want to be told about events.

Spine is a bit of a mess I think ; the library is v1 only ?

Oh ok yeah, I get the runtime event aspect, in fact I already have one updating state and delta. I’m looking specifically for the method to obtain the event information in the .json file exported from the Spine editor. Any ideas there?

No idea, sorry, you’ll have to ask the Spine people. As their lib is o/s it should be possible to find it :slight_smile:

I have posted on the Esoteric Spine forum. This is also a Spine thread so if anyone on here knows how to check for Events in Corona, it would be great to hear how it’s done?

Just in case anyone is following, the answer is here:

http://esotericsoftware.com/forum/viewtopic.php?f=7&t=2663