// Register event lister and store in "evt"
var evt = myEntity.on('mouseDown', function () { console.log('down'); });
// Set a listener to listen for the data (multiple values emitted
// from an event are passed as function arguments)
myEntity.on('hello', function (arg1, arg2) {
console.log(arg1, arg2);
}
// Emit the event named "hello"
myEntity.emit('hello', ['data1', 'data2']);
// The console output is:
// data1, data2