Reputation: 185
I am trying to listen to a an event that is fired by a game when it is fully loaded.
window.addEventListener('gameReady', function(event) {
console.log(event.data);
});
I know that the gameReady is fired when it is ready to play. IS the above code correct and is there anyway way I can view NON CLICK/INTERFACE events in the Chrome console?
Thanks
Upvotes: 0
Views: 301
Reputation: 24
Use ExternalInterface to call javascript functions.
if (ExternalInterface.available)
{
ExternalInterface.call('console.log', event.data);
}
Just remember that console.log might not be able to process flash objects.
Upvotes: 1