I've some problem in sending a simple message in overlay-example of Minko library.
I tried use the c++ code of this example without modifying it, while I add a Minko.addListener
in my javascript.
The code of the js is here:
<html>
<head>
</head>
<body>
<script>
Minko.addEventListener("hello", function() {
/* simply replace ":" with <-----> */
document.getElementById("gameTimeLeftSeparator").textContent = "<------>"
});
</script>
<body>
<div id="content">
<div id="scoreBanner">
<div id="scoreBannerBackground"></div>
<div class="teamScore" id="teamScoreRed">0</div>
<div class="teamScore" id="teamScoreBlue">0</div>
<div class="gameTimeLeft" id="gameTimeLeftMn">0</div>
<div class="gameTimeLeft" id="gameTimeLeftSeparator">:</div>
<div class="gameTimeLeft" id="gameTimeLeftSec">0</div>
</div>
</div>
<body >
</body>
</html>
I really don't understand where is the problem. I add the listener, and my very simple function (tested with a classical addListener("click", ... )
is working.
Here I use Minko.addListener("hello", ... )
that is sent by c++ (line 113 of the main.cpp of that example).