CustomEvent TypeError: Error #1034: Type Coercion failed
Posted in Flash, Problems on April 1st, 2010 by eccheung4TypeError: Error #1034 Type Coercion failed: cannot convert com.events::CustomEvent@###### to com.events.CustomEvent.
at flash.events:EventDispatcher/dispatchEventFunction()
….blah,blah,blah,blah
This was an error I was getting and I couldn’t figure out what was causing it. Turns out its a simple fix. I was loading a swf that dispatches a CustomEvent. To get rid of this error I just needed to import the CustomEvent Class in the main class that is loading the other swf.
import com.events.CustomEvent;
Then somewhere in you main class, you add
CustomEvent;


