(function() { var _this; Messages.subscribe(MIDI_CHANNEL); // Messages.sendMessage(GAME_CHANNEL, JSON.stringify({action: 'scriptLoaded'})); midiEntity = function() { _this = this; } midiEntity.prototype = { clickReleaseOnEntity: function() { print("clicked.." + JSON.stringify(entityItemID)) // send the sound event Messages.sendMessage(GAME_CHANNEL, "hello"); } } return new midiEntity(); })