Ejemplo n.º 1
0
 public Rect(SWFReader swf)
 {
     int nBits = (int)swf.ReadUB(5);
     xMin = swf.ReadSB(nBits);
     xMax = swf.ReadSB(nBits);
     yMin = swf.ReadSB(nBits);
     yMax = swf.ReadSB(nBits);
 }
Ejemplo n.º 2
0
        public Rect(SWFReader swf)
        {
            int nBits = (int)swf.ReadUB(5);

            xMin = swf.ReadSB(nBits);
            xMax = swf.ReadSB(nBits);
            yMin = swf.ReadSB(nBits);
            yMax = swf.ReadSB(nBits);
        }
Ejemplo n.º 3
0
        public SWFFile(string fileName)
        {
            this.fileName = fileName;
            

            this.stream = new FileStream(this.fileName, FileMode.Open, FileAccess.Read);
            this.swf = new SWFReader(this.stream);

            if (ReadHeader())
            {
                // Just identify the tag types
                // ** This would normally be the place to start processing tags **
                IdentifyTags();
            }
        }
Ejemplo n.º 4
0
        public SWFFile(string fileName)
        {
            this.fileName = fileName;
            TraceManager.Add(String.Format("File        : {0}", this.FileName));

            this.stream = new FileStream(this.fileName, FileMode.Open, FileAccess.Read);
            this.swf    = new SWFReader(this.stream);

            if (ReadHeader())
            {
                // Just identify the tag types
                // ** This would normally be the place to start processing tags **
                IdentifyTags();
            }
        }
Ejemplo n.º 5
0
        public Tag(SWFReader swf)
        {
            ushort tagInfo = swf.ReadUI16();
            this.id = (ushort)(tagInfo >> 6);
            this.length = (ulong)(tagInfo & 0x3f);

            // Is this a long data block?
            if (this.length == 0x3f)
            {
                this.length = swf.ReadUI32();
            }
            Trace.WriteLine(String.Format("Tag         : {0}", GetType(this.ID)));

            // For now, just skip the remainder of the tag
            // ** This is normally where you'd process each tag in the file **
            for (ulong index = 0; index < length; index++)
            {
                swf.Stream.ReadByte();
            }
        }
Ejemplo n.º 6
0
        public Tag(SWFReader swf)
        {
            ushort tagInfo = swf.ReadUI16();

            this.id     = (ushort)(tagInfo >> 6);
            this.length = (ulong)(tagInfo & 0x3f);

            // Is this a long data block?
            if (this.length == 0x3f)
            {
                this.length = swf.ReadUI32();
            }
            Trace.WriteLine(String.Format("Tag         : {0}", GetType(this.ID)));

            // For now, just skip the remainder of the tag
            // ** This is normally where you'd process each tag in the file **
            for (ulong index = 0; index < length; index++)
            {
                swf.Stream.ReadByte();
            }
        }