Accessing Library elements


/ Published in: ActionScript 3
Save to your folder(s)

Simple but useful


Copy this code and paste it in your HTML
  1. //Create a movieclip and tick export for actionscript in the creation dialog. Give it a class. That class is how you identify it in your code:
  2.  
  3. //Here, the movieclip's class is Button
  4. var _button:Button = new Button();
  5. function CreateButton() {
  6. this.addChild(_button);
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.