package events {

    import flash.events.Event;

    public class MyCustomEvent extends Event {

        // custom data to be passed with
        // each triggering of the event
        public var state:String;
        
        // the string used as the event name
        // the variable name will show up under auto-complete
        // the value is used to announce what type of event a class
        // or component will listen for
        public static const MY_CUSTOM_EVENT:String = 'MyCustomEvent';        

        public function MyCustomEvent(theState:String, type:String, bubbles:Boolean) {
            // implement the event class
            super(type,bubbles);
            // set the value of the current value of 'state' inside the class
            this.state = theState;
        }
        /*
        override public function clone():Event {
            return new MyCustomEvent(state, type, bubbles);
        }
        */
    }
}