AS3 ByteArray with multiple parts
I'm thinking about distributing bytes of a SWF into multiple files, how can i put a set of bytes in different parts into one byte array?
E.G:
var bytesPartOne:ByteArray;
var bytesPartTwo:ByteArr开发者_如何学Pythonay;
var bytesPartThree:ByteArray;
var bytesPartFour:ByteArray;
Into one byte array?
var totalBytes:ByteArray;
Also would reading partial bytes into a byte array work?
Into one byte array?
var totalBytes:ByteArray = new ByteArray;
totalBytes.writeBytes(bytesPartOne);
totalBytes.writeBytes(bytesPartTwo);
totalBytes.writeBytes(bytesPartThree);
totalBytes.writeBytes(bytesPartFour);
Note : Be sure that bytesPartOne/two/Three/Four have position set to zero (can be done by bytesPartOne.position = 0, ...)
Also would reading partial bytes into a byte array work?
What do you mean by partial bytes ?
精彩评论