Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        protected override byte[] CompileBody()
        {
            SwfStream stream = new SwfStream();

            stream.WriteShort(Tag);
            stream.WriteInt(0);
            stream.WriteBytes(Data);
            return(stream);
        }
Esempio n. 3
0
        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);
        }