Hi guys, after a lot of fiddling and researching and retrying I was finally able to load bytes from a swf file on HTML5.
The next step was to load these bytes to a SWF instance to create a movieclip from the bytes. The ByteArray
length is 195646
and is matching the file size. And this is when I get this error in the web console. Here is the content of the function after the swf file was loaded:
var loader = cast(e.target, URLLoader);
var dbyteArray:Dynamic = loader.data;
trace( "byteArray : " + dbyteArray );
var byteArray:Dynamic = cast dbyteArray;
trace( "byteArray : " + byteArray.length );
var swfba = new SWF(byteArray);
// The execution stops here with the error "OutsideBounds"
trace( "swfba : " + swfba.data.fileLength );
var mc = swfba.createMovieClip();
trace( "mc : " + mc );
Am I doing something wrong?