Posted By

sHamilton on 07/24/06


Tagged

class


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

damarev
bicherele
horizens
chrisaiv
andrewrench
yeco
jschilling


AS2 class template


 / Published in: ActionScript
 

basic template for AS2 class

  1. /** Project:
  2. File: untitled
  3. Purpose:
  4. Usage:
  5. Created On: 2006-07-24
  6.  
  7. (c) 2006 Stephen.Hamilton MRM World */
  8.  
  9. //import com.ClassName
  10.  
  11. class com.untitled extends MovieClip
  12. {
  13. /** PRIVATE PROPERTIES:
  14. * ------------------- */
  15. private var _propName:String;
  16.  
  17. /** CONSTRUCTOR:
  18. * ------------ */
  19. function untitled ()
  20. {
  21. super();
  22. }
  23.  
  24. /** PUBLIC METHODS:
  25. * ---------------- */
  26. public function init(arg:Object):Void
  27. {
  28. trace("init "+this)
  29. }
  30.  
  31. /** EVENTS:
  32. * ------- */
  33. public function eventMethod(arg:String):Void
  34. {
  35. }
  36.  
  37. /** GETTERS/SETTERS:
  38. * ------- */
  39. public function set propName(arg:String):Void
  40. {
  41. _propName = arg;
  42. }
  43. public function get propName():String
  44. {
  45. return _propName
  46. }
  47.  
  48. /** PRIVATE METHODS:
  49. * ----------------*/
  50. private function cleanUp():Void
  51. {
  52. }
  53. private function privateMethod(arg:String):Void
  54. {
  55. }
  56.  
  57. /**
  58. * When movieclip and children have loaded, start application */
  59. private function onLoad():Void
  60. {
  61. }
  62. }

Report this snippet  

You need to login to post a comment.