protected override byte[] CompileBody() { SwfStream stream = new SwfStream(); if (TagArray.Length != NameArray.Length) { throw new Exception("Names length and Tags length are not equal in SymbolClassTag"); } stream.WriteShort((short)TagArray.Length); for (int i = 0; i < TagArray.Length; i++) { stream.WriteShort(TagArray[i]); stream.WriteString(NameArray[i]); } return(stream); }
protected override byte[] CompileBody() { SwfStream stream = new SwfStream(); stream.WriteShort(Tag); stream.WriteInt(0); stream.WriteBytes(Data); return(stream); }
public byte[] Compile() { SwfStream stream = new SwfStream(); byte[] body = CompileBody(); if (body.Length >= 63) { stream.WriteShort((short)((Code << 6) | 63)); stream.WriteInt(body.Length); } else { stream.WriteShort((short)((Code << 6) | body.Length)); } stream.WriteBytes(body); return(stream); }