I am reading in a ByteArray object from an ExternalInterface
call which is obtaining the ByteArray
from another SWF
. The reason for the Javascript
conduit is because the ByteArray
data exceeds the 40k
limit of the LocalConnection class
.
I'm getting the following error:
TypeError: Error #1034: Type Coercion failed: cannot convert Object@d6f48e1 to flash.utils.ByteArray.
with this line of code:
swfBytes = ExternalInterface.call("getBytes", cacheIdx);
swfBytes is an initialized ByteArray object. I'm confident my call to getBytes() is returning a ByteArray object because if I run the following line of code, I get the number of bytes being passed.
ExternalInterface.call("getBytes", cacheIdx).bytesAvailable;
Any help is greatly appreciated.