var stage = acgraph.create("container");
var textObject = layer.text(70, 55, "Click on this TEXT");
textObject.style({fontSize: "18px"});
textObject.selectable(false);
eventKey = textObject.listen("click", function(e) {
textObject.text("You clicked " + counter + " times. ");
layer.listenOnce("click", function(e) {
textObject.text(textObject.text() + "No more listening.");
textObject.unlistenByKey(eventKey);
function getRandomColor() {
red = Math.floor(Math.random() * (max - min)) + min;
green = Math.floor(Math.random() * (max - min)) + min;
blue = Math.floor(Math.random() * (max - min)) + min;
return "rgb("+ red + "," + green + "," + blue + ")";