本文整理匯總了TypeScript中openfl/utils/ByteArray.writeByte函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript writeByte函數的具體用法?TypeScript writeByte怎麽用?TypeScript writeByte使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了writeByte函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it ("testReadSignedShort", function () {
var data:ByteArray = new ByteArray();
data.endian = Endian.LITTLE_ENDIAN;
data.writeByte(0x10); data.writeByte(0xAA);
data.writeByte(0x6B); data.writeByte(0xCF);
data.position = 0;
assert.equal(data.readShort(), -22000);
assert.equal(data.readShort(), -12437);
});
示例2: function
var flipBytes = function (read:ByteArray, write:ByteArray, readOffset:number, writeLength:number):void {
for (var i = 0; i < writeLength; i++) {
read.position = readOffset + (writeLength - 1 - i);
write.writeByte (read.readByte ());
}
}