Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jarkkosyrjala/6316791 to your computer and use it in GitHub Desktop.
Save jarkkosyrjala/6316791 to your computer and use it in GitHub Desktop.
Enabling instance names (.name property) in JavaScript library exported from Flash Professional / Toolkit for CreateJS.
var someContainer=new lib.SomeContainer();
for(var childName in someContainer){
if(someContainer[childName] instanceof createjs.DisplayObject) {
someContainer[childName].name=childName;
console.log(childName+" now has a name!!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment