I receive this error by running the function below.
TypeError: Error #1034: Type Coercion failed: cannot convert flash.utils::ByteArray@30e3fa1 to flash.events.Event.
uploadImage(e.currentTarget.byteArray)
function uploadImage(e:Event):void
{
var byteArrayAsString = Base64.encode(e.currentTarget.byteArray);
}
Does somebody knows what I need to change?
Thanks
You are passing a
ByteArrayto a function that only accepts anEvent. Change it touploadImage(e)to pass the entire event object. But, honestly, you might want to go back and review some language fundamentals. No offense, but it’s pretty obvious whats wrong, if you even are vaguely aware of programming.