Exemplo n.º 1
0
        /// <summary>
        /// Parses this object out of a stream
        /// </summary>
        protected override void Parse()
        {
            BinaryReader br = new BinaryReader(this._dataStream);
            BitStream bs = new BitStream(this._dataStream);

            this.ParseFlags(br, bs);

            this._Depth = br.ReadUInt16();

            if (this._PlaceFlagHasClassName)
            {
                this._ClassName = SwfStrings.SwfString(this._SwfVersion, br);
            }

            if (this._PlaceFlagHasCharacter)
            {
                this._CharacterID = br.ReadUInt16();
            }

            if (this._PlaceFlagHasMatrix)
            {
                Matrix m = new Matrix(this._SwfVersion);
                m.Parse(this._dataStream);
                this._TransformMatrix = m;
            }

            if (this._PlaceFlagHasColorTransform)
            {
                CxFormWithAlpha cx = new CxFormWithAlpha(this._SwfVersion);
                cx.Parse(this._dataStream);
                this._CxFormWithAlpha = cx;
            }

            if (this._PlaceFlagHasRatio)
            {
                this._Ratio = br.ReadUInt16();
            }

            if (this._PlaceFlagHasName)
            {
                this._Name = SwfStrings.SwfString(this._SwfVersion, br);
            }

            if (this._PlaceFlagHasClipDepth)
            {
                this._Depth = br.ReadUInt16();
            }

            if (this._PlaceFlagHasFilterList)
            {
                FilterList fl = new FilterList(this._SwfVersion);
                fl.Parse(this._dataStream);
                this._SurfaceFilterList = fl;
            }

            if (this._PlaceFlagHasBlendMode)
            {
                this._BlendMode = (BlendMode)br.ReadByte();
            }

            if (this._PlaceFlagHasCacheAsBitmap)
            {
                this._BitmapCache = br.ReadByte();
            }

            if (this._PlaceFlagHasClipActions)
            {
                ClipActions ca = new ClipActions(this._SwfVersion);
                ca.Parse(this._dataStream);
                this._ClipActions = ca;
            }
        }