My AS2 class template

Flash Add comments

I use the following in SEPY (by Alessandro Crugnola) as a AS2 class template. To use it, just copy the code and save it in a *.as file ("ClassTemplate.as" for examle). Put that file in the snippets directory in your SEPY installation folder and start SEPY.

Now go to the Snippets panel. The "ClassTemplate" should be there. If it is not, add the path to your snippets directory by pressing the button "Change Snippets working directory" (it is represented by an icon in the Snippets panel).

To use the template, open a new file and double-click the template. It will be inserted in your actionscript file, but before that it will prompt you to enter some variables. The variables are detected because they start with "@@" and end with "@@".

So just fill them in, hit the "ok" button and let SEPY do the rest. ;-)

Hope this helps you.

Actionscript:
  1. //==================================================================
  2. //   PACKAGE
  3. //==================================================================
  4. //   package @@package@@
  5.  
  6.  
  7.  
  8. //==================================================================
  9. //   IMPORTS
  10. //==================================================================
  11. //   none
  12.  
  13.  
  14.  
  15. /**
  16. * Class Description
  17. *
  18. * @author Christophe Herreman
  19. * @since @@date@@
  20. */
  21. class @@package@@.@@className@@
  22. {
  23.    //==================================================================
  24.    //   STAGE INSTANCES
  25.    //==================================================================
  26.    //   none
  27.  
  28.  
  29.  
  30.    //==================================================================
  31.    //   PRIVATE PROPERTIES
  32.    //==================================================================
  33.    //   none
  34.    
  35.    
  36.    
  37.    //==================================================================
  38.    //   PUBLIC PROPERTIES
  39.    //==================================================================
  40.    //   none
  41.    
  42.    
  43.    
  44.    //==================================================================
  45.    //   CONSTRUCTOR
  46.    //==================================================================   
  47.       public function @@className@@(){
  48.       }
  49.    
  50.    
  51.    
  52.    //==================================================================
  53.    //   PRIVATE METHODS
  54.    //==================================================================
  55.    //   none
  56.    
  57.    
  58.    
  59.    //==================================================================
  60.    //   PUBLIC METHODS
  61.    //==================================================================
  62.    //   none
  63.  
  64.  
  65.  
  66.    //==================================================================
  67.    //   EVENT HANDLERS
  68.    //==================================================================
  69.    //   none
  70. }


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

One Response to “My AS2 class template”

  1. martin Says:

    I love the one above, but I would like to see this with some code in it, to really grasp how you really take the usage to fully with this template.

    thanks

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in