Пример #1
0
        public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (base.Equals(object_Renamed) && (object_Renamed is DoInitAction))
            {
                DoInitAction doInitAction = (DoInitAction)object_Renamed;

                System.Diagnostics.Debug.Assert(doInitAction.sprite.initAction == doInitAction);

                // [paul] Checking that the sprite fields are equal would
                // lead to an infinite loop, because DefineSprite contains
                // a reference to it's DoInitAction.  Also don't compare
                // the order fields, because they are never the same.
                if (equals(doInitAction.actionList, this.actionList))
                {
                    isEqual = true;
                }
            }

            System.Diagnostics.Debug.Assert(sprite.initAction == this);

            return(isEqual);
        }
Пример #2
0
		public override void  doInitAction(DoInitAction tag)
		{
			tags.Add(tag);
		}
		public override void  doInitAction(DoInitAction tag)
		{
			if (header_field.version > 6 && tag.sprite != null)
			{
				String __Packages = idRef(tag.sprite);
				className = (__Packages != null && __Packages.StartsWith("__Packages"))?__Packages.Substring(11):null; // length("__Packages.") = 11
				
				if (isRegisterClass(tag.actionList))
				{
					DebugModule dm = new DebugModule();
					// C: We actually want the class name here, not the linkage ID.
					dm.name = "<" + __Packages + ".2>";
					// C: We want the class name as the second input argument. Fortunately, we don't
					//    really do anything with the source, so it's okay.
					dm.Text = "Object.registerClass(" + __Packages + ", " + __Packages + ");";
					dm.bitmap = 1;
					
					LineRecord lr = new LineRecord(1, dm);
					
					int startOffset = tag.actionList.getOffset(0);
					dm.addOffset(lr, startOffset);
					
					tag.actionList.insert(startOffset, lr);
					modules.put((int) (SupportClass.Random.NextDouble() * System.Int32.MaxValue), dm);
				}
			}
			
			String[] temp = pool;
			collectActions(tag.actionList);
			pool = temp;
			
			className = null;
		}
Пример #4
0
		public virtual void  doInitAction(DoInitAction tag)
		{
		}
Пример #5
0
		/// <summary> -----------------------------------------------
		/// The following APIs override TagHandler.
		/// -----------------------------------------------
		/// </summary>
		public override void  doInitAction(DoInitAction tag)
		{
			DummyAction a = recordActions(tag.actionList);
			
			// now fill in the class name if we can
			if (m_header.version > 6 && tag.sprite != null)
			{
				String __Packages = MovieMetaData.idRef(tag.sprite, m_dictionary);
				String className = (__Packages != null && __Packages.StartsWith("__Packages"))?__Packages.Substring(11):null; //$NON-NLS-1$
				a.ClassName = className;
			}
		}
Пример #6
0
		private Tag decodeDoInitAction(int length)
		{
			DoInitAction t;
			t = new DoInitAction();
			int idref = r.readUI16();
			try
			{
				t.sprite = (DefineSprite) dict.getTag(idref);
				if (t.sprite.initAction != null)
				{
					handler.error("Sprite " + idref + " initaction redefined");
				}
				else
				{
					t.sprite.initAction = t;
				}
			}
			catch (System.ArgumentException e)
			{
				handler.error(e.Message);
			}
			ActionDecoder actionDecoder = new ActionDecoder(r, swd);
			actionDecoder.KeepOffsets = keepOffsets;
			t.actionList = actionDecoder.decode(length - 2);
			return t;
		}