actionscript 3.0 type coercion failed when dispatching error event -
i try dispatch error event in as3 application:
dispatchevent( new errorevent( errorevent.error, false, false, "my error message"));
but following runtime error:
typeerror: error #1034: type coercion failed: cannot convert flash.events::errorevent@2c04239 com.adobe.protocols.dict.events.errorevent. @ flash.events::eventdispatcher/dispatcheventfunction() @ flash.events::eventdispatcher/dispatchevent() @ line of code..
these import statements @ top of file:
import flash.display.movieclip; import flash.events.errorevent; import flash.events.event; import flash.events.eventdispatcher; import flash.filesystem.file; import flash.filesystem.filemode; import flash.filesystem.filestream; import flash.security.iuridereferencer; import flash.security.referencesvalidationsetting; import flash.security.revocationchecksettings; import flash.security.signaturestatus; import flash.security.xmlsignaturevalidator; import flash.utils.bytearray; import mx.utils.base64decoder; import mx.utils.base64encoder; import mx.utils.sha256;
what's going on?
thanks
sometimes that... happens. between ide , flash's ability confused, i'm surprised doesn't happen more. suspect error in listener though.
change event handler specify flash.events.errorevent
.
function errorhandler( event:flash.events.errorevent ):void
if doesn't work, can either handle all events or can use qualified name while constructing errorevent.
Comments
Post a Comment