porting event listeners

For developers using the Construct 2 Javascript SDK

Post » Mon Aug 08, 2016 4:18 am

How do you port an event listener to a construct 2 conditional?

I'm trying to port MIDI.js but don't know how to integrate the MIDI.Player.addListener(function(data) {} ) conditional.

Does this make sense? If anybody requires more information to help answer my question, please let me know :)

p.s. yes, I am aware that there is already a MIDI.js port but MIDI is integral to my project and I require a high level of control over how this plugin works :)
B
12
S
2
Posts: 39
Reputation: 1,082

Post » Mon Aug 08, 2016 5:03 am

Here's a recent example of making a callback:
keyboard-plugin-how-do-i-detect-non-ascii-character_p1059649?#p1059649

Basically you add the function object ad you can then use:
c2_callFunction() in javascript to call a c2 function.
B
94
S
33
G
118
Posts: 5,393
Reputation: 75,847

Post » Mon Aug 08, 2016 5:13 am

Here is another midi plugin.
I also have one midi plugin.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests