title: Override Clone() in custom event for AS3... need help
body: <p>I have created a custom even class which is pretty basic. But when calling an event and then relaying that event to another class I have encountered the "cannot transform thisEvent into thisOtherEvent" error.  </p>
  
  <p>I realize this is because I needed to override the Clone function in my custom event like so:</p>
  
  <pre><code>package com
  {
  
   import flash.disply.*;
   import flash.events.Event;
  
   public class MyCustomEvents extends Event
   {
  
    public static const SOME_EVENT:String = "some_event";
    public var info:Object;
  
    public function MyCustomEvents($type:String, $info:Object,$bubbles:Boolean = false, $cancelable:Boolean = false)
    {
  
     super($type, $bubbles, $cancelable);
     this.info = $info;
  
    }
  
    public override function clone():Event {
     return new MyCustomEvents($type, $bubbles, $cancelable);
    }
  
   }
  }
  </code></pre>
  
  <p>However I am still getting this error when I dispatch the event.  Anything else I might be missing?</p>
  
  <p>here is the error:
  <code>TypeError: Error #1034: Type Coercion failed: cannot convert com.greensock.events::TransformEvent@d8df709 to com.customEvents.MyCustomEvents.</code> </p>
  
  <p>I tried casting the event in the code like so: </p>
  
  <pre><code>var deleteImgEvent:MyCustomEvent = new MyCustomEvent(MyCustomEvents.IMAGE_DELETE, {imgData: getImg}, true, false); this.dispatchEvent(deleteImgEvent as MyCustomEvents);
  </code></pre>
  
  <p>Still no luck.</p>
  
  <p>UPDATE:</p>
  
  <p>Ok, seems like the problem is in the greensock Transform library. When the event handler for my custom event is called, I run a function of the TransformManager class.</p>
  
  <pre><code>_manager.deleteSelection();
  </code></pre>
  
  <p>Inside that class it dispatched a TransformEvent.  Not sure why, but it is reading that delete event as a MyCustomEvent. </p>