Posted By

adrianparr on 11/07/09


Tagged

basic class template default document flashdevelop


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

mali
davidino1978


Basic Document Class Template, as Created by FlashDevelop


 / Published in: ActionScript 3
 

  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  

You need to login to post a comment.