/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
package { import flash.events.Event; /** * ... * @author Jeff Nehlsen */ public class CustomEvent extends Event { // Event types. public static const EVENT_DEFAULT:String = "event1"; public static const EVENT_CUSTOM:String = "event2"; public function CustomEvent(type:String = CustomEvent.EVENT_DEFAULT, bubbles:Boolean = false, cancelable:Boolean = false) { super(type, bubbles, cancelable); } override public function clone():Event { // Return a new instance of this event with the same parameters. return new CustomEvent(type, bubbles, cancelable); } } }