예제 #1
0
		public virtual void  placeObject23(PlaceObject tag)
		{
			tagw.writeUI8(tag.flags);
			if (tag.code == flash.swf.TagValues_Fields.stagPlaceObject3)
			{
				tagw.writeUI8(tag.flags2);
			}
			tagw.writeUI16(tag.depth);
			if (tag.hasClassName())
			{
				tagw.writeString(tag.className);
			}
			if (tag.hasCharID())
			{
				int idref = dict.getId(tag.ref_Renamed);
				tagw.writeUI16(idref);
			}
			if (tag.hasMatrix())
			{
				encodeMatrix(tag.matrix, tagw);
			}
			if (tag.hasCxform())
			{
				// ed 5/22/03 the SWF 6 file format spec says this should be a CXFORM, but
				// the spec is wrong.  the player expects a CXFORMA.
				encodeCxforma(((CXFormWithAlpha) tag.colorTransform), tagw);
			}
			if (tag.hasRatio())
			{
				tagw.writeUI16(tag.ratio);
			}
			if (tag.hasName())
			{
				tagw.writeString(tag.name);
			}
			if (tag.hasClipDepth())
			{
				tagw.writeUI16(tag.clipDepth);
			}
			if (tag.code == flash.swf.TagValues_Fields.stagPlaceObject3)
			{
				if (tag.hasFilterList())
				{
					encodeFilterList(tag.filters, tagw);
				}
				if (tag.hasBlendMode())
				{
					tagw.writeUI8(tag.blendMode);
				}
			}
			if (tag.hasClipAction())
			{
				int adjust = 0;
				if (Debug)
				{
					adjust = writer.Pos + 6;
					debug.adjust += adjust;
				}
				new ActionEncoder(tagw, debug).encodeClipActions(tag.clipActions);
				if (Debug)
				{
					debug.adjust -= adjust;
				}
			}
			encodeTag(tag);
		}
예제 #2
0
		public void  placeObject23(PlaceObject tag)
		{
			if (tag.hasCharID())
			{
				if (tag.ref_Renamed.name != null)
				{
					indent();
					//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
					out_Renamed.WriteLine("<!-- instance of " + tag.ref_Renamed.name + " -->");
				}
			}
			
			open(tag);
			if (tag.hasClassName())
				out_Renamed.Write(" className='" + tag.className + "'");
			if (tag.hasImage())
				out_Renamed.Write(" hasImage='true' ");
			if (tag.hasCharID())
				out_Renamed.Write(" idref='" + idRef(tag.ref_Renamed) + "'");
			if (tag.hasName())
				out_Renamed.Write(" name='" + tag.name + "'");
			out_Renamed.Write(" depth='" + tag.depth + "'");
			if (tag.hasClipDepth())
				out_Renamed.Write(" clipDepth='" + tag.clipDepth + "'");
			if (tag.hasRatio())
				out_Renamed.Write(" ratio='" + tag.ratio + "'");
			if (tag.hasCxform())
			{
				out_Renamed.Write(" cxform='" + tag.colorTransform + "'");
			}
			if (tag.hasMatrix())
			{
				out_Renamed.Write(" matrix='" + tag.matrix + "'");
			}
			if (tag.hasBlendMode())
				out_Renamed.Write(" blendmode='" + tag.blendMode + "'");
			if (tag.hasFilterList())
			{
				// todo - pretty print this once we actually care
				out_Renamed.Write(" filters='");
				//UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
				for (System.Collections.IEnumerator it = tag.filters.GetEnumerator(); it.MoveNext(); )
				{
					//UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'"
					out_Renamed.Write((((Filter) it.Current).getID()) + " ");
				}
				out_Renamed.Write("'");
			}
			
			if (tag.hasClipAction())
			{
				end();
				System.Collections.IEnumerator it = tag.clipActions.clipActionRecords.GetEnumerator();
				
				openCDATA();
				//UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
				while (it.MoveNext())
				{
					//UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'"
					ClipActionRecord record = (ClipActionRecord) it.Current;
					indent();
					//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
					out_Renamed.WriteLine("onClipEvent(" + printClipEventFlags(record.eventFlags) + (record.hasKeyPress()?"<" + record.keyCode + ">":"") + ") {");
					indent_Renamed_Field++;
					if (showActions)
					{
						printActions(record.actionList);
					}
					else
					{
						indent();
						//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
						out_Renamed.WriteLine("// " + record.actionList.size() + " action(s) elided");
					}
					indent_Renamed_Field--;
					indent();
					//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
					out_Renamed.WriteLine("}");
				}
				closeCDATA();
				close(tag);
			}
			else
			{
				close();
			}
		}