Basic Document Class Template, as Created by FlashDevelop


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



Copy this code and paste it in your HTML
  1. package
  2. {
  3. import flash.display.Sprite;
  4. import flash.events.Event;
  5.  
  6. /**
  7. * ...
  8. * @author <YourNameHere>
  9. */
  10. public class Main extends Sprite
  11. {
  12.  
  13. public function Main():void
  14. {
  15. if (stage) init();
  16. else addEventListener(Event.ADDED_TO_STAGE, init);
  17. }
  18.  
  19. private function init(e:Event = null):void
  20. {
  21. removeEventListener(Event.ADDED_TO_STAGE, init);
  22. // entry point
  23. }
  24.  
  25. }
  26.  
  27. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.