Пример #1
0
		private Tag decodePlaceObject2(int length)
		{
			PlaceObject t;
			t = new PlaceObject(Flash.Swf.TagValues.stagPlaceObject2);
			r.syncBits();
			
			int pos = r.Offset;
			
			t.flags = r.readUI8();
			t.depth = r.readUI16();
			
			if (t.hasCharID())
			{
				int idref = r.readUI16();
				t.ref_Renamed = dict.getTag(idref);
			}
			if (t.hasMatrix())
			{
				t.matrix = decodeMatrix();
			}
			if (t.hasCxform())
			{
				// ed 5/22/03 the SWF 6 file format spec says this will be a CXFORM, but
				// the spec is wrong.  the player expects a CXFORMA.
				t.colorTransform = decodeCxforma();
			}
			if (t.hasRatio())
			{
				t.ratio = r.readUI16();
			}
			if (t.hasName())
			{
				t.name = r.readString();
			}
			if (t.hasClipDepth())
			{
				t.clipDepth = r.readUI16();
			}
			if (t.hasClipAction())
			{
				ActionDecoder actionDecoder = new ActionDecoder(r, swd);
				actionDecoder.KeepOffsets = keepOffsets;
				t.clipActions = actionDecoder.decodeClipActions(length - (r.Offset - pos));
			}
			return t;
		}
Пример #2
0
		private Tag decodePlaceObject23(int type, int length)
		{
			PlaceObject t = new PlaceObject(type);
			int pos = r.Offset;
			t.flags = r.readUI8();
			if (type == Flash.Swf.TagValues.stagPlaceObject3)
			{
				t.flags2 = r.readUI8();
			}
			t.depth = r.readUI16();
			if (t.hasClassName())
			{
				t.className = r.readString();
			}
			if (t.hasCharID())
			{
				int idref = r.readUI16();
				t.Ref = dict.getTag(idref);
			}
			if (t.hasMatrix())
			{
				t.matrix = decodeMatrix();
			}
			if (t.hasCxform())
			{
				t.Cxform = decodeCxforma();
			}
			if (t.hasRatio())
			{
				t.ratio = r.readUI16();
			}
			if (t.hasName())
			{
				t.name = r.readString();
			}
			if (t.hasClipDepth())
			{
				t.clipDepth = r.readUI16();
			}
			if (type == Flash.Swf.TagValues.stagPlaceObject3)
			{
				if (t.hasFilterList())
				{
					t.filters = decodeFilterList();
				}
				if (t.hasBlendMode())
				{
					t.blendMode = r.readUI8();
				}
			}
			if (t.hasClipAction())
			{
				ActionDecoder actionDecoder = new ActionDecoder(r, swd);
				actionDecoder.KeepOffsets = keepOffsets;
				t.clipActions = actionDecoder.decodeClipActions(length - (r.Offset - pos));
			}
			return t;
		}