public int blendMode = -1; // -1 ==> not set public override bool Equals(System.Object object_Renamed) { bool isEqual = false; if (object_Renamed is ButtonRecord) { ButtonRecord buttonRecord = (ButtonRecord)object_Renamed; if ((buttonRecord.hitTest == this.hitTest) && (buttonRecord.down == this.down) && (buttonRecord.over == this.over) && (buttonRecord.up == this.up) && (buttonRecord.blendMode == this.blendMode) && compareFilters(buttonRecord.filters, this.filters) && (((buttonRecord.characterRef == null) && (this.characterRef == null)) || ((buttonRecord.characterRef != null) && (this.characterRef != null) && buttonRecord.characterRef.Equals(this.characterRef))) && (buttonRecord.placeDepth == this.placeDepth) && (((buttonRecord.placeMatrix == null) && (this.placeMatrix == null)) || ((buttonRecord.placeMatrix != null) && (this.placeMatrix != null) && buttonRecord.placeMatrix.Equals(this.placeMatrix))) && (((buttonRecord.colorTransform == null) && (this.colorTransform == null)) || ((buttonRecord.colorTransform != null) && (this.colorTransform != null) && buttonRecord.colorTransform.Equals(this.colorTransform)))) { isEqual = true; } } return(isEqual); }
private ButtonRecord decodeButtonRecord(int type) { bool hasFilterList = false, hasBlendMode = false; ButtonRecord b = new ButtonRecord(); r.syncBits(); int reserved; if (type == Flash.Swf.TagValues.stagDefineButton2) { reserved = r.readUBits(2); hasBlendMode = r.readBit(); hasFilterList = r.readBit(); } else { reserved = r.readUBits(4); } b.hitTest = r.readBit(); b.down = r.readBit(); b.over = r.readBit(); b.up = r.readBit(); if (reserved == 0 && !b.hitTest && !b.down && !b.over && !b.up) { return null; } int idref = r.readUI16(); b.characterRef = dict.getTag(idref); b.placeDepth = r.readUI16(); b.placeMatrix = decodeMatrix(); if (type == Flash.Swf.TagValues.stagDefineButton2) { b.colorTransform = decodeCxforma(); if (hasFilterList) { b.filters = decodeFilterList(); } if (hasBlendMode) { b.blendMode = r.readUI8(); } } return b; }