IntelliJ template - Event


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

File > Settings... > File and Code Templates


Copy this code and paste it in your HTML
  1. #parse("ActionScript File Header.as")
  2. package ${PACKAGE_NAME}#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "") #end{
  3. import flash.events.Event;
  4.  
  5. public class ${NAME} extends Event {
  6.  
  7. public function ${NAME}(type:String, bubbles:Boolean = false, cancelable:Boolean = false) {
  8. super(type, bubbles, cancelable);
  9.  
  10. }
  11.  
  12. public override function clone():Event {
  13. return new ${NAME}(type, bubbles, cancelable);
  14. }
  15.  
  16. public override function toString():String {
  17. return formatToString("${NAME}", "type", "bubbles", "cancelable", "eventPhase");
  18. }
  19.  
  20. }
  21. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.