Beispiel #1
0
		public virtual void  export(Movie m)
		{
			// define the header
			Header h = new Header();
			h.version = m.version;
			h.compressed = Header.useCompression(m.version);
			h.size = m.size;
			h.rate = m.framerate;
			
			handler.header(h);
			
			// movie-wide tags
			if (m.fileAttributes != null)
			{
				if (m.metadata != null)
					m.fileAttributes.hasMetadata = true;
				
				m.fileAttributes.visit(handler); // FileAttributes MUST be first tag after header!
			}
			if (m.metadata != null)
			{
				m.metadata.visit(handler);
			}
			if (m.enableDebugger != null)
			{
				m.enableDebugger.visit(handler);
			}
			if (m.uuid != null)
			{
				new DebugID(m.uuid).visit(handler);
			}
			if (m.protect != null)
			{
				m.protect.visit(handler);
			}
			if (m.scriptLimits != null)
			{
				m.scriptLimits.visit(handler);
			}
			if (m.bgcolor != null)
			{
				m.bgcolor.visit(handler);
			}
			if (m.productInfo != null)
			{
				m.productInfo.visit(handler);
			}
			if (m.sceneAndFrameLabelData != null)
			{
				m.sceneAndFrameLabelData.visit(handler);
			}
			
			// finally, output the frames
			bool associateRootClass = (m.topLevelClass != null);
			//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 i = m.frames.GetEnumerator(); i.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'"
				Frame frame = (Frame) i.Current;
				
				if (frame.label != null)
				{
					frame.label.visit(handler);
				}
				
				if (!(frame.imports.Count == 0))
				{
					//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 j = frame.imports.GetEnumerator(); j.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'"
						ImportAssets importAssets = (ImportAssets) j.Current;
						importAssets.visit(handler);
					}
				}
				
				// definitions needed in this frame
				//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 j = frame.References; j.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'"
					DefineTag ref_Renamed = (DefineTag) j.Current;
					define(ref_Renamed);
				}
				
				// exports
				if (frame.hasExports())
				{
					ExportAssets exportAssets = new ExportAssets();
					//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 j = frame.exportIterator(); j.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'"
						DefineTag tag = (DefineTag) j.Current;
						exportAssets.exports.Add(tag);
					}
					exportAssets.visit(handler);
				}
				
				// TODO: Review this... temporarily special casing fonts here as they should not be
				// included in ExportAssets as they are not required to be exported by name!
				
				// fonts
				if (frame.hasFonts())
				{
					//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 k = frame.fontsIterator(); k.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'"
						DefineFont tag = (DefineFont) k.Current;
						
						// We may have already visited this font because of symbolClasses.
						if (!done.Contains(tag))
						{
							tag.visit(handler);
							done.Add(tag);
						}
					}
				}
				
				// abc tags
				//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 j = frame.doABCs.GetEnumerator(); j.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'"
					Tag tag = (Tag) j.Current;
					tag.visit(handler);
				}
				
				SymbolClass classes = new SymbolClass();
				
				if (frame.hasSymbolClasses())
				{
					SupportClass.MapSupport.PutAll(classes.class2tag, frame.symbolClass.class2tag);
				}
				if (associateRootClass)
				{
					// only works on frame 1
					classes.topLevelClass = m.topLevelClass; // Why do we do this on every frame's symclass?
				}
				if (associateRootClass || frame.hasSymbolClasses())
				{
					classes.visit(handler);
				}
				associateRootClass = false;
				
				// control tags
				//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 j = frame.controlTags.GetEnumerator(); j.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'"
					Tag tag = (Tag) j.Current;
					tag.visit(handler);
				}
				
				// then frame actions
				//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 j = frame.doActions.GetEnumerator(); j.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'"
					ActionList list = (ActionList) j.Current;
					new DoAction(list).visit(handler);
				}
				
				// oh yeah, then showFrame!
				new ShowFrame().visit(handler);
			}
			
			handler.finish();
		}
Beispiel #2
0
		public MovieDecoder(Movie m)
		{
			this.m = m;
		}
Beispiel #3
0
        public virtual void  export(Movie m)
        {
            // define the header
            Header h = new Header();

            h.version    = m.version;
            h.compressed = Header.useCompression(m.version);
            h.size       = m.size;
            h.rate       = m.framerate;

            handler.header(h);

            // movie-wide tags
            if (m.fileAttributes != null)
            {
                if (m.metadata != null)
                {
                    m.fileAttributes.hasMetadata = true;
                }

                m.fileAttributes.visit(handler);                 // FileAttributes MUST be first tag after header!
            }
            if (m.metadata != null)
            {
                m.metadata.visit(handler);
            }
            if (m.enableDebugger != null)
            {
                m.enableDebugger.visit(handler);
            }
            if (m.uuid != null)
            {
                new DebugID(m.uuid).visit(handler);
            }
            if (m.protect != null)
            {
                m.protect.visit(handler);
            }
            if (m.scriptLimits != null)
            {
                m.scriptLimits.visit(handler);
            }
            if (m.bgcolor != null)
            {
                m.bgcolor.visit(handler);
            }
            if (m.productInfo != null)
            {
                m.productInfo.visit(handler);
            }
            if (m.sceneAndFrameLabelData != null)
            {
                m.sceneAndFrameLabelData.visit(handler);
            }

            // finally, output the frames
            bool associateRootClass = (m.topLevelClass != null);

            //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 i = m.frames.GetEnumerator(); i.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'"
                Frame frame = (Frame)i.Current;

                if (frame.label != null)
                {
                    frame.label.visit(handler);
                }

                if (!(frame.imports.Count == 0))
                {
                    //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 j = frame.imports.GetEnumerator(); j.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'"
                        ImportAssets importAssets = (ImportAssets)j.Current;
                        importAssets.visit(handler);
                    }
                }

                // definitions needed in this frame
                //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 j = frame.References; j.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'"
                    DefineTag ref_Renamed = (DefineTag)j.Current;
                    define(ref_Renamed);
                }

                // exports
                if (frame.hasExports())
                {
                    ExportAssets exportAssets = new ExportAssets();
                    //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 j = frame.exportIterator(); j.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'"
                        DefineTag tag = (DefineTag)j.Current;
                        exportAssets.exports.Add(tag);
                    }
                    exportAssets.visit(handler);
                }

                // TODO: Review this... temporarily special casing fonts here as they should not be
                // included in ExportAssets as they are not required to be exported by name!

                // fonts
                if (frame.hasFonts())
                {
                    //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 k = frame.fontsIterator(); k.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'"
                        DefineFont tag = (DefineFont)k.Current;

                        // We may have already visited this font because of symbolClasses.
                        if (!done.Contains(tag))
                        {
                            tag.visit(handler);
                            done.Add(tag);
                        }
                    }
                }

                // abc tags
                //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 j = frame.doABCs.GetEnumerator(); j.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'"
                    Tag tag = (Tag)j.Current;
                    tag.visit(handler);
                }

                SymbolClass classes = new SymbolClass();

                if (frame.hasSymbolClasses())
                {
                    SupportClass.MapSupport.PutAll(classes.class2tag, frame.symbolClass.class2tag);
                }
                if (associateRootClass)
                {
                    // only works on frame 1
                    classes.topLevelClass = m.topLevelClass;                     // Why do we do this on every frame's symclass?
                }
                if (associateRootClass || frame.hasSymbolClasses())
                {
                    classes.visit(handler);
                }
                associateRootClass = false;

                // control tags
                //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 j = frame.controlTags.GetEnumerator(); j.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'"
                    Tag tag = (Tag)j.Current;
                    tag.visit(handler);
                }

                // then frame actions
                //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 j = frame.doActions.GetEnumerator(); j.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'"
                    ActionList list = (ActionList)j.Current;
                    new DoAction(list).visit(handler);
                }

                // oh yeah, then showFrame!
                new ShowFrame().visit(handler);
            }

            handler.finish();
        }