From 9ab4c163c78b4df8f3720acd6826228e5f6b0983 Mon Sep 17 00:00:00 2001 From: Fancy2209 <64917206+Fancy2209@users.noreply.github.com> Date: Fri, 23 Jun 2023 08:14:23 +0000 Subject: [PATCH] Fix TouchEvent.as (#11685) * Update TouchEvent.as * Oops --- .../avm2/globals/flash/events/TouchEvent.as | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/core/src/avm2/globals/flash/events/TouchEvent.as b/core/src/avm2/globals/flash/events/TouchEvent.as index 4f7f92175..7c84e595a 100644 --- a/core/src/avm2/globals/flash/events/TouchEvent.as +++ b/core/src/avm2/globals/flash/events/TouchEvent.as @@ -36,11 +36,6 @@ public class TouchEvent extends Event { public var ctrlKey: Boolean; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false). public var altKey: Boolean; // Indicates whether the Alt key is active (true) or inactive (false). public var shiftKey: Boolean; // Indicates whether the Shift key is active (true) or inactive (false). - public var commandKey: Boolean; // Indicates whether the command key is activated (Mac only). - public var controlKey: Boolean; // Indicates whether the Control key is activated on Mac and whether the Ctrl key is activated on Windows or Linux. - public var timestamp: Number; // Reports the time of the event in relative milliseconds. - public var touchIntent: String; // Reports whether the touch was generated by the primary or the eraser end of a stylus. - public var isTouchPointCanceled: Boolean; // Reports that this touch input sequence was canceled by the operating system. public var isRelatedObjectInaccessible: Boolean; // If true, the relatedObject property is set to null for reasons related to security sandboxes. private var _stageX: Number; // [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates. private var _stageY: Number; // [read-only] The vertical coordinate at which the event occurred in global Stage coordinates. @@ -49,10 +44,8 @@ public class TouchEvent extends Event { isPrimaryTouchPoint: Boolean = false, localX: Number = NaN, localY: Number = NaN, sizeX: Number = NaN, sizeY: Number = NaN, pressure: Number = NaN, relatedObject: InteractiveObject = null, ctrlKey: Boolean = false, - altKey: Boolean = false, shiftKey: Boolean = false, commandKey: Boolean = false, - controlKey: Boolean = false, timestamp: Number = NaN, touchIntent: String = "unknown", - samples: ByteArray = null, isTouchPointCanceled: Boolean = false) { - super(type, bubbles, cancelable, samples); + altKey: Boolean = false, shiftKey: Boolean = false) { + super(type, bubbles, cancelable); this.touchPointID = touchPointID; this.isPrimaryTouchPoint = isPrimaryTouchPoint; this.localX = localX; @@ -64,11 +57,6 @@ public class TouchEvent extends Event { this.ctrlKey = ctrlKey; this.altKey = altKey; this.shiftKey = shiftKey; - this.commandKey = commandKey; - this.controlKey = controlKey; - this.timestamp = timestamp; - this.touchIntent = touchIntent; - this.isTouchPointCanceled = isTouchPointCanceled; } @@ -76,8 +64,7 @@ public class TouchEvent extends Event { override public function clone(): Event { return new TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint, this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey, - this.altKey, this.shiftKey, this.commandKey, this.controlKey, this.timestamp, this.touchIntent, - this.isTouchPointCanceled); + this.altKey, this.shiftKey); } // Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event. @@ -96,8 +83,7 @@ public class TouchEvent extends Event { override public function toString(): String { return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID", "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey", - "altKey", "shiftKey", "commandKey", "controlKey", "timestamp", "touchIntent", "isTouchPointCanceled", - "isRelatedObjectInaccessible", "stageX", "stageY"); + "altKey", "shiftKey", "isRelatedObjectInaccessible", "stageX", "stageY"); } // Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified. @@ -111,4 +97,4 @@ public class TouchEvent extends Event { return this._stageY; } } -} \ No newline at end of file +}