I make escape games and often have lots of items in a scene each with flash instance names that on mouse over or mouse click make some event happen or some text is displayed.
I'm using Flash CC and HTML 5 output and cannot get it to output the instance names in the log, is this not possible? Can anyone suggest an alternative method of responding to lots of movieclips/buttons etc
Here's my test code:-
//stage.enableMouseOver(24);
var clicked = "";
var clickedname = "";
//NEED TO FIND OUT MOVIECLIP INSTANCE NAME??
var key1 = exportRoot.key1
//key1.name = "key1"
//console.log(key1ref.name)
stage.on("click", function (evt) {
//clickedname = stage.getObjectUnderPoint(evt.stageX, evt.stageY)
//clicked = evt.target
clicked = evt.target
console.log(clicked)
//output result to log
/*if (clicked == "key1"){
console.log("clicked key 1")
}*/
});