diff --git a/core/src/avm2/globals/ArgumentError.as b/core/src/avm2/globals/ArgumentError.as
index 07f22e1e20ab..3708ae21fe92 100644
--- a/core/src/avm2/globals/ArgumentError.as
+++ b/core/src/avm2/globals/ArgumentError.as
@@ -1,12 +1,15 @@
-package {
- public dynamic class ArgumentError extends Error {
- ArgumentError.prototype.name = "ArgumentError"
+package
+{
+ public dynamic class ArgumentError extends Error
+ {
+ ArgumentError.prototype.name = "ArgumentError";
- public function ArgumentError(message:String = "", code:* = 0) {
- super(message, code)
- this.name = prototype.name
- }
+ public function ArgumentError(message:String = "", code:* = 0)
+ {
+ super(message, code);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/Array.as b/core/src/avm2/globals/Array.as
index 6cd6c0da7fe6..74a086174145 100644
--- a/core/src/avm2/globals/Array.as
+++ b/core/src/avm2/globals/Array.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `array.rs`
-package {
- public dynamic class Array {
- }
+package
+{
+ public dynamic class Array
+ {
+ }
}
diff --git a/core/src/avm2/globals/Boolean.as b/core/src/avm2/globals/Boolean.as
index 360ffe7c1bcd..5af2032f2faa 100644
--- a/core/src/avm2/globals/Boolean.as
+++ b/core/src/avm2/globals/Boolean.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `boolean.rs`
-package {
- public class Boolean {
+package
+{
+ public class Boolean
+ {
}
}
diff --git a/core/src/avm2/globals/Class.as b/core/src/avm2/globals/Class.as
index bb9a49e585ca..bae977ae4f22 100644
--- a/core/src/avm2/globals/Class.as
+++ b/core/src/avm2/globals/Class.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `class.rs`
-package {
- public dynamic class Class {
+package
+{
+ public dynamic class Class
+ {
}
}
diff --git a/core/src/avm2/globals/Date.as b/core/src/avm2/globals/Date.as
index 08d83e523d73..258a448c112a 100644
--- a/core/src/avm2/globals/Date.as
+++ b/core/src/avm2/globals/Date.as
@@ -1,460 +1,592 @@
-package {
- [Ruffle(InstanceAllocator)]
- [Ruffle(CallHandler)]
- public dynamic class Date {
- public static const length:int = 7;
-
- prototype.valueOf = function():* {
- var d:Date = this;
- return d.AS3::valueOf();
- }
- prototype.toString = function():String {
- var d:Date = this;
- return d.AS3::toString();
- }
- prototype.toDateString = function():String {
- var d:Date = this;
- return d.AS3::toDateString();
- }
- prototype.toTimeString = function():String {
- var d:Date = this;
- return d.AS3::toTimeString();
- }
- prototype.toLocaleString = function():String {
- var d:Date = this;
- return d.AS3::toLocaleString();
- }
- prototype.toLocaleDateString = function():String {
- var d:Date = this;
- return d.AS3::toLocaleDateString();
- }
- prototype.toLocaleTimeString = function():String {
- var d:Date = this;
- return d.AS3::toLocaleTimeString();
- }
- prototype.toUTCString = function():String {
- var d:Date = this;
- return d.AS3::toUTCString();
- }
- prototype.toJSON = function(k:String):* {
- var d:Date = this;
- return d.AS3::toString();
- }
- prototype.getUTCFullYear = function():Number {
- var d:Date = this;
- return d.AS3::getUTCFullYear();
- }
- prototype.getUTCMonth = function():Number {
- var d:Date = this;
- return d.AS3::getUTCMonth();
- }
- prototype.getUTCDate = function():Number {
- var d:Date = this;
- return d.AS3::getUTCDate();
- }
- prototype.getUTCDay = function():Number {
- var d:Date = this;
- return d.AS3::getUTCDay();
- }
- prototype.getUTCHours = function():Number {
- var d:Date = this;
- return d.AS3::getUTCHours();
- }
- prototype.getUTCMinutes = function():Number {
- var d:Date = this;
- return d.AS3::getUTCMinutes();
- }
- prototype.getUTCSeconds = function():Number {
- var d:Date = this;
- return d.AS3::getUTCSeconds();
- }
- prototype.getUTCMilliseconds = function():Number {
- var d:Date = this;
- return d.AS3::getUTCMilliseconds();
- }
- prototype.getFullYear = function():Number {
- var d:Date = this;
- return d.AS3::getFullYear();
- }
- prototype.getMonth = function():Number {
- var d:Date = this;
- return d.AS3::getMonth();
- }
- prototype.getDate = function():Number {
- var d:Date = this;
- return d.AS3::getDate();
- }
- prototype.getDay = function():Number {
- var d:Date = this;
- return d.AS3::getDay();
- }
- prototype.getHours = function():Number {
- var d:Date = this;
- return d.AS3::getHours();
- }
- prototype.getMinutes = function():Number {
- var d:Date = this;
- return d.AS3::getMinutes();
- }
- prototype.getSeconds = function():Number {
- var d:Date = this;
- return d.AS3::getSeconds();
- }
- prototype.getMilliseconds = function():Number {
- var d:Date = this;
- return d.AS3::getMilliseconds();
- }
- prototype.getTimezoneOffset = function():Number {
- var d:Date = this;
- return d.AS3::getTimezoneOffset();
- }
- prototype.getTime = function():Number {
- var d:Date = this;
- return d.AS3::getTime();
- }
- prototype.setTime = function(t:* = undefined):Number {
- var d:Date = this;
- return d.AS3::setTime(t);
- }
- prototype.setFullYear = function(year:* = undefined, month:* = undefined, day:* = undefined):Number {
- var d:Date = this;
- return d._setFullYear(arguments);
- }
- prototype.setMonth = function(month:* = undefined, day:* = undefined):Number {
- var d:Date = this;
- return d._setMonth(arguments);
- }
- prototype.setDate = function(day:* = undefined):Number {
- var d:Date = this;
- return d._setDate(day);
- }
- prototype.setHours = function(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- var d:Date = this;
- return d._setHours(arguments);
- }
- prototype.setMinutes = function(min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- var d:Date = this;
- return d._setMinutes(arguments);
- }
- prototype.setSeconds = function(sec:* = undefined, ms:* = undefined):Number {
- var d:Date = this;
- return d._setSeconds(arguments);
- }
- prototype.setMilliseconds = function(ms:* = undefined):Number {
- var d:Date = this;
- return d._setMilliseconds(arguments);
- }
- prototype.setUTCFullYear = function(year:* = undefined, month:* = undefined, day:* = undefined):Number {
- var d:Date = this;
- return d._setUTCFullYear(arguments);
- }
- prototype.setUTCMonth = function(month:* = undefined, day:* = undefined):Number {
- var d:Date = this;
- return d._setUTCMonth(arguments);
- }
- prototype.setUTCDate = function(day:* = undefined):Number {
- var d:Date = this;
- return d._setUTCDate(arguments);
- }
- prototype.setUTCHours = function(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- var d:Date = this;
- return d._setUTCHours(arguments);
- }
- prototype.setUTCMinutes = function(min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- var d:Date = this;
- return d._setUTCMinutes(arguments);
- }
- prototype.setUTCSeconds = function(sec:* = undefined, ms:* = undefined):Number {
- var d:Date = this;
- return d._setUTCSeconds(arguments);
- }
- prototype.setUTCMilliseconds = function(ms:* = undefined):Number {
- var d:Date = this;
- return d._setUTCMilliseconds(arguments);
- }
-
- prototype.setPropertyIsEnumerable("valueOf", false);
- prototype.setPropertyIsEnumerable("toString", false);
- prototype.setPropertyIsEnumerable("toDateString", false);
- prototype.setPropertyIsEnumerable("toTimeString", false);
- prototype.setPropertyIsEnumerable("toLocaleString", false);
- prototype.setPropertyIsEnumerable("toLocaleDateString", false);
- prototype.setPropertyIsEnumerable("toLocaleTimeString", false);
- prototype.setPropertyIsEnumerable("toUTCString", false);
- prototype.setPropertyIsEnumerable("toJSON", false);
- prototype.setPropertyIsEnumerable("getUTCFullYear", false);
- prototype.setPropertyIsEnumerable("getUTCMonth", false);
- prototype.setPropertyIsEnumerable("getUTCDate", false);
- prototype.setPropertyIsEnumerable("getUTCDay", false);
- prototype.setPropertyIsEnumerable("getUTCHours", false);
- prototype.setPropertyIsEnumerable("getUTCMinutes", false);
- prototype.setPropertyIsEnumerable("getUTCSeconds", false);
- prototype.setPropertyIsEnumerable("getUTCMilliseconds", false);
- prototype.setPropertyIsEnumerable("getFullYear", false);
- prototype.setPropertyIsEnumerable("getMonth", false);
- prototype.setPropertyIsEnumerable("getDate", false);
- prototype.setPropertyIsEnumerable("getDay", false);
- prototype.setPropertyIsEnumerable("getHours", false);
- prototype.setPropertyIsEnumerable("getMinutes", false);
- prototype.setPropertyIsEnumerable("getSeconds", false);
- prototype.setPropertyIsEnumerable("getMilliseconds", false);
- prototype.setPropertyIsEnumerable("getTimezoneOffset", false);
- prototype.setPropertyIsEnumerable("getTime", false);
- prototype.setPropertyIsEnumerable("setTime", false);
- prototype.setPropertyIsEnumerable("setFullYear", false);
- prototype.setPropertyIsEnumerable("setMonth", false);
- prototype.setPropertyIsEnumerable("setDate", false);
- prototype.setPropertyIsEnumerable("setHours", false);
- prototype.setPropertyIsEnumerable("setMinutes", false);
- prototype.setPropertyIsEnumerable("setSeconds", false);
- prototype.setPropertyIsEnumerable("setMilliseconds", false);
- prototype.setPropertyIsEnumerable("setUTCFullYear", false);
- prototype.setPropertyIsEnumerable("setUTCMonth", false);
- prototype.setPropertyIsEnumerable("setUTCDate", false);
- prototype.setPropertyIsEnumerable("setUTCHours", false);
- prototype.setPropertyIsEnumerable("setUTCMinutes", false);
- prototype.setPropertyIsEnumerable("setUTCSeconds", false);
- prototype.setPropertyIsEnumerable("setUTCMilliseconds", false);
-
-
- public function Date(year:* = undefined, month:* = undefined, day:* = undefined, hours:* = undefined, minutes:* = undefined, seconds:* = undefined, ms:* = undefined) {
- this.init(arguments);
- }
- private native function init(args:Array);
-
- public static native function parse(date:*):Number;
-
- public static native function UTC(year:*, month:*, date:* = 1, hour:* = 0, minute:* = 0, second:* = 0, millisecond:* = 0, ... rest):Number;
-
- AS3 function valueOf():Number {
- return this.AS3::getTime();
- }
-
- AS3 native function toString():String;
-
- AS3 native function toDateString():String;
-
- AS3 native function toTimeString():String;
-
- AS3 native function toLocaleString():String;
-
- AS3 function toLocaleDateString():String {
- return this.AS3::toDateString();
- }
-
- AS3 native function toLocaleTimeString():String;
-
- AS3 native function toUTCString():String;
-
- AS3 native function getUTCDay():Number;
-
- AS3 native function getDay():Number;
-
- AS3 native function getTimezoneOffset():Number;
-
- AS3 native function getTime():Number;
- AS3 native function setTime(time:* = undefined):Number;
-
- AS3 native function getFullYear():Number;
- private native function _setFullYear(args:Array):Number;
- AS3 function setFullYear(year:* = undefined, month:* = undefined, day:* = undefined):Number {
- return _setFullYear(arguments);
- }
-
- AS3 native function getMonth():Number;
- private native function _setMonth(args:Array):Number;
- AS3 function setMonth(month:* = undefined, day:* = undefined):Number {
- return _setMonth(arguments);
- }
-
- AS3 native function getDate():Number;
- private native function _setDate(args:Array):Number;
- AS3 function setDate(day:* = undefined):Number {
- return _setDate(arguments);
- }
-
- AS3 native function getHours():Number;
- private native function _setHours(args:Array):Number;
- AS3 function setHours(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- return _setHours(arguments);
- }
-
- AS3 native function getMinutes():Number;
- private native function _setMinutes(args:Array):Number;
- AS3 function setMinutes(min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- return _setMinutes(arguments);
- }
-
- AS3 native function getSeconds():Number;
- private native function _setSeconds(args:Array):Number;
- AS3 function setSeconds(sec:* = undefined, ms:* = undefined):Number {
- return _setSeconds(arguments);
- }
-
- AS3 native function getMilliseconds():Number;
- private native function _setMilliseconds(args:Array):Number;
- AS3 function setMilliseconds(ms:* = undefined):Number {
- return _setMilliseconds(arguments);
- }
-
- AS3 native function getUTCFullYear():Number;
- private native function _setUTCFullYear(args:Array):Number;
- AS3 function setUTCFullYear(year:* = undefined, month:* = undefined, day:* = undefined):Number {
- return _setUTCFullYear(arguments);
- }
-
- AS3 native function getUTCMonth():Number;
- private native function _setUTCMonth(args:Array):Number;
- AS3 function setUTCMonth(month:* = undefined, day:* = undefined):Number {
- return _setUTCMonth(arguments);
- }
-
- AS3 native function getUTCDate():Number;
- private native function _setUTCDate(args:Array):Number;
- AS3 function setUTCDate(day:* = undefined):Number {
- return _setUTCDate(arguments);
- }
-
- AS3 native function getUTCHours():Number;
- private native function _setUTCHours(args:Array):Number;
- AS3 function setUTCHours(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- return _setUTCHours(arguments);
- }
-
- AS3 native function getUTCMinutes():Number;
- private native function _setUTCMinutes(args:Array):Number;
- AS3 function setUTCMinutes(min:* = undefined, sec:* = undefined, ms:* = undefined):Number {
- return _setUTCMinutes(arguments);
- }
-
- AS3 native function getUTCSeconds():Number;
- private native function _setUTCSeconds(args:Array):Number;
- AS3 function setUTCSeconds(sec:* = undefined, ms:* = undefined):Number {
- return _setUTCSeconds(arguments);
- }
-
- AS3 native function getUTCMilliseconds():Number;
- private native function _setUTCMilliseconds(args:Array):Number;
- AS3 function setUTCMilliseconds(ms:* = undefined):Number {
- return _setUTCMilliseconds(arguments);
- }
-
-
- public function get fullYear():Number {
- return this.AS3::getFullYear();
- }
- public function set fullYear(value:Number):void {
- this.AS3::setFullYear(value);
- }
-
- public function get month():Number {
- return this.AS3::getMonth();
- }
- public function set month(value:Number):void {
- this.AS3::setMonth(value);
- }
-
- public function get date():Number {
- return this.AS3::getDate();
- }
- public function set date(value:Number):void {
- this.AS3::setDate(value);
- }
-
- public function get hours():Number {
- return this.AS3::getHours();
- }
- public function set hours(value:Number):void {
- this.AS3::setHours(value);
- }
-
- public function get minutes():Number {
- return this.AS3::getMinutes();
- }
- public function set minutes(value:Number):void {
- this.AS3::setMinutes(value);
- }
-
- public function get seconds():Number {
- return this.AS3::getSeconds();
- }
- public function set seconds(value:Number):void {
- this.AS3::setSeconds(value);
- }
-
- public function get milliseconds():Number {
- return this.AS3::getMilliseconds();
- }
- public function set milliseconds(value:Number):void {
- this.AS3::setMilliseconds(value);
- }
-
- public function get fullYearUTC():Number {
- return this.AS3::getUTCFullYear();
- }
- public function set fullYearUTC(value:Number):void {
- this.AS3::setUTCFullYear(value);
- }
-
- public function get monthUTC():Number {
- return this.AS3::getUTCMonth();
- }
- public function set monthUTC(value:Number):void {
- this.AS3::setUTCMonth(value);
- }
-
- public function get dateUTC():Number {
- return this.AS3::getUTCDate();
- }
- public function set dateUTC(value:Number):void {
- this.AS3::setUTCDate(value);
- }
-
- public function get hoursUTC():Number {
- return this.AS3::getUTCHours();
- }
- public function set hoursUTC(value:Number):void {
- this.AS3::setUTCHours(value);
- }
-
- public function get minutesUTC():Number {
- return this.AS3::getUTCMinutes();
- }
- public function set minutesUTC(value:Number):void {
- this.AS3::setUTCMinutes(value);
- }
-
- public function get secondsUTC():Number {
- return this.AS3::getUTCSeconds();
- }
- public function set secondsUTC(value:Number):void {
- this.AS3::setUTCSeconds(value);
- }
-
- public function get millisecondsUTC():Number {
- return this.AS3::getUTCMilliseconds();
- }
- public function set millisecondsUTC(value:Number):void {
- this.AS3::setUTCMilliseconds(value);
- }
-
- public function get time():Number {
- return this.AS3::getTime();
- }
- public function set time(value:Number):void {
- this.AS3::setTime(value);
- }
-
- public function get timezoneOffset():Number {
- return this.AS3::getTimezoneOffset();
- }
-
- public function get day():Number {
- return this.AS3::getDay();
- }
-
- public function get dayUTC():Number {
- return this.AS3::getUTCDay();
- }
- }
+package
+{
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(CallHandler)]
+ public dynamic class Date
+ {
+ public static const length:int = 7;
+
+ prototype.valueOf = function():*
+ {
+ var d:Date = this;
+ return d.AS3::valueOf();
+ };
+ prototype.toString = function():String
+ {
+ var d:Date = this;
+ return d.AS3::toString();
+ };
+
+ prototype.toDateString = function():String
+ {
+ var d:Date = this;
+ return d.AS3::toDateString();
+ };
+
+ prototype.toTimeString = function():String
+ {
+ var d:Date = this;
+ return d.AS3::toTimeString();
+ };
+
+ prototype.toLocaleString = function():String
+ {
+ var d:Date = this;
+ return d.AS3::toLocaleString();
+ };
+
+ prototype.toLocaleDateString = function():String
+ {
+ var d:Date = this;
+ return d.AS3::toLocaleDateString();
+ };
+
+ prototype.toLocaleTimeString = function():String
+ {
+ var d:Date = this;
+ return d.AS3::toLocaleTimeString();
+ };
+
+ prototype.toUTCString = function():String
+ {
+ var d:Date = this;
+ return d.AS3::toUTCString();
+ };
+
+ prototype.toJSON = function(k:String):*
+ {
+ var d:Date = this;
+ return d.AS3::toString();
+ };
+
+ prototype.getUTCFullYear = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCFullYear();
+ };
+
+ prototype.getUTCMonth = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCMonth();
+ };
+
+ prototype.getUTCDate = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCDate();
+ };
+
+ prototype.getUTCDay = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCDay();
+ };
+
+ prototype.getUTCHours = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCHours();
+ };
+
+ prototype.getUTCMinutes = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCMinutes();
+ };
+
+ prototype.getUTCSeconds = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCSeconds();
+ };
+
+ prototype.getUTCMilliseconds = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getUTCMilliseconds();
+ };
+
+ prototype.getFullYear = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getFullYear();
+ };
+
+ prototype.getMonth = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getMonth();
+ };
+
+ prototype.getDate = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getDate();
+ };
+
+ prototype.getDay = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getDay();
+ };
+
+ prototype.getHours = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getHours();
+ };
+
+ prototype.getMinutes = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getMinutes();
+ };
+
+ prototype.getSeconds = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getSeconds();
+ };
+
+ prototype.getMilliseconds = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getMilliseconds();
+ };
+
+ prototype.getTimezoneOffset = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getTimezoneOffset();
+ };
+
+ prototype.getTime = function():Number
+ {
+ var d:Date = this;
+ return d.AS3::getTime();
+ };
+
+ prototype.setTime = function(t:* = undefined):Number
+ {
+ var d:Date = this;
+ return d.AS3::setTime(t);
+ };
+
+ prototype.setFullYear = function(year:* = undefined, month:* = undefined, day:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setFullYear(arguments);
+ };
+
+ prototype.setMonth = function(month:* = undefined, day:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setMonth(arguments);
+ };
+
+ prototype.setDate = function(day:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setDate(day);
+ };
+
+ prototype.setHours = function(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setHours(arguments);
+ };
+
+ prototype.setMinutes = function(min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setMinutes(arguments);
+ };
+
+ prototype.setSeconds = function(sec:* = undefined, ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setSeconds(arguments);
+ };
+
+ prototype.setMilliseconds = function(ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setMilliseconds(arguments);
+ };
+
+ prototype.setUTCFullYear = function(year:* = undefined, month:* = undefined, day:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setUTCFullYear(arguments);
+ };
+
+ prototype.setUTCMonth = function(month:* = undefined, day:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setUTCMonth(arguments);
+ };
+
+ prototype.setUTCDate = function(day:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setUTCDate(arguments);
+ };
+
+ prototype.setUTCHours = function(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setUTCHours(arguments);
+ };
+
+ prototype.setUTCMinutes = function(min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setUTCMinutes(arguments);
+ };
+
+ prototype.setUTCSeconds = function(sec:* = undefined, ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setUTCSeconds(arguments);
+ };
+
+ prototype.setUTCMilliseconds = function(ms:* = undefined):Number
+ {
+ var d:Date = this;
+ return d._setUTCMilliseconds(arguments);
+ };
+
+ prototype.setPropertyIsEnumerable("valueOf", false);
+ prototype.setPropertyIsEnumerable("toString", false);
+ prototype.setPropertyIsEnumerable("toDateString", false);
+ prototype.setPropertyIsEnumerable("toTimeString", false);
+ prototype.setPropertyIsEnumerable("toLocaleString", false);
+ prototype.setPropertyIsEnumerable("toLocaleDateString", false);
+ prototype.setPropertyIsEnumerable("toLocaleTimeString", false);
+ prototype.setPropertyIsEnumerable("toUTCString", false);
+ prototype.setPropertyIsEnumerable("toJSON", false);
+ prototype.setPropertyIsEnumerable("getUTCFullYear", false);
+ prototype.setPropertyIsEnumerable("getUTCMonth", false);
+ prototype.setPropertyIsEnumerable("getUTCDate", false);
+ prototype.setPropertyIsEnumerable("getUTCDay", false);
+ prototype.setPropertyIsEnumerable("getUTCHours", false);
+ prototype.setPropertyIsEnumerable("getUTCMinutes", false);
+ prototype.setPropertyIsEnumerable("getUTCSeconds", false);
+ prototype.setPropertyIsEnumerable("getUTCMilliseconds", false);
+ prototype.setPropertyIsEnumerable("getFullYear", false);
+ prototype.setPropertyIsEnumerable("getMonth", false);
+ prototype.setPropertyIsEnumerable("getDate", false);
+ prototype.setPropertyIsEnumerable("getDay", false);
+ prototype.setPropertyIsEnumerable("getHours", false);
+ prototype.setPropertyIsEnumerable("getMinutes", false);
+ prototype.setPropertyIsEnumerable("getSeconds", false);
+ prototype.setPropertyIsEnumerable("getMilliseconds", false);
+ prototype.setPropertyIsEnumerable("getTimezoneOffset", false);
+ prototype.setPropertyIsEnumerable("getTime", false);
+ prototype.setPropertyIsEnumerable("setTime", false);
+ prototype.setPropertyIsEnumerable("setFullYear", false);
+ prototype.setPropertyIsEnumerable("setMonth", false);
+ prototype.setPropertyIsEnumerable("setDate", false);
+ prototype.setPropertyIsEnumerable("setHours", false);
+ prototype.setPropertyIsEnumerable("setMinutes", false);
+ prototype.setPropertyIsEnumerable("setSeconds", false);
+ prototype.setPropertyIsEnumerable("setMilliseconds", false);
+ prototype.setPropertyIsEnumerable("setUTCFullYear", false);
+ prototype.setPropertyIsEnumerable("setUTCMonth", false);
+ prototype.setPropertyIsEnumerable("setUTCDate", false);
+ prototype.setPropertyIsEnumerable("setUTCHours", false);
+ prototype.setPropertyIsEnumerable("setUTCMinutes", false);
+ prototype.setPropertyIsEnumerable("setUTCSeconds", false);
+ prototype.setPropertyIsEnumerable("setUTCMilliseconds", false);
+
+ public function Date(year:* = undefined, month:* = undefined, day:* = undefined, hours:* = undefined, minutes:* = undefined, seconds:* = undefined, ms:* = undefined)
+ {
+ this.init(arguments);
+ }
+ private native function init(args:Array);
+
+ public static native function parse(date:*):Number;
+
+ public static native function UTC(year:*, month:*, date:* = 1, hour:* = 0, minute:* = 0, second:* = 0, millisecond:* = 0, ...rest):Number;
+
+ AS3 function valueOf():Number
+ {
+ return this.AS3::getTime();
+ }
+
+ AS3 native function toString():String;
+
+ AS3 native function toDateString():String;
+
+ AS3 native function toTimeString():String;
+
+ AS3 native function toLocaleString():String;
+
+ AS3 function toLocaleDateString():String
+ {
+ return this.AS3::toDateString();
+ }
+
+ AS3 native function toLocaleTimeString():String;
+
+ AS3 native function toUTCString():String;
+
+ AS3 native function getUTCDay():Number;
+
+ AS3 native function getDay():Number;
+
+ AS3 native function getTimezoneOffset():Number;
+
+ AS3 native function getTime():Number;
+ AS3 native function setTime(time:* = undefined):Number;
+
+ AS3 native function getFullYear():Number;
+ private native function _setFullYear(args:Array):Number;
+ AS3 function setFullYear(year:* = undefined, month:* = undefined, day:* = undefined):Number
+ {
+ return _setFullYear(arguments);
+ }
+
+ AS3 native function getMonth():Number;
+ private native function _setMonth(args:Array):Number;
+ AS3 function setMonth(month:* = undefined, day:* = undefined):Number
+ {
+ return _setMonth(arguments);
+ }
+
+ AS3 native function getDate():Number;
+ private native function _setDate(args:Array):Number;
+ AS3 function setDate(day:* = undefined):Number
+ {
+ return _setDate(arguments);
+ }
+
+ AS3 native function getHours():Number;
+ private native function _setHours(args:Array):Number;
+ AS3 function setHours(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ return _setHours(arguments);
+ }
+
+ AS3 native function getMinutes():Number;
+ private native function _setMinutes(args:Array):Number;
+ AS3 function setMinutes(min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ return _setMinutes(arguments);
+ }
+
+ AS3 native function getSeconds():Number;
+ private native function _setSeconds(args:Array):Number;
+ AS3 function setSeconds(sec:* = undefined, ms:* = undefined):Number
+ {
+ return _setSeconds(arguments);
+ }
+
+ AS3 native function getMilliseconds():Number;
+ private native function _setMilliseconds(args:Array):Number;
+ AS3 function setMilliseconds(ms:* = undefined):Number
+ {
+ return _setMilliseconds(arguments);
+ }
+
+ AS3 native function getUTCFullYear():Number;
+ private native function _setUTCFullYear(args:Array):Number;
+ AS3 function setUTCFullYear(year:* = undefined, month:* = undefined, day:* = undefined):Number
+ {
+ return _setUTCFullYear(arguments);
+ }
+
+ AS3 native function getUTCMonth():Number;
+ private native function _setUTCMonth(args:Array):Number;
+ AS3 function setUTCMonth(month:* = undefined, day:* = undefined):Number
+ {
+ return _setUTCMonth(arguments);
+ }
+
+ AS3 native function getUTCDate():Number;
+ private native function _setUTCDate(args:Array):Number;
+ AS3 function setUTCDate(day:* = undefined):Number
+ {
+ return _setUTCDate(arguments);
+ }
+
+ AS3 native function getUTCHours():Number;
+ private native function _setUTCHours(args:Array):Number;
+ AS3 function setUTCHours(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ return _setUTCHours(arguments);
+ }
+
+ AS3 native function getUTCMinutes():Number;
+ private native function _setUTCMinutes(args:Array):Number;
+ AS3 function setUTCMinutes(min:* = undefined, sec:* = undefined, ms:* = undefined):Number
+ {
+ return _setUTCMinutes(arguments);
+ }
+
+ AS3 native function getUTCSeconds():Number;
+ private native function _setUTCSeconds(args:Array):Number;
+ AS3 function setUTCSeconds(sec:* = undefined, ms:* = undefined):Number
+ {
+ return _setUTCSeconds(arguments);
+ }
+
+ AS3 native function getUTCMilliseconds():Number;
+ private native function _setUTCMilliseconds(args:Array):Number;
+ AS3 function setUTCMilliseconds(ms:* = undefined):Number
+ {
+ return _setUTCMilliseconds(arguments);
+ }
+
+ public function get fullYear():Number
+ {
+ return this.AS3::getFullYear();
+ }
+ public function set fullYear(value:Number):void
+ {
+ this.AS3::setFullYear(value);
+ }
+
+ public function get month():Number
+ {
+ return this.AS3::getMonth();
+ }
+ public function set month(value:Number):void
+ {
+ this.AS3::setMonth(value);
+ }
+
+ public function get date():Number
+ {
+ return this.AS3::getDate();
+ }
+ public function set date(value:Number):void
+ {
+ this.AS3::setDate(value);
+ }
+
+ public function get hours():Number
+ {
+ return this.AS3::getHours();
+ }
+ public function set hours(value:Number):void
+ {
+ this.AS3::setHours(value);
+ }
+
+ public function get minutes():Number
+ {
+ return this.AS3::getMinutes();
+ }
+ public function set minutes(value:Number):void
+ {
+ this.AS3::setMinutes(value);
+ }
+
+ public function get seconds():Number
+ {
+ return this.AS3::getSeconds();
+ }
+ public function set seconds(value:Number):void
+ {
+ this.AS3::setSeconds(value);
+ }
+
+ public function get milliseconds():Number
+ {
+ return this.AS3::getMilliseconds();
+ }
+ public function set milliseconds(value:Number):void
+ {
+ this.AS3::setMilliseconds(value);
+ }
+
+ public function get fullYearUTC():Number
+ {
+ return this.AS3::getUTCFullYear();
+ }
+ public function set fullYearUTC(value:Number):void
+ {
+ this.AS3::setUTCFullYear(value);
+ }
+
+ public function get monthUTC():Number
+ {
+ return this.AS3::getUTCMonth();
+ }
+ public function set monthUTC(value:Number):void
+ {
+ this.AS3::setUTCMonth(value);
+ }
+
+ public function get dateUTC():Number
+ {
+ return this.AS3::getUTCDate();
+ }
+ public function set dateUTC(value:Number):void
+ {
+ this.AS3::setUTCDate(value);
+ }
+
+ public function get hoursUTC():Number
+ {
+ return this.AS3::getUTCHours();
+ }
+ public function set hoursUTC(value:Number):void
+ {
+ this.AS3::setUTCHours(value);
+ }
+
+ public function get minutesUTC():Number
+ {
+ return this.AS3::getUTCMinutes();
+ }
+ public function set minutesUTC(value:Number):void
+ {
+ this.AS3::setUTCMinutes(value);
+ }
+
+ public function get secondsUTC():Number
+ {
+ return this.AS3::getUTCSeconds();
+ }
+ public function set secondsUTC(value:Number):void
+ {
+ this.AS3::setUTCSeconds(value);
+ }
+
+ public function get millisecondsUTC():Number
+ {
+ return this.AS3::getUTCMilliseconds();
+ }
+ public function set millisecondsUTC(value:Number):void
+ {
+ this.AS3::setUTCMilliseconds(value);
+ }
+
+ public function get time():Number
+ {
+ return this.AS3::getTime();
+ }
+ public function set time(value:Number):void
+ {
+ this.AS3::setTime(value);
+ }
+
+ public function get timezoneOffset():Number
+ {
+ return this.AS3::getTimezoneOffset();
+ }
+
+ public function get day():Number
+ {
+ return this.AS3::getDay();
+ }
+
+ public function get dayUTC():Number
+ {
+ return this.AS3::getUTCDay();
+ }
+ }
}
diff --git a/core/src/avm2/globals/DefinitionError.as b/core/src/avm2/globals/DefinitionError.as
index 8e531d77cccd..b38289b2cd95 100644
--- a/core/src/avm2/globals/DefinitionError.as
+++ b/core/src/avm2/globals/DefinitionError.as
@@ -5,17 +5,16 @@
package
{
- public dynamic class DefinitionError extends Error
- {
- prototype.name = "DefinitionError";
+ public dynamic class DefinitionError extends Error
+ {
+ prototype.name = "DefinitionError";
- public function DefinitionError(message:String = "", id:int = 0)
- {
- super(message, id);
- this.name = prototype.name;
- }
+ public function DefinitionError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
-
diff --git a/core/src/avm2/globals/Error.as b/core/src/avm2/globals/Error.as
index 06dd2c456020..5dd169ec5c02 100644
--- a/core/src/avm2/globals/Error.as
+++ b/core/src/avm2/globals/Error.as
@@ -1,19 +1,23 @@
-package {
+package
+{
[Ruffle(InstanceAllocator)]
[Ruffle(CallHandler)]
- public dynamic class Error {
- Error.prototype.name = "Error"
+ public dynamic class Error
+ {
+ Error.prototype.name = "Error";
public var name:String = "Error";
public var message:String;
private var _id:int;
- public function Error(message:String = "", id:int = 0) {
+ public function Error(message:String = "", id:int = 0)
+ {
this.message = message;
this._id = id;
}
- public function get errorID():int {
+ public function get errorID():int
+ {
return this._id;
}
@@ -21,7 +25,8 @@ package {
public static const length:int = 1;
- prototype.toString = function():String {
+ prototype.toString = function():String
+ {
var self:Error = this;
return self.message !== "" ? self.name + ": " + self.message : self.name;
};
diff --git a/core/src/avm2/globals/EvalError.as b/core/src/avm2/globals/EvalError.as
index 28388a4b8756..519bd5f9ccfd 100644
--- a/core/src/avm2/globals/EvalError.as
+++ b/core/src/avm2/globals/EvalError.as
@@ -6,16 +6,16 @@
package
{
- public dynamic class EvalError extends Error
- {
- prototype.name = "EvalError";
+ public dynamic class EvalError extends Error
+ {
+ prototype.name = "EvalError";
- public function EvalError(message:String = "", id:int = 0)
- {
- super(message, id);
- this.name = prototype.name;
- }
+ public function EvalError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/Function.as b/core/src/avm2/globals/Function.as
index f7beaeaac8d5..ff1e0ecea798 100644
--- a/core/src/avm2/globals/Function.as
+++ b/core/src/avm2/globals/Function.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `function.rs`
-package {
- public final class Function {
- }
+package
+{
+ public final class Function
+ {
+ }
}
diff --git a/core/src/avm2/globals/JSON.as b/core/src/avm2/globals/JSON.as
index 327353365b1b..d1d8a0f46632 100644
--- a/core/src/avm2/globals/JSON.as
+++ b/core/src/avm2/globals/JSON.as
@@ -1,7 +1,9 @@
-package {
- [API("674")]
- public final class JSON {
- public static native function parse(text:String, reviver:Function = null): Object;
- public static native function stringify(value:Object, replacer:* = null, space:* = null): String;
- }
+package
+{
+ [API("674")]
+ public final class JSON
+ {
+ public static native function parse(text:String, reviver:Function = null):Object;
+ public static native function stringify(value:Object, replacer:* = null, space:* = null):String;
+ }
}
diff --git a/core/src/avm2/globals/Math.as b/core/src/avm2/globals/Math.as
index 0c065e6bc258..63359637bc82 100644
--- a/core/src/avm2/globals/Math.as
+++ b/core/src/avm2/globals/Math.as
@@ -1,37 +1,39 @@
-package {
-[Ruffle(InstanceAllocator)]
-[Ruffle(CallHandler)]
- public final class Math {
- public static const E: Number = 2.718281828459045;
- public static const LN10: Number = 2.302585092994046;
- public static const LN2: Number = 0.6931471805599453;
- public static const LOG10E: Number = 0.4342944819032518;
- public static const LOG2E: Number = 1.442695040888963387;
- public static const PI: Number = 3.141592653589793;
- public static const SQRT1_2: Number = 0.7071067811865476;
- public static const SQRT2: Number = 1.4142135623730951;
+package
+{
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(CallHandler)]
+ public final class Math
+ {
+ public static const E:Number = 2.718281828459045;
+ public static const LN10:Number = 2.302585092994046;
+ public static const LN2:Number = 0.6931471805599453;
+ public static const LOG10E:Number = 0.4342944819032518;
+ public static const LOG2E:Number = 1.442695040888963387;
+ public static const PI:Number = 3.141592653589793;
+ public static const SQRT1_2:Number = 0.7071067811865476;
+ public static const SQRT2:Number = 1.4142135623730951;
- public static native function abs(x: Number): Number;
- public static native function acos(x: Number): Number;
- public static native function asin(x: Number): Number;
- public static native function atan(x: Number): Number;
- public static native function ceil(x: Number): Number;
- public static native function cos(x: Number): Number;
- public static native function exp(x: Number): Number;
- public static native function floor(x: Number): Number;
- public static native function log(x: Number): Number;
- public static native function round(x: Number): Number;
- public static native function sin(x: Number): Number;
- public static native function sqrt(x: Number): Number;
- public static native function tan(x: Number): Number;
- public static native function atan2(y: Number, x: Number): Number;
- public static native function pow(x: Number, y: Number): Number;
+ public static native function abs(x:Number):Number;
+ public static native function acos(x:Number):Number;
+ public static native function asin(x:Number):Number;
+ public static native function atan(x:Number):Number;
+ public static native function ceil(x:Number):Number;
+ public static native function cos(x:Number):Number;
+ public static native function exp(x:Number):Number;
+ public static native function floor(x:Number):Number;
+ public static native function log(x:Number):Number;
+ public static native function round(x:Number):Number;
+ public static native function sin(x:Number):Number;
+ public static native function sqrt(x:Number):Number;
+ public static native function tan(x:Number):Number;
+ public static native function atan2(y:Number, x:Number):Number;
+ public static native function pow(x:Number, y:Number):Number;
- // This is a hacky way to specify `-Infinity` as a default value.
- private static const NegInfinity: Number = -1 / 0;
- public static native function max(x: Number = NegInfinity, y: Number = NegInfinity, ...rest): Number;
- public static native function min(x: Number = Infinity, y: Number = Infinity, ...rest): Number;
+ // This is a hacky way to specify `-Infinity` as a default value.
+ private static const NegInfinity:Number = -1 / 0;
+ public static native function max(x:Number = NegInfinity, y:Number = NegInfinity, ...rest):Number;
+ public static native function min(x:Number = Infinity, y:Number = Infinity, ...rest):Number;
- public static native function random(): Number;
- }
+ public static native function random():Number;
+ }
}
diff --git a/core/src/avm2/globals/Namespace.as b/core/src/avm2/globals/Namespace.as
index 0b45d3accdd9..ddbd7ad660de 100644
--- a/core/src/avm2/globals/Namespace.as
+++ b/core/src/avm2/globals/Namespace.as
@@ -1,36 +1,43 @@
-package {
- [Ruffle(InstanceAllocator)]
- [Ruffle(CallHandler)]
- public final class Namespace {
- prototype.toString = function():String {
- var n:Namespace = this;
- return n.uri;
- }
- prototype.valueOf = function():String {
- var n:Namespace = this;
- return n.uri;
- }
+package
+{
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(CallHandler)]
+ public final class Namespace
+ {
+ prototype.toString = function():String
+ {
+ var n:Namespace = this;
+ return n.uri;
+ };
+ prototype.valueOf = function():String
+ {
+ var n:Namespace = this;
+ return n.uri;
+ };
- prototype.setPropertyIsEnumerable("toString", false);
- prototype.setPropertyIsEnumerable("valueOf", false);
+ prototype.setPropertyIsEnumerable("toString", false);
+ prototype.setPropertyIsEnumerable("valueOf", false);
- public function Namespace(prefix:* = void 0, uri:* = void 0) {
- this.init(arguments);
- }
+ public function Namespace(prefix:* = void 0, uri:* = void 0)
+ {
+ this.init(arguments);
+ }
- private native function init(args:Array):void;
+ private native function init(args:Array):void;
- public native function get prefix():*;
- public native function get uri():String;
+ public native function get prefix():*;
+ public native function get uri():String;
- AS3 function toString():String {
- return this.uri;
- }
+ AS3 function toString():String
+ {
+ return this.uri;
+ }
- AS3 function valueOf():String {
- return this.uri;
- }
+ AS3 function valueOf():String
+ {
+ return this.uri;
+ }
- public static const length:* = 2;
- }
+ public static const length:* = 2;
+ }
}
diff --git a/core/src/avm2/globals/Number.as b/core/src/avm2/globals/Number.as
index a1fe3e800ced..753c0480d4d5 100644
--- a/core/src/avm2/globals/Number.as
+++ b/core/src/avm2/globals/Number.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `number.rs`
-package {
- public class Number {
+package
+{
+ public class Number
+ {
}
}
diff --git a/core/src/avm2/globals/Object.as b/core/src/avm2/globals/Object.as
index eaf85e1cb368..492697a1bc57 100644
--- a/core/src/avm2/globals/Object.as
+++ b/core/src/avm2/globals/Object.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `object.rs`
-package {
- public dynamic class Object {
+package
+{
+ public dynamic class Object
+ {
}
}
diff --git a/core/src/avm2/globals/QName.as b/core/src/avm2/globals/QName.as
index 7b0df9b6af64..5cdab98c5c73 100644
--- a/core/src/avm2/globals/QName.as
+++ b/core/src/avm2/globals/QName.as
@@ -1,28 +1,33 @@
-package {
- [Ruffle(InstanceAllocator)]
- [Ruffle(CallHandler)]
- public final class QName {
- public static const length:* = 2;
+package
+{
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(CallHandler)]
+ public final class QName
+ {
+ public static const length:* = 2;
- public function QName(uri:* = void 0, localName:* = void 0) {
- this.init(arguments);
- }
+ public function QName(uri:* = void 0, localName:* = void 0)
+ {
+ this.init(arguments);
+ }
- private native function init(args:Array):void;
+ private native function init(args:Array):void;
- public native function get localName():String;
- public native function get uri():String;
+ public native function get localName():String;
+ public native function get uri():String;
- AS3 native function toString():String;
- AS3 function valueOf():QName {
- return this;
- }
+ AS3 native function toString():String;
+ AS3 function valueOf():QName
+ {
+ return this;
+ }
- prototype.toString = function():String {
- var self:QName = this;
- return self.AS3::toString();
- }
+ prototype.toString = function():String
+ {
+ var self:QName = this;
+ return self.AS3::toString();
+ };
- prototype.setPropertyIsEnumerable("toString", false);
- }
+ prototype.setPropertyIsEnumerable("toString", false);
+ }
}
diff --git a/core/src/avm2/globals/RangeError.as b/core/src/avm2/globals/RangeError.as
index 1111d584144a..1bd76ff18143 100644
--- a/core/src/avm2/globals/RangeError.as
+++ b/core/src/avm2/globals/RangeError.as
@@ -1,12 +1,15 @@
-package {
- public dynamic class RangeError extends Error {
- RangeError.prototype.name = "RangeError"
+package
+{
+ public dynamic class RangeError extends Error
+ {
+ RangeError.prototype.name = "RangeError";
- public function RangeError(message:String = "", code:* = 0) {
- super(message, code);
- this.name = prototype.name;
- }
+ public function RangeError(message:String = "", code:* = 0)
+ {
+ super(message, code);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/ReferenceError.as b/core/src/avm2/globals/ReferenceError.as
index a629adcd2718..d75398498fdc 100644
--- a/core/src/avm2/globals/ReferenceError.as
+++ b/core/src/avm2/globals/ReferenceError.as
@@ -1,12 +1,15 @@
-package {
- public dynamic class ReferenceError extends Error {
- ReferenceError.prototype.name = "ReferenceError";
-
- public function ReferenceError(message:String = "", code:* = 0) {
- super(message, code);
- this.name = prototype.name;
- }
+package
+{
+ public dynamic class ReferenceError extends Error
+ {
+ ReferenceError.prototype.name = "ReferenceError";
- public static const length:int = 1;
- }
+ public function ReferenceError(message:String = "", code:* = 0)
+ {
+ super(message, code);
+ this.name = prototype.name;
+ }
+
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/RegExp.as b/core/src/avm2/globals/RegExp.as
index 8a5838cdd95f..1ac24ad0065e 100644
--- a/core/src/avm2/globals/RegExp.as
+++ b/core/src/avm2/globals/RegExp.as
@@ -1,66 +1,77 @@
-package {
- [Ruffle(InstanceAllocator)]
- [Ruffle(CallHandler)]
- public dynamic class RegExp {
- public function RegExp(re:* = undefined, flags:* = undefined) {
- this.init(re, flags)
- }
+package
+{
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(CallHandler)]
+ public dynamic class RegExp
+ {
+ public function RegExp(re:* = undefined, flags:* = undefined)
+ {
+ this.init(re, flags);
+ }
- private native function init(re:*, flags:*):void;
+ private native function init(re:*, flags:*):void;
- public native function get dotall():Boolean;
- public native function get extended():Boolean;
- public native function get global():Boolean;
- public native function get ignoreCase():Boolean;
- public native function get multiline():Boolean;
- public native function get lastIndex():int;
- public native function set lastIndex(value:int):void;
- public native function get source():String;
+ public native function get dotall():Boolean;
+ public native function get extended():Boolean;
+ public native function get global():Boolean;
+ public native function get ignoreCase():Boolean;
+ public native function get multiline():Boolean;
+ public native function get lastIndex():int;
+ public native function set lastIndex(value:int):void;
+ public native function get source():String;
- AS3 native function exec(str:String = ""):Object;
- AS3 native function test(str:String = ""):Boolean;
+ AS3 native function exec(str:String = ""):Object;
+ AS3 native function test(str:String = ""):Boolean;
- prototype.exec = function(str:String = ""):Object {
- return this.AS3::exec(str);
- }
+ prototype.exec = function(str:String = ""):Object
+ {
+ return this.AS3::exec(str);
+ };
- prototype.test = function(str:String = ""):Boolean {
- return this.AS3::test(str);
- }
+ prototype.test = function(str:String = ""):Boolean
+ {
+ return this.AS3::test(str);
+ };
- prototype.toString = function():String {
- // Note: This function is not generic and will throw for non-regexps.
- var regexp: RegExp = this;
+ prototype.toString = function():String
+ {
+ // Note: This function is not generic and will throw for non-regexps.
+ var regexp:RegExp = this;
- // ECMA-262 Edition 5.1 - RegExp.prototype.toString():
- // Return the String value formed by concatenating the Strings "/",
- // the String value of the source property of this RegExp object, and "/";
- // plus "g" if the global property is true,
- // "i" if the ignoreCase property is true,
- // and "m" if the multiline property is true.
- var string = "/" + regexp.source + "/";
- if (regexp.global) {
- string += "g";
- }
- if (regexp.ignoreCase) {
- string += "i";
- }
- if (regexp.multiline) {
- string += "m";
- }
- if (regexp.dotall) {
- string += "s";
- }
- if (regexp.extended) {
- string += "x";
- }
- return string;
- }
+ // ECMA-262 Edition 5.1 - RegExp.prototype.toString():
+ // Return the String value formed by concatenating the Strings "/",
+ // the String value of the source property of this RegExp object, and "/";
+ // plus "g" if the global property is true,
+ // "i" if the ignoreCase property is true,
+ // and "m" if the multiline property is true.
+ var string = "/" + regexp.source + "/";
+ if (regexp.global)
+ {
+ string += "g";
+ }
+ if (regexp.ignoreCase)
+ {
+ string += "i";
+ }
+ if (regexp.multiline)
+ {
+ string += "m";
+ }
+ if (regexp.dotall)
+ {
+ string += "s";
+ }
+ if (regexp.extended)
+ {
+ string += "x";
+ }
+ return string;
+ };
- prototype.setPropertyIsEnumerable("exec", false);
- prototype.setPropertyIsEnumerable("test", false);
- prototype.setPropertyIsEnumerable("toString", false);
+ prototype.setPropertyIsEnumerable("exec", false);
+ prototype.setPropertyIsEnumerable("test", false);
+ prototype.setPropertyIsEnumerable("toString", false);
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/SecurityError.as b/core/src/avm2/globals/SecurityError.as
index d173e7cd8e0f..6d3da38b1cf5 100644
--- a/core/src/avm2/globals/SecurityError.as
+++ b/core/src/avm2/globals/SecurityError.as
@@ -6,17 +6,16 @@
package
{
- public dynamic class SecurityError extends Error
- {
- prototype.name = "SecurityError";
+ public dynamic class SecurityError extends Error
+ {
+ prototype.name = "SecurityError";
- public function SecurityError(message:String = "", id:int = 0)
- {
- super(message, id);
- this.name = prototype.name;
- }
+ public function SecurityError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
-
diff --git a/core/src/avm2/globals/String.as b/core/src/avm2/globals/String.as
index 01a10b2930c8..e0eddcd7f5ef 100644
--- a/core/src/avm2/globals/String.as
+++ b/core/src/avm2/globals/String.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `string.rs`
-package {
- public class String {
+package
+{
+ public class String
+ {
}
}
diff --git a/core/src/avm2/globals/SyntaxError.as b/core/src/avm2/globals/SyntaxError.as
index 9d2f83ae0b25..fece5063ce86 100644
--- a/core/src/avm2/globals/SyntaxError.as
+++ b/core/src/avm2/globals/SyntaxError.as
@@ -6,17 +6,16 @@
package
{
- public dynamic class SyntaxError extends Error
- {
- prototype.name = "SyntaxError";
+ public dynamic class SyntaxError extends Error
+ {
+ prototype.name = "SyntaxError";
- public function SyntaxError(message:String = "", id:int = 0)
- {
- super(message, id);
- this.name = prototype.name;
- }
+ public function SyntaxError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
-
diff --git a/core/src/avm2/globals/Toplevel.as b/core/src/avm2/globals/Toplevel.as
index 9787710f062e..2e086054e05d 100644
--- a/core/src/avm2/globals/Toplevel.as
+++ b/core/src/avm2/globals/Toplevel.as
@@ -1,30 +1,31 @@
-package {
- public namespace AS3 = "http://adobe.com/AS3/2006/builtin";
+package
+{
+ public namespace AS3 = "http://adobe.com/AS3/2006/builtin";
- public const NaN: Number = 0 / 0;
+ public const NaN:Number = 0 / 0;
- public const Infinity: Number = 1 / 0;
+ public const Infinity:Number = 1 / 0;
- public const undefined = void 0;
+ public const undefined = void 0;
- public native function encodeURI(uri:String = "undefined"):String;
- public native function encodeURIComponent(uri:String = "undefined"):String;
+ public native function encodeURI(uri:String = "undefined"):String;
+ public native function encodeURIComponent(uri:String = "undefined"):String;
- public native function decodeURI(uri:String = "undefined"):String;
- public native function decodeURIComponent(uri:String = "undefined"):String;
+ public native function decodeURI(uri:String = "undefined"):String;
+ public native function decodeURIComponent(uri:String = "undefined"):String;
- public native function escape(string:String = "undefined"):String;
- public native function unescape(string:String = "undefined"):String;
+ public native function escape(string:String = "undefined"):String;
+ public native function unescape(string:String = "undefined"):String;
- public native function isXMLName(string:* = undefined):Boolean;
+ public native function isXMLName(string:* = undefined):Boolean;
- public native function isFinite(value:Number = undefined):Boolean;
- public native function isNaN(value:Number = undefined):Boolean;
+ public native function isFinite(value:Number = undefined):Boolean;
+ public native function isNaN(value:Number = undefined):Boolean;
- public native function parseFloat(number:String = "NaN"):Number;
- public native function parseInt(string:String = "NaN", base:int = 0):Number;
+ public native function parseFloat(number:String = "NaN"):Number;
+ public native function parseInt(string:String = "NaN", base:int = 0):Number;
- public native function trace(... rest):void;
+ public native function trace(...rest):void;
}
// These classes are required by other core code, so we put them here. Toplevel.as
diff --git a/core/src/avm2/globals/TypeError.as b/core/src/avm2/globals/TypeError.as
index f6a4ea6a2057..e2ecfd5b90a6 100644
--- a/core/src/avm2/globals/TypeError.as
+++ b/core/src/avm2/globals/TypeError.as
@@ -1,12 +1,15 @@
-package {
- public dynamic class TypeError extends Error {
- TypeError.prototype.name = "TypeError"
+package
+{
+ public dynamic class TypeError extends Error
+ {
+ TypeError.prototype.name = "TypeError";
- public function TypeError(message:String = "", code:* = 0) {
- super(message, code)
- this.name = prototype.name
- }
+ public function TypeError(message:String = "", code:* = 0)
+ {
+ super(message, code);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/URIError.as b/core/src/avm2/globals/URIError.as
index a4ae1c8d6ece..4407633b61b8 100644
--- a/core/src/avm2/globals/URIError.as
+++ b/core/src/avm2/globals/URIError.as
@@ -6,17 +6,16 @@
package
{
- public dynamic class URIError extends Error
- {
- prototype.name = "URIError";
+ public dynamic class URIError extends Error
+ {
+ prototype.name = "URIError";
- public function URIError(message:String = "", id:int = 0)
- {
- super(message, id);
- this.name = prototype.name;
- }
+ public function URIError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
-
diff --git a/core/src/avm2/globals/UninitializedError.as b/core/src/avm2/globals/UninitializedError.as
index 675f6a2d53d6..e4e4fb19a5c4 100644
--- a/core/src/avm2/globals/UninitializedError.as
+++ b/core/src/avm2/globals/UninitializedError.as
@@ -1,12 +1,15 @@
-package {
- public dynamic class UninitializedError extends Error {
- UninitializedError.prototype.name = "UninitializedError";
-
- public function UninitializedError(message:String = "", code:* = 0) {
- super(message, code);
- this.name = prototype.name;
- }
+package
+{
+ public dynamic class UninitializedError extends Error
+ {
+ UninitializedError.prototype.name = "UninitializedError";
- public static const length:int = 1;
- }
+ public function UninitializedError(message:String = "", code:* = 0)
+ {
+ super(message, code);
+ this.name = prototype.name;
+ }
+
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/Vector.as b/core/src/avm2/globals/Vector.as
index 791c949152b6..f4294c78d906 100644
--- a/core/src/avm2/globals/Vector.as
+++ b/core/src/avm2/globals/Vector.as
@@ -2,7 +2,9 @@
// See this for the explanation of the weird package name:
// https://github.com/adobe/avmplus/blob/858d034a3bd3a54d9b70909386435cf4aec81d21/core/VectorClass.h#L18-L65
-package __AS3__.vec {
- public final dynamic class Vector {
- }
+package __AS3__.vec
+{
+ public final dynamic class Vector
+ {
+ }
}
diff --git a/core/src/avm2/globals/VerifyError.as b/core/src/avm2/globals/VerifyError.as
index a4ad258a5df2..8a800f893784 100644
--- a/core/src/avm2/globals/VerifyError.as
+++ b/core/src/avm2/globals/VerifyError.as
@@ -5,16 +5,16 @@
package
{
- public dynamic class VerifyError extends Error
- {
- prototype.name = "VerifyError";
+ public dynamic class VerifyError extends Error
+ {
+ prototype.name = "VerifyError";
- public function VerifyError(message:String = "", id:int = 0)
- {
- super(message, id);
- this.name = prototype.name;
- }
+ public function VerifyError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ this.name = prototype.name;
+ }
- public static const length:int = 1;
- }
+ public static const length:int = 1;
+ }
}
diff --git a/core/src/avm2/globals/XML.as b/core/src/avm2/globals/XML.as
index 251e5cb53d21..194147704cfe 100644
--- a/core/src/avm2/globals/XML.as
+++ b/core/src/avm2/globals/XML.as
@@ -1,317 +1,374 @@
-package {
- [Ruffle(InstanceAllocator)]
- [Ruffle(CallHandler)]
- public final dynamic class XML {
- AS3 native function normalize(): XML;
-
- AS3 static function setSettings(settings:Object = null): void {
- if (settings == null) {
- settings = XML.AS3::defaultSettings();
- }
- if ("ignoreComments" in settings) {
- XML.ignoreComments = settings.ignoreComments;
- }
- if ("ignoreProcessingInstructions" in settings) {
- XML.ignoreProcessingInstructions = settings.ignoreProcessingInstructions;
- }
- if ("ignoreWhitespace" in settings) {
- XML.ignoreWhitespace = settings.ignoreWhitespace;
- }
- if ("prettyIndent" in settings) {
- XML.prettyIndent = settings.prettyIndent;
- }
- if ("prettyPrinting" in settings) {
- XML.prettyPrinting = settings.prettyPrinting;
- }
- }
-
- AS3 static function settings():Object {
- return {
- ignoreComments: XML.ignoreComments,
- ignoreProcessingInstructions: XML.ignoreProcessingInstructions,
- ignoreWhitespace: XML.ignoreWhitespace,
- prettyIndent: XML.prettyIndent,
- prettyPrinting: XML.prettyPrinting
- };
- }
-
- AS3 static function defaultSettings():Object {
- return {
- ignoreComments: true,
- ignoreProcessingInstructions: true,
- ignoreWhitespace: true,
- prettyIndent: 2,
- prettyPrinting: true
- };
- }
-
- public function XML(value:* = void 0) {
- this.init(value, XML.ignoreComments, XML.ignoreProcessingInstructions, XML.ignoreWhitespace);
- }
-
- private native function init(value:*, ignoreComments:Boolean, ignoreProcessingInstructions:Boolean, ignoreWhitespace:Boolean):void;
-
- AS3 native function hasComplexContent():Boolean;
- AS3 native function hasSimpleContent():Boolean;
- AS3 native function name():Object;
- AS3 native function setName(name:*):void;
- private native function namespace_internal_impl(hasPrefix:Boolean, prefix:String = null):*;
- AS3 function namespace(prefix:* = null):* {
- return namespace_internal_impl(arguments.length > 0, prefix);
- }
- AS3 native function addNamespace(ns:*):XML;
- AS3 native function setNamespace(ns:*):void;
- AS3 native function removeNamespace(ns:*):XML;
- AS3 native function inScopeNamespaces():Array;
- AS3 native function namespaceDeclarations():Array;
- AS3 native function localName():Object;
- AS3 native function toXMLString():String;
- AS3 native function child(name:*):XMLList;
- AS3 native function childIndex():int;
- AS3 native function children():XMLList;
- AS3 native function contains(value:*):Boolean;
- AS3 native function copy():XML;
- AS3 native function parent():*;
- AS3 native function elements(name:* = "*"):XMLList;
- AS3 native function attributes():XMLList;
- AS3 native function attribute(name:*):XMLList;
- AS3 native function nodeKind():String;
- AS3 native function appendChild(child:*):XML;
- AS3 native function prependChild(child:*):XML;
- AS3 native function descendants(name:Object = "*"):XMLList;
- AS3 native function text():XMLList;
- AS3 native function toString():String;
- AS3 native function length():int;
- AS3 native function comments():XMLList;
- AS3 native function processingInstructions(name:* = "*"):XMLList;
- AS3 native function insertChildAfter(child1:*, child2:*):*;
- AS3 native function insertChildBefore(child1:*, child2:*):*;
- // NOTE: Docs lie, value can be anything not just XML.
- AS3 native function replace(propertyName:*, value:*):XML;
- AS3 native function setChildren(value:*):XML;
- AS3 native function setLocalName(name:*):void;
-
- AS3 function valueOf():XML {
- return this;
- }
-
- AS3 function toJSON(k:String) : * {
- return this.toJSON(k);
- }
-
- // undocumented functions
- AS3 native function notification():Function;
- AS3 native function setNotification(f:Function):*;
-
- public static var ignoreComments:Boolean = true;
- public static var ignoreProcessingInstructions:Boolean = true;
- public static var ignoreWhitespace:Boolean = true;
- public static var prettyPrinting:Boolean = true;
- public static var prettyIndent:int = 2;
-
- prototype.hasComplexContent = function():Boolean {
- var self:XML = this;
- return self.AS3::hasComplexContent();
- }
-
- prototype.hasSimpleContent = function():Boolean {
- var self:XML = this;
- return self.AS3::hasSimpleContent();
- }
-
- prototype.name = function():Object {
- var self:XML = this;
- // NOTE - `self.name()` should be sufficient here (and in all of the other methods)
- // However, asc.jar doesn't resolve the 'AS3' namespace when I do
- // 'self.name()' here, which leads to the prototype method invoking
- // itself, instead of the AS3 method.
- return self.AS3::name();
- };
-
- prototype.setName = function(name:*):void {
- var self:XML = this;
- self.AS3::setName(name);
- };
-
- prototype.namespace = function(prefix:* = null):* {
- var self:XML = this;
- return self.AS3::namespace.apply(self, arguments);
- };
-
- prototype.addNamespace = function(ns:*):XML {
- var self:XML = this;
- return self.AS3::addNamespace(ns);
- };
-
- prototype.setNamespace = function(ns:*):void {
- var self:XML = this;
- self.AS3::setNamespace(ns);
- };
-
- prototype.removeNamespace = function(ns:*):XML {
- var self:XML = this;
- return self.AS3::removeNamespace(ns);
- };
-
- prototype.namespaceDeclarations = function():Array {
- var self:XML = this;
- return self.AS3::namespaceDeclarations();
- };
-
- prototype.inScopeNamespaces = function():Array {
- var self:XML = this;
- return self.AS3::inScopeNamespaces();
- };
-
- prototype.localName = function():Object {
- var self:XML = this;
- return self.AS3::localName();
- };
-
- prototype.toXMLString = function():String {
- var self:XML = this;
- return self.AS3::toXMLString();
- };
-
- prototype.child = function(name:*):XMLList {
- var self:XML = this;
- return self.AS3::child(name);
- };
-
- prototype.childIndex = function():int {
- var self:XML = this;
- return self.AS3::childIndex();
- };
-
- prototype.children = function():XMLList {
- var self:XML = this;
- return self.AS3::children();
- };
-
- prototype.contains = function(value:*):Boolean {
- var self:XML = this;
- return self.AS3::contains(value);
- };
-
- prototype.copy = function():XML {
- var self:XML = this;
- return self.AS3::copy();
- }
-
- prototype.parent = function():* {
- var self:XML = this;
- return self.AS3::parent();
- };
-
- prototype.elements = function(name:* = "*"):XMLList {
- var self:XML = this;
- return self.AS3::elements(name);
- }
-
- prototype.toString = function():String {
- if (this === prototype) {
- return "";
- }
- var self:XML = this;
- return self.AS3::toString();
- };
-
- prototype.attributes = function():XMLList {
- var self:XML = this;
- return self.AS3::attributes();
- };
-
- prototype.attribute = function(name:*):XMLList {
- var self:XML = this;
- return self.AS3::attribute(name);
- };
-
- prototype.nodeKind = function():String {
- var self:XML = this;
- return self.AS3::nodeKind();
- };
-
- prototype.appendChild = function(child:*):XML {
- var self:XML = this;
- return self.AS3::appendChild(child);
- };
-
- prototype.prependChild = function(child:*):XML {
- var self:XML = this;
- return self.AS3::prependChild(child);
- };
-
- prototype.descendants = function(name:* = "*"):XMLList {
- var self:XML = this;
- return self.AS3::descendants(name);
- };
-
- prototype.text = function():XMLList {
- var self:XML = this;
- return self.AS3::text();
- };
-
- prototype.normalize = function():XML {
- var self:XML = this;
- return self.AS3::normalize();
- };
-
- prototype.length = function():int {
- var self:XML = this;
- return self.AS3::length();
- }
-
- prototype.toJSON = function(k:String):* {
- return "XML";
- };
-
- prototype.comments = function():XMLList {
- var self:XML = this;
- return self.AS3::comments();
- }
-
- prototype.processingInstructions = function(name:* = "*"):XMLList {
- var self:XML = this;
- return self.AS3::processingInstructions(name);
- }
-
- prototype.insertChildAfter = function(child1:*, child2:*):* {
- var self:XML = this;
- return self.AS3::insertChildAfter(child1, child2);
- }
-
- prototype.insertChildBefore = function(child1:*, child2:*):* {
- var self:XML = this;
- return self.AS3::insertChildBefore(child1, child2);
- }
-
- prototype.replace = function(propertyName:*, value:*):XML {
- var self:XML = this;
- return self.AS3::replace(propertyName, value);
- }
-
- prototype.setChildren = function(value:*):XML {
- var self:XML = this;
- return self.AS3::setChildren(value);
- }
-
- prototype.setLocalName = function(name:*):void {
- var self:XML = this;
- self.AS3::setLocalName(name);
- }
-
- XML.settings = function() {
- return XML.AS3::settings();
- }
-
- XML.setSettings = function(v:* = void 0) {
- XML.AS3::setSettings(v)
- }
-
- XML.defaultSettings = function() {
- return XML.AS3::defaultSettings();
- }
-
- public static const length:* = 1;
- }
+package
+{
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(CallHandler)]
+ public final dynamic class XML
+ {
+ AS3 native function normalize():XML;
+
+ AS3 static function setSettings(settings:Object = null):void
+ {
+ if (settings == null)
+ {
+ settings = XML.AS3::defaultSettings();
+ }
+ if ("ignoreComments" in settings)
+ {
+ XML.ignoreComments = settings.ignoreComments;
+ }
+ if ("ignoreProcessingInstructions" in settings)
+ {
+ XML.ignoreProcessingInstructions = settings.ignoreProcessingInstructions;
+ }
+ if ("ignoreWhitespace" in settings)
+ {
+ XML.ignoreWhitespace = settings.ignoreWhitespace;
+ }
+ if ("prettyIndent" in settings)
+ {
+ XML.prettyIndent = settings.prettyIndent;
+ }
+ if ("prettyPrinting" in settings)
+ {
+ XML.prettyPrinting = settings.prettyPrinting;
+ }
+ }
+
+ AS3 static function settings():Object
+ {
+ return {
+ ignoreComments: XML.ignoreComments,
+ ignoreProcessingInstructions: XML.ignoreProcessingInstructions,
+ ignoreWhitespace: XML.ignoreWhitespace,
+ prettyIndent: XML.prettyIndent,
+ prettyPrinting: XML.prettyPrinting
+ };
+ }
+
+ AS3 static function defaultSettings():Object
+ {
+ return {
+ ignoreComments: true,
+ ignoreProcessingInstructions: true,
+ ignoreWhitespace: true,
+ prettyIndent: 2,
+ prettyPrinting: true
+ };
+ }
+
+ public function XML(value:* = void 0)
+ {
+ this.init(value, XML.ignoreComments, XML.ignoreProcessingInstructions, XML.ignoreWhitespace);
+ }
+
+ private native function init(value:*, ignoreComments:Boolean, ignoreProcessingInstructions:Boolean, ignoreWhitespace:Boolean):void;
+
+ AS3 native function hasComplexContent():Boolean;
+ AS3 native function hasSimpleContent():Boolean;
+ AS3 native function name():Object;
+ AS3 native function setName(name:*):void;
+ private native function namespace_internal_impl(hasPrefix:Boolean, prefix:String = null):*;
+ AS3 function namespace (prefix:* = null):*
+ {
+ return namespace_internal_impl(arguments.length > 0, prefix);
+ }
+ AS3 native function addNamespace(ns:*):XML;
+ AS3 native function setNamespace(ns:*):void;
+ AS3 native function removeNamespace(ns:*):XML;
+ AS3 native function inScopeNamespaces():Array;
+ AS3 native function namespaceDeclarations():Array;
+ AS3 native function localName():Object;
+ AS3 native function toXMLString():String;
+ AS3 native function child(name:*):XMLList;
+ AS3 native function childIndex():int;
+ AS3 native function children():XMLList;
+ AS3 native function contains(value:*):Boolean;
+ AS3 native function copy():XML;
+ AS3 native function parent():*;
+ AS3 native function elements(name:* = "*"):XMLList;
+ AS3 native function attributes():XMLList;
+ AS3 native function attribute(name:*):XMLList;
+ AS3 native function nodeKind():String;
+ AS3 native function appendChild(child:*):XML;
+ AS3 native function prependChild(child:*):XML;
+ AS3 native function descendants(name:Object = "*"):XMLList;
+ AS3 native function text():XMLList;
+ AS3 native function toString():String;
+ AS3 native function length():int;
+ AS3 native function comments():XMLList;
+ AS3 native function processingInstructions(name:* = "*"):XMLList;
+ AS3 native function insertChildAfter(child1:*, child2:*):*;
+ AS3 native function insertChildBefore(child1:*, child2:*):*;
+ // NOTE: Docs lie, value can be anything not just XML.
+ AS3 native function replace(propertyName:*, value:*):XML;
+ AS3 native function setChildren(value:*):XML;
+ AS3 native function setLocalName(name:*):void;
+
+ AS3 function valueOf():XML
+ {
+ return this;
+ }
+
+ AS3 function toJSON(k:String):*
+ {
+ return this.toJSON(k);
+ }
+
+ // undocumented functions
+ AS3 native function notification():Function;
+ AS3 native function setNotification(f:Function):*;
+
+ public static var ignoreComments:Boolean = true;
+ public static var ignoreProcessingInstructions:Boolean = true;
+ public static var ignoreWhitespace:Boolean = true;
+ public static var prettyPrinting:Boolean = true;
+ public static var prettyIndent:int = 2;
+
+ prototype.hasComplexContent = function():Boolean
+ {
+ var self:XML = this;
+ return self.AS3::hasComplexContent();
+ };
+
+ prototype.hasSimpleContent = function():Boolean
+ {
+ var self:XML = this;
+ return self.AS3::hasSimpleContent();
+ };
+
+ prototype.name = function():Object
+ {
+ var self:XML = this;
+ // NOTE - `self.name()` should be sufficient here (and in all of the other methods)
+ // However, asc.jar doesn't resolve the 'AS3' namespace when I do
+ // 'self.name()' here, which leads to the prototype method invoking
+ // itself, instead of the AS3 method.
+ return self.AS3::name();
+ };
+
+ prototype.setName = function(name:*):void
+ {
+ var self:XML = this;
+ self.AS3::setName(name);
+ };
+
+ prototype.namespace = function(prefix:* = null):*
+ {
+ var self:XML = this;
+ return self.AS3::namespace .apply(self, arguments);
+ };
+
+ prototype.addNamespace = function(ns:*):XML
+ {
+ var self:XML = this;
+ return self.AS3::addNamespace(ns);
+ };
+
+ prototype.setNamespace = function(ns:*):void
+ {
+ var self:XML = this;
+ self.AS3::setNamespace(ns);
+ };
+
+ prototype.removeNamespace = function(ns:*):XML
+ {
+ var self:XML = this;
+ return self.AS3::removeNamespace(ns);
+ };
+
+ prototype.namespaceDeclarations = function():Array
+ {
+ var self:XML = this;
+ return self.AS3::namespaceDeclarations();
+ };
+
+ prototype.inScopeNamespaces = function():Array
+ {
+ var self:XML = this;
+ return self.AS3::inScopeNamespaces();
+ };
+
+ prototype.localName = function():Object
+ {
+ var self:XML = this;
+ return self.AS3::localName();
+ };
+
+ prototype.toXMLString = function():String
+ {
+ var self:XML = this;
+ return self.AS3::toXMLString();
+ };
+
+ prototype.child = function(name:*):XMLList
+ {
+ var self:XML = this;
+ return self.AS3::child(name);
+ };
+
+ prototype.childIndex = function():int
+ {
+ var self:XML = this;
+ return self.AS3::childIndex();
+ };
+
+ prototype.children = function():XMLList
+ {
+ var self:XML = this;
+ return self.AS3::children();
+ };
+
+ prototype.contains = function(value:*):Boolean
+ {
+ var self:XML = this;
+ return self.AS3::contains(value);
+ };
+
+ prototype.copy = function():XML
+ {
+ var self:XML = this;
+ return self.AS3::copy();
+ };
+
+ prototype.parent = function():*
+ {
+ var self:XML = this;
+ return self.AS3::parent();
+ };
+
+ prototype.elements = function(name:* = "*"):XMLList
+ {
+ var self:XML = this;
+ return self.AS3::elements(name);
+ };
+
+ prototype.toString = function():String
+ {
+ if (this === prototype)
+ {
+ return "";
+ }
+ var self:XML = this;
+ return self.AS3::toString();
+ };
+
+ prototype.attributes = function():XMLList
+ {
+ var self:XML = this;
+ return self.AS3::attributes();
+ };
+
+ prototype.attribute = function(name:*):XMLList
+ {
+ var self:XML = this;
+ return self.AS3::attribute(name);
+ };
+
+ prototype.nodeKind = function():String
+ {
+ var self:XML = this;
+ return self.AS3::nodeKind();
+ };
+
+ prototype.appendChild = function(child:*):XML
+ {
+ var self:XML = this;
+ return self.AS3::appendChild(child);
+ };
+
+ prototype.prependChild = function(child:*):XML
+ {
+ var self:XML = this;
+ return self.AS3::prependChild(child);
+ };
+
+ prototype.descendants = function(name:* = "*"):XMLList
+ {
+ var self:XML = this;
+ return self.AS3::descendants(name);
+ };
+
+ prototype.text = function():XMLList
+ {
+ var self:XML = this;
+ return self.AS3::text();
+ };
+
+ prototype.normalize = function():XML
+ {
+ var self:XML = this;
+ return self.AS3::normalize();
+ };
+
+ prototype.length = function():int
+ {
+ var self:XML = this;
+ return self.AS3::length();
+ };
+
+ prototype.toJSON = function(k:String):*
+ {
+ return "XML";
+ };
+
+ prototype.comments = function():XMLList
+ {
+ var self:XML = this;
+ return self.AS3::comments();
+ };
+
+ prototype.processingInstructions = function(name:* = "*"):XMLList
+ {
+ var self:XML = this;
+ return self.AS3::processingInstructions(name);
+ };
+
+ prototype.insertChildAfter = function(child1:*, child2:*):*
+ {
+ var self:XML = this;
+ return self.AS3::insertChildAfter(child1, child2);
+ };
+
+ prototype.insertChildBefore = function(child1:*, child2:*):*
+ {
+ var self:XML = this;
+ return self.AS3::insertChildBefore(child1, child2);
+ };
+
+ prototype.replace = function(propertyName:*, value:*):XML
+ {
+ var self:XML = this;
+ return self.AS3::replace(propertyName, value);
+ };
+
+ prototype.setChildren = function(value:*):XML
+ {
+ var self:XML = this;
+ return self.AS3::setChildren(value);
+ };
+
+ prototype.setLocalName = function(name:*):void
+ {
+ var self:XML = this;
+ self.AS3::setLocalName(name);
+ };
+
+ XML.settings = function()
+ {
+ return XML.AS3::settings();
+ };
+
+ XML.setSettings = function(v:* = void 0)
+ {
+ XML.AS3::setSettings(v);
+
+ };
+
+ XML.defaultSettings = function()
+ {
+ return XML.AS3::defaultSettings();
+ };
+
+ public static const length:* = 1;
+ }
}
diff --git a/core/src/avm2/globals/XMLList.as b/core/src/avm2/globals/XMLList.as
index 63d940f36904..d9f9bfda477e 100644
--- a/core/src/avm2/globals/XMLList.as
+++ b/core/src/avm2/globals/XMLList.as
@@ -1,253 +1,296 @@
-package {
- [Ruffle(InstanceAllocator)]
- [Ruffle(CallHandler)]
- public final dynamic class XMLList {
-
- public function XMLList(value:* = void 0) {
- this.init(value, XML.ignoreComments, XML.ignoreProcessingInstructions, XML.ignoreWhitespace);
- }
-
- private native function init(value:*, ignoreComments:Boolean, ignoreProcessingInstructions:Boolean, ignoreWhitespace:Boolean): void;
-
- AS3 native function hasComplexContent():Boolean;
- AS3 native function hasSimpleContent():Boolean;
- AS3 native function length():int;
- AS3 native function child(name:Object):XMLList;
- AS3 native function children():XMLList;
- AS3 native function contains(value:*):Boolean;
- AS3 native function copy():XMLList;
- AS3 native function attribute(name:*):XMLList;
- AS3 native function attributes():XMLList;
- AS3 native function descendants(name:* = "*"):XMLList;
- AS3 native function text():XMLList;
- AS3 native function toXMLString():String;
- AS3 native function toString():String;
- AS3 native function comments():XMLList;
- AS3 native function parent():*;
- AS3 native function processingInstructions(name:* = "*"):XMLList;
- AS3 native function elements(name:* = "*"):XMLList;
- AS3 native function normalize():XMLList;
-
- // The following native methods are not declared in the documentation,
- // but still exist
- AS3 native function addNamespace(ns:*):XML;
- AS3 native function appendChild(child:*):XML;
- AS3 native function childIndex():int;
- AS3 native function inScopeNamespaces():Array;
- AS3 native function insertChildAfter(child1:*, child2:*):*;
- AS3 native function insertChildBefore(child1:*, child2:*):*;
- AS3 native function localName():Object
- AS3 native function name(): Object;
- private native function namespace_internal_impl(hasPrefix:Boolean, prefix:String = null):*;
- AS3 function namespace(prefix:* = null):* {
- return namespace_internal_impl(arguments.length > 0, prefix);
- }
- AS3 native function namespaceDeclarations():Array;
- AS3 native function nodeKind(): String;
- AS3 native function prependChild(child:*):XML;
- AS3 native function removeNamespace(ns:*):XML;
- AS3 native function replace(propertyName:*, value:*):XML;
- AS3 native function setChildren(value:*):XML;
- AS3 native function setLocalName(name:*):void;
- AS3 native function setName(name:*):void;
- AS3 native function setNamespace(ns:*):void;
-
- AS3 function toJSON(k:String) : * {
- return this.toJSON(k);
- }
-
- AS3 function valueOf():XMLList {
- return this;
- }
-
- prototype.hasComplexContent = function():Boolean {
- var self:XMLList = this;
- return self.AS3::hasComplexContent();
- }
-
- prototype.hasSimpleContent = function():Boolean {
- var self:XMLList = this;
- // NOTE - `self.hasSimpleContent()` should be sufficient here (and in all of the other methods)
- // However, asc.jar doesn't resolve the 'AS3' namespace when I do
- // 'self.hasSimpleContent()' here, which leads to the prototype method invoking
- // itself, instead of the AS3 method.
- return self.AS3::hasSimpleContent();
- }
-
- prototype.length = function():int {
- var self:XMLList = this;
- return self.AS3::length();
- }
-
- prototype.child = function(name:Object):XMLList {
- var self:XMLList = this;
- return self.AS3::child(name);
- };
-
- prototype.children = function():XMLList {
- var self:XMLList = this;
- return self.AS3::children();
- }
-
- prototype.contains = function(value:*):Boolean {
- var self:XMLList = this;
- return self.AS3::contains(value);
- }
-
- prototype.copy = function():XMLList {
- var self:XMLList = this;
- return self.AS3::copy();
- }
-
- prototype.attribute = function(name:*):XMLList {
- var self:XMLList = this;
- return self.AS3::attribute(name);
- }
-
- prototype.attributes = function():XMLList {
- var self:XMLList = this;
- return self.AS3::attributes();
- }
-
- prototype.toString = function():String {
- var self:XMLList = this;
- return self.AS3::toString();
- }
-
- prototype.toXMLString = function():String {
- var self:XMLList = this;
- return self.AS3::toXMLString();
- }
-
- prototype.addNamespace = function(ns:*):XML {
- var self:XMLList = this;
- return self.AS3::addNamespace(ns);
- }
-
- prototype.appendChild = function(child:*):XML {
- var self:XMLList = this;
- return self.AS3::appendChild(child);
- }
-
- prototype.childIndex = function():int {
- var self:XMLList = this;
- return self.AS3::childIndex();
- }
-
- prototype.inScopeNamespaces = function():Array {
- var self:XMLList = this;
- return self.AS3::inScopeNamespaces();
- }
-
- prototype.insertChildAfter = function(child1:*, child2:*):* {
- var self:XMLList = this;
- return self.AS3::insertChildAfter(child1, child2);
- }
-
- prototype.insertChildBefore = function(child1:*, child2:*):* {
- var self:XMLList = this;
- return self.AS3::insertChildBefore(child1, child2);
- }
-
- prototype.localName = function():Object {
- var self:XMLList = this;
- return self.AS3::localName();
- }
-
- prototype.name = function(): Object {
- var self:XMLList = this;
- return self.AS3::name();
- }
-
- prototype.namespace = function(prefix:* = null):* {
- var self:XMLList = this;
- return self.AS3::namespace.apply(self, arguments);
- }
-
- prototype.namespaceDeclarations = function():Array {
- var self:XMLList = this;
- return self.AS3::namespaceDeclarations();
- }
-
- prototype.nodeKind = function():String {
- var self:XMLList = this;
- return self.AS3::nodeKind();
- }
-
- prototype.prependChild = function(child:*):XML {
- var self:XMLList = this;
- return self.AS3::prependChild(child);
- }
-
- prototype.removeNamespace = function(ns:*):XML {
- var self:XMLList = this;
- return self.AS3::removeNamespace(ns);
- }
-
- prototype.replace = function(propertyName:*, value:*):XML {
- var self:XMLList = this;
- return self.AS3::replace(propertyName, value);
- }
-
- prototype.setChildren = function(value:*):XML {
- var self:XMLList = this;
- return self.AS3::setChildren(value);
- }
-
- prototype.setLocalName = function(name:*):void {
- var self:XMLList = this;
- self.AS3::setLocalName(name);
- }
-
- prototype.setName = function(name:*):void {
- var self:XMLList = this;
- self.AS3::setName(name);
- }
-
- prototype.setNamespace = function(ns:*):void {
- var self:XMLList = this;
- self.AS3::setNamespace(ns);
- }
-
- prototype.descendants = function(name:* = "*"):XMLList {
- var self:XMLList = this;
- return self.AS3::descendants(name);
- }
-
- prototype.text = function():XMLList {
- var self:XMLList = this;
- return self.AS3::text();
- }
-
- prototype.comments = function():XMLList {
- var self:XMLList = this;
- return self.AS3::comments();
- }
-
- prototype.parent = function():* {
- var self:XMLList = this;
- return self.AS3::parent();
- }
-
- prototype.toJSON = function(k:String):* {
- return "XMLList";
- };
-
- prototype.processingInstructions = function(name:* = "*"):XMLList {
- var self:XMLList = this;
- return self.AS3::processingInstructions(name);
- }
-
- prototype.elements = function(name:* = "*"):XMLList {
- var self:XMLList = this;
- return self.AS3::elements(name);
- }
-
- prototype.normalize = function():XMLList {
- var self:XMLList = this;
- return self.AS3::normalize();
- }
-
- public static const length:* = 1;
- }
+package
+{
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(CallHandler)]
+ public final dynamic class XMLList
+ {
+
+ public function XMLList(value:* = void 0)
+ {
+ this.init(value, XML.ignoreComments, XML.ignoreProcessingInstructions, XML.ignoreWhitespace);
+ }
+
+ private native function init(value:*, ignoreComments:Boolean, ignoreProcessingInstructions:Boolean, ignoreWhitespace:Boolean):void;
+
+ AS3 native function hasComplexContent():Boolean;
+ AS3 native function hasSimpleContent():Boolean;
+ AS3 native function length():int;
+ AS3 native function child(name:Object):XMLList;
+ AS3 native function children():XMLList;
+ AS3 native function contains(value:*):Boolean;
+ AS3 native function copy():XMLList;
+ AS3 native function attribute(name:*):XMLList;
+ AS3 native function attributes():XMLList;
+ AS3 native function descendants(name:* = "*"):XMLList;
+ AS3 native function text():XMLList;
+ AS3 native function toXMLString():String;
+ AS3 native function toString():String;
+ AS3 native function comments():XMLList;
+ AS3 native function parent():*;
+ AS3 native function processingInstructions(name:* = "*"):XMLList;
+ AS3 native function elements(name:* = "*"):XMLList;
+ AS3 native function normalize():XMLList;
+
+ // The following native methods are not declared in the documentation,
+ // but still exist
+ AS3 native function addNamespace(ns:*):XML;
+ AS3 native function appendChild(child:*):XML;
+ AS3 native function childIndex():int;
+ AS3 native function inScopeNamespaces():Array;
+ AS3 native function insertChildAfter(child1:*, child2:*):*;
+ AS3 native function insertChildBefore(child1:*, child2:*):*;
+ AS3 native function localName():Object;
+ AS3 native function name():Object;
+ private native function namespace_internal_impl(hasPrefix:Boolean, prefix:String = null):*;
+ AS3 function namespace (prefix:* = null):*
+ {
+ return namespace_internal_impl(arguments.length > 0, prefix);
+ }
+ AS3 native function namespaceDeclarations():Array;
+ AS3 native function nodeKind():String;
+ AS3 native function prependChild(child:*):XML;
+ AS3 native function removeNamespace(ns:*):XML;
+ AS3 native function replace(propertyName:*, value:*):XML;
+ AS3 native function setChildren(value:*):XML;
+ AS3 native function setLocalName(name:*):void;
+ AS3 native function setName(name:*):void;
+ AS3 native function setNamespace(ns:*):void;
+
+ AS3 function toJSON(k:String):*
+ {
+ return this.toJSON(k);
+ }
+
+ AS3 function valueOf():XMLList
+ {
+ return this;
+ }
+
+ prototype.hasComplexContent = function():Boolean
+ {
+ var self:XMLList = this;
+ return self.AS3::hasComplexContent();
+ };
+
+ prototype.hasSimpleContent = function():Boolean
+ {
+ var self:XMLList = this;
+ // NOTE - `self.hasSimpleContent()` should be sufficient here (and in all of the other methods)
+ // However, asc.jar doesn't resolve the 'AS3' namespace when I do
+ // 'self.hasSimpleContent()' here, which leads to the prototype method invoking
+ // itself, instead of the AS3 method.
+ return self.AS3::hasSimpleContent();
+ };
+
+ prototype.length = function():int
+ {
+ var self:XMLList = this;
+ return self.AS3::length();
+ };
+
+ prototype.child = function(name:Object):XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::child(name);
+ };
+
+ prototype.children = function():XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::children();
+ };
+
+ prototype.contains = function(value:*):Boolean
+ {
+ var self:XMLList = this;
+ return self.AS3::contains(value);
+ };
+
+ prototype.copy = function():XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::copy();
+ };
+
+ prototype.attribute = function(name:*):XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::attribute(name);
+ };
+
+ prototype.attributes = function():XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::attributes();
+ };
+
+ prototype.toString = function():String
+ {
+ var self:XMLList = this;
+ return self.AS3::toString();
+ };
+
+ prototype.toXMLString = function():String
+ {
+ var self:XMLList = this;
+ return self.AS3::toXMLString();
+ };
+
+ prototype.addNamespace = function(ns:*):XML
+ {
+ var self:XMLList = this;
+ return self.AS3::addNamespace(ns);
+ };
+
+ prototype.appendChild = function(child:*):XML
+ {
+ var self:XMLList = this;
+ return self.AS3::appendChild(child);
+ };
+
+ prototype.childIndex = function():int
+ {
+ var self:XMLList = this;
+ return self.AS3::childIndex();
+ };
+
+ prototype.inScopeNamespaces = function():Array
+ {
+ var self:XMLList = this;
+ return self.AS3::inScopeNamespaces();
+ };
+
+ prototype.insertChildAfter = function(child1:*, child2:*):*
+ {
+ var self:XMLList = this;
+ return self.AS3::insertChildAfter(child1, child2);
+ };
+
+ prototype.insertChildBefore = function(child1:*, child2:*):*
+ {
+ var self:XMLList = this;
+ return self.AS3::insertChildBefore(child1, child2);
+ };
+
+ prototype.localName = function():Object
+ {
+ var self:XMLList = this;
+ return self.AS3::localName();
+ };
+
+ prototype.name = function():Object
+ {
+ var self:XMLList = this;
+ return self.AS3::name();
+ };
+
+ prototype.namespace = function(prefix:* = null):*
+ {
+ var self:XMLList = this;
+ return self.AS3::namespace .apply(self, arguments);
+ };
+
+ prototype.namespaceDeclarations = function():Array
+ {
+ var self:XMLList = this;
+ return self.AS3::namespaceDeclarations();
+ };
+
+ prototype.nodeKind = function():String
+ {
+ var self:XMLList = this;
+ return self.AS3::nodeKind();
+ };
+
+ prototype.prependChild = function(child:*):XML
+ {
+ var self:XMLList = this;
+ return self.AS3::prependChild(child);
+ };
+
+ prototype.removeNamespace = function(ns:*):XML
+ {
+ var self:XMLList = this;
+ return self.AS3::removeNamespace(ns);
+ };
+
+ prototype.replace = function(propertyName:*, value:*):XML
+ {
+ var self:XMLList = this;
+ return self.AS3::replace(propertyName, value);
+ };
+
+ prototype.setChildren = function(value:*):XML
+ {
+ var self:XMLList = this;
+ return self.AS3::setChildren(value);
+ };
+
+ prototype.setLocalName = function(name:*):void
+ {
+ var self:XMLList = this;
+ self.AS3::setLocalName(name);
+ };
+
+ prototype.setName = function(name:*):void
+ {
+ var self:XMLList = this;
+ self.AS3::setName(name);
+ };
+
+ prototype.setNamespace = function(ns:*):void
+ {
+ var self:XMLList = this;
+ self.AS3::setNamespace(ns);
+ };
+
+ prototype.descendants = function(name:* = "*"):XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::descendants(name);
+ };
+
+ prototype.text = function():XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::text();
+ };
+
+ prototype.comments = function():XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::comments();
+ };
+
+ prototype.parent = function():*
+ {
+ var self:XMLList = this;
+ return self.AS3::parent();
+ };
+
+ prototype.toJSON = function(k:String):*
+ {
+ return "XMLList";
+ };
+
+ prototype.processingInstructions = function(name:* = "*"):XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::processingInstructions(name);
+ };
+
+ prototype.elements = function(name:* = "*"):XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::elements(name);
+ };
+
+ prototype.normalize = function():XMLList
+ {
+ var self:XMLList = this;
+ return self.AS3::normalize();
+ };
+
+ public static const length:* = 1;
+ }
}
diff --git a/core/src/avm2/globals/__ruffle__/stubs.as b/core/src/avm2/globals/__ruffle__/stubs.as
index 2b9d078baf95..32be09e684c7 100644
--- a/core/src/avm2/globals/__ruffle__/stubs.as
+++ b/core/src/avm2/globals/__ruffle__/stubs.as
@@ -1,12 +1,12 @@
-package __ruffle__ {
- public native function stub_method(... rest):void;
+package __ruffle__
+{
+ public native function stub_method(...rest):void;
- public native function stub_getter(... rest):void;
+ public native function stub_getter(...rest):void;
- public native function stub_setter(... rest):void;
+ public native function stub_setter(...rest):void;
- public native function stub_constructor(... rest):void;
+ public native function stub_constructor(...rest):void;
-
- public native function log_warn(... rest):void;
+ public native function log_warn(...rest):void;
}
diff --git a/core/src/avm2/globals/avmplus.as b/core/src/avm2/globals/avmplus.as
index fae09c55a9af..a2c32baf4e33 100644
--- a/core/src/avm2/globals/avmplus.as
+++ b/core/src/avm2/globals/avmplus.as
@@ -1,135 +1,154 @@
-package avmplus {
- namespace AS3 = "http://adobe.com/AS3/2006/builtin";
+package avmplus
+{
+ namespace AS3 = "http://adobe.com/AS3/2006/builtin";
- public native function getQualifiedClassName(value:*):String;
- internal native function describeTypeJSON(o:*, flags:uint):Object;
+ public native function getQualifiedClassName(value:*):String;
+ internal native function describeTypeJSON(o:*, flags:uint):Object;
- public const HIDE_NSURI_METHODS:uint = 0x0001;
- public const INCLUDE_BASES:uint = 0x0002;
- public const INCLUDE_INTERFACES:uint = 0x0004;
- public const INCLUDE_VARIABLES:uint = 0x0008;
- public const INCLUDE_ACCESSORS:uint = 0x0010;
- public const INCLUDE_METHODS:uint = 0x0020;
- public const INCLUDE_METADATA:uint = 0x0040;
- public const INCLUDE_CONSTRUCTOR:uint = 0x0080;
- public const INCLUDE_TRAITS:uint = 0x0100;
- public const USE_ITRAITS:uint = 0x0200;
- public const HIDE_OBJECT:uint = 0x0400;
+ public const HIDE_NSURI_METHODS:uint = 0x0001;
+ public const INCLUDE_BASES:uint = 0x0002;
+ public const INCLUDE_INTERFACES:uint = 0x0004;
+ public const INCLUDE_VARIABLES:uint = 0x0008;
+ public const INCLUDE_ACCESSORS:uint = 0x0010;
+ public const INCLUDE_METHODS:uint = 0x0020;
+ public const INCLUDE_METADATA:uint = 0x0040;
+ public const INCLUDE_CONSTRUCTOR:uint = 0x0080;
+ public const INCLUDE_TRAITS:uint = 0x0100;
+ public const USE_ITRAITS:uint = 0x0200;
+ public const HIDE_OBJECT:uint = 0x0400;
- public const FLASH10_FLAGS:uint = INCLUDE_BASES |
- INCLUDE_INTERFACES |
- INCLUDE_VARIABLES |
- INCLUDE_ACCESSORS |
- INCLUDE_METHODS |
- INCLUDE_METADATA |
- INCLUDE_CONSTRUCTOR |
- INCLUDE_TRAITS |
- HIDE_NSURI_METHODS |
- HIDE_OBJECT;
+ public const FLASH10_FLAGS:uint = INCLUDE_BASES |
+ INCLUDE_INTERFACES |
+ INCLUDE_VARIABLES |
+ INCLUDE_ACCESSORS |
+ INCLUDE_METHODS |
+ INCLUDE_METADATA |
+ INCLUDE_CONSTRUCTOR |
+ INCLUDE_TRAITS |
+ HIDE_NSURI_METHODS |
+ HIDE_OBJECT;
- internal function copyParams(params: Object, xml: XML) {
- for (var i in params) {
- var param = params[i];
- var elem = ;
- elem.@index = i + 1;
- elem.@type = param.type;
- elem.@optional = param.optional;
- xml.appendChild(elem);
- }
- }
+ internal function copyParams(params:Object, xml:XML)
+ {
+ for (var i in params)
+ {
+ var param = params[i];
+ var elem = ;
+ elem.@index = i + 1;
+ elem.@type = param.type;
+ elem.@optional = param.optional;
+ xml.appendChild(elem);
+ }
+ }
- internal function copyMetadata(metadata: Array, xml: XML) {
- for each (var md in metadata) {
- var data = ;
- data.@name = md.name;
- for each (var metaValue in md.value) {
- var elem = ;
- elem.@key = metaValue.key;
- elem.@value = metaValue.value;
- data.appendChild(elem);
- }
- xml.appendChild(data);
- }
- }
+ internal function copyMetadata(metadata:Array, xml:XML)
+ {
+ for each (var md in metadata)
+ {
+ var data = ;
+ data.@name = md.name;
+ for each (var metaValue in md.value)
+ {
+ var elem = ;
+ elem.@key = metaValue.key;
+ elem.@value = metaValue.value;
+ data.appendChild(elem);
+ }
+ xml.appendChild(data);
+ }
+ }
- internal function copyUriAndMetadata(data: Object, xml: XML) {
- if (data.uri) {
- xml.@uri = data.uri;
- }
- if (data.metadata) {
- copyMetadata(data.metadata, xml)
- }
- }
+ internal function copyUriAndMetadata(data:Object, xml:XML)
+ {
+ if (data.uri)
+ {
+ xml.@uri = data.uri;
+ }
+ if (data.metadata)
+ {
+ copyMetadata(data.metadata, xml);
+ }
+ }
- internal function copyTraits(traits: Object, xml: XML) {
- for each (var base in traits.bases) {
- var elem = ;
- elem.@type = base;
- xml.AS3::appendChild(elem);
- }
- for each (var iface in traits.interfaces) {
- var elem = ;
- elem.@type = iface;
- xml.AS3::appendChild(elem);
- }
- if (traits.constructor) {
- var constructor = ;
- copyParams(traits.constructor, constructor);
- xml.AS3::appendChild(constructor)
- }
+ internal function copyTraits(traits:Object, xml:XML)
+ {
+ for each (var base in traits.bases)
+ {
+ var elem = ;
+ elem.@type = base;
+ xml.AS3::appendChild(elem);
+ }
+ for each (var iface in traits.interfaces)
+ {
+ var elem = ;
+ elem.@type = iface;
+ xml.AS3::appendChild(elem);
+ }
+ if (traits.constructor)
+ {
+ var constructor = ;
+ copyParams(traits.constructor, constructor);
+ xml.AS3::appendChild(constructor);
+ }
- for each (var variable in traits.variables) {
- var variableXML = (variable.access == "readonly") ? : ;
- variableXML.@name = variable.name;
- variableXML.@type = variable.type;
- copyUriAndMetadata(variable, variableXML);
- xml.AS3::appendChild(variableXML);
- }
+ for each (var variable in traits.variables)
+ {
+ var variableXML = (variable.access == "readonly") ? : ;
+ variableXML.@name = variable.name;
+ variableXML.@type = variable.type;
+ copyUriAndMetadata(variable, variableXML);
+ xml.AS3::appendChild(variableXML);
+ }
- for each (var accessor in traits.accessors) {
- var accessorXML = ;
- accessorXML.@name = accessor.name;
- accessorXML.@access = accessor.access;
- accessorXML.@type = accessor.type;
- accessorXML.@declaredBy = accessor.declaredBy;
- copyUriAndMetadata(accessor, accessorXML);
- xml.AS3::appendChild(accessorXML);
- }
+ for each (var accessor in traits.accessors)
+ {
+ var accessorXML = ;
+ accessorXML.@name = accessor.name;
+ accessorXML.@access = accessor.access;
+ accessorXML.@type = accessor.type;
+ accessorXML.@declaredBy = accessor.declaredBy;
+ copyUriAndMetadata(accessor, accessorXML);
+ xml.AS3::appendChild(accessorXML);
+ }
- for each (var method in traits.methods) {
- var methodXML = ;
- methodXML.@name = method.name;
- methodXML.@declaredBy = method.declaredBy;
- methodXML.@returnType = method.returnType;
+ for each (var method in traits.methods)
+ {
+ var methodXML = ;
+ methodXML.@name = method.name;
+ methodXML.@declaredBy = method.declaredBy;
+ methodXML.@returnType = method.returnType;
- copyParams(method.parameters, methodXML);
- copyUriAndMetadata(method, methodXML);
- xml.AS3::appendChild(methodXML);
- }
+ copyParams(method.parameters, methodXML);
+ copyUriAndMetadata(method, methodXML);
+ xml.AS3::appendChild(methodXML);
+ }
- copyMetadata(traits.metadata, xml);
- }
+ copyMetadata(traits.metadata, xml);
+ }
- public function describeType(value: *, flags: uint):XML {
- var json = describeTypeJSON(value, flags);
- var xml = ;
- xml.@name = json.name;
- if (json.traits.bases.length != 0) {
- xml.@base = json.traits.bases[0];
- }
- xml.@isDynamic = json.isDynamic;
- xml.@isFinal = json.isFinal;
- xml.@isStatic = json.isStatic;
- copyTraits(json.traits, xml);
+ public function describeType(value:*, flags:uint):XML
+ {
+ var json = describeTypeJSON(value, flags);
+ var xml = ;
+ xml.@name = json.name;
+ if (json.traits.bases.length != 0)
+ {
+ xml.@base = json.traits.bases[0];
+ }
+ xml.@isDynamic = json.isDynamic;
+ xml.@isFinal = json.isFinal;
+ xml.@isStatic = json.isStatic;
+ copyTraits(json.traits, xml);
- var jsonITraits = describeTypeJSON(value, flags | USE_ITRAITS);
- if (jsonITraits) {
- var factory = ;
- factory.@type = jsonITraits.name;
- copyTraits(jsonITraits.traits, factory);
- xml.appendChild(factory);
- }
+ var jsonITraits = describeTypeJSON(value, flags | USE_ITRAITS);
+ if (jsonITraits)
+ {
+ var factory = ;
+ factory.@type = jsonITraits.name;
+ copyTraits(jsonITraits.traits, factory);
+ xml.appendChild(factory);
+ }
- return xml;
- }
+ return xml;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/accessibility/Accessibility.as b/core/src/avm2/globals/flash/accessibility/Accessibility.as
index 6613d0c8ff15..62687cbb4e41 100644
--- a/core/src/avm2/globals/flash/accessibility/Accessibility.as
+++ b/core/src/avm2/globals/flash/accessibility/Accessibility.as
@@ -5,30 +5,30 @@
package flash.accessibility
{
- import __ruffle__.stub_method;
- import flash.display.DisplayObject;
+ import __ruffle__.stub_method;
+ import flash.display.DisplayObject;
- public final class Accessibility
- {
- // Indicates whether a screen reader is active and the application is communicating with it.
- private static var _active: Boolean;
+ public final class Accessibility
+ {
+ // Indicates whether a screen reader is active and the application is communicating with it.
+ private static var _active:Boolean;
- // Sends an event to the Microsoft Active Accessibility API.
- public static function sendEvent(source:DisplayObject, childID:uint, eventType:uint, nonHTML:Boolean = false):void
- {
- stub_method("flash.accessibility.Accessibility", "sendEvent");
- }
+ // Sends an event to the Microsoft Active Accessibility API.
+ public static function sendEvent(source:DisplayObject, childID:uint, eventType:uint, nonHTML:Boolean = false):void
+ {
+ stub_method("flash.accessibility.Accessibility", "sendEvent");
+ }
- // Tells Flash Player to apply any accessibility changes made by using the DisplayObject.accessibilityProperties property.
- public static function updateProperties():void
- {
- stub_method("flash.accessibility.Accessibility", "updateProperties");
- }
+ // Tells Flash Player to apply any accessibility changes made by using the DisplayObject.accessibilityProperties property.
+ public static function updateProperties():void
+ {
+ stub_method("flash.accessibility.Accessibility", "updateProperties");
+ }
- public static function get active() : Boolean
- {
- return _active;
- }
+ public static function get active():Boolean
+ {
+ return _active;
+ }
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as b/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as
index 7627683a78e8..4c25c6c6aa3a 100644
--- a/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as
+++ b/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as
@@ -1,65 +1,84 @@
-package flash.accessibility {
- import flash.geom.Rectangle;
-
- public class AccessibilityImplementation {
- public var errno: uint;
- public var stub: Boolean;
-
- public function AccessibilityImplementation() {
- this.errno = 0;
- this.stub = false;
- }
-
- public function accDoDefaultAction(childID:uint):void { }
-
- public function accLocation(childID:uint):* {
- return null;
- }
-
- public function accSelect(operation:uint, childID:uint):void { }
-
- public function get_accDefaultAction(childID:uint):String {
- return null;
- }
-
- public function get_accFocus():uint {
- return 0;
- }
-
- public function get_accName(childID:uint):String {
- return null;
- }
-
- public function get_accRole(childID:uint):uint {
- throw new Error("Error #2143: AccessibilityImplementation.get_accRole() must be overridden from its default.", 2143);
- }
-
- public function get_accSelection():Array {
- return null;
- }
-
- public function get_accState(childID:uint):uint {
- throw new Error("Error #2144: AccessibilityImplementation.get_accState() must be overridden from its default.", 2144);
- }
-
- public function get_accValue(childID:uint):String {
- return null;
- }
-
- public function get_selectionActiveIndex():* {
- return this["selectionActiveIndex"];
- }
-
- public function get_selectionAnchorIndex():* {
- return this["selectionAnchorIndex"];
- }
-
- public function getChildIDArray():Array {
- return null;
- }
-
- public function isLabeledBy(labelBounds:Rectangle):Boolean {
- return false;
- }
- }
+package flash.accessibility
+{
+ import flash.geom.Rectangle;
+
+ public class AccessibilityImplementation
+ {
+ public var errno:uint;
+ public var stub:Boolean;
+
+ public function AccessibilityImplementation()
+ {
+ this.errno = 0;
+ this.stub = false;
+ }
+
+ public function accDoDefaultAction(childID:uint):void
+ {
+ }
+
+ public function accLocation(childID:uint):*
+ {
+ return null;
+ }
+
+ public function accSelect(operation:uint, childID:uint):void
+ {
+ }
+
+ public function get_accDefaultAction(childID:uint):String
+ {
+ return null;
+ }
+
+ public function get_accFocus():uint
+ {
+ return 0;
+ }
+
+ public function get_accName(childID:uint):String
+ {
+ return null;
+ }
+
+ public function get_accRole(childID:uint):uint
+ {
+ throw new Error("Error #2143: AccessibilityImplementation.get_accRole() must be overridden from its default.", 2143);
+ }
+
+ public function get_accSelection():Array
+ {
+ return null;
+ }
+
+ public function get_accState(childID:uint):uint
+ {
+ throw new Error("Error #2144: AccessibilityImplementation.get_accState() must be overridden from its default.", 2144);
+ }
+
+ public function get_accValue(childID:uint):String
+ {
+ return null;
+ }
+
+ public function get_selectionActiveIndex():*
+ {
+ return this["selectionActiveIndex"];
+ }
+
+ public function get_selectionAnchorIndex():*
+ {
+ return this["selectionAnchorIndex"];
+ }
+
+ public function getChildIDArray():Array
+ {
+ return null;
+ }
+
+ public function isLabeledBy(labelBounds:Rectangle):Boolean
+ {
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as b/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as
index ddfdedb1f6a9..e96f7758ad9d 100644
--- a/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as
+++ b/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as
@@ -1,19 +1,22 @@
-package flash.accessibility {
- public class AccessibilityProperties {
- public var name: String;
- public var description: String;
- public var shortcut: String;
- public var silent: Boolean;
- public var forceSimple: Boolean;
- public var noAutoLabeling: Boolean;
+package flash.accessibility
+{
+ public class AccessibilityProperties
+ {
+ public var name:String;
+ public var description:String;
+ public var shortcut:String;
+ public var silent:Boolean;
+ public var forceSimple:Boolean;
+ public var noAutoLabeling:Boolean;
- public function AccessibilityProperties() {
- this.name = "";
- this.description = "";
- this.shortcut = "";
- this.silent = false;
- this.forceSimple = false;
- this.noAutoLabeling = false;
- }
- }
+ public function AccessibilityProperties()
+ {
+ this.name = "";
+ this.description = "";
+ this.shortcut = "";
+ this.silent = false;
+ this.forceSimple = false;
+ this.noAutoLabeling = false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/accessibility/ISearchableText.as b/core/src/avm2/globals/flash/accessibility/ISearchableText.as
index b21ac532bd31..1d6e528f976c 100644
--- a/core/src/avm2/globals/flash/accessibility/ISearchableText.as
+++ b/core/src/avm2/globals/flash/accessibility/ISearchableText.as
@@ -1,5 +1,7 @@
-package flash.accessibility {
- public interface ISearchableText {
- function get searchText():String;
- }
+package flash.accessibility
+{
+ public interface ISearchableText
+ {
+ function get searchText():String;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/accessibility/ISimpleTextSelection.as b/core/src/avm2/globals/flash/accessibility/ISimpleTextSelection.as
index 71157203f223..c9ead438f9fe 100644
--- a/core/src/avm2/globals/flash/accessibility/ISimpleTextSelection.as
+++ b/core/src/avm2/globals/flash/accessibility/ISimpleTextSelection.as
@@ -1,6 +1,8 @@
-package flash.accessibility {
- public interface ISimpleTextSelection {
- function get selectionActiveIndex():int;
- function get selectionAnchorIndex():int;
- }
+package flash.accessibility
+{
+ public interface ISimpleTextSelection
+ {
+ function get selectionActiveIndex():int;
+ function get selectionAnchorIndex():int;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/concurrent/Condition.as b/core/src/avm2/globals/flash/concurrent/Condition.as
index f3ffd59fddaf..31af56d20398 100644
--- a/core/src/avm2/globals/flash/concurrent/Condition.as
+++ b/core/src/avm2/globals/flash/concurrent/Condition.as
@@ -1,8 +1,12 @@
-package flash.concurrent {
- [API("684")]
- public final class Condition {
- public static const isSupported: Boolean = false;
+package flash.concurrent
+{
+ [API("684")]
+ public final class Condition
+ {
+ public static const isSupported:Boolean = false;
- public function Condition(mutex: Mutex) {}
- }
+ public function Condition(mutex:Mutex)
+ {
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/concurrent/Mutex.as b/core/src/avm2/globals/flash/concurrent/Mutex.as
index 746c46474a1b..8f565db8df7a 100644
--- a/core/src/avm2/globals/flash/concurrent/Mutex.as
+++ b/core/src/avm2/globals/flash/concurrent/Mutex.as
@@ -1,10 +1,13 @@
-package flash.concurrent {
- [API("684")]
- public final class Mutex {
- public static const isSupported: Boolean = false;
-
- public function Mutex() {
- throw new Error("Error #1520: Mutex cannot be initialized.", 1520);
- }
- }
+package flash.concurrent
+{
+ [API("684")]
+ public final class Mutex
+ {
+ public static const isSupported:Boolean = false;
+
+ public function Mutex()
+ {
+ throw new Error("Error #1520: Mutex cannot be initialized.", 1520);
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/crypto.as b/core/src/avm2/globals/flash/crypto.as
index b2465a3521b2..4b95d4d64640 100644
--- a/core/src/avm2/globals/flash/crypto.as
+++ b/core/src/avm2/globals/flash/crypto.as
@@ -1,5 +1,6 @@
-package flash.crypto {
- import flash.utils.ByteArray;
+package flash.crypto
+{
+ import flash.utils.ByteArray;
- public native function generateRandomBytes(numberRandomBytes:uint):ByteArray;
+ public native function generateRandomBytes(numberRandomBytes:uint):ByteArray;
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/desktop/Clipboard.as b/core/src/avm2/globals/flash/desktop/Clipboard.as
index 43a2fa100b69..e3a50890a865 100644
--- a/core/src/avm2/globals/flash/desktop/Clipboard.as
+++ b/core/src/avm2/globals/flash/desktop/Clipboard.as
@@ -1,54 +1,66 @@
-package flash.desktop {
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
- import flash.system.System;
-
- public class Clipboard {
- private static var _generalClipboard = new Clipboard();
-
- public static function get generalClipboard(): Clipboard {
- return Clipboard._generalClipboard;
- }
-
- function Clipboard() {
- // TODO: This should only be callable in AIR
- }
-
- public function get formats(): Array {
- stub_getter("flash.desktop.Clipboard", "formats");
- return new Array();
- }
-
- public function clear(): void {
- stub_method("flash.desktop.Clipboard", "clear");
- }
-
- public function clearData(format: String): void {
- stub_method("flash.desktop.Clipboard", "clearData");
- }
-
- public function getData(format: String, transferMode: String = ClipboardTransferMode.ORIGINAL_PREFERRED): Object {
- stub_method("flash.desktop.Clipboard", "getData");
- return null;
- }
-
- public function hasFormat(format: String): Boolean {
- stub_method("flash.desktop.Clipboard", "hasFormat");
- return false;
- }
-
- public function setData(format: String, data: Object, serializable: Boolean = true): Boolean {
- stub_method("flash.desktop.Clipboard", "setData");
- if (format == ClipboardFormats.TEXT_FORMAT) {
- System.setClipboard(data);
- return true;
- }
- return false;
- }
-
- public function setDataHandler(format: String, handler: Function, serializable: Boolean = true): Boolean {
- stub_method("flash.desktop.Clipboard", "setDataHandler");
- return false;
- }
- }
+package flash.desktop
+{
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
+ import flash.system.System;
+
+ public class Clipboard
+ {
+ private static var _generalClipboard = new Clipboard();
+
+ public static function get generalClipboard():Clipboard
+ {
+ return Clipboard._generalClipboard;
+ }
+
+ function Clipboard()
+ {
+ // TODO: This should only be callable in AIR
+ }
+
+ public function get formats():Array
+ {
+ stub_getter("flash.desktop.Clipboard", "formats");
+ return new Array();
+ }
+
+ public function clear():void
+ {
+ stub_method("flash.desktop.Clipboard", "clear");
+ }
+
+ public function clearData(format:String):void
+ {
+ stub_method("flash.desktop.Clipboard", "clearData");
+ }
+
+ public function getData(format:String, transferMode:String = ClipboardTransferMode.ORIGINAL_PREFERRED):Object
+ {
+ stub_method("flash.desktop.Clipboard", "getData");
+ return null;
+ }
+
+ public function hasFormat(format:String):Boolean
+ {
+ stub_method("flash.desktop.Clipboard", "hasFormat");
+ return false;
+ }
+
+ public function setData(format:String, data:Object, serializable:Boolean = true):Boolean
+ {
+ stub_method("flash.desktop.Clipboard", "setData");
+ if (format == ClipboardFormats.TEXT_FORMAT)
+ {
+ System.setClipboard(data);
+ return true;
+ }
+ return false;
+ }
+
+ public function setDataHandler(format:String, handler:Function, serializable:Boolean = true):Boolean
+ {
+ stub_method("flash.desktop.Clipboard", "setDataHandler");
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/desktop/ClipboardFormats.as b/core/src/avm2/globals/flash/desktop/ClipboardFormats.as
index f927940186db..cf6086a0c7dd 100644
--- a/core/src/avm2/globals/flash/desktop/ClipboardFormats.as
+++ b/core/src/avm2/globals/flash/desktop/ClipboardFormats.as
@@ -6,31 +6,31 @@
package flash.desktop
{
- // The AS3 docs specify various API versions for the different members,
- // as also indicated by their comments. The docs, however, are lying.
- [API("662")]
- public class ClipboardFormats
- {
- // Image data (AIR only).
- public static const BITMAP_FORMAT:String = "air:bitmap";
+ // The AS3 docs specify various API versions for the different members,
+ // as also indicated by their comments. The docs, however, are lying.
+ [API("662")]
+ public class ClipboardFormats
+ {
+ // Image data (AIR only).
+ public static const BITMAP_FORMAT:String = "air:bitmap";
- // An array of files (AIR only).
- public static const FILE_LIST_FORMAT:String = "air:file list";
+ // An array of files (AIR only).
+ public static const FILE_LIST_FORMAT:String = "air:file list";
- // File promise list (AIR only).
- public static const FILE_PROMISE_LIST_FORMAT:String = "air:file promise list";
+ // File promise list (AIR only).
+ public static const FILE_PROMISE_LIST_FORMAT:String = "air:file promise list";
- // HTML data.
- public static const HTML_FORMAT:String = "air:html";
+ // HTML data.
+ public static const HTML_FORMAT:String = "air:html";
- // Rich Text Format data.
- public static const RICH_TEXT_FORMAT:String = "air:rtf";
+ // Rich Text Format data.
+ public static const RICH_TEXT_FORMAT:String = "air:rtf";
- // String data.
- public static const TEXT_FORMAT:String = "air:text";
+ // String data.
+ public static const TEXT_FORMAT:String = "air:text";
- // A URL string (AIR only).
- public static const URL_FORMAT:String = "air:url";
+ // A URL string (AIR only).
+ public static const URL_FORMAT:String = "air:url";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as b/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as
index c084251d4da3..210a8676cc41 100644
--- a/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as
+++ b/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as
@@ -6,19 +6,19 @@
package flash.desktop
{
- public class ClipboardTransferMode
- {
- // The Clipboard object should only return a copy.
- public static const CLONE_ONLY:String = "cloneOnly";
+ public class ClipboardTransferMode
+ {
+ // The Clipboard object should only return a copy.
+ public static const CLONE_ONLY:String = "cloneOnly";
- // The Clipboard object should return a copy if available and a reference if not.
- public static const CLONE_PREFERRED:String = "clonePreferred";
+ // The Clipboard object should return a copy if available and a reference if not.
+ public static const CLONE_PREFERRED:String = "clonePreferred";
- // The Clipboard object should only return a reference.
- public static const ORIGINAL_ONLY:String = "originalOnly";
+ // The Clipboard object should only return a reference.
+ public static const ORIGINAL_ONLY:String = "originalOnly";
- // The Clipboard object should return a reference if available and a copy if not.
- public static const ORIGINAL_PREFERRED:String = "originalPreferred";
+ // The Clipboard object should return a reference if available and a copy if not.
+ public static const ORIGINAL_PREFERRED:String = "originalPreferred";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/desktop/IFilePromise.as b/core/src/avm2/globals/flash/desktop/IFilePromise.as
index 3350705fbec8..e2cc2ecb74dc 100644
--- a/core/src/avm2/globals/flash/desktop/IFilePromise.as
+++ b/core/src/avm2/globals/flash/desktop/IFilePromise.as
@@ -1,14 +1,17 @@
-package flash.desktop {
- import flash.utils.IDataInput;
- import flash.events.ErrorEvent;
+package flash.desktop
+{
+ import flash.utils.IDataInput;
+ import flash.events.ErrorEvent;
- [API("668")] // AIR 2.0
- public interface IFilePromise {
- function get isAsync():Boolean;
- function get relativePath():String;
- function close():void;
- function open():IDataInput;
- function reportError(e:ErrorEvent):void
+ [API("668")]
+ // AIR 2.0
+ public interface IFilePromise
+ {
+ function get isAsync():Boolean;
+ function get relativePath():String;
+ function close():void;
+ function open():IDataInput;
+ function reportError(e:ErrorEvent):void;
- }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/desktop/Icon.as b/core/src/avm2/globals/flash/desktop/Icon.as
index de7fea84e4af..6ad700dda416 100644
--- a/core/src/avm2/globals/flash/desktop/Icon.as
+++ b/core/src/avm2/globals/flash/desktop/Icon.as
@@ -5,14 +5,16 @@
package flash.desktop
{
- import flash.events.EventDispatcher;
- [API("661")]
- public class Icon extends EventDispatcher
- {
+ import flash.events.EventDispatcher;
+ [API("661")]
+ public class Icon extends EventDispatcher
+ {
- // The icon image as an array of BitmapData objects of different sizes.
- public var bitmaps:Array;
+ // The icon image as an array of BitmapData objects of different sizes.
+ public var bitmaps:Array;
- function Icon() {}
- }
+ function Icon()
+ {
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/desktop/InteractiveIcon.as b/core/src/avm2/globals/flash/desktop/InteractiveIcon.as
index 5deb5cc3df82..41427e725546 100644
--- a/core/src/avm2/globals/flash/desktop/InteractiveIcon.as
+++ b/core/src/avm2/globals/flash/desktop/InteractiveIcon.as
@@ -5,21 +5,21 @@
package flash.desktop
{
- import __ruffle__.stub_getter;
+ import __ruffle__.stub_getter;
- [API("661")]
- public class InteractiveIcon extends Icon
- {
- public function get height():int
- {
- stub_getter("flash.desktop.InteractiveIcon", "height");
- return 64;
- }
+ [API("661")]
+ public class InteractiveIcon extends Icon
+ {
+ public function get height():int
+ {
+ stub_getter("flash.desktop.InteractiveIcon", "height");
+ return 64;
+ }
- public function get width():int
- {
- stub_getter("flash.desktop.InteractiveIcon", "width");
- return 64;
- }
- }
+ public function get width():int
+ {
+ stub_getter("flash.desktop.InteractiveIcon", "width");
+ return 64;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/desktop/NativeApplication.as b/core/src/avm2/globals/flash/desktop/NativeApplication.as
index 051c73108cd0..d69b15cf4cde 100644
--- a/core/src/avm2/globals/flash/desktop/NativeApplication.as
+++ b/core/src/avm2/globals/flash/desktop/NativeApplication.as
@@ -1,265 +1,265 @@
package flash.desktop
{
- import flash.display.NativeWindow;
- import flash.events.InvokeEvent;
- import flash.events.Event;
- import flash.events.TimerEvent;
- import flash.events.EventDispatcher;
- import flash.system.Security;
- import flash.utils.Timer;
- import flash.utils.setTimeout;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
-
- [API("661")]
- public final class NativeApplication extends EventDispatcher
- {
- private static var _instance:NativeApplication;
-
- private var _openedWindows:Array = [];
-
- private var _idleThreshold:int = 300;
-
- public function NativeApplication()
- {
- super();
- // TODO
- setTimeout(function():void
- {
- dispatchEvent(new InvokeEvent(InvokeEvent.INVOKE, false, false, null, []));
- }, 500);
- }
-
- public static function get nativeApplication():NativeApplication
- {
- if (!_instance)
- _instance = new NativeApplication();
- return _instance;
- }
-
- public static function get supportsMenu():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "supportsMenu");
- return false;
- }
-
- public static function get supportsDockIcon():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "supportsDockIcon");
- return false;
- }
-
- public static function get supportsSystemTrayIcon():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "supportsSystemTrayIcon");
- return false;
- }
-
- [API("668")]
- public static function get supportsDefaultApplication():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "supportsDefaultApplication");
- return false;
- }
-
- [API("668")]
- public static function get supportsStartAtLogin():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "supportsStartAtLogin");
- return false;
- }
-
- public function exit(exitCode:int = 0):void
- {
- stub_method("flash.desktop.NativeApplication", "exit");
- }
-
- public function get runtimeVersion():String
- {
- stub_getter("flash.desktop.NativeApplication", "runtimeVersion");
- return "5.0.0";
- }
-
- public function get runtimePatchLevel():uint
- {
- stub_getter("flash.desktop.NativeApplication", "runtimePatchLevel");
- return 0;
- }
-
- public function get applicationID():String
- {
- stub_getter("flash.desktop.NativeApplication", "applicationID");
- return "";
- }
-
- public function get publisherID():String
- {
- stub_getter("flash.desktop.NativeApplication", "publisherID");
- return "";
- }
-
- public function get applicationDescriptor():XML
- {
- stub_getter("flash.desktop.NativeApplication", "applicationDescriptor");
- return null;
- }
-
- public function get autoExit():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "autoExit");
- return false;
- }
-
- public function set autoExit(param1:Boolean):void
- {
- stub_setter("flash.desktop.NativeApplication", "autoExit");
- }
-
- public function get icon():InteractiveIcon
- {
- stub_getter("flash.desktop.NativeApplication", "icon");
- return null;
- }
-
- [API("668")]
- public function get systemIdleMode():String
- {
- stub_getter("flash.desktop.NativeApplication", "systemIdleMode");
- return "normal";
- }
-
- [API("668")]
- public function set systemIdleMode(param1:String):void
- {
- stub_setter("flash.desktop.NativeApplication", "systemIdleMode");
- }
-
- public function get startAtLogin():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "startAtLogin");
- return false;
- }
-
- public function set startAtLogin(param1:Boolean):void
- {
- stub_setter("flash.desktop.NativeApplication", "startAtLogin");
- }
-
- public function activate(window:NativeWindow = null):void
- {
- stub_method("flash.desktop.NativeApplication", "activate");
- }
-
- public function get activeWindow():NativeWindow
- {
- stub_getter("flash.desktop.NativeApplication", "activeWindow");
- return _openedWindows[0];
- }
-
- public function get openedWindows():Array
- {
- stub_getter("flash.desktop.NativeApplication", "openedWindows");
- return _openedWindows;
- }
-
- public function get timeSinceLastUserInput():int
- {
- stub_getter("flash.desktop.NativeApplication", "timeSinceLastUserInput");
- return 100;
- }
-
- public function get idleThreshold():int
- {
- stub_getter("flash.desktop.NativeApplication", "idleThreshold");
- return this._idleThreshold;
- }
-
- public function set idleThreshold(value:int):void
- {
- stub_setter("flash.desktop.NativeApplication", "idleThreshold");
- this._idleThreshold = value;
- }
-
- public function copy():Boolean
- {
- stub_method("flash.desktop.NativeApplication", "copy");
- return false;
- }
-
- public function cut():Boolean
- {
- stub_method("flash.desktop.NativeApplication", "cut");
- return false;
- }
-
- public function paste():Boolean
- {
- stub_method("flash.desktop.NativeApplication", "paste");
- return false;
- }
-
- public function clear():Boolean
- {
- stub_method("flash.desktop.NativeApplication", "clear");
- return false;
- }
-
- public function selectAll():Boolean
- {
- stub_method("flash.desktop.NativeApplication", "selectAll");
- return false;
- }
-
- public function getDefaultApplication(extension:String):String
- {
- stub_method("flash.desktop.NativeApplication", "getDefaultApplication");
- return null;
- }
-
- public function isSetAsDefaultApplication(extension:String):Boolean
- {
- stub_method("flash.desktop.NativeApplication", "isSetAsDefaultApplication");
- return true;
- }
-
- public function setAsDefaultApplication(extension:String):void
- {
- stub_method("flash.desktop.NativeApplication", "setAsDefaultApplication");
- }
-
- public function removeAsDefaultApplication(extension:String):void
- {
- stub_method("flash.desktop.NativeApplication", "removeAsDefaultApplication");
- }
-
- [API("681")]
- public function get executeInBackground():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "executeInBackground");
- return false;
- }
-
- [API("681")]
- public function set executeInBackground(param1:Boolean):void
- {
- stub_setter("flash.desktop.NativeApplication", "executeInBackground");
- }
-
- // [API("721")] Ruffle doesn't support this API Version
- [API("681")]
- public function get isCompiledAOT():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "isCompiledAOT");
- return false;
- }
-
- // [API("721")] Ruffle doesn't support this API Version
- [API("681")]
- public function get isActive():Boolean
- {
- stub_getter("flash.desktop.NativeApplication", "isActive");
- return true;
- }
- }
+ import flash.display.NativeWindow;
+ import flash.events.InvokeEvent;
+ import flash.events.Event;
+ import flash.events.TimerEvent;
+ import flash.events.EventDispatcher;
+ import flash.system.Security;
+ import flash.utils.Timer;
+ import flash.utils.setTimeout;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+
+ [API("661")]
+ public final class NativeApplication extends EventDispatcher
+ {
+ private static var _instance:NativeApplication;
+
+ private var _openedWindows:Array = [];
+
+ private var _idleThreshold:int = 300;
+
+ public function NativeApplication()
+ {
+ super();
+ // TODO
+ setTimeout(function():void
+ {
+ dispatchEvent(new InvokeEvent(InvokeEvent.INVOKE, false, false, null, []));
+ }, 500);
+ }
+
+ public static function get nativeApplication():NativeApplication
+ {
+ if (!_instance)
+ _instance = new NativeApplication();
+ return _instance;
+ }
+
+ public static function get supportsMenu():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "supportsMenu");
+ return false;
+ }
+
+ public static function get supportsDockIcon():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "supportsDockIcon");
+ return false;
+ }
+
+ public static function get supportsSystemTrayIcon():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "supportsSystemTrayIcon");
+ return false;
+ }
+
+ [API("668")]
+ public static function get supportsDefaultApplication():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "supportsDefaultApplication");
+ return false;
+ }
+
+ [API("668")]
+ public static function get supportsStartAtLogin():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "supportsStartAtLogin");
+ return false;
+ }
+
+ public function exit(exitCode:int = 0):void
+ {
+ stub_method("flash.desktop.NativeApplication", "exit");
+ }
+
+ public function get runtimeVersion():String
+ {
+ stub_getter("flash.desktop.NativeApplication", "runtimeVersion");
+ return "5.0.0";
+ }
+
+ public function get runtimePatchLevel():uint
+ {
+ stub_getter("flash.desktop.NativeApplication", "runtimePatchLevel");
+ return 0;
+ }
+
+ public function get applicationID():String
+ {
+ stub_getter("flash.desktop.NativeApplication", "applicationID");
+ return "";
+ }
+
+ public function get publisherID():String
+ {
+ stub_getter("flash.desktop.NativeApplication", "publisherID");
+ return "";
+ }
+
+ public function get applicationDescriptor():XML
+ {
+ stub_getter("flash.desktop.NativeApplication", "applicationDescriptor");
+ return null;
+ }
+
+ public function get autoExit():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "autoExit");
+ return false;
+ }
+
+ public function set autoExit(param1:Boolean):void
+ {
+ stub_setter("flash.desktop.NativeApplication", "autoExit");
+ }
+
+ public function get icon():InteractiveIcon
+ {
+ stub_getter("flash.desktop.NativeApplication", "icon");
+ return null;
+ }
+
+ [API("668")]
+ public function get systemIdleMode():String
+ {
+ stub_getter("flash.desktop.NativeApplication", "systemIdleMode");
+ return "normal";
+ }
+
+ [API("668")]
+ public function set systemIdleMode(param1:String):void
+ {
+ stub_setter("flash.desktop.NativeApplication", "systemIdleMode");
+ }
+
+ public function get startAtLogin():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "startAtLogin");
+ return false;
+ }
+
+ public function set startAtLogin(param1:Boolean):void
+ {
+ stub_setter("flash.desktop.NativeApplication", "startAtLogin");
+ }
+
+ public function activate(window:NativeWindow = null):void
+ {
+ stub_method("flash.desktop.NativeApplication", "activate");
+ }
+
+ public function get activeWindow():NativeWindow
+ {
+ stub_getter("flash.desktop.NativeApplication", "activeWindow");
+ return _openedWindows[0];
+ }
+
+ public function get openedWindows():Array
+ {
+ stub_getter("flash.desktop.NativeApplication", "openedWindows");
+ return _openedWindows;
+ }
+
+ public function get timeSinceLastUserInput():int
+ {
+ stub_getter("flash.desktop.NativeApplication", "timeSinceLastUserInput");
+ return 100;
+ }
+
+ public function get idleThreshold():int
+ {
+ stub_getter("flash.desktop.NativeApplication", "idleThreshold");
+ return this._idleThreshold;
+ }
+
+ public function set idleThreshold(value:int):void
+ {
+ stub_setter("flash.desktop.NativeApplication", "idleThreshold");
+ this._idleThreshold = value;
+ }
+
+ public function copy():Boolean
+ {
+ stub_method("flash.desktop.NativeApplication", "copy");
+ return false;
+ }
+
+ public function cut():Boolean
+ {
+ stub_method("flash.desktop.NativeApplication", "cut");
+ return false;
+ }
+
+ public function paste():Boolean
+ {
+ stub_method("flash.desktop.NativeApplication", "paste");
+ return false;
+ }
+
+ public function clear():Boolean
+ {
+ stub_method("flash.desktop.NativeApplication", "clear");
+ return false;
+ }
+
+ public function selectAll():Boolean
+ {
+ stub_method("flash.desktop.NativeApplication", "selectAll");
+ return false;
+ }
+
+ public function getDefaultApplication(extension:String):String
+ {
+ stub_method("flash.desktop.NativeApplication", "getDefaultApplication");
+ return null;
+ }
+
+ public function isSetAsDefaultApplication(extension:String):Boolean
+ {
+ stub_method("flash.desktop.NativeApplication", "isSetAsDefaultApplication");
+ return true;
+ }
+
+ public function setAsDefaultApplication(extension:String):void
+ {
+ stub_method("flash.desktop.NativeApplication", "setAsDefaultApplication");
+ }
+
+ public function removeAsDefaultApplication(extension:String):void
+ {
+ stub_method("flash.desktop.NativeApplication", "removeAsDefaultApplication");
+ }
+
+ [API("681")]
+ public function get executeInBackground():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "executeInBackground");
+ return false;
+ }
+
+ [API("681")]
+ public function set executeInBackground(param1:Boolean):void
+ {
+ stub_setter("flash.desktop.NativeApplication", "executeInBackground");
+ }
+
+ // [API("721")] Ruffle doesn't support this API Version
+ [API("681")]
+ public function get isCompiledAOT():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "isCompiledAOT");
+ return false;
+ }
+
+ // [API("721")] Ruffle doesn't support this API Version
+ [API("681")]
+ public function get isActive():Boolean
+ {
+ stub_getter("flash.desktop.NativeApplication", "isActive");
+ return true;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/desktop/NativeProcess.as b/core/src/avm2/globals/flash/desktop/NativeProcess.as
index 3a4026131f73..9bc75a32a1df 100644
--- a/core/src/avm2/globals/flash/desktop/NativeProcess.as
+++ b/core/src/avm2/globals/flash/desktop/NativeProcess.as
@@ -1,20 +1,25 @@
-package flash.desktop {
- import __ruffle__.stub_method;
+package flash.desktop
+{
+ import __ruffle__.stub_method;
- import flash.events.EventDispatcher;
+ import flash.events.EventDispatcher;
- [API("668")]
- public class NativeProcess extends EventDispatcher {
- public function NativeProcess() {
- super();
- }
+ [API("668")]
+ public class NativeProcess extends EventDispatcher
+ {
+ public function NativeProcess()
+ {
+ super();
+ }
- public static function get isSupported():Boolean {
- return false;
- }
+ public static function get isSupported():Boolean
+ {
+ return false;
+ }
- public function start(info:NativeProcessStartupInfo):void {
- stub_method("flash.desktop.NativeProcess", "start");
- }
- }
+ public function start(info:NativeProcessStartupInfo):void
+ {
+ stub_method("flash.desktop.NativeProcess", "start");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/desktop/NativeProcessStartupInfo.as b/core/src/avm2/globals/flash/desktop/NativeProcessStartupInfo.as
index 67d23f7bc17c..832b9af0d509 100644
--- a/core/src/avm2/globals/flash/desktop/NativeProcessStartupInfo.as
+++ b/core/src/avm2/globals/flash/desktop/NativeProcessStartupInfo.as
@@ -1,43 +1,52 @@
-package flash.desktop {
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
-
- import flash.filesystem.File;
-
- [API("668")]
- public class NativeProcessStartupInfo {
- public function NativeProcessStartupInfo() {
- super();
- }
-
- public function get arguments():Vector. {
- stub_getter("flash.desktop.NativeProcessStartupInfo", "arguments");
-
- return null;
- }
-
- public function set arguments(value:Vector.):void {
- stub_setter("flash.desktop.NativeProcessStartupInfo", "arguments");
- }
-
- public function get executable():File {
- stub_getter("flash.desktop.NativeProcessStartupInfo", "executable");
-
- return null;
- }
-
- public function set executable(value:File):void {
- stub_setter("flash.desktop.NativeProcessStartupInfo", "executable");
- }
-
- public function get workingDirectory():File {
- stub_getter("flash.desktop.NativeProcessStartupInfo", "workingDirectory");
-
- return null;
- }
-
- public function set workingDirectory(value:File):void {
- stub_setter("flash.desktop.NativeProcessStartupInfo", "workingDirectory");
- }
- }
+package flash.desktop
+{
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+
+ import flash.filesystem.File;
+
+ [API("668")]
+ public class NativeProcessStartupInfo
+ {
+ public function NativeProcessStartupInfo()
+ {
+ super();
+ }
+
+ public function get arguments():Vector.
+ {
+ stub_getter("flash.desktop.NativeProcessStartupInfo", "arguments");
+
+ return null;
+ }
+
+ public function set arguments(value:Vector.):void
+ {
+ stub_setter("flash.desktop.NativeProcessStartupInfo", "arguments");
+ }
+
+ public function get executable():File
+ {
+ stub_getter("flash.desktop.NativeProcessStartupInfo", "executable");
+
+ return null;
+ }
+
+ public function set executable(value:File):void
+ {
+ stub_setter("flash.desktop.NativeProcessStartupInfo", "executable");
+ }
+
+ public function get workingDirectory():File
+ {
+ stub_getter("flash.desktop.NativeProcessStartupInfo", "workingDirectory");
+
+ return null;
+ }
+
+ public function set workingDirectory(value:File):void
+ {
+ stub_setter("flash.desktop.NativeProcessStartupInfo", "workingDirectory");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/AVM1Movie.as b/core/src/avm2/globals/flash/display/AVM1Movie.as
index c116749cf030..4e50962e1b79 100644
--- a/core/src/avm2/globals/flash/display/AVM1Movie.as
+++ b/core/src/avm2/globals/flash/display/AVM1Movie.as
@@ -1,19 +1,24 @@
-package flash.display {
- import __ruffle__.stub_method;
+package flash.display
+{
+ import __ruffle__.stub_method;
- [Ruffle(InstanceAllocator)]
- public class AVM1Movie extends DisplayObject {
- public function AVM1Movie() {
- // Should be inaccessible
- }
-
- public function call(functionName:String, ... rest):* {
- stub_method("flash.display.AVM1Movie", "call");
- return null;
- }
-
- public function addCallback(name:String, fn:Function):void {
- stub_method("flash.display.AVM1Movie", "addCallback");
- }
- }
+ [Ruffle(InstanceAllocator)]
+ public class AVM1Movie extends DisplayObject
+ {
+ public function AVM1Movie()
+ {
+ // Should be inaccessible
+ }
+
+ public function call(functionName:String, ...rest):*
+ {
+ stub_method("flash.display.AVM1Movie", "call");
+ return null;
+ }
+
+ public function addCallback(name:String, fn:Function):void
+ {
+ stub_method("flash.display.AVM1Movie", "addCallback");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/ActionScriptVersion.as b/core/src/avm2/globals/flash/display/ActionScriptVersion.as
index 1397f8489b69..fdd438a88c87 100644
--- a/core/src/avm2/globals/flash/display/ActionScriptVersion.as
+++ b/core/src/avm2/globals/flash/display/ActionScriptVersion.as
@@ -1,6 +1,8 @@
-package flash.display {
- public final class ActionScriptVersion {
- public static const ACTIONSCRIPT2: uint = 2;
- public static const ACTIONSCRIPT3: uint = 3;
- }
+package flash.display
+{
+ public final class ActionScriptVersion
+ {
+ public static const ACTIONSCRIPT2:uint = 2;
+ public static const ACTIONSCRIPT3:uint = 3;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Bitmap.as b/core/src/avm2/globals/flash/display/Bitmap.as
index c8f035b49469..d4163a2a81cf 100644
--- a/core/src/avm2/globals/flash/display/Bitmap.as
+++ b/core/src/avm2/globals/flash/display/Bitmap.as
@@ -1,18 +1,21 @@
-package flash.display {
+package flash.display
+{
- [Ruffle(InstanceAllocator)]
- public class Bitmap extends DisplayObject {
- public native function get bitmapData():BitmapData;
- public native function set bitmapData(value:BitmapData):void;
- public native function get pixelSnapping():String;
- public native function set pixelSnapping(value:String):void;
- public native function get smoothing():Boolean;
- public native function set smoothing(value:Boolean):void;
+ [Ruffle(InstanceAllocator)]
+ public class Bitmap extends DisplayObject
+ {
+ public native function get bitmapData():BitmapData;
+ public native function set bitmapData(value:BitmapData):void;
+ public native function get pixelSnapping():String;
+ public native function set pixelSnapping(value:String):void;
+ public native function get smoothing():Boolean;
+ public native function set smoothing(value:Boolean):void;
- public function Bitmap(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false) {
- this.init(bitmapData, pixelSnapping, smoothing);
- }
+ public function Bitmap(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false)
+ {
+ this.init(bitmapData, pixelSnapping, smoothing);
+ }
- private native function init(bitmapData:BitmapData, pixelSnapping:String, smoothing:Boolean):void;
- }
+ private native function init(bitmapData:BitmapData, pixelSnapping:String, smoothing:Boolean):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/BitmapData.as b/core/src/avm2/globals/flash/display/BitmapData.as
index 4f4792d7a236..46fc388ef152 100644
--- a/core/src/avm2/globals/flash/display/BitmapData.as
+++ b/core/src/avm2/globals/flash/display/BitmapData.as
@@ -1,108 +1,116 @@
-package flash.display {
- import flash.geom.Rectangle;
- import flash.geom.ColorTransform;
- import flash.geom.Point;
- import flash.geom.Matrix;
- import flash.filters.BitmapFilter;
- import flash.filters.ShaderFilter;
- import flash.utils.ByteArray;
- import __ruffle__.stub_method;
+package flash.display
+{
+ import flash.geom.Rectangle;
+ import flash.geom.ColorTransform;
+ import flash.geom.Point;
+ import flash.geom.Matrix;
+ import flash.filters.BitmapFilter;
+ import flash.filters.ShaderFilter;
+ import flash.utils.ByteArray;
+ import __ruffle__.stub_method;
- [Ruffle(InstanceAllocator)]
- public class BitmapData implements IBitmapDrawable {
- public function BitmapData(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF) {
- this.init(width, height, transparent, fillColor);
- }
+ [Ruffle(InstanceAllocator)]
+ public class BitmapData implements IBitmapDrawable
+ {
+ public function BitmapData(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF)
+ {
+ this.init(width, height, transparent, fillColor);
+ }
- private native function init(width:int, height:int, transparent:Boolean, fillColor:uint);
+ private native function init(width:int, height:int, transparent:Boolean, fillColor:uint);
- public native function get height():int;
- public native function get width():int;
- public native function get rect():Rectangle;
- public native function get transparent():Boolean;
+ public native function get height():int;
+ public native function get width():int;
+ public native function get rect():Rectangle;
+ public native function get transparent():Boolean;
- public native function getPixels(rect:Rectangle):ByteArray;
- [API("682")]
- public native function copyPixelsToByteArray(rect:Rectangle, data:ByteArray):void;
- public native function getVector(rect:Rectangle):Vector.;
- public native function getPixel(x:int, y:int):uint;
- public native function getPixel32(x:int, y:int):uint;
- public native function setPixel(x:int, y:int, color:uint):void;
- public native function setPixel32(x:int, y:int, color:uint):void;
- public native function setPixels(rect:Rectangle, inputByteArray:ByteArray):void;
- public native function setVector(rect:Rectangle, inputVector:Vector.):void;
- public native function copyChannel(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, sourceChannel:uint, destChannel:uint):void;
- public native function floodFill(x:int, y:int, color:uint):void;
- public native function noise(randomSeed:int, low:uint = 0, high:uint = 255, channelOptions:uint = 7, grayScale:Boolean = false):void;
- public native function colorTransform(rect:Rectangle, colorTransform:ColorTransform):void;
- public native function getColorBoundsRect(mask:uint, color:uint, findColor:Boolean = true):Rectangle;
- public native function scroll(x:int, y:int):void;
- public native function lock():void;
- public native function hitTest(firstPoint:Point, firstAlphaThreshold:uint, secondObject:Object, secondBitmapDataPoint:Point = null, secondAlphaThreshold:uint = 1):Boolean;
- public function histogram(rect:Rectangle = null): Vector.> {
- if (!rect) {
- rect = this.rect;
- }
+ public native function getPixels(rect:Rectangle):ByteArray;
+ [API("682")]
+ public native function copyPixelsToByteArray(rect:Rectangle, data:ByteArray):void;
+ public native function getVector(rect:Rectangle):Vector.;
+ public native function getPixel(x:int, y:int):uint;
+ public native function getPixel32(x:int, y:int):uint;
+ public native function setPixel(x:int, y:int, color:uint):void;
+ public native function setPixel32(x:int, y:int, color:uint):void;
+ public native function setPixels(rect:Rectangle, inputByteArray:ByteArray):void;
+ public native function setVector(rect:Rectangle, inputVector:Vector.):void;
+ public native function copyChannel(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, sourceChannel:uint, destChannel:uint):void;
+ public native function floodFill(x:int, y:int, color:uint):void;
+ public native function noise(randomSeed:int, low:uint = 0, high:uint = 255, channelOptions:uint = 7, grayScale:Boolean = false):void;
+ public native function colorTransform(rect:Rectangle, colorTransform:ColorTransform):void;
+ public native function getColorBoundsRect(mask:uint, color:uint, findColor:Boolean = true):Rectangle;
+ public native function scroll(x:int, y:int):void;
+ public native function lock():void;
+ public native function hitTest(firstPoint:Point, firstAlphaThreshold:uint, secondObject:Object, secondBitmapDataPoint:Point = null, secondAlphaThreshold:uint = 1):Boolean;
+ public function histogram(rect:Rectangle = null):Vector.>
+ {
+ if (!rect)
+ {
+ rect = this.rect;
+ }
- var a = new Vector.(256);
- var r = new Vector.(256);
- var g = new Vector.(256);
- var b = new Vector.(256);
+ var a = new Vector.(256);
+ var r = new Vector.(256);
+ var g = new Vector.(256);
+ var b = new Vector.(256);
- var pixels = getPixels(rect);
- for (var i = 0; i < pixels.length; i += 4) {
- a[pixels[i]]++;
- r[pixels[i + 1]]++;
- g[pixels[i + 2]]++;
- b[pixels[i + 3]]++;
- }
+ var pixels = getPixels(rect);
+ for (var i = 0; i < pixels.length; i += 4)
+ {
+ a[pixels[i]]++;
+ r[pixels[i + 1]]++;
+ g[pixels[i + 2]]++;
+ b[pixels[i + 3]]++;
+ }
- var result = new Vector.>(4);
- result[0] = r;
- result[1] = g;
- result[2] = b;
- result[3] = a;
- return result;
- }
- public native function unlock(changeRect:Rectangle = null):void;
- public native function copyPixels(
- sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, alphaBitmapData:BitmapData = null, alphaPoint:Point = null, mergeAlpha:Boolean = false
- ):void;
- public native function draw(
- source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false
- ):void;
- [API("680")]
- public native function drawWithQuality(
- source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false, quality:String = null
- ):void;
- public native function fillRect(rect:Rectangle, color:uint):void;
- public native function dispose():void;
- public native function applyFilter(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, filter:BitmapFilter):void;
- public native function clone():BitmapData;
- public native function paletteMap(
- sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redArray:Array = null, greenArray:Array = null, blueArray:Array = null, alphaArray:Array = null
- ):void;
- public native function perlinNoise(
- baseX:Number, baseY:Number, numOctaves:uint, randomSeed:int, stitch:Boolean, fractalNoise:Boolean, channelOptions:uint = 7, grayScale:Boolean = false, offsets:Array = null
- ):void;
- public native function threshold(
- sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, operation:String, threshold:uint, color:uint = 0, mask:uint = 0xFFFFFFFF, copySource:Boolean = false
- ):uint;
- public native function compare(otherBitmapData:BitmapData):Object;
- public native function pixelDissolve(
- sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, randomSeed:int = 0, numPixels:int = 0,
- fillColor:uint = 0
- ):int;
- public native function merge(
- sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redMultiplier:uint, greenMultiplier:uint, blueMultiplier:uint, alphaMultiplier:uint
- ):void
- public function generateFilterRect(sourceRect:Rectangle, filter:BitmapFilter):Rectangle {
- // Flash always reports that a ShaderFilter affects the entire BitampData, ignoring SourceRect.
- if (filter is ShaderFilter) {
- return this.rect.clone();
- }
- stub_method("flash.display.BitmapData", "generateFilterRect");
- return sourceRect.clone();
- }
- }
+ var result = new Vector.>(4);
+ result[0] = r;
+ result[1] = g;
+ result[2] = b;
+ result[3] = a;
+ return result;
+ }
+ public native function unlock(changeRect:Rectangle = null):void;
+ public native function copyPixels(
+ sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, alphaBitmapData:BitmapData = null, alphaPoint:Point = null, mergeAlpha:Boolean = false
+ ):void;
+ public native function draw(
+ source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false
+ ):void;
+ [API("680")]
+ public native function drawWithQuality(
+ source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false, quality:String = null
+ ):void;
+ public native function fillRect(rect:Rectangle, color:uint):void;
+ public native function dispose():void;
+ public native function applyFilter(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, filter:BitmapFilter):void;
+ public native function clone():BitmapData;
+ public native function paletteMap(
+ sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redArray:Array = null, greenArray:Array = null, blueArray:Array = null, alphaArray:Array = null
+ ):void;
+ public native function perlinNoise(
+ baseX:Number, baseY:Number, numOctaves:uint, randomSeed:int, stitch:Boolean, fractalNoise:Boolean, channelOptions:uint = 7, grayScale:Boolean = false, offsets:Array = null
+ ):void;
+ public native function threshold(
+ sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, operation:String, threshold:uint, color:uint = 0, mask:uint = 0xFFFFFFFF, copySource:Boolean = false
+ ):uint;
+ public native function compare(otherBitmapData:BitmapData):Object;
+ public native function pixelDissolve(
+ sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, randomSeed:int = 0, numPixels:int = 0,
+ fillColor:uint = 0
+ ):int;
+ public native function merge(
+ sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redMultiplier:uint, greenMultiplier:uint, blueMultiplier:uint, alphaMultiplier:uint
+ ):void;
+ public function generateFilterRect(sourceRect:Rectangle, filter:BitmapFilter):Rectangle
+ {
+ // Flash always reports that a ShaderFilter affects the entire BitampData, ignoring SourceRect.
+ if (filter is ShaderFilter)
+ {
+ return this.rect.clone();
+ }
+ stub_method("flash.display.BitmapData", "generateFilterRect");
+ return sourceRect.clone();
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/BitmapDataChannel.as b/core/src/avm2/globals/flash/display/BitmapDataChannel.as
index de9aa571e647..2aa26e98581a 100644
--- a/core/src/avm2/globals/flash/display/BitmapDataChannel.as
+++ b/core/src/avm2/globals/flash/display/BitmapDataChannel.as
@@ -1,8 +1,10 @@
-package flash.display {
- public final class BitmapDataChannel {
- public static const RED: uint = 1;
- public static const GREEN: uint = 2;
- public static const BLUE: uint = 4;
- public static const ALPHA: uint = 8;
- }
+package flash.display
+{
+ public final class BitmapDataChannel
+ {
+ public static const RED:uint = 1;
+ public static const GREEN:uint = 2;
+ public static const BLUE:uint = 4;
+ public static const ALPHA:uint = 8;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as b/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as
index 8ca25749871b..e02943c9808c 100644
--- a/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as
+++ b/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as
@@ -1,9 +1,11 @@
-package flash.display {
- [API("680")]
- public final class BitmapEncodingColorSpace {
- public static const COLORSPACE_AUTO: String = "auto";
- public static const COLORSPACE_4_4_4: String = "4:4:4";
- public static const COLORSPACE_4_2_2: String = "4:2:2";
- public static const COLORSPACE_4_2_0: String = "4:2:0";
- }
+package flash.display
+{
+ [API("680")]
+ public final class BitmapEncodingColorSpace
+ {
+ public static const COLORSPACE_AUTO:String = "auto";
+ public static const COLORSPACE_4_4_4:String = "4:4:4";
+ public static const COLORSPACE_4_2_2:String = "4:2:2";
+ public static const COLORSPACE_4_2_0:String = "4:2:0";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/BlendMode.as b/core/src/avm2/globals/flash/display/BlendMode.as
index 52aa35e685bf..cfb077e02021 100644
--- a/core/src/avm2/globals/flash/display/BlendMode.as
+++ b/core/src/avm2/globals/flash/display/BlendMode.as
@@ -1,19 +1,21 @@
-package flash.display {
- public final class BlendMode {
- public static const NORMAL: String = "normal";
- public static const LAYER: String = "layer";
- public static const MULTIPLY: String = "multiply";
- public static const SCREEN: String = "screen";
- public static const LIGHTEN: String = "lighten";
- public static const DARKEN: String = "darken";
- public static const ADD: String = "add";
- public static const SUBTRACT: String = "subtract";
- public static const DIFFERENCE: String = "difference";
- public static const INVERT: String = "invert";
- public static const OVERLAY: String = "overlay";
- public static const HARDLIGHT: String = "hardlight";
- public static const ALPHA: String = "alpha";
- public static const ERASE: String = "erase";
- public static const SHADER: String = "shader";
- }
+package flash.display
+{
+ public final class BlendMode
+ {
+ public static const NORMAL:String = "normal";
+ public static const LAYER:String = "layer";
+ public static const MULTIPLY:String = "multiply";
+ public static const SCREEN:String = "screen";
+ public static const LIGHTEN:String = "lighten";
+ public static const DARKEN:String = "darken";
+ public static const ADD:String = "add";
+ public static const SUBTRACT:String = "subtract";
+ public static const DIFFERENCE:String = "difference";
+ public static const INVERT:String = "invert";
+ public static const OVERLAY:String = "overlay";
+ public static const HARDLIGHT:String = "hardlight";
+ public static const ALPHA:String = "alpha";
+ public static const ERASE:String = "erase";
+ public static const SHADER:String = "shader";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/CapsStyle.as b/core/src/avm2/globals/flash/display/CapsStyle.as
index 46c46c7ba80c..5cc6a09d13ae 100644
--- a/core/src/avm2/globals/flash/display/CapsStyle.as
+++ b/core/src/avm2/globals/flash/display/CapsStyle.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class CapsStyle {
- public static const ROUND: String = "round";
- public static const NONE: String = "none";
- public static const SQUARE: String = "square";
- }
+package flash.display
+{
+ public final class CapsStyle
+ {
+ public static const ROUND:String = "round";
+ public static const NONE:String = "none";
+ public static const SQUARE:String = "square";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/ColorCorrection.as b/core/src/avm2/globals/flash/display/ColorCorrection.as
index 444c6e221e1d..ef458daf7cb8 100644
--- a/core/src/avm2/globals/flash/display/ColorCorrection.as
+++ b/core/src/avm2/globals/flash/display/ColorCorrection.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class ColorCorrection {
- public static const DEFAULT: String = "default";
- public static const ON: String = "on";
- public static const OFF: String = "off";
- }
+package flash.display
+{
+ public final class ColorCorrection
+ {
+ public static const DEFAULT:String = "default";
+ public static const ON:String = "on";
+ public static const OFF:String = "off";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as b/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as
index 966a8da26d54..2583c1d48e64 100644
--- a/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as
+++ b/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class ColorCorrectionSupport {
- public static const UNSUPPORTED: String = "unsupported";
- public static const DEFAULT_ON: String = "defaultOn";
- public static const DEFAULT_OFF: String = "defaultOff";
- }
+package flash.display
+{
+ public final class ColorCorrectionSupport
+ {
+ public static const UNSUPPORTED:String = "unsupported";
+ public static const DEFAULT_ON:String = "defaultOn";
+ public static const DEFAULT_OFF:String = "defaultOff";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/DisplayObject.as b/core/src/avm2/globals/flash/display/DisplayObject.as
index fcb483f4cfc5..18b8d5b37461 100644
--- a/core/src/avm2/globals/flash/display/DisplayObject.as
+++ b/core/src/avm2/globals/flash/display/DisplayObject.as
@@ -1,140 +1,145 @@
-package flash.display {
-
- import flash.accessibility.AccessibilityProperties;
- import flash.geom.Rectangle;
- import flash.geom.Transform;
- import flash.display.DisplayObject;
- import flash.display.DisplayObjectContainer;
- import flash.display.LoaderInfo;
- import flash.display.Stage;
- import flash.geom.Point;
- import flash.events.EventDispatcher;
+package flash.display
+{
- [Ruffle(InstanceAllocator)]
- [Ruffle(SuperInitializer)]
- public class DisplayObject extends EventDispatcher implements IBitmapDrawable {
- private var _accessibilityProperties:AccessibilityProperties;
+ import flash.accessibility.AccessibilityProperties;
+ import flash.geom.Rectangle;
+ import flash.geom.Transform;
+ import flash.display.DisplayObject;
+ import flash.display.DisplayObjectContainer;
+ import flash.display.LoaderInfo;
+ import flash.display.Stage;
+ import flash.geom.Point;
+ import flash.events.EventDispatcher;
- public function DisplayObject() {
- throw new Error("Cannot instantiate abstract DisplayObject class");
- }
-
- public function get accessibilityProperties():AccessibilityProperties {
- return this._accessibilityProperties;
- }
- public function set accessibilityProperties(value:AccessibilityProperties):void {
- this._accessibilityProperties = value;
- }
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(SuperInitializer)]
+ public class DisplayObject extends EventDispatcher implements IBitmapDrawable
+ {
+ private var _accessibilityProperties:AccessibilityProperties;
- public native function get alpha():Number;
- public native function set alpha(value:Number):void;
+ public function DisplayObject()
+ {
+ throw new Error("Cannot instantiate abstract DisplayObject class");
+ }
- public native function get blendMode():String;
- public native function set blendMode(value:String):void;
+ public function get accessibilityProperties():AccessibilityProperties
+ {
+ return this._accessibilityProperties;
+ }
+ public function set accessibilityProperties(value:AccessibilityProperties):void
+ {
+ this._accessibilityProperties = value;
+ }
- public native function get height():Number;
- public native function set height(value:Number):void;
+ public native function get alpha():Number;
+ public native function set alpha(value:Number):void;
- public native function get scaleY():Number;
- public native function set scaleY(value:Number):void;
+ public native function get blendMode():String;
+ public native function set blendMode(value:String):void;
- public native function get width():Number;
- public native function set width(value:Number):void;
+ public native function get height():Number;
+ public native function set height(value:Number):void;
- public native function get scaleX():Number;
- public native function set scaleX(value:Number):void;
+ public native function get scaleY():Number;
+ public native function set scaleY(value:Number):void;
- public native function get x():Number;
- public native function set x(value:Number):void;
+ public native function get width():Number;
+ public native function set width(value:Number):void;
- public native function get y():Number;
- public native function set y(value:Number):void;
+ public native function get scaleX():Number;
+ public native function set scaleX(value:Number):void;
- [API("662")]
- public native function get z():Number;
- [API("662")]
- public native function set z(value:Number):void;
+ public native function get x():Number;
+ public native function set x(value:Number):void;
- public native function get rotation():Number;
- public native function set rotation(value:Number):void;
+ public native function get y():Number;
+ public native function set y(value:Number):void;
- [API("662")]
- public native function get rotationX():Number;
- [API("662")]
- public native function set rotationX(value:Number):void;
+ [API("662")]
+ public native function get z():Number;
+ [API("662")]
+ public native function set z(value:Number):void;
- [API("662")]
- public native function get rotationY():Number;
- [API("662")]
- public native function set rotationY(value:Number):void;
+ public native function get rotation():Number;
+ public native function set rotation(value:Number):void;
- [API("662")]
- public native function get rotationZ():Number;
- [API("662")]
- public native function set rotationZ(value:Number):void;
+ [API("662")]
+ public native function get rotationX():Number;
+ [API("662")]
+ public native function set rotationX(value:Number):void;
- [API("662")]
- public native function get scaleZ():Number;
- [API("662")]
- public native function set scaleZ(value:Number):void;
+ [API("662")]
+ public native function get rotationY():Number;
+ [API("662")]
+ public native function set rotationY(value:Number):void;
- public native function get scale9Grid():Rectangle;
- public native function set scale9Grid(value:Rectangle):void;
+ [API("662")]
+ public native function get rotationZ():Number;
+ [API("662")]
+ public native function set rotationZ(value:Number):void;
- public native function get name():String;
- public native function set name(value:String):void;
+ [API("662")]
+ public native function get scaleZ():Number;
+ [API("662")]
+ public native function set scaleZ(value:Number):void;
- public native function get parent():DisplayObjectContainer;
+ public native function get scale9Grid():Rectangle;
+ public native function set scale9Grid(value:Rectangle):void;
- public native function get root():DisplayObject;
+ public native function get name():String;
+ public native function set name(value:String):void;
- public native function get stage():Stage;
+ public native function get parent():DisplayObjectContainer;
- public native function get visible():Boolean;
- public native function set visible(value:Boolean):void;
+ public native function get root():DisplayObject;
- [API("686")]
- public native function get metaData():Object;
- [API("686")]
- public native function set metaData(value:Object):void;
+ public native function get stage():Stage;
- public native function get mouseX():Number;
+ public native function get visible():Boolean;
+ public native function set visible(value:Boolean):void;
- public native function get mouseY():Number;
+ [API("686")]
+ public native function get metaData():Object;
+ [API("686")]
+ public native function set metaData(value:Object):void;
- public native function get loaderInfo():LoaderInfo;
+ public native function get mouseX():Number;
- public native function get filters():Array;
- public native function set filters(value:Array):void;
+ public native function get mouseY():Number;
- public native function get transform():Transform;
- public native function set transform(value:Transform):void;
+ public native function get loaderInfo():LoaderInfo;
- public native function get scrollRect():Rectangle;
- public native function set scrollRect(value:Rectangle):void;
+ public native function get filters():Array;
+ public native function set filters(value:Array):void;
- public native function get mask():DisplayObject;
- public native function set mask(value:DisplayObject):void;
+ public native function get transform():Transform;
+ public native function set transform(value:Transform):void;
- public native function get opaqueBackground():Object;
- public native function set opaqueBackground(value:Object):void;
+ public native function get scrollRect():Rectangle;
+ public native function set scrollRect(value:Rectangle):void;
- public native function get cacheAsBitmap():Boolean;
- public native function set cacheAsBitmap(value:Boolean):void;
+ public native function get mask():DisplayObject;
+ public native function set mask(value:DisplayObject):void;
- public native function hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean;
+ public native function get opaqueBackground():Object;
+ public native function set opaqueBackground(value:Object):void;
- public native function hitTestObject(obj:DisplayObject):Boolean;
+ public native function get cacheAsBitmap():Boolean;
+ public native function set cacheAsBitmap(value:Boolean):void;
- public native function localToGlobal(point:Point):Point;
+ public native function hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean;
- public native function globalToLocal(point:Point):Point;
+ public native function hitTestObject(obj:DisplayObject):Boolean;
- public native function getBounds(targetCoordinateSpace:DisplayObject):Rectangle;
+ public native function localToGlobal(point:Point):Point;
- public native function getRect(targetCoordinateSpace:DisplayObject):Rectangle;
+ public native function globalToLocal(point:Point):Point;
- public native function set blendShader(value:Shader):void;
- }
+ public native function getBounds(targetCoordinateSpace:DisplayObject):Rectangle;
+
+ public native function getRect(targetCoordinateSpace:DisplayObject):Rectangle;
+
+ public native function set blendShader(value:Shader):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/DisplayObjectContainer.as b/core/src/avm2/globals/flash/display/DisplayObjectContainer.as
index d64479d46230..feba28f7ddf5 100644
--- a/core/src/avm2/globals/flash/display/DisplayObjectContainer.as
+++ b/core/src/avm2/globals/flash/display/DisplayObjectContainer.as
@@ -1,52 +1,58 @@
-package flash.display {
- import flash.accessibility.AccessibilityProperties;
- import flash.geom.ColorTransform;
- import flash.geom.Matrix;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- import flash.media.SoundTransform;
- import flash.display.DisplayObject;
- import flash.display.InteractiveObject;
- import flash.text.TextSnapshot;
-
- [Ruffle(SuperInitializer)]
- public class DisplayObjectContainer extends InteractiveObject {
-
- public function DisplayObjectContainer() {
- throw new Error("You cannot construct DisplayObjectContainer directly.");
- }
-
- public native function get numChildren():int;
- public native function get mouseChildren():Boolean;
- public native function set mouseChildren(value:Boolean):void;
- public native function get tabChildren():Boolean;
- public native function set tabChildren(value:Boolean):void;
-
- public native function addChild(child:DisplayObject):DisplayObject;
- public native function addChildAt(child:DisplayObject, index:int):DisplayObject;
- public native function contains(child:DisplayObject):Boolean;
- public native function getChildAt(index:int):DisplayObject;
- public native function getChildByName(name:String):DisplayObject;
- public native function getChildIndex(child:DisplayObject):int;
- public native function removeChild(child:DisplayObject):DisplayObject;
- public native function removeChildAt(index:int):DisplayObject;
-
- [API("674")] // AIR 3.0, FP 11, SWF 13
- public native function removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void;
-
- public native function setChildIndex(child:DisplayObject, index:int):void;
- public native function swapChildren(child1:DisplayObject, child2:DisplayObject):void;
- public native function swapChildrenAt(index1:int, index2:int):void;
-
- [API("690")] // AIR 3.8, FP 11.8, SWF 21
- public native function stopAllMovieClips():void;
-
- public native function getObjectsUnderPoint(point:Point):Array;
- public native function areInaccessibleObjectsUnderPoint(point:Point):Boolean;
-
- public function get textSnapshot():TextSnapshot {
- stub_getter("flash.display.DisplayObjectContainer", "textSnapshot")
- return new TextSnapshot();
- }
- }
+package flash.display
+{
+ import flash.accessibility.AccessibilityProperties;
+ import flash.geom.ColorTransform;
+ import flash.geom.Matrix;
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ import flash.media.SoundTransform;
+ import flash.display.DisplayObject;
+ import flash.display.InteractiveObject;
+ import flash.text.TextSnapshot;
+
+ [Ruffle(SuperInitializer)]
+ public class DisplayObjectContainer extends InteractiveObject
+ {
+
+ public function DisplayObjectContainer()
+ {
+ throw new Error("You cannot construct DisplayObjectContainer directly.");
+ }
+
+ public native function get numChildren():int;
+ public native function get mouseChildren():Boolean;
+ public native function set mouseChildren(value:Boolean):void;
+ public native function get tabChildren():Boolean;
+ public native function set tabChildren(value:Boolean):void;
+
+ public native function addChild(child:DisplayObject):DisplayObject;
+ public native function addChildAt(child:DisplayObject, index:int):DisplayObject;
+ public native function contains(child:DisplayObject):Boolean;
+ public native function getChildAt(index:int):DisplayObject;
+ public native function getChildByName(name:String):DisplayObject;
+ public native function getChildIndex(child:DisplayObject):int;
+ public native function removeChild(child:DisplayObject):DisplayObject;
+ public native function removeChildAt(index:int):DisplayObject;
+
+ [API("674")]
+ // AIR 3.0, FP 11, SWF 13
+ public native function removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void;
+
+ public native function setChildIndex(child:DisplayObject, index:int):void;
+ public native function swapChildren(child1:DisplayObject, child2:DisplayObject):void;
+ public native function swapChildrenAt(index1:int, index2:int):void;
+
+ [API("690")]
+ // AIR 3.8, FP 11.8, SWF 21
+ public native function stopAllMovieClips():void;
+
+ public native function getObjectsUnderPoint(point:Point):Array;
+ public native function areInaccessibleObjectsUnderPoint(point:Point):Boolean;
+
+ public function get textSnapshot():TextSnapshot
+ {
+ stub_getter("flash.display.DisplayObjectContainer", "textSnapshot");
+ return new TextSnapshot();
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/FrameLabel.as b/core/src/avm2/globals/flash/display/FrameLabel.as
index ae83befe3d42..4b3b07d40470 100644
--- a/core/src/avm2/globals/flash/display/FrameLabel.as
+++ b/core/src/avm2/globals/flash/display/FrameLabel.as
@@ -1,21 +1,26 @@
-package flash.display {
- import flash.events.EventDispatcher;
+package flash.display
+{
+ import flash.events.EventDispatcher;
- public final class FrameLabel extends EventDispatcher {
- private var _name: String;
- private var _frame: int;
+ public final class FrameLabel extends EventDispatcher
+ {
+ private var _name:String;
+ private var _frame:int;
- public function FrameLabel(name:String, frame:int) {
- this._name = name;
- this._frame = frame;
- }
+ public function FrameLabel(name:String, frame:int)
+ {
+ this._name = name;
+ this._frame = frame;
+ }
- public function get name(): String {
- return this._name;
- }
+ public function get name():String
+ {
+ return this._name;
+ }
- public function get frame(): int {
- return this._frame;
- }
- }
+ public function get frame():int
+ {
+ return this._frame;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/GradientType.as b/core/src/avm2/globals/flash/display/GradientType.as
index e3bb4d9b600d..d6bcb00d1ade 100644
--- a/core/src/avm2/globals/flash/display/GradientType.as
+++ b/core/src/avm2/globals/flash/display/GradientType.as
@@ -1,6 +1,8 @@
-package flash.display {
- public final class GradientType {
- public static const LINEAR: String = "linear";
- public static const RADIAL: String = "radial";
- }
+package flash.display
+{
+ public final class GradientType
+ {
+ public static const LINEAR:String = "linear";
+ public static const RADIAL:String = "radial";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Graphics.as b/core/src/avm2/globals/flash/display/Graphics.as
index 7d64edc2c522..13e6b1c0db13 100644
--- a/core/src/avm2/globals/flash/display/Graphics.as
+++ b/core/src/avm2/globals/flash/display/Graphics.as
@@ -1,52 +1,53 @@
package flash.display
{
- import flash.geom.Matrix;
- import __ruffle__.stub_method;
+ import flash.geom.Matrix;
+ import __ruffle__.stub_method;
- // note: no need for an allocator, as it's never constructed from AS
- public final class Graphics
- {
- public function Graphics()
- {
- throw new Error("You cannot construct Graphics directly.");
- }
+ // note: no need for an allocator, as it's never constructed from AS
+ public final class Graphics
+ {
+ public function Graphics()
+ {
+ throw new Error("You cannot construct Graphics directly.");
+ }
- public native function beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void;
- public native function beginFill(color:uint, alpha:Number = 1.0):void;
- public native function beginGradientFill(
- type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0
- ): void;
- public function beginShaderFill(shader:Shader, matrix:Matrix = null):void {
- stub_method("flash.display.Graphics", "beginShaderFill");
- }
- public native function clear(): void;
- public native function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number): void;
- public native function drawCircle(x:Number, y:Number, radius:Number): void;
- public native function drawEllipse(x:Number, y:Number, width:Number, height:Number): void;
- public native function drawRect(x:Number, y:Number, width:Number, height:Number): void;
- public native function drawRoundRect(x:Number, y:Number, width:Number, height:Number, ellipseWidth:Number, ellipseHeight:Number = NaN): void;
- public native function endFill(): void;
- public native function lineStyle(
- thickness:Number = NaN, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3
- ): void;
- public native function lineTo(x:Number, y:Number): void;
- public native function moveTo(x:Number, y:Number): void;
- //public native function beginShaderFill(shader:Shader, matrix:Matrix = null):void;
- public native function lineGradientStyle(
- type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0
- ):void;
- [API("674")]
- public native function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void;
- public native function copyFrom(sourceGraphics:Graphics):void;
- public native function drawPath(commands:Vector., data:Vector., winding:String = "evenOdd"):void;
- public native function drawRoundRectComplex(
- x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number
- ):void;
- public native function drawTriangles(vertices:Vector., indices:Vector. = null, uvtData:Vector. = null, culling:String = "none"):void;
- public native function drawGraphicsData(graphicsData:Vector.):void;
- //public native function lineShaderStyle(shader:Shader, matrix:Matrix = null):void;
- public native function lineBitmapStyle(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void;
- [API("686")]
- public native function readGraphicsData(recurse:Boolean = true):Vector.;
- }
+ public native function beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void;
+ public native function beginFill(color:uint, alpha:Number = 1.0):void;
+ public native function beginGradientFill(
+ type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0
+ ):void;
+ public function beginShaderFill(shader:Shader, matrix:Matrix = null):void
+ {
+ stub_method("flash.display.Graphics", "beginShaderFill");
+ }
+ public native function clear():void;
+ public native function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void;
+ public native function drawCircle(x:Number, y:Number, radius:Number):void;
+ public native function drawEllipse(x:Number, y:Number, width:Number, height:Number):void;
+ public native function drawRect(x:Number, y:Number, width:Number, height:Number):void;
+ public native function drawRoundRect(x:Number, y:Number, width:Number, height:Number, ellipseWidth:Number, ellipseHeight:Number = NaN):void;
+ public native function endFill():void;
+ public native function lineStyle(
+ thickness:Number = NaN, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3
+ ):void;
+ public native function lineTo(x:Number, y:Number):void;
+ public native function moveTo(x:Number, y:Number):void;
+ // public native function beginShaderFill(shader:Shader, matrix:Matrix = null):void;
+ public native function lineGradientStyle(
+ type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0
+ ):void;
+ [API("674")]
+ public native function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void;
+ public native function copyFrom(sourceGraphics:Graphics):void;
+ public native function drawPath(commands:Vector., data:Vector., winding:String = "evenOdd"):void;
+ public native function drawRoundRectComplex(
+ x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number
+ ):void;
+ public native function drawTriangles(vertices:Vector., indices:Vector. = null, uvtData:Vector. = null, culling:String = "none"):void;
+ public native function drawGraphicsData(graphicsData:Vector.):void;
+ // public native function lineShaderStyle(shader:Shader, matrix:Matrix = null):void;
+ public native function lineBitmapStyle(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void;
+ [API("686")]
+ public native function readGraphicsData(recurse:Boolean = true):Vector.;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as b/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as
index 0f7d1d92995a..38cf7627270f 100644
--- a/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as
+++ b/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as
@@ -1,18 +1,21 @@
-package flash.display {
+package flash.display
+{
-import flash.geom.Matrix;
+ import flash.geom.Matrix;
- public final class GraphicsBitmapFill implements IGraphicsFill, IGraphicsData {
- public var bitmapData : BitmapData;
- public var matrix : Matrix;
- public var repeat : Boolean;
- public var smooth : Boolean;
+ public final class GraphicsBitmapFill implements IGraphicsFill, IGraphicsData
+ {
+ public var bitmapData:BitmapData;
+ public var matrix:Matrix;
+ public var repeat:Boolean;
+ public var smooth:Boolean;
- public function GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false) {
- this.bitmapData = bitmapData;
- this.matrix = matrix;
- this.repeat = repeat;
- this.smooth = smooth;
- }
- }
+ public function GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false)
+ {
+ this.bitmapData = bitmapData;
+ this.matrix = matrix;
+ this.repeat = repeat;
+ this.smooth = smooth;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/GraphicsEndFill.as b/core/src/avm2/globals/flash/display/GraphicsEndFill.as
index 3aeb64b0b5f0..6dafc148cb5f 100644
--- a/core/src/avm2/globals/flash/display/GraphicsEndFill.as
+++ b/core/src/avm2/globals/flash/display/GraphicsEndFill.as
@@ -1,6 +1,8 @@
-package flash.display {
+package flash.display
+{
- public final class GraphicsEndFill implements IGraphicsFill, IGraphicsData {
- }
+ public final class GraphicsEndFill implements IGraphicsFill, IGraphicsData
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/GraphicsGradientFill.as b/core/src/avm2/globals/flash/display/GraphicsGradientFill.as
index 7b37deaf3ba7..2c06db56b1cb 100644
--- a/core/src/avm2/globals/flash/display/GraphicsGradientFill.as
+++ b/core/src/avm2/globals/flash/display/GraphicsGradientFill.as
@@ -1,35 +1,38 @@
-package flash.display {
+package flash.display
+{
-import flash.geom.Matrix;
+ import flash.geom.Matrix;
- public final class GraphicsGradientFill implements IGraphicsFill, IGraphicsData {
- public var alphas : Array;
- public var colors : Array;
- public var focalPointRatio : Number;
- public var interpolationMethod : String;
- public var matrix : Matrix;
- public var ratios : Array;
- public var spreadMethod : String;
- public var type : String;
+ public final class GraphicsGradientFill implements IGraphicsFill, IGraphicsData
+ {
+ public var alphas:Array;
+ public var colors:Array;
+ public var focalPointRatio:Number;
+ public var interpolationMethod:String;
+ public var matrix:Matrix;
+ public var ratios:Array;
+ public var spreadMethod:String;
+ public var type:String;
- public function GraphicsGradientFill(
- type:String = "linear",
- colors:Array = null,
- alphas:Array = null,
- ratios:Array = null,
- matrix:Matrix = null,
- spreadMethod:String = SpreadMethod.PAD,
- interpolationMethod:String = InterpolationMethod.RGB,
- focalPointRatio:Number = 0.0
- ) {
- this.alphas = alphas;
- this.colors = colors;
- this.focalPointRatio = focalPointRatio;
- this.interpolationMethod = interpolationMethod;
- this.matrix = matrix;
- this.ratios = ratios;
- this.spreadMethod = spreadMethod;
- this.type = type;
- }
- }
+ public function GraphicsGradientFill(
+ type:String = "linear",
+ colors:Array = null,
+ alphas:Array = null,
+ ratios:Array = null,
+ matrix:Matrix = null,
+ spreadMethod:String = SpreadMethod.PAD,
+ interpolationMethod:String = InterpolationMethod.RGB,
+ focalPointRatio:Number = 0.0
+ )
+ {
+ this.alphas = alphas;
+ this.colors = colors;
+ this.focalPointRatio = focalPointRatio;
+ this.interpolationMethod = interpolationMethod;
+ this.matrix = matrix;
+ this.ratios = ratios;
+ this.spreadMethod = spreadMethod;
+ this.type = type;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/GraphicsPath.as b/core/src/avm2/globals/flash/display/GraphicsPath.as
index ce8f32755eae..b6ba1f87e2ec 100644
--- a/core/src/avm2/globals/flash/display/GraphicsPath.as
+++ b/core/src/avm2/globals/flash/display/GraphicsPath.as
@@ -1,88 +1,110 @@
-package flash.display {
+package flash.display
+{
- public final class GraphicsPath implements IGraphicsPath, IGraphicsData {
- public var commands : Vector.;
- public var data : Vector.;
- public var winding : String;
+ public final class GraphicsPath implements IGraphicsPath, IGraphicsData
+ {
+ public var commands:Vector.;
+ public var data:Vector.;
+ public var winding:String;
- public function GraphicsPath(commands:Vector. = null, data:Vector. = null, winding:String = "evenOdd") {
- this.commands = commands;
- this.data = data;
- this.winding = winding;
- }
+ public function GraphicsPath(commands:Vector. = null, data:Vector. = null, winding:String = "evenOdd")
+ {
+ this.commands = commands;
+ this.data = data;
+ this.winding = winding;
+ }
- [API("674")] // The online docs say 694, but that's a lie. This is the correct number from playerglobal.swc.
- public function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void {
- if (commands == null) {
- commands = new Vector.();
- }
- if (data == null) {
- data = new Vector.();
- }
- commands.push(GraphicsPathCommand.CUBIC_CURVE_TO);
- data.push(controlX1, controlY1, controlX2, controlY2, anchorX, anchorY);
- }
+ [API("674")]
+ // The online docs say 694, but that's a lie. This is the correct number from playerglobal.swc.
+ public function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void
+ {
+ if (commands == null)
+ {
+ commands = new Vector.();
+ }
+ if (data == null)
+ {
+ data = new Vector.();
+ }
+ commands.push(GraphicsPathCommand.CUBIC_CURVE_TO);
+ data.push(controlX1, controlY1, controlX2, controlY2, anchorX, anchorY);
+ }
- public function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void {
- if (commands == null) {
- commands = new Vector.();
- }
- if (data == null) {
- data = new Vector.();
- }
- commands.push(GraphicsPathCommand.CURVE_TO);
- data.push(controlX, controlY, anchorX, anchorY);
- }
+ public function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void
+ {
+ if (commands == null)
+ {
+ commands = new Vector.();
+ }
+ if (data == null)
+ {
+ data = new Vector.();
+ }
+ commands.push(GraphicsPathCommand.CURVE_TO);
+ data.push(controlX, controlY, anchorX, anchorY);
+ }
- public function lineTo(x:Number, y:Number):void {
- if (commands == null) {
- commands = new Vector.();
- }
- if (data == null) {
- data = new Vector.();
- }
- commands.push(GraphicsPathCommand.LINE_TO);
- data.push(x, y);
- }
+ public function lineTo(x:Number, y:Number):void
+ {
+ if (commands == null)
+ {
+ commands = new Vector.();
+ }
+ if (data == null)
+ {
+ data = new Vector.();
+ }
+ commands.push(GraphicsPathCommand.LINE_TO);
+ data.push(x, y);
+ }
- public function moveTo(x:Number, y:Number):void {
- if (commands == null) {
- commands = new Vector.();
- }
- if (data == null) {
- data = new Vector.();
- }
- commands.push(GraphicsPathCommand.MOVE_TO);
- data.push(x, y);
- }
+ public function moveTo(x:Number, y:Number):void
+ {
+ if (commands == null)
+ {
+ commands = new Vector.();
+ }
+ if (data == null)
+ {
+ data = new Vector.();
+ }
+ commands.push(GraphicsPathCommand.MOVE_TO);
+ data.push(x, y);
+ }
- public function wideLineTo(x:Number, y:Number):void {
- if (commands == null) {
- commands = new Vector.();
- }
- if (data == null) {
- data = new Vector.();
- }
- // "Wide" variant seems to literally just exist to use the same amount of data values as curveTo
- // The first two values are arbitrary. When consuming, they are ignored.
- // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/GraphicsPathCommand.html#WIDE_LINE_TO
- commands.push(GraphicsPathCommand.WIDE_LINE_TO);
- data.push(0, 0, x, y);
- }
+ public function wideLineTo(x:Number, y:Number):void
+ {
+ if (commands == null)
+ {
+ commands = new Vector.();
+ }
+ if (data == null)
+ {
+ data = new Vector.();
+ }
+ // "Wide" variant seems to literally just exist to use the same amount of data values as curveTo
+ // The first two values are arbitrary. When consuming, they are ignored.
+ // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/GraphicsPathCommand.html#WIDE_LINE_TO
+ commands.push(GraphicsPathCommand.WIDE_LINE_TO);
+ data.push(0, 0, x, y);
+ }
- public function wideMoveTo(x:Number, y:Number):void {
- if (commands == null) {
- commands = new Vector.();
- }
- if (data == null) {
- data = new Vector.();
- }
- // "Wide" variant seems to literally just exist to use the same amount of data values as curveTo
- // The first two values are arbitrary. When consuming, they are ignored.
- // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/GraphicsPathCommand.html#WIDE_MOVE_TO
- commands.push(GraphicsPathCommand.WIDE_MOVE_TO);
- data.push(0, 0, x, y);
- }
- }
+ public function wideMoveTo(x:Number, y:Number):void
+ {
+ if (commands == null)
+ {
+ commands = new Vector.();
+ }
+ if (data == null)
+ {
+ data = new Vector.();
+ }
+ // "Wide" variant seems to literally just exist to use the same amount of data values as curveTo
+ // The first two values are arbitrary. When consuming, they are ignored.
+ // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/GraphicsPathCommand.html#WIDE_MOVE_TO
+ commands.push(GraphicsPathCommand.WIDE_MOVE_TO);
+ data.push(0, 0, x, y);
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/GraphicsPathCommand.as b/core/src/avm2/globals/flash/display/GraphicsPathCommand.as
index d92a29d3a3e9..8342b4e533e2 100644
--- a/core/src/avm2/globals/flash/display/GraphicsPathCommand.as
+++ b/core/src/avm2/globals/flash/display/GraphicsPathCommand.as
@@ -1,11 +1,13 @@
-package flash.display {
- public final class GraphicsPathCommand {
- public static const NO_OP: int = 0;
- public static const MOVE_TO: int = 1;
- public static const LINE_TO: int = 2;
- public static const CURVE_TO: int = 3;
- public static const WIDE_MOVE_TO: int = 4;
- public static const WIDE_LINE_TO: int = 5;
- public static const CUBIC_CURVE_TO: int = 6;
- }
+package flash.display
+{
+ public final class GraphicsPathCommand
+ {
+ public static const NO_OP:int = 0;
+ public static const MOVE_TO:int = 1;
+ public static const LINE_TO:int = 2;
+ public static const CURVE_TO:int = 3;
+ public static const WIDE_MOVE_TO:int = 4;
+ public static const WIDE_LINE_TO:int = 5;
+ public static const CUBIC_CURVE_TO:int = 6;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/GraphicsPathWinding.as b/core/src/avm2/globals/flash/display/GraphicsPathWinding.as
index 174891bbc759..a4c6c5a3655b 100644
--- a/core/src/avm2/globals/flash/display/GraphicsPathWinding.as
+++ b/core/src/avm2/globals/flash/display/GraphicsPathWinding.as
@@ -1,6 +1,8 @@
-package flash.display {
- public final class GraphicsPathWinding {
- public static const EVEN_ODD: String = "evenOdd";
- public static const NON_ZERO: String = "nonZero";
- }
+package flash.display
+{
+ public final class GraphicsPathWinding
+ {
+ public static const EVEN_ODD:String = "evenOdd";
+ public static const NON_ZERO:String = "nonZero";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/GraphicsShaderFill.as b/core/src/avm2/globals/flash/display/GraphicsShaderFill.as
index 88b6c809ae32..7abb97c90cc2 100644
--- a/core/src/avm2/globals/flash/display/GraphicsShaderFill.as
+++ b/core/src/avm2/globals/flash/display/GraphicsShaderFill.as
@@ -1,15 +1,17 @@
-package flash.display {
- import flash.geom.Matrix;
-
- public final class GraphicsShaderFill implements IGraphicsFill, IGraphicsData {
- public var shader:Shader;
-
- public var matrix:Matrix;
-
- public function GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null) {
- this.shader = shader;
- this.matrix = matrix;
- }
- }
-}
+package flash.display
+{
+ import flash.geom.Matrix;
+
+ public final class GraphicsShaderFill implements IGraphicsFill, IGraphicsData
+ {
+ public var shader:Shader;
+ public var matrix:Matrix;
+
+ public function GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null)
+ {
+ this.shader = shader;
+ this.matrix = matrix;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/display/GraphicsSolidFill.as b/core/src/avm2/globals/flash/display/GraphicsSolidFill.as
index cb834298b5b5..fe11b0e4e2a3 100644
--- a/core/src/avm2/globals/flash/display/GraphicsSolidFill.as
+++ b/core/src/avm2/globals/flash/display/GraphicsSolidFill.as
@@ -1,13 +1,16 @@
-package flash.display {
+package flash.display
+{
- public final class GraphicsSolidFill implements IGraphicsFill, IGraphicsData {
- public var alpha : Number = 1.0;
- public var color : uint = 0;
+ public final class GraphicsSolidFill implements IGraphicsFill, IGraphicsData
+ {
+ public var alpha:Number = 1.0;
+ public var color:uint = 0;
- public function GraphicsSolidFill(color:uint = 0, alpha:Number = 1.0) {
- this.alpha = alpha;
- this.color = color;
- }
- }
+ public function GraphicsSolidFill(color:uint = 0, alpha:Number = 1.0)
+ {
+ this.alpha = alpha;
+ this.color = color;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/GraphicsStroke.as b/core/src/avm2/globals/flash/display/GraphicsStroke.as
index d6cb55e7e0be..b86c10bb979f 100644
--- a/core/src/avm2/globals/flash/display/GraphicsStroke.as
+++ b/core/src/avm2/globals/flash/display/GraphicsStroke.as
@@ -1,31 +1,34 @@
-package flash.display {
+package flash.display
+{
- public final class GraphicsStroke implements IGraphicsStroke, IGraphicsData {
- public var caps : String;
- public var fill : IGraphicsFill;
- public var joints : String;
- public var miterLimit : Number;
- public var pixelHinting : Boolean;
- public var scaleMode : String;
- public var thickness : Number;
+ public final class GraphicsStroke implements IGraphicsStroke, IGraphicsData
+ {
+ public var caps:String;
+ public var fill:IGraphicsFill;
+ public var joints:String;
+ public var miterLimit:Number;
+ public var pixelHinting:Boolean;
+ public var scaleMode:String;
+ public var thickness:Number;
- public function GraphicsStroke(
- thickness:Number = NaN,
- pixelHinting:Boolean = false,
- scaleMode:String = "normal",
- caps:String = "none",
- joints:String = "round",
- miterLimit:Number = 3.0,
- fill:IGraphicsFill = null
- ) {
- this.thickness = thickness;
- this.pixelHinting = pixelHinting;
- this.scaleMode = scaleMode;
- this.caps = caps;
- this.joints = joints;
- this.miterLimit = miterLimit;
- this.fill = fill;
- }
- }
+ public function GraphicsStroke(
+ thickness:Number = NaN,
+ pixelHinting:Boolean = false,
+ scaleMode:String = "normal",
+ caps:String = "none",
+ joints:String = "round",
+ miterLimit:Number = 3.0,
+ fill:IGraphicsFill = null
+ )
+ {
+ this.thickness = thickness;
+ this.pixelHinting = pixelHinting;
+ this.scaleMode = scaleMode;
+ this.caps = caps;
+ this.joints = joints;
+ this.miterLimit = miterLimit;
+ this.fill = fill;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as b/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as
index bdaa2b95ccbf..17ea3a6ed803 100644
--- a/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as
+++ b/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as
@@ -1,17 +1,20 @@
-package flash.display {
+package flash.display
+{
- public final class GraphicsTrianglePath implements IGraphicsPath, IGraphicsData {
- public var culling : String;
- public var indices : Vector.;
- public var uvtData : Vector.;
- public var vertices : Vector.;
+ public final class GraphicsTrianglePath implements IGraphicsPath, IGraphicsData
+ {
+ public var culling:String;
+ public var indices:Vector.;
+ public var uvtData:Vector.;
+ public var vertices:Vector.;
- public function GraphicsTrianglePath(vertices:Vector. = null, indices:Vector. = null, uvtData:Vector. = null, culling:String = "none") {
- this.culling = culling;
- this.indices = indices;
- this.uvtData = uvtData;
- this.vertices = vertices;
- }
- }
+ public function GraphicsTrianglePath(vertices:Vector. = null, indices:Vector. = null, uvtData:Vector. = null, culling:String = "none")
+ {
+ this.culling = culling;
+ this.indices = indices;
+ this.uvtData = uvtData;
+ this.vertices = vertices;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/IBitmapDrawable.as b/core/src/avm2/globals/flash/display/IBitmapDrawable.as
index 893bbd6a0cb2..fd14fa54dc7f 100644
--- a/core/src/avm2/globals/flash/display/IBitmapDrawable.as
+++ b/core/src/avm2/globals/flash/display/IBitmapDrawable.as
@@ -1,3 +1,6 @@
-package flash.display {
- public interface IBitmapDrawable {}
+package flash.display
+{
+ public interface IBitmapDrawable
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/IGraphicsData.as b/core/src/avm2/globals/flash/display/IGraphicsData.as
index ddb283a40047..8d5dc70dfcd2 100644
--- a/core/src/avm2/globals/flash/display/IGraphicsData.as
+++ b/core/src/avm2/globals/flash/display/IGraphicsData.as
@@ -1,4 +1,6 @@
-package flash.display {
- public interface IGraphicsData {
- }
+package flash.display
+{
+ public interface IGraphicsData
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/IGraphicsFill.as b/core/src/avm2/globals/flash/display/IGraphicsFill.as
index 6555a907fbc0..6eb202bc7996 100644
--- a/core/src/avm2/globals/flash/display/IGraphicsFill.as
+++ b/core/src/avm2/globals/flash/display/IGraphicsFill.as
@@ -1,4 +1,6 @@
-package flash.display {
- public interface IGraphicsFill {
- }
+package flash.display
+{
+ public interface IGraphicsFill
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/IGraphicsPath.as b/core/src/avm2/globals/flash/display/IGraphicsPath.as
index 2de12ae102b8..f0d104f6f34e 100644
--- a/core/src/avm2/globals/flash/display/IGraphicsPath.as
+++ b/core/src/avm2/globals/flash/display/IGraphicsPath.as
@@ -1,4 +1,6 @@
-package flash.display {
- public interface IGraphicsPath {
- }
+package flash.display
+{
+ public interface IGraphicsPath
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/IGraphicsStroke.as b/core/src/avm2/globals/flash/display/IGraphicsStroke.as
index f913672264e1..55ec23d5ae4d 100644
--- a/core/src/avm2/globals/flash/display/IGraphicsStroke.as
+++ b/core/src/avm2/globals/flash/display/IGraphicsStroke.as
@@ -1,4 +1,6 @@
-package flash.display {
- public interface IGraphicsStroke {
- }
+package flash.display
+{
+ public interface IGraphicsStroke
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/InteractiveObject.as b/core/src/avm2/globals/flash/display/InteractiveObject.as
index 5c6be1ea6202..881d8f9ec36f 100644
--- a/core/src/avm2/globals/flash/display/InteractiveObject.as
+++ b/core/src/avm2/globals/flash/display/InteractiveObject.as
@@ -1,64 +1,73 @@
-package flash.display {
- import __ruffle__.stub_setter;
+package flash.display
+{
+ import __ruffle__.stub_setter;
- import flash.accessibility.AccessibilityImplementation;
- import flash.geom.Rectangle;
- import flash.ui.ContextMenu;
+ import flash.accessibility.AccessibilityImplementation;
+ import flash.geom.Rectangle;
+ import flash.ui.ContextMenu;
- [Ruffle(SuperInitializer)]
- public class InteractiveObject extends DisplayObject {
- private var _accessibilityImpl:AccessibilityImplementation = null;
- private var _needsSoftKeyboard:Boolean = false;
- private var _softKeyboardInputAreaOfInterest:Rectangle = new Rectangle();
+ [Ruffle(SuperInitializer)]
+ public class InteractiveObject extends DisplayObject
+ {
+ private var _accessibilityImpl:AccessibilityImplementation = null;
+ private var _needsSoftKeyboard:Boolean = false;
+ private var _softKeyboardInputAreaOfInterest:Rectangle = new Rectangle();
- public function InteractiveObject() {
- throw new Error("You cannot directly construct InteractiveObject.")
- }
+ public function InteractiveObject()
+ {
+ throw new Error("You cannot directly construct InteractiveObject.");
+ }
- public function get accessibilityImplementation():AccessibilityImplementation {
- return this._accessibilityImpl;
- }
- public function set accessibilityImplementation(value:AccessibilityImplementation):void {
- stub_setter("flash.display.InteractiveObject", "accessibilityImplementation");
- this._accessibilityImpl = value;
- }
+ public function get accessibilityImplementation():AccessibilityImplementation
+ {
+ return this._accessibilityImpl;
+ }
+ public function set accessibilityImplementation(value:AccessibilityImplementation):void
+ {
+ stub_setter("flash.display.InteractiveObject", "accessibilityImplementation");
+ this._accessibilityImpl = value;
+ }
- public native function get mouseEnabled():Boolean;
- public native function set mouseEnabled(value:Boolean):void;
+ public native function get mouseEnabled():Boolean;
+ public native function set mouseEnabled(value:Boolean):void;
- [API("670")]
- public function get needsSoftKeyboard():Boolean {
- return this._needsSoftKeyboard;
- }
- [API("670")]
- public function set needsSoftKeyboard(value:Boolean):void {
- stub_setter("flash.display.InteractiveObject", "needsSoftKeyboard");
- this._needsSoftKeyboard = value;
- }
+ [API("670")]
+ public function get needsSoftKeyboard():Boolean
+ {
+ return this._needsSoftKeyboard;
+ }
+ [API("670")]
+ public function set needsSoftKeyboard(value:Boolean):void
+ {
+ stub_setter("flash.display.InteractiveObject", "needsSoftKeyboard");
+ this._needsSoftKeyboard = value;
+ }
- [API("670")]
- public function get softKeyboardInputAreaOfInterest():Rectangle {
- return this._softKeyboardInputAreaOfInterest;
- }
- [API("670")]
- public function set softKeyboardInputAreaOfInterest(value:Rectangle):void {
- stub_setter("flash.display.InteractiveObject", "softKeyboardInputAreaOfInterest");
- this._softKeyboardInputAreaOfInterest = value;
- }
+ [API("670")]
+ public function get softKeyboardInputAreaOfInterest():Rectangle
+ {
+ return this._softKeyboardInputAreaOfInterest;
+ }
+ [API("670")]
+ public function set softKeyboardInputAreaOfInterest(value:Rectangle):void
+ {
+ stub_setter("flash.display.InteractiveObject", "softKeyboardInputAreaOfInterest");
+ this._softKeyboardInputAreaOfInterest = value;
+ }
- public native function get doubleClickEnabled():Boolean;
- public native function set doubleClickEnabled(value:Boolean):void;
+ public native function get doubleClickEnabled():Boolean;
+ public native function set doubleClickEnabled(value:Boolean):void;
- public native function get contextMenu():ContextMenu;
- public native function set contextMenu(cm:ContextMenu):void;
+ public native function get contextMenu():ContextMenu;
+ public native function set contextMenu(cm:ContextMenu):void;
- public native function get tabEnabled():Boolean;
- public native function set tabEnabled(value:Boolean):void;
+ public native function get tabEnabled():Boolean;
+ public native function set tabEnabled(value:Boolean):void;
- public native function get tabIndex():int;
- public native function set tabIndex(index:int):void;
+ public native function get tabIndex():int;
+ public native function set tabIndex(index:int):void;
- public native function get focusRect():Object;
- public native function set focusRect(value:Object):void;
- }
+ public native function get focusRect():Object;
+ public native function set focusRect(value:Object):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/InterpolationMethod.as b/core/src/avm2/globals/flash/display/InterpolationMethod.as
index aa34ebd02866..c4418083aaf0 100644
--- a/core/src/avm2/globals/flash/display/InterpolationMethod.as
+++ b/core/src/avm2/globals/flash/display/InterpolationMethod.as
@@ -1,6 +1,8 @@
-package flash.display {
- public final class InterpolationMethod {
- public static const RGB: String = "rgb";
- public static const LINEAR_RGB: String = "linearRGB";
- }
+package flash.display
+{
+ public final class InterpolationMethod
+ {
+ public static const RGB:String = "rgb";
+ public static const LINEAR_RGB:String = "linearRGB";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as b/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as
index f62c13111c43..29e97e00d153 100644
--- a/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as
+++ b/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as
@@ -1,10 +1,13 @@
-package flash.display {
- [API("680")]
- public final class JPEGEncoderOptions {
- public var quality: uint;
+package flash.display
+{
+ [API("680")]
+ public final class JPEGEncoderOptions
+ {
+ public var quality:uint;
- public function JPEGEncoderOptions(quality: uint = 80) {
- this.quality = quality;
- }
- }
+ public function JPEGEncoderOptions(quality:uint = 80)
+ {
+ this.quality = quality;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as b/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as
index 774640f4889c..42549a3bb612 100644
--- a/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as
+++ b/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as
@@ -1,14 +1,17 @@
-package flash.display {
- [API("680")]
- public final class JPEGXREncoderOptions {
- public var quantization: uint;
- public var colorSpace: String;
- public var trimFlexBits: uint;
+package flash.display
+{
+ [API("680")]
+ public final class JPEGXREncoderOptions
+ {
+ public var quantization:uint;
+ public var colorSpace:String;
+ public var trimFlexBits:uint;
- public function JPEGXREncoderOptions(quantization: uint = 20, colorSpace: String = "auto", trimFlexBits: uint = 0) {
- this.quantization = quantization;
- this.colorSpace = colorSpace;
- this.trimFlexBits = trimFlexBits;
- }
- }
+ public function JPEGXREncoderOptions(quantization:uint = 20, colorSpace:String = "auto", trimFlexBits:uint = 0)
+ {
+ this.quantization = quantization;
+ this.colorSpace = colorSpace;
+ this.trimFlexBits = trimFlexBits;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/JointStyle.as b/core/src/avm2/globals/flash/display/JointStyle.as
index 0b86e129650c..5ec46faef3be 100644
--- a/core/src/avm2/globals/flash/display/JointStyle.as
+++ b/core/src/avm2/globals/flash/display/JointStyle.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class JointStyle {
- public static const ROUND: String = "round";
- public static const BEVEL: String = "bevel";
- public static const MITER: String = "miter";
- }
+package flash.display
+{
+ public final class JointStyle
+ {
+ public static const ROUND:String = "round";
+ public static const BEVEL:String = "bevel";
+ public static const MITER:String = "miter";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/LineScaleMode.as b/core/src/avm2/globals/flash/display/LineScaleMode.as
index 5b9df5c81f9d..9c3d55571169 100644
--- a/core/src/avm2/globals/flash/display/LineScaleMode.as
+++ b/core/src/avm2/globals/flash/display/LineScaleMode.as
@@ -1,8 +1,10 @@
-package flash.display {
- public final class LineScaleMode {
- public static const NORMAL: String = "normal";
- public static const VERTICAL: String = "vertical";
- public static const HORIZONTAL: String = "horizontal";
- public static const NONE: String = "none";
- }
+package flash.display
+{
+ public final class LineScaleMode
+ {
+ public static const NORMAL:String = "normal";
+ public static const VERTICAL:String = "vertical";
+ public static const HORIZONTAL:String = "horizontal";
+ public static const NONE:String = "none";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Loader.as b/core/src/avm2/globals/flash/display/Loader.as
index 8ac5d11ca856..6c41dee2d219 100644
--- a/core/src/avm2/globals/flash/display/Loader.as
+++ b/core/src/avm2/globals/flash/display/Loader.as
@@ -1,7 +1,9 @@
-package flash.display {
+package flash.display
+{
[Ruffle(InstanceAllocator)]
- public class Loader extends DisplayObjectContainer {
+ public class Loader extends DisplayObjectContainer
+ {
import flash.display.LoaderInfo;
import flash.display.DisplayObject;
import flash.errors.IllegalOperationError;
@@ -9,54 +11,64 @@ package flash.display {
import flash.utils.ByteArray;
import flash.net.URLRequest;
import flash.events.UncaughtErrorEvents;
- import __ruffle__.stub_method;
+ import __ruffle__.stub_method;
- internal var _contentLoaderInfo: LoaderInfo;
+ internal var _contentLoaderInfo:LoaderInfo;
- public function get contentLoaderInfo():LoaderInfo {
+ public function get contentLoaderInfo():LoaderInfo
+ {
return this._contentLoaderInfo;
}
- public function get content():DisplayObject {
+ public function get content():DisplayObject
+ {
return this._contentLoaderInfo.content;
}
- public native function load(request: URLRequest, context: LoaderContext = null):void;
+ public native function load(request:URLRequest, context:LoaderContext = null):void;
+
+ public native function loadBytes(data:ByteArray, context:LoaderContext = null):void;
- public native function loadBytes(data: ByteArray, context: LoaderContext = null):void;
-
public native function unload():void;
- public function unloadAndStop(gc:Boolean = true):void {
+ public function unloadAndStop(gc:Boolean = true):void
+ {
stub_method("flash.display.Loader", "unloadAndStop");
this.unload();
}
-
- public function close():void {
+
+ public function close():void
+ {
stub_method("flash.display.Loader", "close");
}
- override public function addChild(child:DisplayObject):DisplayObject {
+ override public function addChild(child:DisplayObject):DisplayObject
+ {
throw new IllegalOperationError("Error #2069: The Loader class does not implement this method.", 2069);
}
- override public function addChildAt(child:DisplayObject, index:int):DisplayObject {
+ override public function addChildAt(child:DisplayObject, index:int):DisplayObject
+ {
throw new IllegalOperationError("Error #2069: The Loader class does not implement this method.", 2069);
}
- override public function removeChild(child:DisplayObject):DisplayObject {
+ override public function removeChild(child:DisplayObject):DisplayObject
+ {
throw new IllegalOperationError("Error #2069: The Loader class does not implement this method.", 2069);
}
- override public function removeChildAt(index:int):DisplayObject {
+ override public function removeChildAt(index:int):DisplayObject
+ {
throw new IllegalOperationError("Error #2069: The Loader class does not implement this method.", 2069);
}
- override public function setChildIndex(child:DisplayObject, index:int):void {
+ override public function setChildIndex(child:DisplayObject, index:int):void
+ {
throw new IllegalOperationError("Error #2069: The Loader class does not implement this method.", 2069);
}
- public function get uncaughtErrorEvents():UncaughtErrorEvents {
+ public function get uncaughtErrorEvents():UncaughtErrorEvents
+ {
return this.contentLoaderInfo.uncaughtErrorEvents;
}
}
diff --git a/core/src/avm2/globals/flash/display/LoaderInfo.as b/core/src/avm2/globals/flash/display/LoaderInfo.as
index 4343dda6db71..7794accd60a9 100644
--- a/core/src/avm2/globals/flash/display/LoaderInfo.as
+++ b/core/src/avm2/globals/flash/display/LoaderInfo.as
@@ -1,36 +1,39 @@
-package flash.display {
- import flash.events.EventDispatcher;
- import flash.system.ApplicationDomain;
- import flash.utils.ByteArray;
- import flash.events.UncaughtErrorEvents;
+package flash.display
+{
+ import flash.events.EventDispatcher;
+ import flash.system.ApplicationDomain;
+ import flash.utils.ByteArray;
+ import flash.events.UncaughtErrorEvents;
- [Ruffle(InstanceAllocator)]
- [Ruffle(SuperInitializer)]
- public class LoaderInfo extends EventDispatcher {
- public function LoaderInfo() {
- throw new Error("LoaderInfo cannot be constructed");
- }
+ [Ruffle(InstanceAllocator)]
+ [Ruffle(SuperInitializer)]
+ public class LoaderInfo extends EventDispatcher
+ {
+ public function LoaderInfo()
+ {
+ throw new Error("LoaderInfo cannot be constructed");
+ }
- public native function get actionScriptVersion():uint;
- public native function get applicationDomain():ApplicationDomain;
- public native function get bytesLoaded():uint;
- public native function get bytesTotal():uint;
- public native function get content():DisplayObject;
- public native function get contentType():String;
- public native function get frameRate():Number;
- public native function get height():int;
- public native function get isURLInaccessible():Boolean;
- public native function get parentAllowsChild():Boolean;
- public native function get swfVersion():uint;
- public native function get url():String;
- public native function get width():int;
- public native function get bytes():ByteArray;
- public native function get loader():Loader;
- public native function get loaderURL():String;
- public native function get parameters():Object;
- public native function get sharedEvents():EventDispatcher;
- public native function get uncaughtErrorEvents():UncaughtErrorEvents;
- public native function get sameDomain():Boolean;
- public native function get childAllowsParent():Boolean;
- }
+ public native function get actionScriptVersion():uint;
+ public native function get applicationDomain():ApplicationDomain;
+ public native function get bytesLoaded():uint;
+ public native function get bytesTotal():uint;
+ public native function get content():DisplayObject;
+ public native function get contentType():String;
+ public native function get frameRate():Number;
+ public native function get height():int;
+ public native function get isURLInaccessible():Boolean;
+ public native function get parentAllowsChild():Boolean;
+ public native function get swfVersion():uint;
+ public native function get url():String;
+ public native function get width():int;
+ public native function get bytes():ByteArray;
+ public native function get loader():Loader;
+ public native function get loaderURL():String;
+ public native function get parameters():Object;
+ public native function get sharedEvents():EventDispatcher;
+ public native function get uncaughtErrorEvents():UncaughtErrorEvents;
+ public native function get sameDomain():Boolean;
+ public native function get childAllowsParent():Boolean;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/MorphShape.as b/core/src/avm2/globals/flash/display/MorphShape.as
index 9b4ad5454646..0d63871ab93b 100644
--- a/core/src/avm2/globals/flash/display/MorphShape.as
+++ b/core/src/avm2/globals/flash/display/MorphShape.as
@@ -1,8 +1,11 @@
-package flash.display {
- [Ruffle(InstanceAllocator)]
- public final class MorphShape extends DisplayObject {
- public function MorphShape() {
- // We throw an error in `morph_shape_allocator`
- }
- }
+package flash.display
+{
+ [Ruffle(InstanceAllocator)]
+ public final class MorphShape extends DisplayObject
+ {
+ public function MorphShape()
+ {
+ // We throw an error in `morph_shape_allocator`
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/MovieClip.as b/core/src/avm2/globals/flash/display/MovieClip.as
index 762929d8a55e..0c94f67a5908 100644
--- a/core/src/avm2/globals/flash/display/MovieClip.as
+++ b/core/src/avm2/globals/flash/display/MovieClip.as
@@ -1,28 +1,32 @@
-package flash.display {
- public dynamic class MovieClip extends Sprite {
- public function MovieClip() {}
+package flash.display
+{
+ public dynamic class MovieClip extends Sprite
+ {
+ public function MovieClip()
+ {
+ }
- public native function get currentFrame():int;
- public native function get currentFrameLabel():String;
- public native function get currentLabel():String;
- public native function get currentLabels():Array;
- public native function get currentScene():Scene;
- public native function get enabled():Boolean;
- public native function set enabled(value:Boolean):void;
- public native function get framesLoaded():int;
- [API("674")]
- public native function get isPlaying():Boolean;
- public native function get scenes():Array;
- public native function get totalFrames():int;
+ public native function get currentFrame():int;
+ public native function get currentFrameLabel():String;
+ public native function get currentLabel():String;
+ public native function get currentLabels():Array;
+ public native function get currentScene():Scene;
+ public native function get enabled():Boolean;
+ public native function set enabled(value:Boolean):void;
+ public native function get framesLoaded():int;
+ [API("674")]
+ public native function get isPlaying():Boolean;
+ public native function get scenes():Array;
+ public native function get totalFrames():int;
- public native function addFrameScript(...args):void;
- public native function gotoAndPlay(frame:Object, scene:String = null):void;
- public native function gotoAndStop(frame:Object, scene:String = null):void;
- public native function stop():void;
- public native function play():void;
- public native function prevFrame():void;
- public native function nextFrame():void;
- public native function prevScene():void;
- public native function nextScene():void;
- }
+ public native function addFrameScript(...args):void;
+ public native function gotoAndPlay(frame:Object, scene:String = null):void;
+ public native function gotoAndStop(frame:Object, scene:String = null):void;
+ public native function stop():void;
+ public native function play():void;
+ public native function prevFrame():void;
+ public native function nextFrame():void;
+ public native function prevScene():void;
+ public native function nextScene():void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/NativeMenu.as b/core/src/avm2/globals/flash/display/NativeMenu.as
index 329cfdb644d5..15fb4bf9d55f 100644
--- a/core/src/avm2/globals/flash/display/NativeMenu.as
+++ b/core/src/avm2/globals/flash/display/NativeMenu.as
@@ -1,144 +1,144 @@
package flash.display
{
- import flash.events.EventDispatcher;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
-
- // According to the documentation, it should be [API("661")]
- // but airglobal.swc disagrees with that:
- [API("667")]
- public class NativeMenu extends EventDispatcher
- {
-
- // Indicates whether any form of native menu is supported on the client system.
- private var _isSupported:Boolean;
-
- // The array of NativeMenuItem objects in this menu.
- public var items:Array;
-
- // The parent menu.
- private var _parent:NativeMenu;
-
- public function NativeMenu()
- {
-
- }
-
- // Adds a menu item at the bottom of the menu.
- public function addItem(item:NativeMenuItem):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "addItem");
- this.items.push(item);
- return item;
- }
-
- // Inserts a menu item at the specified position.
- public function addItemAt(item:NativeMenuItem, index:int):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "addItemAt");
- this.items[index] = item;
- return item;
- }
-
- // Adds a submenu to the menu by inserting a new menu item.
- public function addSubmenu(submenu:NativeMenu, label:String):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "addSubmenu");
- return null;
- }
-
- // Adds a submenu to the menu by inserting a new menu item at the specified position.
- public function addSubmenuAt(submenu:NativeMenu, index:int, label:String):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "addSubmenuAt");
- return null;
- }
-
- // Creates a copy of the menu and all items.
- public function clone():NativeMenu
- {
- stub_method("flash.display.NativeMenu", "clone");
- return null;
- }
-
- // Reports whether this menu contains the specified menu item.
- public function containsItem(item:NativeMenuItem):Boolean
- {
- stub_method("flash.display.NativeMenu", "containsItem");
- return false;
- }
-
- // Pops up this menu at the specified location.
- public function display(stage:Stage, stageX:Number, stageY:Number):void
- {
- stub_method("flash.display.NativeMenu", "display");
- }
-
- // Gets the menu item at the specified index.
- public function getItemAt(index:int):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "getItemAt");
- return null;
- }
-
- // Gets the menu item with the specified name.
- public function getItemByName(name:String):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "getItemByName");
- return null;
- }
-
- // Gets the position of the specified item.
- public function getItemIndex(item:NativeMenuItem):int
- {
- stub_method("flash.display.NativeMenu", "getItemIndex");
- return -1;
- }
-
- // Removes all items from the menu.
- public function removeAllItems():void
- {
- stub_method("flash.display.NativeMenu", "removeAllItems");
- this.items = [];
- }
-
- // Removes the specified menu item.
- public function removeItem(item:NativeMenuItem):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "removeItem");
- return null;
- }
-
- // Removes and returns the menu item at the specified index.
- public function removeItemAt(index:int):NativeMenuItem
- {
- stub_method("flash.display.NativeMenu", "removeItemAt");
- return null;
- }
-
- // Moves a menu item to the specified position.
- public function setItemIndex(item:NativeMenuItem, index:int):void
- {
- stub_method("flash.display.NativeMenu", "setItemIndex");
- }
-
- // According to the documentation, it should be [API("668")]
- // but there is no version gate in airglobal.swc
- public function get isSupported():Boolean
- {
- return this._isSupported;
- }
-
- public function get numItems():int
- {
- return this.items.length;
- }
-
- public function get parent():NativeMenu
- {
- return this._parent;
- }
-
- }
+ import flash.events.EventDispatcher;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+
+ // According to the documentation, it should be [API("661")]
+ // but airglobal.swc disagrees with that:
+ [API("667")]
+ public class NativeMenu extends EventDispatcher
+ {
+
+ // Indicates whether any form of native menu is supported on the client system.
+ private var _isSupported:Boolean;
+
+ // The array of NativeMenuItem objects in this menu.
+ public var items:Array;
+
+ // The parent menu.
+ private var _parent:NativeMenu;
+
+ public function NativeMenu()
+ {
+
+ }
+
+ // Adds a menu item at the bottom of the menu.
+ public function addItem(item:NativeMenuItem):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "addItem");
+ this.items.push(item);
+ return item;
+ }
+
+ // Inserts a menu item at the specified position.
+ public function addItemAt(item:NativeMenuItem, index:int):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "addItemAt");
+ this.items[index] = item;
+ return item;
+ }
+
+ // Adds a submenu to the menu by inserting a new menu item.
+ public function addSubmenu(submenu:NativeMenu, label:String):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "addSubmenu");
+ return null;
+ }
+
+ // Adds a submenu to the menu by inserting a new menu item at the specified position.
+ public function addSubmenuAt(submenu:NativeMenu, index:int, label:String):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "addSubmenuAt");
+ return null;
+ }
+
+ // Creates a copy of the menu and all items.
+ public function clone():NativeMenu
+ {
+ stub_method("flash.display.NativeMenu", "clone");
+ return null;
+ }
+
+ // Reports whether this menu contains the specified menu item.
+ public function containsItem(item:NativeMenuItem):Boolean
+ {
+ stub_method("flash.display.NativeMenu", "containsItem");
+ return false;
+ }
+
+ // Pops up this menu at the specified location.
+ public function display(stage:Stage, stageX:Number, stageY:Number):void
+ {
+ stub_method("flash.display.NativeMenu", "display");
+ }
+
+ // Gets the menu item at the specified index.
+ public function getItemAt(index:int):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "getItemAt");
+ return null;
+ }
+
+ // Gets the menu item with the specified name.
+ public function getItemByName(name:String):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "getItemByName");
+ return null;
+ }
+
+ // Gets the position of the specified item.
+ public function getItemIndex(item:NativeMenuItem):int
+ {
+ stub_method("flash.display.NativeMenu", "getItemIndex");
+ return -1;
+ }
+
+ // Removes all items from the menu.
+ public function removeAllItems():void
+ {
+ stub_method("flash.display.NativeMenu", "removeAllItems");
+ this.items = [];
+ }
+
+ // Removes the specified menu item.
+ public function removeItem(item:NativeMenuItem):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "removeItem");
+ return null;
+ }
+
+ // Removes and returns the menu item at the specified index.
+ public function removeItemAt(index:int):NativeMenuItem
+ {
+ stub_method("flash.display.NativeMenu", "removeItemAt");
+ return null;
+ }
+
+ // Moves a menu item to the specified position.
+ public function setItemIndex(item:NativeMenuItem, index:int):void
+ {
+ stub_method("flash.display.NativeMenu", "setItemIndex");
+ }
+
+ // According to the documentation, it should be [API("668")]
+ // but there is no version gate in airglobal.swc
+ public function get isSupported():Boolean
+ {
+ return this._isSupported;
+ }
+
+ public function get numItems():int
+ {
+ return this.items.length;
+ }
+
+ public function get parent():NativeMenu
+ {
+ return this._parent;
+ }
+
+ }
}
diff --git a/core/src/avm2/globals/flash/display/NativeMenuItem.as b/core/src/avm2/globals/flash/display/NativeMenuItem.as
index e3bea52b80c2..fb4a52123c26 100644
--- a/core/src/avm2/globals/flash/display/NativeMenuItem.as
+++ b/core/src/avm2/globals/flash/display/NativeMenuItem.as
@@ -1,33 +1,35 @@
-package flash.display {
- import flash.events.EventDispatcher;
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_getter;
- // According to the documentation, it should be [API("661")]
- // but airglobal.swc disagrees with that:
- [API("667")]
- public class NativeMenuItem extends EventDispatcher {
- public var enabled: Boolean = false;
- public var checked: Boolean = false;
- public var data: Object;
- public var isSeparator: Boolean;
- public var keyEquivalent: String = "k";
- public var keyEquivalentModifiers: Array = [];
- public var label: String;
- public var mnemonicIndex: int = 0;
- public var name: String = "";
- public var submenu: NativeMenu = new NativeMenu();
+package flash.display
+{
+ import flash.events.EventDispatcher;
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_getter;
+ // According to the documentation, it should be [API("661")]
+ // but airglobal.swc disagrees with that:
+ [API("667")]
+ public class NativeMenuItem extends EventDispatcher
+ {
+ public var enabled:Boolean = false;
+ public var checked:Boolean = false;
+ public var data:Object;
+ public var isSeparator:Boolean;
+ public var keyEquivalent:String = "k";
+ public var keyEquivalentModifiers:Array = [];
+ public var label:String;
+ public var mnemonicIndex:int = 0;
+ public var name:String = "";
+ public var submenu:NativeMenu = new NativeMenu();
- public function NativeMenuItem(label:String = "", isSeparator:Boolean = false)
- {
- stub_constructor("flash.display.NativeMenuItem");
- this.label = label;
- this.isSeparator = isSeparator;
- }
+ public function NativeMenuItem(label:String = "", isSeparator:Boolean = false)
+ {
+ stub_constructor("flash.display.NativeMenuItem");
+ this.label = label;
+ this.isSeparator = isSeparator;
+ }
- public function get menu():NativeMenu
- {
- stub_getter("flash.display.NativeMenuItem", "menu");
- return new NativeMenu();
- }
- }
+ public function get menu():NativeMenu
+ {
+ stub_getter("flash.display.NativeMenuItem", "menu");
+ return new NativeMenu();
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/NativeWindow.as b/core/src/avm2/globals/flash/display/NativeWindow.as
index b43ffe08a2e7..8d863b4fa250 100644
--- a/core/src/avm2/globals/flash/display/NativeWindow.as
+++ b/core/src/avm2/globals/flash/display/NativeWindow.as
@@ -1,312 +1,312 @@
package flash.display
{
- import flash.geom.Point;
- import flash.geom.Rectangle;
- import flash.events.NativeWindowBoundsEvent;
- import flash.events.Event;
- import flash.events.EventDispatcher;
- import flash.desktop.NativeApplication;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
- import __ruffle__.stub_constructor;
-
- [API("661")]
- public class NativeWindow extends EventDispatcher
- {
- public const systemMaxSize:Point = new Point(2880, 2880);
- public const systemMinSize:Point = new Point(1, 1);
- public var minSize:Point = systemMinSize;
- public var maxSize:Point = systemMaxSize;
- public var title:String;
- public var alwaysInFront:Boolean = true;
- public var visible:Boolean = true;
-
- private var _bounds:Rectangle;
- private var _maximizable:Boolean;
- private var _minimizable:Boolean;
- private var _resizable:Boolean;
- private var _systemChrome:String;
- private var _transparent:Boolean;
- private var _type:String;
- private var _closed:Boolean = false;
- private var _stage:Stage;
-
- public function NativeWindow(initOptions:NativeWindowInitOptions, _stage:Stage = null)
- {
- stub_constructor("flash.display.NativeWindow");
- NativeApplication.nativeApplication.openedWindows.push(this);
- if (_stage)
- {
- this._stage = _stage;
- _stage.addEventListener(Event.RESIZE, function(e:Event):void
- {
- dispatchEvent(new NativeWindowBoundsEvent(NativeWindowBoundsEvent.RESIZE, false, false, _bounds, _bounds = new Rectangle(x, y, width, height)));
- });
- }
-
- _maximizable = initOptions.maximizable;
- _minimizable = initOptions.minimizable;
- _resizable = initOptions.resizable;
- _systemChrome = initOptions.systemChrome;
- _transparent = initOptions.transparent;
- _type = initOptions.type;
- }
-
- public function get width():Number
- {
- stub_getter("flash.display.NativeWindow", "width");
- return _stage.stageWidth;
- }
-
- public function set width(value:Number):void
- {
- stub_setter("flash.display.NativeWindow", "width");
- _stage.stageWidth = value;
- }
-
- public function get height():Number
- {
- stub_getter("flash.display.NativeWindow", "height");
- return _stage.stageHeight;
- }
-
- public function set height(value:Number):void
- {
- stub_setter("flash.display.NativeWindow", "height");
- _stage.stageHeight = value;
- }
-
- public function get x():Number
- {
- stub_getter("flash.display.NativeWindow", "x");
- return _stage.x;
- }
-
- public function set x(value:Number):void
- {
- stub_setter("flash.display.NativeWindow", "x");
- }
-
- public function get y():Number
- {
- stub_getter("flash.display.NativeWindow", "y");
- return _stage.y;
- }
-
- public function set y(value:Number):void
- {
- stub_setter("flash.display.NativeWindow", "y");
- }
-
- public function get bounds():Rectangle
- {
- stub_getter("flash.display.NativeWindow", "bounds");
- return _bounds;
- }
-
- public function set bounds(value:Rectangle):void
- {
- stub_setter("flash.display.NativeWindow", "bounds");
- _bounds = value;
- }
-
- public function get maximizable():Boolean
- {
- stub_getter("flash.display.NativeWindow", "maximizable");
- return _maximizable;
- }
-
- public function get minimizable():Boolean
- {
- stub_getter("flash.display.NativeWindow", "minimizable");
- return _minimizable;
- }
-
- public function get resizable():Boolean
- {
- stub_getter("flash.display.NativeWindow", "resizable");
- return _resizable;
- }
-
- public function get systemChrome():String
- {
- stub_getter("flash.display.NativeWindow", "systemChrome");
- return _systemChrome;
- }
-
- public function get transparent():Boolean
- {
- stub_getter("flash.display.NativeWindow", "transparent");
- return _transparent;
- }
-
- public function get type():String
- {
- stub_getter("flash.display.NativeWindow", "type");
- return _type;
- }
-
- public function get stage():Stage
- {
- return _stage;
- }
-
- // Activates this window.
- public function activate():void
- {
- stub_method("flash.display.NativeWindow", "activate");
- dispatchEvent(new Event(Event.ACTIVATE));
- }
-
- // Closes this window.
- public function close():void
- {
- stub_method("flash.display.NativeWindow", "close");
- if (dispatchEvent(new Event(Event.CLOSING, false, true)))
- {
- _closed = true;
- dispatchEvent(new Event(Event.CLOSE));
- dispatchEvent(new Event(Event.DEACTIVATE));
- }
-
- }
-
- // Converts a point in pixel coordinates relative to the origin of the window stage (a global point in terms of the display list), to a point on the virtual desktop.
- public function globalToScreen(globalPoint:Point):Point
- {
- stub_method("flash.display.NativeWindow", "globalToScreen");
- return null;
- }
-
- // Returns a list of the NativeWindow objects that are owned by this window.
- [API("671")]
- public function listOwnedWindows():Vector.
- {
- stub_method("flash.display.NativeWindow", "listOwnedWindows");
- return new Vector.();
- }
-
- // Maximizes this window.
- public function maximize():void
- {
- stub_method("flash.display.NativeWindow", "maximize");
- }
-
- // Minimizes this window.
- public function minimize():void
- {
- stub_method("flash.display.NativeWindow", "minimize");
- }
-
- // Triggers a visual cue through the operating system that an event of interest has occurred.
- public function notifyUser(type:String):void
- {
- stub_method("flash.display.NativeWindow", "notifyUser");
- }
-
- // Sends this window directly behind the specified window.
- public function orderInBackOf(window:NativeWindow):Boolean
- {
- stub_method("flash.display.NativeWindow", "orderInBackOf");
- return false;
- }
-
- // Brings this window directly in front of the specified window.
- public function orderInFrontOf(window:NativeWindow):Boolean
- {
- stub_method("flash.display.NativeWindow", "orderInFrontOf");
- return false;
- }
-
- // Sends this window behind any other visible windows.
- public function orderToBack():Boolean
- {
- stub_method("flash.display.NativeWindow", "orderToBack");
- return false;
- }
-
- // Brings this window in front of any other visible windows.
- public function orderToFront():Boolean
- {
- stub_method("flash.display.NativeWindow", "orderToFront");
- return false;
- }
-
- // Restores this window from either a minimized or a maximized state.
- public function restore():void
- {
- stub_method("flash.display.NativeWindow", "restore");
- }
-
- // Starts a system-controlled move of this window.
- public function startMove():Boolean
- {
- stub_method("flash.display.NativeWindow", "startMove");
- return false;
- }
-
- // Starts a system-controlled resize operation of this window.
- public function startResize(edgeOrCorner:String = "BR"):Boolean
- {
- stub_method("flash.display.NativeWindow", "startResize");
- return false;
- }
-
- public function get active():Boolean
- {
- stub_getter("flash.display.NativeWindow", "active");
- return true;
- }
-
- public function get closed():Boolean
- {
- return this._closed;
- }
-
- public function get displayState():String
- {
- stub_getter("flash.display.NativeWindow", "displayState");
- return "normal";
- }
-
- [API("668")]
- public function get isSupported():Boolean
- {
- stub_getter("flash.display.NativeWindow", "isSupported");
- return false;
- }
-
- [API("671")]
- public function get owner():NativeWindow
- {
- stub_getter("flash.display.NativeWindow", "owner");
- return this;
- }
-
- [API("675")]
- public function get renderMode():String
- {
- stub_getter("flash.display.NativeWindow", "renderMode");
- return "auto";
- }
-
- public function get supportsMenu():Boolean
- {
- stub_getter("flash.display.NativeWindow", "supportsMenu");
- return false;
- }
-
- public function get supportsNotification():Boolean
- {
- stub_getter("flash.display.NativeWindow", "supportsNotification");
- return false;
- }
-
- public function get supportsTransparency():Boolean
- {
- stub_getter("flash.display.NativeWindow", "supportsTransparency");
- return false;
- }
- }
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ import flash.events.NativeWindowBoundsEvent;
+ import flash.events.Event;
+ import flash.events.EventDispatcher;
+ import flash.desktop.NativeApplication;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+ import __ruffle__.stub_constructor;
+
+ [API("661")]
+ public class NativeWindow extends EventDispatcher
+ {
+ public const systemMaxSize:Point = new Point(2880, 2880);
+ public const systemMinSize:Point = new Point(1, 1);
+ public var minSize:Point = systemMinSize;
+ public var maxSize:Point = systemMaxSize;
+ public var title:String;
+ public var alwaysInFront:Boolean = true;
+ public var visible:Boolean = true;
+
+ private var _bounds:Rectangle;
+ private var _maximizable:Boolean;
+ private var _minimizable:Boolean;
+ private var _resizable:Boolean;
+ private var _systemChrome:String;
+ private var _transparent:Boolean;
+ private var _type:String;
+ private var _closed:Boolean = false;
+ private var _stage:Stage;
+
+ public function NativeWindow(initOptions:NativeWindowInitOptions, _stage:Stage = null)
+ {
+ stub_constructor("flash.display.NativeWindow");
+ NativeApplication.nativeApplication.openedWindows.push(this);
+ if (_stage)
+ {
+ this._stage = _stage;
+ _stage.addEventListener(Event.RESIZE, function(e:Event):void
+ {
+ dispatchEvent(new NativeWindowBoundsEvent(NativeWindowBoundsEvent.RESIZE, false, false, _bounds, _bounds = new Rectangle(x, y, width, height)));
+ });
+ }
+
+ _maximizable = initOptions.maximizable;
+ _minimizable = initOptions.minimizable;
+ _resizable = initOptions.resizable;
+ _systemChrome = initOptions.systemChrome;
+ _transparent = initOptions.transparent;
+ _type = initOptions.type;
+ }
+
+ public function get width():Number
+ {
+ stub_getter("flash.display.NativeWindow", "width");
+ return _stage.stageWidth;
+ }
+
+ public function set width(value:Number):void
+ {
+ stub_setter("flash.display.NativeWindow", "width");
+ _stage.stageWidth = value;
+ }
+
+ public function get height():Number
+ {
+ stub_getter("flash.display.NativeWindow", "height");
+ return _stage.stageHeight;
+ }
+
+ public function set height(value:Number):void
+ {
+ stub_setter("flash.display.NativeWindow", "height");
+ _stage.stageHeight = value;
+ }
+
+ public function get x():Number
+ {
+ stub_getter("flash.display.NativeWindow", "x");
+ return _stage.x;
+ }
+
+ public function set x(value:Number):void
+ {
+ stub_setter("flash.display.NativeWindow", "x");
+ }
+
+ public function get y():Number
+ {
+ stub_getter("flash.display.NativeWindow", "y");
+ return _stage.y;
+ }
+
+ public function set y(value:Number):void
+ {
+ stub_setter("flash.display.NativeWindow", "y");
+ }
+
+ public function get bounds():Rectangle
+ {
+ stub_getter("flash.display.NativeWindow", "bounds");
+ return _bounds;
+ }
+
+ public function set bounds(value:Rectangle):void
+ {
+ stub_setter("flash.display.NativeWindow", "bounds");
+ _bounds = value;
+ }
+
+ public function get maximizable():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "maximizable");
+ return _maximizable;
+ }
+
+ public function get minimizable():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "minimizable");
+ return _minimizable;
+ }
+
+ public function get resizable():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "resizable");
+ return _resizable;
+ }
+
+ public function get systemChrome():String
+ {
+ stub_getter("flash.display.NativeWindow", "systemChrome");
+ return _systemChrome;
+ }
+
+ public function get transparent():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "transparent");
+ return _transparent;
+ }
+
+ public function get type():String
+ {
+ stub_getter("flash.display.NativeWindow", "type");
+ return _type;
+ }
+
+ public function get stage():Stage
+ {
+ return _stage;
+ }
+
+ // Activates this window.
+ public function activate():void
+ {
+ stub_method("flash.display.NativeWindow", "activate");
+ dispatchEvent(new Event(Event.ACTIVATE));
+ }
+
+ // Closes this window.
+ public function close():void
+ {
+ stub_method("flash.display.NativeWindow", "close");
+ if (dispatchEvent(new Event(Event.CLOSING, false, true)))
+ {
+ _closed = true;
+ dispatchEvent(new Event(Event.CLOSE));
+ dispatchEvent(new Event(Event.DEACTIVATE));
+ }
+
+ }
+
+ // Converts a point in pixel coordinates relative to the origin of the window stage (a global point in terms of the display list), to a point on the virtual desktop.
+ public function globalToScreen(globalPoint:Point):Point
+ {
+ stub_method("flash.display.NativeWindow", "globalToScreen");
+ return null;
+ }
+
+ // Returns a list of the NativeWindow objects that are owned by this window.
+ [API("671")]
+ public function listOwnedWindows():Vector.
+ {
+ stub_method("flash.display.NativeWindow", "listOwnedWindows");
+ return new Vector.();
+ }
+
+ // Maximizes this window.
+ public function maximize():void
+ {
+ stub_method("flash.display.NativeWindow", "maximize");
+ }
+
+ // Minimizes this window.
+ public function minimize():void
+ {
+ stub_method("flash.display.NativeWindow", "minimize");
+ }
+
+ // Triggers a visual cue through the operating system that an event of interest has occurred.
+ public function notifyUser(type:String):void
+ {
+ stub_method("flash.display.NativeWindow", "notifyUser");
+ }
+
+ // Sends this window directly behind the specified window.
+ public function orderInBackOf(window:NativeWindow):Boolean
+ {
+ stub_method("flash.display.NativeWindow", "orderInBackOf");
+ return false;
+ }
+
+ // Brings this window directly in front of the specified window.
+ public function orderInFrontOf(window:NativeWindow):Boolean
+ {
+ stub_method("flash.display.NativeWindow", "orderInFrontOf");
+ return false;
+ }
+
+ // Sends this window behind any other visible windows.
+ public function orderToBack():Boolean
+ {
+ stub_method("flash.display.NativeWindow", "orderToBack");
+ return false;
+ }
+
+ // Brings this window in front of any other visible windows.
+ public function orderToFront():Boolean
+ {
+ stub_method("flash.display.NativeWindow", "orderToFront");
+ return false;
+ }
+
+ // Restores this window from either a minimized or a maximized state.
+ public function restore():void
+ {
+ stub_method("flash.display.NativeWindow", "restore");
+ }
+
+ // Starts a system-controlled move of this window.
+ public function startMove():Boolean
+ {
+ stub_method("flash.display.NativeWindow", "startMove");
+ return false;
+ }
+
+ // Starts a system-controlled resize operation of this window.
+ public function startResize(edgeOrCorner:String = "BR"):Boolean
+ {
+ stub_method("flash.display.NativeWindow", "startResize");
+ return false;
+ }
+
+ public function get active():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "active");
+ return true;
+ }
+
+ public function get closed():Boolean
+ {
+ return this._closed;
+ }
+
+ public function get displayState():String
+ {
+ stub_getter("flash.display.NativeWindow", "displayState");
+ return "normal";
+ }
+
+ [API("668")]
+ public function get isSupported():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "isSupported");
+ return false;
+ }
+
+ [API("671")]
+ public function get owner():NativeWindow
+ {
+ stub_getter("flash.display.NativeWindow", "owner");
+ return this;
+ }
+
+ [API("675")]
+ public function get renderMode():String
+ {
+ stub_getter("flash.display.NativeWindow", "renderMode");
+ return "auto";
+ }
+
+ public function get supportsMenu():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "supportsMenu");
+ return false;
+ }
+
+ public function get supportsNotification():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "supportsNotification");
+ return false;
+ }
+
+ public function get supportsTransparency():Boolean
+ {
+ stub_getter("flash.display.NativeWindow", "supportsTransparency");
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as b/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as
index b405843c769b..41b7c0b87bbc 100644
--- a/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as
+++ b/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as
@@ -1,10 +1,10 @@
package flash.display
{
- [API("661")]
- public final class NativeWindowDisplayState
- {
- public static const MAXIMIZED:String = "maximized";
- public static const MINIMIZED:String = "minimized";
- public static const NORMAL:String = "normal";
- }
+ [API("661")]
+ public final class NativeWindowDisplayState
+ {
+ public static const MAXIMIZED:String = "maximized";
+ public static const MINIMIZED:String = "minimized";
+ public static const NORMAL:String = "normal";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as b/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as
index af546213eda7..461fd61d938d 100644
--- a/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as
+++ b/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as
@@ -5,46 +5,46 @@
package flash.display
{
- [API("661")]
- public class NativeWindowInitOptions
- {
+ [API("661")]
+ public class NativeWindowInitOptions
+ {
- // Specifies whether the window can be maximized by the user.
- public var maximizable:Boolean;
+ // Specifies whether the window can be maximized by the user.
+ public var maximizable:Boolean;
- // Specifies whether the window can be minimized by the user.
- public var minimizable:Boolean;
+ // Specifies whether the window can be minimized by the user.
+ public var minimizable:Boolean;
- // Specifies the NativeWindow object that should own any windows created with this NativeWindowInitOptions.
- [API("671")]
- public var owner:NativeWindow;
+ // Specifies the NativeWindow object that should own any windows created with this NativeWindowInitOptions.
+ [API("671")]
+ public var owner:NativeWindow;
- // Specifies the render mode of the NativeWindow object created with this NativeWindowInitOptions.
- [API("675")]
- public var renderMode:String;
+ // Specifies the render mode of the NativeWindow object created with this NativeWindowInitOptions.
+ [API("675")]
+ public var renderMode:String;
- // Specifies whether the window can be resized by the user.
- public var resizable:Boolean;
+ // Specifies whether the window can be resized by the user.
+ public var resizable:Boolean;
- // Specifies whether system chrome is provided for the window.
- public var systemChrome:String;
+ // Specifies whether system chrome is provided for the window.
+ public var systemChrome:String;
- // Specifies whether the window supports transparency and alpha blending against the desktop.
- public var transparent:Boolean;
+ // Specifies whether the window supports transparency and alpha blending against the desktop.
+ public var transparent:Boolean;
- // Specifies the type of the window to be created.
- public var type:String;
+ // Specifies the type of the window to be created.
+ public var type:String;
- public function NativeWindowInitOptions()
- {
- systemChrome = NativeWindowSystemChrome.STANDARD;
- type = NativeWindowType.NORMAL;
- transparent = false;
- owner = null;
- resizable = true;
- maximizable = true;
- minimizable = true;
- }
+ public function NativeWindowInitOptions()
+ {
+ systemChrome = NativeWindowSystemChrome.STANDARD;
+ type = NativeWindowType.NORMAL;
+ transparent = false;
+ owner = null;
+ resizable = true;
+ maximizable = true;
+ minimizable = true;
+ }
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as b/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as
index bb0f17322ccf..2d2922351119 100644
--- a/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as
+++ b/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as
@@ -1,10 +1,10 @@
package flash.display
{
- [API("661")]
- public final class NativeWindowSystemChrome
- {
- public static const ALTERNATE:String = "alternate";
- public static const NONE:String = "none";
- public static const STANDARD:String = "standard";
- }
+ [API("661")]
+ public final class NativeWindowSystemChrome
+ {
+ public static const ALTERNATE:String = "alternate";
+ public static const NONE:String = "none";
+ public static const STANDARD:String = "standard";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/NativeWindowType.as b/core/src/avm2/globals/flash/display/NativeWindowType.as
index d2345581bb05..d595cb93188e 100644
--- a/core/src/avm2/globals/flash/display/NativeWindowType.as
+++ b/core/src/avm2/globals/flash/display/NativeWindowType.as
@@ -1,10 +1,10 @@
package flash.display
{
- [API("661")]
- public final class NativeWindowType
- {
- public static const LIGHTWEIGHT:String = "lightweight";
- public static const NORMAL:String = "normal";
- public static const UTILITY:String = "utility";
- }
+ [API("661")]
+ public final class NativeWindowType
+ {
+ public static const LIGHTWEIGHT:String = "lightweight";
+ public static const NORMAL:String = "normal";
+ public static const UTILITY:String = "utility";
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/PNGEncoderOptions.as b/core/src/avm2/globals/flash/display/PNGEncoderOptions.as
index ecea95ffc179..aca268e3f522 100644
--- a/core/src/avm2/globals/flash/display/PNGEncoderOptions.as
+++ b/core/src/avm2/globals/flash/display/PNGEncoderOptions.as
@@ -1,10 +1,13 @@
-package flash.display {
- [API("680")]
- public final class PNGEncoderOptions {
- public var fastCompression:Boolean;
+package flash.display
+{
+ [API("680")]
+ public final class PNGEncoderOptions
+ {
+ public var fastCompression:Boolean;
- public function PNGEncoderOptions(fastCompression: Boolean = false) {
- this.fastCompression = fastCompression;
- }
- }
+ public function PNGEncoderOptions(fastCompression:Boolean = false)
+ {
+ this.fastCompression = fastCompression;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/PixelSnapping.as b/core/src/avm2/globals/flash/display/PixelSnapping.as
index 7997b2b7a0e2..ac195bae1642 100644
--- a/core/src/avm2/globals/flash/display/PixelSnapping.as
+++ b/core/src/avm2/globals/flash/display/PixelSnapping.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class PixelSnapping {
- public static const NEVER: String = "never";
- public static const ALWAYS: String = "always";
- public static const AUTO: String = "auto";
- }
+package flash.display
+{
+ public final class PixelSnapping
+ {
+ public static const NEVER:String = "never";
+ public static const ALWAYS:String = "always";
+ public static const AUTO:String = "auto";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/SWFVersion.as b/core/src/avm2/globals/flash/display/SWFVersion.as
index f0793e5e3963..ec89926e2a1c 100644
--- a/core/src/avm2/globals/flash/display/SWFVersion.as
+++ b/core/src/avm2/globals/flash/display/SWFVersion.as
@@ -1,16 +1,18 @@
-package flash.display {
- public final class SWFVersion {
- public static const FLASH1: uint = 1;
- public static const FLASH2: uint = 2;
- public static const FLASH3: uint = 3;
- public static const FLASH4: uint = 4;
- public static const FLASH5: uint = 5;
- public static const FLASH6: uint = 6;
- public static const FLASH7: uint = 7;
- public static const FLASH8: uint = 8;
- public static const FLASH9: uint = 9;
- public static const FLASH10: uint = 10;
- public static const FLASH11: uint = 11;
- public static const FLASH12: uint = 12;
- }
+package flash.display
+{
+ public final class SWFVersion
+ {
+ public static const FLASH1:uint = 1;
+ public static const FLASH2:uint = 2;
+ public static const FLASH3:uint = 3;
+ public static const FLASH4:uint = 4;
+ public static const FLASH5:uint = 5;
+ public static const FLASH6:uint = 6;
+ public static const FLASH7:uint = 7;
+ public static const FLASH8:uint = 8;
+ public static const FLASH9:uint = 9;
+ public static const FLASH10:uint = 10;
+ public static const FLASH11:uint = 11;
+ public static const FLASH12:uint = 12;
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Scene.as b/core/src/avm2/globals/flash/display/Scene.as
index 6d5bb470d718..7d83e711fa74 100644
--- a/core/src/avm2/globals/flash/display/Scene.as
+++ b/core/src/avm2/globals/flash/display/Scene.as
@@ -1,25 +1,31 @@
-package flash.display {
- public final class Scene {
- private var _name: String;
- private var _labels: Array;
- private var _numFrames: int;
+package flash.display
+{
+ public final class Scene
+ {
+ private var _name:String;
+ private var _labels:Array;
+ private var _numFrames:int;
- public function Scene(name: String, labels: Array, numFrames: int) {
- this._name = name;
- this._labels = labels;
- this._numFrames = numFrames;
- }
+ public function Scene(name:String, labels:Array, numFrames:int)
+ {
+ this._name = name;
+ this._labels = labels;
+ this._numFrames = numFrames;
+ }
- public function get name(): String {
- return this._name;
- }
+ public function get name():String
+ {
+ return this._name;
+ }
- public function get labels(): Array {
- return this._labels;
- }
+ public function get labels():Array
+ {
+ return this._labels;
+ }
- public function get numFrames(): int {
- return this._numFrames;
- }
- }
+ public function get numFrames():int
+ {
+ return this._numFrames;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Shader.as b/core/src/avm2/globals/flash/display/Shader.as
index 5d9a665eb9de..d11a6b2d4560 100644
--- a/core/src/avm2/globals/flash/display/Shader.as
+++ b/core/src/avm2/globals/flash/display/Shader.as
@@ -1,39 +1,47 @@
-package flash.display {
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
- import flash.utils.ByteArray;
-
- public class Shader {
- private var _data:ShaderData;
- private var _precisionHint:String = ShaderPrecision.FULL;
-
- public function Shader(bytecode:ByteArray = null) {
- if (bytecode) {
- this.byteCode = bytecode;
- }
- }
-
- public function set byteCode(code:ByteArray):void {
- this._data = new ShaderData(code);
- }
-
- public function get data():ShaderData {
- return this._data;
- }
-
- public function set data(value:ShaderData):void {
- this._data = value;
- }
-
- public function get precisionHint():String {
- stub_getter("flash.display.Shader", "precisionHint");
- return this._precisionHint;
- }
-
- public function set precisionHint(value:String):void {
- stub_setter("flash.display.Shader", "precisionHint");
- this._precisionHint = value;
- }
- }
+package flash.display
+{
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+ import flash.utils.ByteArray;
+
+ public class Shader
+ {
+ private var _data:ShaderData;
+ private var _precisionHint:String = ShaderPrecision.FULL;
+
+ public function Shader(bytecode:ByteArray = null)
+ {
+ if (bytecode)
+ {
+ this.byteCode = bytecode;
+ }
+ }
+
+ public function set byteCode(code:ByteArray):void
+ {
+ this._data = new ShaderData(code);
+ }
+
+ public function get data():ShaderData
+ {
+ return this._data;
+ }
+
+ public function set data(value:ShaderData):void
+ {
+ this._data = value;
+ }
+
+ public function get precisionHint():String
+ {
+ stub_getter("flash.display.Shader", "precisionHint");
+ return this._precisionHint;
+ }
+
+ public function set precisionHint(value:String):void
+ {
+ stub_setter("flash.display.Shader", "precisionHint");
+ this._precisionHint = value;
+ }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/display/ShaderData.as b/core/src/avm2/globals/flash/display/ShaderData.as
index ddf019f39f40..e279accab6b1 100644
--- a/core/src/avm2/globals/flash/display/ShaderData.as
+++ b/core/src/avm2/globals/flash/display/ShaderData.as
@@ -1,13 +1,15 @@
-package flash.display {
- import flash.utils.ByteArray;
-
- [Ruffle(InstanceAllocator)]
- public final dynamic class ShaderData {
- public function ShaderData(bytecode:ByteArray) {
- this.init(bytecode);
- }
+package flash.display
+{
+ import flash.utils.ByteArray;
- private native function init(bytecode:ByteArray);
- }
-}
+ [Ruffle(InstanceAllocator)]
+ public final dynamic class ShaderData
+ {
+ public function ShaderData(bytecode:ByteArray)
+ {
+ this.init(bytecode);
+ }
+ private native function init(bytecode:ByteArray);
+ }
+}
diff --git a/core/src/avm2/globals/flash/display/ShaderInput.as b/core/src/avm2/globals/flash/display/ShaderInput.as
index 57346ad9d3d8..bb12a92c7e3e 100644
--- a/core/src/avm2/globals/flash/display/ShaderInput.as
+++ b/core/src/avm2/globals/flash/display/ShaderInput.as
@@ -1,42 +1,52 @@
-package flash.display {
- public final dynamic class ShaderInput {
- internal var _channels: int;
- internal var _height: int;
- internal var _index: int;
- internal var _object: Object;
- internal var _width: int;
-
- public function get channels():int {
- return _channels;
- }
-
- public function get height():int {
- return _height;
- }
-
- public function set height(value:int):void {
- _height = value;
- }
-
- public function get index():int {
- return _index;
- }
-
- public function get width():int {
- return _width;
- }
-
- public function set width(value:int):void {
- _width = value;
- }
-
- public function get input():Object {
- return _object;
- }
-
- public function set input(value:Object):void {
- // FIXME - validate
- _object = value;
- }
- }
+package flash.display
+{
+ public final dynamic class ShaderInput
+ {
+ internal var _channels:int;
+ internal var _height:int;
+ internal var _index:int;
+ internal var _object:Object;
+ internal var _width:int;
+
+ public function get channels():int
+ {
+ return _channels;
+ }
+
+ public function get height():int
+ {
+ return _height;
+ }
+
+ public function set height(value:int):void
+ {
+ _height = value;
+ }
+
+ public function get index():int
+ {
+ return _index;
+ }
+
+ public function get width():int
+ {
+ return _width;
+ }
+
+ public function set width(value:int):void
+ {
+ _width = value;
+ }
+
+ public function get input():Object
+ {
+ return _object;
+ }
+
+ public function set input(value:Object):void
+ {
+ // FIXME - validate
+ _object = value;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/ShaderJob.as b/core/src/avm2/globals/flash/display/ShaderJob.as
index f66ca7c05094..b4873448f26b 100644
--- a/core/src/avm2/globals/flash/display/ShaderJob.as
+++ b/core/src/avm2/globals/flash/display/ShaderJob.as
@@ -1,65 +1,78 @@
-package flash.display {
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_constructor;
- import flash.events.EventDispatcher;
+package flash.display
+{
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_constructor;
+ import flash.events.EventDispatcher;
- public class ShaderJob extends EventDispatcher {
+ public class ShaderJob extends EventDispatcher
+ {
- private var _shader:Shader;
- private var _target:Object;
- private var _width:int;
- private var _height:int;
-
- public function ShaderJob(shader:Shader = null, target:Object = null, width:int = 0, height:int = 0) {
- this._shader = shader;
- this._target = target;
- this._width = width;
- this._height = height;
- stub_constructor("flash.display.ShaderJob");
- }
+ private var _shader:Shader;
+ private var _target:Object;
+ private var _width:int;
+ private var _height:int;
- public function cancel():void {
- stub_method("flash.display.ShaderJob", "cancel")
- }
+ public function ShaderJob(shader:Shader = null, target:Object = null, width:int = 0, height:int = 0)
+ {
+ this._shader = shader;
+ this._target = target;
+ this._width = width;
+ this._height = height;
+ stub_constructor("flash.display.ShaderJob");
+ }
- public native function start(waitForCompletion:Boolean = false):void;
+ public function cancel():void
+ {
+ stub_method("flash.display.ShaderJob", "cancel");
+ }
- public function get height():int {
- return this._height;
- }
+ public native function start(waitForCompletion:Boolean = false):void;
- public function set height(value:int):void {
- this._height = value;
- }
+ public function get height():int
+ {
+ return this._height;
+ }
- public function get width():int {
- return this._width;
- }
+ public function set height(value:int):void
+ {
+ this._height = value;
+ }
- public function set width(value:int):void {
- this._width = value;
- }
+ public function get width():int
+ {
+ return this._width;
+ }
- public function get progress():Number {
- stub_getter("flash.display.ShaderJob", "progress")
- return 0;
- }
+ public function set width(value:int):void
+ {
+ this._width = value;
+ }
- public function get shader():Shader {
- return this._shader;
- }
+ public function get progress():Number
+ {
+ stub_getter("flash.display.ShaderJob", "progress");
+ return 0;
+ }
- public function set shader(value:Shader):void {
- this._shader = value;
- }
+ public function get shader():Shader
+ {
+ return this._shader;
+ }
- public function get target():Object {
- return this._target;
- }
+ public function set shader(value:Shader):void
+ {
+ this._shader = value;
+ }
- public function set target(value:Object):void {
- this._target = value;
- }
- }
+ public function get target():Object
+ {
+ return this._target;
+ }
+
+ public function set target(value:Object):void
+ {
+ this._target = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/ShaderParameter.as b/core/src/avm2/globals/flash/display/ShaderParameter.as
index 720cd2cf3906..80201f5f3d42 100644
--- a/core/src/avm2/globals/flash/display/ShaderParameter.as
+++ b/core/src/avm2/globals/flash/display/ShaderParameter.as
@@ -1,22 +1,28 @@
-package flash.display {
- public final dynamic class ShaderParameter {
+package flash.display
+{
+ public final dynamic class ShaderParameter
+ {
- internal var _index:int;
- internal var _type:String;
- internal var _value:Array;
+ internal var _index:int;
+ internal var _type:String;
+ internal var _value:Array;
- public function get index():int {
- return this._index;
- }
- public function get type():String {
- return this._type;
- }
- public function get value():Array {
- return this._value.concat();
- }
- public function set value(value:Array):void {
- // FIXME - perform validation
- this._value = value.concat();
- }
- }
+ public function get index():int
+ {
+ return this._index;
+ }
+ public function get type():String
+ {
+ return this._type;
+ }
+ public function get value():Array
+ {
+ return this._value.concat();
+ }
+ public function set value(value:Array):void
+ {
+ // FIXME - perform validation
+ this._value = value.concat();
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/ShaderParameterType.as b/core/src/avm2/globals/flash/display/ShaderParameterType.as
index 37dec61174ba..89d6adf19d55 100644
--- a/core/src/avm2/globals/flash/display/ShaderParameterType.as
+++ b/core/src/avm2/globals/flash/display/ShaderParameterType.as
@@ -1,19 +1,21 @@
-package flash.display {
- public final class ShaderParameterType {
- public static const FLOAT: String = "float";
- public static const FLOAT2: String = "float2";
- public static const FLOAT3: String = "float3";
- public static const FLOAT4: String = "float4";
- public static const INT: String = "int";
- public static const INT2: String = "int2";
- public static const INT3: String = "int3";
- public static const INT4: String = "int4";
- public static const BOOL: String = "bool";
- public static const BOOL2: String = "bool2";
- public static const BOOL3: String = "bool3";
- public static const BOOL4: String = "bool4";
- public static const MATRIX2X2: String = "matrix2x2";
- public static const MATRIX3X3: String = "matrix3x3";
- public static const MATRIX4X4: String = "matrix4x4";
- }
+package flash.display
+{
+ public final class ShaderParameterType
+ {
+ public static const FLOAT:String = "float";
+ public static const FLOAT2:String = "float2";
+ public static const FLOAT3:String = "float3";
+ public static const FLOAT4:String = "float4";
+ public static const INT:String = "int";
+ public static const INT2:String = "int2";
+ public static const INT3:String = "int3";
+ public static const INT4:String = "int4";
+ public static const BOOL:String = "bool";
+ public static const BOOL2:String = "bool2";
+ public static const BOOL3:String = "bool3";
+ public static const BOOL4:String = "bool4";
+ public static const MATRIX2X2:String = "matrix2x2";
+ public static const MATRIX3X3:String = "matrix3x3";
+ public static const MATRIX4X4:String = "matrix4x4";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/ShaderPrecision.as b/core/src/avm2/globals/flash/display/ShaderPrecision.as
index 3dc3ee51452b..6d01dbbcd357 100644
--- a/core/src/avm2/globals/flash/display/ShaderPrecision.as
+++ b/core/src/avm2/globals/flash/display/ShaderPrecision.as
@@ -1,6 +1,8 @@
-package flash.display {
- public final class ShaderPrecision {
- public static const FULL: String = "full";
- public static const FAST: String = "fast";
- }
+package flash.display
+{
+ public final class ShaderPrecision
+ {
+ public static const FULL:String = "full";
+ public static const FAST:String = "fast";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Shape.as b/core/src/avm2/globals/flash/display/Shape.as
index 6f15320abaed..f70c69a634fc 100644
--- a/core/src/avm2/globals/flash/display/Shape.as
+++ b/core/src/avm2/globals/flash/display/Shape.as
@@ -1,9 +1,11 @@
-package flash.display {
+package flash.display
+{
- [Ruffle(InstanceAllocator)]
- public class Shape extends DisplayObject {
- public native function get graphics():Graphics;
+ [Ruffle(InstanceAllocator)]
+ public class Shape extends DisplayObject
+ {
+ public native function get graphics():Graphics;
- internal var _graphics:Graphics;
- }
+ internal var _graphics:Graphics;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/SimpleButton.as b/core/src/avm2/globals/flash/display/SimpleButton.as
index b3215655dcc9..bfc114468edd 100644
--- a/core/src/avm2/globals/flash/display/SimpleButton.as
+++ b/core/src/avm2/globals/flash/display/SimpleButton.as
@@ -1,41 +1,44 @@
-package flash.display {
- import flash.display.InteractiveObject;
- import flash.geom.Transform;
- import flash.geom.ColorTransform;
- import flash.geom.Matrix;
- import flash.display.DisplayObject;
- import flash.media.SoundTransform;
-
- [Ruffle(InstanceAllocator)]
- public class SimpleButton extends InteractiveObject {
- public function SimpleButton(upState:DisplayObject = null, overState:DisplayObject = null, downState:DisplayObject = null, hitTestState:DisplayObject = null) {
- this.init(upState, overState, downState, hitTestState)
- }
-
- private native function init(upState:DisplayObject, overState:DisplayObject, downState:DisplayObject, hitTestState:DisplayObject):void;
-
- public native function get downState():DisplayObject;
- public native function set downState(value:DisplayObject):void;
-
- public native function get enabled():Boolean;
- public native function set enabled(value:Boolean):void;
-
- public native function get hitTestState():DisplayObject;
- public native function set hitTestState(value:DisplayObject):void;
-
- public native function get overState():DisplayObject;
- public native function set overState(value:DisplayObject):void;
-
- public native function get trackAsMenu():Boolean;
- public native function set trackAsMenu(value:Boolean):void;
-
- public native function get upState():DisplayObject;
- public native function set upState(value:DisplayObject):void;
-
- public native function get useHandCursor():Boolean;
- public native function set useHandCursor(value:Boolean):void;
-
- public native function get soundTransform():SoundTransform;
- public native function set soundTransform(sndTransform:SoundTransform):void;
- }
+package flash.display
+{
+ import flash.display.InteractiveObject;
+ import flash.geom.Transform;
+ import flash.geom.ColorTransform;
+ import flash.geom.Matrix;
+ import flash.display.DisplayObject;
+ import flash.media.SoundTransform;
+
+ [Ruffle(InstanceAllocator)]
+ public class SimpleButton extends InteractiveObject
+ {
+ public function SimpleButton(upState:DisplayObject = null, overState:DisplayObject = null, downState:DisplayObject = null, hitTestState:DisplayObject = null)
+ {
+ this.init(upState, overState, downState, hitTestState);
+ }
+
+ private native function init(upState:DisplayObject, overState:DisplayObject, downState:DisplayObject, hitTestState:DisplayObject):void;
+
+ public native function get downState():DisplayObject;
+ public native function set downState(value:DisplayObject):void;
+
+ public native function get enabled():Boolean;
+ public native function set enabled(value:Boolean):void;
+
+ public native function get hitTestState():DisplayObject;
+ public native function set hitTestState(value:DisplayObject):void;
+
+ public native function get overState():DisplayObject;
+ public native function set overState(value:DisplayObject):void;
+
+ public native function get trackAsMenu():Boolean;
+ public native function set trackAsMenu(value:Boolean):void;
+
+ public native function get upState():DisplayObject;
+ public native function set upState(value:DisplayObject):void;
+
+ public native function get useHandCursor():Boolean;
+ public native function set useHandCursor(value:Boolean):void;
+
+ public native function get soundTransform():SoundTransform;
+ public native function set soundTransform(sndTransform:SoundTransform):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/SpreadMethod.as b/core/src/avm2/globals/flash/display/SpreadMethod.as
index eb42a46fd1df..df0fda8ca7a3 100644
--- a/core/src/avm2/globals/flash/display/SpreadMethod.as
+++ b/core/src/avm2/globals/flash/display/SpreadMethod.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class SpreadMethod {
- public static const PAD: String = "pad";
- public static const REFLECT: String = "reflect";
- public static const REPEAT: String = "repeat";
- }
+package flash.display
+{
+ public final class SpreadMethod
+ {
+ public static const PAD:String = "pad";
+ public static const REFLECT:String = "reflect";
+ public static const REPEAT:String = "repeat";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Sprite.as b/core/src/avm2/globals/flash/display/Sprite.as
index 66a2f999e2ce..924fdd8acf96 100644
--- a/core/src/avm2/globals/flash/display/Sprite.as
+++ b/core/src/avm2/globals/flash/display/Sprite.as
@@ -1,27 +1,29 @@
-package flash.display {
+package flash.display
+{
- import flash.display.Sprite;
- import flash.geom.Rectangle;
- import flash.media.SoundTransform;
+ import flash.display.Sprite;
+ import flash.geom.Rectangle;
+ import flash.media.SoundTransform;
- [Ruffle(InstanceAllocator)]
- public class Sprite extends DisplayObjectContainer {
+ [Ruffle(InstanceAllocator)]
+ public class Sprite extends DisplayObjectContainer
+ {
- internal var _graphics:Graphics;
-
- public native function get graphics():Graphics;
- public native function get dropTarget():DisplayObject;
- public native function get soundTransform():SoundTransform;
- public native function set soundTransform(sndTransform:SoundTransform):void;
- public native function get buttonMode():Boolean;
- public native function set buttonMode(buttonMode:Boolean):void;
- public native function get useHandCursor():Boolean;
- public native function set useHandCursor(useHandCursor:Boolean):void;
+ internal var _graphics:Graphics;
- public native function startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void;
- public native function stopDrag():void;
+ public native function get graphics():Graphics;
+ public native function get dropTarget():DisplayObject;
+ public native function get soundTransform():SoundTransform;
+ public native function set soundTransform(sndTransform:SoundTransform):void;
+ public native function get buttonMode():Boolean;
+ public native function set buttonMode(buttonMode:Boolean):void;
+ public native function get useHandCursor():Boolean;
+ public native function set useHandCursor(useHandCursor:Boolean):void;
- public native function get hitArea():Sprite;
- public native function set hitArea(hitArea:Sprite):void;
- }
+ public native function startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void;
+ public native function stopDrag():void;
+
+ public native function get hitArea():Sprite;
+ public native function set hitArea(hitArea:Sprite):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/Stage.as b/core/src/avm2/globals/flash/display/Stage.as
index a500b45e2685..2f2bccc53354 100644
--- a/core/src/avm2/globals/flash/display/Stage.as
+++ b/core/src/avm2/globals/flash/display/Stage.as
@@ -1,348 +1,411 @@
-package flash.display {
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
- import flash.accessibility.AccessibilityProperties;
- import flash.errors.IllegalOperationError;
- import flash.events.Event;
- import flash.geom.Rectangle;
- import flash.geom.Transform;
- import flash.text.TextSnapshot;
- import flash.ui.ContextMenu;
-
- [Ruffle(SuperInitializer)]
- public class Stage extends DisplayObjectContainer {
- private var _colorCorrection:String = ColorCorrection.DEFAULT;
- private var _mouseLock:Boolean = false;
- private var _nativeWindow:NativeWindow;
- private var _fullScreenSourceRect:Rectangle;
-
- public function Stage() {
- throw new Error("You cannot construct new instances of the Stage.");
- }
-
- override public function set accessibilityProperties(value:AccessibilityProperties):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function addChild(child:DisplayObject):DisplayObject {
- return super.addChild(child);
- }
-
- override public function addChildAt(child:DisplayObject, index:int):DisplayObject {
- return super.addChildAt(child, index);
- }
-
- override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void {
- super.addEventListener(type, listener, useCapture, priority, useWeakReference);
- }
-
- override public function set alpha(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set blendMode(value:String):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set cacheAsBitmap(value:Boolean):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set contextMenu(value:ContextMenu):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function dispatchEvent(event:Event):Boolean {
- return super.dispatchEvent(event);
- }
-
- override public function set filters(value:Array):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set focusRect(value:Object):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function hasEventListener(type:String):Boolean {
- return super.hasEventListener(type);
- }
-
- override public function get height():Number {
- return super.height;
- }
-
- override public function set height(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set mask(value:DisplayObject):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function get mouseChildren():Boolean {
- return super.mouseChildren;
- }
-
- override public function set mouseChildren(value:Boolean):void {
- super.mouseChildren = value;
- }
-
- override public function set mouseEnabled(value:Boolean):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function get name():String {
- return null;
- }
-
- override public function set name(value:String):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function get numChildren():int {
- return super.numChildren;
- }
-
- override public function set opaqueBackground(value:Object):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function removeChildAt(index:int):DisplayObject {
- return super.removeChildAt(index);
- }
-
- override public function set rotation(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set scale9Grid(value:Rectangle):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set scaleX(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set scaleY(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set scrollRect(value:Rectangle):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function setChildIndex(child:DisplayObject, index:int):void {
- super.setChildIndex(child, index);
- }
-
- override public function swapChildrenAt(index1:int, index2:int):void {
- super.swapChildrenAt(index1, index2);
- }
-
- override public function get tabChildren():Boolean {
- // stage.tabChildren is always true,
- // even if its setter was called with false
- return true;
- }
-
- override public native function set tabChildren(value:Boolean):void;
-
- override public function set tabEnabled(value:Boolean):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set tabIndex(value:int):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function get textSnapshot():TextSnapshot {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set transform(value: Transform):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set visible(value:Boolean):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function get width():Number {
- return super.width;
- }
-
- override public function set width(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function willTrigger(type:String):Boolean {
- return super.willTrigger(type);
- }
-
- override public function set x(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- override public function set y(value:Number):void {
- throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
- }
-
- // End of overrides
-
- public native function get align():String;
- public native function set align(value:String):void;
-
- [API("700")]
- public native function get browserZoomFactor():Number;
-
- [API("670")]
- public native function get color():uint;
- [API("670")]
- public native function set color(value:uint):void;
-
- [API("682")]
- public native function get contentsScaleFactor():Number;
-
- public native function get displayState():String;
- public native function set displayState(value:String):void;
-
- public native function get focus():InteractiveObject;
- public native function set focus(value:InteractiveObject):void;
-
- public native function get frameRate():Number;
- public native function set frameRate(value:Number):void;
-
- public native function get fullScreenHeight():uint;
-
- public function get fullScreenSourceRect():Rectangle {
- stub_getter("flash.display.Stage", "fullScreenSourceRect");
- return this._fullScreenSourceRect;
- }
-
- public function set fullScreenSourceRect(rect: Rectangle):void {
- stub_setter("flash.display.Stage", "fullScreenSourceRect");
- this._fullScreenSourceRect = rect;
- }
-
- public native function get fullScreenWidth():uint;
-
- public native function get scaleMode():String;
- public native function set scaleMode(value:String):void;
-
- public native function get showDefaultContextMenu():Boolean;
- public native function set showDefaultContextMenu(value:Boolean):void;
-
- public native function get stageWidth():int;
- public native function set stageWidth(value:int):void;
-
- public native function get stageHeight():int;
- public native function set stageHeight(value:int):void;
-
- public native function get stageFocusRect():Boolean;
- public native function set stageFocusRect(value:Boolean):void;
-
- [API("670")]
- public function get softKeyboardRect() : Rectangle {
- stub_getter("flash.display.Stage", "softKeyboardRect");
- // This is technically a valid implementation most of the time,
- // as 0x0 Rect is the expected value with no soft keyboard.
- return new Rectangle(0, 0, 0, 0);
- }
-
- [API("670")]
- public native function get allowsFullScreen():Boolean;
-
- [API("680")]
- public native function get allowsFullScreenInteractive():Boolean;
-
- public native function get quality():String;
- public native function set quality(value:String):void;
-
- [API("674")]
- public native function get stage3Ds():Vector.;
-
- public native function invalidate():void;
-
- public function get colorCorrection():String {
- return this._colorCorrection;
- }
- public function set colorCorrection(value:String):void {
- stub_setter("flash.display.Stage", "colorCorrection");
- if (value == null) throw new TypeError("Error #2007: Parameter colorCorrection must be non-null.", 2007);
- this._colorCorrection = value;
- }
-
- public function get colorCorrectionSupport():String {
- stub_getter("flash.display.Stage", "colorCorrectionSupport");
- return ColorCorrectionSupport.UNSUPPORTED;
- }
-
- [API("678")]
- public function get mouseLock():Boolean {
- stub_getter("flash.display.Stage", "mouseLock");
- return this._mouseLock;
- }
-
- [API("678")]
- public function set mouseLock(value:Boolean):void {
- stub_setter("flash.display.Stage", "mouseLock");
- this._mouseLock = value;
- }
-
- [API("668")]
- public static function get supportsOrientationChange():Boolean {
- stub_getter("flash.display.Stage", "supportsOrientationChange");
- return false;
- }
-
- [API("671")]
- public function get supportedOrientations():Vector. {
- stub_getter("flash.display.Stage", "supportedOrientations");
- return new Vector.();
- }
-
- [API("668")]
- public function get autoOrients():Boolean {
- stub_getter("flash.display.Stage", "autoOrients");
- return false;
- }
-
- [API("668")]
- public function set autoOrients(value:Boolean):void {
- stub_setter("flash.display.Stage", "autoOrients");
- }
-
- [API("668")]
- public function get orientation():String {
- stub_getter("flash.display.Stage", "orientation");
- return StageOrientation.UNKNOWN;
- }
-
- [API("668")]
- public function get deviceOrientation():String {
- stub_getter("flash.display.Stage", "deviceOrientation");
- return StageOrientation.UNKNOWN;
- }
-
- [API("668")]
- public function setOrientation(newOrientation:String):void {
- stub_method("flash.display.Stage", "setOrientation");
- }
-
- [API("668")]
- public function setAspectRatio(newAspectRatio:String):void {
- stub_method("flash.display.Stage", "setAspectRatio");
- }
-
- [API("661")]
- public function get nativeWindow():NativeWindow {
- stub_getter("flash.display.Stage", "nativeWindow");
- if (!this._nativeWindow) {
- this._nativeWindow = new NativeWindow(new NativeWindowInitOptions(), this);
- }
- return this._nativeWindow;
- }
- }
+package flash.display
+{
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+ import flash.accessibility.AccessibilityProperties;
+ import flash.errors.IllegalOperationError;
+ import flash.events.Event;
+ import flash.geom.Rectangle;
+ import flash.geom.Transform;
+ import flash.text.TextSnapshot;
+ import flash.ui.ContextMenu;
+
+ [Ruffle(SuperInitializer)]
+ public class Stage extends DisplayObjectContainer
+ {
+ private var _colorCorrection:String = ColorCorrection.DEFAULT;
+ private var _mouseLock:Boolean = false;
+ private var _nativeWindow:NativeWindow;
+ private var _fullScreenSourceRect:Rectangle;
+
+ public function Stage()
+ {
+ throw new Error("You cannot construct new instances of the Stage.");
+ }
+
+ override public function set accessibilityProperties(value:AccessibilityProperties):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function addChild(child:DisplayObject):DisplayObject
+ {
+ return super.addChild(child);
+ }
+
+ override public function addChildAt(child:DisplayObject, index:int):DisplayObject
+ {
+ return super.addChildAt(child, index);
+ }
+
+ override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
+ {
+ super.addEventListener(type, listener, useCapture, priority, useWeakReference);
+ }
+
+ override public function set alpha(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set blendMode(value:String):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set cacheAsBitmap(value:Boolean):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set contextMenu(value:ContextMenu):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function dispatchEvent(event:Event):Boolean
+ {
+ return super.dispatchEvent(event);
+ }
+
+ override public function set filters(value:Array):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set focusRect(value:Object):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function hasEventListener(type:String):Boolean
+ {
+ return super.hasEventListener(type);
+ }
+
+ override public function get height():Number
+ {
+ return super.height;
+ }
+
+ override public function set height(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set mask(value:DisplayObject):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function get mouseChildren():Boolean
+ {
+ return super.mouseChildren;
+ }
+
+ override public function set mouseChildren(value:Boolean):void
+ {
+ super.mouseChildren = value;
+ }
+
+ override public function set mouseEnabled(value:Boolean):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function get name():String
+ {
+ return null;
+ }
+
+ override public function set name(value:String):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function get numChildren():int
+ {
+ return super.numChildren;
+ }
+
+ override public function set opaqueBackground(value:Object):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function removeChildAt(index:int):DisplayObject
+ {
+ return super.removeChildAt(index);
+ }
+
+ override public function set rotation(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set scale9Grid(value:Rectangle):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set scaleX(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set scaleY(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set scrollRect(value:Rectangle):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function setChildIndex(child:DisplayObject, index:int):void
+ {
+ super.setChildIndex(child, index);
+ }
+
+ override public function swapChildrenAt(index1:int, index2:int):void
+ {
+ super.swapChildrenAt(index1, index2);
+ }
+
+ override public function get tabChildren():Boolean
+ {
+ // stage.tabChildren is always true,
+ // even if its setter was called with false
+ return true;
+ }
+
+ override public native function set tabChildren(value:Boolean):void;
+
+ override public function set tabEnabled(value:Boolean):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set tabIndex(value:int):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function get textSnapshot():TextSnapshot
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set transform(value:Transform):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set visible(value:Boolean):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function get width():Number
+ {
+ return super.width;
+ }
+
+ override public function set width(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function willTrigger(type:String):Boolean
+ {
+ return super.willTrigger(type);
+ }
+
+ override public function set x(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ override public function set y(value:Number):void
+ {
+ throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071);
+ }
+
+ // End of overrides
+
+ public native function get align():String;
+ public native function set align(value:String):void;
+
+ [API("700")]
+ public native function get browserZoomFactor():Number;
+
+ [API("670")]
+ public native function get color():uint;
+ [API("670")]
+ public native function set color(value:uint):void;
+
+ [API("682")]
+ public native function get contentsScaleFactor():Number;
+
+ public native function get displayState():String;
+ public native function set displayState(value:String):void;
+
+ public native function get focus():InteractiveObject;
+ public native function set focus(value:InteractiveObject):void;
+
+ public native function get frameRate():Number;
+ public native function set frameRate(value:Number):void;
+
+ public native function get fullScreenHeight():uint;
+
+ public function get fullScreenSourceRect():Rectangle
+ {
+ stub_getter("flash.display.Stage", "fullScreenSourceRect");
+ return this._fullScreenSourceRect;
+ }
+
+ public function set fullScreenSourceRect(rect:Rectangle):void
+ {
+ stub_setter("flash.display.Stage", "fullScreenSourceRect");
+ this._fullScreenSourceRect = rect;
+ }
+
+ public native function get fullScreenWidth():uint;
+
+ public native function get scaleMode():String;
+ public native function set scaleMode(value:String):void;
+
+ public native function get showDefaultContextMenu():Boolean;
+ public native function set showDefaultContextMenu(value:Boolean):void;
+
+ public native function get stageWidth():int;
+ public native function set stageWidth(value:int):void;
+
+ public native function get stageHeight():int;
+ public native function set stageHeight(value:int):void;
+
+ public native function get stageFocusRect():Boolean;
+ public native function set stageFocusRect(value:Boolean):void;
+
+ [API("670")]
+ public function get softKeyboardRect():Rectangle
+ {
+ stub_getter("flash.display.Stage", "softKeyboardRect");
+ // This is technically a valid implementation most of the time,
+ // as 0x0 Rect is the expected value with no soft keyboard.
+ return new Rectangle(0, 0, 0, 0);
+ }
+
+ [API("670")]
+ public native function get allowsFullScreen():Boolean;
+
+ [API("680")]
+ public native function get allowsFullScreenInteractive():Boolean;
+
+ public native function get quality():String;
+ public native function set quality(value:String):void;
+
+ [API("674")]
+ public native function get stage3Ds():Vector.;
+
+ public native function invalidate():void;
+
+ public function get colorCorrection():String
+ {
+ return this._colorCorrection;
+ }
+ public function set colorCorrection(value:String):void
+ {
+ stub_setter("flash.display.Stage", "colorCorrection");
+ if (value == null)
+ throw new TypeError("Error #2007: Parameter colorCorrection must be non-null.", 2007);
+ this._colorCorrection = value;
+ }
+
+ public function get colorCorrectionSupport():String
+ {
+ stub_getter("flash.display.Stage", "colorCorrectionSupport");
+ return ColorCorrectionSupport.UNSUPPORTED;
+ }
+
+ [API("678")]
+ public function get mouseLock():Boolean
+ {
+ stub_getter("flash.display.Stage", "mouseLock");
+ return this._mouseLock;
+ }
+
+ [API("678")]
+ public function set mouseLock(value:Boolean):void
+ {
+ stub_setter("flash.display.Stage", "mouseLock");
+ this._mouseLock = value;
+ }
+
+ [API("668")]
+ public static function get supportsOrientationChange():Boolean
+ {
+ stub_getter("flash.display.Stage", "supportsOrientationChange");
+ return false;
+ }
+
+ [API("671")]
+ public function get supportedOrientations():Vector.
+ {
+ stub_getter("flash.display.Stage", "supportedOrientations");
+ return new Vector.();
+ }
+
+ [API("668")]
+ public function get autoOrients():Boolean
+ {
+ stub_getter("flash.display.Stage", "autoOrients");
+ return false;
+ }
+
+ [API("668")]
+ public function set autoOrients(value:Boolean):void
+ {
+ stub_setter("flash.display.Stage", "autoOrients");
+ }
+
+ [API("668")]
+ public function get orientation():String
+ {
+ stub_getter("flash.display.Stage", "orientation");
+ return StageOrientation.UNKNOWN;
+ }
+
+ [API("668")]
+ public function get deviceOrientation():String
+ {
+ stub_getter("flash.display.Stage", "deviceOrientation");
+ return StageOrientation.UNKNOWN;
+ }
+
+ [API("668")]
+ public function setOrientation(newOrientation:String):void
+ {
+ stub_method("flash.display.Stage", "setOrientation");
+ }
+
+ [API("668")]
+ public function setAspectRatio(newAspectRatio:String):void
+ {
+ stub_method("flash.display.Stage", "setAspectRatio");
+ }
+
+ [API("661")]
+ public function get nativeWindow():NativeWindow
+ {
+ stub_getter("flash.display.Stage", "nativeWindow");
+ if (!this._nativeWindow)
+ {
+ this._nativeWindow = new NativeWindow(new NativeWindowInitOptions(), this);
+ }
+ return this._nativeWindow;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/display/Stage3D.as b/core/src/avm2/globals/flash/display/Stage3D.as
index fbf5f4fe5b76..20a4133f4da7 100644
--- a/core/src/avm2/globals/flash/display/Stage3D.as
+++ b/core/src/avm2/globals/flash/display/Stage3D.as
@@ -1,56 +1,66 @@
-package flash.display {
- import flash.events.ErrorEvent;
- import flash.events.EventDispatcher;
- import flash.display3D.Context3D;
- import flash.display3D.Context3DProfile;
- import flash.utils.setTimeout;
- import __ruffle__.stub_method;
+package flash.display
+{
+ import flash.events.ErrorEvent;
+ import flash.events.EventDispatcher;
+ import flash.display3D.Context3D;
+ import flash.display3D.Context3DProfile;
+ import flash.utils.setTimeout;
+ import __ruffle__.stub_method;
- [Ruffle(InstanceAllocator)]
- [API("674")]
- public class Stage3D extends EventDispatcher {
+ [Ruffle(InstanceAllocator)]
+ [API("674")]
+ public class Stage3D extends EventDispatcher
+ {
- public native function get context3D():Context3D;
- private native function requestContext3D_internal(context3DRenderMode:String, profiles:Vector.):void;
+ public native function get context3D():Context3D;
+ private native function requestContext3D_internal(context3DRenderMode:String, profiles:Vector.):void;
- public function requestContext3D(context3DRenderMode:String = "auto", profile:String = "baseline"):void {
- // Several SWFS (the examples from the Context3D documentation, and the Starling framework)
- // rely on the `context3DCreate` being fired asynchronously - they initialize variables
- // after the call to `requestContext3D`, and then use those variables in the event handler.
- // Currently, we create a `Context3D` synchronously, so we need to delay the event dispatch
- var stage3d = this;
- this.checkProfile(profile);
- setTimeout(function() {
- stage3d.requestContext3D_internal(context3DRenderMode, Vector.([profile]));
- }, 0);
- }
+ public function requestContext3D(context3DRenderMode:String = "auto", profile:String = "baseline"):void
+ {
+ // Several SWFS (the examples from the Context3D documentation, and the Starling framework)
+ // rely on the `context3DCreate` being fired asynchronously - they initialize variables
+ // after the call to `requestContext3D`, and then use those variables in the event handler.
+ // Currently, we create a `Context3D` synchronously, so we need to delay the event dispatch
+ var stage3d = this;
+ this.checkProfile(profile);
+ setTimeout(function()
+ {
+ stage3d.requestContext3D_internal(context3DRenderMode, Vector.([profile]));
+ }, 0);
+ }
- [API("692")]
- public function requestContext3DMatchingProfiles(profiles:Vector.):void {
- var stage3d = this;
- var profiles = profiles.concat();
- if (profiles.length == 0) {
- throw new ArgumentError("Error #2008: Parameter profiles must be one of the accepted values.", 2008);
- }
- for each (var profile in profiles) {
- this.checkProfile(profile);
- }
- setTimeout(function() {
- stage3d.requestContext3D_internal("auto", profiles);
- }, 0);
- }
+ [API("692")]
+ public function requestContext3DMatchingProfiles(profiles:Vector.):void
+ {
+ var stage3d = this;
+ var profiles = profiles.concat();
+ if (profiles.length == 0)
+ {
+ throw new ArgumentError("Error #2008: Parameter profiles must be one of the accepted values.", 2008);
+ }
+ for each (var profile in profiles)
+ {
+ this.checkProfile(profile);
+ }
+ setTimeout(function()
+ {
+ stage3d.requestContext3D_internal("auto", profiles);
+ }, 0);
+ }
- private function checkProfile(profile:String):Boolean {
- if ([Context3DProfile.BASELINE, Context3DProfile.BASELINE_CONSTRAINED, Context3DProfile.BASELINE_EXTENDED, Context3DProfile.STANDARD, Context3DProfile.STANDARD_CONSTRAINED, Context3DProfile.STANDARD_EXTENDED].indexOf(profile) == -1) {
- throw new ArgumentError("Error #2008: Parameter profile must be one of the accepted values.", 2008);
- }
- }
+ private function checkProfile(profile:String):Boolean
+ {
+ if ([Context3DProfile.BASELINE, Context3DProfile.BASELINE_CONSTRAINED, Context3DProfile.BASELINE_EXTENDED, Context3DProfile.STANDARD, Context3DProfile.STANDARD_CONSTRAINED, Context3DProfile.STANDARD_EXTENDED].indexOf(profile) == -1)
+ {
+ throw new ArgumentError("Error #2008: Parameter profile must be one of the accepted values.", 2008);
+ }
+ }
- // FIXME - actually implement this
- public var x:Number;
- public var y:Number;
+ // FIXME - actually implement this
+ public var x:Number;
+ public var y:Number;
- public native function get visible():Boolean;
- public native function set visible(value:Boolean):void;
- }
+ public native function get visible():Boolean;
+ public native function set visible(value:Boolean):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display/StageAlign.as b/core/src/avm2/globals/flash/display/StageAlign.as
index b4285132f966..ec2aa65b2fe4 100644
--- a/core/src/avm2/globals/flash/display/StageAlign.as
+++ b/core/src/avm2/globals/flash/display/StageAlign.as
@@ -1,12 +1,14 @@
-package flash.display {
- public final class StageAlign {
- public static const TOP: String = "T";
- public static const LEFT: String = "L";
- public static const BOTTOM: String = "B";
- public static const RIGHT: String = "R";
- public static const TOP_LEFT: String = "TL";
- public static const TOP_RIGHT: String = "TR";
- public static const BOTTOM_LEFT: String = "BL";
- public static const BOTTOM_RIGHT: String = "BR";
- }
+package flash.display
+{
+ public final class StageAlign
+ {
+ public static const TOP:String = "T";
+ public static const LEFT:String = "L";
+ public static const BOTTOM:String = "B";
+ public static const RIGHT:String = "R";
+ public static const TOP_LEFT:String = "TL";
+ public static const TOP_RIGHT:String = "TR";
+ public static const BOTTOM_LEFT:String = "BL";
+ public static const BOTTOM_RIGHT:String = "BR";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/StageAspectRatio.as b/core/src/avm2/globals/flash/display/StageAspectRatio.as
index d4c61ef1c12c..86adf6212548 100644
--- a/core/src/avm2/globals/flash/display/StageAspectRatio.as
+++ b/core/src/avm2/globals/flash/display/StageAspectRatio.as
@@ -1,11 +1,11 @@
package flash.display
{
- [API("668")]
- public final class StageAspectRatio
- {
- [API("681")]
- public static const ANY:String = "any";
- public static const LANDSCAPE:String = "landscape";
- public static const PORTRAIT:String = "portrait";
- }
+ [API("668")]
+ public final class StageAspectRatio
+ {
+ [API("681")]
+ public static const ANY:String = "any";
+ public static const LANDSCAPE:String = "landscape";
+ public static const PORTRAIT:String = "portrait";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/StageDisplayState.as b/core/src/avm2/globals/flash/display/StageDisplayState.as
index 69ac1ceb08a6..70821aa1d8ac 100644
--- a/core/src/avm2/globals/flash/display/StageDisplayState.as
+++ b/core/src/avm2/globals/flash/display/StageDisplayState.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class StageDisplayState {
- public static const FULL_SCREEN: String = "fullScreen";
- public static const FULL_SCREEN_INTERACTIVE: String = "fullScreenInteractive";
- public static const NORMAL: String = "normal";
- }
+package flash.display
+{
+ public final class StageDisplayState
+ {
+ public static const FULL_SCREEN:String = "fullScreen";
+ public static const FULL_SCREEN_INTERACTIVE:String = "fullScreenInteractive";
+ public static const NORMAL:String = "normal";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/StageOrientation.as b/core/src/avm2/globals/flash/display/StageOrientation.as
index 730759b938db..5905385bbfae 100644
--- a/core/src/avm2/globals/flash/display/StageOrientation.as
+++ b/core/src/avm2/globals/flash/display/StageOrientation.as
@@ -1,12 +1,12 @@
package flash.display
{
- [API("668")]
- public final class StageOrientation
- {
- public static const DEFAULT:String = "default";
- public static const ROTATED_LEFT:String = "rotatedLeft";
- public static const ROTATED_RIGHT:String = "rotatedRight";
- public static const UNKNOWN:String = "unknown";
- public static const UPSIDE_DOWN:String = "upsideDown";
- }
+ [API("668")]
+ public final class StageOrientation
+ {
+ public static const DEFAULT:String = "default";
+ public static const ROTATED_LEFT:String = "rotatedLeft";
+ public static const ROTATED_RIGHT:String = "rotatedRight";
+ public static const UNKNOWN:String = "unknown";
+ public static const UPSIDE_DOWN:String = "upsideDown";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/StageQuality.as b/core/src/avm2/globals/flash/display/StageQuality.as
index 3e4057e1e686..05781b5faedb 100644
--- a/core/src/avm2/globals/flash/display/StageQuality.as
+++ b/core/src/avm2/globals/flash/display/StageQuality.as
@@ -1,12 +1,14 @@
-package flash.display {
- public final class StageQuality {
- public static const LOW: String = "low";
- public static const MEDIUM: String = "medium";
- public static const HIGH: String = "high";
- public static const BEST: String = "best";
- public static const HIGH_8X8: String = "8x8";
- public static const HIGH_8X8_LINEAR: String = "8x8linear";
- public static const HIGH_16X16: String = "16x16";
- public static const HIGH_16X16_LINEAR: String = "16x16linear";
- }
+package flash.display
+{
+ public final class StageQuality
+ {
+ public static const LOW:String = "low";
+ public static const MEDIUM:String = "medium";
+ public static const HIGH:String = "high";
+ public static const BEST:String = "best";
+ public static const HIGH_8X8:String = "8x8";
+ public static const HIGH_8X8_LINEAR:String = "8x8linear";
+ public static const HIGH_16X16:String = "16x16";
+ public static const HIGH_16X16_LINEAR:String = "16x16linear";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/StageScaleMode.as b/core/src/avm2/globals/flash/display/StageScaleMode.as
index 2b338e77d421..1a549f353417 100644
--- a/core/src/avm2/globals/flash/display/StageScaleMode.as
+++ b/core/src/avm2/globals/flash/display/StageScaleMode.as
@@ -1,8 +1,10 @@
-package flash.display {
- public final class StageScaleMode {
- public static const SHOW_ALL: String = "showAll";
- public static const EXACT_FIT: String = "exactFit";
- public static const NO_BORDER: String = "noBorder";
- public static const NO_SCALE: String = "noScale";
- }
+package flash.display
+{
+ public final class StageScaleMode
+ {
+ public static const SHOW_ALL:String = "showAll";
+ public static const EXACT_FIT:String = "exactFit";
+ public static const NO_BORDER:String = "noBorder";
+ public static const NO_SCALE:String = "noScale";
+ }
}
diff --git a/core/src/avm2/globals/flash/display/TriangleCulling.as b/core/src/avm2/globals/flash/display/TriangleCulling.as
index 932a427410d3..ece15e839f14 100644
--- a/core/src/avm2/globals/flash/display/TriangleCulling.as
+++ b/core/src/avm2/globals/flash/display/TriangleCulling.as
@@ -1,7 +1,9 @@
-package flash.display {
- public final class TriangleCulling {
- public static const NONE: String = "none";
- public static const POSITIVE: String = "positive";
- public static const NEGATIVE: String = "negative";
- }
+package flash.display
+{
+ public final class TriangleCulling
+ {
+ public static const NONE:String = "none";
+ public static const POSITIVE:String = "positive";
+ public static const NEGATIVE:String = "negative";
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3D.as b/core/src/avm2/globals/flash/display3D/Context3D.as
index 2c21072e8c15..410fb277d7d9 100644
--- a/core/src/avm2/globals/flash/display3D/Context3D.as
+++ b/core/src/avm2/globals/flash/display3D/Context3D.as
@@ -1,85 +1,92 @@
-package flash.display3D {
- import flash.events.EventDispatcher;
- import flash.geom.Matrix3D;
- import flash.geom.Rectangle;
- import flash.display3D.textures.CubeTexture;
- import flash.display3D.textures.TextureBase;
- import flash.display3D.textures.RectangleTexture;
- import flash.display3D.textures.Texture;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
-
- [API("674")]
- public final class Context3D extends EventDispatcher {
- public native function clear(red:Number = 0.0, green:Number = 0.0, blue:Number = 0.0, alpha:Number = 1.0, depth:Number = 1.0, stencil:uint = 0, mask:uint = 0xffffffff):void;
-
- public native function createIndexBuffer(numIndices:int, bufferUsage:String = "staticDraw"):IndexBuffer3D;
- public native function createVertexBuffer(numVertices:int, data32PerVertex:int, bufferUsage:String = "staticDraw"):VertexBuffer3D;
- public native function configureBackBuffer(
- width:int, height:int, antiAlias:int, enableDepthAndStencil:Boolean = true, wantsBestResolution:Boolean = false, wantsBestResolutionOnBrowserZoom:Boolean = false
- ):void;
- public native function setVertexBufferAt(index:int, buffer:VertexBuffer3D, bufferOffset:int = 0, format:String = "float4"):void;
- public native function createProgram():Program3D;
- public native function setProgram(program:Program3D):void;
- public native function drawTriangles(indexBuffer:IndexBuffer3D, firstIndex:int = 0, numTriangles:int = -1):void;
- public native function present():void;
- public native function setCulling(triangleFaceToCull:String):void;
- public native function createTexture(width:int, height:int, format:String, optimizeForRenderToTexture:Boolean, streamingLevels:int = 0):Texture;
- public native function createCubeTexture(size:int, format:String, optimizeForRenderToTexture:Boolean, streamingLevels:int = 0):CubeTexture;
- public native function createRectangleTexture(width:int, height:int, format:String, optimizeForRenderToTexture:Boolean):RectangleTexture;
-
- public function get driverInfo():String {
- stub_getter("flash.display3D.Context3D", "driverInfo");
- return "Dummy Ruffle driver";
- }
-
- public var enableErrorChecking:Boolean = true;
-
- public native function setProgramConstantsFromMatrix(programType:String, firstRegister:int, matrix:Matrix3D, transposedMatrix:Boolean = false):void;
- public native function setProgramConstantsFromVector(programType:String, firstRegister:int, data:Vector., numRegisters:int = -1):void;
-
- public native function setColorMask(red:Boolean, green:Boolean, blue:Boolean, alpha:Boolean):void;
-
- public native function setDepthTest(depthMask:Boolean, passCompareMode:String):void;
- public native function setScissorRectangle(rectangle:Rectangle):void;
-
- public native function setRenderToBackBuffer():void;
- public native function setBlendFactors(sourceFactor:String, destinationFactor:String):void;
-
- public native function setTextureAt(sampler:int, texture:TextureBase):void;
-
- public native function get profile():String;
-
- [API("700")]
- public function get maxBackBufferWidth():int {
- stub_getter("flash.display3D.Context3D", "maxBackBufferWidth");
- return 2048;
- }
-
- [API("700")]
- public function get maxBackBufferHeight():int {
- stub_getter("flash.display3D.Context3D", "maxBackBufferHeight");
- return 2048;
- }
-
- public function setStencilReferenceValue(referenceValue:uint, readMask:uint = 255, writeMask:uint = 255):void {
- stub_method("flash.display3D.Context3D", "setStencilReferenceValue");
- }
-
- public native function setSamplerStateAt(sampler:int, wrap:String, filter:String, mipfilter:String):void;
-
- public native function setRenderToTexture(texture:TextureBase, enableDepthAndStencil:Boolean = false, antiAlias:int = 0, surfaceSelector:int = 0, colorOutputIndex:int = 0):void;
-
- public function setStencilActions(
- triangleFace:String = "frontAndBack",
- compareMode:String = "always",
- actionOnBothPass:String = "keep",
- actionOnDepthFail:String = "keep",
- actionOnDepthPassStencilFail:String = "keep"
- ):void {
- stub_method("flash.display3D.Context3D", "setStencilActions");
- }
-
- public native function dispose(recreate:Boolean = true):void;
- }
+package flash.display3D
+{
+ import flash.events.EventDispatcher;
+ import flash.geom.Matrix3D;
+ import flash.geom.Rectangle;
+ import flash.display3D.textures.CubeTexture;
+ import flash.display3D.textures.TextureBase;
+ import flash.display3D.textures.RectangleTexture;
+ import flash.display3D.textures.Texture;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+
+ [API("674")]
+ public final class Context3D extends EventDispatcher
+ {
+ public native function clear(red:Number = 0.0, green:Number = 0.0, blue:Number = 0.0, alpha:Number = 1.0, depth:Number = 1.0, stencil:uint = 0, mask:uint = 0xffffffff):void;
+
+ public native function createIndexBuffer(numIndices:int, bufferUsage:String = "staticDraw"):IndexBuffer3D;
+ public native function createVertexBuffer(numVertices:int, data32PerVertex:int, bufferUsage:String = "staticDraw"):VertexBuffer3D;
+ public native function configureBackBuffer(
+ width:int, height:int, antiAlias:int, enableDepthAndStencil:Boolean = true, wantsBestResolution:Boolean = false, wantsBestResolutionOnBrowserZoom:Boolean = false
+ ):void;
+ public native function setVertexBufferAt(index:int, buffer:VertexBuffer3D, bufferOffset:int = 0, format:String = "float4"):void;
+ public native function createProgram():Program3D;
+ public native function setProgram(program:Program3D):void;
+ public native function drawTriangles(indexBuffer:IndexBuffer3D, firstIndex:int = 0, numTriangles:int = -1):void;
+ public native function present():void;
+ public native function setCulling(triangleFaceToCull:String):void;
+ public native function createTexture(width:int, height:int, format:String, optimizeForRenderToTexture:Boolean, streamingLevels:int = 0):Texture;
+ public native function createCubeTexture(size:int, format:String, optimizeForRenderToTexture:Boolean, streamingLevels:int = 0):CubeTexture;
+ public native function createRectangleTexture(width:int, height:int, format:String, optimizeForRenderToTexture:Boolean):RectangleTexture;
+
+ public function get driverInfo():String
+ {
+ stub_getter("flash.display3D.Context3D", "driverInfo");
+ return "Dummy Ruffle driver";
+ }
+
+ public var enableErrorChecking:Boolean = true;
+
+ public native function setProgramConstantsFromMatrix(programType:String, firstRegister:int, matrix:Matrix3D, transposedMatrix:Boolean = false):void;
+ public native function setProgramConstantsFromVector(programType:String, firstRegister:int, data:Vector., numRegisters:int = -1):void;
+
+ public native function setColorMask(red:Boolean, green:Boolean, blue:Boolean, alpha:Boolean):void;
+
+ public native function setDepthTest(depthMask:Boolean, passCompareMode:String):void;
+ public native function setScissorRectangle(rectangle:Rectangle):void;
+
+ public native function setRenderToBackBuffer():void;
+ public native function setBlendFactors(sourceFactor:String, destinationFactor:String):void;
+
+ public native function setTextureAt(sampler:int, texture:TextureBase):void;
+
+ public native function get profile():String;
+
+ [API("700")]
+ public function get maxBackBufferWidth():int
+ {
+ stub_getter("flash.display3D.Context3D", "maxBackBufferWidth");
+ return 2048;
+ }
+
+ [API("700")]
+ public function get maxBackBufferHeight():int
+ {
+ stub_getter("flash.display3D.Context3D", "maxBackBufferHeight");
+ return 2048;
+ }
+
+ public function setStencilReferenceValue(referenceValue:uint, readMask:uint = 255, writeMask:uint = 255):void
+ {
+ stub_method("flash.display3D.Context3D", "setStencilReferenceValue");
+ }
+
+ public native function setSamplerStateAt(sampler:int, wrap:String, filter:String, mipfilter:String):void;
+
+ public native function setRenderToTexture(texture:TextureBase, enableDepthAndStencil:Boolean = false, antiAlias:int = 0, surfaceSelector:int = 0, colorOutputIndex:int = 0):void;
+
+ public function setStencilActions(
+ triangleFace:String = "frontAndBack",
+ compareMode:String = "always",
+ actionOnBothPass:String = "keep",
+ actionOnDepthFail:String = "keep",
+ actionOnDepthPassStencilFail:String = "keep"
+ ):void
+ {
+ stub_method("flash.display3D.Context3D", "setStencilActions");
+ }
+
+ public native function dispose(recreate:Boolean = true):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as b/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as
index 09b4e271e261..52798226d294 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as
@@ -5,40 +5,38 @@
package flash.display3D
{
-
-
- public final class Context3DBlendFactor
- {
- // The blend factor is (Da,Da,Da,Da), where Da is the alpha component of the fragment color computed by the pixel program.
- public static const DESTINATION_ALPHA:String = "destinationAlpha";
-
- // The blend factor is (Dr,Dg,Db,Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer.
- public static const DESTINATION_COLOR:String = "destinationColor";
-
- // The blend factor is (1,1,1,1).
- public static const ONE:String = "one";
-
- // The blend factor is (1-Da,1-Da,1-Da,1-Da), where Da is the alpha component of the current color in the color buffer.
- public static const ONE_MINUS_DESTINATION_ALPHA:String = "oneMinusDestinationAlpha";
-
- // The blend factor is (1-Dr,1-Dg,1-Db,1-Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer.
- public static const ONE_MINUS_DESTINATION_COLOR:String = "oneMinusDestinationColor";
-
- // The blend factor is (1-Sa,1-Sa,1-Sa,1-Sa), where Sa is the alpha component of the fragment color computed by the pixel program.
- public static const ONE_MINUS_SOURCE_ALPHA:String = "oneMinusSourceAlpha";
-
- // The blend factor is (1-Sr,1-Sg,1-Sb,1-Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program.
- public static const ONE_MINUS_SOURCE_COLOR:String = "oneMinusSourceColor";
-
- // The blend factor is (Sa,Sa,Sa,Sa), where Sa is the alpha component of the fragment color computed by the pixel program.
- public static const SOURCE_ALPHA:String = "sourceAlpha";
-
- // The blend factor is (Sr,Sg,Sb,Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program.
- public static const SOURCE_COLOR:String = "sourceColor";
-
- // The blend factor is (0,0,0,0).
- public static const ZERO:String = "zero";
-
-
- }
+
+ public final class Context3DBlendFactor
+ {
+ // The blend factor is (Da,Da,Da,Da), where Da is the alpha component of the fragment color computed by the pixel program.
+ public static const DESTINATION_ALPHA:String = "destinationAlpha";
+
+ // The blend factor is (Dr,Dg,Db,Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer.
+ public static const DESTINATION_COLOR:String = "destinationColor";
+
+ // The blend factor is (1,1,1,1).
+ public static const ONE:String = "one";
+
+ // The blend factor is (1-Da,1-Da,1-Da,1-Da), where Da is the alpha component of the current color in the color buffer.
+ public static const ONE_MINUS_DESTINATION_ALPHA:String = "oneMinusDestinationAlpha";
+
+ // The blend factor is (1-Dr,1-Dg,1-Db,1-Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer.
+ public static const ONE_MINUS_DESTINATION_COLOR:String = "oneMinusDestinationColor";
+
+ // The blend factor is (1-Sa,1-Sa,1-Sa,1-Sa), where Sa is the alpha component of the fragment color computed by the pixel program.
+ public static const ONE_MINUS_SOURCE_ALPHA:String = "oneMinusSourceAlpha";
+
+ // The blend factor is (1-Sr,1-Sg,1-Sb,1-Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program.
+ public static const ONE_MINUS_SOURCE_COLOR:String = "oneMinusSourceColor";
+
+ // The blend factor is (Sa,Sa,Sa,Sa), where Sa is the alpha component of the fragment color computed by the pixel program.
+ public static const SOURCE_ALPHA:String = "sourceAlpha";
+
+ // The blend factor is (Sr,Sg,Sb,Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program.
+ public static const SOURCE_COLOR:String = "sourceColor";
+
+ // The blend factor is (0,0,0,0).
+ public static const ZERO:String = "zero";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as b/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as
index 1b2a327c2000..cae4b680cca4 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as
@@ -6,14 +6,15 @@
package flash.display3D
{
- [API("692")] // the docs say 694, that's wrong
- public final class Context3DBufferUsage
- {
- // Indicates the buffer will be used for drawing and be updated frequently
- public static const DYNAMIC_DRAW:String = "dynamicDraw";
+ [API("692")]
+ // the docs say 694, that's wrong
+ public final class Context3DBufferUsage
+ {
+ // Indicates the buffer will be used for drawing and be updated frequently
+ public static const DYNAMIC_DRAW:String = "dynamicDraw";
- // Indicates the buffer will be used for drawing and be updated once This type is the default value for buffers in Stage3D.
- public static const STATIC_DRAW:String = "staticDraw";
+ // Indicates the buffer will be used for drawing and be updated once This type is the default value for buffers in Stage3D.
+ public static const STATIC_DRAW:String = "staticDraw";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DClearMask.as b/core/src/avm2/globals/flash/display3D/Context3DClearMask.as
index 15df915d330b..8e7d149ad484 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DClearMask.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DClearMask.as
@@ -6,19 +6,19 @@
package flash.display3D
{
- public final class Context3DClearMask
- {
- // Clear all buffers.
- public static const ALL:int = COLOR | DEPTH | STENCIL;
+ public final class Context3DClearMask
+ {
+ // Clear all buffers.
+ public static const ALL:int = COLOR | DEPTH | STENCIL;
- // Clear only the color buffer.
- public static const COLOR:int = 1 << 0;
+ // Clear only the color buffer.
+ public static const COLOR:int = 1 << 0;
- // Clear only the depth buffer.
- public static const DEPTH:int = 1 << 1;
+ // Clear only the depth buffer.
+ public static const DEPTH:int = 1 << 1;
- // Clear only the stencil buffer.
- public static const STENCIL:int = 1 << 2;
+ // Clear only the stencil buffer.
+ public static const STENCIL:int = 1 << 2;
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as b/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as
index d9126d85dc63..c3dcf82fcf49 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as
@@ -6,31 +6,31 @@
package flash.display3D
{
- public final class Context3DCompareMode
- {
- // The comparison always evaluates as true.
- public static const ALWAYS:String = "always";
+ public final class Context3DCompareMode
+ {
+ // The comparison always evaluates as true.
+ public static const ALWAYS:String = "always";
- // Equal (==).
- public static const EQUAL:String = "equal";
+ // Equal (==).
+ public static const EQUAL:String = "equal";
- // Greater than (>).
- public static const GREATER:String = "greater";
+ // Greater than (>).
+ public static const GREATER:String = "greater";
- // Greater than or equal (>=).
- public static const GREATER_EQUAL:String = "greaterEqual";
+ // Greater than or equal (>=).
+ public static const GREATER_EQUAL:String = "greaterEqual";
- // Less than (<).
- public static const LESS:String = "less";
+ // Less than (<).
+ public static const LESS:String = "less";
- // Less than or equal (<=).
- public static const LESS_EQUAL:String = "lessEqual";
+ // Less than or equal (<=).
+ public static const LESS_EQUAL:String = "lessEqual";
- // The comparison never evaluates as true.
- public static const NEVER:String = "never";
+ // The comparison never evaluates as true.
+ public static const NEVER:String = "never";
- // Not equal (!=).
- public static const NOT_EQUAL:String = "notEqual";
+ // Not equal (!=).
+ public static const NOT_EQUAL:String = "notEqual";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as b/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as
index 80b022328ae8..8eb7867a4d3c 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as
@@ -6,17 +6,17 @@
package flash.display3D
{
- [API("686")]
- public final class Context3DMipFilter
- {
- // Select the two closest MIP levels and linearly blend between them (the highest quality mode, but has some performance cost).
- public static const MIPLINEAR:String = "miplinear";
+ [API("686")]
+ public final class Context3DMipFilter
+ {
+ // Select the two closest MIP levels and linearly blend between them (the highest quality mode, but has some performance cost).
+ public static const MIPLINEAR:String = "miplinear";
- // Use the nearest neighbor metric to select MIP levels (the fastest rendering method).
- public static const MIPNEAREST:String = "mipnearest";
+ // Use the nearest neighbor metric to select MIP levels (the fastest rendering method).
+ public static const MIPNEAREST:String = "mipnearest";
- // Always use the top level texture (has a performance penalty when downscaling).
- public static const MIPNONE:String = "mipnone";
+ // Always use the top level texture (has a performance penalty when downscaling).
+ public static const MIPNONE:String = "mipnone";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DProfile.as b/core/src/avm2/globals/flash/display3D/Context3DProfile.as
index 837dcb3a0cec..af974e2c5b7f 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DProfile.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DProfile.as
@@ -6,30 +6,31 @@
package flash.display3D
{
- [API("682")]
- public final class Context3DProfile
- {
- // Use the default feature support profile.
- public static const BASELINE:String = "baseline";
+ [API("682")]
+ public final class Context3DProfile
+ {
+ // Use the default feature support profile.
+ public static const BASELINE:String = "baseline";
- // Use a constrained feature support profile to target older GPUs This profile is primarily targeted at devices that only support PS_2.0 level shaders like the Intel GMA 9xx series.
- public static const BASELINE_CONSTRAINED:String = "baselineConstrained";
+ // Use a constrained feature support profile to target older GPUs This profile is primarily targeted at devices that only support PS_2.0 level shaders like the Intel GMA 9xx series.
+ public static const BASELINE_CONSTRAINED:String = "baselineConstrained";
- // Use an extended feature support profile to target newer GPUs which support larger textures This profile increases the maximum 2D Texture and RectangleTexture size to 4096x4096
- [API("690")]
- public static const BASELINE_EXTENDED:String = "baselineExtended";
+ // Use an extended feature support profile to target newer GPUs which support larger textures This profile increases the maximum 2D Texture and RectangleTexture size to 4096x4096
+ [API("690")]
+ public static const BASELINE_EXTENDED:String = "baselineExtended";
- // Use an standard profile to target GPUs which support MRT, AGAL2 and float textures.
- [API("698")]
- public static const STANDARD:String = "standard";
+ // Use an standard profile to target GPUs which support MRT, AGAL2 and float textures.
+ [API("698")]
+ public static const STANDARD:String = "standard";
- // Use an standard profile to target GPUs which support AGAL2 and float textures.
- [API("702")]
- public static const STANDARD_CONSTRAINED:String = "standardConstrained";
+ // Use an standard profile to target GPUs which support AGAL2 and float textures.
+ [API("702")]
+ public static const STANDARD_CONSTRAINED:String = "standardConstrained";
- // Use standard extended profile to target GPUs which support AGAL3 and instanced drawing feature.
- [API("704")] // the docs say 706, that's wrong
- public static const STANDARD_EXTENDED:String = "standardExtended";
+ // Use standard extended profile to target GPUs which support AGAL3 and instanced drawing feature.
+ [API("704")]
+ // the docs say 706, that's wrong
+ public static const STANDARD_EXTENDED:String = "standardExtended";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DProgramType.as b/core/src/avm2/globals/flash/display3D/Context3DProgramType.as
index 3a935e078f07..919d5ceb4b6a 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DProgramType.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DProgramType.as
@@ -5,16 +5,15 @@
package flash.display3D
{
-
- [API("674")]
- public final class Context3DProgramType
- {
- // A fragment (or pixel) program.
- public static const FRAGMENT:String = "fragment";
-
- // A vertex program.
- public static const VERTEX:String = "vertex";
-
-
- }
+
+ [API("674")]
+ public final class Context3DProgramType
+ {
+ // A fragment (or pixel) program.
+ public static const FRAGMENT:String = "fragment";
+
+ // A vertex program.
+ public static const VERTEX:String = "vertex";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as b/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as
index d4cadb834ca4..d14c77fbef36 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as
@@ -6,14 +6,14 @@
package flash.display3D
{
- [API("674")]
- public final class Context3DRenderMode
- {
- // Automatically choose rendering engine.
- public static const AUTO:String = "auto";
+ [API("674")]
+ public final class Context3DRenderMode
+ {
+ // Automatically choose rendering engine.
+ public static const AUTO:String = "auto";
- // Use software 3D rendering.
- public static const SOFTWARE:String = "software";
+ // Use software 3D rendering.
+ public static const SOFTWARE:String = "software";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as b/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as
index aca2ed6460b4..c11be9cafb36 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as
@@ -6,32 +6,32 @@
package flash.display3D
{
- [API("674")]
- public final class Context3DStencilAction
- {
- // Decrement the stencil buffer value, clamping at 0, the minimum value.
- public static const DECREMENT_SATURATE:String = "decrementSaturate";
+ [API("674")]
+ public final class Context3DStencilAction
+ {
+ // Decrement the stencil buffer value, clamping at 0, the minimum value.
+ public static const DECREMENT_SATURATE:String = "decrementSaturate";
- // Decrement the stencil buffer value.
- public static const DECREMENT_WRAP:String = "decrementWrap";
+ // Decrement the stencil buffer value.
+ public static const DECREMENT_WRAP:String = "decrementWrap";
- // Increment the stencil buffer value, clamping at 255, the maximum value.
- public static const INCREMENT_SATURATE:String = "incrementSaturate";
+ // Increment the stencil buffer value, clamping at 255, the maximum value.
+ public static const INCREMENT_SATURATE:String = "incrementSaturate";
- // Increment the stencil buffer value.
- public static const INCREMENT_WRAP:String = "incrementWrap";
+ // Increment the stencil buffer value.
+ public static const INCREMENT_WRAP:String = "incrementWrap";
- // Invert the stencil buffer value, bitwise.
- public static const INVERT:String = "invert";
+ // Invert the stencil buffer value, bitwise.
+ public static const INVERT:String = "invert";
- // Keep the current stencil buffer value.
- public static const KEEP:String = "keep";
+ // Keep the current stencil buffer value.
+ public static const KEEP:String = "keep";
- // Replace the stencil buffer value with the reference value.
- public static const SET:String = "set";
+ // Replace the stencil buffer value with the reference value.
+ public static const SET:String = "set";
- // Set the stencil buffer value to 0.
- public static const ZERO:String = "zero";
+ // Set the stencil buffer value to 0.
+ public static const ZERO:String = "zero";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as b/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as
index 5ab8a7435770..1856da3582f0 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as
@@ -6,30 +6,30 @@
package flash.display3D
{
- [API("686")]
- public final class Context3DTextureFilter
- {
- // Use anisotropic filter with radio 16 when upsampling textures
- [API("698")]
- public static const ANISOTROPIC16X:String = "anisotropic16x";
+ [API("686")]
+ public final class Context3DTextureFilter
+ {
+ // Use anisotropic filter with radio 16 when upsampling textures
+ [API("698")]
+ public static const ANISOTROPIC16X:String = "anisotropic16x";
- // Use anisotropic filter with radio 2 when upsampling textures
- [API("698")]
- public static const ANISOTROPIC2X:String = "anisotropic2x";
+ // Use anisotropic filter with radio 2 when upsampling textures
+ [API("698")]
+ public static const ANISOTROPIC2X:String = "anisotropic2x";
- // Use anisotropic filter with radio 4 when upsampling textures
- [API("698")]
- public static const ANISOTROPIC4X:String = "anisotropic4x";
+ // Use anisotropic filter with radio 4 when upsampling textures
+ [API("698")]
+ public static const ANISOTROPIC4X:String = "anisotropic4x";
- // Use anisotropic filter with radio 8 when upsampling textures
- [API("698")]
- public static const ANISOTROPIC8X:String = "anisotropic8x";
+ // Use anisotropic filter with radio 8 when upsampling textures
+ [API("698")]
+ public static const ANISOTROPIC8X:String = "anisotropic8x";
- // Use linear interpolation when upsampling textures (gives a smooth, blurry look).
- public static const LINEAR:String = "linear";
+ // Use linear interpolation when upsampling textures (gives a smooth, blurry look).
+ public static const LINEAR:String = "linear";
- // Use nearest neighbor sampling when upsampling textures (gives a pixelated, sharp mosaic look).
- public static const NEAREST:String = "nearest";
+ // Use nearest neighbor sampling when upsampling textures (gives a pixelated, sharp mosaic look).
+ public static const NEAREST:String = "nearest";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as b/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as
index 46e3eb6db138..5c67b436e1a3 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as
@@ -6,26 +6,26 @@
package flash.display3D
{
- [API("674")]
- public final class Context3DTextureFormat
- {
- public static const BGRA:String = "bgra";
+ [API("674")]
+ public final class Context3DTextureFormat
+ {
+ public static const BGRA:String = "bgra";
- // 16 bit, bgra packed as 4:4:4:4
- [API("688")]
- public static const BGRA_PACKED:String = "bgraPacked4444";
+ // 16 bit, bgra packed as 4:4:4:4
+ [API("688")]
+ public static const BGRA_PACKED:String = "bgraPacked4444";
- // 16 bit, bgr packed as 5:6:5
- [API("688")]
- public static const BGR_PACKED:String = "bgrPacked565";
+ // 16 bit, bgr packed as 5:6:5
+ [API("688")]
+ public static const BGR_PACKED:String = "bgrPacked565";
- public static const COMPRESSED:String = "compressed";
+ public static const COMPRESSED:String = "compressed";
- [API("682")]
- public static const COMPRESSED_ALPHA:String = "compressedAlpha";
+ [API("682")]
+ public static const COMPRESSED_ALPHA:String = "compressedAlpha";
- [API("698")]
- public static const RGBA_HALF_FLOAT:String = "rgbaHalfFloat";
+ [API("698")]
+ public static const RGBA_HALF_FLOAT:String = "rgbaHalfFloat";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as b/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as
index cd6e5d7a1dc1..308d4865f418 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as
@@ -6,16 +6,16 @@
package flash.display3D
{
- [API("674")]
- public final class Context3DTriangleFace
- {
- public static const BACK:String = "back";
+ [API("674")]
+ public final class Context3DTriangleFace
+ {
+ public static const BACK:String = "back";
- public static const FRONT:String = "front";
+ public static const FRONT:String = "front";
- public static const FRONT_AND_BACK:String = "frontAndBack";
+ public static const FRONT_AND_BACK:String = "frontAndBack";
- public static const NONE:String = "none";
+ public static const NONE:String = "none";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as b/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as
index e541834dd9d8..643fc614f0e8 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as
@@ -6,18 +6,18 @@
package flash.display3D
{
- [API("674")]
- public final class Context3DVertexBufferFormat
- {
- public static const BYTES_4:String = "bytes4";
+ [API("674")]
+ public final class Context3DVertexBufferFormat
+ {
+ public static const BYTES_4:String = "bytes4";
- public static const FLOAT_1:String = "float1";
+ public static const FLOAT_1:String = "float1";
- public static const FLOAT_2:String = "float2";
+ public static const FLOAT_2:String = "float2";
- public static const FLOAT_3:String = "float3";
+ public static const FLOAT_3:String = "float3";
- public static const FLOAT_4:String = "float4";
+ public static const FLOAT_4:String = "float4";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as b/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as
index 0481eba7774e..a8dcab3d1872 100644
--- a/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as
+++ b/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as
@@ -6,22 +6,24 @@
package flash.display3D
{
- [API("686")]
- public final class Context3DWrapMode
- {
- // Clamp texture coordinates outside the 0..1 range.
- public static const CLAMP:String = "clamp";
+ [API("686")]
+ public final class Context3DWrapMode
+ {
+ // Clamp texture coordinates outside the 0..1 range.
+ public static const CLAMP:String = "clamp";
- // Clamp in U axis but Repeat in V axis.
- [API("696")] // the docs don't mention it, but this is correct
- public static const CLAMP_U_REPEAT_V:String = "clamp_u_repeat_v";
+ // Clamp in U axis but Repeat in V axis.
+ [API("696")]
+ // the docs don't mention it, but this is correct
+ public static const CLAMP_U_REPEAT_V:String = "clamp_u_repeat_v";
- // Repeat (tile) texture coordinates outside the 0..1 range.
- public static const REPEAT:String = "repeat";
+ // Repeat (tile) texture coordinates outside the 0..1 range.
+ public static const REPEAT:String = "repeat";
- // Repeat in U axis but Clamp in V axis.
- [API("696")] // the docs don't mention it, but this is correct
- public static const REPEAT_U_CLAMP_V:String = "repeat_u_clamp_v";
+ // Repeat in U axis but Clamp in V axis.
+ [API("696")]
+ // the docs don't mention it, but this is correct
+ public static const REPEAT_U_CLAMP_V:String = "repeat_u_clamp_v";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as b/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as
index ffc310552f0d..9d651c9c3bbe 100644
--- a/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as
+++ b/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as
@@ -1,15 +1,18 @@
-package flash.display3D {
- import __ruffle__.stub_method;
- import flash.utils.ByteArray;
-
- [Ruffle(InstanceAllocator)]
- [API("674")]
- public final class IndexBuffer3D {
- public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:int, startOffset:int, count:int):void;
- public native function uploadFromVector(data:Vector., startOffset:int, count:int):void;
+package flash.display3D
+{
+ import __ruffle__.stub_method;
+ import flash.utils.ByteArray;
- public function dispose():void {
- stub_method("flash.display3D.IndexBuffer3D", "dispose");
- }
- }
+ [Ruffle(InstanceAllocator)]
+ [API("674")]
+ public final class IndexBuffer3D
+ {
+ public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:int, startOffset:int, count:int):void;
+ public native function uploadFromVector(data:Vector., startOffset:int, count:int):void;
+
+ public function dispose():void
+ {
+ stub_method("flash.display3D.IndexBuffer3D", "dispose");
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display3D/Program3D.as b/core/src/avm2/globals/flash/display3D/Program3D.as
index 2b5684fb62f7..966f9aa4975a 100644
--- a/core/src/avm2/globals/flash/display3D/Program3D.as
+++ b/core/src/avm2/globals/flash/display3D/Program3D.as
@@ -1,13 +1,16 @@
-package flash.display3D {
- import __ruffle__.stub_method;
- import flash.utils.ByteArray;
+package flash.display3D
+{
+ import __ruffle__.stub_method;
+ import flash.utils.ByteArray;
- [API("674")]
- public final class Program3D {
- public native function upload(vertexProgram:ByteArray, fragmentProgram:ByteArray):void;
+ [API("674")]
+ public final class Program3D
+ {
+ public native function upload(vertexProgram:ByteArray, fragmentProgram:ByteArray):void;
- public function dispose():void {
- stub_method("flash.display3D.Program3D", "dispose");
- }
- }
+ public function dispose():void
+ {
+ stub_method("flash.display3D.Program3D", "dispose");
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as b/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as
index 5ead5826de97..62db7edc5fb5 100644
--- a/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as
+++ b/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as
@@ -1,15 +1,18 @@
-package flash.display3D {
- import __ruffle__.stub_method;
- import flash.utils.ByteArray;
-
- [Ruffle(InstanceAllocator)]
- [API("674")]
- public final class VertexBuffer3D {
- public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:int, startVertex:int, numVertices:int):void
- public native function uploadFromVector(data:Vector., startVertex:int, numVertices:int):void
+package flash.display3D
+{
+ import __ruffle__.stub_method;
+ import flash.utils.ByteArray;
- public function dispose():void {
- stub_method("flash.display3D.VertexBuffer3D", "dispose");
- }
- }
+ [Ruffle(InstanceAllocator)]
+ [API("674")]
+ public final class VertexBuffer3D
+ {
+ public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:int, startVertex:int, numVertices:int):void;
+ public native function uploadFromVector(data:Vector., startVertex:int, numVertices:int):void;
+
+ public function dispose():void
+ {
+ stub_method("flash.display3D.VertexBuffer3D", "dispose");
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as b/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as
index 5a77b027e390..d3573d7919d4 100644
--- a/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as
+++ b/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as
@@ -1,14 +1,16 @@
-package flash.display3D.textures {
- import flash.display.BitmapData;
- import flash.utils.ByteArray;
- import __ruffle__.stub_method;
-
- public final class CubeTexture extends TextureBase {
- [API("674")]
- public native function uploadFromBitmapData(source:BitmapData, side:uint, miplevel:uint = 0):void;
- [API("674")]
- public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:uint, side:uint, miplevel:uint = 0);
- [API("674")]
- public native function uploadCompressedTextureFromByteArray(data:ByteArray, byteArrayOffset:uint, async:Boolean = false):void;
- }
+package flash.display3D.textures
+{
+ import flash.display.BitmapData;
+ import flash.utils.ByteArray;
+ import __ruffle__.stub_method;
+
+ public final class CubeTexture extends TextureBase
+ {
+ [API("674")]
+ public native function uploadFromBitmapData(source:BitmapData, side:uint, miplevel:uint = 0):void;
+ [API("674")]
+ public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:uint, side:uint, miplevel:uint = 0);
+ [API("674")]
+ public native function uploadCompressedTextureFromByteArray(data:ByteArray, byteArrayOffset:uint, async:Boolean = false):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as b/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as
index acc47cf55eaa..c0581d5f1393 100644
--- a/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as
+++ b/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as
@@ -1,11 +1,13 @@
-package flash.display3D.textures {
- import flash.display.BitmapData;
- import flash.utils.ByteArray;
-
- public final class RectangleTexture extends TextureBase {
- [API("690")]
- public native function uploadFromBitmapData(source:BitmapData):void;
- [API("690")]
- public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:uint):void;
- }
+package flash.display3D.textures
+{
+ import flash.display.BitmapData;
+ import flash.utils.ByteArray;
+
+ public final class RectangleTexture extends TextureBase
+ {
+ [API("690")]
+ public native function uploadFromBitmapData(source:BitmapData):void;
+ [API("690")]
+ public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:uint):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/display3D/textures/Texture.as b/core/src/avm2/globals/flash/display3D/textures/Texture.as
index 1af2f0e21a96..ff18deb039ce 100644
--- a/core/src/avm2/globals/flash/display3D/textures/Texture.as
+++ b/core/src/avm2/globals/flash/display3D/textures/Texture.as
@@ -1,32 +1,38 @@
-package flash.display3D.textures {
- import flash.display.BitmapData;
- import flash.events.Event;
- import flash.utils.ByteArray;
- import flash.utils.setTimeout;
+package flash.display3D.textures
+{
+ import flash.display.BitmapData;
+ import flash.events.Event;
+ import flash.utils.ByteArray;
+ import flash.utils.setTimeout;
- public final class Texture extends TextureBase {
- [API("674")]
- public native function uploadFromBitmapData(source:BitmapData, miplevel:uint = 0):void;
- [API("674")]
- public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:uint, miplevel:uint = 0):void;
- [API("674")]
- public function uploadCompressedTextureFromByteArray(data:ByteArray, byteArrayOffset:uint, async:Boolean = false):void {
- if (async) {
- var self = this;
- var copiedData = new ByteArray();
- data.position = 0;
- data.readBytes(copiedData);
+ public final class Texture extends TextureBase
+ {
+ [API("674")]
+ public native function uploadFromBitmapData(source:BitmapData, miplevel:uint = 0):void;
+ [API("674")]
+ public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:uint, miplevel:uint = 0):void;
+ [API("674")]
+ public function uploadCompressedTextureFromByteArray(data:ByteArray, byteArrayOffset:uint, async:Boolean = false):void
+ {
+ if (async)
+ {
+ var self = this;
+ var copiedData = new ByteArray();
+ data.position = 0;
+ data.readBytes(copiedData);
- setTimeout(function() {
- self.uploadCompressedTextureFromByteArrayInternal(copiedData, byteArrayOffset);
- self.dispatchEvent(new Event("textureReady"));
- }, 0);
- }
- else {
- this.uploadCompressedTextureFromByteArrayInternal(data, byteArrayOffset);
- }
- }
+ setTimeout(function()
+ {
+ self.uploadCompressedTextureFromByteArrayInternal(copiedData, byteArrayOffset);
+ self.dispatchEvent(new Event("textureReady"));
+ }, 0);
+ }
+ else
+ {
+ this.uploadCompressedTextureFromByteArrayInternal(data, byteArrayOffset);
+ }
+ }
- private native function uploadCompressedTextureFromByteArrayInternal(data:ByteArray, byteArrayOffset:uint):void;
- }
+ private native function uploadCompressedTextureFromByteArrayInternal(data:ByteArray, byteArrayOffset:uint):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/display3D/textures/TextureBase.as b/core/src/avm2/globals/flash/display3D/textures/TextureBase.as
index a0638a5e26d1..839fc0db0513 100644
--- a/core/src/avm2/globals/flash/display3D/textures/TextureBase.as
+++ b/core/src/avm2/globals/flash/display3D/textures/TextureBase.as
@@ -1,11 +1,14 @@
-package flash.display3D.textures {
- import flash.events.EventDispatcher;
- import __ruffle__.stub_method;
+package flash.display3D.textures
+{
+ import flash.events.EventDispatcher;
+ import __ruffle__.stub_method;
- [API("674")]
- public class TextureBase extends EventDispatcher {
- public function dispose():void {
- stub_method("flash.display3D.textures.TextureBase", "dispose");
- }
- }
+ [API("674")]
+ public class TextureBase extends EventDispatcher
+ {
+ public function dispose():void
+ {
+ stub_method("flash.display3D.textures.TextureBase", "dispose");
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/errors/EOFError.as b/core/src/avm2/globals/flash/errors/EOFError.as
index 188f61513c66..c93a811ae7a4 100644
--- a/core/src/avm2/globals/flash/errors/EOFError.as
+++ b/core/src/avm2/globals/flash/errors/EOFError.as
@@ -6,15 +6,14 @@
package flash.errors
{
- public dynamic class EOFError extends IOError
- {
- prototype.name = "EOFError";
+ public dynamic class EOFError extends IOError
+ {
+ prototype.name = "EOFError";
- public function EOFError(message:String = "", id:int = 0)
- {
- super(message, id);
- }
+ public function EOFError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ }
- }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/errors/IOError.as b/core/src/avm2/globals/flash/errors/IOError.as
index 04641a856c50..c898232824de 100644
--- a/core/src/avm2/globals/flash/errors/IOError.as
+++ b/core/src/avm2/globals/flash/errors/IOError.as
@@ -6,15 +6,14 @@
package flash.errors
{
- public dynamic class IOError extends Error
- {
- prototype.name = "IOError";
+ public dynamic class IOError extends Error
+ {
+ prototype.name = "IOError";
- public function IOError(message:String = "", id:int = 0)
- {
- super(message, id);
- }
+ public function IOError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ }
- }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/errors/IllegalOperationError.as b/core/src/avm2/globals/flash/errors/IllegalOperationError.as
index 89bf4c060236..b710fc29d8b4 100644
--- a/core/src/avm2/globals/flash/errors/IllegalOperationError.as
+++ b/core/src/avm2/globals/flash/errors/IllegalOperationError.as
@@ -1,10 +1,13 @@
-package flash.errors {
- public dynamic class IllegalOperationError extends Error {
- IllegalOperationError.prototype.name = "IllegalOperationError"
+package flash.errors
+{
+ public dynamic class IllegalOperationError extends Error
+ {
+ IllegalOperationError.prototype.name = "IllegalOperationError";
// Despite what the documentation claims, user code can pass in an 'id'
// parameter (which defaults to 0)
- public function IllegalOperationError(message:String = "", id:int = 0) {
+ public function IllegalOperationError(message:String = "", id:int = 0)
+ {
super(message, id);
// Note that we do *not* set 'this.name' here (unlike in other error classes)
// to match the Flash behavior
diff --git a/core/src/avm2/globals/flash/errors/InvalidSWFError.as b/core/src/avm2/globals/flash/errors/InvalidSWFError.as
index 4ac7641ea38e..4e13ffe0301f 100644
--- a/core/src/avm2/globals/flash/errors/InvalidSWFError.as
+++ b/core/src/avm2/globals/flash/errors/InvalidSWFError.as
@@ -6,15 +6,14 @@
package flash.errors
{
- public dynamic class InvalidSWFError extends Error
- {
- prototype.name = "InvalidSWFError";
+ public dynamic class InvalidSWFError extends Error
+ {
+ prototype.name = "InvalidSWFError";
- public function InvalidSWFError(message:String = "", id:int = 0)
- {
- super(message, id);
- }
+ public function InvalidSWFError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ }
- }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/errors/MemoryError.as b/core/src/avm2/globals/flash/errors/MemoryError.as
index 43bf2676aef5..938ebed7e75c 100644
--- a/core/src/avm2/globals/flash/errors/MemoryError.as
+++ b/core/src/avm2/globals/flash/errors/MemoryError.as
@@ -6,15 +6,14 @@
package flash.errors
{
- public dynamic class MemoryError extends Error
- {
- prototype.name = "MemoryError";
+ public dynamic class MemoryError extends Error
+ {
+ prototype.name = "MemoryError";
- public function MemoryError(message:String = "", id:int = 0)
- {
- super(message, id);
- }
+ public function MemoryError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ }
- }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as b/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as
index 0bffc4124236..9963bacdb2b4 100644
--- a/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as
+++ b/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as
@@ -6,15 +6,14 @@
package flash.errors
{
- public dynamic class ScriptTimeoutError extends Error
- {
- prototype.name = "ScriptTimeoutError";
+ public dynamic class ScriptTimeoutError extends Error
+ {
+ prototype.name = "ScriptTimeoutError";
- public function ScriptTimeoutError(message:String = "", id:int = 0)
- {
- super(message, id);
- }
+ public function ScriptTimeoutError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ }
- }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/errors/StackOverflowError.as b/core/src/avm2/globals/flash/errors/StackOverflowError.as
index ed03fadd0dcf..b9c3ca1c38c5 100644
--- a/core/src/avm2/globals/flash/errors/StackOverflowError.as
+++ b/core/src/avm2/globals/flash/errors/StackOverflowError.as
@@ -6,15 +6,14 @@
package flash.errors
{
- public dynamic class StackOverflowError extends Error
- {
- prototype.name = "StackOverflowError";
+ public dynamic class StackOverflowError extends Error
+ {
+ prototype.name = "StackOverflowError";
- public function StackOverflowError(message:String = "", id:int = 0)
- {
- super(message, id);
- }
+ public function StackOverflowError(message:String = "", id:int = 0)
+ {
+ super(message, id);
+ }
- }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as b/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as
index 6d61d10c7831..d8edd990c9fc 100644
--- a/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as
+++ b/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as
@@ -1,38 +1,35 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AVDictionaryDataEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- import flash.utils.Dictionary;
- public class AVDictionaryDataEvent extends Event
- {
- public static const AV_DICTIONARY_DATA:String = "avDictionaryData";
+ import flash.utils.Dictionary;
- private var _dictionary: Dictionary; // Contains a dictionary of keys and values for the ID3 tags.
- private var _time: Number; // The timestamp for the ID3 tag.
+ public class AVDictionaryDataEvent extends Event
+ {
+ public static const AV_DICTIONARY_DATA:String = "avDictionaryData";
- public function AVDictionaryDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, init_dictionary:Dictionary = null, init_dataTime:Number = 0)
- {
- super(type,bubbles,cancelable);
- this._dictionary = init_dictionary;
- this._time = init_dataTime;
- }
-
+ private var _dictionary:Dictionary; // Contains a dictionary of keys and values for the ID3 tags.
+ private var _time:Number; // The timestamp for the ID3 tag.
- public function get dictionary() : Dictionary
- {
- return this._dictionary;
- }
-
+ public function AVDictionaryDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, init_dictionary:Dictionary = null, init_dataTime:Number = 0)
+ {
+ super(type, bubbles, cancelable);
+ this._dictionary = init_dictionary;
+ this._time = init_dataTime;
+ }
- public function get time() : Number
- {
- return this._time;
- }
-
- }
-}
+ public function get dictionary():Dictionary
+ {
+ return this._dictionary;
+ }
+
+ public function get time():Number
+ {
+ return this._time;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as b/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as
index e605cc922f81..249e71b6d085 100644
--- a/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as
+++ b/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as
@@ -1,44 +1,42 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AVHTTPStatusEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class AVHTTPStatusEvent extends Event
- {
- public static const AV_HTTP_RESPONSE_STATUS:String = "avHttpResponseStatus"; // Unlike the httpStatus event, the httpResponseStatus event is delivered before any response data.
- private var _status: int; // The HTTP status code returned by the server.
- public var responseURL: String; // The URL that the response was returned from.
- public var responseHeaders: Array; // The response headers that the response returned, as an array of URLRequestHeader objects.
+ public class AVHTTPStatusEvent extends Event
+ {
+ public static const AV_HTTP_RESPONSE_STATUS:String = "avHttpResponseStatus"; // Unlike the httpStatus event, the httpResponseStatus event is delivered before any response data.
- public function AVHTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, responseUrl:String = null, responseHeaders:Array = null)
- {
- super(type,bubbles,cancelable);
- this._status = status;
- this.responseURL = responseUrl;
- this.responseHeaders = responseHeaders;
- }
-
+ private var _status:int; // The HTTP status code returned by the server.
+ public var responseURL:String; // The URL that the response was returned from.
+ public var responseHeaders:Array; // The response headers that the response returned, as an array of URLRequestHeader objects.
- // Creates a copy of the AVHTTPStatusEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new AVHTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status, this.responseURL, this.responseHeaders);
- }
+ public function AVHTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, responseUrl:String = null, responseHeaders:Array = null)
+ {
+ super(type, bubbles, cancelable);
+ this._status = status;
+ this.responseURL = responseUrl;
+ this.responseHeaders = responseHeaders;
+ }
- // Returns a string that contains all the properties of the AVHTTPStatusEvent object.
- override public function toString():String
- {
- return this.formatToString("AVHTTPStatusEvent","type","bubbles","cancelable","eventPhase","status");
- }
+ // Creates a copy of the AVHTTPStatusEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new AVHTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status, this.responseURL, this.responseHeaders);
+ }
- public function get status() : int
- {
- return this._status;
- }
-
- }
-}
+ // Returns a string that contains all the properties of the AVHTTPStatusEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("AVHTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status");
+ }
+
+ public function get status():int
+ {
+ return this._status;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as b/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as
index 8a903bed0c04..8c716664c4d9 100644
--- a/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as
+++ b/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as
@@ -1,28 +1,26 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AVPauseAtPeriodEndEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class AVPauseAtPeriodEndEvent extends Event
- {
- public static const AV_PAUSE_AT_PERIOD_END:String = "avPauseAtPeriodEnd";
- private var _userData: int;
+ public class AVPauseAtPeriodEndEvent extends Event
+ {
+ public static const AV_PAUSE_AT_PERIOD_END:String = "avPauseAtPeriodEnd";
- public function AVPauseAtPeriodEndEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, userData:int = 0)
- {
- super(type,bubbles,cancelable);
- this._userData = userData;
- }
-
+ private var _userData:int;
- public function get userData() : int
- {
- return this._userData;
- }
-
- }
-}
+ public function AVPauseAtPeriodEndEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, userData:int = 0)
+ {
+ super(type, bubbles, cancelable);
+ this._userData = userData;
+ }
+
+ public function get userData():int
+ {
+ return this._userData;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/AVStatusEvent.as b/core/src/avm2/globals/flash/events/AVStatusEvent.as
index 3eac0141b812..ec5fb059e1e5 100644
--- a/core/src/avm2/globals/flash/events/AVStatusEvent.as
+++ b/core/src/avm2/globals/flash/events/AVStatusEvent.as
@@ -1,48 +1,54 @@
-package flash.events {
- import flash.media.AVResult;
+package flash.events
+{
+ import flash.media.AVResult;
- [API("688")]
- public class AVStatusEvent extends Event {
- public static const AV_STATUS:String = "avStatus";
- public static const BACKGROUND_MANIFEST_ERROR:String = "BackgroundManifestError";
- public static const BACKGROUND_MANIFEST_WARNING:String = "BackgroundManifestWarning";
- public static const BUFFER_STATE:String = "BufferState";
- public static const DECODER_TYPE:String = "DecoderType";
- public static const DIMENSION_CHANGE:String = "DimensionChange";
- public static const ERROR:String = "Error";
- public static const INSERTION_COMPLETE:String = "InsertionComplete";
- public static const LOAD_COMPLETE:String = "LoadComplete";
- public static const MANIFEST_UPDATE:String = "ManifestUpdate";
- public static const PLAY_STATE:String = "PlayState";
- public static const RENDER_TYPE:String = "RenderType";
- public static const SEEK_COMPLETE:String = "SeekComplete";
- public static const STEP_COMPLETE:String = "StepComplete";
- public static const STREAM_SWITCH:String = "StreamSwitch";
- public static const TRICKPLAY_ENDED:String = "TrickPlayEnded";
- public static const WARNING:String = "Warning";
+ [API("688")]
+ public class AVStatusEvent extends Event
+ {
+ public static const AV_STATUS:String = "avStatus";
+ public static const BACKGROUND_MANIFEST_ERROR:String = "BackgroundManifestError";
+ public static const BACKGROUND_MANIFEST_WARNING:String = "BackgroundManifestWarning";
+ public static const BUFFER_STATE:String = "BufferState";
+ public static const DECODER_TYPE:String = "DecoderType";
+ public static const DIMENSION_CHANGE:String = "DimensionChange";
+ public static const ERROR:String = "Error";
+ public static const INSERTION_COMPLETE:String = "InsertionComplete";
+ public static const LOAD_COMPLETE:String = "LoadComplete";
+ public static const MANIFEST_UPDATE:String = "ManifestUpdate";
+ public static const PLAY_STATE:String = "PlayState";
+ public static const RENDER_TYPE:String = "RenderType";
+ public static const SEEK_COMPLETE:String = "SeekComplete";
+ public static const STEP_COMPLETE:String = "StepComplete";
+ public static const STREAM_SWITCH:String = "StreamSwitch";
+ public static const TRICKPLAY_ENDED:String = "TrickPlayEnded";
+ public static const WARNING:String = "Warning";
- private var _notificationType:String;
- private var _result:AVResult;
- private var _description:String;
+ private var _notificationType:String;
+ private var _result:AVResult;
+ private var _description:String;
- public function AVStatusEvent(type:String = "avStatus", bubbles:Boolean = false, cancelable:Boolean = false, notificationType:String = "", result:int = 0, description:String = "") {
- super(type, bubbles, cancelable);
+ public function AVStatusEvent(type:String = "avStatus", bubbles:Boolean = false, cancelable:Boolean = false, notificationType:String = "", result:int = 0, description:String = "")
+ {
+ super(type, bubbles, cancelable);
- this._notificationType = notificationType;
- this._result = new AVResult(result);
- this._description = description;
- }
+ this._notificationType = notificationType;
+ this._result = new AVResult(result);
+ this._description = description;
+ }
- public function get notificationType():String {
- return this._notificationType;
- }
+ public function get notificationType():String
+ {
+ return this._notificationType;
+ }
- public function get result():AVResult {
- return this._result;
- }
+ public function get result():AVResult
+ {
+ return this._result;
+ }
- public function get description():String {
- return this._description;
- }
- }
+ public function get description():String
+ {
+ return this._description;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/AccelerometerEvent.as b/core/src/avm2/globals/flash/events/AccelerometerEvent.as
index 318fa91c8f56..08eab714711e 100644
--- a/core/src/avm2/globals/flash/events/AccelerometerEvent.as
+++ b/core/src/avm2/globals/flash/events/AccelerometerEvent.as
@@ -5,46 +5,43 @@
package flash.events
{
- public class AccelerometerEvent extends Event
- {
- // Defines the value of the type property of a AccelerometerEvent event object.
- public static const UPDATE:String = "update";
-
- // The number of milliseconds at the time of the event since the runtime was initialized.
- public var timestamp:Number;
-
- // Acceleration along the x-axis, measured in Gs.
- public var accelerationX:Number;
-
- // Acceleration along the y-axis, measured in Gs.
- public var accelerationY:Number;
-
- // Acceleration along the z-axis, measured in Gs.
- public var accelerationZ:Number;
-
- public function AccelerometerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, timestamp:Number = 0,
- accelerationX:Number = 0, accelerationY:Number = 0, accelerationZ:Number = 0)
- {
- super(type, bubbles, cancelable);
- this.timestamp = timestamp;
- this.accelerationX = accelerationX;
- this.accelerationY = accelerationY;
- this.accelerationZ = accelerationZ;
- }
-
- // Creates a copy of an AccelerometerEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new AccelerometerEvent(this.type, this.bubbles, this.cancelable, this.timestamp, this.accelerationX, this.accelerationY, this.accelerationZ);
- }
-
- // Returns a string that contains all the properties of the AccelerometerEvent object.
- override public function toString():String
- {
- return this.formatToString("AccelerometerEvent", "type", "bubbles", "cancelable", "eventPhase", "timestamp", "accelerationX", "accelerationY", "accelerationZ");
- }
- }
+ public class AccelerometerEvent extends Event
+ {
+ // Defines the value of the type property of a AccelerometerEvent event object.
+ public static const UPDATE:String = "update";
+
+ // The number of milliseconds at the time of the event since the runtime was initialized.
+ public var timestamp:Number;
+
+ // Acceleration along the x-axis, measured in Gs.
+ public var accelerationX:Number;
+
+ // Acceleration along the y-axis, measured in Gs.
+ public var accelerationY:Number;
+
+ // Acceleration along the z-axis, measured in Gs.
+ public var accelerationZ:Number;
+
+ public function AccelerometerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, timestamp:Number = 0,
+ accelerationX:Number = 0, accelerationY:Number = 0, accelerationZ:Number = 0)
+ {
+ super(type, bubbles, cancelable);
+ this.timestamp = timestamp;
+ this.accelerationX = accelerationX;
+ this.accelerationY = accelerationY;
+ this.accelerationZ = accelerationZ;
+ }
+
+ // Creates a copy of an AccelerometerEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new AccelerometerEvent(this.type, this.bubbles, this.cancelable, this.timestamp, this.accelerationX, this.accelerationY, this.accelerationZ);
+ }
+
+ // Returns a string that contains all the properties of the AccelerometerEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("AccelerometerEvent", "type", "bubbles", "cancelable", "eventPhase", "timestamp", "accelerationX", "accelerationY", "accelerationZ");
+ }
+ }
}
-
-
-
diff --git a/core/src/avm2/globals/flash/events/ActivityEvent.as b/core/src/avm2/globals/flash/events/ActivityEvent.as
index c21b5fcda38c..f32b4384ee4f 100644
--- a/core/src/avm2/globals/flash/events/ActivityEvent.as
+++ b/core/src/avm2/globals/flash/events/ActivityEvent.as
@@ -1,21 +1,26 @@
-package flash.events {
- public class ActivityEvent extends Event {
+package flash.events
+{
+ public class ActivityEvent extends Event
+ {
public static const ACTIVITY:String = "activity";
public var activating:Boolean;
- public function ActivityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, activating:Boolean = false) {
+ public function ActivityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, activating:Boolean = false)
+ {
super(type, bubbles, cancelable);
this.activating = activating;
}
- override public function clone() : Event {
+ override public function clone():Event
+ {
return new ActivityEvent(this.type, this.bubbles, this.cancelable, this.activating);
}
- override public function toString(): String {
- return formatToString("ActivityEvent","type","bubbles","cancelable","eventPhase","activating");
+ override public function toString():String
+ {
+ return formatToString("ActivityEvent", "type", "bubbles", "cancelable", "eventPhase", "activating");
}
}
}
diff --git a/core/src/avm2/globals/flash/events/AsyncErrorEvent.as b/core/src/avm2/globals/flash/events/AsyncErrorEvent.as
index c056eff6c670..33b5beff6efc 100644
--- a/core/src/avm2/globals/flash/events/AsyncErrorEvent.as
+++ b/core/src/avm2/globals/flash/events/AsyncErrorEvent.as
@@ -1,33 +1,31 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AsyncErrorEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
- public class AsyncErrorEvent extends ErrorEvent
- {
- public static const ASYNC_ERROR:String = "asyncError"; // The AsyncErrorEvent.ASYNC_ERROR constant defines the value of the type property of an asyncError event object.
+ public class AsyncErrorEvent extends ErrorEvent
+ {
+ public static const ASYNC_ERROR:String = "asyncError"; // The AsyncErrorEvent.ASYNC_ERROR constant defines the value of the type property of an asyncError event object.
- public var error: Error; // The exception that was thrown.
+ public var error:Error; // The exception that was thrown.
- public function AsyncErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", error:Error = null)
- {
- super(type,bubbles,cancelable,text);
- this.error = error;
- }
-
+ public function AsyncErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", error:Error = null)
+ {
+ super(type, bubbles, cancelable, text);
+ this.error = error;
+ }
- // Creates a copy of the AsyncErrorEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new AsyncErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.error);
- }
+ // Creates a copy of the AsyncErrorEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new AsyncErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.error);
+ }
- // Returns a string that contains all the properties of the AsyncErrorEvent object.
- override public function toString():String
- {
- return this.formatToString("AsyncErrorEvent","type","bubbles","cancelable","eventPhase","text","error");
- }
- }
+ // Returns a string that contains all the properties of the AsyncErrorEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("AsyncErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text", "error");
+ }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as b/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as
index 9e937f9f04ea..ff6ddf48f117 100644
--- a/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as
+++ b/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as
@@ -1,28 +1,26 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AudioOutputChangeEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
- // TODO: [API("724")]
- public class AudioOutputChangeEvent extends Event
- {
- public static const AUDIO_OUTPUT_CHANGE:String = "audioOutputChange"; // Defines the value of the type property of a AudioOutputChangeEvent event object.
+ // TODO: [API("724")]
+ public class AudioOutputChangeEvent extends Event
+ {
+ public static const AUDIO_OUTPUT_CHANGE:String = "audioOutputChange"; // Defines the value of the type property of a AudioOutputChangeEvent event object.
- private var _reason: String; // Reports the reason that triggers this AudioOutputChangeEvent.
+ private var _reason:String; // Reports the reason that triggers this AudioOutputChangeEvent.
- public function AudioOutputChangeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, reason:String = null)
- {
- super(type,bubbles,cancelable);
- this._reason = reason;
- }
-
+ public function AudioOutputChangeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, reason:String = null)
+ {
+ super(type, bubbles, cancelable);
+ this._reason = reason;
+ }
- public function get reason() : String
- {
- return this._reason;
- }
-
- }
-}
+ public function get reason():String
+ {
+ return this._reason;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/ContextMenuEvent.as b/core/src/avm2/globals/flash/events/ContextMenuEvent.as
index ef051eeadcc9..5db531bed96d 100644
--- a/core/src/avm2/globals/flash/events/ContextMenuEvent.as
+++ b/core/src/avm2/globals/flash/events/ContextMenuEvent.as
@@ -1,48 +1,59 @@
-package flash.events {
+package flash.events
+{
import flash.display.InteractiveObject;
- public class ContextMenuEvent extends Event {
+ public class ContextMenuEvent extends Event
+ {
public static const MENU_ITEM_SELECT:String = "menuItemSelect";
public static const MENU_SELECT:String = "menuSelect";
-
+
private var _mouseTarget:InteractiveObject;
private var _contextMenuOwner:InteractiveObject;
private var _isMouseTargetInaccessible:Boolean;
- public function ContextMenuEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, mouseTarget:InteractiveObject = null, contextMenuOwner:InteractiveObject = null) {
- super(type,bubbles,cancelable);
+ public function ContextMenuEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, mouseTarget:InteractiveObject = null, contextMenuOwner:InteractiveObject = null)
+ {
+ super(type, bubbles, cancelable);
this._mouseTarget = mouseTarget;
this._contextMenuOwner = contextMenuOwner;
}
- override public function clone() : Event {
+ override public function clone():Event
+ {
return new ContextMenuEvent(this.type, this.bubbles, this.cancelable, this._mouseTarget, this._contextMenuOwner);
}
- override public function toString() : String {
- return this.formatToString("ContextMenuEvent","type","bubbles","cancelable","eventPhase","mouseTarget","contextMenuOwner");
+ override public function toString():String
+ {
+ return this.formatToString("ContextMenuEvent", "type", "bubbles", "cancelable", "eventPhase", "mouseTarget", "contextMenuOwner");
}
- public function get mouseTarget() : InteractiveObject {
+ public function get mouseTarget():InteractiveObject
+ {
return this._mouseTarget;
}
- public function set mouseTarget(value:InteractiveObject) : void {
+ public function set mouseTarget(value:InteractiveObject):void
+ {
this._mouseTarget = value;
}
- public function get contextMenuOwner() : InteractiveObject {
+ public function get contextMenuOwner():InteractiveObject
+ {
return this._contextMenuOwner;
}
- public function set contextMenuOwner(value:InteractiveObject) : void {
+ public function set contextMenuOwner(value:InteractiveObject):void
+ {
this._contextMenuOwner = value;
}
- public function get isMouseTargetInaccessible() : Boolean {
+ public function get isMouseTargetInaccessible():Boolean
+ {
return this._isMouseTargetInaccessible;
}
- public function set isMouseTargetInaccessible(value:Boolean) : void {
+ public function set isMouseTargetInaccessible(value:Boolean):void
+ {
this._isMouseTargetInaccessible = value;
}
}
diff --git a/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as b/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as
index 38ad6abbd7dd..f8770fec62d8 100644
--- a/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as
+++ b/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as
@@ -1,36 +1,34 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMAuthenticationCompleteEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- import flash.utils.ByteArray;
-
- [API("667")]
- public class DRMAuthenticationCompleteEvent extends Event
- {
- // The string constant to use for the authentication complete event in the type parameter when adding and removing event listeners.
- public static const AUTHENTICATION_COMPLETE:String = "authenticationComplete";
- public var serverURL: String; // The URL of the media rights server.
- public var domain: String; // The content domain of the media rights server.
- public var token: ByteArray; // The authentication token.
+ import flash.utils.ByteArray;
- public function DRMAuthenticationCompleteEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null, inDomain:String = null, inToken:ByteArray = null)
- {
- super(type,bubbles,cancelable);
- this.serverURL = inServerURL;
- this.domain = inDomain;
- this.token = inToken;
- }
-
+ [API("667")]
+ public class DRMAuthenticationCompleteEvent extends Event
+ {
+ // The string constant to use for the authentication complete event in the type parameter when adding and removing event listeners.
+ public static const AUTHENTICATION_COMPLETE:String = "authenticationComplete";
- // Duplicates an instance of an Event subclass.
- override public function clone():Event
- {
- return new DRMAuthenticationCompleteEvent(this.type, this.bubbles, this.cancelable, this.serverURL, this.domain, this.token);
- }
- }
-}
+ public var serverURL:String; // The URL of the media rights server.
+ public var domain:String; // The content domain of the media rights server.
+ public var token:ByteArray; // The authentication token.
+
+ public function DRMAuthenticationCompleteEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null, inDomain:String = null, inToken:ByteArray = null)
+ {
+ super(type, bubbles, cancelable);
+ this.serverURL = inServerURL;
+ this.domain = inDomain;
+ this.token = inToken;
+ }
+ // Duplicates an instance of an Event subclass.
+ override public function clone():Event
+ {
+ return new DRMAuthenticationCompleteEvent(this.type, this.bubbles, this.cancelable, this.serverURL, this.domain, this.token);
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as b/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as
index 2021829a212b..442894e8c4b1 100644
--- a/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as
+++ b/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as
@@ -1,39 +1,38 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMAuthenticationErrorEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- [API("667")]
- public class DRMAuthenticationErrorEvent extends ErrorEvent
- {
- // The string constant to use for the authentication error event in the type parameter when adding and removing event listeners.
- public static const AUTHENTICATION_ERROR:String = "authenticationError";
- // A more detailed error code.
- public var subErrorID: int;
+ [API("667")]
+ public class DRMAuthenticationErrorEvent extends ErrorEvent
+ {
+ // The string constant to use for the authentication error event in the type parameter when adding and removing event listeners.
+ public static const AUTHENTICATION_ERROR:String = "authenticationError";
- // The URL of the media rights server that rejected the authentication attempt.
- public var serverURL: String;
+ // A more detailed error code.
+ public var subErrorID:int;
- // The content domain of the media rights server.
- public var domain: String;
+ // The URL of the media rights server that rejected the authentication attempt.
+ public var serverURL:String;
- public function DRMAuthenticationErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inDetail:String = "",
- inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inDomain:String = null)
- {
- super(type,bubbles,cancelable,inDetail,inErrorID);
- this.subErrorID = inSubErrorID;
- this.serverURL = inServerURL;
- this.domain = inDomain;
- }
-
- // Creates a copy of the ErrorEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new DRMAuthenticationErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID, this.subErrorID, this.serverURL, this.domain);
- }
- }
-}
+ // The content domain of the media rights server.
+ public var domain:String;
+
+ public function DRMAuthenticationErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inDetail:String = "",
+ inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inDomain:String = null)
+ {
+ super(type, bubbles, cancelable, inDetail, inErrorID);
+ this.subErrorID = inSubErrorID;
+ this.serverURL = inServerURL;
+ this.domain = inDomain;
+ }
+ // Creates a copy of the ErrorEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new DRMAuthenticationErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID, this.subErrorID, this.serverURL, this.domain);
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as b/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as
index af080373f3b3..6ca2c7c8c953 100644
--- a/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as
+++ b/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as
@@ -1,28 +1,26 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMLicenseRequestEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class DRMLicenseRequestEvent extends Event
- {
- public static const LICENSE_REQUEST:String = "licenseRequest"; // The string constant to use for the license request event in the type parameter when adding and removing event listeners.
- public var serverURL: String; // The URL which will be used to communicate with the license server
+ public class DRMLicenseRequestEvent extends Event
+ {
+ public static const LICENSE_REQUEST:String = "licenseRequest"; // The string constant to use for the license request event in the type parameter when adding and removing event listeners.
- public function DRMLicenseRequestEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null)
- {
- super(type,bubbles,cancelable);
- this.serverURL = inServerURL;
- }
-
+ public var serverURL:String; // The URL which will be used to communicate with the license server
- // Duplicates an instance of an Event subclass.
- override public function clone():Event
- {
- return new DRMLicenseRequestEvent(this.type, this.bubbles, this.cancelable, this.serverURL);
- }
- }
-}
+ public function DRMLicenseRequestEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null)
+ {
+ super(type, bubbles, cancelable);
+ this.serverURL = inServerURL;
+ }
+ // Duplicates an instance of an Event subclass.
+ override public function clone():Event
+ {
+ return new DRMLicenseRequestEvent(this.type, this.bubbles, this.cancelable, this.serverURL);
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as b/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as
index d17f071d8be4..6ad24edebc0a 100644
--- a/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as
+++ b/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as
@@ -1,44 +1,42 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMReturnVoucherCompleteEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- [API("690")]
- public class DRMReturnVoucherCompleteEvent extends Event
- {
- // The string constant to use for the return voucher complete event in the type parameter when adding and removing event listeners.
- public static const RETURN_VOUCHER_COMPLETE:String = "returnVoucherComplete";
- // The URL of the media rights server.
- public var serverURL: String;
+ [API("690")]
+ public class DRMReturnVoucherCompleteEvent extends Event
+ {
+ // The string constant to use for the return voucher complete event in the type parameter when adding and removing event listeners.
+ public static const RETURN_VOUCHER_COMPLETE:String = "returnVoucherComplete";
- // The license ID that was passed into the DRMManager.returnVoucher() call.
- public var licenseID: String;
+ // The URL of the media rights server.
+ public var serverURL:String;
- // The policyID that was passed into the DRMManager.returnVoucher() call.
- public var policyID: String;
+ // The license ID that was passed into the DRMManager.returnVoucher() call.
+ public var licenseID:String;
- // The number of vouchers that matches the criterion passed into DRMManager.returnVoucher() and subsequently returned.
- public var numberOfVouchersReturned: int;
+ // The policyID that was passed into the DRMManager.returnVoucher() call.
+ public var policyID:String;
- public function DRMReturnVoucherCompleteEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null,
- inLicenseID:String = null, inPolicyID:String = null, inNumberOfVouchersReturned:int = 0)
- {
- super(type,bubbles,cancelable);
- this.serverURL = inServerURL;
- this.licenseID = inLicenseID;
- this.policyID = inPolicyID;
- this.numberOfVouchersReturned = inNumberOfVouchersReturned;
- }
-
+ // The number of vouchers that matches the criterion passed into DRMManager.returnVoucher() and subsequently returned.
+ public var numberOfVouchersReturned:int;
- // Duplicates an instance of an Event subclass.
- override public function clone():Event
- {
- return new DRMReturnVoucherCompleteEvent(this.type, this.bubbles, this.cancelable, this.serverURL, this.licenseID, this.policyID, this.numberOfVouchersReturned);
- }
- }
-}
+ public function DRMReturnVoucherCompleteEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null,
+ inLicenseID:String = null, inPolicyID:String = null, inNumberOfVouchersReturned:int = 0)
+ {
+ super(type, bubbles, cancelable);
+ this.serverURL = inServerURL;
+ this.licenseID = inLicenseID;
+ this.policyID = inPolicyID;
+ this.numberOfVouchersReturned = inNumberOfVouchersReturned;
+ }
+ // Duplicates an instance of an Event subclass.
+ override public function clone():Event
+ {
+ return new DRMReturnVoucherCompleteEvent(this.type, this.bubbles, this.cancelable, this.serverURL, this.licenseID, this.policyID, this.numberOfVouchersReturned);
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as b/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as
index 9e4c9572ce63..5576a14ce09c 100644
--- a/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as
+++ b/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as
@@ -1,43 +1,41 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMReturnVoucherErrorEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class DRMReturnVoucherErrorEvent extends ErrorEvent
- {
- // The string constant to use for the return voucher error event in the type parameter when adding and removing event listeners.
- public static const RETURN_VOUCHER_ERROR:String = "returnVoucherError";
- // A more detailed error code.
- public var subErrorID: int;
+ public class DRMReturnVoucherErrorEvent extends ErrorEvent
+ {
+ // The string constant to use for the return voucher error event in the type parameter when adding and removing event listeners.
+ public static const RETURN_VOUCHER_ERROR:String = "returnVoucherError";
- // The URL of the media rights server for this return Voucher attempt.
- public var serverURL: String;
+ // A more detailed error code.
+ public var subErrorID:int;
- // The license ID that was passed into the returnVoucher() call that resulted in this error.
- public var licenseID: String;
+ // The URL of the media rights server for this return Voucher attempt.
+ public var serverURL:String;
- // The policy ID that was passed into the returnVoucher() call that resulted in this error.
- public var policyID: String;
+ // The license ID that was passed into the returnVoucher() call that resulted in this error.
+ public var licenseID:String;
- public function DRMReturnVoucherErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inDetail:String = "",
- inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inLicenseID:String = null, inPolicyID:String = null)
- {
- super(type,bubbles,cancelable,inDetail,inErrorID);
- this.subErrorID = inSubErrorID;
- this.serverURL = inServerURL;
- this.licenseID = inLicenseID;
- this.policyID = inPolicyID;
- }
-
+ // The policy ID that was passed into the returnVoucher() call that resulted in this error.
+ public var policyID:String;
- // Creates a copy of the ErrorEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new DRMReturnVoucherErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID, this.subErrorID, this.serverURL, this.licenseID, this.policyID);
- }
- }
-}
+ public function DRMReturnVoucherErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inDetail:String = "",
+ inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inLicenseID:String = null, inPolicyID:String = null)
+ {
+ super(type, bubbles, cancelable, inDetail, inErrorID);
+ this.subErrorID = inSubErrorID;
+ this.serverURL = inServerURL;
+ this.licenseID = inLicenseID;
+ this.policyID = inPolicyID;
+ }
+ // Creates a copy of the ErrorEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new DRMReturnVoucherErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID, this.subErrorID, this.serverURL, this.licenseID, this.policyID);
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/DataEvent.as b/core/src/avm2/globals/flash/events/DataEvent.as
index df5535156664..399fb8f578a1 100644
--- a/core/src/avm2/globals/flash/events/DataEvent.as
+++ b/core/src/avm2/globals/flash/events/DataEvent.as
@@ -1,35 +1,40 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DataEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
-package flash.events {
- public class DataEvent extends TextEvent {
- public static const DATA:String = "data"; // Defines the value of the type property of a data event object.
- public static const UPLOAD_COMPLETE_DATA:String = "uploadCompleteData"; // Defines the value of the type property of an uploadCompleteData event object.
+package flash.events
+{
+ public class DataEvent extends TextEvent
+ {
+ public static const DATA:String = "data"; // Defines the value of the type property of a data event object.
+ public static const UPLOAD_COMPLETE_DATA:String = "uploadCompleteData"; // Defines the value of the type property of an uploadCompleteData event object.
- public function DataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:String = "") {
- super(type, bubbles, cancelable, data);
- }
+ public function DataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:String = "")
+ {
+ super(type, bubbles, cancelable, data);
+ }
+ // `DataEvent.data` seems to delegate to the superclass's (TextEvent's) `TextEvent.text`.
+ public function get data():String
+ {
+ return super.text;
+ }
- // `DataEvent.data` seems to delegate to the superclass's (TextEvent's) `TextEvent.text`.
- public function get data():String {
- return super.text;
- }
+ public function set data(value:String):void
+ {
+ super.text = value;
+ }
- public function set data(value:String):void {
- super.text = value;
- }
+ // Creates a copy of the DataEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new DataEvent(this.type, this.bubbles, this.cancelable, this.data);
+ }
-
- // Creates a copy of the DataEvent object and sets the value of each property to match that of the original.
- override public function clone():Event {
- return new DataEvent(this.type, this.bubbles, this.cancelable, this.data);
- }
-
- // Returns a string that contains all the properties of the DataEvent object.
- override public function toString():String {
- return this.formatToString("DataEvent","type","bubbles","cancelable","eventPhase","data");
- }
- }
+ // Returns a string that contains all the properties of the DataEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("DataEvent", "type", "bubbles", "cancelable", "eventPhase", "data");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/ErrorEvent.as b/core/src/avm2/globals/flash/events/ErrorEvent.as
index 8f1cf9a2150b..6c9bd31e46cc 100644
--- a/core/src/avm2/globals/flash/events/ErrorEvent.as
+++ b/core/src/avm2/globals/flash/events/ErrorEvent.as
@@ -1,29 +1,31 @@
-package flash.events {
- public class ErrorEvent extends TextEvent {
+package flash.events
+{
+ public class ErrorEvent extends TextEvent
+ {
- public static const ERROR:String = "error";
+ public static const ERROR:String = "error";
- private var _errorID:int;
+ private var _errorID:int;
- public function ErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0)
- {
- super(type,bubbles,cancelable,text);
- this._errorID = id;
- }
+ public function ErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0)
+ {
+ super(type, bubbles, cancelable, text);
+ this._errorID = id;
+ }
- public function get errorID() : int
- {
- return this._errorID;
- }
+ public function get errorID():int
+ {
+ return this._errorID;
+ }
- override public function clone() : Event
- {
- return new ErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this._errorID);
- }
+ override public function clone():Event
+ {
+ return new ErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this._errorID);
+ }
- override public function toString() : String
- {
- return this.formatToString("ErrorEvent","type","bubbles","cancelable","eventPhase","text");
- }
- }
+ override public function toString():String
+ {
+ return this.formatToString("ErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/Event.as b/core/src/avm2/globals/flash/events/Event.as
index 77bbd7150537..92b6dcc614e3 100644
--- a/core/src/avm2/globals/flash/events/Event.as
+++ b/core/src/avm2/globals/flash/events/Event.as
@@ -1,8 +1,10 @@
-package flash.events {
+package flash.events
+{
[Ruffle(InstanceAllocator)]
- public class Event {
+ public class Event
+ {
public static const ACTIVATE:String = "activate";
-
+
public static const ADDED:String = "added";
public static const ADDED_TO_STAGE:String = "addedToStage";
@@ -100,7 +102,8 @@ package flash.events {
[API("682")]
public static const WORKER_STATE:String = "workerState";
- public function Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false) {
+ public function Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
+ {
this.init(type, bubbles, cancelable);
}
@@ -113,28 +116,35 @@ package flash.events {
public native function get target():Object;
public native function get type():String;
- public function clone():Event {
+ public function clone():Event
+ {
return new Event(this.type, this.bubbles, this.cancelable);
}
- public function toString(): String {
- return this.formatToString("Event","type","bubbles","cancelable","eventPhase");
+ public function toString():String
+ {
+ return this.formatToString("Event", "type", "bubbles", "cancelable", "eventPhase");
}
- public function formatToString(className:String, ... arguments):String {
+ public function formatToString(className:String, ...arguments):String
+ {
var fmt = "[" + className;
- for each (var key: String in arguments) {
+ for each (var key:String in arguments)
+ {
var val = this[key];
- if(val is String) {
+ if (val is String)
+ {
fmt += " " + key + "=\"" + val + "\"";
- } else {
+ }
+ else
+ {
fmt += " " + key + "=" + val;
}
}
return fmt += "]";
}
- public native function isDefaultPrevented(): Boolean;
+ public native function isDefaultPrevented():Boolean;
public native function preventDefault():void;
public native function stopPropagation():void;
public native function stopImmediatePropagation():void;
diff --git a/core/src/avm2/globals/flash/events/EventDispatcher.as b/core/src/avm2/globals/flash/events/EventDispatcher.as
index 88dcbc7515f2..50121612fb56 100644
--- a/core/src/avm2/globals/flash/events/EventDispatcher.as
+++ b/core/src/avm2/globals/flash/events/EventDispatcher.as
@@ -1,10 +1,13 @@
// This is a stub - the actual class is defined in `eventdispatcher.rs`
-package flash.events {
- public class EventDispatcher implements IEventDispatcher {
+package flash.events
+{
+ public class EventDispatcher implements IEventDispatcher
+ {
internal var _target:IEventDispatcher;
internal var _dispatchList:Object;
- public function EventDispatcher(target:IEventDispatcher = null) {
+ public function EventDispatcher(target:IEventDispatcher = null)
+ {
this._target = target;
}
diff --git a/core/src/avm2/globals/flash/events/EventPhase.as b/core/src/avm2/globals/flash/events/EventPhase.as
index ede3e0418cb3..20e8dbec4fb9 100644
--- a/core/src/avm2/globals/flash/events/EventPhase.as
+++ b/core/src/avm2/globals/flash/events/EventPhase.as
@@ -1,7 +1,9 @@
-package flash.events {
- public final class EventPhase {
- public static const CAPTURING_PHASE:uint = 1;
- public static const AT_TARGET:uint = 2;
- public static const BUBBLING_PHASE:uint = 3;
- }
+package flash.events
+{
+ public final class EventPhase
+ {
+ public static const CAPTURING_PHASE:uint = 1;
+ public static const AT_TARGET:uint = 2;
+ public static const BUBBLING_PHASE:uint = 3;
+ }
}
diff --git a/core/src/avm2/globals/flash/events/FocusEvent.as b/core/src/avm2/globals/flash/events/FocusEvent.as
index bdb51555680a..abb919e926bd 100644
--- a/core/src/avm2/globals/flash/events/FocusEvent.as
+++ b/core/src/avm2/globals/flash/events/FocusEvent.as
@@ -1,65 +1,63 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/FocusEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- import flash.display.InteractiveObject;
-
- public class FocusEvent extends Event
- {
- // Defines the value of the type property of a focusIn event object.
- public static const FOCUS_IN:String = "focusIn";
- // Defines the value of the type property of a focusOut event object.
- public static const FOCUS_OUT:String = "focusOut";
-
- // Defines the value of the type property of a keyFocusChange event object.
- public static const KEY_FOCUS_CHANGE:String = "keyFocusChange";
-
- // Defines the value of the type property of a mouseFocusChange event object.
- public static const MOUSE_FOCUS_CHANGE:String = "mouseFocusChange";
-
- // A reference to the complementary InteractiveObject instance that is affected by the change in focus.
- public var relatedObject: InteractiveObject;
-
- // Indicates whether the Shift key modifier is activated, in which case the value is true.
- public var shiftKey: Boolean;
-
- // The key code value of the key pressed to trigger a keyFocusChange event.
- public var keyCode: uint;
-
- // Specifies direction of focus for a focusIn event.
- [API("661")]
- public var direction: String;
-
- // If true, the relatedObject property is set to null for reasons related to security sandboxes.
- public var isRelatedObjectInaccessible: Boolean;
-
- public function FocusEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, relatedObject:InteractiveObject = null,
- shiftKey:Boolean = false, keyCode:uint = 0, direction:String = "none")
- {
- super(type,bubbles,cancelable);
- this.relatedObject = relatedObject;
- this.shiftKey = shiftKey;
- this.keyCode = keyCode;
- this.direction = direction;
- this.isRelatedObjectInaccessible = false; // Unimplemented
- }
-
-
- // Creates a copy of the FocusEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new FocusEvent(this.type, this.bubbles, this.cancelable, this.relatedObject, this.shiftKey, this.keyCode, this.direction);
- }
-
- // Returns a string that contains all the properties of the FocusEvent object.
- override public function toString():String
- {
- return this.formatToString("FocusEvent","type","bubbles","cancelable","eventPhase","relatedObject","shiftKey","keyCode");
- }
- }
+ import flash.display.InteractiveObject;
+
+ public class FocusEvent extends Event
+ {
+ // Defines the value of the type property of a focusIn event object.
+ public static const FOCUS_IN:String = "focusIn";
+
+ // Defines the value of the type property of a focusOut event object.
+ public static const FOCUS_OUT:String = "focusOut";
+
+ // Defines the value of the type property of a keyFocusChange event object.
+ public static const KEY_FOCUS_CHANGE:String = "keyFocusChange";
+
+ // Defines the value of the type property of a mouseFocusChange event object.
+ public static const MOUSE_FOCUS_CHANGE:String = "mouseFocusChange";
+
+ // A reference to the complementary InteractiveObject instance that is affected by the change in focus.
+ public var relatedObject:InteractiveObject;
+
+ // Indicates whether the Shift key modifier is activated, in which case the value is true.
+ public var shiftKey:Boolean;
+
+ // The key code value of the key pressed to trigger a keyFocusChange event.
+ public var keyCode:uint;
+
+ // Specifies direction of focus for a focusIn event.
+ [API("661")]
+ public var direction:String;
+
+ // If true, the relatedObject property is set to null for reasons related to security sandboxes.
+ public var isRelatedObjectInaccessible:Boolean;
+
+ public function FocusEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, relatedObject:InteractiveObject = null,
+ shiftKey:Boolean = false, keyCode:uint = 0, direction:String = "none")
+ {
+ super(type, bubbles, cancelable);
+ this.relatedObject = relatedObject;
+ this.shiftKey = shiftKey;
+ this.keyCode = keyCode;
+ this.direction = direction;
+ this.isRelatedObjectInaccessible = false; // Unimplemented
+ }
+
+ // Creates a copy of the FocusEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new FocusEvent(this.type, this.bubbles, this.cancelable, this.relatedObject, this.shiftKey, this.keyCode, this.direction);
+ }
+
+ // Returns a string that contains all the properties of the FocusEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("FocusEvent", "type", "bubbles", "cancelable", "eventPhase", "relatedObject", "shiftKey", "keyCode");
+ }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/events/FullScreenEvent.as b/core/src/avm2/globals/flash/events/FullScreenEvent.as
index 1ad59b1a61db..3a0bee980aa1 100644
--- a/core/src/avm2/globals/flash/events/FullScreenEvent.as
+++ b/core/src/avm2/globals/flash/events/FullScreenEvent.as
@@ -1,39 +1,40 @@
-package flash.events {
- public class FullScreenEvent extends ActivityEvent {
-
- public static const FULL_SCREEN:String = "fullScreen";
- public static const FULL_SCREEN_INTERACTIVE_ACCEPTED:String = "fullScreenInteractiveAccepted";
-
-
- private var _fullScreen:Boolean;
- private var _interactive:Boolean;
-
- public function FullScreenEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, fullScreen:Boolean = false, interactive:Boolean = false)
- {
- super(type,bubbles,cancelable);
- this._fullScreen = fullScreen;
- this._interactive = interactive;
- }
-
- override public function clone() : Event
- {
- return new FullScreenEvent(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);
- }
-
- override public function toString() : String
- {
- return this.formatToString("FullScreenEvent","type","bubbles","cancelable","eventPhase","fullScreen","interactive");
- }
-
- public function get fullScreen() : Boolean
- {
- return this._fullScreen;
- }
-
- [API("680")]
- public function get interactive() : Boolean
- {
- return this._interactive;
- }
- }
+package flash.events
+{
+ public class FullScreenEvent extends ActivityEvent
+ {
+
+ public static const FULL_SCREEN:String = "fullScreen";
+ public static const FULL_SCREEN_INTERACTIVE_ACCEPTED:String = "fullScreenInteractiveAccepted";
+
+ private var _fullScreen:Boolean;
+ private var _interactive:Boolean;
+
+ public function FullScreenEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, fullScreen:Boolean = false, interactive:Boolean = false)
+ {
+ super(type, bubbles, cancelable);
+ this._fullScreen = fullScreen;
+ this._interactive = interactive;
+ }
+
+ override public function clone():Event
+ {
+ return new FullScreenEvent(this.type, this.bubbles, this.cancelable, this.fullScreen, this.interactive);
+ }
+
+ override public function toString():String
+ {
+ return this.formatToString("FullScreenEvent", "type", "bubbles", "cancelable", "eventPhase", "fullScreen", "interactive");
+ }
+
+ public function get fullScreen():Boolean
+ {
+ return this._fullScreen;
+ }
+
+ [API("680")]
+ public function get interactive():Boolean
+ {
+ return this._interactive;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/GameInputEvent.as b/core/src/avm2/globals/flash/events/GameInputEvent.as
index 21eb62a07f51..e29b92bcd50c 100644
--- a/core/src/avm2/globals/flash/events/GameInputEvent.as
+++ b/core/src/avm2/globals/flash/events/GameInputEvent.as
@@ -1,8 +1,11 @@
-package flash.events {
- [API("688")] // the docs say 689 (AIR-only), that's wrong
- public final class GameInputEvent extends Event {
- public static const DEVICE_ADDED:String = "deviceAdded";
- public static const DEVICE_REMOVED:String = "deviceRemoved";
- public static const DEVICE_UNUSABLE:String = "deviceUnusable";
- }
+package flash.events
+{
+ [API("688")]
+ // the docs say 689 (AIR-only), that's wrong
+ public final class GameInputEvent extends Event
+ {
+ public static const DEVICE_ADDED:String = "deviceAdded";
+ public static const DEVICE_REMOVED:String = "deviceRemoved";
+ public static const DEVICE_UNUSABLE:String = "deviceUnusable";
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/events/GestureEvent.as b/core/src/avm2/globals/flash/events/GestureEvent.as
index 3a0cb0c4af73..5e3a376969da 100644
--- a/core/src/avm2/globals/flash/events/GestureEvent.as
+++ b/core/src/avm2/globals/flash/events/GestureEvent.as
@@ -1,66 +1,64 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/GestureEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class GestureEvent extends Event
- {
- public static const GESTURE_TWO_FINGER_TAP:String = "gestureTwoFingerTap"; // Defines the value of the type property of a GESTURE_TWO_FINGER_TAP gesture event object.
- // A value from the GesturePhase class indicating the progress of the touch gesture.
- public var phase: String;
+ public class GestureEvent extends Event
+ {
+ public static const GESTURE_TWO_FINGER_TAP:String = "gestureTwoFingerTap"; // Defines the value of the type property of a GESTURE_TWO_FINGER_TAP gesture event object.
- // The horizontal coordinate at which the event occurred relative to the containing sprite.
- public var localX: Number;
+ // A value from the GesturePhase class indicating the progress of the touch gesture.
+ public var phase:String;
- // The vertical coordinate at which the event occurred relative to the containing sprite.
- public var localY: Number;
+ // The horizontal coordinate at which the event occurred relative to the containing sprite.
+ public var localX:Number;
- // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false).
- public var ctrlKey: Boolean;
+ // The vertical coordinate at which the event occurred relative to the containing sprite.
+ public var localY:Number;
- // Indicates whether the Alt key is active (true) or inactive (false).
- public var altKey: Boolean;
+ // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false).
+ public var ctrlKey:Boolean;
- // Indicates whether the Shift key is active (true) or inactive (false).
- public var shiftKey: Boolean;
+ // Indicates whether the Alt key is active (true) or inactive (false).
+ public var altKey:Boolean;
- // Indicates whether the Control key is activated on Mac and whether the Ctrl key is activated on Windows or Linux.
- public var controlKey: Boolean;
+ // Indicates whether the Shift key is active (true) or inactive (false).
+ public var shiftKey:Boolean;
- public function GestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null, localX:Number = 0,
- localY:Number = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, controlKey:Boolean = false)
- {
- super(type,bubbles,cancelable);
- this.phase = phase;
- this.localX = localX;
- this.localY = localY;
- this.ctrlKey = ctrlKey;
- this.altKey = altKey;
- this.shiftKey = shiftKey;
- this.controlKey = controlKey;
- }
-
+ // Indicates whether the Control key is activated on Mac and whether the Ctrl key is activated on Windows or Linux.
+ public var controlKey:Boolean;
- // Creates a copy of the GestureEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new GestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY, this.ctrlKey, this.altKey, this.shiftKey, this.commandKey, this.controlKey);
- }
+ public function GestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null, localX:Number = 0,
+ localY:Number = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, controlKey:Boolean = false)
+ {
+ super(type, bubbles, cancelable);
+ this.phase = phase;
+ this.localX = localX;
+ this.localY = localY;
+ this.ctrlKey = ctrlKey;
+ this.altKey = altKey;
+ this.shiftKey = shiftKey;
+ this.controlKey = controlKey;
+ }
- // Returns a string that contains all the properties of the GestureEvent object.
- override public function toString():String
- {
- return this.formatToString("GestureEvent","type","bubbles","cancelable","eventPhase","phase","localX","localY","ctrlKey","altKey","shiftKey","commandKey","controlKey","stageX","stageY");
- }
+ // Creates a copy of the GestureEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new GestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY, this.ctrlKey, this.altKey, this.shiftKey, this.commandKey, this.controlKey);
+ }
- // The horizontal coordinate at which the event occurred in global Stage coordinates.
- public native function get stageX() : Number;
+ // Returns a string that contains all the properties of the GestureEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("GestureEvent", "type", "bubbles", "cancelable", "eventPhase", "phase", "localX", "localY", "ctrlKey", "altKey", "shiftKey", "commandKey", "controlKey", "stageX", "stageY");
+ }
- // The vertical coordinate at which the event occurred in global Stage coordinates.
- public native function get stageY() : Number;
- }
-}
+ // The horizontal coordinate at which the event occurred in global Stage coordinates.
+ public native function get stageX():Number;
+ // The vertical coordinate at which the event occurred in global Stage coordinates.
+ public native function get stageY():Number;
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/GesturePhase.as b/core/src/avm2/globals/flash/events/GesturePhase.as
index ae67b427dcd1..1e7fa780cabd 100644
--- a/core/src/avm2/globals/flash/events/GesturePhase.as
+++ b/core/src/avm2/globals/flash/events/GesturePhase.as
@@ -1,19 +1,19 @@
package flash.events
{
- public class GesturePhase
- {
- // A single value that encompasses all phases of simple gestures like two-finger-tap or swipe.
- public static const ALL:String = "all";
+ public class GesturePhase
+ {
+ // A single value that encompasses all phases of simple gestures like two-finger-tap or swipe.
+ public static const ALL:String = "all";
- // The beginning of a new gesture (such as touching a finger to a touch enabled screen).
- public static const BEGIN:String = "begin";
+ // The beginning of a new gesture (such as touching a finger to a touch enabled screen).
+ public static const BEGIN:String = "begin";
- // The completion of a gesture (such as lifting a finger off a touch enabled screen).
- public static const END:String = "end";
+ // The completion of a gesture (such as lifting a finger off a touch enabled screen).
+ public static const END:String = "end";
- // The progress of a gesture (such as moving a finger across a touch enabled screen).
- public static const UPDATE:String = "update";
+ // The progress of a gesture (such as moving a finger across a touch enabled screen).
+ public static const UPDATE:String = "update";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/HTTPStatusEvent.as b/core/src/avm2/globals/flash/events/HTTPStatusEvent.as
index f33440e408c3..8e422a1efabf 100644
--- a/core/src/avm2/globals/flash/events/HTTPStatusEvent.as
+++ b/core/src/avm2/globals/flash/events/HTTPStatusEvent.as
@@ -1,50 +1,48 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/HTTPStatusEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class HTTPStatusEvent extends Event
- {
- [API("661")]
- public static const HTTP_RESPONSE_STATUS:String = "httpResponseStatus"; // Unlike the httpStatus event, the httpResponseStatus event is delivered before any response data.
- public static const HTTP_STATUS:String = "httpStatus"; // The HTTPStatusEvent.HTTP_STATUS constant defines the value of the type property of a httpStatus event object.
-
- private var _status: int; // The HTTP status code returned by the server.
- [API("690")]
- public var redirected: Boolean; // Indicates whether the request was redirected.
-
- [API("661")]
- public var responseHeaders: Array; // The response headers that the response returned, as an array of URLRequestHeader objects.
- [API("661")]
- public var responseURL: String; // The URL that the response was returned from.
-
- public function HTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, redirected:Boolean = false)
- {
- super(type,bubbles,cancelable);
- this._status = status;
- this.redirected = redirected;
- }
-
-
- // Creates a copy of the HTTPStatusEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new HTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status, this.redirected);
- }
-
- // Returns a string that contains all the properties of the HTTPStatusEvent object.
- override public function toString():String
- {
- return this.formatToString("HTTPStatusEvent","type","bubbles","cancelable","eventPhase","status","redirected","responseURL");
- }
-
- public function get status() : int
- {
- return this._status;
- }
-
- }
-}
+ public class HTTPStatusEvent extends Event
+ {
+ [API("661")]
+ public static const HTTP_RESPONSE_STATUS:String = "httpResponseStatus"; // Unlike the httpStatus event, the httpResponseStatus event is delivered before any response data.
+ public static const HTTP_STATUS:String = "httpStatus"; // The HTTPStatusEvent.HTTP_STATUS constant defines the value of the type property of a httpStatus event object.
+
+ private var _status:int; // The HTTP status code returned by the server.
+ [API("690")]
+ public var redirected:Boolean; // Indicates whether the request was redirected.
+
+ [API("661")]
+ public var responseHeaders:Array; // The response headers that the response returned, as an array of URLRequestHeader objects.
+ [API("661")]
+ public var responseURL:String; // The URL that the response was returned from.
+
+ public function HTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, redirected:Boolean = false)
+ {
+ super(type, bubbles, cancelable);
+ this._status = status;
+ this.redirected = redirected;
+ }
+
+ // Creates a copy of the HTTPStatusEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new HTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status, this.redirected);
+ }
+
+ // Returns a string that contains all the properties of the HTTPStatusEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("HTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status", "redirected", "responseURL");
+ }
+
+ public function get status():int
+ {
+ return this._status;
+ }
+
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/IEventDispatcher.as b/core/src/avm2/globals/flash/events/IEventDispatcher.as
index bf92b3a448af..e63e5c99ed1c 100644
--- a/core/src/avm2/globals/flash/events/IEventDispatcher.as
+++ b/core/src/avm2/globals/flash/events/IEventDispatcher.as
@@ -1,9 +1,11 @@
-package flash.events {
- public interface IEventDispatcher {
- function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void;
- function dispatchEvent(event:Event):Boolean;
- function hasEventListener(type:String):Boolean;
- function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void;
- function willTrigger(type:String):Boolean;
- }
+package flash.events
+{
+ public interface IEventDispatcher
+ {
+ function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void;
+ function dispatchEvent(event:Event):Boolean;
+ function hasEventListener(type:String):Boolean;
+ function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void;
+ function willTrigger(type:String):Boolean;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/events/IOErrorEvent.as b/core/src/avm2/globals/flash/events/IOErrorEvent.as
index 072cb579b85a..1861d693db66 100644
--- a/core/src/avm2/globals/flash/events/IOErrorEvent.as
+++ b/core/src/avm2/globals/flash/events/IOErrorEvent.as
@@ -1,42 +1,43 @@
-package flash.events {
- public class IOErrorEvent extends ErrorEvent {
- // Defines the value of the `type` property of an `ioError` event object.
- public static const IO_ERROR:String = "ioError";
-
- // These next three are undocumented.
- public static const NETWORK_ERROR:String = "networkError";
- public static const DISK_ERROR:String = "diskError";
- public static const VERIFY_ERROR:String = "verifyError";
-
- // The standardErrorIoError event is dispatched when an error occurs while
- // reading data from the standardError stream of a NativeProcess object.
- [API("668")]
- public static const STANDARD_ERROR_IO_ERROR:String = "standardErrorIoError";
-
- // The standardInputIoError event is dispatched when an error occurs while
- // writing data to the standardInput of a NativeProcess object.
- [API("668")]
- public static const STANDARD_INPUT_IO_ERROR:String = "standardInputIoError";
-
- //The standardOutputIoError event is dispatched when an error occurs while
- // reading data from the standardOutput stream of a NativeProcess object.
- [API("668")]
- public static const STANDARD_OUTPUT_IO_ERROR:String = "standardOutputIoError";
-
-
- public function IOErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0)
- {
- super(type,bubbles,cancelable,text,id);
- }
-
- override public function clone() : Event
- {
- return new IOErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
- }
-
- override public function toString() : String
- {
- return this.formatToString("IOErrorEvent","type","bubbles","cancelable","eventPhase","text");
- }
- }
+package flash.events
+{
+ public class IOErrorEvent extends ErrorEvent
+ {
+ // Defines the value of the `type` property of an `ioError` event object.
+ public static const IO_ERROR:String = "ioError";
+
+ // These next three are undocumented.
+ public static const NETWORK_ERROR:String = "networkError";
+ public static const DISK_ERROR:String = "diskError";
+ public static const VERIFY_ERROR:String = "verifyError";
+
+ // The standardErrorIoError event is dispatched when an error occurs while
+ // reading data from the standardError stream of a NativeProcess object.
+ [API("668")]
+ public static const STANDARD_ERROR_IO_ERROR:String = "standardErrorIoError";
+
+ // The standardInputIoError event is dispatched when an error occurs while
+ // writing data to the standardInput of a NativeProcess object.
+ [API("668")]
+ public static const STANDARD_INPUT_IO_ERROR:String = "standardInputIoError";
+
+ // The standardOutputIoError event is dispatched when an error occurs while
+ // reading data from the standardOutput stream of a NativeProcess object.
+ [API("668")]
+ public static const STANDARD_OUTPUT_IO_ERROR:String = "standardOutputIoError";
+
+ public function IOErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0)
+ {
+ super(type, bubbles, cancelable, text, id);
+ }
+
+ override public function clone():Event
+ {
+ return new IOErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID);
+ }
+
+ override public function toString():String
+ {
+ return this.formatToString("IOErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/InvokeEvent.as b/core/src/avm2/globals/flash/events/InvokeEvent.as
index b82a616b70b7..3fc41f023369 100644
--- a/core/src/avm2/globals/flash/events/InvokeEvent.as
+++ b/core/src/avm2/globals/flash/events/InvokeEvent.as
@@ -6,50 +6,50 @@
package flash.events
{
- import flash.filesystem.File;
-
- [API("661")]
- public class InvokeEvent extends Event
- {
- public static const INVOKE:String = "invoke";
-
- // The array of string arguments passed during this invocation.
- private var _arguments:Array;
-
- // The reason for this InvokeEvent.
- private var _reason:String;
-
- // The directory that should be used to resolve any relative paths in the arguments array.
- private var _currentDirectory:File;
-
- public function InvokeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, dir:File = null, argv:Array = null, reason:String = "standard")
- {
- super(type, bubbles, cancelable);
- this._currentDirectory = dir;
- this._arguments = argv;
- this._reason = reason;
- }
-
- // [override] Creates a new copy of this event.
- override public function clone():Event
- {
- return new InvokeEvent(this.type, this.bubbles, this.cancelable, this.arguments, this.reason);
- }
-
- public function get arguments():Array
- {
- return this._arguments;
- }
-
- [API("664")]
- public function get reason():String
- {
- return this._reason;
- }
-
- public function get currentDirectory():File
- {
- return this._currentDirectory;
- }
- }
+ import flash.filesystem.File;
+
+ [API("661")]
+ public class InvokeEvent extends Event
+ {
+ public static const INVOKE:String = "invoke";
+
+ // The array of string arguments passed during this invocation.
+ private var _arguments:Array;
+
+ // The reason for this InvokeEvent.
+ private var _reason:String;
+
+ // The directory that should be used to resolve any relative paths in the arguments array.
+ private var _currentDirectory:File;
+
+ public function InvokeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, dir:File = null, argv:Array = null, reason:String = "standard")
+ {
+ super(type, bubbles, cancelable);
+ this._currentDirectory = dir;
+ this._arguments = argv;
+ this._reason = reason;
+ }
+
+ // [override] Creates a new copy of this event.
+ override public function clone():Event
+ {
+ return new InvokeEvent(this.type, this.bubbles, this.cancelable, this.arguments, this.reason);
+ }
+
+ public function get arguments():Array
+ {
+ return this._arguments;
+ }
+
+ [API("664")]
+ public function get reason():String
+ {
+ return this._reason;
+ }
+
+ public function get currentDirectory():File
+ {
+ return this._currentDirectory;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/KeyboardEvent.as b/core/src/avm2/globals/flash/events/KeyboardEvent.as
index 28abadf18bfd..9dd92e06eadd 100644
--- a/core/src/avm2/globals/flash/events/KeyboardEvent.as
+++ b/core/src/avm2/globals/flash/events/KeyboardEvent.as
@@ -1,106 +1,123 @@
package flash.events
{
- public class KeyboardEvent extends Event
- {
- public static const KEY_DOWN:String = "keyDown";
- public static const KEY_UP:String = "keyUp";
- private var _charCode:uint;
- private var _keyCode:uint;
- private var _keyLocation:uint;
- private var _ctrlKey:Boolean;
- private var _altKey:Boolean;
- private var _shiftKey:Boolean;
- private var _controlKey:Boolean;
- private var _commandKey:Boolean;
+ public class KeyboardEvent extends Event
+ {
+ public static const KEY_DOWN:String = "keyDown";
+ public static const KEY_UP:String = "keyUp";
+ private var _charCode:uint;
+ private var _keyCode:uint;
+ private var _keyLocation:uint;
+ private var _ctrlKey:Boolean;
+ private var _altKey:Boolean;
+ private var _shiftKey:Boolean;
+ private var _controlKey:Boolean;
+ private var _commandKey:Boolean;
- public function KeyboardEvent(type:String,
- bubbles:Boolean = true,
- cancelable:Boolean = false,
- charCodeValue:uint = 0,
- keyCodeValue:uint = 0,
- keyLocationValue:uint = 0,
- ctrlKeyValue:Boolean = false,
- altKeyValue:Boolean = false,
- shiftKeyValue:Boolean = false,
- controlKeyValue:Boolean = false,
- commandKeyValue:Boolean = false)
- {
- super(type,bubbles,cancelable);
- this._charCode = charCodeValue;
- this._keyCode = keyCodeValue;
- this._keyLocation = keyLocationValue;
- this._ctrlKey = ctrlKeyValue;
- this._altKey = altKeyValue;
- this._shiftKey = shiftKeyValue;
- this._controlKey = controlKeyValue;
- this._commandKey = commandKeyValue;
- }
+ public function KeyboardEvent(type:String,
+ bubbles:Boolean = true,
+ cancelable:Boolean = false,
+ charCodeValue:uint = 0,
+ keyCodeValue:uint = 0,
+ keyLocationValue:uint = 0,
+ ctrlKeyValue:Boolean = false,
+ altKeyValue:Boolean = false,
+ shiftKeyValue:Boolean = false,
+ controlKeyValue:Boolean = false,
+ commandKeyValue:Boolean = false)
+ {
+ super(type, bubbles, cancelable);
+ this._charCode = charCodeValue;
+ this._keyCode = keyCodeValue;
+ this._keyLocation = keyLocationValue;
+ this._ctrlKey = ctrlKeyValue;
+ this._altKey = altKeyValue;
+ this._shiftKey = shiftKeyValue;
+ this._controlKey = controlKeyValue;
+ this._commandKey = commandKeyValue;
+ }
- public function get charCode():uint {
- return this._charCode;
- }
- public function set charCode(val:uint) {
- this._charCode = val;
- }
+ public function get charCode():uint
+ {
+ return this._charCode;
+ }
+ public function set charCode(val:uint)
+ {
+ this._charCode = val;
+ }
- public function get keyCode():uint {
- return this._keyCode;
- }
- public function set keyCode(val:uint) {
- this._keyCode = val;
- }
+ public function get keyCode():uint
+ {
+ return this._keyCode;
+ }
+ public function set keyCode(val:uint)
+ {
+ this._keyCode = val;
+ }
- public function get keyLocation():uint {
- return this._keyLocation;
- }
- public function set keyLocation(val:uint):void {
- this._keyLocation = val;
- }
+ public function get keyLocation():uint
+ {
+ return this._keyLocation;
+ }
+ public function set keyLocation(val:uint):void
+ {
+ this._keyLocation = val;
+ }
- public function get ctrlKey():Boolean {
- return this._ctrlKey;
- }
- public function set ctrlKey(val:Boolean) {
- this._ctrlKey = val;
- }
+ public function get ctrlKey():Boolean
+ {
+ return this._ctrlKey;
+ }
+ public function set ctrlKey(val:Boolean)
+ {
+ this._ctrlKey = val;
+ }
- public function get altKey():Boolean {
- return this._altKey;
- }
- public function set altKey(val:Boolean) {
- this._altKey = val;
- }
+ public function get altKey():Boolean
+ {
+ return this._altKey;
+ }
+ public function set altKey(val:Boolean)
+ {
+ this._altKey = val;
+ }
- public function get shiftKey():Boolean {
- return this._shiftKey;
- }
- public function set shiftKey(val:Boolean) {
- this._shiftKey = val;
- }
+ public function get shiftKey():Boolean
+ {
+ return this._shiftKey;
+ }
+ public function set shiftKey(val:Boolean)
+ {
+ this._shiftKey = val;
+ }
- public function get controlKey():Boolean {
- return this._controlKey;
- }
- public function set controlKey(val:Boolean) {
- this._controlKey = val;
- }
+ public function get controlKey():Boolean
+ {
+ return this._controlKey;
+ }
+ public function set controlKey(val:Boolean)
+ {
+ this._controlKey = val;
+ }
- public function get commandKey():Boolean {
- return this._commandKey;
- }
- public function set commandKey(val:Boolean) {
- this._commandKey = val;
- }
+ public function get commandKey():Boolean
+ {
+ return this._commandKey;
+ }
+ public function set commandKey(val:Boolean)
+ {
+ this._commandKey = val;
+ }
- override public function clone() : Event
- {
- return new KeyboardEvent(this.type,this.bubbles,this.cancelable,this._charCode,this._keyCode,this._keyLocation,this._ctrlKey,this._altKey,this._shiftKey,this._controlKey,this._commandKey);
- }
+ override public function clone():Event
+ {
+ return new KeyboardEvent(this.type, this.bubbles, this.cancelable, this._charCode, this._keyCode, this._keyLocation, this._ctrlKey, this._altKey, this._shiftKey, this._controlKey, this._commandKey);
+ }
- override public function toString(): String {
- return this.formatToString("KeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "charCode", "keyCode", "keyLocation", "ctrlKey", "altKey", "shiftKey");
- }
+ override public function toString():String
+ {
+ return this.formatToString("KeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "charCode", "keyCode", "keyLocation", "ctrlKey", "altKey", "shiftKey");
+ }
- public native function updateAfterEvent():void;
- }
+ public native function updateAfterEvent():void;
+ }
}
diff --git a/core/src/avm2/globals/flash/events/MouseEvent.as b/core/src/avm2/globals/flash/events/MouseEvent.as
index de141dbd3f0e..fadb3726d8c3 100644
--- a/core/src/avm2/globals/flash/events/MouseEvent.as
+++ b/core/src/avm2/globals/flash/events/MouseEvent.as
@@ -1,99 +1,100 @@
-
package flash.events
{
- import flash.display.InteractiveObject;
+ import flash.display.InteractiveObject;
- public class MouseEvent extends Event
- {
- public static const CLICK:String = "click";
- public static const DOUBLE_CLICK:String = "doubleClick";
- public static const MOUSE_DOWN:String = "mouseDown";
- public static const MOUSE_MOVE:String = "mouseMove";
- public static const MOUSE_OUT:String = "mouseOut";
- public static const MOUSE_OVER:String = "mouseOver";
- public static const MOUSE_UP:String = "mouseUp";
- public static const RELEASE_OUTSIDE:String = "releaseOutside";
- public static const MOUSE_WHEEL:String = "mouseWheel";
- public static const ROLL_OUT:String = "rollOut";
- public static const ROLL_OVER:String = "rollOver";
- [API("678")]
- public static const MIDDLE_CLICK:String = "middleClick";
- [API("678")]
- public static const MIDDLE_MOUSE_DOWN:String = "middleMouseDown";
- [API("678")]
- public static const MIDDLE_MOUSE_UP:String = "middleMouseUp";
- [API("678")]
- public static const RIGHT_CLICK:String = "rightClick";
- [API("678")]
- public static const RIGHT_MOUSE_DOWN:String = "rightMouseDown";
- [API("678")]
- public static const RIGHT_MOUSE_UP:String = "rightMouseUp";
- [API("678")]
- public static const CONTEXT_MENU:String = "contextMenu";
+ public class MouseEvent extends Event
+ {
+ public static const CLICK:String = "click";
+ public static const DOUBLE_CLICK:String = "doubleClick";
+ public static const MOUSE_DOWN:String = "mouseDown";
+ public static const MOUSE_MOVE:String = "mouseMove";
+ public static const MOUSE_OUT:String = "mouseOut";
+ public static const MOUSE_OVER:String = "mouseOver";
+ public static const MOUSE_UP:String = "mouseUp";
+ public static const RELEASE_OUTSIDE:String = "releaseOutside";
+ public static const MOUSE_WHEEL:String = "mouseWheel";
+ public static const ROLL_OUT:String = "rollOut";
+ public static const ROLL_OVER:String = "rollOver";
+ [API("678")]
+ public static const MIDDLE_CLICK:String = "middleClick";
+ [API("678")]
+ public static const MIDDLE_MOUSE_DOWN:String = "middleMouseDown";
+ [API("678")]
+ public static const MIDDLE_MOUSE_UP:String = "middleMouseUp";
+ [API("678")]
+ public static const RIGHT_CLICK:String = "rightClick";
+ [API("678")]
+ public static const RIGHT_MOUSE_DOWN:String = "rightMouseDown";
+ [API("678")]
+ public static const RIGHT_MOUSE_UP:String = "rightMouseUp";
+ [API("678")]
+ public static const CONTEXT_MENU:String = "contextMenu";
- public var relatedObject: InteractiveObject;
- public var localX: Number;
- public var localY: Number;
- public var ctrlKey: Boolean;
- public var altKey: Boolean;
- public var shiftKey: Boolean;
- public var buttonDown: Boolean;
- public var delta: int;
- private var _isRelatedObjectInaccessible: Boolean;
+ public var relatedObject:InteractiveObject;
+ public var localX:Number;
+ public var localY:Number;
+ public var ctrlKey:Boolean;
+ public var altKey:Boolean;
+ public var shiftKey:Boolean;
+ public var buttonDown:Boolean;
+ public var delta:int;
+ private var _isRelatedObjectInaccessible:Boolean;
- [API("678")]
- public var movementX: Number;
- [API("678")]
- public var movementY: Number;
+ [API("678")]
+ public var movementX:Number;
+ [API("678")]
+ public var movementY:Number;
- public function MouseEvent(type:String,
- bubbles:Boolean = true,
- cancelable:Boolean = false,
- localX:Number = 0/0,
- localY:Number = 0/0,
- relatedObject:InteractiveObject = null,
- ctrlKey:Boolean = false,
- altKey:Boolean = false,
- shiftKey:Boolean = false,
- buttonDown:Boolean = false,
- delta:int = 0)
- {
- super(type,bubbles,cancelable);
- this.localX = localX;
- this.localY = localY;
- this.relatedObject = relatedObject;
- this.ctrlKey = ctrlKey;
- this.altKey = altKey;
- this.shiftKey = shiftKey;
- this.buttonDown = buttonDown;
- this.delta = delta;
+ public function MouseEvent(type:String,
+ bubbles:Boolean = true,
+ cancelable:Boolean = false,
+ localX:Number = 0 / 0,
+ localY:Number = 0 / 0,
+ relatedObject:InteractiveObject = null,
+ ctrlKey:Boolean = false,
+ altKey:Boolean = false,
+ shiftKey:Boolean = false,
+ buttonDown:Boolean = false,
+ delta:int = 0)
+ {
+ super(type, bubbles, cancelable);
+ this.localX = localX;
+ this.localY = localY;
+ this.relatedObject = relatedObject;
+ this.ctrlKey = ctrlKey;
+ this.altKey = altKey;
+ this.shiftKey = shiftKey;
+ this.buttonDown = buttonDown;
+ this.delta = delta;
- this.movementX = 0.0; // unimplemented
- this.movementY = 0.0; // unimplemented
- }
+ this.movementX = 0.0; // unimplemented
+ this.movementY = 0.0; // unimplemented
+ }
- override public function clone() : Event
- {
- // note: movementX/Y not cloned
- return new MouseEvent(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,this.delta);
- }
+ override public function clone():Event
+ {
+ // note: movementX/Y not cloned
+ return new MouseEvent(this.type, this.bubbles, this.cancelable, this.localX, this.localY, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey, this.buttonDown, this.delta);
+ }
- override public function toString() : String
- {
- return this.formatToString("MouseEvent","type","bubbles","cancelable","eventPhase","localX","localY","stageX","stageY","relatedObject","ctrlKey","altKey","shiftKey","buttonDown","delta");
- }
+ override public function toString():String
+ {
+ return this.formatToString("MouseEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "stageX", "stageY", "relatedObject", "ctrlKey", "altKey", "shiftKey", "buttonDown", "delta");
+ }
- public function get isRelatedObjectInaccessible():Boolean {
- return _isRelatedObjectInaccessible;
- }
+ public function get isRelatedObjectInaccessible():Boolean
+ {
+ return _isRelatedObjectInaccessible;
+ }
- public function set isRelatedObjectInaccessible(value:Boolean):void {
- _isRelatedObjectInaccessible = value;
- }
+ public function set isRelatedObjectInaccessible(value:Boolean):void
+ {
+ _isRelatedObjectInaccessible = value;
+ }
- public native function updateAfterEvent():void;
+ public native function updateAfterEvent():void;
- public native function get stageX() : Number;
- public native function get stageY() : Number;
- }
+ public native function get stageX():Number;
+ public native function get stageY():Number;
+ }
}
diff --git a/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as b/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as
index 3fadc03840eb..88e40fcb62db 100644
--- a/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as
+++ b/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as
@@ -6,54 +6,54 @@
package flash.events
{
- import flash.geom.Rectangle;
-
- [API("661")]
- public class NativeWindowBoundsEvent extends Event
- {
- public static const MOVING:String = "moving";
- public static const MOVE:String = "move";
- public static const RESIZING:String = "resizing";
- public static const RESIZE:String = "resize";
-
- // The bounds of the window before the change.
- private var _beforeBounds:Rectangle;
-
- // The bounds of the window after the change.
- private var _afterBounds:Rectangle;
-
- public function NativeWindowBoundsEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, beforeBounds:Rectangle = null, afterBounds:Rectangle = null)
- {
- super(type, bubbles, cancelable);
- this._beforeBounds = beforeBounds;
- this._afterBounds = afterBounds;
- }
-
- // [override] Creates a copy of the NativeWindowBoundsEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new NativeWindowBoundsEvent(this.type, this.bubbles, this.cancelable, this.beforeBounds, this.afterBounds);
- }
-
- // [override] Returns a string that contains all the properties of the NativeWindowBoundsEvent object.
- override public function toString():String
- {
- // According to the documentation, the format should be:
- // [NativeWindowBoundsEvent type=value bubbles=value cancelable=value previousDisplayState=value currentDisplayState=value]
- // but it seems that previousDisplayState and currentDisplayState doesn't exist.
- // It's likely a mistake in the documentation.
- return this.formatToString("NativeWindowBoundsEvent", "type", "bubbles", "cancelable", "beforeBounds", "afterBounds");
- }
-
- public function get beforeBounds():Rectangle
- {
- return this._beforeBounds;
- }
-
- public function get afterBounds():Rectangle
- {
- return this._afterBounds;
- }
-
- }
+ import flash.geom.Rectangle;
+
+ [API("661")]
+ public class NativeWindowBoundsEvent extends Event
+ {
+ public static const MOVING:String = "moving";
+ public static const MOVE:String = "move";
+ public static const RESIZING:String = "resizing";
+ public static const RESIZE:String = "resize";
+
+ // The bounds of the window before the change.
+ private var _beforeBounds:Rectangle;
+
+ // The bounds of the window after the change.
+ private var _afterBounds:Rectangle;
+
+ public function NativeWindowBoundsEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, beforeBounds:Rectangle = null, afterBounds:Rectangle = null)
+ {
+ super(type, bubbles, cancelable);
+ this._beforeBounds = beforeBounds;
+ this._afterBounds = afterBounds;
+ }
+
+ // [override] Creates a copy of the NativeWindowBoundsEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new NativeWindowBoundsEvent(this.type, this.bubbles, this.cancelable, this.beforeBounds, this.afterBounds);
+ }
+
+ // [override] Returns a string that contains all the properties of the NativeWindowBoundsEvent object.
+ override public function toString():String
+ {
+ // According to the documentation, the format should be:
+ // [NativeWindowBoundsEvent type=value bubbles=value cancelable=value previousDisplayState=value currentDisplayState=value]
+ // but it seems that previousDisplayState and currentDisplayState doesn't exist.
+ // It's likely a mistake in the documentation.
+ return this.formatToString("NativeWindowBoundsEvent", "type", "bubbles", "cancelable", "beforeBounds", "afterBounds");
+ }
+
+ public function get beforeBounds():Rectangle
+ {
+ return this._beforeBounds;
+ }
+
+ public function get afterBounds():Rectangle
+ {
+ return this._afterBounds;
+ }
+
+ }
}
diff --git a/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as b/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as
index 0bcdeb15b680..deaa5bd8c89c 100644
--- a/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as
+++ b/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as
@@ -5,46 +5,46 @@
package flash.events
{
- [API("661")]
- public class NativeWindowDisplayStateEvent extends Event
- {
- public static const DISPLAY_STATE_CHANGING:String = "displayStateChanging";
- public static const DISPLAY_STATE_CHANGE:String = "displayStateChange";
-
- // The display state of the NativeWindow before the change.
- private var _beforeDisplayState:String;
-
- // The display state of the NativeWindow after the change.
- private var _afterDisplayState:String;
-
- public function NativeWindowDisplayStateEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, beforeDisplayState:String = "", afterDisplayState:String = "")
- {
- super(type, bubbles, cancelable);
- this._beforeDisplayState = beforeDisplayState;
- this._afterDisplayState = afterDisplayState;
- }
-
- // [override] Creates a copy of the NativeWindowDisplayStateEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new NativeWindowDisplayStateEvent(this.type, this.bubbles, this.cancelable, this.beforeDisplayState, this.afterDisplayState);
- }
-
- // [override] Returns a string that contains all the properties of the NativeWindowDisplayStateEvent object.
- override public function toString():String
- {
- return this.formatToString("NativeWindowDisplayStateEvent", "type", "bubbles", "cancelable", "beforeDisplayState", "afterDisplayState");
- }
-
- public function get beforeDisplayState():String
- {
- return this._beforeDisplayState;
- }
-
- public function get afterDisplayState():String
- {
- return this._afterDisplayState;
- }
-
- }
+ [API("661")]
+ public class NativeWindowDisplayStateEvent extends Event
+ {
+ public static const DISPLAY_STATE_CHANGING:String = "displayStateChanging";
+ public static const DISPLAY_STATE_CHANGE:String = "displayStateChange";
+
+ // The display state of the NativeWindow before the change.
+ private var _beforeDisplayState:String;
+
+ // The display state of the NativeWindow after the change.
+ private var _afterDisplayState:String;
+
+ public function NativeWindowDisplayStateEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, beforeDisplayState:String = "", afterDisplayState:String = "")
+ {
+ super(type, bubbles, cancelable);
+ this._beforeDisplayState = beforeDisplayState;
+ this._afterDisplayState = afterDisplayState;
+ }
+
+ // [override] Creates a copy of the NativeWindowDisplayStateEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new NativeWindowDisplayStateEvent(this.type, this.bubbles, this.cancelable, this.beforeDisplayState, this.afterDisplayState);
+ }
+
+ // [override] Returns a string that contains all the properties of the NativeWindowDisplayStateEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("NativeWindowDisplayStateEvent", "type", "bubbles", "cancelable", "beforeDisplayState", "afterDisplayState");
+ }
+
+ public function get beforeDisplayState():String
+ {
+ return this._beforeDisplayState;
+ }
+
+ public function get afterDisplayState():String
+ {
+ return this._afterDisplayState;
+ }
+
+ }
}
diff --git a/core/src/avm2/globals/flash/events/NetDataEvent.as b/core/src/avm2/globals/flash/events/NetDataEvent.as
index cd941ea60c2e..57e900033a02 100644
--- a/core/src/avm2/globals/flash/events/NetDataEvent.as
+++ b/core/src/avm2/globals/flash/events/NetDataEvent.as
@@ -1,53 +1,50 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/NetDataEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class NetDataEvent extends Event
- {
- // The NetDataEvent.MEDIA_TYPE_DATA constant defines the value of the type property of the NetDataEvent object
- // dispatched when a data message in the media stream is encountered by the NetStream object.
- public static const MEDIA_TYPE_DATA:String = "mediaTypeData";
-
- // The timestamp of the data message in the media stream.
- private var _timestamp: Number;
-
- // A data object describing the message.
- private var _info: Object;
-
- public function NetDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, timestamp:Number = 0, info:Object = null)
- {
- super(type,bubbles,cancelable);
- this._timestamp = timestamp;
- this._info = info;
- }
-
-
- // Creates a copy of an NetDataEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new NetDataEvent(this.type, this.bubbles, this.cancelable, this.timestamp, this.info);
- }
-
- // Returns a string that contains all the properties of the NetDataEvent object.
- override public function toString():String
- {
- return this.formatToString("NetDataEvent","type","bubbles","cancelable","eventPhase","timestamp");
- }
-
- public function get timestamp() : Number
- {
- return this._timestamp;
- }
-
-
- public function get info() : Object
- {
- return this._info;
- }
-
- }
-}
+ public class NetDataEvent extends Event
+ {
+ // The NetDataEvent.MEDIA_TYPE_DATA constant defines the value of the type property of the NetDataEvent object
+ // dispatched when a data message in the media stream is encountered by the NetStream object.
+ public static const MEDIA_TYPE_DATA:String = "mediaTypeData";
+
+ // The timestamp of the data message in the media stream.
+ private var _timestamp:Number;
+
+ // A data object describing the message.
+ private var _info:Object;
+
+ public function NetDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, timestamp:Number = 0, info:Object = null)
+ {
+ super(type, bubbles, cancelable);
+ this._timestamp = timestamp;
+ this._info = info;
+ }
+
+ // Creates a copy of an NetDataEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new NetDataEvent(this.type, this.bubbles, this.cancelable, this.timestamp, this.info);
+ }
+
+ // Returns a string that contains all the properties of the NetDataEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("NetDataEvent", "type", "bubbles", "cancelable", "eventPhase", "timestamp");
+ }
+
+ public function get timestamp():Number
+ {
+ return this._timestamp;
+ }
+
+ public function get info():Object
+ {
+ return this._info;
+ }
+
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/NetFilterEvent.as b/core/src/avm2/globals/flash/events/NetFilterEvent.as
index 850c0e96c4c5..94aa90cc4734 100644
--- a/core/src/avm2/globals/flash/events/NetFilterEvent.as
+++ b/core/src/avm2/globals/flash/events/NetFilterEvent.as
@@ -1,23 +1,27 @@
-package flash.events {
- import flash.utils.ByteArray;
+package flash.events
+{
+ import flash.utils.ByteArray;
- public class NetFilterEvent extends Event {
- public var header: ByteArray;
- public var data: ByteArray;
+ public class NetFilterEvent extends Event
+ {
+ public var header:ByteArray;
+ public var data:ByteArray;
- public function NetFilterEvent(type: String, bubbles: Boolean = false, cancelable: Boolean = false, header: ByteArray = null, data: ByteArray = null) {
- super(type, bubbles, cancelable);
- this.header = header;
- this.data = data;
- }
+ public function NetFilterEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, header:ByteArray = null, data:ByteArray = null)
+ {
+ super(type, bubbles, cancelable);
+ this.header = header;
+ this.data = data;
+ }
- override public function clone(): Event {
- return new NetFilterEvent(this.type, this.bubbles, this.cancelable, this.header, this.data);
- }
+ override public function clone():Event
+ {
+ return new NetFilterEvent(this.type, this.bubbles, this.cancelable, this.header, this.data);
+ }
- override public function toString(): String {
- return this.formatToString("NetTransformEvent", "type", "bubbles", "cancelable", "eventPhase", "header", "data");
- }
- }
+ override public function toString():String
+ {
+ return this.formatToString("NetTransformEvent", "type", "bubbles", "cancelable", "eventPhase", "header", "data");
+ }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/events/NetStatusEvent.as b/core/src/avm2/globals/flash/events/NetStatusEvent.as
index 8ea322aaf0fb..7fc0c9feb733 100644
--- a/core/src/avm2/globals/flash/events/NetStatusEvent.as
+++ b/core/src/avm2/globals/flash/events/NetStatusEvent.as
@@ -1,34 +1,32 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/NetStatusEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class NetStatusEvent extends Event
- {
- public static const NET_STATUS:String = "netStatus"; // Defines the value of the type property of a netStatus event object.
- public var info: Object; // An object with properties that describe the object's status or error condition.
+ public class NetStatusEvent extends Event
+ {
+ public static const NET_STATUS:String = "netStatus"; // Defines the value of the type property of a netStatus event object.
- public function NetStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, info:Object = null)
- {
- super(type,bubbles,cancelable);
- this.info = info;
- }
-
+ public var info:Object; // An object with properties that describe the object's status or error condition.
- // Creates a copy of the NetStatusEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new NetStatusEvent(this.type, this.bubbles, this.cancelable, this.info);
- }
+ public function NetStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, info:Object = null)
+ {
+ super(type, bubbles, cancelable);
+ this.info = info;
+ }
- // Returns a string that contains all the properties of the NetStatusEvent object.
- override public function toString():String
- {
- return this.formatToString("NetStatusEvent","type","bubbles","cancelable","eventPhase","info");
- }
- }
-}
+ // Creates a copy of the NetStatusEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new NetStatusEvent(this.type, this.bubbles, this.cancelable, this.info);
+ }
+ // Returns a string that contains all the properties of the NetStatusEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("NetStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "info");
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as b/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as
index 18cb54db6d7c..cb0a84b06c9b 100644
--- a/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as
+++ b/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as
@@ -1,51 +1,56 @@
package flash.events
{
- [API("667")]
- public class PressAndTapGestureEvent extends GestureEvent
- {
- public static const GESTURE_PRESS_AND_TAP : String = "gesturePressAndTap";
-
- private var _tapLocalX: Number;
- private var _tapLocalY: Number;
-
-
- public function PressAndTapGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null,
- localX:Number = 0, localY:Number = 0, tapLocalX:Number = 0, tapLocalY:Number = 0,
- ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false,
- controlKey:Boolean = false) {
- super(type, bubbles, cancelable, phase, localX, localY, ctrlKey, altKey, shiftKey, controlKey);
- this._tapLocalX = tapLocalX;
- this._tapLocalY = tapLocalY;
- }
-
- override public function clone():Event {
- return new PressAndTapGestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY,
- this.tapLocalX, this.tapLocalY, this.ctrlKey, this.altKey, this.shiftKey, this.controlKey);
- }
-
- override public function toString():String
- {
- // should fail on FP too, see discussion https://github.com/ruffle-rs/ruffle/pull/12330
- return this.formatToString("GestureEvent","type","bubbles","cancelable","args");
- }
-
- public function get tapLocalX(): Number {
- return this._tapLocalX;
- }
-
- public function set tapLocalX(value: Number): void {
- this._tapLocalX = value;
- }
-
- public function get tapLocalY(): Number {
- return this._tapLocalY;
- }
-
- public function set tapLocalY(value: Number): void {
- this._tapLocalY = value;
- }
-
- public native function get tapStageX():Number;
- public native function get tapStageY():Number;
- }
+ [API("667")]
+ public class PressAndTapGestureEvent extends GestureEvent
+ {
+ public static const GESTURE_PRESS_AND_TAP:String = "gesturePressAndTap";
+
+ private var _tapLocalX:Number;
+ private var _tapLocalY:Number;
+
+ public function PressAndTapGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null,
+ localX:Number = 0, localY:Number = 0, tapLocalX:Number = 0, tapLocalY:Number = 0,
+ ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false,
+ controlKey:Boolean = false)
+ {
+ super(type, bubbles, cancelable, phase, localX, localY, ctrlKey, altKey, shiftKey, controlKey);
+ this._tapLocalX = tapLocalX;
+ this._tapLocalY = tapLocalY;
+ }
+
+ override public function clone():Event
+ {
+ return new PressAndTapGestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY,
+ this.tapLocalX, this.tapLocalY, this.ctrlKey, this.altKey, this.shiftKey, this.controlKey);
+ }
+
+ override public function toString():String
+ {
+ // should fail on FP too, see discussion https://github.com/ruffle-rs/ruffle/pull/12330
+ return this.formatToString("GestureEvent", "type", "bubbles", "cancelable", "args");
+ }
+
+ public function get tapLocalX():Number
+ {
+ return this._tapLocalX;
+ }
+
+ public function set tapLocalX(value:Number):void
+ {
+ this._tapLocalX = value;
+ }
+
+ public function get tapLocalY():Number
+ {
+ return this._tapLocalY;
+ }
+
+ public function set tapLocalY(value:Number):void
+ {
+ this._tapLocalY = value;
+ }
+
+ public native function get tapStageX():Number;
+ public native function get tapStageY():Number;
+ }
}
diff --git a/core/src/avm2/globals/flash/events/ProgressEvent.as b/core/src/avm2/globals/flash/events/ProgressEvent.as
index 4ba034ba99fb..6b115d425b9a 100644
--- a/core/src/avm2/globals/flash/events/ProgressEvent.as
+++ b/core/src/avm2/globals/flash/events/ProgressEvent.as
@@ -1,26 +1,28 @@
-package flash.events {
- public class ProgressEvent extends Event {
- public static const PROGRESS:String = "progress";
- public static const SOCKET_DATA:String = "socketData";
+package flash.events
+{
+ public class ProgressEvent extends Event
+ {
+ public static const PROGRESS:String = "progress";
+ public static const SOCKET_DATA:String = "socketData";
- public var bytesLoaded:Number;
- public var bytesTotal:Number;
+ public var bytesLoaded:Number;
+ public var bytesTotal:Number;
- public function ProgressEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bytesLoaded:Number = 0, bytesTotal:Number = 0)
- {
- super(type,bubbles,cancelable);
- this.bytesLoaded = bytesLoaded;
- this.bytesTotal = bytesTotal;
- }
+ public function ProgressEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bytesLoaded:Number = 0, bytesTotal:Number = 0)
+ {
+ super(type, bubbles, cancelable);
+ this.bytesLoaded = bytesLoaded;
+ this.bytesTotal = bytesTotal;
+ }
- override public function clone() : Event
- {
- return new ProgressEvent(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal);
- }
+ override public function clone():Event
+ {
+ return new ProgressEvent(this.type, this.bubbles, this.cancelable, this.bytesLoaded, this.bytesTotal);
+ }
- override public function toString() : String
- {
- return this.formatToString("ProgressEvent","type","bubbles","cancelable","eventPhase","bytesLoaded","bytesTotal");
- }
- }
+ override public function toString():String
+ {
+ return this.formatToString("ProgressEvent", "type", "bubbles", "cancelable", "eventPhase", "bytesLoaded", "bytesTotal");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/SampleDataEvent.as b/core/src/avm2/globals/flash/events/SampleDataEvent.as
index c4f27e853f13..a49e0fe2963b 100644
--- a/core/src/avm2/globals/flash/events/SampleDataEvent.as
+++ b/core/src/avm2/globals/flash/events/SampleDataEvent.as
@@ -1,38 +1,36 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- import flash.utils.ByteArray;
-
- public class SampleDataEvent extends Event
- {
- public static const SAMPLE_DATA:String = "sampleData"; // Defines the value of the type property of a SampleDataEvent event object.
- public var position: Number; // The position of the data in the audio stream.
- public var data: ByteArray; // The data in the audio stream.
+ import flash.utils.ByteArray;
- public function SampleDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, theposition:Number = 0, thedata:ByteArray = null)
- {
- super(type,bubbles,cancelable);
- this.position = theposition;
- this.data = thedata;
- }
-
+ public class SampleDataEvent extends Event
+ {
+ public static const SAMPLE_DATA:String = "sampleData"; // Defines the value of the type property of a SampleDataEvent event object.
- // Creates a copy of the SampleDataEvent object and sets each property's value to match that of the original.
- override public function clone():Event
- {
- return new SampleDataEvent(this.type, this.bubbles, this.cancelable, this.position, this.data);
- }
+ public var position:Number; // The position of the data in the audio stream.
+ public var data:ByteArray; // The data in the audio stream.
- // Returns a string that contains all the properties of the SampleDataEvent object.
- override public function toString():String
- {
- return this.formatToString("SampleDataEvent","type","bubbles","cancelable","eventPhase");
- }
- }
-}
+ public function SampleDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, theposition:Number = 0, thedata:ByteArray = null)
+ {
+ super(type, bubbles, cancelable);
+ this.position = theposition;
+ this.data = thedata;
+ }
+
+ // Creates a copy of the SampleDataEvent object and sets each property's value to match that of the original.
+ override public function clone():Event
+ {
+ return new SampleDataEvent(this.type, this.bubbles, this.cancelable, this.position, this.data);
+ }
+ // Returns a string that contains all the properties of the SampleDataEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("SampleDataEvent", "type", "bubbles", "cancelable", "eventPhase");
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/SecurityErrorEvent.as b/core/src/avm2/globals/flash/events/SecurityErrorEvent.as
index b29f14436eae..6bd25c39948c 100644
--- a/core/src/avm2/globals/flash/events/SecurityErrorEvent.as
+++ b/core/src/avm2/globals/flash/events/SecurityErrorEvent.as
@@ -1,21 +1,23 @@
-package flash.events {
- public class SecurityErrorEvent extends ErrorEvent {
+package flash.events
+{
+ public class SecurityErrorEvent extends ErrorEvent
+ {
- public static const SECURITY_ERROR:String = "securityError";
+ public static const SECURITY_ERROR:String = "securityError";
- public function SecurityErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0)
- {
- super(type,bubbles,cancelable,text,id);
- }
+ public function SecurityErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0)
+ {
+ super(type, bubbles, cancelable, text, id);
+ }
- override public function clone() : Event
- {
- return new SecurityErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
- }
+ override public function clone():Event
+ {
+ return new SecurityErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID);
+ }
- override public function toString() : String
- {
- return this.formatToString("SecurityErrorEvent","type","bubbles","cancelable","eventPhase","text");
- }
- }
+ override public function toString():String
+ {
+ return this.formatToString("SecurityErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/ShaderEvent.as b/core/src/avm2/globals/flash/events/ShaderEvent.as
index 25ca1f2b0489..7316505a1498 100644
--- a/core/src/avm2/globals/flash/events/ShaderEvent.as
+++ b/core/src/avm2/globals/flash/events/ShaderEvent.as
@@ -1,41 +1,39 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/ShaderEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- import flash.display.BitmapData;
- import flash.utils.ByteArray;
-
- public class ShaderEvent extends Event
- {
- public static const COMPLETE:String = "complete"; // Defines the value of the type property of a complete event object.
- public var vector: Vector.; // The Vector. object that was passed to the ShaderJob.start() method.
- public var bitmapData: BitmapData; // The BitmapData object that was passed to the ShaderJob.start() method.
- public var byteArray: ByteArray; // The ByteArray object that was passed to the ShaderJob.start() method.
+ import flash.display.BitmapData;
+ import flash.utils.ByteArray;
- public function ShaderEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bitmap:BitmapData = null, array:ByteArray = null, vector:Vector. = null)
- {
- super(type,bubbles,cancelable);
- this.bitmapData = bitmap;
- this.byteArray = array;
- this.vector = vector;
- }
-
+ public class ShaderEvent extends Event
+ {
+ public static const COMPLETE:String = "complete"; // Defines the value of the type property of a complete event object.
- // Creates a copy of the ShaderEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new ShaderEvent(this.type, this.bubbles, this.cancelable, this.vector);
- }
+ public var vector:Vector.; // The Vector. object that was passed to the ShaderJob.start() method.
+ public var bitmapData:BitmapData; // The BitmapData object that was passed to the ShaderJob.start() method.
+ public var byteArray:ByteArray; // The ByteArray object that was passed to the ShaderJob.start() method.
- // Returns a string that contains all the properties of the ShaderEvent object.
- override public function toString():String
- {
- return this.formatToString("ShaderEvent","type","bubbles","cancelable","eventPhase","bitmapData","byteArray","vector");
- }
- }
-}
+ public function ShaderEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bitmap:BitmapData = null, array:ByteArray = null, vector:Vector. = null)
+ {
+ super(type, bubbles, cancelable);
+ this.bitmapData = bitmap;
+ this.byteArray = array;
+ this.vector = vector;
+ }
+
+ // Creates a copy of the ShaderEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new ShaderEvent(this.type, this.bubbles, this.cancelable, this.vector);
+ }
+ // Returns a string that contains all the properties of the ShaderEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("ShaderEvent", "type", "bubbles", "cancelable", "eventPhase", "bitmapData", "byteArray", "vector");
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as b/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as
index 78b6b302bc81..4b062d97f46c 100644
--- a/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as
+++ b/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as
@@ -1,53 +1,52 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SoftKeyboardEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- import flash.display.InteractiveObject;
-
- public class SoftKeyboardEvent extends Event
- {
- // The SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE constant defines the value of the type property SoftKeyboardEvent object when a soft keyboard is displayed.
- public static const SOFT_KEYBOARD_ACTIVATE:String = "softKeyboardActivate";
-
- // The SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING constant defines the value of the type property SoftKeyboardEvent object immediately before a soft keyboard is displayed.
- public static const SOFT_KEYBOARD_ACTIVATING:String = "softKeyboardActivating";
-
- // The SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE constant defines the value of the type property SoftKeyboardEvent object when a soft keyboard is lowered or hidden.
- public static const SOFT_KEYBOARD_DEACTIVATE:String = "softKeyboardDeactivate";
-
- // A reference to a display list object that is related to the event.
- public var relatedObject: InteractiveObject;
-
- // Indicates whether the change in keyboard status has been triggered by an application (such as programmatic use of requestSoftKeyboard()) or by the user (such as selecting a text field).
- private var _triggerType: String;
-
- public function SoftKeyboardEvent(type:String, bubbles:Boolean, cancelable:Boolean, relatedObjectVal:InteractiveObject, triggerTypeVal:String)
- {
- super(type,bubbles,cancelable);
- this.relatedObject = relatedObjectVal;
- this._triggerType = triggerTypeVal;
- }
-
- // Creates a copy of a SoftKeyboardEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new SoftKeyboardEvent(this.type, this.bubbles, this.cancelable, this.relatedObject, this.triggerType);
- }
-
- // Returns a string that contains all the properties of the SoftKeyboardEvent object.
- override public function toString():String
- {
- return this.formatToString("SoftKeyboardEvent","type","bubbles","cancelable","eventPhase","relatedObjectVal","triggerTypeVal", "activating");
- }
-
- public function get triggerType() : String
- {
- return this._triggerType;
- }
-
- }
-}
+ import flash.display.InteractiveObject;
+
+ public class SoftKeyboardEvent extends Event
+ {
+ // The SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE constant defines the value of the type property SoftKeyboardEvent object when a soft keyboard is displayed.
+ public static const SOFT_KEYBOARD_ACTIVATE:String = "softKeyboardActivate";
+
+ // The SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING constant defines the value of the type property SoftKeyboardEvent object immediately before a soft keyboard is displayed.
+ public static const SOFT_KEYBOARD_ACTIVATING:String = "softKeyboardActivating";
+
+ // The SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE constant defines the value of the type property SoftKeyboardEvent object when a soft keyboard is lowered or hidden.
+ public static const SOFT_KEYBOARD_DEACTIVATE:String = "softKeyboardDeactivate";
+
+ // A reference to a display list object that is related to the event.
+ public var relatedObject:InteractiveObject;
+
+ // Indicates whether the change in keyboard status has been triggered by an application (such as programmatic use of requestSoftKeyboard()) or by the user (such as selecting a text field).
+ private var _triggerType:String;
+
+ public function SoftKeyboardEvent(type:String, bubbles:Boolean, cancelable:Boolean, relatedObjectVal:InteractiveObject, triggerTypeVal:String)
+ {
+ super(type, bubbles, cancelable);
+ this.relatedObject = relatedObjectVal;
+ this._triggerType = triggerTypeVal;
+ }
+
+ // Creates a copy of a SoftKeyboardEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new SoftKeyboardEvent(this.type, this.bubbles, this.cancelable, this.relatedObject, this.triggerType);
+ }
+
+ // Returns a string that contains all the properties of the SoftKeyboardEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("SoftKeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "relatedObjectVal", "triggerTypeVal", "activating");
+ }
+
+ public function get triggerType():String
+ {
+ return this._triggerType;
+ }
+
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as b/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as
index 5e6c4415af08..085f8141ff8f 100644
--- a/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as
+++ b/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as
@@ -1,13 +1,13 @@
package flash.events
{
- public class SoftKeyboardTrigger
- {
- // Indicates that ActionScript invoked the event.
- public static const CONTENT_TRIGGERED:String = "contentTriggered";
+ public class SoftKeyboardTrigger
+ {
+ // Indicates that ActionScript invoked the event.
+ public static const CONTENT_TRIGGERED:String = "contentTriggered";
- // Indicates that user action invoked the event.
- public static const USER_TRIGGERED:String = "userTriggered";
+ // Indicates that user action invoked the event.
+ public static const USER_TRIGGERED:String = "userTriggered";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as b/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as
index be01fbfe0204..9111cf4fc283 100644
--- a/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as
+++ b/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as
@@ -1,30 +1,28 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/StageVideoAvailabilityEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class StageVideoAvailabilityEvent extends Event
- {
- public const driver:String;
- public const reason:String;
- public static const STAGE_VIDEO_AVAILABILITY:String = "stageVideoAvailability"; // Defines the value of the type property of a stageVideoAvailability event object.
- private var _availability: String; // Reports the current availability of stage video using a constant of the flash.media.StageVideoAvailability class.
+ public class StageVideoAvailabilityEvent extends Event
+ {
+ public const driver:String;
+ public const reason:String;
+ public static const STAGE_VIDEO_AVAILABILITY:String = "stageVideoAvailability"; // Defines the value of the type property of a stageVideoAvailability event object.
- public function StageVideoAvailabilityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, availability:String = null)
- {
- super(type,bubbles,cancelable);
- this._availability = availability;
- }
-
+ private var _availability:String; // Reports the current availability of stage video using a constant of the flash.media.StageVideoAvailability class.
- public function get availability() : String
- {
- return this._availability;
- }
-
- }
-}
+ public function StageVideoAvailabilityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, availability:String = null)
+ {
+ super(type, bubbles, cancelable);
+ this._availability = availability;
+ }
+
+ public function get availability():String
+ {
+ return this._availability;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/StageVideoEvent.as b/core/src/avm2/globals/flash/events/StageVideoEvent.as
index 96360607d483..141177d963b9 100644
--- a/core/src/avm2/globals/flash/events/StageVideoEvent.as
+++ b/core/src/avm2/globals/flash/events/StageVideoEvent.as
@@ -1,55 +1,51 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/StageVideoEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- // According to the AS3 docs, this class is only available starting with Flash Player 10.2,
- // and some members of it are AIR-only. This is yet another case of misdocumentation.
- [API("667")]
- public class StageVideoEvent extends Event
- {
- // The StageVideoEvent.RENDER_STATE constant defines the value of the type property of a renderState event object.
- public static const RENDER_STATE:String = "renderState";
-
- // Indicates that hardware is decoding and displaying the video.
- // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.ACCELERATED
- public static const RENDER_STATUS_ACCELERATED : String = "accelerated";
-
- // Indicates that software is decoding and displaying the video.
- // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.SOFTWARE
- public static const RENDER_STATUS_SOFTWARE : String = "software";
-
- // Indicates that displaying the video using the StageVideo object is not possible.
- // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.UNAVAILABLE
- public static const RENDER_STATUS_UNAVAILABLE : String = "unavailable";
-
-
- public const codecInfo:String;
-
- private var _status: String; // The status of the StageVideo object.
- private var _colorSpace: String; // The color space used by the video being displayed in the StageVideo object.
-
- public function StageVideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null)
- {
- super(type,bubbles,cancelable);
- this._status = status;
- this._colorSpace = colorSpace;
- }
-
-
- public function get status() : String
- {
- return this._status;
- }
-
-
- public function get colorSpace() : String
- {
- return this._colorSpace;
- }
-
- }
-}
+ // According to the AS3 docs, this class is only available starting with Flash Player 10.2,
+ // and some members of it are AIR-only. This is yet another case of misdocumentation.
+ [API("667")]
+ public class StageVideoEvent extends Event
+ {
+ // The StageVideoEvent.RENDER_STATE constant defines the value of the type property of a renderState event object.
+ public static const RENDER_STATE:String = "renderState";
+
+ // Indicates that hardware is decoding and displaying the video.
+ // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.ACCELERATED
+ public static const RENDER_STATUS_ACCELERATED:String = "accelerated";
+
+ // Indicates that software is decoding and displaying the video.
+ // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.SOFTWARE
+ public static const RENDER_STATUS_SOFTWARE:String = "software";
+
+ // Indicates that displaying the video using the StageVideo object is not possible.
+ // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.UNAVAILABLE
+ public static const RENDER_STATUS_UNAVAILABLE:String = "unavailable";
+
+ public const codecInfo:String;
+
+ private var _status:String; // The status of the StageVideo object.
+ private var _colorSpace:String; // The color space used by the video being displayed in the StageVideo object.
+
+ public function StageVideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null)
+ {
+ super(type, bubbles, cancelable);
+ this._status = status;
+ this._colorSpace = colorSpace;
+ }
+
+ public function get status():String
+ {
+ return this._status;
+ }
+
+ public function get colorSpace():String
+ {
+ return this._colorSpace;
+ }
+
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/StatusEvent.as b/core/src/avm2/globals/flash/events/StatusEvent.as
index ce0bba13a440..573ba4f6fbf8 100644
--- a/core/src/avm2/globals/flash/events/StatusEvent.as
+++ b/core/src/avm2/globals/flash/events/StatusEvent.as
@@ -1,36 +1,34 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/StatusEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class StatusEvent extends Event
- {
- public static const STATUS:String = "status"; // Defines the value of the type property of a status event object.
- public var code: String; // A description of the object's status.
- public var level: String; // The category of the message, such as "status", "warning" or "error".
+ public class StatusEvent extends Event
+ {
+ public static const STATUS:String = "status"; // Defines the value of the type property of a status event object.
- public function StatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, code:String = "", level:String = "")
- {
- super(type,bubbles,cancelable);
- this.code = code;
- this.level = level;
- }
-
+ public var code:String; // A description of the object's status.
+ public var level:String; // The category of the message, such as "status", "warning" or "error".
- // Creates a copy of the StatusEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new StatusEvent(this.type, this.bubbles, this.cancelable, this.code, this.level);
- }
+ public function StatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, code:String = "", level:String = "")
+ {
+ super(type, bubbles, cancelable);
+ this.code = code;
+ this.level = level;
+ }
- // Returns a string that contains all the properties of the StatusEvent object.
- override public function toString():String
- {
- return this.formatToString("StatusEvent","type","bubbles","cancelable","eventPhase","code","level");
- }
- }
-}
+ // Creates a copy of the StatusEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new StatusEvent(this.type, this.bubbles, this.cancelable, this.code, this.level);
+ }
+ // Returns a string that contains all the properties of the StatusEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("StatusEvent", "type", "bubbles", "cancelable", "eventPhase", "code", "level");
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/SyncEvent.as b/core/src/avm2/globals/flash/events/SyncEvent.as
index 06b888b1c124..34d50a3f9052 100644
--- a/core/src/avm2/globals/flash/events/SyncEvent.as
+++ b/core/src/avm2/globals/flash/events/SyncEvent.as
@@ -1,34 +1,32 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SyncEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class SyncEvent extends Event
- {
- public static const SYNC:String = "sync"; // Defines the value of the type property of a sync event object.
- public var changeList: Array; // An array of objects; each object contains properties that describe the changed members of a remote shared object.
+ public class SyncEvent extends Event
+ {
+ public static const SYNC:String = "sync"; // Defines the value of the type property of a sync event object.
- public function SyncEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, changeList:Array = null)
- {
- super(type,bubbles,cancelable);
- this.changeList = changeList;
- }
-
+ public var changeList:Array; // An array of objects; each object contains properties that describe the changed members of a remote shared object.
- // Creates a copy of the SyncEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new SyncEvent(this.type, this.bubbles, this.cancelable, this.changeList);
- }
+ public function SyncEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, changeList:Array = null)
+ {
+ super(type, bubbles, cancelable);
+ this.changeList = changeList;
+ }
- // Returns a string that contains all the properties of the SyncEvent object.
- override public function toString():String
- {
- return this.formatToString("SyncEvent","type","bubbles","cancelable","eventPhase", "changeList");
- }
- }
-}
+ // Creates a copy of the SyncEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new SyncEvent(this.type, this.bubbles, this.cancelable, this.changeList);
+ }
+ // Returns a string that contains all the properties of the SyncEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("SyncEvent", "type", "bubbles", "cancelable", "eventPhase", "changeList");
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/TextEvent.as b/core/src/avm2/globals/flash/events/TextEvent.as
index 23f824f59ce7..ad08848d2126 100644
--- a/core/src/avm2/globals/flash/events/TextEvent.as
+++ b/core/src/avm2/globals/flash/events/TextEvent.as
@@ -1,25 +1,27 @@
-package flash.events {
- public class TextEvent extends Event {
+package flash.events
+{
+ public class TextEvent extends Event
+ {
- public static const LINK:String = "link";
- public static const TEXT_INPUT:String = "textInput";
+ public static const LINK:String = "link";
+ public static const TEXT_INPUT:String = "textInput";
- public var text:String;
+ public var text:String;
- public function TextEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "")
- {
- super(type,bubbles,cancelable);
- this.text = text;
- }
+ public function TextEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "")
+ {
+ super(type, bubbles, cancelable);
+ this.text = text;
+ }
- override public function clone() : Event
- {
- return new TextEvent(this.type,this.bubbles,this.cancelable,this.text);
- }
+ override public function clone():Event
+ {
+ return new TextEvent(this.type, this.bubbles, this.cancelable, this.text);
+ }
- override public function toString() : String
- {
- return this.formatToString("TextEvent","type","bubbles","cancelable","eventPhase","text");
- }
- }
+ override public function toString():String
+ {
+ return this.formatToString("TextEvent", "type", "bubbles", "cancelable", "eventPhase", "text");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/ThrottleEvent.as b/core/src/avm2/globals/flash/events/ThrottleEvent.as
index 797213fe2d4f..6b1ab7d7eb55 100644
--- a/core/src/avm2/globals/flash/events/ThrottleEvent.as
+++ b/core/src/avm2/globals/flash/events/ThrottleEvent.as
@@ -1,49 +1,47 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/ThrottleEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- [API("676")] // the docs say 674, that's wrong
- public class ThrottleEvent extends Event
- {
- public static const THROTTLE:String = "throttle"; // Defines the value of the type property of a ThrottleEvent event object.
-
- private var _state: String; // Describes the state that the player is entering: ThrottleType.THROTTLE, ThrottleType.PAUSE, or ThrottleType.RESUME.
- private var _targetFrameRate: Number; // The frame rate that Flash Player or AIR targets after the ThrottleEvent is dispatched.
-
- public function ThrottleEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, state:String = null, targetFrameRate:Number = 0)
- {
- super(type,bubbles,cancelable);
- this._state = state;
- this._targetFrameRate = targetFrameRate;
- }
-
-
- // Creates a copy of the ThrottleEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new ThrottleEvent(this.type, this.bubbles, this.cancelable, this.state, this.targetFrameRate);
- }
-
- // Returns a string that contains all the properties of the ThrottleEvent object.
- override public function toString():String
- {
- return this.formatToString("ThrottleEvent","type","bubbles","cancelable","eventPhase","state","targetFrameRate");
- }
-
- public function get state() : String
- {
- return this._state;
- }
-
-
- public function get targetFrameRate() : Number
- {
- return this._targetFrameRate;
- }
-
- }
-}
+ [API("676")]
+ // the docs say 674, that's wrong
+ public class ThrottleEvent extends Event
+ {
+ public static const THROTTLE:String = "throttle"; // Defines the value of the type property of a ThrottleEvent event object.
+
+ private var _state:String; // Describes the state that the player is entering: ThrottleType.THROTTLE, ThrottleType.PAUSE, or ThrottleType.RESUME.
+ private var _targetFrameRate:Number; // The frame rate that Flash Player or AIR targets after the ThrottleEvent is dispatched.
+
+ public function ThrottleEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, state:String = null, targetFrameRate:Number = 0)
+ {
+ super(type, bubbles, cancelable);
+ this._state = state;
+ this._targetFrameRate = targetFrameRate;
+ }
+
+ // Creates a copy of the ThrottleEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new ThrottleEvent(this.type, this.bubbles, this.cancelable, this.state, this.targetFrameRate);
+ }
+
+ // Returns a string that contains all the properties of the ThrottleEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("ThrottleEvent", "type", "bubbles", "cancelable", "eventPhase", "state", "targetFrameRate");
+ }
+
+ public function get state():String
+ {
+ return this._state;
+ }
+
+ public function get targetFrameRate():Number
+ {
+ return this._targetFrameRate;
+ }
+
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/ThrottleType.as b/core/src/avm2/globals/flash/events/ThrottleType.as
index 365af3dd01e9..30c8b58db3e8 100644
--- a/core/src/avm2/globals/flash/events/ThrottleType.as
+++ b/core/src/avm2/globals/flash/events/ThrottleType.as
@@ -1,17 +1,18 @@
package flash.events
{
- [API("676")] // the docs say 674, that's wrong
- public class ThrottleType
- {
- // This constant is used for the status property in the ThrottleEvent class.
- public static const PAUSE:String = "pause";
+ [API("676")]
+ // the docs say 674, that's wrong
+ public class ThrottleType
+ {
+ // This constant is used for the status property in the ThrottleEvent class.
+ public static const PAUSE:String = "pause";
- // This constant is used for the status property in the ThrottleEvent class.
- public static const RESUME:String = "resume";
+ // This constant is used for the status property in the ThrottleEvent class.
+ public static const RESUME:String = "resume";
- // This constant is used for the status property in the ThrottleEvent class.
- public static const THROTTLE:String = "throttle";
+ // This constant is used for the status property in the ThrottleEvent class.
+ public static const THROTTLE:String = "throttle";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/TimerEvent.as b/core/src/avm2/globals/flash/events/TimerEvent.as
index f068931768ec..cfe7c8668d8c 100644
--- a/core/src/avm2/globals/flash/events/TimerEvent.as
+++ b/core/src/avm2/globals/flash/events/TimerEvent.as
@@ -1,21 +1,26 @@
-package flash.events {
+package flash.events
+{
import __ruffle__.stub_method;
- public class TimerEvent extends Event{
+ public class TimerEvent extends Event
+ {
public static const TIMER:String = "timer";
public static const TIMER_COMPLETE:String = "timerComplete";
- public function TimerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean= false) {
+ public function TimerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
+ {
super(type, bubbles, cancelable);
}
-
- override public function clone() : Event {
- return new TimerEvent(this.type,this.bubbles,this.cancelable);
+
+ override public function clone():Event
+ {
+ return new TimerEvent(this.type, this.bubbles, this.cancelable);
}
// Returns a string that contains all the properties of the TimerEvent object.
- override public function toString():String {
- return this.formatToString("TimerEvent","type","bubbles","cancelable", "eventPhase");
- }
+ override public function toString():String
+ {
+ return this.formatToString("TimerEvent", "type", "bubbles", "cancelable", "eventPhase");
+ }
public native function updateAfterEvent():void;
}
diff --git a/core/src/avm2/globals/flash/events/TouchEvent.as b/core/src/avm2/globals/flash/events/TouchEvent.as
index adbcb849bfcc..9339ea1b26d5 100644
--- a/core/src/avm2/globals/flash/events/TouchEvent.as
+++ b/core/src/avm2/globals/flash/events/TouchEvent.as
@@ -2,101 +2,109 @@
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/GestureEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
-package flash.events {
+package flash.events
+{
-import flash.utils.ByteArray;
-import flash.display.InteractiveObject;
-import __ruffle__.stub_method;
+ import flash.utils.ByteArray;
+ import flash.display.InteractiveObject;
+ import __ruffle__.stub_method;
-public class TouchEvent extends Event {
- public static const PROXIMITY_BEGIN: String = "proximityBegin"; // [static] Defines the value of the type property of a PROXIMITY_BEGIN touch event object.
- public static const PROXIMITY_END: String = "proximityEnd"; // [static] Defines the value of the type property of a PROXIMITY_END touch event object.
- public static const PROXIMITY_MOVE: String = "proximityMove"; // [static] Defines the value of the type property of a PROXIMITY_MOVE touch event object.
- public static const PROXIMITY_OUT: String = "proximityOut"; // [static] Defines the value of the type property of a PROXIMITY_OUT touch event object.
- public static const PROXIMITY_OVER: String = "proximityOver"; // [static] Defines the value of the type property of a PROXIMITY_OVER touch event object.
- public static const PROXIMITY_ROLL_OUT: String = "proximityRollOut"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OUT touch event object.
- public static const PROXIMITY_ROLL_OVER: String = "proximityRollOver"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OVER touch event object.
- public static const TOUCH_BEGIN: String = "touchBegin"; // [static] Defines the value of the type property of a TOUCH_BEGIN touch event object.
- public static const TOUCH_END: String = "touchEnd"; // [static] Defines the value of the type property of a TOUCH_END touch event object.
- public static const TOUCH_MOVE: String = "touchMove"; // [static] Defines the value of the type property of a TOUCH_MOVE touch event object.
- public static const TOUCH_OUT: String = "touchOut"; // [static] Defines the value of the type property of a TOUCH_OUT touch event object.
- public static const TOUCH_OVER: String = "touchOver"; // [static] Defines the value of the type property of a TOUCH_OVER touch event object.
- public static const TOUCH_ROLL_OUT: String = "touchRollOut"; // [static] Defines the value of the type property of a TOUCH_ROLL_OUT touch event object.
- public static const TOUCH_ROLL_OVER: String = "touchRollOver"; // [static] Defines the value of the type property of a TOUCH_ROLL_OVER touch event object.
- public static const TOUCH_TAP: String = "touchTap"; // [static] Defines the value of the type property of a TOUCH_TAP touch event object.
+ public class TouchEvent extends Event
+ {
+ public static const PROXIMITY_BEGIN:String = "proximityBegin"; // [static] Defines the value of the type property of a PROXIMITY_BEGIN touch event object.
+ public static const PROXIMITY_END:String = "proximityEnd"; // [static] Defines the value of the type property of a PROXIMITY_END touch event object.
+ public static const PROXIMITY_MOVE:String = "proximityMove"; // [static] Defines the value of the type property of a PROXIMITY_MOVE touch event object.
+ public static const PROXIMITY_OUT:String = "proximityOut"; // [static] Defines the value of the type property of a PROXIMITY_OUT touch event object.
+ public static const PROXIMITY_OVER:String = "proximityOver"; // [static] Defines the value of the type property of a PROXIMITY_OVER touch event object.
+ public static const PROXIMITY_ROLL_OUT:String = "proximityRollOut"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OUT touch event object.
+ public static const PROXIMITY_ROLL_OVER:String = "proximityRollOver"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OVER touch event object.
+ public static const TOUCH_BEGIN:String = "touchBegin"; // [static] Defines the value of the type property of a TOUCH_BEGIN touch event object.
+ public static const TOUCH_END:String = "touchEnd"; // [static] Defines the value of the type property of a TOUCH_END touch event object.
+ public static const TOUCH_MOVE:String = "touchMove"; // [static] Defines the value of the type property of a TOUCH_MOVE touch event object.
+ public static const TOUCH_OUT:String = "touchOut"; // [static] Defines the value of the type property of a TOUCH_OUT touch event object.
+ public static const TOUCH_OVER:String = "touchOver"; // [static] Defines the value of the type property of a TOUCH_OVER touch event object.
+ public static const TOUCH_ROLL_OUT:String = "touchRollOut"; // [static] Defines the value of the type property of a TOUCH_ROLL_OUT touch event object.
+ public static const TOUCH_ROLL_OVER:String = "touchRollOver"; // [static] Defines the value of the type property of a TOUCH_ROLL_OVER touch event object.
+ public static const TOUCH_TAP:String = "touchTap"; // [static] Defines the value of the type property of a TOUCH_TAP touch event object.
- public var touchPointID: int; // A unique identification number (as an int) assigned to the touch point.
- public var isPrimaryTouchPoint: Boolean; // Indicates whether the first point of contact is mapped to mouse events.
- public var localX: Number; // The horizontal coordinate at which the event occurred relative to the containing sprite.
- public var localY: Number; // The vertical coordinate at which the event occurred relative to the containing sprite.
- public var sizeX: Number; // Width of the contact area.
- public var sizeY: Number; // Height of the contact area.
- public var pressure: Number; // A value between 0.0 and 1.0 indicating force of the contact with the device.
- public var relatedObject: InteractiveObject; // A reference to a display list object that is related to the 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 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.
+ public var touchPointID:int; // A unique identification number (as an int) assigned to the touch point.
+ public var isPrimaryTouchPoint:Boolean; // Indicates whether the first point of contact is mapped to mouse events.
+ public var localX:Number; // The horizontal coordinate at which the event occurred relative to the containing sprite.
+ public var localY:Number; // The vertical coordinate at which the event occurred relative to the containing sprite.
+ public var sizeX:Number; // Width of the contact area.
+ public var sizeY:Number; // Height of the contact area.
+ public var pressure:Number; // A value between 0.0 and 1.0 indicating force of the contact with the device.
+ public var relatedObject:InteractiveObject; // A reference to a display list object that is related to the 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 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.
- public function TouchEvent(type: String, bubbles: Boolean = true, cancelable: Boolean = false, touchPointID: int = 0,
- 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) {
- super(type, bubbles, cancelable);
- this.touchPointID = touchPointID;
- this.isPrimaryTouchPoint = isPrimaryTouchPoint;
- this.localX = localX;
- this.localY = localY;
- this.sizeX = sizeX;
- this.sizeY = sizeY;
- this.pressure = pressure;
- this.relatedObject = relatedObject;
- this.ctrlKey = ctrlKey;
- this.altKey = altKey;
- this.shiftKey = shiftKey;
- }
+ public function TouchEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, touchPointID:int = 0,
+ 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)
+ {
+ super(type, bubbles, cancelable);
+ this.touchPointID = touchPointID;
+ this.isPrimaryTouchPoint = isPrimaryTouchPoint;
+ this.localX = localX;
+ this.localY = localY;
+ this.sizeX = sizeX;
+ this.sizeY = sizeY;
+ this.pressure = pressure;
+ this.relatedObject = relatedObject;
+ this.ctrlKey = ctrlKey;
+ this.altKey = altKey;
+ this.shiftKey = shiftKey;
+ }
+ // [override] Creates a copy of the TouchEvent object and sets the value of each property to match that of the original.
+ 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);
+ }
- // [override] Creates a copy of the TouchEvent object and sets the value of each property to match that of the original.
- 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);
- }
+ // Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event.
+ [API("675")]
+ public function getSamples(buffer:ByteArray, append:Boolean = false):uint
+ {
+ stub_method("flash.events.TouchEvent", "getSamples");
+ return 0;
+ }
- // Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event.
- [API("675")]
- public function getSamples(buffer: ByteArray, append: Boolean = false): uint {
- stub_method("flash.events.TouchEvent", "getSamples");
- return 0;
- }
+ // Reports that the hardware button at the specified index is pressed.
+ [API("675")]
+ public function isToolButtonDown(index:int):Boolean
+ {
+ stub_method("flash.events.TouchEvent", "isToolButtonDown");
+ return false;
+ }
- // Reports that the hardware button at the specified index is pressed.
- [API("675")]
- public function isToolButtonDown(index: int): Boolean {
- stub_method("flash.events.TouchEvent", "isToolButtonDown");
- return false;
- }
+ // [override] Returns a string that contains all the properties of the TouchEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID",
+ "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey",
+ "altKey", "shiftKey", "isRelatedObjectInaccessible", "stageX", "stageY");
+ }
- // [override] Returns a string that contains all the properties of the TouchEvent object.
- override public function toString(): String {
- return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID",
- "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey",
- "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.
+ public native function updateAfterEvent():void;
- // Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified.
- public native function updateAfterEvent(): void;
+ public function get stageX():Number
+ {
+ return this._stageX;
+ }
- public function get stageX(): Number {
- return this._stageX;
- }
-
- public function get stageY(): Number {
- return this._stageY;
- }
-}
+ public function get stageY():Number
+ {
+ return this._stageY;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/events/TransformGestureEvent.as b/core/src/avm2/globals/flash/events/TransformGestureEvent.as
index 18a2c8d03d36..95edbdf02c12 100644
--- a/core/src/avm2/globals/flash/events/TransformGestureEvent.as
+++ b/core/src/avm2/globals/flash/events/TransformGestureEvent.as
@@ -1,94 +1,108 @@
package flash.events
{
- public class TransformGestureEvent extends GestureEvent
- {
- public static const GESTURE_PAN : String = "gesturePan";
- public static const GESTURE_ROTATE : String = "gestureRotate";
- public static const GESTURE_SWIPE : String = "gestureSwipe";
- public static const GESTURE_ZOOM : String = "gestureZoom";
-
- private var _offsetX: Number;
- private var _offsetY: Number;
- private var _rotation: Number;
- private var _scaleX: Number;
- private var _scaleY: Number;
- private var _velocity: Number;
-
-
- public function TransformGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false,
- phase:String = null, localX:Number = 0, localY:Number = 0,
- scaleX:Number = 1.0, scaleY:Number = 1.0,
- rotation:Number = 0, offsetX:Number = 0, offsetY:Number = 0,
- ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false,
- controlKey:Boolean = false, velocity:Number = 0) {
- super(type, bubbles, cancelable, phase, localX, localY, ctrlKey, altKey, shiftKey, controlKey);
- this._offsetX = offsetX
- this._offsetY = offsetY
- this._rotation = rotation
- this._scaleX = scaleX
- this._scaleY = scaleY
- this._velocity = velocity
- }
-
- override public function clone():Event {
- return new TransformGestureEvent(this.type, this.bubbles, this.cancelable, this.phase,
- this.localX, this.localY, this.scaleX, this.scaleY, this.rotation,
- this.offsetX, this.offsetY, this.ctrlKey, this.altKey, this.shiftKey,
- this.controlKey, this.velocity);
- }
-
- override public function toString():String
- {
- // should fail on FP too, see discussion https://github.com/ruffle-rs/ruffle/pull/12330
- return this.formatToString("TransformGestureEvent","type","bubbles","cancelable","args");
- }
-
- public function get offsetX(): Number {
- return this._offsetX;
- }
-
- public function set offsetX(value: Number): void {
- this._offsetX = value;
- }
-
- public function get offsetY(): Number {
- return this._offsetY;
- }
-
- public function set offsetY(value: Number): void {
- this._offsetY = value;
- }
-
- public function get rotation(): Number {
- return this._rotation;
- }
-
- public function set rotation(value: Number): void {
- this._rotation = value;
- }
-
- public function get scaleX(): Number {
- return this._scaleX;
- }
-
- public function set scaleX(value: Number): void {
- this._scaleX = value;
- }
-
- public function get scaleY(): Number {
- return this._scaleY;
- }
-
- public function set scaleY(value: Number): void {
- this._scaleY = value;
- }
-
- public function get velocity(): Number {
- return this._velocity;
- }
-
- public function set velocity(value: Number): void {
- this._velocity = value;
- }
- }
+ public class TransformGestureEvent extends GestureEvent
+ {
+ public static const GESTURE_PAN:String = "gesturePan";
+ public static const GESTURE_ROTATE:String = "gestureRotate";
+ public static const GESTURE_SWIPE:String = "gestureSwipe";
+ public static const GESTURE_ZOOM:String = "gestureZoom";
+
+ private var _offsetX:Number;
+ private var _offsetY:Number;
+ private var _rotation:Number;
+ private var _scaleX:Number;
+ private var _scaleY:Number;
+ private var _velocity:Number;
+
+ public function TransformGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false,
+ phase:String = null, localX:Number = 0, localY:Number = 0,
+ scaleX:Number = 1.0, scaleY:Number = 1.0,
+ rotation:Number = 0, offsetX:Number = 0, offsetY:Number = 0,
+ ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false,
+ controlKey:Boolean = false, velocity:Number = 0)
+ {
+ super(type, bubbles, cancelable, phase, localX, localY, ctrlKey, altKey, shiftKey, controlKey);
+ this._offsetX = offsetX;
+ this._offsetY = offsetY;
+ this._rotation = rotation;
+ this._scaleX = scaleX;
+ this._scaleY = scaleY;
+ this._velocity = velocity;
+
+ }
+
+ override public function clone():Event
+ {
+ return new TransformGestureEvent(this.type, this.bubbles, this.cancelable, this.phase,
+ this.localX, this.localY, this.scaleX, this.scaleY, this.rotation,
+ this.offsetX, this.offsetY, this.ctrlKey, this.altKey, this.shiftKey,
+ this.controlKey, this.velocity);
+ }
+
+ override public function toString():String
+ {
+ // should fail on FP too, see discussion https://github.com/ruffle-rs/ruffle/pull/12330
+ return this.formatToString("TransformGestureEvent", "type", "bubbles", "cancelable", "args");
+ }
+
+ public function get offsetX():Number
+ {
+ return this._offsetX;
+ }
+
+ public function set offsetX(value:Number):void
+ {
+ this._offsetX = value;
+ }
+
+ public function get offsetY():Number
+ {
+ return this._offsetY;
+ }
+
+ public function set offsetY(value:Number):void
+ {
+ this._offsetY = value;
+ }
+
+ public function get rotation():Number
+ {
+ return this._rotation;
+ }
+
+ public function set rotation(value:Number):void
+ {
+ this._rotation = value;
+ }
+
+ public function get scaleX():Number
+ {
+ return this._scaleX;
+ }
+
+ public function set scaleX(value:Number):void
+ {
+ this._scaleX = value;
+ }
+
+ public function get scaleY():Number
+ {
+ return this._scaleY;
+ }
+
+ public function set scaleY(value:Number):void
+ {
+ this._scaleY = value;
+ }
+
+ public function get velocity():Number
+ {
+ return this._velocity;
+ }
+
+ public function set velocity(value:Number):void
+ {
+ this._velocity = value;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as b/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as
index 901181c1f50f..5abdef6f6847 100644
--- a/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as
+++ b/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as
@@ -1,39 +1,37 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/UncaughtErrorEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
- public class UncaughtErrorEvent extends ErrorEvent
- {
- public static const UNCAUGHT_ERROR:String = "uncaughtError"; // Defines the value of the type property of an uncaughtError event object.
+ public class UncaughtErrorEvent extends ErrorEvent
+ {
+ public static const UNCAUGHT_ERROR:String = "uncaughtError"; // Defines the value of the type property of an uncaughtError event object.
- private var _error: *; // The error object associated with the uncaught error.
+ private var _error:*; // The error object associated with the uncaught error.
- public function UncaughtErrorEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = true, error_in:* = null)
- {
- super(type,bubbles,cancelable);
- this._error = error_in;
- }
-
+ public function UncaughtErrorEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = true, error_in:* = null)
+ {
+ super(type, bubbles, cancelable);
+ this._error = error_in;
+ }
- // Creates a copy of the UncaughtErrorEvent object and sets the value of each property to match that of the original.
- override public function clone():Event
- {
- return new UncaughtErrorEvent(this.type, this.bubbles, this.cancelable, this.error);
- }
+ // Creates a copy of the UncaughtErrorEvent object and sets the value of each property to match that of the original.
+ override public function clone():Event
+ {
+ return new UncaughtErrorEvent(this.type, this.bubbles, this.cancelable, this.error);
+ }
- // Returns a string that contains all the properties of the UncaughtErrorEvent object.
- override public function toString():String
- {
- return this.formatToString("UncaughtErrorEvent","type","bubbles","cancelable","eventPhase","error");
- }
+ // Returns a string that contains all the properties of the UncaughtErrorEvent object.
+ override public function toString():String
+ {
+ return this.formatToString("UncaughtErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "error");
+ }
- public function get error() : *
- {
- return this._error;
- }
-
- }
-}
+ public function get error():*
+ {
+ return this._error;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as b/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as
index bdaa9e9b30bc..e2c55bb3a1c9 100644
--- a/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as
+++ b/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as
@@ -1,7 +1,10 @@
-package flash.events {
- public class UncaughtErrorEvents extends EventDispatcher {
- public function UncaughtErrorEvents() {
+package flash.events
+{
+ public class UncaughtErrorEvents extends EventDispatcher
+ {
+ public function UncaughtErrorEvents()
+ {
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/events/VideoEvent.as b/core/src/avm2/globals/flash/events/VideoEvent.as
index 5c5204d72159..212b98a2b9bc 100644
--- a/core/src/avm2/globals/flash/events/VideoEvent.as
+++ b/core/src/avm2/globals/flash/events/VideoEvent.as
@@ -1,32 +1,30 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/VideoEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class VideoEvent extends Event
- {
- public const codecInfo:String;
- public static const RENDER_STATE:String = "renderState"; // Defines the value of the type property of a renderState event object.
- public static const RENDER_STATUS_ACCELERATED:String = "accelerated"; // For internal use only.
- public static const RENDER_STATUS_SOFTWARE:String = "software"; // For internal use only.
- public static const RENDER_STATUS_UNAVAILABLE:String = "unavailable"; // For internal use only.
- private var _status: String; // Returns the rendering status of the VideoEvent object.
+ public class VideoEvent extends Event
+ {
+ public const codecInfo:String;
+ public static const RENDER_STATE:String = "renderState"; // Defines the value of the type property of a renderState event object.
+ public static const RENDER_STATUS_ACCELERATED:String = "accelerated"; // For internal use only.
+ public static const RENDER_STATUS_SOFTWARE:String = "software"; // For internal use only.
+ public static const RENDER_STATUS_UNAVAILABLE:String = "unavailable"; // For internal use only.
- public function VideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null)
- {
- super(type,bubbles,cancelable);
- this._status = status;
- }
-
+ private var _status:String; // Returns the rendering status of the VideoEvent object.
- public function get status() : String
- {
- return this._status;
- }
-
- }
-}
+ public function VideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null)
+ {
+ super(type, bubbles, cancelable);
+ this._status = status;
+ }
+
+ public function get status():String
+ {
+ return this._status;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/events/VideoTextureEvent.as b/core/src/avm2/globals/flash/events/VideoTextureEvent.as
index 07325473f4c4..e8a8d1bbf888 100644
--- a/core/src/avm2/globals/flash/events/VideoTextureEvent.as
+++ b/core/src/avm2/globals/flash/events/VideoTextureEvent.as
@@ -1,37 +1,36 @@
-// The initial version of this file was autogenerated from the official AS3 reference at
+// The initial version of this file was autogenerated from the official AS3 reference at
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/VideoTextureEvent.html
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
package flash.events
{
-
- public class VideoTextureEvent extends Event
- {
- [API("706")]
- public static const RENDER_STATE:String = "renderState"; // The VideoTextureEvent.RENDER_STATE constant defines the value of the type property of a renderState event object.
- private var _status: String; // The status of the VideoTexture object.
- private var _colorSpace: String; // The color space used by the video being displayed in the VideoTexture object.
+ public class VideoTextureEvent extends Event
+ {
+ [API("706")]
+ public static const RENDER_STATE:String = "renderState"; // The VideoTextureEvent.RENDER_STATE constant defines the value of the type property of a renderState event object.
- public function VideoTextureEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null)
- {
- super(type,bubbles,cancelable);
- this._status = status;
- this._colorSpace = colorSpace;
- }
+ private var _status:String; // The status of the VideoTexture object.
+ private var _colorSpace:String; // The color space used by the video being displayed in the VideoTexture object.
- [API("706")]
- public function get status() : String
- {
- return this._status;
- }
-
- [API("706")]
- public function get colorSpace() : String
- {
- return this._colorSpace;
- }
-
- }
-}
+ public function VideoTextureEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null)
+ {
+ super(type, bubbles, cancelable);
+ this._status = status;
+ this._colorSpace = colorSpace;
+ }
+
+ [API("706")]
+ public function get status():String
+ {
+ return this._status;
+ }
+ [API("706")]
+ public function get colorSpace():String
+ {
+ return this._colorSpace;
+ }
+
+ }
+}
diff --git a/core/src/avm2/globals/flash/external/ExternalInterface.as b/core/src/avm2/globals/flash/external/ExternalInterface.as
index f427ad821553..6e2aa8855164 100644
--- a/core/src/avm2/globals/flash/external/ExternalInterface.as
+++ b/core/src/avm2/globals/flash/external/ExternalInterface.as
@@ -1,15 +1,15 @@
package flash.external
{
- import __ruffle__.stub_getter;
-
- public final class ExternalInterface
- {
- public static native function get available(): Boolean;
-
- public static native function addCallback(functionName: String, closure: Function) : void;
-
- public static native function call(functionName: String, ... arguments) : *;
-
- public static native function get objectID():String;
- }
+ import __ruffle__.stub_getter;
+
+ public final class ExternalInterface
+ {
+ public static native function get available():Boolean;
+
+ public static native function addCallback(functionName:String, closure:Function):void;
+
+ public static native function call(functionName:String, ...arguments):*;
+
+ public static native function get objectID():String;
+ }
}
diff --git a/core/src/avm2/globals/flash/filesystem/File.as b/core/src/avm2/globals/flash/filesystem/File.as
index 868956c40bf1..e51e54544ef7 100644
--- a/core/src/avm2/globals/flash/filesystem/File.as
+++ b/core/src/avm2/globals/flash/filesystem/File.as
@@ -1,36 +1,43 @@
-package flash.filesystem {
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
-
- import flash.net.FileReference;
-
- [API("661")]
- public class File extends FileReference {
- private static var _applicationDirectory:File = null;
-
- public function File(path:String = null) {
- stub_constructor("flash.filesystem.File");
- }
-
- public static function get applicationDirectory():File {
- if (_applicationDirectory === null) {
- _applicationDirectory = new File();
- }
-
- return _applicationDirectory;
- }
-
- public function resolvePath(path:String):File {
- stub_method("flash.filesystem.File", "resolvePath");
-
- return new File();
- }
-
- public function get exists():Boolean {
- stub_getter("flash.filesystem.File", "exists");
-
- return false;
- }
- }
+package flash.filesystem
+{
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
+
+ import flash.net.FileReference;
+
+ [API("661")]
+ public class File extends FileReference
+ {
+ private static var _applicationDirectory:File = null;
+
+ public function File(path:String = null)
+ {
+ stub_constructor("flash.filesystem.File");
+ }
+
+ public static function get applicationDirectory():File
+ {
+ if (_applicationDirectory === null)
+ {
+ _applicationDirectory = new File();
+ }
+
+ return _applicationDirectory;
+ }
+
+ public function resolvePath(path:String):File
+ {
+ stub_method("flash.filesystem.File", "resolvePath");
+
+ return new File();
+ }
+
+ public function get exists():Boolean
+ {
+ stub_getter("flash.filesystem.File", "exists");
+
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/filters/BevelFilter.as b/core/src/avm2/globals/flash/filters/BevelFilter.as
index 27bb9e2d697a..8e631903990a 100644
--- a/core/src/avm2/globals/flash/filters/BevelFilter.as
+++ b/core/src/avm2/globals/flash/filters/BevelFilter.as
@@ -1,32 +1,35 @@
-package flash.filters {
- public final class BevelFilter extends BitmapFilter {
- public var angle : Number;
- public var blurX : Number;
- public var blurY : Number;
- public var distance : Number;
- public var highlightAlpha : Number;
- public var highlightColor : uint;
- public var knockout : Boolean;
- public var quality : int;
- public var shadowAlpha : Number;
- public var shadowColor : uint;
- public var strength : Number;
- public var type : String;
+package flash.filters
+{
+ public final class BevelFilter extends BitmapFilter
+ {
+ public var angle:Number;
+ public var blurX:Number;
+ public var blurY:Number;
+ public var distance:Number;
+ public var highlightAlpha:Number;
+ public var highlightColor:uint;
+ public var knockout:Boolean;
+ public var quality:int;
+ public var shadowAlpha:Number;
+ public var shadowColor:uint;
+ public var strength:Number;
+ public var type:String;
public function BevelFilter(
- distance:Number = 4.0,
- angle:Number = 45,
- highlightColor:uint = 0xFFFFFF,
- highlightAlpha:Number = 1.0,
- shadowColor:uint = 0x000000,
- shadowAlpha:Number = 1.0,
- blurX:Number = 4.0,
- blurY:Number = 4.0,
- strength:Number = 1,
- quality:int = 1,
- type:String = "inner",
- knockout:Boolean = false
- ) {
+ distance:Number = 4.0,
+ angle:Number = 45,
+ highlightColor:uint = 0xFFFFFF,
+ highlightAlpha:Number = 1.0,
+ shadowColor:uint = 0x000000,
+ shadowAlpha:Number = 1.0,
+ blurX:Number = 4.0,
+ blurY:Number = 4.0,
+ strength:Number = 1,
+ quality:int = 1,
+ type:String = "inner",
+ knockout:Boolean = false
+ )
+ {
this.angle = angle;
this.blurX = blurX;
this.blurY = blurY;
@@ -41,21 +44,22 @@
this.type = type;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new BevelFilter(
- this.distance,
- this.angle,
- this.highlightColor,
- this.highlightAlpha,
- this.shadowColor,
- this.shadowAlpha,
- this.blurX,
- this.blurY,
- this.strength,
- this.quality,
- this.type,
- this.knockout
- );
+ this.distance,
+ this.angle,
+ this.highlightColor,
+ this.highlightAlpha,
+ this.shadowColor,
+ this.shadowAlpha,
+ this.blurX,
+ this.blurY,
+ this.strength,
+ this.quality,
+ this.type,
+ this.knockout
+ );
}
}
}
diff --git a/core/src/avm2/globals/flash/filters/BitmapFilter.as b/core/src/avm2/globals/flash/filters/BitmapFilter.as
index 5814e20846d5..492ca0c31e9e 100644
--- a/core/src/avm2/globals/flash/filters/BitmapFilter.as
+++ b/core/src/avm2/globals/flash/filters/BitmapFilter.as
@@ -1,6 +1,9 @@
-package flash.filters {
- public class BitmapFilter {
- public function clone(): BitmapFilter {
+package flash.filters
+{
+ public class BitmapFilter
+ {
+ public function clone():BitmapFilter
+ {
return null;
}
}
diff --git a/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as b/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as
index 3c54242ede20..76f45aabfab5 100644
--- a/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as
+++ b/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as
@@ -1,7 +1,9 @@
-package flash.filters {
- public final class BitmapFilterQuality {
- public static const LOW: int = 1;
- public static const MEDIUM: int = 2;
- public static const HIGH: int = 3;
- }
+package flash.filters
+{
+ public final class BitmapFilterQuality
+ {
+ public static const LOW:int = 1;
+ public static const MEDIUM:int = 2;
+ public static const HIGH:int = 3;
+ }
}
diff --git a/core/src/avm2/globals/flash/filters/BitmapFilterType.as b/core/src/avm2/globals/flash/filters/BitmapFilterType.as
index 6b19cf284fb2..39b97096a813 100644
--- a/core/src/avm2/globals/flash/filters/BitmapFilterType.as
+++ b/core/src/avm2/globals/flash/filters/BitmapFilterType.as
@@ -1,7 +1,9 @@
-package flash.filters {
- public final class BitmapFilterType {
- public static const INNER: String = "inner";
- public static const OUTER: String = "outer";
- public static const FULL: String = "full";
- }
+package flash.filters
+{
+ public final class BitmapFilterType
+ {
+ public static const INNER:String = "inner";
+ public static const OUTER:String = "outer";
+ public static const FULL:String = "full";
+ }
}
diff --git a/core/src/avm2/globals/flash/filters/BlurFilter.as b/core/src/avm2/globals/flash/filters/BlurFilter.as
index edfc0960886e..48a05942e01e 100644
--- a/core/src/avm2/globals/flash/filters/BlurFilter.as
+++ b/core/src/avm2/globals/flash/filters/BlurFilter.as
@@ -1,16 +1,20 @@
-package flash.filters {
- public final class BlurFilter extends BitmapFilter {
- public var blurX: Number;
- public var blurY: Number;
- public var quality: int;
+package flash.filters
+{
+ public final class BlurFilter extends BitmapFilter
+ {
+ public var blurX:Number;
+ public var blurY:Number;
+ public var quality:int;
- public function BlurFilter(blurX: Number = 4.0, blurY: Number = 4.0, quality: int = 1) {
+ public function BlurFilter(blurX:Number = 4.0, blurY:Number = 4.0, quality:int = 1)
+ {
this.blurX = blurX;
this.blurY = blurY;
this.quality = quality;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new BlurFilter(this.blurX, this.blurY, this.quality);
}
}
diff --git a/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as b/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as
index 87bb2f56a167..2bddccb695f7 100644
--- a/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as
+++ b/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as
@@ -1,15 +1,19 @@
-package flash.filters {
- public final class ColorMatrixFilter extends BitmapFilter {
- private var _matrix: Array;
+package flash.filters
+{
+ public final class ColorMatrixFilter extends BitmapFilter
+ {
+ private var _matrix:Array;
- public function ColorMatrixFilter(matrix: Array = null) {
- if (matrix == null) {
+ public function ColorMatrixFilter(matrix:Array = null)
+ {
+ if (matrix == null)
+ {
matrix = [
- 1, 0, 0, 0, 0,
- 0, 1, 0, 0, 0,
- 0, 0, 1, 0, 0,
- 0, 0, 0, 1, 0
- ];
+ 1, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0,
+ 0, 0, 1, 0, 0,
+ 0, 0, 0, 1, 0
+ ];
}
this.matrix = matrix;
}
@@ -20,15 +24,18 @@
// extend `Array` and declare a *public* 'concat' method with a
// different signature.
- public function get matrix(): Array {
+ public function get matrix():Array
+ {
return this._matrix.AS3::concat();
}
- public function set matrix(matrix:Array):void {
+ public function set matrix(matrix:Array):void
+ {
this._matrix = matrix.AS3::concat();
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new ColorMatrixFilter(this.matrix.AS3::concat());
}
}
diff --git a/core/src/avm2/globals/flash/filters/ConvolutionFilter.as b/core/src/avm2/globals/flash/filters/ConvolutionFilter.as
index 9ba1f68f04e4..345039237a52 100644
--- a/core/src/avm2/globals/flash/filters/ConvolutionFilter.as
+++ b/core/src/avm2/globals/flash/filters/ConvolutionFilter.as
@@ -1,26 +1,29 @@
-package flash.filters {
- public final class ConvolutionFilter extends BitmapFilter {
- public var alpha : Number;
- public var bias : Number;
- public var clamp : Boolean;
- public var color : uint;
- public var divisor : Number;
- public var matrix : Array;
- public var matrixX : Number;
- public var matrixY : Number;
- public var preserveAlpha : Boolean;
+package flash.filters
+{
+ public final class ConvolutionFilter extends BitmapFilter
+ {
+ public var alpha:Number;
+ public var bias:Number;
+ public var clamp:Boolean;
+ public var color:uint;
+ public var divisor:Number;
+ public var matrix:Array;
+ public var matrixX:Number;
+ public var matrixY:Number;
+ public var preserveAlpha:Boolean;
public function ConvolutionFilter(
- matrixX:Number = 0,
- matrixY:Number = 0,
- matrix:Array = null,
- divisor:Number = 1.0,
- bias:Number = 0.0,
- preserveAlpha:Boolean = true,
- clamp:Boolean = true,
- color:uint = 0,
- alpha:Number = 0.0
- ) {
+ matrixX:Number = 0,
+ matrixY:Number = 0,
+ matrix:Array = null,
+ divisor:Number = 1.0,
+ bias:Number = 0.0,
+ preserveAlpha:Boolean = true,
+ clamp:Boolean = true,
+ color:uint = 0,
+ alpha:Number = 0.0
+ )
+ {
this.alpha = alpha;
this.bias = bias;
this.clamp = clamp;
@@ -32,7 +35,8 @@
this.preserveAlpha = preserveAlpha;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new ConvolutionFilter(this.matrixX, this.matrixY, this.matrixull, this.divisor, this.bias, this.preserveAlpharue, this.clamprue, this.color, this.alpha);
}
}
diff --git a/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as b/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as
index 6b1f77eb03e0..fd36618ad5de 100644
--- a/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as
+++ b/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as
@@ -1,27 +1,30 @@
-package flash.filters {
+package flash.filters
+{
import flash.display.BitmapData;
import flash.geom.Point;
- public final class DisplacementMapFilter extends BitmapFilter {
- public var alpha: Number;
- public var color: uint;
- public var componentX: uint;
- public var componentY: uint;
- public var mapBitmap: BitmapData;
- public var mapPoint: Point;
- public var mode: String;
- public var scaleX: Number;
- public var scaleY: Number;
+ public final class DisplacementMapFilter extends BitmapFilter
+ {
+ public var alpha:Number;
+ public var color:uint;
+ public var componentX:uint;
+ public var componentY:uint;
+ public var mapBitmap:BitmapData;
+ public var mapPoint:Point;
+ public var mode:String;
+ public var scaleX:Number;
+ public var scaleY:Number;
public function DisplacementMapFilter(mapBitmap:BitmapData = null,
- mapPoint:Point = null,
- componentX:uint = 0,
- componentY:uint = 0,
- scaleX:Number = 0.0,
- scaleY:Number = 0.0,
- mode:String = "wrap",
- color:uint = 0,
- alpha:Number = 0.0) {
+ mapPoint:Point = null,
+ componentX:uint = 0,
+ componentY:uint = 0,
+ scaleX:Number = 0.0,
+ scaleY:Number = 0.0,
+ mode:String = "wrap",
+ color:uint = 0,
+ alpha:Number = 0.0)
+ {
this.mapBitmap = mapBitmap;
this.mapPoint = mapPoint;
this.componentX = componentX;
@@ -33,7 +36,8 @@
this.alpha = alpha;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new DisplacementMapFilter(this.mapBitmap.clone(), this.mapPoint.clone(), this.componentX, this.componentY, this.scaleX, this.scaleY, this.mode, this.color, this.alpha);
}
}
diff --git a/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as b/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as
index 7dfe3db64890..0c888b7badce 100644
--- a/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as
+++ b/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as
@@ -1,8 +1,10 @@
-package flash.filters {
- public final class DisplacementMapFilterMode {
- public static const WRAP: String = "wrap";
- public static const CLAMP: String = "clamp";
- public static const IGNORE: String = "ignore";
- public static const COLOR: String = "color";
- }
+package flash.filters
+{
+ public final class DisplacementMapFilterMode
+ {
+ public static const WRAP:String = "wrap";
+ public static const CLAMP:String = "clamp";
+ public static const IGNORE:String = "ignore";
+ public static const COLOR:String = "color";
+ }
}
diff --git a/core/src/avm2/globals/flash/filters/DropShadowFilter.as b/core/src/avm2/globals/flash/filters/DropShadowFilter.as
index c848cf986156..ca330e07c585 100644
--- a/core/src/avm2/globals/flash/filters/DropShadowFilter.as
+++ b/core/src/avm2/globals/flash/filters/DropShadowFilter.as
@@ -1,28 +1,30 @@
-package flash.filters {
- public final class DropShadowFilter extends BitmapFilter {
- public var alpha: Number;
- public var angle: Number;
- public var blurX: Number;
- public var blurY: Number;
- public var color: uint;
- public var distance: Number;
- public var hideObject: Boolean;
- public var inner: Boolean;
- public var knockout: Boolean;
- public var quality: int;
- public var strength: Number;
+package flash.filters
+{
+ public final class DropShadowFilter extends BitmapFilter
+ {
+ public var alpha:Number;
+ public var angle:Number;
+ public var blurX:Number;
+ public var blurY:Number;
+ public var color:uint;
+ public var distance:Number;
+ public var hideObject:Boolean;
+ public var inner:Boolean;
+ public var knockout:Boolean;
+ public var quality:int;
+ public var strength:Number;
public function DropShadowFilter(distance:Number = 4.0,
- angle:Number = 45,
- color:uint = 0,
- alpha:Number = 1.0,
- blurX:Number = 4.0,
- blurY:Number = 4.0,
- strength:Number = 1.0,
- quality:int = 1,
- inner:Boolean = false,
- knockout:Boolean = false,
- hideObject:Boolean = false)
+ angle:Number = 45,
+ color:uint = 0,
+ alpha:Number = 1.0,
+ blurX:Number = 4.0,
+ blurY:Number = 4.0,
+ strength:Number = 1.0,
+ quality:int = 1,
+ inner:Boolean = false,
+ knockout:Boolean = false,
+ hideObject:Boolean = false)
{
this.alpha = alpha;
this.angle = angle;
@@ -37,18 +39,19 @@ package flash.filters {
this.strength = strength;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new DropShadowFilter(this.distance,
- this.angle,
- this.color,
- this.alpha,
- this.blurX,
- this.blurY,
- this.strength,
- this.quality,
- this.inner,
- this.knockout,
- this.hideObject);
+ this.angle,
+ this.color,
+ this.alpha,
+ this.blurX,
+ this.blurY,
+ this.strength,
+ this.quality,
+ this.inner,
+ this.knockout,
+ this.hideObject);
}
}
}
diff --git a/core/src/avm2/globals/flash/filters/GlowFilter.as b/core/src/avm2/globals/flash/filters/GlowFilter.as
index d5b6d653a1c0..120119bdea06 100644
--- a/core/src/avm2/globals/flash/filters/GlowFilter.as
+++ b/core/src/avm2/globals/flash/filters/GlowFilter.as
@@ -1,22 +1,24 @@
-package flash.filters {
- public final class GlowFilter extends BitmapFilter {
- public var alpha: Number;
- public var blurX: Number;
- public var blurY: Number;
- public var color: uint;
- public var inner: Boolean;
- public var knockout: Boolean;
- public var quality: int;
- public var strength: Number;
+package flash.filters
+{
+ public final class GlowFilter extends BitmapFilter
+ {
+ public var alpha:Number;
+ public var blurX:Number;
+ public var blurY:Number;
+ public var color:uint;
+ public var inner:Boolean;
+ public var knockout:Boolean;
+ public var quality:int;
+ public var strength:Number;
- public function GlowFilter(color: uint = 0xFF0000,
- alpha: Number = 1.0,
- blurX: Number = 6.0,
- blurY: Number = 6.0,
- strength: Number = 2,
- quality: int = 1,
- inner: Boolean = false,
- knockout: Boolean = false)
+ public function GlowFilter(color:uint = 0xFF0000,
+ alpha:Number = 1.0,
+ blurX:Number = 6.0,
+ blurY:Number = 6.0,
+ strength:Number = 2,
+ quality:int = 1,
+ inner:Boolean = false,
+ knockout:Boolean = false)
{
this.alpha = alpha;
this.blurX = blurX;
@@ -28,7 +30,8 @@
this.strength = strength;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new GlowFilter(this.color, this.alpha, this.blurX, this.blurY, this.strength, this.quality, this.inner, this.knockout);
}
}
diff --git a/core/src/avm2/globals/flash/filters/GradientBevelFilter.as b/core/src/avm2/globals/flash/filters/GradientBevelFilter.as
index 5c59d7c4751a..e48396a7d7aa 100644
--- a/core/src/avm2/globals/flash/filters/GradientBevelFilter.as
+++ b/core/src/avm2/globals/flash/filters/GradientBevelFilter.as
@@ -1,30 +1,33 @@
-package flash.filters {
- public final class GradientBevelFilter extends BitmapFilter {
- public var alphas : Array;
- public var angle : Number;
- public var blurX : Number;
- public var blurY : Number;
- public var colors : Array;
- public var distance : Number;
- public var knockout : Boolean;
- public var quality : int;
- public var ratios : Array;
- public var strength : Number;
- public var type : String;
+package flash.filters
+{
+ public final class GradientBevelFilter extends BitmapFilter
+ {
+ public var alphas:Array;
+ public var angle:Number;
+ public var blurX:Number;
+ public var blurY:Number;
+ public var colors:Array;
+ public var distance:Number;
+ public var knockout:Boolean;
+ public var quality:int;
+ public var ratios:Array;
+ public var strength:Number;
+ public var type:String;
public function GradientBevelFilter(
- distance:Number = 4.0,
- angle:Number = 45,
- colors:Array = null,
- alphas:Array = null,
- ratios:Array = null,
- blurX:Number = 4.0,
- blurY:Number = 4.0,
- strength:Number = 1,
- quality:int = 1,
- type:String = "inner",
- knockout:Boolean = false
- ) {
+ distance:Number = 4.0,
+ angle:Number = 45,
+ colors:Array = null,
+ alphas:Array = null,
+ ratios:Array = null,
+ blurX:Number = 4.0,
+ blurY:Number = 4.0,
+ strength:Number = 1,
+ quality:int = 1,
+ type:String = "inner",
+ knockout:Boolean = false
+ )
+ {
this.distance = distance;
this.angle = angle;
this.colors = colors;
@@ -38,20 +41,21 @@
this.knockout = knockout;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new GradientBevelFilter(
- this.distance,
- this.angle,
- this.colors,
- this.alphas,
- this.ratios,
- this.blurX,
- this.blurY,
- this.strength,
- this.quality,
- this.type,
- this.knockout
- );
+ this.distance,
+ this.angle,
+ this.colors,
+ this.alphas,
+ this.ratios,
+ this.blurX,
+ this.blurY,
+ this.strength,
+ this.quality,
+ this.type,
+ this.knockout
+ );
}
}
}
diff --git a/core/src/avm2/globals/flash/filters/GradientGlowFilter.as b/core/src/avm2/globals/flash/filters/GradientGlowFilter.as
index 9fce4d9a7746..8fa2d3fa986c 100644
--- a/core/src/avm2/globals/flash/filters/GradientGlowFilter.as
+++ b/core/src/avm2/globals/flash/filters/GradientGlowFilter.as
@@ -1,30 +1,32 @@
-package flash.filters {
- public final class GradientGlowFilter extends BitmapFilter {
- public var alphas : Array;
- public var angle : Number;
- public var blurX : Number;
- public var blurY : Number;
- public var colors : Array;
- public var distance : Number;
- public var knockout : Boolean;
- public var quality : int;
- public var ratios : Array;
- public var strength : Number;
- public var type : String;
+package flash.filters
+{
+ public final class GradientGlowFilter extends BitmapFilter
+ {
+ public var alphas:Array;
+ public var angle:Number;
+ public var blurX:Number;
+ public var blurY:Number;
+ public var colors:Array;
+ public var distance:Number;
+ public var knockout:Boolean;
+ public var quality:int;
+ public var ratios:Array;
+ public var strength:Number;
+ public var type:String;
public function GradientGlowFilter(
- distance:Number = 4.0,
- angle:Number = 45,
- colors:Array = null,
- alphas:Array = null,
- ratios:Array = null,
- blurX:Number = 4.0,
- blurY:Number = 4.0,
- strength:Number = 1,
- quality:int = 1,
- type:String = "inner",
- knockout:Boolean = false
- )
+ distance:Number = 4.0,
+ angle:Number = 45,
+ colors:Array = null,
+ alphas:Array = null,
+ ratios:Array = null,
+ blurX:Number = 4.0,
+ blurY:Number = 4.0,
+ strength:Number = 1,
+ quality:int = 1,
+ type:String = "inner",
+ knockout:Boolean = false
+ )
{
this.distance = distance;
this.angle = angle;
@@ -39,7 +41,8 @@
this.knockout = knockout;
}
- override public function clone(): BitmapFilter {
+ override public function clone():BitmapFilter
+ {
return new GradientGlowFilter(this.distance, this.angle, this.colors, this.alphas, this.ratios, this.blurX, this.blurY, this.strength, this.quality, this.type, this.knockout);
}
}
diff --git a/core/src/avm2/globals/flash/filters/ShaderFilter.as b/core/src/avm2/globals/flash/filters/ShaderFilter.as
index bf2b9bfbf8c4..54d949033117 100644
--- a/core/src/avm2/globals/flash/filters/ShaderFilter.as
+++ b/core/src/avm2/globals/flash/filters/ShaderFilter.as
@@ -1,58 +1,71 @@
-package flash.filters {
- import flash.display.Shader;
-
- public class ShaderFilter extends BitmapFilter {
- private var _shader;
-
- public function ShaderFilter(shader:Shader = null) {
- this._shader = shader;
- }
-
- public function get shader():Shader {
- return this._shader;
- }
-
- public function set shader(value:Shader):void {
- this._shader = value;
- }
-
- private var _bottomExtension:int = 0;
- private var _leftExtension:int = 0;
- private var _rightExtension:int = 0;
- private var _topExtension:int = 0;
-
- public function get bottomExtension():int {
- return this._bottomExtension;
- }
-
- public function set bottomExtension(value:int):void {
- this._bottomExtension = value;
- }
-
- public function get leftExtension():int {
- return this._leftExtension;
- }
-
- public function set leftExtension(value:int):void {
- this._leftExtension = value;
- }
-
- public function get rightExtension():int {
- return this._rightExtension;
- }
-
- public function set rightExtension(value:int):void {
- this._rightExtension = value;
- }
-
- public function get topExtension():int {
- return this._topExtension;
- }
-
- public function set topExtension(value:int):void {
- this._topExtension = value;
- }
-
- // ShaderFilter is the only filter class that doesn't override clone
- }
+package flash.filters
+{
+ import flash.display.Shader;
+
+ public class ShaderFilter extends BitmapFilter
+ {
+ private var _shader;
+
+ public function ShaderFilter(shader:Shader = null)
+ {
+ this._shader = shader;
+ }
+
+ public function get shader():Shader
+ {
+ return this._shader;
+ }
+
+ public function set shader(value:Shader):void
+ {
+ this._shader = value;
+ }
+
+ private var _bottomExtension:int = 0;
+ private var _leftExtension:int = 0;
+ private var _rightExtension:int = 0;
+ private var _topExtension:int = 0;
+
+ public function get bottomExtension():int
+ {
+ return this._bottomExtension;
+ }
+
+ public function set bottomExtension(value:int):void
+ {
+ this._bottomExtension = value;
+ }
+
+ public function get leftExtension():int
+ {
+ return this._leftExtension;
+ }
+
+ public function set leftExtension(value:int):void
+ {
+ this._leftExtension = value;
+ }
+
+ public function get rightExtension():int
+ {
+ return this._rightExtension;
+ }
+
+ public function set rightExtension(value:int):void
+ {
+ this._rightExtension = value;
+ }
+
+ public function get topExtension():int
+ {
+ return this._topExtension;
+ }
+
+ public function set topExtension(value:int):void
+ {
+ this._topExtension = value;
+ }
+
+ // ShaderFilter is the only filter class that doesn't override clone
+ }
}
diff --git a/core/src/avm2/globals/flash/geom/ColorTransform.as b/core/src/avm2/globals/flash/geom/ColorTransform.as
index 32f563cfe989..1777a3fcc2c9 100644
--- a/core/src/avm2/globals/flash/geom/ColorTransform.as
+++ b/core/src/avm2/globals/flash/geom/ColorTransform.as
@@ -1,75 +1,81 @@
-package flash.geom {
- public class ColorTransform {
- public var redMultiplier: Number;
- public var greenMultiplier: Number;
- public var blueMultiplier: Number;
- public var alphaMultiplier: Number;
- public var redOffset: Number;
- public var greenOffset: Number;
- public var blueOffset: Number;
- public var alphaOffset: Number;
+package flash.geom
+{
+ public class ColorTransform
+ {
+ public var redMultiplier:Number;
+ public var greenMultiplier:Number;
+ public var blueMultiplier:Number;
+ public var alphaMultiplier:Number;
+ public var redOffset:Number;
+ public var greenOffset:Number;
+ public var blueOffset:Number;
+ public var alphaOffset:Number;
- public function ColorTransform(redMultiplier: Number = 1,
- greenMultiplier: Number = 1,
- blueMultiplier: Number = 1,
- alphaMultiplier: Number = 1,
- redOffset: Number = 0,
- greenOffset: Number = 0,
- blueOffset: Number = 0,
- alphaOffset: Number = 0)
- {
- this.redMultiplier = redMultiplier;
- this.greenMultiplier = greenMultiplier;
- this.blueMultiplier = blueMultiplier;
- this.alphaMultiplier = alphaMultiplier;
- this.redOffset = redOffset;
- this.greenOffset = greenOffset;
- this.blueOffset = blueOffset;
- this.alphaOffset = alphaOffset;
- }
+ public function ColorTransform(redMultiplier:Number = 1,
+ greenMultiplier:Number = 1,
+ blueMultiplier:Number = 1,
+ alphaMultiplier:Number = 1,
+ redOffset:Number = 0,
+ greenOffset:Number = 0,
+ blueOffset:Number = 0,
+ alphaOffset:Number = 0)
+ {
+ this.redMultiplier = redMultiplier;
+ this.greenMultiplier = greenMultiplier;
+ this.blueMultiplier = blueMultiplier;
+ this.alphaMultiplier = alphaMultiplier;
+ this.redOffset = redOffset;
+ this.greenOffset = greenOffset;
+ this.blueOffset = blueOffset;
+ this.alphaOffset = alphaOffset;
+ }
- public function get color(): uint {
- return (this.redOffset << 16) | (this.greenOffset << 8) | this.blueOffset;
- }
+ public function get color():uint
+ {
+ return (this.redOffset << 16) | (this.greenOffset << 8) | this.blueOffset;
+ }
- public function set color(newColor: uint): void {
- this.redMultiplier = 0;
- this.greenMultiplier = 0;
- this.blueMultiplier = 0;
- this.redOffset = (newColor >> 16) & 0xFF;
- this.greenOffset = (newColor >> 8) & 0xFF;
- this.blueOffset = newColor & 0xFF;
- }
+ public function set color(newColor:uint):void
+ {
+ this.redMultiplier = 0;
+ this.greenMultiplier = 0;
+ this.blueMultiplier = 0;
+ this.redOffset = (newColor >> 16) & 0xFF;
+ this.greenOffset = (newColor >> 8) & 0xFF;
+ this.blueOffset = newColor & 0xFF;
+ }
- public function concat(second: ColorTransform): void {
- this.alphaOffset += this.alphaMultiplier * second.alphaOffset;
- this.alphaMultiplier *= second.alphaMultiplier;
- this.redOffset += this.redMultiplier * second.redOffset;
- this.redMultiplier *= second.redMultiplier;
- this.greenOffset += this.greenMultiplier * second.greenOffset;
- this.greenMultiplier *= second.greenMultiplier;
- this.blueOffset += this.blueMultiplier * second.blueOffset;
- this.blueMultiplier *= second.blueMultiplier;
- }
+ public function concat(second:ColorTransform):void
+ {
+ this.alphaOffset += this.alphaMultiplier * second.alphaOffset;
+ this.alphaMultiplier *= second.alphaMultiplier;
+ this.redOffset += this.redMultiplier * second.redOffset;
+ this.redMultiplier *= second.redMultiplier;
+ this.greenOffset += this.greenMultiplier * second.greenOffset;
+ this.greenMultiplier *= second.greenMultiplier;
+ this.blueOffset += this.blueMultiplier * second.blueOffset;
+ this.blueMultiplier *= second.blueMultiplier;
+ }
- public function toString(): String {
- return "(redMultiplier="
- + this.redMultiplier
- + ", greenMultiplier="
- + this.greenMultiplier
- + ", blueMultiplier="
- + this.blueMultiplier
- + ", alphaMultiplier="
- + this.alphaMultiplier
- + ", redOffset="
- + this.redOffset
- + ", greenOffset="
- + this.greenOffset
- + ", blueOffset="
- + this.blueOffset
- + ", alphaOffset="
- + this.alphaOffset
- + ")";
- }
- }
+ public function toString():String
+ {
+ return "(redMultiplier="
+ + this.redMultiplier
+ + ", greenMultiplier="
+ + this.greenMultiplier
+ + ", blueMultiplier="
+ + this.blueMultiplier
+ + ", alphaMultiplier="
+ + this.alphaMultiplier
+ + ", redOffset="
+ + this.redOffset
+ + ", greenOffset="
+ + this.greenOffset
+ + ", blueOffset="
+ + this.blueOffset
+ + ", alphaOffset="
+ + this.alphaOffset
+ + ")";
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/geom/Matrix.as b/core/src/avm2/globals/flash/geom/Matrix.as
index 46eda5ada246..672fcd423f9e 100644
--- a/core/src/avm2/globals/flash/geom/Matrix.as
+++ b/core/src/avm2/globals/flash/geom/Matrix.as
@@ -1,5 +1,7 @@
-package flash.geom {
- public class Matrix {
+package flash.geom
+{
+ public class Matrix
+ {
public var a:Number;
public var b:Number;
public var c:Number;
@@ -7,7 +9,8 @@ package flash.geom {
public var tx:Number;
public var ty:Number;
- public function Matrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1, tx:Number = 0, ty:Number = 0) {
+ public function Matrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1, tx:Number = 0, ty:Number = 0)
+ {
this.a = a;
this.b = b;
this.c = c;
@@ -16,11 +19,13 @@ package flash.geom {
this.ty = ty;
}
- public function clone():Matrix {
- return new Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty);
+ public function clone():Matrix
+ {
+ return new Matrix(this.a, this.b, this.c, this.d, this.tx, this.ty);
}
- public function concat(m:Matrix):void {
+ public function concat(m:Matrix):void
+ {
var a = m.a * this.a + m.c * this.b;
var b = m.b * this.a + m.d * this.b;
var c = m.a * this.c + m.c * this.d;
@@ -37,24 +42,29 @@ package flash.geom {
}
[API("674")]
- public function copyColumnFrom(column:uint, vector3D:Vector3D):void {
+ public function copyColumnFrom(column:uint, vector3D:Vector3D):void
+ {
// FP BUG: For some reason these methods are identical
this.copyRowFrom(column, vector3D);
}
[API("674")]
- public function copyColumnTo(column:uint, vector3D:Vector3D):void {
- if(column == 0) {
+ public function copyColumnTo(column:uint, vector3D:Vector3D):void
+ {
+ if (column == 0)
+ {
vector3D.x = this.a;
vector3D.y = this.b;
vector3D.z = 0;
}
- else if (column == 1) {
+ else if (column == 1)
+ {
vector3D.x = this.c;
vector3D.y = this.d;
vector3D.z = 0;
}
- else if (column == 2) {
+ else if (column == 2)
+ {
vector3D.x = this.tx;
vector3D.y = this.ty;
vector3D.z = 1;
@@ -62,7 +72,8 @@ package flash.geom {
}
[API("674")]
- public function copyFrom(sourceMatrix: Matrix): void {
+ public function copyFrom(sourceMatrix:Matrix):void
+ {
this.a = sourceMatrix.a;
this.b = sourceMatrix.b;
this.c = sourceMatrix.c;
@@ -72,12 +83,16 @@ package flash.geom {
}
[API("674")]
- public function copyRowFrom(row: uint, vector3D: Vector3D): void {
- if (row == 0) {
+ public function copyRowFrom(row:uint, vector3D:Vector3D):void
+ {
+ if (row == 0)
+ {
this.a = vector3D.x;
this.c = vector3D.y;
this.tx = vector3D.z;
- } else if(row == 1) {
+ }
+ else if (row == 1)
+ {
this.b = vector3D.x;
this.d = vector3D.y;
this.ty = vector3D.z;
@@ -85,40 +100,48 @@ package flash.geom {
}
[API("674")]
- public function copyRowTo(row:uint, vector3D:Vector3D):void {
- if(row == 0) {
+ public function copyRowTo(row:uint, vector3D:Vector3D):void
+ {
+ if (row == 0)
+ {
vector3D.x = this.a;
vector3D.y = this.c;
vector3D.z = this.tx;
}
- else if (row == 1) {
+ else if (row == 1)
+ {
vector3D.x = this.b;
vector3D.y = this.d;
vector3D.z = this.ty;
}
- else if (row == 2) {
+ else if (row == 2)
+ {
vector3D.x = 0;
vector3D.y = 0;
vector3D.z = 1;
} // otherwise vector is unchanged
}
- public function createBox(scaleX:Number, scaleY:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void {
+ public function createBox(scaleX:Number, scaleY:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void
+ {
this.identity();
this.rotate(rotation);
this.scale(scaleX, scaleY);
this.translate(tx, ty);
}
- public function createGradientBox(width: Number, height: Number, rotation: Number = 0, tx: Number = 0, ty: Number = 0): void {
+ public function createGradientBox(width:Number, height:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void
+ {
this.createBox(width / 1638.4, height / 1638.4, rotation, tx + width / 2, ty + height / 2);
}
- public function deltaTransformPoint(point:Point):Point {
+ public function deltaTransformPoint(point:Point):Point
+ {
return new Point(this.a * point.x + this.c * point.y, this.b * point.x + this.d * point.y);
}
- public function identity():void {
+ public function identity():void
+ {
this.a = 1;
this.b = 0;
this.c = 0;
@@ -127,7 +150,8 @@ package flash.geom {
this.ty = 0;
}
- public function invert():void {
+ public function invert():void
+ {
var det = this.a * this.d - this.c * this.b;
var tx = (this.d * this.tx - this.c * this.ty) / -det;
var ty = (this.b * this.tx - this.a * this.ty) / det;
@@ -144,7 +168,8 @@ package flash.geom {
this.ty = ty;
}
- public function rotate(angle:Number):void {
+ public function rotate(angle:Number):void
+ {
var sin = Math.sin(angle);
var cos = Math.cos(angle);
@@ -163,7 +188,8 @@ package flash.geom {
this.ty = ty;
}
- public function scale(sx:Number, sy:Number):void {
+ public function scale(sx:Number, sy:Number):void
+ {
this.a *= sx;
this.b *= sy;
this.c *= sx;
@@ -173,7 +199,8 @@ package flash.geom {
}
[API("674")]
- public function setTo(aa:Number, ba:Number, ca:Number, da:Number, txa:Number, tya:Number):void {
+ public function setTo(aa:Number, ba:Number, ca:Number, da:Number, txa:Number, tya:Number):void
+ {
this.a = aa;
this.b = ba;
this.c = ca;
@@ -182,15 +209,18 @@ package flash.geom {
this.ty = tya;
}
- public function toString():String {
+ public function toString():String
+ {
return "(a=" + this.a + ", b=" + this.b + ", c=" + this.c + ", d=" + this.d + ", tx=" + this.tx + ", ty=" + this.ty + ")";
}
- public function transformPoint(point:Point):Point {
+ public function transformPoint(point:Point):Point
+ {
return new Point(this.a * point.x + this.c * point.y + this.tx, this.b * point.x + this.d * point.y + this.ty);
}
- public function translate(dx:Number, dy:Number):void {
+ public function translate(dx:Number, dy:Number):void
+ {
this.tx += dx;
this.ty += dy;
}
diff --git a/core/src/avm2/globals/flash/geom/Matrix3D.as b/core/src/avm2/globals/flash/geom/Matrix3D.as
index 390bebc88f1e..7a30b2762893 100644
--- a/core/src/avm2/globals/flash/geom/Matrix3D.as
+++ b/core/src/avm2/globals/flash/geom/Matrix3D.as
@@ -1,751 +1,832 @@
// Based on the MIT-licensed OpenFL code https://github.com/openfl/openfl/blob/develop/src/openfl/geom/Matrix3D.hx
-package flash.geom {
- import __ruffle__.stub_method;
-
- public class Matrix3D {
-
- // The 4x4 matrix data, stored in column-major order
- // This is never null.
- private var _rawData:Vector.;
-
- public function get rawData():Vector. {
- return this._rawData.AS3::concat();
- }
-
- public function set rawData(value:Vector.):void {
- if (value != null) {
- this._rawData = value.AS3::concat();
- }
- }
-
- public function Matrix3D(v:Vector. = null) {
- if (v != null && v.length == 16) {
- this._rawData = v.AS3::concat();
- } else {
- this.identity();
- }
- }
-
- public function identity():void {
- // Note that every 4 elements is a *column*, not a row
- this._rawData = new [
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1
- ];
- }
-
- public function appendTranslation(x:Number, y:Number, z:Number):void {
- this._rawData[12] += x;
- this._rawData[13] += y;
- this._rawData[14] += z;
- }
-
- public function appendRotation(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void {
- var tx:Number, ty:Number, tz:Number;
- tx = ty = tz = 0;
-
- if (pivotPoint != null) {
- tx = pivotPoint.x;
- ty = pivotPoint.y;
- tz = pivotPoint.z;
- }
- var radian = degrees * Math.PI / 180;
- var cos = Math.cos(radian);
- var sin = Math.sin(radian);
- var x = axis.x;
- var y = axis.y;
- var z = axis.z;
- var x2 = x * x;
- var y2 = y * y;
- var z2 = z * z;
- var ls = x2 + y2 + z2;
- if (ls != 0) {
- var l = Math.sqrt(ls);
- x /= l;
- y /= l;
- z /= l;
- x2 /= ls;
- y2 /= ls;
- z2 /= ls;
- }
- var ccos = 1 - cos;
- var m = new Matrix3D();
-
- var d = m.rawData;
- d[0] = x2 + (y2 + z2) * cos;
- d[1] = x * y * ccos + z * sin;
- d[2] = x * z * ccos - y * sin;
- d[4] = x * y * ccos - z * sin;
- d[5] = y2 + (x2 + z2) * cos;
- d[6] = y * z * ccos + x * sin;
- d[8] = x * z * ccos + y * sin;
- d[9] = y * z * ccos - x * sin;
- d[10] = z2 + (x2 + y2) * cos;
- d[12] = (tx * (y2 + z2) - x * (ty * y + tz * z)) * ccos + (ty * z - tz * y) * sin;
- d[13] = (ty * (x2 + z2) - y * (tx * x + tz * z)) * ccos + (tz * x - tx * z) * sin;
- d[14] = (tz * (x2 + y2) - z * (tx * x + ty * y)) * ccos + (tx * y - ty * x) * sin;
- m.rawData = d;
-
- this.append(m);
- }
-
- [API("674")]
- public function copyRawDataFrom(vector:Vector., index:uint = 0, transpose:Boolean = false):void {
- if (transpose) {
- this.transpose();
- }
-
- var length = vector.length - index;
-
- for (var i = 0; i < length; i++) {
- this._rawData[i] = vector[i + index];
- }
-
- if (transpose) {
- this.transpose();
- }
- }
-
- // Based on https://github.com/openfl/openfl/blob/develop/src/openfl/geom/Matrix3D.hx#L542C1-L573
- [API("674")]
- public function copyRowTo(row:uint, vector3D:Vector3D):void {
- if (row > 3) {
- throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
- }
-
- switch (row) {
- case 0:
- vector3D.x = rawData[0];
- vector3D.y = rawData[4];
- vector3D.z = rawData[8];
- vector3D.w = rawData[12];
- break;
- case 1:
- vector3D.x = rawData[1];
- vector3D.y = rawData[5];
- vector3D.z = rawData[9];
- vector3D.w = rawData[13];
- break;
- case 2:
- vector3D.x = rawData[2];
- vector3D.y = rawData[6];
- vector3D.z = rawData[10];
- vector3D.w = rawData[14];
- break;
- case 3:
- vector3D.x = rawData[3];
- vector3D.y = rawData[7];
- vector3D.z = rawData[11];
- vector3D.w = rawData[15];
- break;
- }
- }
-
- // Based on https://github.com/openfl/openfl/blob/develop/src/openfl/geom/Matrix3D.hx#L504-L534
- [API("674")]
- public function copyRowFrom(row:uint, vector3D:Vector3D):void {
- if (row > 3) {
- throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
- }
-
- switch (row) {
- case 0:
- _rawData[0] = vector3D.x;
- _rawData[4] = vector3D.y;
- _rawData[8] = vector3D.z;
- _rawData[12] = vector3D.w;
- break;
- case 1:
- _rawData[1] = vector3D.x;
- _rawData[5] = vector3D.y;
- _rawData[9] = vector3D.z;
- _rawData[13] = vector3D.w;
- break;
- case 2:
- _rawData[2] = vector3D.x;
- _rawData[6] = vector3D.y;
- _rawData[10] = vector3D.z;
- _rawData[14] = vector3D.w;
- break;
- case 3:
- _rawData[3] = vector3D.x;
- _rawData[7] = vector3D.y;
- _rawData[11] = vector3D.z;
- _rawData[15] = vector3D.w;
- break;
- }
- }
-
- public function deltaTransformVector(v:Vector3D):Vector3D {
- var x:Number = this._rawData[0] * v.x + this._rawData[4] * v.y + this._rawData[8] * v.z;
- var y:Number = this._rawData[1] * v.x + this._rawData[5] * v.y + this._rawData[9] * v.z;
- var z:Number = this._rawData[2] * v.x + this._rawData[6] * v.y + this._rawData[10] * v.z;
- var w:Number = this._rawData[3] * v.x + this._rawData[7] * v.y + this._rawData[11] * v.z;
- return new Vector3D(x, y, z, w);
- }
-
- public function transformVector(v:Vector3D):Vector3D {
- var x:Number = this._rawData[0] * v.x + this._rawData[4] * v.y + this._rawData[8] * v.z + this._rawData[12];
- var y:Number = this._rawData[1] * v.x + this._rawData[5] * v.y + this._rawData[9] * v.z + this._rawData[13];
- var z:Number = this._rawData[2] * v.x + this._rawData[6] * v.y + this._rawData[10] * v.z + this._rawData[14];
- var w:Number = this._rawData[3] * v.x + this._rawData[7] * v.y + this._rawData[11] * v.z + this._rawData[15];
- return new Vector3D(x, y, z, w);
- }
-
- public function transformVectors(vin:Vector., vout:Vector.):void {
- if (vin == null) {
- throw new TypeError("Error #2007: Parameter vin must be non-null.", 2007);
-}
- if (vout == null) {
- throw new TypeError("Error #2007: Parameter vout must be non-null.", 2007);
- }
-
- var resultVecsLength:Number = Math.floor(vin.length / 3) * 3;
- if (resultVecsLength > vout.length && vout.fixed) {
- throw new RangeError("Error #1126: Cannot change the length of a fixed Vector.")
- }
-
- var result3D:Vector3D;
- for (var i = 0; i < resultVecsLength; i += 3) {
- result3D = transformVector(new Vector3D(vin[i], vin[i + 1], vin[i + 2]));
- if (i <= vout.length) {
- vout[i] = result3D.x;
- vout[i + 1] = result3D.y;
- vout[i + 2] = result3D.z;
- } else {
- vout.push(result3D.x, result3D.y, result3D.z);
- }
- }
- }
-
- public function transpose():void {
- // Make a copy
- var oRawData = this._rawData.AS3::concat();
- this._rawData[1] = oRawData[4];
- this._rawData[2] = oRawData[8];
- this._rawData[3] = oRawData[12];
- this._rawData[4] = oRawData[1];
- this._rawData[6] = oRawData[9];
- this._rawData[7] = oRawData[13];
- this._rawData[8] = oRawData[2];
- this._rawData[9] = oRawData[6];
- this._rawData[11] = oRawData[14];
- this._rawData[12] = oRawData[3];
- this._rawData[13] = oRawData[7];
- this._rawData[14] = oRawData[11];
- }
- public function append(lhs:Matrix3D):void {
- var m111:Number = this._rawData[0],
- m121:Number = this._rawData[4],
- m131:Number = this._rawData[8],
- m141:Number = this._rawData[12],
- m112:Number = this._rawData[1],
- m122:Number = this._rawData[5],
- m132:Number = this._rawData[9],
- m142:Number = this._rawData[13],
- m113:Number = this._rawData[2],
- m123:Number = this._rawData[6],
- m133:Number = this._rawData[10],
- m143:Number = this._rawData[14],
- m114:Number = this._rawData[3],
- m124:Number = this._rawData[7],
- m134:Number = this._rawData[11],
- m144:Number = this._rawData[15],
- m211:Number = lhs._rawData[0],
- m221:Number = lhs._rawData[4],
- m231:Number = lhs._rawData[8],
- m241:Number = lhs._rawData[12],
- m212:Number = lhs._rawData[1],
- m222:Number = lhs._rawData[5],
- m232:Number = lhs._rawData[9],
- m242:Number = lhs._rawData[13],
- m213:Number = lhs._rawData[2],
- m223:Number = lhs._rawData[6],
- m233:Number = lhs._rawData[10],
- m243:Number = lhs._rawData[14],
- m214:Number = lhs._rawData[3],
- m224:Number = lhs._rawData[7],
- m234:Number = lhs._rawData[11],
- m244:Number = lhs._rawData[15];
-
- this._rawData[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
- this._rawData[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
- this._rawData[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
- this._rawData[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
-
- this._rawData[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
- this._rawData[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
- this._rawData[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
- this._rawData[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
-
- this._rawData[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
- this._rawData[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
- this._rawData[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
- this._rawData[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
-
- this._rawData[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
- this._rawData[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
- this._rawData[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
- this._rawData[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
- }
-
- // Based on https://github.com/openfl/openfl/blob/971a4c9e43b5472fd84d73920a2b7c1b3d8d9257/src/openfl/geom/Matrix3D.hx#L307
- public function appendScale(xScale:Number, yScale:Number, zScale:Number):void {
- this.append(new Matrix3D(Vector.([
- xScale, 0.0, 0.0, 0.0, 0.0, yScale, 0.0, 0.0, 0.0, 0.0, zScale, 0.0, 0.0, 0.0, 0.0, 1.0
- ])));
- }
-
- public function prependTranslation(x:Number, y:Number, z:Number):void {
- var m = new Matrix3D();
- m.position = new Vector3D(x, y, z);
- this.prepend(m);
- }
-
- public function prependRotation(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void {
- var m = new Matrix3D();
- m.appendRotation(degrees, axis, pivotPoint);
- this.prepend(m);
- }
-
- public function get position():Vector3D {
- return new Vector3D(_rawData[12], _rawData[13], _rawData[14]);
- }
-
- public function set position(val:Vector3D):void {
- this._rawData[12] = val.x;
- this._rawData[13] = val.y;
- this._rawData[14] = val.z;
- }
-
- public function prepend(rhs:Matrix3D):void {
- var m111:Number = rhs._rawData[0],
- m121:Number = rhs._rawData[4],
- m131:Number = rhs._rawData[8],
- m141:Number = rhs._rawData[12],
- m112:Number = rhs._rawData[1],
- m122:Number = rhs._rawData[5],
- m132:Number = rhs._rawData[9],
- m142:Number = rhs._rawData[13],
- m113:Number = rhs._rawData[2],
- m123:Number = rhs._rawData[6],
- m133:Number = rhs._rawData[10],
- m143:Number = rhs._rawData[14],
- m114:Number = rhs._rawData[3],
- m124:Number = rhs._rawData[7],
- m134:Number = rhs._rawData[11],
- m144:Number = rhs._rawData[15],
- m211:Number = this._rawData[0],
- m221:Number = this._rawData[4],
- m231:Number = this._rawData[8],
- m241:Number = this._rawData[12],
- m212:Number = this._rawData[1],
- m222:Number = this._rawData[5],
- m232:Number = this._rawData[9],
- m242:Number = this._rawData[13],
- m213:Number = this._rawData[2],
- m223:Number = this._rawData[6],
- m233:Number = this._rawData[10],
- m243:Number = this._rawData[14],
- m214:Number = this._rawData[3],
- m224:Number = this._rawData[7],
- m234:Number = this._rawData[11],
- m244:Number = this._rawData[15];
-
- this._rawData[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
- this._rawData[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
- this._rawData[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
- this._rawData[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
-
- this._rawData[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
- this._rawData[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
- this._rawData[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
- this._rawData[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
-
- this._rawData[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
- this._rawData[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
- this._rawData[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
- this._rawData[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
-
- this._rawData[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
- this._rawData[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
- this._rawData[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
- this._rawData[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
- }
-
- public function prependScale(xScale:Number, yScale:Number, zScale:Number):void {
- var m = new Matrix3D();
- m.appendScale(xScale, yScale, zScale);
- this.prepend(m);
- }
-
- [API("674")]
- public function copyFrom(other:Matrix3D):void {
- // This makes a copy of other.rawData
- this._rawData = other.rawData;
- }
-
- [API("674")]
- public function copyRawDataTo(vector:Vector., index:uint = 0, transpose:Boolean = false):void {
- if (transpose) {
- this.transpose();
- }
-
- for (var i = 0; i < rawData.length; i++) {
- vector[i + index] = _rawData[i];
- }
-
- if (transpose) {
- this.transpose();
- }
- }
-
- public function clone():Matrix3D {
- return new Matrix3D(this.rawData);
- }
-
- public function copyToMatrix3D(other:Matrix3D):void {
- other.rawData = rawData;
- }
-
- public function pointAt(pos:Vector3D, at:Vector3D = null, up:Vector3D = null):void {
- stub_method("flash.geom.Matrix3D", "pointAt");
- }
-
- // Based on OpenFL: https://github.com/openfl/openfl/blob/971a4c9e43b5472fd84d73920a2b7c1b3d8d9257/src/openfl/geom/Matrix3D.hx#L1437
- public function recompose(components:Vector., orientationStyle:String = "eulerAngles"):Boolean {
- checkOrientation(orientationStyle);
-
- if (orientationStyle == Orientation3D.QUATERNION) {
- // Flash throws exceptions from 'recompose' certain values of 'components',
- // which we need to reproduce. See the 'matrix3d_compose' test
- stub_method("flash.geom.Matrix3D", "recompose", "Orientation3D.QUATERNION");
- }
- // RUFFLE - unlike in OpenFL, we continue on even if some of the 'scale' components are 0
- if (components.length < 3) {
- return false;
- }
-
- identity();
-
- var scale = [];
- scale[0] = scale[1] = scale[2] = components[2].x;
- scale[4] = scale[5] = scale[6] = components[2].y;
- scale[8] = scale[9] = scale[10] = components[2].z;
-
- switch (orientationStyle) {
- case Orientation3D.EULER_ANGLES:
- var cx = Math.cos(components[1].x);
- var cy = Math.cos(components[1].y);
- var cz = Math.cos(components[1].z);
- var sx = Math.sin(components[1].x);
- var sy = Math.sin(components[1].y);
- var sz = Math.sin(components[1].z);
-
- _rawData[0] = cy * cz * scale[0];
- _rawData[1] = cy * sz * scale[1];
- _rawData[2] = -sy * scale[2];
- _rawData[3] = 0;
- _rawData[4] = (sx * sy * cz - cx * sz) * scale[4];
- _rawData[5] = (sx * sy * sz + cx * cz) * scale[5];
- _rawData[6] = sx * cy * scale[6];
- _rawData[7] = 0;
- _rawData[8] = (cx * sy * cz + sx * sz) * scale[8];
- _rawData[9] = (cx * sy * sz - sx * cz) * scale[9];
- _rawData[10] = cx * cy * scale[10];
- _rawData[11] = 0;
- _rawData[12] = components[0].x;
- _rawData[13] = components[0].y;
- _rawData[14] = components[0].z;
- _rawData[15] = 1;
- break;
-
- default:
- var x = components[1].x;
- var y = components[1].y;
- var z = components[1].z;
- var w = components[1].w;
-
- if (orientationStyle == Orientation3D.AXIS_ANGLE) {
- x *= Math.sin(w / 2);
- y *= Math.sin(w / 2);
- z *= Math.sin(w / 2);
- w = Math.cos(w / 2);
- }
-
- _rawData[0] = (1 - 2 * y * y - 2 * z * z) * scale[0];
- _rawData[1] = (2 * x * y + 2 * w * z) * scale[1];
- _rawData[2] = (2 * x * z - 2 * w * y) * scale[2];
- _rawData[3] = 0;
- _rawData[4] = (2 * x * y - 2 * w * z) * scale[4];
- _rawData[5] = (1 - 2 * x * x - 2 * z * z) * scale[5];
- _rawData[6] = (2 * y * z + 2 * w * x) * scale[6];
- _rawData[7] = 0;
- _rawData[8] = (2 * x * z + 2 * w * y) * scale[8];
- _rawData[9] = (2 * y * z - 2 * w * x) * scale[9];
- _rawData[10] = (1 - 2 * x * x - 2 * y * y) * scale[10];
- _rawData[11] = 0;
- _rawData[12] = components[0].x;
- _rawData[13] = components[0].y;
- _rawData[14] = components[0].z;
- _rawData[15] = 1;
- }
-
- if (components[2].x == 0) {
- _rawData[0] = 1e-15;
- }
-
- if (components[2].y == 0) {
- _rawData[5] = 1e-15;
- }
-
- if (components[2].z == 0) {
- _rawData[10] = 1e-15;
- }
-
- return !(components[2].x == 0 || components[2].y == 0 || components[2].y == 0);
- }
-
- [API("674")]
- public function copyColumnTo(column:uint, vector3D:Vector3D):void {
- if (column > 3) {
- throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
- }
- switch (column) {
- case 0:
- vector3D.x = _rawData[0];
- vector3D.y = _rawData[1];
- vector3D.z = _rawData[2];
- vector3D.w = _rawData[3];
- break;
-
- case 1:
- vector3D.x = _rawData[4];
- vector3D.y = _rawData[5];
- vector3D.z = _rawData[6];
- vector3D.w = _rawData[7];
- break;
-
- case 2:
- vector3D.x = _rawData[8];
- vector3D.y = _rawData[9];
- vector3D.z = _rawData[10];
- vector3D.w = _rawData[11];
- break;
-
- case 3:
- vector3D.x = _rawData[12];
- vector3D.y = _rawData[13];
- vector3D.z = _rawData[14];
- vector3D.w = _rawData[15];
- break;
- }
- }
-
- [API("674")]
- public function copyColumnFrom(column:uint, vector3D:Vector3D):void {
- if (column > 3) {
- throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
- }
- switch (column) {
- case 0:
- _rawData[0] = vector3D.x;
- _rawData[1] = vector3D.y;
- _rawData[2] = vector3D.z;
- _rawData[3] = vector3D.w;
- break;
-
- case 1:
- _rawData[4] = vector3D.x;
- _rawData[5] = vector3D.y;
- _rawData[6] = vector3D.z;
- _rawData[7] = vector3D.w;
- break;
-
- case 2:
- _rawData[8] = vector3D.x;
- _rawData[9] = vector3D.y;
- _rawData[10] = vector3D.z;
- _rawData[11] = vector3D.w;
- break;
-
- case 3:
- _rawData[12] = vector3D.x;
- _rawData[13] = vector3D.y;
- _rawData[14] = vector3D.z;
- _rawData[15] = vector3D.w;
- break;
- }
- }
-
- public function decompose(orientationStyle:String = "eulerAngles"):Vector. {
- checkOrientation(orientationStyle);
-
- var vec = new Vector.([]);
- var m = clone();
- var mr = m.rawData;
-
- var pos = new Vector3D(mr[12], mr[13], mr[14]);
- mr[12] = 0;
- mr[13] = 0;
- mr[14] = 0;
-
- var scale = new Vector3D();
-
- scale.x = Math.sqrt(mr[0] * mr[0] + mr[1] * mr[1] + mr[2] * mr[2]);
- scale.y = Math.sqrt(mr[4] * mr[4] + mr[5] * mr[5] + mr[6] * mr[6]);
- scale.z = Math.sqrt(mr[8] * mr[8] + mr[9] * mr[9] + mr[10] * mr[10]);
-
- if (mr[0] * (mr[5] * mr[10] - mr[6] * mr[9]) - mr[1] * (mr[4] * mr[10] - mr[6] * mr[8]) + mr[2] * (mr[4] * mr[9] - mr[5] * mr[8]) < 0) {
- scale.z = -scale.z;
- }
-
- mr[0] /= scale.x;
- mr[1] /= scale.x;
- mr[2] /= scale.x;
- mr[4] /= scale.y;
- mr[5] /= scale.y;
- mr[6] /= scale.y;
- mr[8] /= scale.z;
- mr[9] /= scale.z;
- mr[10] /= scale.z;
-
- var rot = new Vector3D();
-
- switch (orientationStyle) {
- case Orientation3D.AXIS_ANGLE:
- rot.w = Math.acos((mr[0] + mr[5] + mr[10] - 1) / 2);
-
- var len = Math.sqrt((mr[6] - mr[9]) * (mr[6] - mr[9]) + (mr[8] - mr[2]) * (mr[8] - mr[2]) + (mr[1] - mr[4]) * (mr[1] - mr[4]));
-
- if (len != 0) {
- rot.x = (mr[6] - mr[9]) / len;
- rot.y = (mr[8] - mr[2]) / len;
- rot.z = (mr[1] - mr[4]) / len;
- }
- else {
- rot.x = rot.y = rot.z = 0;
- }
- break;
-
- case Orientation3D.QUATERNION:
- var tr = mr[0] + mr[5] + mr[10];
-
- if (tr > 0) {
- rot.w = Math.sqrt(1 + tr) / 2;
-
- rot.x = (mr[6] - mr[9]) / (4 * rot.w);
- rot.y = (mr[8] - mr[2]) / (4 * rot.w);
- rot.z = (mr[1] - mr[4]) / (4 * rot.w);
- }
- else if ((mr[0] > mr[5]) && (mr[0] > mr[10])) {
- rot.x = Math.sqrt(1 + mr[0] - mr[5] - mr[10]) / 2;
-
- rot.w = (mr[6] - mr[9]) / (4 * rot.x);
- rot.y = (mr[1] + mr[4]) / (4 * rot.x);
- rot.z = (mr[8] + mr[2]) / (4 * rot.x);
- }
- else if (mr[5] > mr[10]) {
- rot.y = Math.sqrt(1 + mr[5] - mr[0] - mr[10]) / 2;
-
- rot.x = (mr[1] + mr[4]) / (4 * rot.y);
- rot.w = (mr[8] - mr[2]) / (4 * rot.y);
- rot.z = (mr[6] + mr[9]) / (4 * rot.y);
- }
- else {
- rot.z = Math.sqrt(1 + mr[10] - mr[0] - mr[5]) / 2;
-
- rot.x = (mr[8] + mr[2]) / (4 * rot.z);
- rot.y = (mr[6] + mr[9]) / (4 * rot.z);
- rot.w = (mr[1] - mr[4]) / (4 * rot.z);
- }
- break;
-
- case Orientation3D.EULER_ANGLES:
- rot.y = Math.asin(-mr[2]);
-
- if (mr[2] != 1 && mr[2] != -1) {
- rot.x = Math.atan2(mr[6], mr[10]);
- rot.z = Math.atan2(mr[1], mr[0]);
- }
- else {
- rot.z = 0;
- rot.x = Math.atan2(mr[4], mr[5]);
- }
- break;
- }
-
- vec.push(pos);
- vec.push(rot);
- vec.push(scale);
-
- return vec;
- }
-
- public function invert():Boolean {
- var d = determinant;
- var invertable = Math.abs(d) > 0.00000000001;
-
- if (invertable) {
- d = 1 / d;
-
- var m11:Number = _rawData[0];
- var m21:Number = _rawData[4];
- var m31:Number = _rawData[8];
- var m41:Number = _rawData[12];
- var m12:Number = _rawData[1];
- var m22:Number = _rawData[5];
- var m32:Number = _rawData[9];
- var m42:Number = _rawData[13];
- var m13:Number = _rawData[2];
- var m23:Number = _rawData[6];
- var m33:Number = _rawData[10];
- var m43:Number = _rawData[14];
- var m14:Number = _rawData[3];
- var m24:Number = _rawData[7];
- var m34:Number = _rawData[11];
- var m44:Number = _rawData[15];
-
- _rawData[0] = d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24));
- _rawData[1] = -d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14));
- _rawData[2] = d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14));
- _rawData[3] = -d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14));
- _rawData[4] = -d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24));
- _rawData[5] = d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14));
- _rawData[6] = -d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14));
- _rawData[7] = d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14));
- _rawData[8] = d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24));
- _rawData[9] = -d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14));
- _rawData[10] = d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14));
- _rawData[11] = -d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14));
- _rawData[12] = -d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23));
- _rawData[13] = d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13));
- _rawData[14] = -d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13));
- _rawData[15] = d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13));
- }
-
- return invertable;
- }
-
- public function get determinant():Number {
- return 1 * ((_rawData[0] * _rawData[5] - _rawData[4] * _rawData[1]) * (_rawData[10] * _rawData[15] - _rawData[14] * _rawData[11])
- - (_rawData[0] * _rawData[9] - _rawData[8] * _rawData[1]) * (_rawData[6] * _rawData[15] - _rawData[14] * _rawData[7])
- + (_rawData[0] * _rawData[13] - _rawData[12] * _rawData[1]) * (_rawData[6] * _rawData[11] - _rawData[10] * _rawData[7])
- + (_rawData[4] * _rawData[9] - _rawData[8] * _rawData[5]) * (_rawData[2] * _rawData[15] - _rawData[14] * _rawData[3])
- - (_rawData[4] * _rawData[13] - _rawData[12] * _rawData[5]) * (_rawData[2] * _rawData[11] - _rawData[10] * _rawData[3])
- + (_rawData[8] * _rawData[13] - _rawData[12] * _rawData[9]) * (_rawData[2] * _rawData[7] - _rawData[6] * _rawData[3]));
- }
-
- }
+package flash.geom
+{
+ import __ruffle__.stub_method;
+
+ public class Matrix3D
+ {
+
+ // The 4x4 matrix data, stored in column-major order
+ // This is never null.
+ private var _rawData:Vector.;
+
+ public function get rawData():Vector.
+ {
+ return this._rawData.AS3::concat();
+ }
+
+ public function set rawData(value:Vector.):void
+ {
+ if (value != null)
+ {
+ this._rawData = value.AS3::concat();
+ }
+ }
+
+ public function Matrix3D(v:Vector. = null)
+ {
+ if (v != null && v.length == 16)
+ {
+ this._rawData = v.AS3::concat();
+ }
+ else
+ {
+ this.identity();
+ }
+ }
+
+ public function identity():void
+ {
+ // Note that every 4 elements is a *column*, not a row
+ this._rawData = new [
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1
+ ];
+ }
+
+ public function appendTranslation(x:Number, y:Number, z:Number):void
+ {
+ this._rawData[12] += x;
+ this._rawData[13] += y;
+ this._rawData[14] += z;
+ }
+
+ public function appendRotation(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
+ {
+ var tx:Number, ty:Number, tz:Number;
+ tx = ty = tz = 0;
+
+ if (pivotPoint != null)
+ {
+ tx = pivotPoint.x;
+ ty = pivotPoint.y;
+ tz = pivotPoint.z;
+ }
+ var radian = degrees * Math.PI / 180;
+ var cos = Math.cos(radian);
+ var sin = Math.sin(radian);
+ var x = axis.x;
+ var y = axis.y;
+ var z = axis.z;
+ var x2 = x * x;
+ var y2 = y * y;
+ var z2 = z * z;
+ var ls = x2 + y2 + z2;
+ if (ls != 0)
+ {
+ var l = Math.sqrt(ls);
+ x /= l;
+ y /= l;
+ z /= l;
+ x2 /= ls;
+ y2 /= ls;
+ z2 /= ls;
+ }
+ var ccos = 1 - cos;
+ var m = new Matrix3D();
+
+ var d = m.rawData;
+ d[0] = x2 + (y2 + z2) * cos;
+ d[1] = x * y * ccos + z * sin;
+ d[2] = x * z * ccos - y * sin;
+ d[4] = x * y * ccos - z * sin;
+ d[5] = y2 + (x2 + z2) * cos;
+ d[6] = y * z * ccos + x * sin;
+ d[8] = x * z * ccos + y * sin;
+ d[9] = y * z * ccos - x * sin;
+ d[10] = z2 + (x2 + y2) * cos;
+ d[12] = (tx * (y2 + z2) - x * (ty * y + tz * z)) * ccos + (ty * z - tz * y) * sin;
+ d[13] = (ty * (x2 + z2) - y * (tx * x + tz * z)) * ccos + (tz * x - tx * z) * sin;
+ d[14] = (tz * (x2 + y2) - z * (tx * x + ty * y)) * ccos + (tx * y - ty * x) * sin;
+ m.rawData = d;
+
+ this.append(m);
+ }
+
+ [API("674")]
+ public function copyRawDataFrom(vector:Vector., index:uint = 0, transpose:Boolean = false):void
+ {
+ if (transpose)
+ {
+ this.transpose();
+ }
+
+ var length = vector.length - index;
+
+ for (var i = 0; i < length; i++)
+ {
+ this._rawData[i] = vector[i + index];
+ }
+
+ if (transpose)
+ {
+ this.transpose();
+ }
+ }
+
+ // Based on https://github.com/openfl/openfl/blob/develop/src/openfl/geom/Matrix3D.hx#L542C1-L573
+ [API("674")]
+ public function copyRowTo(row:uint, vector3D:Vector3D):void
+ {
+ if (row > 3)
+ {
+ throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
+ }
+
+ switch (row)
+ {
+ case 0:
+ vector3D.x = rawData[0];
+ vector3D.y = rawData[4];
+ vector3D.z = rawData[8];
+ vector3D.w = rawData[12];
+ break;
+ case 1:
+ vector3D.x = rawData[1];
+ vector3D.y = rawData[5];
+ vector3D.z = rawData[9];
+ vector3D.w = rawData[13];
+ break;
+ case 2:
+ vector3D.x = rawData[2];
+ vector3D.y = rawData[6];
+ vector3D.z = rawData[10];
+ vector3D.w = rawData[14];
+ break;
+ case 3:
+ vector3D.x = rawData[3];
+ vector3D.y = rawData[7];
+ vector3D.z = rawData[11];
+ vector3D.w = rawData[15];
+ break;
+ }
+ }
+
+ // Based on https://github.com/openfl/openfl/blob/develop/src/openfl/geom/Matrix3D.hx#L504-L534
+ [API("674")]
+ public function copyRowFrom(row:uint, vector3D:Vector3D):void
+ {
+ if (row > 3)
+ {
+ throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
+ }
+
+ switch (row)
+ {
+ case 0:
+ _rawData[0] = vector3D.x;
+ _rawData[4] = vector3D.y;
+ _rawData[8] = vector3D.z;
+ _rawData[12] = vector3D.w;
+ break;
+ case 1:
+ _rawData[1] = vector3D.x;
+ _rawData[5] = vector3D.y;
+ _rawData[9] = vector3D.z;
+ _rawData[13] = vector3D.w;
+ break;
+ case 2:
+ _rawData[2] = vector3D.x;
+ _rawData[6] = vector3D.y;
+ _rawData[10] = vector3D.z;
+ _rawData[14] = vector3D.w;
+ break;
+ case 3:
+ _rawData[3] = vector3D.x;
+ _rawData[7] = vector3D.y;
+ _rawData[11] = vector3D.z;
+ _rawData[15] = vector3D.w;
+ break;
+ }
+ }
+
+ public function deltaTransformVector(v:Vector3D):Vector3D
+ {
+ var x:Number = this._rawData[0] * v.x + this._rawData[4] * v.y + this._rawData[8] * v.z;
+ var y:Number = this._rawData[1] * v.x + this._rawData[5] * v.y + this._rawData[9] * v.z;
+ var z:Number = this._rawData[2] * v.x + this._rawData[6] * v.y + this._rawData[10] * v.z;
+ var w:Number = this._rawData[3] * v.x + this._rawData[7] * v.y + this._rawData[11] * v.z;
+ return new Vector3D(x, y, z, w);
+ }
+
+ public function transformVector(v:Vector3D):Vector3D
+ {
+ var x:Number = this._rawData[0] * v.x + this._rawData[4] * v.y + this._rawData[8] * v.z + this._rawData[12];
+ var y:Number = this._rawData[1] * v.x + this._rawData[5] * v.y + this._rawData[9] * v.z + this._rawData[13];
+ var z:Number = this._rawData[2] * v.x + this._rawData[6] * v.y + this._rawData[10] * v.z + this._rawData[14];
+ var w:Number = this._rawData[3] * v.x + this._rawData[7] * v.y + this._rawData[11] * v.z + this._rawData[15];
+ return new Vector3D(x, y, z, w);
+ }
+
+ public function transformVectors(vin:Vector., vout:Vector.):void
+ {
+ if (vin == null)
+ {
+ throw new TypeError("Error #2007: Parameter vin must be non-null.", 2007);
+ }
+ if (vout == null)
+ {
+ throw new TypeError("Error #2007: Parameter vout must be non-null.", 2007);
+ }
+
+ var resultVecsLength:Number = Math.floor(vin.length / 3) * 3;
+ if (resultVecsLength > vout.length && vout.fixed)
+ {
+ throw new RangeError("Error #1126: Cannot change the length of a fixed Vector.");
+ }
+
+ var result3D:Vector3D;
+ for (var i = 0; i < resultVecsLength; i += 3)
+ {
+ result3D = transformVector(new Vector3D(vin[i], vin[i + 1], vin[i + 2]));
+ if (i <= vout.length)
+ {
+ vout[i] = result3D.x;
+ vout[i + 1] = result3D.y;
+ vout[i + 2] = result3D.z;
+ }
+ else
+ {
+ vout.push(result3D.x, result3D.y, result3D.z);
+ }
+ }
+ }
+
+ public function transpose():void
+ {
+ // Make a copy
+ var oRawData = this._rawData.AS3::concat();
+ this._rawData[1] = oRawData[4];
+ this._rawData[2] = oRawData[8];
+ this._rawData[3] = oRawData[12];
+ this._rawData[4] = oRawData[1];
+ this._rawData[6] = oRawData[9];
+ this._rawData[7] = oRawData[13];
+ this._rawData[8] = oRawData[2];
+ this._rawData[9] = oRawData[6];
+ this._rawData[11] = oRawData[14];
+ this._rawData[12] = oRawData[3];
+ this._rawData[13] = oRawData[7];
+ this._rawData[14] = oRawData[11];
+ }
+ public function append(lhs:Matrix3D):void
+ {
+ var m111:Number = this._rawData[0],
+ m121:Number = this._rawData[4],
+ m131:Number = this._rawData[8],
+ m141:Number = this._rawData[12],
+ m112:Number = this._rawData[1],
+ m122:Number = this._rawData[5],
+ m132:Number = this._rawData[9],
+ m142:Number = this._rawData[13],
+ m113:Number = this._rawData[2],
+ m123:Number = this._rawData[6],
+ m133:Number = this._rawData[10],
+ m143:Number = this._rawData[14],
+ m114:Number = this._rawData[3],
+ m124:Number = this._rawData[7],
+ m134:Number = this._rawData[11],
+ m144:Number = this._rawData[15],
+ m211:Number = lhs._rawData[0],
+ m221:Number = lhs._rawData[4],
+ m231:Number = lhs._rawData[8],
+ m241:Number = lhs._rawData[12],
+ m212:Number = lhs._rawData[1],
+ m222:Number = lhs._rawData[5],
+ m232:Number = lhs._rawData[9],
+ m242:Number = lhs._rawData[13],
+ m213:Number = lhs._rawData[2],
+ m223:Number = lhs._rawData[6],
+ m233:Number = lhs._rawData[10],
+ m243:Number = lhs._rawData[14],
+ m214:Number = lhs._rawData[3],
+ m224:Number = lhs._rawData[7],
+ m234:Number = lhs._rawData[11],
+ m244:Number = lhs._rawData[15];
+
+ this._rawData[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
+ this._rawData[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
+ this._rawData[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
+ this._rawData[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
+
+ this._rawData[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
+ this._rawData[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
+ this._rawData[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
+ this._rawData[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
+
+ this._rawData[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
+ this._rawData[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
+ this._rawData[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
+ this._rawData[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
+
+ this._rawData[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
+ this._rawData[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
+ this._rawData[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
+ this._rawData[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
+ }
+
+ // Based on https://github.com/openfl/openfl/blob/971a4c9e43b5472fd84d73920a2b7c1b3d8d9257/src/openfl/geom/Matrix3D.hx#L307
+ public function appendScale(xScale:Number, yScale:Number, zScale:Number):void
+ {
+ this.append(new Matrix3D(Vector.([
+ xScale, 0.0, 0.0, 0.0, 0.0, yScale, 0.0, 0.0, 0.0, 0.0, zScale, 0.0, 0.0, 0.0, 0.0, 1.0
+ ])));
+ }
+
+ public function prependTranslation(x:Number, y:Number, z:Number):void
+ {
+ var m = new Matrix3D();
+ m.position = new Vector3D(x, y, z);
+ this.prepend(m);
+ }
+
+ public function prependRotation(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
+ {
+ var m = new Matrix3D();
+ m.appendRotation(degrees, axis, pivotPoint);
+ this.prepend(m);
+ }
+
+ public function get position():Vector3D
+ {
+ return new Vector3D(_rawData[12], _rawData[13], _rawData[14]);
+ }
+
+ public function set position(val:Vector3D):void
+ {
+ this._rawData[12] = val.x;
+ this._rawData[13] = val.y;
+ this._rawData[14] = val.z;
+ }
+
+ public function prepend(rhs:Matrix3D):void
+ {
+ var m111:Number = rhs._rawData[0],
+ m121:Number = rhs._rawData[4],
+ m131:Number = rhs._rawData[8],
+ m141:Number = rhs._rawData[12],
+ m112:Number = rhs._rawData[1],
+ m122:Number = rhs._rawData[5],
+ m132:Number = rhs._rawData[9],
+ m142:Number = rhs._rawData[13],
+ m113:Number = rhs._rawData[2],
+ m123:Number = rhs._rawData[6],
+ m133:Number = rhs._rawData[10],
+ m143:Number = rhs._rawData[14],
+ m114:Number = rhs._rawData[3],
+ m124:Number = rhs._rawData[7],
+ m134:Number = rhs._rawData[11],
+ m144:Number = rhs._rawData[15],
+ m211:Number = this._rawData[0],
+ m221:Number = this._rawData[4],
+ m231:Number = this._rawData[8],
+ m241:Number = this._rawData[12],
+ m212:Number = this._rawData[1],
+ m222:Number = this._rawData[5],
+ m232:Number = this._rawData[9],
+ m242:Number = this._rawData[13],
+ m213:Number = this._rawData[2],
+ m223:Number = this._rawData[6],
+ m233:Number = this._rawData[10],
+ m243:Number = this._rawData[14],
+ m214:Number = this._rawData[3],
+ m224:Number = this._rawData[7],
+ m234:Number = this._rawData[11],
+ m244:Number = this._rawData[15];
+
+ this._rawData[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
+ this._rawData[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
+ this._rawData[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
+ this._rawData[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
+
+ this._rawData[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
+ this._rawData[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
+ this._rawData[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
+ this._rawData[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
+
+ this._rawData[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
+ this._rawData[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
+ this._rawData[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
+ this._rawData[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
+
+ this._rawData[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
+ this._rawData[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
+ this._rawData[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
+ this._rawData[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
+ }
+
+ public function prependScale(xScale:Number, yScale:Number, zScale:Number):void
+ {
+ var m = new Matrix3D();
+ m.appendScale(xScale, yScale, zScale);
+ this.prepend(m);
+ }
+
+ [API("674")]
+ public function copyFrom(other:Matrix3D):void
+ {
+ // This makes a copy of other.rawData
+ this._rawData = other.rawData;
+ }
+
+ [API("674")]
+ public function copyRawDataTo(vector:Vector., index:uint = 0, transpose:Boolean = false):void
+ {
+ if (transpose)
+ {
+ this.transpose();
+ }
+
+ for (var i = 0; i < rawData.length; i++)
+ {
+ vector[i + index] = _rawData[i];
+ }
+
+ if (transpose)
+ {
+ this.transpose();
+ }
+ }
+
+ public function clone():Matrix3D
+ {
+ return new Matrix3D(this.rawData);
+ }
+
+ public function copyToMatrix3D(other:Matrix3D):void
+ {
+ other.rawData = rawData;
+ }
+
+ public function pointAt(pos:Vector3D, at:Vector3D = null, up:Vector3D = null):void
+ {
+ stub_method("flash.geom.Matrix3D", "pointAt");
+ }
+
+ // Based on OpenFL: https://github.com/openfl/openfl/blob/971a4c9e43b5472fd84d73920a2b7c1b3d8d9257/src/openfl/geom/Matrix3D.hx#L1437
+ public function recompose(components:Vector., orientationStyle:String = "eulerAngles"):Boolean
+ {
+ checkOrientation(orientationStyle);
+
+ if (orientationStyle == Orientation3D.QUATERNION)
+ {
+ // Flash throws exceptions from 'recompose' certain values of 'components',
+ // which we need to reproduce. See the 'matrix3d_compose' test
+ stub_method("flash.geom.Matrix3D", "recompose", "Orientation3D.QUATERNION");
+ }
+ // RUFFLE - unlike in OpenFL, we continue on even if some of the 'scale' components are 0
+ if (components.length < 3)
+ {
+ return false;
+ }
+
+ identity();
+
+ var scale = [];
+ scale[0] = scale[1] = scale[2] = components[2].x;
+ scale[4] = scale[5] = scale[6] = components[2].y;
+ scale[8] = scale[9] = scale[10] = components[2].z;
+
+ switch (orientationStyle)
+ {
+ case Orientation3D.EULER_ANGLES:
+ var cx = Math.cos(components[1].x);
+ var cy = Math.cos(components[1].y);
+ var cz = Math.cos(components[1].z);
+ var sx = Math.sin(components[1].x);
+ var sy = Math.sin(components[1].y);
+ var sz = Math.sin(components[1].z);
+
+ _rawData[0] = cy * cz * scale[0];
+ _rawData[1] = cy * sz * scale[1];
+ _rawData[2] = -sy * scale[2];
+ _rawData[3] = 0;
+ _rawData[4] = (sx * sy * cz - cx * sz) * scale[4];
+ _rawData[5] = (sx * sy * sz + cx * cz) * scale[5];
+ _rawData[6] = sx * cy * scale[6];
+ _rawData[7] = 0;
+ _rawData[8] = (cx * sy * cz + sx * sz) * scale[8];
+ _rawData[9] = (cx * sy * sz - sx * cz) * scale[9];
+ _rawData[10] = cx * cy * scale[10];
+ _rawData[11] = 0;
+ _rawData[12] = components[0].x;
+ _rawData[13] = components[0].y;
+ _rawData[14] = components[0].z;
+ _rawData[15] = 1;
+ break;
+
+ default:
+ var x = components[1].x;
+ var y = components[1].y;
+ var z = components[1].z;
+ var w = components[1].w;
+
+ if (orientationStyle == Orientation3D.AXIS_ANGLE)
+ {
+ x *= Math.sin(w / 2);
+ y *= Math.sin(w / 2);
+ z *= Math.sin(w / 2);
+ w = Math.cos(w / 2);
+ }
+
+ _rawData[0] = (1 - 2 * y * y - 2 * z * z) * scale[0];
+ _rawData[1] = (2 * x * y + 2 * w * z) * scale[1];
+ _rawData[2] = (2 * x * z - 2 * w * y) * scale[2];
+ _rawData[3] = 0;
+ _rawData[4] = (2 * x * y - 2 * w * z) * scale[4];
+ _rawData[5] = (1 - 2 * x * x - 2 * z * z) * scale[5];
+ _rawData[6] = (2 * y * z + 2 * w * x) * scale[6];
+ _rawData[7] = 0;
+ _rawData[8] = (2 * x * z + 2 * w * y) * scale[8];
+ _rawData[9] = (2 * y * z - 2 * w * x) * scale[9];
+ _rawData[10] = (1 - 2 * x * x - 2 * y * y) * scale[10];
+ _rawData[11] = 0;
+ _rawData[12] = components[0].x;
+ _rawData[13] = components[0].y;
+ _rawData[14] = components[0].z;
+ _rawData[15] = 1;
+ }
+
+ if (components[2].x == 0)
+ {
+ _rawData[0] = 1e-15;
+ }
+
+ if (components[2].y == 0)
+ {
+ _rawData[5] = 1e-15;
+ }
+
+ if (components[2].z == 0)
+ {
+ _rawData[10] = 1e-15;
+ }
+
+ return !(components[2].x == 0 || components[2].y == 0 || components[2].y == 0);
+ }
+
+ [API("674")]
+ public function copyColumnTo(column:uint, vector3D:Vector3D):void
+ {
+ if (column > 3)
+ {
+ throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
+ }
+ switch (column)
+ {
+ case 0:
+ vector3D.x = _rawData[0];
+ vector3D.y = _rawData[1];
+ vector3D.z = _rawData[2];
+ vector3D.w = _rawData[3];
+ break;
+
+ case 1:
+ vector3D.x = _rawData[4];
+ vector3D.y = _rawData[5];
+ vector3D.z = _rawData[6];
+ vector3D.w = _rawData[7];
+ break;
+
+ case 2:
+ vector3D.x = _rawData[8];
+ vector3D.y = _rawData[9];
+ vector3D.z = _rawData[10];
+ vector3D.w = _rawData[11];
+ break;
+
+ case 3:
+ vector3D.x = _rawData[12];
+ vector3D.y = _rawData[13];
+ vector3D.z = _rawData[14];
+ vector3D.w = _rawData[15];
+ break;
+ }
+ }
+
+ [API("674")]
+ public function copyColumnFrom(column:uint, vector3D:Vector3D):void
+ {
+ if (column > 3)
+ {
+ throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
+ }
+ switch (column)
+ {
+ case 0:
+ _rawData[0] = vector3D.x;
+ _rawData[1] = vector3D.y;
+ _rawData[2] = vector3D.z;
+ _rawData[3] = vector3D.w;
+ break;
+
+ case 1:
+ _rawData[4] = vector3D.x;
+ _rawData[5] = vector3D.y;
+ _rawData[6] = vector3D.z;
+ _rawData[7] = vector3D.w;
+ break;
+
+ case 2:
+ _rawData[8] = vector3D.x;
+ _rawData[9] = vector3D.y;
+ _rawData[10] = vector3D.z;
+ _rawData[11] = vector3D.w;
+ break;
+
+ case 3:
+ _rawData[12] = vector3D.x;
+ _rawData[13] = vector3D.y;
+ _rawData[14] = vector3D.z;
+ _rawData[15] = vector3D.w;
+ break;
+ }
+ }
+
+ public function decompose(orientationStyle:String = "eulerAngles"):Vector.
+ {
+ checkOrientation(orientationStyle);
+
+ var vec = new Vector.([]);
+ var m = clone();
+ var mr = m.rawData;
+
+ var pos = new Vector3D(mr[12], mr[13], mr[14]);
+ mr[12] = 0;
+ mr[13] = 0;
+ mr[14] = 0;
+
+ var scale = new Vector3D();
+
+ scale.x = Math.sqrt(mr[0] * mr[0] + mr[1] * mr[1] + mr[2] * mr[2]);
+ scale.y = Math.sqrt(mr[4] * mr[4] + mr[5] * mr[5] + mr[6] * mr[6]);
+ scale.z = Math.sqrt(mr[8] * mr[8] + mr[9] * mr[9] + mr[10] * mr[10]);
+
+ if (mr[0] * (mr[5] * mr[10] - mr[6] * mr[9]) - mr[1] * (mr[4] * mr[10] - mr[6] * mr[8]) + mr[2] * (mr[4] * mr[9] - mr[5] * mr[8]) < 0)
+ {
+ scale.z = -scale.z;
+ }
+
+ mr[0] /= scale.x;
+ mr[1] /= scale.x;
+ mr[2] /= scale.x;
+ mr[4] /= scale.y;
+ mr[5] /= scale.y;
+ mr[6] /= scale.y;
+ mr[8] /= scale.z;
+ mr[9] /= scale.z;
+ mr[10] /= scale.z;
+
+ var rot = new Vector3D();
+
+ switch (orientationStyle)
+ {
+ case Orientation3D.AXIS_ANGLE:
+ rot.w = Math.acos((mr[0] + mr[5] + mr[10] - 1) / 2);
+
+ var len = Math.sqrt((mr[6] - mr[9]) * (mr[6] - mr[9]) + (mr[8] - mr[2]) * (mr[8] - mr[2]) + (mr[1] - mr[4]) * (mr[1] - mr[4]));
+
+ if (len != 0)
+ {
+ rot.x = (mr[6] - mr[9]) / len;
+ rot.y = (mr[8] - mr[2]) / len;
+ rot.z = (mr[1] - mr[4]) / len;
+ }
+ else
+ {
+ rot.x = rot.y = rot.z = 0;
+ }
+ break;
+
+ case Orientation3D.QUATERNION:
+ var tr = mr[0] + mr[5] + mr[10];
+
+ if (tr > 0)
+ {
+ rot.w = Math.sqrt(1 + tr) / 2;
+
+ rot.x = (mr[6] - mr[9]) / (4 * rot.w);
+ rot.y = (mr[8] - mr[2]) / (4 * rot.w);
+ rot.z = (mr[1] - mr[4]) / (4 * rot.w);
+ }
+ else if ((mr[0] > mr[5]) && (mr[0] > mr[10]))
+ {
+ rot.x = Math.sqrt(1 + mr[0] - mr[5] - mr[10]) / 2;
+
+ rot.w = (mr[6] - mr[9]) / (4 * rot.x);
+ rot.y = (mr[1] + mr[4]) / (4 * rot.x);
+ rot.z = (mr[8] + mr[2]) / (4 * rot.x);
+ }
+ else if (mr[5] > mr[10])
+ {
+ rot.y = Math.sqrt(1 + mr[5] - mr[0] - mr[10]) / 2;
+
+ rot.x = (mr[1] + mr[4]) / (4 * rot.y);
+ rot.w = (mr[8] - mr[2]) / (4 * rot.y);
+ rot.z = (mr[6] + mr[9]) / (4 * rot.y);
+ }
+ else
+ {
+ rot.z = Math.sqrt(1 + mr[10] - mr[0] - mr[5]) / 2;
+
+ rot.x = (mr[8] + mr[2]) / (4 * rot.z);
+ rot.y = (mr[6] + mr[9]) / (4 * rot.z);
+ rot.w = (mr[1] - mr[4]) / (4 * rot.z);
+ }
+ break;
+
+ case Orientation3D.EULER_ANGLES:
+ rot.y = Math.asin(-mr[2]);
+
+ if (mr[2] != 1 && mr[2] != -1)
+ {
+ rot.x = Math.atan2(mr[6], mr[10]);
+ rot.z = Math.atan2(mr[1], mr[0]);
+ }
+ else
+ {
+ rot.z = 0;
+ rot.x = Math.atan2(mr[4], mr[5]);
+ }
+ break;
+ }
+
+ vec.push(pos);
+ vec.push(rot);
+ vec.push(scale);
+
+ return vec;
+ }
+
+ public function invert():Boolean
+ {
+ var d = determinant;
+ var invertable = Math.abs(d) > 0.00000000001;
+
+ if (invertable)
+ {
+ d = 1 / d;
+
+ var m11:Number = _rawData[0];
+ var m21:Number = _rawData[4];
+ var m31:Number = _rawData[8];
+ var m41:Number = _rawData[12];
+ var m12:Number = _rawData[1];
+ var m22:Number = _rawData[5];
+ var m32:Number = _rawData[9];
+ var m42:Number = _rawData[13];
+ var m13:Number = _rawData[2];
+ var m23:Number = _rawData[6];
+ var m33:Number = _rawData[10];
+ var m43:Number = _rawData[14];
+ var m14:Number = _rawData[3];
+ var m24:Number = _rawData[7];
+ var m34:Number = _rawData[11];
+ var m44:Number = _rawData[15];
+
+ _rawData[0] = d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24));
+ _rawData[1] = -d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14));
+ _rawData[2] = d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14));
+ _rawData[3] = -d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14));
+ _rawData[4] = -d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24));
+ _rawData[5] = d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14));
+ _rawData[6] = -d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14));
+ _rawData[7] = d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14));
+ _rawData[8] = d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24));
+ _rawData[9] = -d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14));
+ _rawData[10] = d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14));
+ _rawData[11] = -d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14));
+ _rawData[12] = -d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23));
+ _rawData[13] = d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13));
+ _rawData[14] = -d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13));
+ _rawData[15] = d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13));
+ }
+
+ return invertable;
+ }
+
+ public function get determinant():Number
+ {
+ return 1 * ((_rawData[0] * _rawData[5] - _rawData[4] * _rawData[1]) * (_rawData[10] * _rawData[15] - _rawData[14] * _rawData[11])
+ - (_rawData[0] * _rawData[9] - _rawData[8] * _rawData[1]) * (_rawData[6] * _rawData[15] - _rawData[14] * _rawData[7])
+ + (_rawData[0] * _rawData[13] - _rawData[12] * _rawData[1]) * (_rawData[6] * _rawData[11] - _rawData[10] * _rawData[7])
+ + (_rawData[4] * _rawData[9] - _rawData[8] * _rawData[5]) * (_rawData[2] * _rawData[15] - _rawData[14] * _rawData[3])
+ - (_rawData[4] * _rawData[13] - _rawData[12] * _rawData[5]) * (_rawData[2] * _rawData[11] - _rawData[10] * _rawData[3])
+ + (_rawData[8] * _rawData[13] - _rawData[12] * _rawData[9]) * (_rawData[2] * _rawData[7] - _rawData[6] * _rawData[3]));
+ }
+
+ }
}
import flash.geom.Orientation3D;
-function checkOrientation(orientationStyle:String) {
- if (!(orientationStyle == Orientation3D.AXIS_ANGLE || orientationStyle == Orientation3D.EULER_ANGLES || orientationStyle == Orientation3D.QUATERNION)) {
- throw new Error("Error #2187: Invalid orientation style " + orientationStyle + ". Value must be one of 'Orientation3D.EULER_ANGLES', 'Orientation3D.AXIS_ANGLE', or 'Orientation3D.QUATERNION'.", 2187);
- }
+function checkOrientation(orientationStyle:String)
+{
+ if (!(orientationStyle == Orientation3D.AXIS_ANGLE || orientationStyle == Orientation3D.EULER_ANGLES || orientationStyle == Orientation3D.QUATERNION))
+ {
+ throw new Error("Error #2187: Invalid orientation style " + orientationStyle + ". Value must be one of 'Orientation3D.EULER_ANGLES', 'Orientation3D.AXIS_ANGLE', or 'Orientation3D.QUATERNION'.", 2187);
+ }
}
diff --git a/core/src/avm2/globals/flash/geom/Orientation3D.as b/core/src/avm2/globals/flash/geom/Orientation3D.as
index 79ad1b0f6478..65b8541728ad 100644
--- a/core/src/avm2/globals/flash/geom/Orientation3D.as
+++ b/core/src/avm2/globals/flash/geom/Orientation3D.as
@@ -1,7 +1,9 @@
-package flash.geom {
- public final class Orientation3D {
- public static const EULER_ANGLES: String = "eulerAngles";
- public static const AXIS_ANGLE: String = "axisAngle";
- public static const QUATERNION: String = "quaternion";
- }
+package flash.geom
+{
+ public final class Orientation3D
+ {
+ public static const EULER_ANGLES:String = "eulerAngles";
+ public static const AXIS_ANGLE:String = "axisAngle";
+ public static const QUATERNION:String = "quaternion";
+ }
}
diff --git a/core/src/avm2/globals/flash/geom/PerspectiveProjection.as b/core/src/avm2/globals/flash/geom/PerspectiveProjection.as
index a65cb790bb1c..efcbd30d46d7 100644
--- a/core/src/avm2/globals/flash/geom/PerspectiveProjection.as
+++ b/core/src/avm2/globals/flash/geom/PerspectiveProjection.as
@@ -1,44 +1,54 @@
-package flash.geom {
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
- import __ruffle__.stub_setter;
- import flash.geom.Matrix3D;
- import flash.geom.Point;
+package flash.geom
+{
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_setter;
+ import flash.geom.Matrix3D;
+ import flash.geom.Point;
- public class PerspectiveProjection {
- // Getters are stubbed with what seem to be Flash's default values
- public function PerspectiveProjection() {
- stub_constructor("flash.geom.PerspectiveProjection");
- }
+ public class PerspectiveProjection
+ {
+ // Getters are stubbed with what seem to be Flash's default values
+ public function PerspectiveProjection()
+ {
+ stub_constructor("flash.geom.PerspectiveProjection");
+ }
- public function get fieldOfView():Number {
- stub_getter("flash.geom.PerspectiveProjection", "fieldOfView");
- return 55;
- }
- public function set fieldOfView(value:Number) {
- stub_setter("flash.geom.PerspectiveProjection", "fieldOfView");
- }
+ public function get fieldOfView():Number
+ {
+ stub_getter("flash.geom.PerspectiveProjection", "fieldOfView");
+ return 55;
+ }
+ public function set fieldOfView(value:Number)
+ {
+ stub_setter("flash.geom.PerspectiveProjection", "fieldOfView");
+ }
- public function get focalLength():Number {
- stub_getter("flash.geom.PerspectiveProjection", "focalLength");
- return 480.25;
- }
- public function set focalLength(value:Number) {
- stub_setter("flash.geom.PerspectiveProjection", "focalLength");
- }
+ public function get focalLength():Number
+ {
+ stub_getter("flash.geom.PerspectiveProjection", "focalLength");
+ return 480.25;
+ }
+ public function set focalLength(value:Number)
+ {
+ stub_setter("flash.geom.PerspectiveProjection", "focalLength");
+ }
- public function get projectionCenter():Point {
- stub_getter("flash.geom.PerspectiveProjection", "projectionCenter");
- return new Point(250, 250);
- }
- public function set projectionCenter(value:Point) {
- stub_setter("flash.geom.PerspectiveProjection", "projectionCenter");
- }
+ public function get projectionCenter():Point
+ {
+ stub_getter("flash.geom.PerspectiveProjection", "projectionCenter");
+ return new Point(250, 250);
+ }
+ public function set projectionCenter(value:Point)
+ {
+ stub_setter("flash.geom.PerspectiveProjection", "projectionCenter");
+ }
- public function toMatrix3D():Matrix3D {
- stub_method("flash.geom.PerspectiveProjection", "toMatrix3D");
- return new Matrix3D();
- }
- }
+ public function toMatrix3D():Matrix3D
+ {
+ stub_method("flash.geom.PerspectiveProjection", "toMatrix3D");
+ return new Matrix3D();
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/geom/Point.as b/core/src/avm2/globals/flash/geom/Point.as
index a2265e8eae93..c11852dd1bf2 100644
--- a/core/src/avm2/globals/flash/geom/Point.as
+++ b/core/src/avm2/globals/flash/geom/Point.as
@@ -1,73 +1,90 @@
-package flash.geom {
- public class Point {
+package flash.geom
+{
+ public class Point
+ {
public var x:Number;
public var y:Number;
- public function Point(x:Number = 0, y:Number = 0) {
+ public function Point(x:Number = 0, y:Number = 0)
+ {
this.x = x;
this.y = y;
}
- public function get length():Number {
+ public function get length():Number
+ {
return Math.sqrt(this.x * this.x + this.y * this.y);
}
- public function toString():String {
+ public function toString():String
+ {
return "(x=" + this.x + ", y=" + this.y + ")";
}
- public function add(v:Point):Point {
- return new Point(this.x + v.x, this.y + v.y);
+ public function add(v:Point):Point
+ {
+ return new Point(this.x + v.x, this.y + v.y);
}
- public function subtract(v:Point):Point {
- return new Point(this.x - v.x, this.y - v.y);
+ public function subtract(v:Point):Point
+ {
+ return new Point(this.x - v.x, this.y - v.y);
}
- public function clone():Point {
+ public function clone():Point
+ {
return new Point(this.x, this.y);
}
[API("674")]
- public function copyFrom(sourcePoint:Point):void {
+ public function copyFrom(sourcePoint:Point):void
+ {
this.x = sourcePoint.x;
this.y = sourcePoint.y;
}
- public function equals(toCompare:Point):Boolean {
+ public function equals(toCompare:Point):Boolean
+ {
return this.x == toCompare.x && this.y == toCompare.y;
}
- public function normalize(thickness:Number):void {
+ public function normalize(thickness:Number):void
+ {
var len:Number = this.length;
- if (len > 0) {
+ if (len > 0)
+ {
var inv_d:Number = thickness / len;
this.x *= inv_d;
this.y *= inv_d;
- }
+ }
}
- public function offset(dx:Number, dy:Number):void {
+ public function offset(dx:Number, dy:Number):void
+ {
this.x += dx;
this.y += dy;
}
[API("674")]
- public function setTo(xa:Number, ya:Number):void {
+ public function setTo(xa:Number, ya:Number):void
+ {
this.x = xa;
this.y = ya;
}
- public static function distance(pt1:Point, pt2:Point):Number {
+ public static function distance(pt1:Point, pt2:Point):Number
+ {
return pt2.subtract(pt1).length;
}
- public static function interpolate(pt1:Point, pt2:Point, f:Number):Point {
+ public static function interpolate(pt1:Point, pt2:Point, f:Number):Point
+ {
return new Point(pt2.x - (pt2.x - pt1.x) * f, pt2.y - (pt2.y - pt1.y) * f);
}
- public static function polar(len:Number, angle:Number):Point {
- return new Point(len* Math.cos(angle), len * Math.sin(angle));
+ public static function polar(len:Number, angle:Number):Point
+ {
+ return new Point(len * Math.cos(angle), len * Math.sin(angle));
}
}
}
diff --git a/core/src/avm2/globals/flash/geom/Rectangle.as b/core/src/avm2/globals/flash/geom/Rectangle.as
index 51d443c35184..703f946808e2 100644
--- a/core/src/avm2/globals/flash/geom/Rectangle.as
+++ b/core/src/avm2/globals/flash/geom/Rectangle.as
@@ -1,202 +1,242 @@
-package flash.geom {
- public class Rectangle {
- public var x: Number;
- public var y: Number;
- public var width: Number;
- public var height: Number;
-
- public function Rectangle(x: Number = 0, y: Number = 0, width: Number = 0, height: Number = 0) {
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- }
-
- public function get left(): Number {
- return this.x;
- }
-
- public function set left(value: Number): void {
- this.width += this.x - value;
- this.x = value;
- }
-
- public function get right(): Number {
- return this.x + this.width;
- }
-
- public function set right(value: Number): void {
- this.width = value - this.x;
- }
-
- public function get top(): Number {
- return this.y;
- }
-
- public function set top(value: Number): void {
- this.height += this.y - value;
- this.y = value;
- }
-
- public function get bottom(): Number {
- return this.y + this.height;
- }
-
- public function set bottom(value: Number): void {
- this.height = value - this.y;
- }
-
- public function get topLeft(): Point {
- return new Point(this.x, this.y);
- }
-
- public function set topLeft(value: Point): void {
- this.width += this.x - value.x;
- this.height += this.y - value.y;
- this.x = value.x;
- this.y = value.y;
- }
-
- public function get bottomRight(): Point {
- return new Point(this.right, this.bottom);
- }
-
- public function set bottomRight(value: Point): void {
- this.width = value.x - this.x;
- this.height = value.y - this.y;
- }
-
- public function get size(): Point {
- return new Point(this.width, this.height);
- }
-
- public function set size(value: Point): void {
- this.width = value.x;
- this.height = value.y;
- }
-
- public function clone(): Rectangle {
- return new Rectangle(this.x, this.y, this.width, this.height);
- }
-
- public function isEmpty(): Boolean {
- return this.width <= 0 || this.height <= 0;
- }
-
- public function setEmpty(): void {
- this.x = 0;
- this.y = 0;
- this.width = 0;
- this.height = 0;
- }
-
- public function inflate(dx: Number, dy: Number): void {
- this.x -= dx;
- this.width += 2 * dx;
- this.y -= dy;
- this.height += 2 * dy;
- }
-
- public function inflatePoint(point: Point): void {
- this.x -= point.x;
- this.width += 2 * point.x;
- this.y -= point.y;
- this.height += 2 * point.y;
- }
-
- public function offset(dx: Number, dy: Number): void {
- this.x += dx;
- this.y += dy;
- }
-
- public function offsetPoint(point: Point): void {
- this.x += point.x;
- this.y += point.y;
- }
-
- public function contains(x: Number, y: Number): Boolean {
- return x >= this.x && x < this.x + this.width && y >= this.y && y < this.y + this.height;
- }
-
- public function containsPoint(point: Point): Boolean {
- return point.x >= this.x && point.x < this.x + this.width && point.y >= this.y && point.y < this.y + this.height;
- }
-
- public function containsRect(rect: Rectangle): Boolean {
- var r1 = rect.x + rect.width;
- var b1 = rect.y + rect.height;
- var r2 = this.x + this.width;
- var b2 = this.y + this.height;
- return rect.x >= this.x && rect.x < r2 && rect.y >= this.y && rect.y < b2 && r1 > this.x && r1 <= r2 && b1 > this.y && b1 <= b2;
- }
-
- public function intersection(toIntersect: Rectangle): Rectangle {
- var result = new Rectangle();
- if (this.isEmpty() || toIntersect.isEmpty()) {
- result.setEmpty();
- return result;
- }
- result.x = Math.max(this.x, toIntersect.x);
- result.y = Math.max(this.y, toIntersect.y);
- result.width = Math.min(this.x + this.width, toIntersect.x + toIntersect.width) - result.x;
- result.height = Math.min(this.y + this.height, toIntersect.y + toIntersect.height) - result.y;
- if (result.width <= 0 || result.height <= 0) {
- result.setEmpty();
- }
- return result;
- }
-
- public function intersects(toIntersect: Rectangle): Boolean {
- if (this.isEmpty() || toIntersect.isEmpty()) {
- return false;
- }
- var resultx = Math.max(this.x, toIntersect.x);
- var resulty = Math.max(this.y, toIntersect.y);
- var resultwidth = Math.min(this.x + this.width, toIntersect.x + toIntersect.width) - resultx;
- var resultheight = Math.min(this.y + this.height, toIntersect.y + toIntersect.height) - resulty;
- if (resultwidth <= 0 || resultheight <= 0) {
- return false;
- }
- return true;
- }
-
- public function union(toUnion: Rectangle): Rectangle {
- if (this.isEmpty()) {
- return toUnion.clone();
- }
- if (toUnion.isEmpty()) {
- return this.clone();
- }
- var r = new Rectangle();
- r.x = Math.min(this.x, toUnion.x);
- r.y = Math.min(this.y, toUnion.y);
- r.width = Math.max(this.x + this.width, toUnion.x + toUnion.width) - r.x;
- r.height = Math.max(this.y + this.height, toUnion.y + toUnion.height) - r.y;
- return r;
- }
-
- public function equals(toCompare: Rectangle): Boolean {
- return toCompare.x == this.x && toCompare.y == this.y && toCompare.width == this.width && toCompare.height == this.height;
- }
-
- public function toString(): String {
- return "(x=" + this.x + ", y=" + this.y + ", w=" + this.width + ", h=" + this.height + ")";
- }
-
- [API("674")]
- public function copyFrom(sourceRect: Rectangle): void {
- this.x = sourceRect.x;
- this.y = sourceRect.y;
- this.width = sourceRect.width;
- this.height = sourceRect.height;
- }
-
- [API("674")]
- public function setTo(xa: Number, ya: Number, widtha: Number, heighta: Number): void {
- this.x = xa;
- this.y = ya;
- this.width = widtha;
- this.height = heighta;
- }
- }
+package flash.geom
+{
+ public class Rectangle
+ {
+ public var x:Number;
+ public var y:Number;
+ public var width:Number;
+ public var height:Number;
+
+ public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0)
+ {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public function get left():Number
+ {
+ return this.x;
+ }
+
+ public function set left(value:Number):void
+ {
+ this.width += this.x - value;
+ this.x = value;
+ }
+
+ public function get right():Number
+ {
+ return this.x + this.width;
+ }
+
+ public function set right(value:Number):void
+ {
+ this.width = value - this.x;
+ }
+
+ public function get top():Number
+ {
+ return this.y;
+ }
+
+ public function set top(value:Number):void
+ {
+ this.height += this.y - value;
+ this.y = value;
+ }
+
+ public function get bottom():Number
+ {
+ return this.y + this.height;
+ }
+
+ public function set bottom(value:Number):void
+ {
+ this.height = value - this.y;
+ }
+
+ public function get topLeft():Point
+ {
+ return new Point(this.x, this.y);
+ }
+
+ public function set topLeft(value:Point):void
+ {
+ this.width += this.x - value.x;
+ this.height += this.y - value.y;
+ this.x = value.x;
+ this.y = value.y;
+ }
+
+ public function get bottomRight():Point
+ {
+ return new Point(this.right, this.bottom);
+ }
+
+ public function set bottomRight(value:Point):void
+ {
+ this.width = value.x - this.x;
+ this.height = value.y - this.y;
+ }
+
+ public function get size():Point
+ {
+ return new Point(this.width, this.height);
+ }
+
+ public function set size(value:Point):void
+ {
+ this.width = value.x;
+ this.height = value.y;
+ }
+
+ public function clone():Rectangle
+ {
+ return new Rectangle(this.x, this.y, this.width, this.height);
+ }
+
+ public function isEmpty():Boolean
+ {
+ return this.width <= 0 || this.height <= 0;
+ }
+
+ public function setEmpty():void
+ {
+ this.x = 0;
+ this.y = 0;
+ this.width = 0;
+ this.height = 0;
+ }
+
+ public function inflate(dx:Number, dy:Number):void
+ {
+ this.x -= dx;
+ this.width += 2 * dx;
+ this.y -= dy;
+ this.height += 2 * dy;
+ }
+
+ public function inflatePoint(point:Point):void
+ {
+ this.x -= point.x;
+ this.width += 2 * point.x;
+ this.y -= point.y;
+ this.height += 2 * point.y;
+ }
+
+ public function offset(dx:Number, dy:Number):void
+ {
+ this.x += dx;
+ this.y += dy;
+ }
+
+ public function offsetPoint(point:Point):void
+ {
+ this.x += point.x;
+ this.y += point.y;
+ }
+
+ public function contains(x:Number, y:Number):Boolean
+ {
+ return x >= this.x && x < this.x + this.width && y >= this.y && y < this.y + this.height;
+ }
+
+ public function containsPoint(point:Point):Boolean
+ {
+ return point.x >= this.x && point.x < this.x + this.width && point.y >= this.y && point.y < this.y + this.height;
+ }
+
+ public function containsRect(rect:Rectangle):Boolean
+ {
+ var r1 = rect.x + rect.width;
+ var b1 = rect.y + rect.height;
+ var r2 = this.x + this.width;
+ var b2 = this.y + this.height;
+ return rect.x >= this.x && rect.x < r2 && rect.y >= this.y && rect.y < b2 && r1 > this.x && r1 <= r2 && b1 > this.y && b1 <= b2;
+ }
+
+ public function intersection(toIntersect:Rectangle):Rectangle
+ {
+ var result = new Rectangle();
+ if (this.isEmpty() || toIntersect.isEmpty())
+ {
+ result.setEmpty();
+ return result;
+ }
+ result.x = Math.max(this.x, toIntersect.x);
+ result.y = Math.max(this.y, toIntersect.y);
+ result.width = Math.min(this.x + this.width, toIntersect.x + toIntersect.width) - result.x;
+ result.height = Math.min(this.y + this.height, toIntersect.y + toIntersect.height) - result.y;
+ if (result.width <= 0 || result.height <= 0)
+ {
+ result.setEmpty();
+ }
+ return result;
+ }
+
+ public function intersects(toIntersect:Rectangle):Boolean
+ {
+ if (this.isEmpty() || toIntersect.isEmpty())
+ {
+ return false;
+ }
+ var resultx = Math.max(this.x, toIntersect.x);
+ var resulty = Math.max(this.y, toIntersect.y);
+ var resultwidth = Math.min(this.x + this.width, toIntersect.x + toIntersect.width) - resultx;
+ var resultheight = Math.min(this.y + this.height, toIntersect.y + toIntersect.height) - resulty;
+ if (resultwidth <= 0 || resultheight <= 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ public function union(toUnion:Rectangle):Rectangle
+ {
+ if (this.isEmpty())
+ {
+ return toUnion.clone();
+ }
+ if (toUnion.isEmpty())
+ {
+ return this.clone();
+ }
+ var r = new Rectangle();
+ r.x = Math.min(this.x, toUnion.x);
+ r.y = Math.min(this.y, toUnion.y);
+ r.width = Math.max(this.x + this.width, toUnion.x + toUnion.width) - r.x;
+ r.height = Math.max(this.y + this.height, toUnion.y + toUnion.height) - r.y;
+ return r;
+ }
+
+ public function equals(toCompare:Rectangle):Boolean
+ {
+ return toCompare.x == this.x && toCompare.y == this.y && toCompare.width == this.width && toCompare.height == this.height;
+ }
+
+ public function toString():String
+ {
+ return "(x=" + this.x + ", y=" + this.y + ", w=" + this.width + ", h=" + this.height + ")";
+ }
+
+ [API("674")]
+ public function copyFrom(sourceRect:Rectangle):void
+ {
+ this.x = sourceRect.x;
+ this.y = sourceRect.y;
+ this.width = sourceRect.width;
+ this.height = sourceRect.height;
+ }
+
+ [API("674")]
+ public function setTo(xa:Number, ya:Number, widtha:Number, heighta:Number):void
+ {
+ this.x = xa;
+ this.y = ya;
+ this.width = widtha;
+ this.height = heighta;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/geom/Transform.as b/core/src/avm2/globals/flash/geom/Transform.as
index bc1b9da7110f..56beef5002dd 100644
--- a/core/src/avm2/globals/flash/geom/Transform.as
+++ b/core/src/avm2/globals/flash/geom/Transform.as
@@ -1,4 +1,5 @@
-package flash.geom {
+package flash.geom
+{
import flash.display.DisplayObject;
import flash.geom.Matrix3D;
import flash.geom.PerspectiveProjection;
@@ -6,10 +7,12 @@ package flash.geom {
import __ruffle__.stub_method;
import __ruffle__.stub_setter;
- public class Transform {
+ public class Transform
+ {
internal var _displayObject:DisplayObject;
- function Transform(object:DisplayObject) {
+ function Transform(object:DisplayObject)
+ {
this.init(object);
}
native function init(object:DisplayObject):void;
@@ -23,25 +26,30 @@ package flash.geom {
public native function get concatenatedMatrix():Matrix;
public native function get pixelBounds():Rectangle;
- public function get matrix3D():Matrix3D {
+ public function get matrix3D():Matrix3D
+ {
stub_getter("flash.geom.Transform", "matrix3D");
return new Matrix3D();
}
- public function set matrix3D(m:Matrix3D):void {
+ public function set matrix3D(m:Matrix3D):void
+ {
stub_setter("flash.geom.Transform", "matrix3D");
}
- public function get perspectiveProjection():PerspectiveProjection {
+ public function get perspectiveProjection():PerspectiveProjection
+ {
stub_getter("flash.geom.Transform", "perspectiveProjection");
return new PerspectiveProjection();
}
- public function set perspectiveProjection(val: PerspectiveProjection):void {
+ public function set perspectiveProjection(val:PerspectiveProjection):void
+ {
stub_setter("flash.geom.Transform", "perspectiveProjection");
}
- public function getRelativeMatrix3D(relativeTo:DisplayObject):Matrix3D {
+ public function getRelativeMatrix3D(relativeTo:DisplayObject):Matrix3D
+ {
stub_method("flash.geom.Transform", "getRelativeMatrix3D");
return new Matrix3D();
}
diff --git a/core/src/avm2/globals/flash/geom/Utils3D.as b/core/src/avm2/globals/flash/geom/Utils3D.as
index 123274a8b015..7bd6a5d278d7 100644
--- a/core/src/avm2/globals/flash/geom/Utils3D.as
+++ b/core/src/avm2/globals/flash/geom/Utils3D.as
@@ -1,49 +1,56 @@
-package flash.geom {
- public class Utils3D {
- public static function projectVector(m:Matrix3D, v:Vector3D):Vector3D {
- var projected = m.transformVector(v);
- projected.x /= projected.w;
- projected.y /= projected.w;
- projected.z /= projected.w;
-
- return projected;
- }
-
- // Based on https://github.com/openfl/openfl/blob/971a4c9e43b5472fd84d73920a2b7c1b3d8d9257/src/openfl/geom/Utils3D.hx
- public static function projectVectors(m:Matrix3D, verts:Vector., projectedVerts:Vector., uvts:Vector.):void {
- var n = m.rawData;
- var x, y, z, w;
- var x1, y1, z1, w1;
-
- var i = 0;
- var j = 0;
-
- if (uvts.length < verts.length) {
- uvts.length = verts.length;
- }
-
- if (projectedVerts.length < (verts.length / 3) * 2) {
- projectedVerts.length = (verts.length / 3) * 2;
- }
-
- while (i + 2 < verts.length) {
- x = verts[i];
- y = verts[i + 1];
- z = verts[i + 2];
- w = 1;
-
- x1 = x * n[0] + y * n[4] + z * n[8] + w * n[12];
- y1 = x * n[1] + y * n[5] + z * n[9] + w * n[13];
- w1 = x * n[3] + y * n[7] + z * n[11] + w * n[15];
-
- projectedVerts[j] = x1 / w1;
- projectedVerts[j + 1] = y1 / w1;
-
- uvts[i + 2] = 1 / w1;
-
- i += 3;
- j += 2;
- }
- }
- }
+package flash.geom
+{
+ public class Utils3D
+ {
+ public static function projectVector(m:Matrix3D, v:Vector3D):Vector3D
+ {
+ var projected = m.transformVector(v);
+ projected.x /= projected.w;
+ projected.y /= projected.w;
+ projected.z /= projected.w;
+
+ return projected;
+ }
+
+ // Based on https://github.com/openfl/openfl/blob/971a4c9e43b5472fd84d73920a2b7c1b3d8d9257/src/openfl/geom/Utils3D.hx
+ public static function projectVectors(m:Matrix3D, verts:Vector., projectedVerts:Vector., uvts:Vector.):void
+ {
+ var n = m.rawData;
+ var x, y, z, w;
+ var x1, y1, z1, w1;
+
+ var i = 0;
+ var j = 0;
+
+ if (uvts.length < verts.length)
+ {
+ uvts.length = verts.length;
+ }
+
+ if (projectedVerts.length < (verts.length / 3) * 2)
+ {
+ projectedVerts.length = (verts.length / 3) * 2;
+ }
+
+ while (i + 2 < verts.length)
+ {
+ x = verts[i];
+ y = verts[i + 1];
+ z = verts[i + 2];
+ w = 1;
+
+ x1 = x * n[0] + y * n[4] + z * n[8] + w * n[12];
+ y1 = x * n[1] + y * n[5] + z * n[9] + w * n[13];
+ w1 = x * n[3] + y * n[7] + z * n[11] + w * n[15];
+
+ projectedVerts[j] = x1 / w1;
+ projectedVerts[j + 1] = y1 / w1;
+
+ uvts[i + 2] = 1 / w1;
+
+ i += 3;
+ j += 2;
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/geom/Vector3D.as b/core/src/avm2/globals/flash/geom/Vector3D.as
index e9c5ec352a40..e22c0080f875 100644
--- a/core/src/avm2/globals/flash/geom/Vector3D.as
+++ b/core/src/avm2/globals/flash/geom/Vector3D.as
@@ -1,154 +1,181 @@
-package flash.geom {
- public class Vector3D {
-
- // `describeType` returns these in this weird order
- public static const Z_AXIS : Vector3D = new Vector3D(0, 0, 1);
- public static const X_AXIS : Vector3D = new Vector3D(1, 0, 0);
- public static const Y_AXIS : Vector3D = new Vector3D(0, 1, 0);
-
- public static function angleBetween(a:Vector3D, b:Vector3D):Number {
- return Math.acos(a.dotProduct(b) / (a.length * b.length));
- }
-
- public static function distance(pt1:Vector3D, pt2:Vector3D):Number {
- return pt2.subtract(pt1).length;
- }
-
- public function Vector3D(x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0) {
- this.x = x;
- this.y = y;
- this.z = z;
- this.w = w;
- }
-
- public var w:Number;
- public var x:Number;
- public var y:Number;
- public var z:Number;
-
- public function get length():Number {
- return Math.sqrt(this.lengthSquared);
- }
-
- public function get lengthSquared():Number {
- return this.x * this.x + this.y * this.y + this.z * this.z;
- }
-
- public function toString():String {
- return "Vector3D(" + this.x + ", " + this.y + ", " + this.z + ")";
- }
-
- public function add(a:Vector3D):Vector3D {
- // w is ignored
- return new Vector3D(this.x + a.x, this.y + a.y, this.z + a.z);
- }
-
- public function subtract(a:Vector3D):Vector3D {
- // w is ignored
- return new Vector3D(this.x - a.x, this.y - a.y, this.z - a.z);
- }
-
- public function incrementBy(a:Vector3D):void {
- this.x += a.x;
- this.y += a.y;
- this.z += a.z;
- // w is unchanged
- }
-
- public function decrementBy(a:Vector3D):void {
- this.x -= a.x;
- this.y -= a.y;
- this.z -= a.z;
- // w is unchanged
- }
-
- public function clone():Vector3D {
- return new Vector3D(this.x, this.y, this.z, this.w);
- }
-
- [API("674")]
- public function copyFrom(sourceVector3D:Vector3D):void {
- this.x = sourceVector3D.x;
- this.y = sourceVector3D.y;
- this.z = sourceVector3D.z;
- // w is unchanged
- }
-
- public function equals(toCompare:Vector3D, allFour:Boolean = false):Boolean {
- return this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z && (!allFour || this.w == toCompare.w);
- }
-
- public function nearEquals(toCompare:Vector3D, tolerance:Number, allFour:Boolean = false):Boolean {
- // Looks like there is a Flash Player bug here:
- // With allFour=true, this.w is ignored, only toCompare.w is compared
- // with tolerance ... I think they forgot to do the subtraction there.
- return (Math.abs(this.x - toCompare.x) < tolerance)
- && (Math.abs(this.y - toCompare.y) < tolerance)
- && (Math.abs(this.z - toCompare.z) < tolerance)
- && (!allFour || Math.abs(toCompare.w) < tolerance); // FP BUG
- }
-
- [API("674")]
- public function setTo(xa:Number, ya:Number, za: Number):void {
- this.x = xa;
- this.y = ya;
- this.z = za;
- // w is unchanged
- }
-
- public function scaleBy(s:Number):void {
- this.x *= s;
- this.y *= s;
- this.z *= s;
- // w is unchanged
- }
-
- public function negate():void {
- this.x *= -1;
- this.y *= -1;
- this.z *= -1;
- // w is unchanged
- }
-
- public function project():void {
- this.x /= this.w;
- this.y /= this.w;
- this.z /= this.w;
- // w is unchanged
- }
-
- public function normalize():Number {
- var len : Number = this.length;
-
- if (len == 0) {
- this.x = 0;
- this.y = 0;
- this.z = 0;
- }
- else if (len > 0) {
- this.x /= len;
- this.y /= len;
- this.z /= len;
- }
- else { // if len (so any of the components) is NaN or undefined
- this.x = NaN;
- this.y = NaN;
- this.z = NaN;
- }
-
- return len; // returns the original length
- }
-
- public function dotProduct(a:Vector3D):Number {
- return this.x * a.x + this.y * a.y + this.z * a.z;
- }
-
- public function crossProduct(a:Vector3D):Vector3D {
- return new Vector3D(
- this.y * a.z - this.z * a.y,
- this.z * a.x - this.x * a.z,
- this.x * a.y - this.y * a.x,
- 1); // for whatever reason w is always set to 1
- }
- }
+package flash.geom
+{
+ public class Vector3D
+ {
+
+ // `describeType` returns these in this weird order
+ public static const Z_AXIS:Vector3D = new Vector3D(0, 0, 1);
+ public static const X_AXIS:Vector3D = new Vector3D(1, 0, 0);
+ public static const Y_AXIS:Vector3D = new Vector3D(0, 1, 0);
+
+ public static function angleBetween(a:Vector3D, b:Vector3D):Number
+ {
+ return Math.acos(a.dotProduct(b) / (a.length * b.length));
+ }
+
+ public static function distance(pt1:Vector3D, pt2:Vector3D):Number
+ {
+ return pt2.subtract(pt1).length;
+ }
+
+ public function Vector3D(x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ public var w:Number;
+ public var x:Number;
+ public var y:Number;
+ public var z:Number;
+
+ public function get length():Number
+ {
+ return Math.sqrt(this.lengthSquared);
+ }
+
+ public function get lengthSquared():Number
+ {
+ return this.x * this.x + this.y * this.y + this.z * this.z;
+ }
+
+ public function toString():String
+ {
+ return "Vector3D(" + this.x + ", " + this.y + ", " + this.z + ")";
+ }
+
+ public function add(a:Vector3D):Vector3D
+ {
+ // w is ignored
+ return new Vector3D(this.x + a.x, this.y + a.y, this.z + a.z);
+ }
+
+ public function subtract(a:Vector3D):Vector3D
+ {
+ // w is ignored
+ return new Vector3D(this.x - a.x, this.y - a.y, this.z - a.z);
+ }
+
+ public function incrementBy(a:Vector3D):void
+ {
+ this.x += a.x;
+ this.y += a.y;
+ this.z += a.z;
+ // w is unchanged
+ }
+
+ public function decrementBy(a:Vector3D):void
+ {
+ this.x -= a.x;
+ this.y -= a.y;
+ this.z -= a.z;
+ // w is unchanged
+ }
+
+ public function clone():Vector3D
+ {
+ return new Vector3D(this.x, this.y, this.z, this.w);
+ }
+
+ [API("674")]
+ public function copyFrom(sourceVector3D:Vector3D):void
+ {
+ this.x = sourceVector3D.x;
+ this.y = sourceVector3D.y;
+ this.z = sourceVector3D.z;
+ // w is unchanged
+ }
+
+ public function equals(toCompare:Vector3D, allFour:Boolean = false):Boolean
+ {
+ return this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z && (!allFour || this.w == toCompare.w);
+ }
+
+ public function nearEquals(toCompare:Vector3D, tolerance:Number, allFour:Boolean = false):Boolean
+ {
+ // Looks like there is a Flash Player bug here:
+ // With allFour=true, this.w is ignored, only toCompare.w is compared
+ // with tolerance ... I think they forgot to do the subtraction there.
+ return (Math.abs(this.x - toCompare.x) < tolerance)
+ && (Math.abs(this.y - toCompare.y) < tolerance)
+ && (Math.abs(this.z - toCompare.z) < tolerance)
+ && (!allFour || Math.abs(toCompare.w) < tolerance); // FP BUG
+ }
+
+ [API("674")]
+ public function setTo(xa:Number, ya:Number, za:Number):void
+ {
+ this.x = xa;
+ this.y = ya;
+ this.z = za;
+ // w is unchanged
+ }
+
+ public function scaleBy(s:Number):void
+ {
+ this.x *= s;
+ this.y *= s;
+ this.z *= s;
+ // w is unchanged
+ }
+
+ public function negate():void
+ {
+ this.x *= -1;
+ this.y *= -1;
+ this.z *= -1;
+ // w is unchanged
+ }
+
+ public function project():void
+ {
+ this.x /= this.w;
+ this.y /= this.w;
+ this.z /= this.w;
+ // w is unchanged
+ }
+
+ public function normalize():Number
+ {
+ var len:Number = this.length;
+
+ if (len == 0)
+ {
+ this.x = 0;
+ this.y = 0;
+ this.z = 0;
+ }
+ else if (len > 0)
+ {
+ this.x /= len;
+ this.y /= len;
+ this.z /= len;
+ }
+ else
+ {
+ // if len (so any of the components) is NaN or undefined
+ this.x = NaN;
+ this.y = NaN;
+ this.z = NaN;
+ }
+
+ return len; // returns the original length
+ }
+
+ public function dotProduct(a:Vector3D):Number
+ {
+ return this.x * a.x + this.y * a.y + this.z * a.z;
+ }
+
+ public function crossProduct(a:Vector3D):Vector3D
+ {
+ return new Vector3D(
+ this.y * a.z - this.z * a.y,
+ this.z * a.x - this.x * a.z,
+ this.x * a.y - this.y * a.x,
+ 1); // for whatever reason w is always set to 1
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/CollatorMode.as b/core/src/avm2/globals/flash/globalization/CollatorMode.as
index 6c3ac341693d..381d330c7bbf 100644
--- a/core/src/avm2/globals/flash/globalization/CollatorMode.as
+++ b/core/src/avm2/globals/flash/globalization/CollatorMode.as
@@ -6,13 +6,13 @@
package flash.globalization
{
- public final class CollatorMode
- {
- // Initializes a Collator object so that the compare method is optimized for determining whether two strings are equivalent.
- public static const MATCHING:String = "matching";
+ public final class CollatorMode
+ {
+ // Initializes a Collator object so that the compare method is optimized for determining whether two strings are equivalent.
+ public static const MATCHING:String = "matching";
- // Initializes a Collator object so that the compare method is optimized for sorting a list of text strings to be displayed to an end user.
- public static const SORTING:String = "sorting";
+ // Initializes a Collator object so that the compare method is optimized for sorting a list of text strings to be displayed to an end user.
+ public static const SORTING:String = "sorting";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/CurrencyFormatter.as b/core/src/avm2/globals/flash/globalization/CurrencyFormatter.as
index 719c7b5ec37e..e4450a676f6d 100644
--- a/core/src/avm2/globals/flash/globalization/CurrencyFormatter.as
+++ b/core/src/avm2/globals/flash/globalization/CurrencyFormatter.as
@@ -1,18 +1,22 @@
-package flash.globalization {
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_method;
+package flash.globalization
+{
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_method;
- public final class CurrencyFormatter {
+ public final class CurrencyFormatter
+ {
- public var fractionalDigits: int = 0;
+ public var fractionalDigits:int = 0;
- public function CurrencyFormatter(locale: String) {
- stub_constructor("flash.globalization.CurrencyFormatter");
- }
+ public function CurrencyFormatter(locale:String)
+ {
+ stub_constructor("flash.globalization.CurrencyFormatter");
+ }
- public function format(value:Number, withCurrencySymbol:Boolean = false):String {
- stub_method("flash.globalization.CurrencyFormatter", "format");
- return value.toString();
- }
- }
+ public function format(value:Number, withCurrencySymbol:Boolean = false):String
+ {
+ stub_method("flash.globalization.CurrencyFormatter", "format");
+ return value.toString();
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/CurrencyParseResult.as b/core/src/avm2/globals/flash/globalization/CurrencyParseResult.as
index 2612be0dc9cc..5a56f2af4420 100644
--- a/core/src/avm2/globals/flash/globalization/CurrencyParseResult.as
+++ b/core/src/avm2/globals/flash/globalization/CurrencyParseResult.as
@@ -5,28 +5,28 @@
package flash.globalization
{
- public final class CurrencyParseResult
- {
- // The currency amount value that was extracted from the input string.
- private var _value: Number;
+ public final class CurrencyParseResult
+ {
+ // The currency amount value that was extracted from the input string.
+ private var _value:Number;
- // The portion of the input string that corresponds to the currency symbol or currency string.
- private var _currencyString: String;
+ // The portion of the input string that corresponds to the currency symbol or currency string.
+ private var _currencyString:String;
- public function CurrencyParseResult(value:Number = NaN, symbol:String = "")
- {
- this._value = value;
- this._currencyString = symbol;
- }
+ public function CurrencyParseResult(value:Number = NaN, symbol:String = "")
+ {
+ this._value = value;
+ this._currencyString = symbol;
+ }
- public function get value() : Number
- {
- return this._value;
- }
+ public function get value():Number
+ {
+ return this._value;
+ }
- public function get currencyString() : String
- {
- return this._currencyString;
- }
- }
+ public function get currencyString():String
+ {
+ return this._currencyString;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as b/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as
index 126d266f2fc2..378a8dac8212 100644
--- a/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as
+++ b/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as
@@ -1,101 +1,129 @@
-package flash.globalization {
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
- import flash.globalization.LastOperationStatus;
-
- public final class DateTimeFormatter {
- private var _dateStyle:String;
- private var _dateTimePattern:String;
- private var _localeIDName:String;
- private var _timeStyle:String;
-
- private static function throwNonNull(name: String) {
- throw new TypeError("Error #2007: Parameter " + name + " must be non-null.", 2007);
- }
-
- public function DateTimeFormatter(requestedLocaleIDName:String, dateStyle:String = "long", timeStyle:String = "long") {
- stub_constructor("flash.globalization.DateTimeFormatter");
- if (requestedLocaleIDName == null) throwNonNull("requestedLocaleIDName");
- this._localeIDName = requestedLocaleIDName;
- this._dateTimePattern = "EEEE, MMMM d, yyyy h:mm:ss a";
- this.setDateTimeStyles(dateStyle, timeStyle);
- }
-
- public function get actualLocaleIDName():String {
- stub_getter("flash.globalization.DateTimeFormatter", "actualLocaleIDName");
- return this._localeIDName;
- }
-
- public function get lastOperationStatus():String {
- stub_getter("flash.globalization.DateTimeFormatter", "lastOperationStatus");
- return LastOperationStatus.NO_ERROR;
- }
-
- public function get requestedLocaleIDName():String {
- return this._localeIDName;
- }
-
- public function format(dateTime:Date):String {
- stub_method("flash.globalization.DateTimeFormatter", "format");
- if (dateTime == null) throwNonNull("dateTime");
- return dateTime.toString();
- }
-
- public function formatUTC(dateTime:Date):String {
- stub_method("flash.globalization.DateTimeFormatter", "formatUTC");
- if (dateTime == null) throwNonNull("dateTime");
- return dateTime.toUTCString();
- }
-
- public static function getAvailableLocaleIDNames():Vector. {
- stub_method("flash.globalization.DateTimeFormatter", "getAvailableLocaleIDNames");
- return new ["en-US"];
- }
-
- public function getDateStyle():String {
- return this._dateStyle;
- }
-
- public function getDateTimePattern():String {
- return this._dateTimePattern;
- }
-
- public function getFirstWeekday():int {
- stub_method("flash.globalization.DateTimeFormatter", "getFirstWeekday");
- return 0;
- }
-
- public function getMonthNames(nameStyle:String = "full", context:String = "standalone"):Vector. {
- stub_method("flash.globalization.DateTimeFormatter", "getMonthNames");
- if (nameStyle == null) throwNonNull("nameStyle");
- if (context == null) throwNonNull("context");
- return new ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
- }
-
- public function getTimeStyle():String {
- return this._timeStyle;
- }
-
- public function getWeekdayNames(nameStyle:String = "full", context:String = "standalone"):Vector. {
- stub_method("flash.globalization.DateTimeFormatter", "getWeekdayNames");
- if (nameStyle == null) throwNonNull("nameStyle");
- if (context == null) throwNonNull("context");
- return new ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
- }
-
- public function setDateTimePattern(pattern:String):void {
- stub_method("flash.globalization.DateTimeFormatter", "setDateTimePattern");
- if (pattern == null) throwNonNull("pattern");
- this._dateTimePattern = pattern;
- }
-
- public function setDateTimeStyles(dateStyle:String, timeStyle:String):void {
- stub_method("flash.globalization.DateTimeFormatter", "setDateTimeStyles");
- if (dateStyle == null) throwNonNull("dateStyle");
- if (timeStyle == null) throwNonNull("timeStyle");
- this._dateStyle = dateStyle;
- this._timeStyle = timeStyle;
- }
- }
+package flash.globalization
+{
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
+ import flash.globalization.LastOperationStatus;
+
+ public final class DateTimeFormatter
+ {
+ private var _dateStyle:String;
+ private var _dateTimePattern:String;
+ private var _localeIDName:String;
+ private var _timeStyle:String;
+
+ private static function throwNonNull(name:String)
+ {
+ throw new TypeError("Error #2007: Parameter " + name + " must be non-null.", 2007);
+ }
+
+ public function DateTimeFormatter(requestedLocaleIDName:String, dateStyle:String = "long", timeStyle:String = "long")
+ {
+ stub_constructor("flash.globalization.DateTimeFormatter");
+ if (requestedLocaleIDName == null)
+ throwNonNull("requestedLocaleIDName");
+ this._localeIDName = requestedLocaleIDName;
+ this._dateTimePattern = "EEEE, MMMM d, yyyy h:mm:ss a";
+ this.setDateTimeStyles(dateStyle, timeStyle);
+ }
+
+ public function get actualLocaleIDName():String
+ {
+ stub_getter("flash.globalization.DateTimeFormatter", "actualLocaleIDName");
+ return this._localeIDName;
+ }
+
+ public function get lastOperationStatus():String
+ {
+ stub_getter("flash.globalization.DateTimeFormatter", "lastOperationStatus");
+ return LastOperationStatus.NO_ERROR;
+ }
+
+ public function get requestedLocaleIDName():String
+ {
+ return this._localeIDName;
+ }
+
+ public function format(dateTime:Date):String
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "format");
+ if (dateTime == null)
+ throwNonNull("dateTime");
+ return dateTime.toString();
+ }
+
+ public function formatUTC(dateTime:Date):String
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "formatUTC");
+ if (dateTime == null)
+ throwNonNull("dateTime");
+ return dateTime.toUTCString();
+ }
+
+ public static function getAvailableLocaleIDNames():Vector.
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "getAvailableLocaleIDNames");
+ return new ["en-US"];
+ }
+
+ public function getDateStyle():String
+ {
+ return this._dateStyle;
+ }
+
+ public function getDateTimePattern():String
+ {
+ return this._dateTimePattern;
+ }
+
+ public function getFirstWeekday():int
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "getFirstWeekday");
+ return 0;
+ }
+
+ public function getMonthNames(nameStyle:String = "full", context:String = "standalone"):Vector.
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "getMonthNames");
+ if (nameStyle == null)
+ throwNonNull("nameStyle");
+ if (context == null)
+ throwNonNull("context");
+ return new ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
+ }
+
+ public function getTimeStyle():String
+ {
+ return this._timeStyle;
+ }
+
+ public function getWeekdayNames(nameStyle:String = "full", context:String = "standalone"):Vector.
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "getWeekdayNames");
+ if (nameStyle == null)
+ throwNonNull("nameStyle");
+ if (context == null)
+ throwNonNull("context");
+ return new ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
+ }
+
+ public function setDateTimePattern(pattern:String):void
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "setDateTimePattern");
+ if (pattern == null)
+ throwNonNull("pattern");
+ this._dateTimePattern = pattern;
+ }
+
+ public function setDateTimeStyles(dateStyle:String, timeStyle:String):void
+ {
+ stub_method("flash.globalization.DateTimeFormatter", "setDateTimeStyles");
+ if (dateStyle == null)
+ throwNonNull("dateStyle");
+ if (timeStyle == null)
+ throwNonNull("timeStyle");
+ this._dateStyle = dateStyle;
+ this._timeStyle = timeStyle;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/globalization/DateTimeNameContext.as b/core/src/avm2/globals/flash/globalization/DateTimeNameContext.as
index 8283b17b4628..0fd3ec92b77c 100644
--- a/core/src/avm2/globals/flash/globalization/DateTimeNameContext.as
+++ b/core/src/avm2/globals/flash/globalization/DateTimeNameContext.as
@@ -6,13 +6,13 @@
package flash.globalization
{
- public final class DateTimeNameContext
- {
- // Indicates that the date element name is used within a date format.
- public static const FORMAT:String = "format";
+ public final class DateTimeNameContext
+ {
+ // Indicates that the date element name is used within a date format.
+ public static const FORMAT:String = "format";
- // Indicates that the date element name is used in a "stand alone" context, independent of other formats.
- public static const STANDALONE:String = "standalone";
+ // Indicates that the date element name is used in a "stand alone" context, independent of other formats.
+ public static const STANDALONE:String = "standalone";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/DateTimeNameStyle.as b/core/src/avm2/globals/flash/globalization/DateTimeNameStyle.as
index 6ca20a8fff1d..3597e195ec8b 100644
--- a/core/src/avm2/globals/flash/globalization/DateTimeNameStyle.as
+++ b/core/src/avm2/globals/flash/globalization/DateTimeNameStyle.as
@@ -6,16 +6,16 @@
package flash.globalization
{
- public final class DateTimeNameStyle
- {
- // Specifies the full form or full name style for month names and weekday names.
- public static const FULL:String = "full";
+ public final class DateTimeNameStyle
+ {
+ // Specifies the full form or full name style for month names and weekday names.
+ public static const FULL:String = "full";
- // Specifies the long abbreviation style for month names and weekday names.
- public static const LONG_ABBREVIATION:String = "longAbbreviation";
+ // Specifies the long abbreviation style for month names and weekday names.
+ public static const LONG_ABBREVIATION:String = "longAbbreviation";
- // Specifies the short abbreviation style for month names and weekday names.
- public static const SHORT_ABBREVIATION:String = "shortAbbreviation";
+ // Specifies the short abbreviation style for month names and weekday names.
+ public static const SHORT_ABBREVIATION:String = "shortAbbreviation";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/DateTimeStyle.as b/core/src/avm2/globals/flash/globalization/DateTimeStyle.as
index b80ae9f03b6e..6f0523defd58 100644
--- a/core/src/avm2/globals/flash/globalization/DateTimeStyle.as
+++ b/core/src/avm2/globals/flash/globalization/DateTimeStyle.as
@@ -6,22 +6,22 @@
package flash.globalization
{
- public final class DateTimeStyle
- {
- // Specifies that a custom pattern string is used to specify the date or time style.
- public static const CUSTOM:String = "custom";
+ public final class DateTimeStyle
+ {
+ // Specifies that a custom pattern string is used to specify the date or time style.
+ public static const CUSTOM:String = "custom";
- // Specifies the long style of a date or time.
- public static const LONG:String = "long";
+ // Specifies the long style of a date or time.
+ public static const LONG:String = "long";
- // Specifies the medium style of a date or time.
- public static const MEDIUM:String = "medium";
+ // Specifies the medium style of a date or time.
+ public static const MEDIUM:String = "medium";
- // Specifies that the date or time should not be included in the formatted string.
- public static const NONE:String = "none";
+ // Specifies that the date or time should not be included in the formatted string.
+ public static const NONE:String = "none";
- // Specifies the short style of a date or time.
- public static const SHORT:String = "short";
+ // Specifies the short style of a date or time.
+ public static const SHORT:String = "short";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/LastOperationStatus.as b/core/src/avm2/globals/flash/globalization/LastOperationStatus.as
index 94b0d585d35d..84fcd3b56da7 100644
--- a/core/src/avm2/globals/flash/globalization/LastOperationStatus.as
+++ b/core/src/avm2/globals/flash/globalization/LastOperationStatus.as
@@ -6,58 +6,58 @@
package flash.globalization
{
- public final class LastOperationStatus
- {
- // Indicates that given buffer is not enough to hold the result.
- public static const BUFFER_OVERFLOW_ERROR:String = "bufferOverflowError";
+ public final class LastOperationStatus
+ {
+ // Indicates that given buffer is not enough to hold the result.
+ public static const BUFFER_OVERFLOW_ERROR:String = "bufferOverflowError";
- // Indicates that the return error code is not known.
- public static const ERROR_CODE_UNKNOWN:String = "errorCodeUnknown";
+ // Indicates that the return error code is not known.
+ public static const ERROR_CODE_UNKNOWN:String = "errorCodeUnknown";
- // Indicates that an argument passed to a method was illegal.
- public static const ILLEGAL_ARGUMENT_ERROR:String = "illegalArgumentError";
+ // Indicates that an argument passed to a method was illegal.
+ public static const ILLEGAL_ARGUMENT_ERROR:String = "illegalArgumentError";
- // Indicates that an iterator went out of range or an invalid parameter was specified for month, day, or time.
- public static const INDEX_OUT_OF_BOUNDS_ERROR:String = "indexOutOfBoundsError";
+ // Indicates that an iterator went out of range or an invalid parameter was specified for month, day, or time.
+ public static const INDEX_OUT_OF_BOUNDS_ERROR:String = "indexOutOfBoundsError";
- // Indicates that a given attribute value is out of the expected range.
- public static const INVALID_ATTR_VALUE:String = "invalidAttrValue";
+ // Indicates that a given attribute value is out of the expected range.
+ public static const INVALID_ATTR_VALUE:String = "invalidAttrValue";
- // Indicates that invalid Unicode value was found.
- public static const INVALID_CHAR_FOUND:String = "invalidCharFound";
+ // Indicates that invalid Unicode value was found.
+ public static const INVALID_CHAR_FOUND:String = "invalidCharFound";
- // Indicates that memory allocation has failed.
- public static const MEMORY_ALLOCATION_ERROR:String = "memoryAllocationError";
+ // Indicates that memory allocation has failed.
+ public static const MEMORY_ALLOCATION_ERROR:String = "memoryAllocationError";
- // Indicates that the last operation succeeded without any errors.
- public static const NO_ERROR:String = "noError";
+ // Indicates that the last operation succeeded without any errors.
+ public static const NO_ERROR:String = "noError";
- // Indicates that an operation resulted a value that exceeds a specified numeric type.
- public static const NUMBER_OVERFLOW_ERROR:String = "numberOverflowError";
+ // Indicates that an operation resulted a value that exceeds a specified numeric type.
+ public static const NUMBER_OVERFLOW_ERROR:String = "numberOverflowError";
- // Indicates that the parsing of a number failed.
- public static const PARSE_ERROR:String = "parseError";
+ // Indicates that the parsing of a number failed.
+ public static const PARSE_ERROR:String = "parseError";
- // Indicates that the pattern for formatting a number, date, or time is invalid.
- public static const PATTERN_SYNTAX_ERROR:String = "patternSyntaxError";
+ // Indicates that the pattern for formatting a number, date, or time is invalid.
+ public static const PATTERN_SYNTAX_ERROR:String = "patternSyntaxError";
- // Indicates that an underlying platform API failed for an operation.
- public static const PLATFORM_API_FAILED:String = "platformAPIFailed";
+ // Indicates that an underlying platform API failed for an operation.
+ public static const PLATFORM_API_FAILED:String = "platformAPIFailed";
- // Indicates that a truncated Unicode character value was found.
- public static const TRUNCATED_CHAR_FOUND:String = "truncatedCharFound";
+ // Indicates that a truncated Unicode character value was found.
+ public static const TRUNCATED_CHAR_FOUND:String = "truncatedCharFound";
- // Indicates that an unexpected token was detected in a Locale ID string.
- public static const UNEXPECTED_TOKEN:String = "unexpectedToken";
+ // Indicates that an unexpected token was detected in a Locale ID string.
+ public static const UNEXPECTED_TOKEN:String = "unexpectedToken";
- // Indicates that the requested operation or option is not supported.
- public static const UNSUPPORTED_ERROR:String = "unsupportedError";
+ // Indicates that the requested operation or option is not supported.
+ public static const UNSUPPORTED_ERROR:String = "unsupportedError";
- // Indicates that an operating system default value was used during the most recent operation.
- public static const USING_DEFAULT_WARNING:String = "usingDefaultWarning";
+ // Indicates that an operating system default value was used during the most recent operation.
+ public static const USING_DEFAULT_WARNING:String = "usingDefaultWarning";
- // Indicates that a fallback value was set during the most recent operation.
- public static const USING_FALLBACK_WARNING:String = "usingFallbackWarning";
+ // Indicates that a fallback value was set during the most recent operation.
+ public static const USING_FALLBACK_WARNING:String = "usingFallbackWarning";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/LocaleID.as b/core/src/avm2/globals/flash/globalization/LocaleID.as
index e9a39abbaf63..2c595d9e6998 100644
--- a/core/src/avm2/globals/flash/globalization/LocaleID.as
+++ b/core/src/avm2/globals/flash/globalization/LocaleID.as
@@ -1,61 +1,73 @@
-package flash.globalization {
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
- import flash.globalization.LastOperationStatus;
-
- public final class LocaleID {
- public static const DEFAULT:String = "i-default";
-
- private var _name:String;
-
- public function LocaleID(name:String) {
- stub_constructor("flash.globalization.LocaleID");
- this._name = name;
- }
-
- public function get lastOperationStatus():String {
- stub_getter("flash.globalization.LocaleID", "lastOperationStatus");
- return LastOperationStatus.NO_ERROR;
- }
-
- public function get name():String {
- return this._name;
- }
-
- public static function determinePreferredLocales(want:Vector., have:Vector., keyword:String = "userinterface"):Vector. {
- stub_method("flash.globalization.LocaleID", "determinePreferredLocales");
- return null;
- }
-
- public function getKeysAndValues():Object {
- stub_method("flash.globalization.LocaleID", "getKeysAndValues");
- return new Object();
- }
-
- public function getLanguage():String {
- stub_method("flash.globalization.LocaleID", "getLanguage");
- return this._name;
- }
-
- public function getRegion():String {
- stub_method("flash.globalization.LocaleID", "getRegion");
- return "";
- }
-
- public function getScript():String {
- stub_method("flash.globalization.LocaleID", "getScript");
- return "";
- }
-
- public function getVariant():String {
- stub_method("flash.globalization.LocaleID", "getVariant");
- return "";
- }
-
- public function isRightToLeft():Boolean {
- stub_method("flash.globalization.LocaleID", "isRightToLeft");
- return false;
- }
- }
+package flash.globalization
+{
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
+ import flash.globalization.LastOperationStatus;
+
+ public final class LocaleID
+ {
+ public static const DEFAULT:String = "i-default";
+
+ private var _name:String;
+
+ public function LocaleID(name:String)
+ {
+ stub_constructor("flash.globalization.LocaleID");
+ this._name = name;
+ }
+
+ public function get lastOperationStatus():String
+ {
+ stub_getter("flash.globalization.LocaleID", "lastOperationStatus");
+ return LastOperationStatus.NO_ERROR;
+ }
+
+ public function get name():String
+ {
+ return this._name;
+ }
+
+ public static function determinePreferredLocales(want:Vector., have:Vector., keyword:String = "userinterface"):Vector.
+ {
+ stub_method("flash.globalization.LocaleID", "determinePreferredLocales");
+ return null;
+ }
+
+ public function getKeysAndValues():Object
+ {
+ stub_method("flash.globalization.LocaleID", "getKeysAndValues");
+ return new Object();
+ }
+
+ public function getLanguage():String
+ {
+ stub_method("flash.globalization.LocaleID", "getLanguage");
+ return this._name;
+ }
+
+ public function getRegion():String
+ {
+ stub_method("flash.globalization.LocaleID", "getRegion");
+ return "";
+ }
+
+ public function getScript():String
+ {
+ stub_method("flash.globalization.LocaleID", "getScript");
+ return "";
+ }
+
+ public function getVariant():String
+ {
+ stub_method("flash.globalization.LocaleID", "getVariant");
+ return "";
+ }
+
+ public function isRightToLeft():Boolean
+ {
+ stub_method("flash.globalization.LocaleID", "isRightToLeft");
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/NationalDigitsType.as b/core/src/avm2/globals/flash/globalization/NationalDigitsType.as
index c0275d160c38..463251fc831a 100644
--- a/core/src/avm2/globals/flash/globalization/NationalDigitsType.as
+++ b/core/src/avm2/globals/flash/globalization/NationalDigitsType.as
@@ -6,103 +6,103 @@
package flash.globalization
{
- public final class NationalDigitsType
- {
- // Represents the Unicode value for the zero digit of the Arabic-Indic digit set.
- public static const ARABIC_INDIC:uint = 0x0660;
+ public final class NationalDigitsType
+ {
+ // Represents the Unicode value for the zero digit of the Arabic-Indic digit set.
+ public static const ARABIC_INDIC:uint = 0x0660;
- // Represents the Unicode value for the zero digit of the Balinese digit set.
- public static const BALINESE:uint = 0x1B50;
+ // Represents the Unicode value for the zero digit of the Balinese digit set.
+ public static const BALINESE:uint = 0x1B50;
- // Represents the Unicode value for the zero digit of the Bengali digit set.
- public static const BENGALI:uint = 0x09E6;
+ // Represents the Unicode value for the zero digit of the Bengali digit set.
+ public static const BENGALI:uint = 0x09E6;
- // Represents the Unicode value for the zero digit of the Cham digit set.
- public static const CHAM:uint = 0xAA50;
+ // Represents the Unicode value for the zero digit of the Cham digit set.
+ public static const CHAM:uint = 0xAA50;
- // Represents the Unicode value for the zero digit of the Devanagari digit set.
- public static const DEVANAGARI:uint = 0x0966;
+ // Represents the Unicode value for the zero digit of the Devanagari digit set.
+ public static const DEVANAGARI:uint = 0x0966;
- // Represents the Unicode value for the zero digit of the Latin-1 (European) digit set.
- public static const EUROPEAN:uint = 0x0030;
+ // Represents the Unicode value for the zero digit of the Latin-1 (European) digit set.
+ public static const EUROPEAN:uint = 0x0030;
- // Represents the Unicode value for the zero digit of the Extended Arabic-Indic digit set.
- public static const EXTENDED_ARABIC_INDIC:uint = 0x06F0;
+ // Represents the Unicode value for the zero digit of the Extended Arabic-Indic digit set.
+ public static const EXTENDED_ARABIC_INDIC:uint = 0x06F0;
- // Represents the Unicode value for the zero digit of the Fullwidth digit set.
- public static const FULL_WIDTH:uint = 0xFF10;
+ // Represents the Unicode value for the zero digit of the Fullwidth digit set.
+ public static const FULL_WIDTH:uint = 0xFF10;
- // Represents the Unicode value for the zero digit of the Gujarati digit set.
- public static const GUJARATI:uint = 0x0AE6;
+ // Represents the Unicode value for the zero digit of the Gujarati digit set.
+ public static const GUJARATI:uint = 0x0AE6;
- // Represents the Unicode value for the zero digit of the Gurmukhi digit set.
- public static const GURMUKHI:uint = 0x0A66;
+ // Represents the Unicode value for the zero digit of the Gurmukhi digit set.
+ public static const GURMUKHI:uint = 0x0A66;
- // Represents the Unicode value for the zero digit of the Kannada digit set.
- public static const KANNADA:uint = 0x0CE6;
+ // Represents the Unicode value for the zero digit of the Kannada digit set.
+ public static const KANNADA:uint = 0x0CE6;
- // Represents the Unicode value for the zero digit of the Kayah Li digit set.
- public static const KAYAH_LI:uint = 0xA900;
+ // Represents the Unicode value for the zero digit of the Kayah Li digit set.
+ public static const KAYAH_LI:uint = 0xA900;
- // Represents the Unicode value for the zero digit of the Khmer digit set.
- public static const KHMER:uint = 0x17E0;
+ // Represents the Unicode value for the zero digit of the Khmer digit set.
+ public static const KHMER:uint = 0x17E0;
- // Represents the Unicode value for the zero digit of the Lao digit set.
- public static const LAO:uint = 0x0ED0;
+ // Represents the Unicode value for the zero digit of the Lao digit set.
+ public static const LAO:uint = 0x0ED0;
- // Represents the Unicode value for the zero digit of the Lepcha digit set.
- public static const LEPCHA:uint = 0x1C40;
+ // Represents the Unicode value for the zero digit of the Lepcha digit set.
+ public static const LEPCHA:uint = 0x1C40;
- // Represents the Unicode value for the zero digit of the Limbu digit set.
- public static const LIMBU:uint = 0x1946;
+ // Represents the Unicode value for the zero digit of the Limbu digit set.
+ public static const LIMBU:uint = 0x1946;
- // Represents the Unicode value for the zero digit of the Malayalam digit set.
- public static const MALAYALAM:uint = 0x0D66;
+ // Represents the Unicode value for the zero digit of the Malayalam digit set.
+ public static const MALAYALAM:uint = 0x0D66;
- // Represents the Unicode value for the zero digit of the Mongolian digit set.
- public static const MONGOLIAN:uint = 0x1810;
+ // Represents the Unicode value for the zero digit of the Mongolian digit set.
+ public static const MONGOLIAN:uint = 0x1810;
- // Represents the Unicode value for the zero digit of the Myanmar digit set.
- public static const MYANMAR:uint = 0x1040;
+ // Represents the Unicode value for the zero digit of the Myanmar digit set.
+ public static const MYANMAR:uint = 0x1040;
- // Represents the Unicode value for the zero digit of the Myanmar Shan digit set.
- public static const MYANMAR_SHAN:uint = 0x1090;
+ // Represents the Unicode value for the zero digit of the Myanmar Shan digit set.
+ public static const MYANMAR_SHAN:uint = 0x1090;
- // Represents the Unicode value for the zero digit of the New Tai Lue digit set.
- public static const NEW_TAI_LUE:uint = 0x19D0;
+ // Represents the Unicode value for the zero digit of the New Tai Lue digit set.
+ public static const NEW_TAI_LUE:uint = 0x19D0;
- // Represents the Unicode value for the zero digit of the Nko digit set.
- public static const NKO:uint = 0x07C0;
+ // Represents the Unicode value for the zero digit of the Nko digit set.
+ public static const NKO:uint = 0x07C0;
- // Represents the Unicode value for the zero digit of the Ol Chiki digit set.
- public static const OL_CHIKI:uint = 0x1C50;
+ // Represents the Unicode value for the zero digit of the Ol Chiki digit set.
+ public static const OL_CHIKI:uint = 0x1C50;
- // Represents the Unicode value for the zero digit of the Oriya digit set.
- public static const ORIYA:uint = 0x0B66;
+ // Represents the Unicode value for the zero digit of the Oriya digit set.
+ public static const ORIYA:uint = 0x0B66;
- // Represents the Unicode value for the zero digit of the Osmanya digit set.
- public static const OSMANYA:uint = 0x104A0;
+ // Represents the Unicode value for the zero digit of the Osmanya digit set.
+ public static const OSMANYA:uint = 0x104A0;
- // Represents the Unicode value for the zero digit of the Saurashtra digit set.
- public static const SAURASHTRA:uint = 0xA8D0;
+ // Represents the Unicode value for the zero digit of the Saurashtra digit set.
+ public static const SAURASHTRA:uint = 0xA8D0;
- // Represents the Unicode value for the zero digit of the Sundanese digit set.
- public static const SUNDANESE:uint = 0x1BB0;
+ // Represents the Unicode value for the zero digit of the Sundanese digit set.
+ public static const SUNDANESE:uint = 0x1BB0;
- // Represents the Unicode value for the zero digit of the Tamil digit set.
- public static const TAMIL:uint = 0x0BE6;
+ // Represents the Unicode value for the zero digit of the Tamil digit set.
+ public static const TAMIL:uint = 0x0BE6;
- // Represents the Unicode value for the zero digit of the Telugu digit set.
- public static const TELUGU:uint = 0x0C66;
+ // Represents the Unicode value for the zero digit of the Telugu digit set.
+ public static const TELUGU:uint = 0x0C66;
- // Represents the Unicode value for the zero digit of the Thai digit set.
- public static const THAI:uint = 0x0E50;
+ // Represents the Unicode value for the zero digit of the Thai digit set.
+ public static const THAI:uint = 0x0E50;
- // Represents the Unicode value for the zero digit of the Tibetan digit set.
- public static const TIBETAN:uint = 0x0F20;
+ // Represents the Unicode value for the zero digit of the Tibetan digit set.
+ public static const TIBETAN:uint = 0x0F20;
- // Represents the Unicode value for the zero digit of the Vai digit set.
- public static const VAI:uint = 0xA620;
+ // Represents the Unicode value for the zero digit of the Vai digit set.
+ public static const VAI:uint = 0xA620;
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/NumberFormatter.as b/core/src/avm2/globals/flash/globalization/NumberFormatter.as
index c89ec4a99bac..0eeb1e8f1f3e 100644
--- a/core/src/avm2/globals/flash/globalization/NumberFormatter.as
+++ b/core/src/avm2/globals/flash/globalization/NumberFormatter.as
@@ -1,143 +1,176 @@
-package flash.globalization {
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
- import flash.globalization.LastOperationStatus;
- import flash.globalization.NationalDigitsType;
- import flash.globalization.NumberParseResult;
-
- public final class NumberFormatter {
- private var _decimalSeparator = ".";
- private var _digitsType = NationalDigitsType.EUROPEAN;
- private var _fractionalDigits = 2;
- private var _groupingPattern = "3;*";
- private var _groupingSeparator = ",";
- private var _leadingZero = true;
- private var _localeIDName:String;
- private var _negativeNumberFormat = 1;
- private var _negativeSymbol = "-";
- private var _trailingZeros = true;
- private var _useGrouping = true;
-
- public function NumberFormatter(requestedLocaleIDName:String) {
- stub_constructor("flash.globalization.NumberFormatter");
- this._localeIDName = requestedLocaleIDName;
- }
-
- public function get actualLocaleIDName():String {
- stub_getter("flash.globalization.NumberFormatter", "actualLocaleIDName");
- return this._localeIDName;
- }
-
- public function get decimalSeparator():String {
- return this._decimalSeparator;
- }
- public function set decimalSeparator(value:String):void {
- this._decimalSeparator = value;
- }
-
- public function get digitsType():uint {
- return this._digitsType;
- }
- public function set digitsType(value:uint):void {
- this._digitsType = value;
- }
-
- public function get fractionalDigits():int {
- return this._fractionalDigits;
- }
- public function set fractionalDigits(value:int):void {
- this._fractionalDigits = value;
- }
-
- public function get groupingPattern():String {
- return this._groupingPattern;
- }
- public function set groupingPattern(value:String):void {
- this._groupingPattern = value;
- }
-
- public function get groupingSeparator():String {
- return this._groupingSeparator;
- }
- public function set groupingSeparator(value:String):void {
- this._groupingSeparator = value;
- }
-
- public function get lastOperationStatus():String {
- stub_getter("flash.globalization.NumberFormatter", "lastOperationStatus");
- return LastOperationStatus.NO_ERROR;
- }
-
- public function get leadingZero():Boolean {
- return this._leadingZero;
- }
- public function set leadingZero(value:Boolean):void {
- this._leadingZero = value;
- }
-
- public function get negativeNumberFormat():uint {
- return this._negativeNumberFormat;
- }
- public function set negativeNumberFormat(value:uint):void {
- if (value >= 0 && value <= 4) {
- this._negativeNumberFormat = value;
- }
- }
-
- public function get negativeSymbol():String {
- return this._negativeSymbol;
- }
- public function set negativeSymbol(value:String):void {
- this._negativeSymbol = value;
- }
-
- public function get requestedLocaleIDName():String {
- return this._localeIDName;
- }
-
- public function get trailingZeros():Boolean {
- return this._trailingZeros;
- }
- public function set trailingZeros(value:Boolean):void {
- this._trailingZeros = value;
- }
-
- public function get useGrouping():Boolean {
- return this._useGrouping;
- }
- public function set useGrouping(value:Boolean):void {
- this._useGrouping = value;
- }
-
- public function formatInt(value:int):String {
- stub_method("flash.globalization.NumberFormatter", "formatInt");
- return value.toString();
- }
-
- public function formatNumber(value:Number):String {
- stub_method("flash.globalization.NumberFormatter", "formatNumber");
- return value.toString();
- }
-
- public function formatUint(value:uint):String {
- stub_method("flash.globalization.NumberFormatter", "formatUint");
- return value.toString();
- }
-
- public static function getAvailableLocaleIDNames():Vector. {
- stub_method("flash.globalization.NumberFormatter", "getAvailableLocaleIDNames");
- return new ["en-US"];
- }
-
- public function parse(parseString:String):NumberParseResult {
- stub_method("flash.globalization.NumberFormatter", "parse");
- return new NumberParseResult();
- }
-
- public function parseNumber(parseString:String):Number {
- stub_method("flash.globalization.NumberFormatter", "parseNumber");
- return Number(parseString);
- }
- }
+package flash.globalization
+{
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
+ import flash.globalization.LastOperationStatus;
+ import flash.globalization.NationalDigitsType;
+ import flash.globalization.NumberParseResult;
+
+ public final class NumberFormatter
+ {
+ private var _decimalSeparator = ".";
+ private var _digitsType = NationalDigitsType.EUROPEAN;
+ private var _fractionalDigits = 2;
+ private var _groupingPattern = "3;*";
+ private var _groupingSeparator = ",";
+ private var _leadingZero = true;
+ private var _localeIDName:String;
+ private var _negativeNumberFormat = 1;
+ private var _negativeSymbol = "-";
+ private var _trailingZeros = true;
+ private var _useGrouping = true;
+
+ public function NumberFormatter(requestedLocaleIDName:String)
+ {
+ stub_constructor("flash.globalization.NumberFormatter");
+ this._localeIDName = requestedLocaleIDName;
+ }
+
+ public function get actualLocaleIDName():String
+ {
+ stub_getter("flash.globalization.NumberFormatter", "actualLocaleIDName");
+ return this._localeIDName;
+ }
+
+ public function get decimalSeparator():String
+ {
+ return this._decimalSeparator;
+ }
+ public function set decimalSeparator(value:String):void
+ {
+ this._decimalSeparator = value;
+ }
+
+ public function get digitsType():uint
+ {
+ return this._digitsType;
+ }
+ public function set digitsType(value:uint):void
+ {
+ this._digitsType = value;
+ }
+
+ public function get fractionalDigits():int
+ {
+ return this._fractionalDigits;
+ }
+ public function set fractionalDigits(value:int):void
+ {
+ this._fractionalDigits = value;
+ }
+
+ public function get groupingPattern():String
+ {
+ return this._groupingPattern;
+ }
+ public function set groupingPattern(value:String):void
+ {
+ this._groupingPattern = value;
+ }
+
+ public function get groupingSeparator():String
+ {
+ return this._groupingSeparator;
+ }
+ public function set groupingSeparator(value:String):void
+ {
+ this._groupingSeparator = value;
+ }
+
+ public function get lastOperationStatus():String
+ {
+ stub_getter("flash.globalization.NumberFormatter", "lastOperationStatus");
+ return LastOperationStatus.NO_ERROR;
+ }
+
+ public function get leadingZero():Boolean
+ {
+ return this._leadingZero;
+ }
+ public function set leadingZero(value:Boolean):void
+ {
+ this._leadingZero = value;
+ }
+
+ public function get negativeNumberFormat():uint
+ {
+ return this._negativeNumberFormat;
+ }
+ public function set negativeNumberFormat(value:uint):void
+ {
+ if (value >= 0 && value <= 4)
+ {
+ this._negativeNumberFormat = value;
+ }
+ }
+
+ public function get negativeSymbol():String
+ {
+ return this._negativeSymbol;
+ }
+ public function set negativeSymbol(value:String):void
+ {
+ this._negativeSymbol = value;
+ }
+
+ public function get requestedLocaleIDName():String
+ {
+ return this._localeIDName;
+ }
+
+ public function get trailingZeros():Boolean
+ {
+ return this._trailingZeros;
+ }
+ public function set trailingZeros(value:Boolean):void
+ {
+ this._trailingZeros = value;
+ }
+
+ public function get useGrouping():Boolean
+ {
+ return this._useGrouping;
+ }
+ public function set useGrouping(value:Boolean):void
+ {
+ this._useGrouping = value;
+ }
+
+ public function formatInt(value:int):String
+ {
+ stub_method("flash.globalization.NumberFormatter", "formatInt");
+ return value.toString();
+ }
+
+ public function formatNumber(value:Number):String
+ {
+ stub_method("flash.globalization.NumberFormatter", "formatNumber");
+ return value.toString();
+ }
+
+ public function formatUint(value:uint):String
+ {
+ stub_method("flash.globalization.NumberFormatter", "formatUint");
+ return value.toString();
+ }
+
+ public static function getAvailableLocaleIDNames():Vector.
+ {
+ stub_method("flash.globalization.NumberFormatter", "getAvailableLocaleIDNames");
+ return new ["en-US"];
+ }
+
+ public function parse(parseString:String):NumberParseResult
+ {
+ stub_method("flash.globalization.NumberFormatter", "parse");
+ return new NumberParseResult();
+ }
+
+ public function parseNumber(parseString:String):Number
+ {
+ stub_method("flash.globalization.NumberFormatter", "parseNumber");
+ return Number(parseString);
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/globalization/NumberParseResult.as b/core/src/avm2/globals/flash/globalization/NumberParseResult.as
index 4344c350d364..c492ee00b8a5 100644
--- a/core/src/avm2/globals/flash/globalization/NumberParseResult.as
+++ b/core/src/avm2/globals/flash/globalization/NumberParseResult.as
@@ -1,25 +1,31 @@
-package flash.globalization {
- public final class NumberParseResult {
- private var _endIndex:int;
- private var _startIndex:int;
- private var _value:Number;
+package flash.globalization
+{
+ public final class NumberParseResult
+ {
+ private var _endIndex:int;
+ private var _startIndex:int;
+ private var _value:Number;
- public function NumberParseResult(value:Number = NaN, startIndex:int = 0x7fffffff, endIndex:int = 0x7fffffff) {
- this._value = value;
- this._startIndex = startIndex;
- this._endIndex = endIndex;
- }
+ public function NumberParseResult(value:Number = NaN, startIndex:int = 0x7fffffff, endIndex:int = 0x7fffffff)
+ {
+ this._value = value;
+ this._startIndex = startIndex;
+ this._endIndex = endIndex;
+ }
- public function get endIndex():int {
- return this._endIndex;
- }
+ public function get endIndex():int
+ {
+ return this._endIndex;
+ }
- public function get startIndex():int {
- return this._startIndex;
- }
+ public function get startIndex():int
+ {
+ return this._startIndex;
+ }
- public function get value():Number {
- return this._value;
- }
- }
+ public function get value():Number
+ {
+ return this._value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/AVCaptionStyle.as b/core/src/avm2/globals/flash/media/AVCaptionStyle.as
index 4d4cd87b4c87..d47698d8c1a7 100644
--- a/core/src/avm2/globals/flash/media/AVCaptionStyle.as
+++ b/core/src/avm2/globals/flash/media/AVCaptionStyle.as
@@ -1,55 +1,57 @@
-package flash.media {
- [API("688")]
- public class AVCaptionStyle {
- public static const DEFAULT:String = "default";
- public static const NONE:String = "none";
-
- public static const MONOSPACE_WITH_SERIFS:String = "monospaced_with_serifs";
- public static const MONOSPACED_WITHOUT_SERIFS:String = "monospaced_without_serifs";
- public static const PROPORTIONAL_WITH_SERIFS:String = "proportional_with_serifs";
- public static const PROPORTIONAL_WITHOUT_SERIFS:String = "proportional_without_serifs";
-
- public static const CASUAL:String = "casual";
- public static const CURSIVE:String = "cursive";
- public static const DEPRESSED:String = "depressed";
- public static const RAISED:String = "raised";
- public static const SMALL_CAPITALS:String = "small_capitals";
- public static const UNIFORM:String = "uniform";
-
- public static const SMALL:String = "small";
- public static const MEDIUM:String = "medium";
- public static const LARGE:String = "large";
-
- public static const BRIGHT_MAGENTA:String = "bright_magenta";
- public static const MAGENTA:String = "magenta";
- public static const DARK_MAGENTA:String = "dark_magenta";
-
- public static const BRIGHT_RED:String = "bright_red";
- public static const RED:String = "red";
- public static const DARK_RED:String = "dark_red";
-
- public static const BRIGHT_YELLOW:String = "bright_yellow";
- public static const YELLOW:String = "yellow";
- public static const DARK_YELLOW:String = "dark_yellow";
-
- public static const BRIGHT_GREEN:String = "bright_green";
- public static const GREEN:String = "green";
- public static const DARK_GREEN:String = "dark_green";
-
- public static const BRIGHT_CYAN:String = "bright_cyan";
- public static const CYAN:String = "cyan";
- public static const DARK_CYAN:String = "dark_cyan";
-
- public static const BRIGHT_BLUE:String = "bright_blue";
- public static const BLUE:String = "blue";
- public static const DARK_BLUE:String = "dark_blue";
-
- public static const BRIGHT_WHITE:String = "bright_white";
- public static const WHITE:String = "white";
- public static const GRAY:String = "gray";
- public static const BLACK:String = "black";
-
- public static const LEFT_DROP_SHADOW:String = "drop_shadow_left";
- public static const RIGHT_DROP_SHADOW:String = "drop_shadow_right";
- }
+package flash.media
+{
+ [API("688")]
+ public class AVCaptionStyle
+ {
+ public static const DEFAULT:String = "default";
+ public static const NONE:String = "none";
+
+ public static const MONOSPACE_WITH_SERIFS:String = "monospaced_with_serifs";
+ public static const MONOSPACED_WITHOUT_SERIFS:String = "monospaced_without_serifs";
+ public static const PROPORTIONAL_WITH_SERIFS:String = "proportional_with_serifs";
+ public static const PROPORTIONAL_WITHOUT_SERIFS:String = "proportional_without_serifs";
+
+ public static const CASUAL:String = "casual";
+ public static const CURSIVE:String = "cursive";
+ public static const DEPRESSED:String = "depressed";
+ public static const RAISED:String = "raised";
+ public static const SMALL_CAPITALS:String = "small_capitals";
+ public static const UNIFORM:String = "uniform";
+
+ public static const SMALL:String = "small";
+ public static const MEDIUM:String = "medium";
+ public static const LARGE:String = "large";
+
+ public static const BRIGHT_MAGENTA:String = "bright_magenta";
+ public static const MAGENTA:String = "magenta";
+ public static const DARK_MAGENTA:String = "dark_magenta";
+
+ public static const BRIGHT_RED:String = "bright_red";
+ public static const RED:String = "red";
+ public static const DARK_RED:String = "dark_red";
+
+ public static const BRIGHT_YELLOW:String = "bright_yellow";
+ public static const YELLOW:String = "yellow";
+ public static const DARK_YELLOW:String = "dark_yellow";
+
+ public static const BRIGHT_GREEN:String = "bright_green";
+ public static const GREEN:String = "green";
+ public static const DARK_GREEN:String = "dark_green";
+
+ public static const BRIGHT_CYAN:String = "bright_cyan";
+ public static const CYAN:String = "cyan";
+ public static const DARK_CYAN:String = "dark_cyan";
+
+ public static const BRIGHT_BLUE:String = "bright_blue";
+ public static const BLUE:String = "blue";
+ public static const DARK_BLUE:String = "dark_blue";
+
+ public static const BRIGHT_WHITE:String = "bright_white";
+ public static const WHITE:String = "white";
+ public static const GRAY:String = "gray";
+ public static const BLACK:String = "black";
+
+ public static const LEFT_DROP_SHADOW:String = "drop_shadow_left";
+ public static const RIGHT_DROP_SHADOW:String = "drop_shadow_right";
+ }
}
diff --git a/core/src/avm2/globals/flash/media/AVNetworkingParams.as b/core/src/avm2/globals/flash/media/AVNetworkingParams.as
index 550f6ad98fd2..e1e54e4cb3ec 100644
--- a/core/src/avm2/globals/flash/media/AVNetworkingParams.as
+++ b/core/src/avm2/globals/flash/media/AVNetworkingParams.as
@@ -5,76 +5,76 @@
package flash.media
{
- public class AVNetworkingParams
- {
- private var _forceNativeNetworking: Boolean;
+ public class AVNetworkingParams
+ {
+ private var _forceNativeNetworking:Boolean;
- private var _readSetCookieHeader: Boolean;
+ private var _readSetCookieHeader:Boolean;
- private var _useCookieHeaderForAllRequests: Boolean;
+ private var _useCookieHeaderForAllRequests:Boolean;
- private var _networkDownVerificationUrl: String;
+ private var _networkDownVerificationUrl:String;
- private var _appendRandomQueryParameter: String;
+ private var _appendRandomQueryParameter:String;
- public function AVNetworkingParams(
- init_forceNativeNetworking:Boolean = false,
- init_readSetCookieHeader:Boolean = true,
- init_useCookieHeaderForAllRequests:Boolean = false,
- init_networkDownVerificationUrl:String = "")
- {
- this._forceNativeNetworking = init_forceNativeNetworking;
- this._readSetCookieHeader = init_readSetCookieHeader;
- this._useCookieHeaderForAllRequests = init_useCookieHeaderForAllRequests;
- this._networkDownVerificationUrl = init_networkDownVerificationUrl;
- }
+ public function AVNetworkingParams(
+ init_forceNativeNetworking:Boolean = false,
+ init_readSetCookieHeader:Boolean = true,
+ init_useCookieHeaderForAllRequests:Boolean = false,
+ init_networkDownVerificationUrl:String = "")
+ {
+ this._forceNativeNetworking = init_forceNativeNetworking;
+ this._readSetCookieHeader = init_readSetCookieHeader;
+ this._useCookieHeaderForAllRequests = init_useCookieHeaderForAllRequests;
+ this._networkDownVerificationUrl = init_networkDownVerificationUrl;
+ }
- public function get appendRandomQueryParameter():String
- {
- return this._appendRandomQueryParameter;
- }
+ public function get appendRandomQueryParameter():String
+ {
+ return this._appendRandomQueryParameter;
+ }
- public function set appendRandomQueryParameter(value:String):void
- {
- this._appendRandomQueryParameter = value;
- }
+ public function set appendRandomQueryParameter(value:String):void
+ {
+ this._appendRandomQueryParameter = value;
+ }
- public function get forceNativeNetworking():Boolean
- {
- return this._forceNativeNetworking;
- }
- public function set forceNativeNetworking(value:Boolean):void
- {
- this._forceNativeNetworking = value;
- }
+ public function get forceNativeNetworking():Boolean
+ {
+ return this._forceNativeNetworking;
+ }
+ public function set forceNativeNetworking(value:Boolean):void
+ {
+ this._forceNativeNetworking = value;
+ }
- public function get networkDownVerificationUrl():String
- {
- return this._networkDownVerificationUrl;
- }
- public function set networkDownVerificationUrl(value:String):void
- {
- this._networkDownVerificationUrl = value;
- }
+ public function get networkDownVerificationUrl():String
+ {
+ return this._networkDownVerificationUrl;
+ }
+ public function set networkDownVerificationUrl(value:String):void
+ {
+ this._networkDownVerificationUrl = value;
+ }
- public function get readSetCookieHeader():Boolean
- {
- return this._readSetCookieHeader;
- }
+ public function get readSetCookieHeader():Boolean
+ {
+ return this._readSetCookieHeader;
+ }
- public function set readSetCookieHeader(value:Boolean):void
- {
- this._readSetCookieHeader = value;
- }
+ public function set readSetCookieHeader(value:Boolean):void
+ {
+ this._readSetCookieHeader = value;
+ }
- public function get useCookieHeaderForAllRequests():Boolean
- {
- return this._useCookieHeaderForAllRequests;
- }
+ public function get useCookieHeaderForAllRequests():Boolean
+ {
+ return this._useCookieHeaderForAllRequests;
+ }
- public function set useCookieHeaderForAllRequests(value:Boolean):void
- {
- this._useCookieHeaderForAllRequests = value;
- }
- }
+ public function set useCookieHeaderForAllRequests(value:Boolean):void
+ {
+ this._useCookieHeaderForAllRequests = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/AVResult.as b/core/src/avm2/globals/flash/media/AVResult.as
index 011b1c0e915a..7e773cbd721a 100644
--- a/core/src/avm2/globals/flash/media/AVResult.as
+++ b/core/src/avm2/globals/flash/media/AVResult.as
@@ -1,117 +1,121 @@
-package flash.media {
- [API("688")]
- public class AVResult {
- public static const END_OF_PERIOD:int = -1;
- public static const SUCCESS:int = 0;
- public static const ASYNC_OPERATION_IN_PROGRESS:int = 1;
- public static const EOF:int = 2;
- public static const DECODER_FAILED:int = 3;
- public static const DEVICE_OPEN_ERROR:int = 4;
- public static const FILE_NOT_FOUND:int = 5;
- public static const GENERIC_ERROR:int = 6;
- public static const IRRECOVERABLE_ERROR:int = 7;
- public static const LOST_CONNECTION_RECOVERABLE:int = 8;
- public static const NO_FIXED_SIZE:int = 9;
- public static const NOT_IMPLEMENTED:int = 10;
- public static const OUT_OF_MEMORY:int = 11;
- public static const PARSE_ERROR:int = 12;
- public static const SIZE_UNKNOWN:int = 13;
- public static const UNDERFLOW:int = 14;
- public static const UNSUPPORTED_CONFIGURATION:int = 15;
- public static const UNSUPPORTED_OPERATION:int = 16;
- public static const WAITING_FOR_INIT:int = 17;
- public static const INVALID_PARAMETER:int = 18;
- public static const INVALID_OPERATION:int = 19;
- public static const ONLY_ALLOWED_IN_PAUSED_STATE:int = 20;
- public static const INVALID_WITH_AUDIO_ONLY_FILE:int = 21;
- public static const PREVIOUS_STEP_SEEK_IN_PROGRESS:int = 22;
- public static const RESOURCE_NOT_SPECIFIED:int = 23;
- public static const RANGE_ERROR:int = 24;
- public static const INVALID_SEEK_TIME:int = 25;
- public static const FILE_STRUCTURE_INVALID:int = 26;
- public static const COMPONENT_CREATION_FAILURE:int = 27;
- public static const DRM_INIT_ERROR:int = 28;
- public static const CONTAINER_NOT_SUPPORTED:int = 29;
- public static const SEEK_FAILED:int = 30;
- public static const CODEC_NOT_SUPPORTED:int = 31;
- public static const NETWORK_UNAVAILABLE:int = 32;
- public static const NETWORK_ERROR:int = 33;
- public static const OVERFLOW:int = 34;
- public static const VIDEO_PROFILE_NOT_SUPPORTED:int = 35;
- public static const PERIOD_NOT_LOADED:int = 36;
- public static const INVALID_REPLACE_DURATION:int = 37;
- public static const CALLED_FROM_WRONG_THREAD:int = 38;
- public static const FRAGMENT_READ_ERROR:int = 39;
- public static const OPERATION_ABORTED:int = 40;
- public static const UNSUPPORTED_HLS_VERSION:int = 41;
- public static const CANNOT_FAIL_OVER:int = 42;
- public static const HTTP_TIME_OUT:int = 43;
- public static const NETWORK_DOWN:int = 44;
- public static const NO_USEABLE_BITRATE_PROFILE:int = 45;
- public static const BAD_MANIFEST_SIGNATURE:int = 46;
- public static const CANNOT_LOAD_PLAY_LIST:int = 47;
- public static const REPLACEMENT_FAILED:int = 48;
- public static const SWITCH_TO_ASYMMETRIC_PROFILE:int = 49;
- public static const LIVE_WINDOW_MOVED_BACKWARD:int = 50;
- public static const CURRENT_PERIOD_EXPIRED:int = 51;
- public static const CONTENT_LENGTH_MISMATCH:int = 52;
- public static const PERIOD_HOLD:int = 53;
- public static const LIVE_HOLD:int = 54;
- public static const BAD_MEDIA_INTERLEAVING:int = 55;
- public static const DRM_NOT_AVAILABLE:int = 56;
- public static const PLAYBACK_NOT_ENABLED:int = 57;
- public static const BAD_MEDIASAMPLE_FOUND:int = 58;
- public static const RANGE_SPANS_READHEAD:int = 59;
- public static const POSTROLL_WITH_LIVE_NOT_ALLOWED:int = 60;
- public static const INTERNAL_ERROR:int = 61;
- public static const SPS_PPS_FOUND_OUTSIDE_AVCC:int = 62;
- public static const PARTIAL_REPLACEMENT:int = 63;
- public static const RENDITION_M3U8_ERROR:int = 64;
- public static const NULL_OPERATION:int = 65;
- public static const SEGMENT_SKIPPED_ON_FAILURE:int = 66;
- public static const INCOMPATIBLE_RENDER_MODE:int = 67;
- public static const PROTOCOL_NOT_SUPPORTED:int = 68;
- public static const INCOMPATIBLE_VERSION:int = 69;
- public static const MANIFEST_FILE_UNEXPECTEDLY_CHANGED:int = 70;
- public static const CANNOT_SPLIT_TIMELINE:int = 71;
- public static const CANNOT_ERASE_TIMELINE:int = 72;
- public static const DID_NOT_GET_NEXT_FRAGMENT:int = 73;
- public static const NO_TIMELINE:int = 74;
- public static const LISTENER_NOT_FOUND:int = 75;
- public static const AUDIO_START_ERROR:int = 76;
- public static const NO_AUDIO_SINK:int = 77;
- public static const FILE_OPEN_ERROR:int = 78;
- public static const FILE_WRITE_ERROR:int = 79;
- public static const FILE_READ_ERROR:int = 80;
- public static const ID3_PARSE_ERROR:int = 81;
- public static const SECURITY_ERROR:int = 82;
- public static const TIMELINE_TOO_SHORT:int = 83;
- public static const AUDIO_ONLY_STREAM_START:int = 84;
- public static const AUDIO_ONLY_STREAM_END:int = 85;
- public static const CANNOT_HANDLE_MAIN_MANIFEST_UPDATE:int = 86;
- public static const KEY_NOT_FOUND:int = 87;
- public static const INVALID_KEY:int = 88;
- public static const KEY_SERVER_NOT_FOUND:int = 89;
- public static const MAIN_MANIFEST_UPDATE_TO_BE_HANDLED:int = 90;
- public static const UNREPORTED_TIME_DISCONTINUITY_FOUND:int = 91;
+package flash.media
+{
+ [API("688")]
+ public class AVResult
+ {
+ public static const END_OF_PERIOD:int = -1;
+ public static const SUCCESS:int = 0;
+ public static const ASYNC_OPERATION_IN_PROGRESS:int = 1;
+ public static const EOF:int = 2;
+ public static const DECODER_FAILED:int = 3;
+ public static const DEVICE_OPEN_ERROR:int = 4;
+ public static const FILE_NOT_FOUND:int = 5;
+ public static const GENERIC_ERROR:int = 6;
+ public static const IRRECOVERABLE_ERROR:int = 7;
+ public static const LOST_CONNECTION_RECOVERABLE:int = 8;
+ public static const NO_FIXED_SIZE:int = 9;
+ public static const NOT_IMPLEMENTED:int = 10;
+ public static const OUT_OF_MEMORY:int = 11;
+ public static const PARSE_ERROR:int = 12;
+ public static const SIZE_UNKNOWN:int = 13;
+ public static const UNDERFLOW:int = 14;
+ public static const UNSUPPORTED_CONFIGURATION:int = 15;
+ public static const UNSUPPORTED_OPERATION:int = 16;
+ public static const WAITING_FOR_INIT:int = 17;
+ public static const INVALID_PARAMETER:int = 18;
+ public static const INVALID_OPERATION:int = 19;
+ public static const ONLY_ALLOWED_IN_PAUSED_STATE:int = 20;
+ public static const INVALID_WITH_AUDIO_ONLY_FILE:int = 21;
+ public static const PREVIOUS_STEP_SEEK_IN_PROGRESS:int = 22;
+ public static const RESOURCE_NOT_SPECIFIED:int = 23;
+ public static const RANGE_ERROR:int = 24;
+ public static const INVALID_SEEK_TIME:int = 25;
+ public static const FILE_STRUCTURE_INVALID:int = 26;
+ public static const COMPONENT_CREATION_FAILURE:int = 27;
+ public static const DRM_INIT_ERROR:int = 28;
+ public static const CONTAINER_NOT_SUPPORTED:int = 29;
+ public static const SEEK_FAILED:int = 30;
+ public static const CODEC_NOT_SUPPORTED:int = 31;
+ public static const NETWORK_UNAVAILABLE:int = 32;
+ public static const NETWORK_ERROR:int = 33;
+ public static const OVERFLOW:int = 34;
+ public static const VIDEO_PROFILE_NOT_SUPPORTED:int = 35;
+ public static const PERIOD_NOT_LOADED:int = 36;
+ public static const INVALID_REPLACE_DURATION:int = 37;
+ public static const CALLED_FROM_WRONG_THREAD:int = 38;
+ public static const FRAGMENT_READ_ERROR:int = 39;
+ public static const OPERATION_ABORTED:int = 40;
+ public static const UNSUPPORTED_HLS_VERSION:int = 41;
+ public static const CANNOT_FAIL_OVER:int = 42;
+ public static const HTTP_TIME_OUT:int = 43;
+ public static const NETWORK_DOWN:int = 44;
+ public static const NO_USEABLE_BITRATE_PROFILE:int = 45;
+ public static const BAD_MANIFEST_SIGNATURE:int = 46;
+ public static const CANNOT_LOAD_PLAY_LIST:int = 47;
+ public static const REPLACEMENT_FAILED:int = 48;
+ public static const SWITCH_TO_ASYMMETRIC_PROFILE:int = 49;
+ public static const LIVE_WINDOW_MOVED_BACKWARD:int = 50;
+ public static const CURRENT_PERIOD_EXPIRED:int = 51;
+ public static const CONTENT_LENGTH_MISMATCH:int = 52;
+ public static const PERIOD_HOLD:int = 53;
+ public static const LIVE_HOLD:int = 54;
+ public static const BAD_MEDIA_INTERLEAVING:int = 55;
+ public static const DRM_NOT_AVAILABLE:int = 56;
+ public static const PLAYBACK_NOT_ENABLED:int = 57;
+ public static const BAD_MEDIASAMPLE_FOUND:int = 58;
+ public static const RANGE_SPANS_READHEAD:int = 59;
+ public static const POSTROLL_WITH_LIVE_NOT_ALLOWED:int = 60;
+ public static const INTERNAL_ERROR:int = 61;
+ public static const SPS_PPS_FOUND_OUTSIDE_AVCC:int = 62;
+ public static const PARTIAL_REPLACEMENT:int = 63;
+ public static const RENDITION_M3U8_ERROR:int = 64;
+ public static const NULL_OPERATION:int = 65;
+ public static const SEGMENT_SKIPPED_ON_FAILURE:int = 66;
+ public static const INCOMPATIBLE_RENDER_MODE:int = 67;
+ public static const PROTOCOL_NOT_SUPPORTED:int = 68;
+ public static const INCOMPATIBLE_VERSION:int = 69;
+ public static const MANIFEST_FILE_UNEXPECTEDLY_CHANGED:int = 70;
+ public static const CANNOT_SPLIT_TIMELINE:int = 71;
+ public static const CANNOT_ERASE_TIMELINE:int = 72;
+ public static const DID_NOT_GET_NEXT_FRAGMENT:int = 73;
+ public static const NO_TIMELINE:int = 74;
+ public static const LISTENER_NOT_FOUND:int = 75;
+ public static const AUDIO_START_ERROR:int = 76;
+ public static const NO_AUDIO_SINK:int = 77;
+ public static const FILE_OPEN_ERROR:int = 78;
+ public static const FILE_WRITE_ERROR:int = 79;
+ public static const FILE_READ_ERROR:int = 80;
+ public static const ID3_PARSE_ERROR:int = 81;
+ public static const SECURITY_ERROR:int = 82;
+ public static const TIMELINE_TOO_SHORT:int = 83;
+ public static const AUDIO_ONLY_STREAM_START:int = 84;
+ public static const AUDIO_ONLY_STREAM_END:int = 85;
+ public static const CANNOT_HANDLE_MAIN_MANIFEST_UPDATE:int = 86;
+ public static const KEY_NOT_FOUND:int = 87;
+ public static const INVALID_KEY:int = 88;
+ public static const KEY_SERVER_NOT_FOUND:int = 89;
+ public static const MAIN_MANIFEST_UPDATE_TO_BE_HANDLED:int = 90;
+ public static const UNREPORTED_TIME_DISCONTINUITY_FOUND:int = 91;
- public static const CRYPTO_ALGORITHM_NOT_SUPPORTED:int = 300;
- public static const CRYPTO_ERROR_CORRUPTED_DATA:int = 301;
- public static const CRYPTO_ERROR_BUFFER_TOO_SMALL:int = 302;
- public static const CRYPTO_ERROR_BAD_CERTIFICATE:int = 303;
- public static const CRYPTO_ERROR_DIGEST_UPDATE:int = 304;
- public static const CRYPTO_ERROR_DIGEST_FINISH:int = 305;
- public static const CRYPTO_ERROR_BAD_PARAMETER:int = 306;
- public static const CRYPTO_ERROR_UNKNOWN:int = 307;
+ public static const CRYPTO_ALGORITHM_NOT_SUPPORTED:int = 300;
+ public static const CRYPTO_ERROR_CORRUPTED_DATA:int = 301;
+ public static const CRYPTO_ERROR_BUFFER_TOO_SMALL:int = 302;
+ public static const CRYPTO_ERROR_BAD_CERTIFICATE:int = 303;
+ public static const CRYPTO_ERROR_DIGEST_UPDATE:int = 304;
+ public static const CRYPTO_ERROR_DIGEST_FINISH:int = 305;
+ public static const CRYPTO_ERROR_BAD_PARAMETER:int = 306;
+ public static const CRYPTO_ERROR_UNKNOWN:int = 307;
- private var _result:int;
+ private var _result:int;
- public function AVResult(result:int) {
- this._result = result;
- }
+ public function AVResult(result:int)
+ {
+ this._result = result;
+ }
- public function get result():int {
- return this._result;
- }
- }
+ public function get result():int
+ {
+ return this._result;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/AVTagData.as b/core/src/avm2/globals/flash/media/AVTagData.as
index 5514cbe548f5..61057da29881 100644
--- a/core/src/avm2/globals/flash/media/AVTagData.as
+++ b/core/src/avm2/globals/flash/media/AVTagData.as
@@ -5,30 +5,30 @@
package flash.media
{
- public class AVTagData
- {
- // Data in the tag.
- private var _data: String;
+ public class AVTagData
+ {
+ // Data in the tag.
+ private var _data:String;
- // The timestamp of the tag data
- private var _localTime: Number;
+ // The timestamp of the tag data
+ private var _localTime:Number;
- public function AVTagData(
- init_data:String,
- init_localTime:Number)
- {
- _data = init_data;
- _localTime = init_localTime;
- }
+ public function AVTagData(
+ init_data:String,
+ init_localTime:Number)
+ {
+ _data = init_data;
+ _localTime = init_localTime;
+ }
- public function get data() : String
- {
- return this._data;
- }
+ public function get data():String
+ {
+ return this._data;
+ }
- public function get localTime() : Number
- {
- return this._localTime;
- }
- }
+ public function get localTime():Number
+ {
+ return this._localTime;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/AudioDecoder.as b/core/src/avm2/globals/flash/media/AudioDecoder.as
index d9a1de9168cb..4033f19ee076 100644
--- a/core/src/avm2/globals/flash/media/AudioDecoder.as
+++ b/core/src/avm2/globals/flash/media/AudioDecoder.as
@@ -6,26 +6,26 @@
package flash.media
{
- [API("674")]
- public final class AudioDecoder
- {
- // Dolby Digital Audio, which is also known as AC-3.
- public static const DOLBY_DIGITAL:String = "DolbyDigital";
+ [API("674")]
+ public final class AudioDecoder
+ {
+ // Dolby Digital Audio, which is also known as AC-3.
+ public static const DOLBY_DIGITAL:String = "DolbyDigital";
- // Dolby Digital Plus Audio, which is also known as Enhanced AC-3 and Enhanced Dolby Digital.
- public static const DOLBY_DIGITAL_PLUS:String = "DolbyDigitalPlus";
+ // Dolby Digital Plus Audio, which is also known as Enhanced AC-3 and Enhanced Dolby Digital.
+ public static const DOLBY_DIGITAL_PLUS:String = "DolbyDigitalPlus";
- // DTS Audio, which is also known as DTS Coherent Acoustics, DTS Digital Surround, and DTS core.
- public static const DTS:String = "DTS";
+ // DTS Audio, which is also known as DTS Coherent Acoustics, DTS Digital Surround, and DTS core.
+ public static const DTS:String = "DTS";
- // DTS Express Audio, which is also known as DTS Low Bit Rate (LBR).
- public static const DTS_EXPRESS:String = "DTSExpress";
+ // DTS Express Audio, which is also known as DTS Low Bit Rate (LBR).
+ public static const DTS_EXPRESS:String = "DTSExpress";
- // DTS-HD High Resolution Audio, which is also known as DTS-HD HR.
- public static const DTS_HD_HIGH_RESOLUTION_AUDIO:String = "DTSHDHighResolutionAudio";
+ // DTS-HD High Resolution Audio, which is also known as DTS-HD HR.
+ public static const DTS_HD_HIGH_RESOLUTION_AUDIO:String = "DTSHDHighResolutionAudio";
- // DTS-HD Master Audio, which is also known as DTS-HD MA.
- public static const DTS_HD_MASTER_AUDIO:String = "DTSHDMasterAudio";
+ // DTS-HD Master Audio, which is also known as DTS-HD MA.
+ public static const DTS_HD_MASTER_AUDIO:String = "DTSHDMasterAudio";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as b/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as
index fbe41ecde55f..576be1d28d8c 100644
--- a/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as
+++ b/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as
@@ -6,14 +6,14 @@
package flash.media
{
- // TODO: [API("724")]
- public final class AudioOutputChangeReason
- {
- // Audio Output is changed because system device has been added or removed.
- public static const DEVICE_CHANGE:String = "deviceChange";
+ // TODO: [API("724")]
+ public final class AudioOutputChangeReason
+ {
+ // Audio Output is changed because system device has been added or removed.
+ public static const DEVICE_CHANGE:String = "deviceChange";
- // Audio Output is changed by user selecting a different device.
- public static const USER_SELECTION:String = "userSelection";
+ // Audio Output is changed by user selecting a different device.
+ public static const USER_SELECTION:String = "userSelection";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/Camera.as b/core/src/avm2/globals/flash/media/Camera.as
index 3aa22dc9e2f3..080f5e0e3a95 100644
--- a/core/src/avm2/globals/flash/media/Camera.as
+++ b/core/src/avm2/globals/flash/media/Camera.as
@@ -1,129 +1,156 @@
-package flash.media {
- import flash.events.EventDispatcher;
- import flash.utils.ByteArray;
- import flash.geom.Rectangle;
- import flash.display.BitmapData;
-
- public final class Camera extends EventDispatcher {
- [API("682")]
- public function copyToByteArray(rect:Rectangle, destination:ByteArray) {
- __ruffle__.stub_method("flash.media.Camera", "copyToByteArray");
- }
-
- [API("682")]
- public function copyToVector(rect:Rectangle, destination:Vector.) {
- __ruffle__.stub_method("flash.media.Camera", "copyToVector");
- }
-
- [API("682")]
- public function drawToBitmapData(destination:BitmapData) {
- __ruffle__.stub_method("flash.media.Camera", "drawToBitmapData");
- }
-
- public static function getCamera(name: String = null):Camera {
- __ruffle__.stub_method("flash.media.Camera", "getCamera");
- return null;
- }
-
- public function setKeyFrameInterval(keyFrameInterval:int) {
- __ruffle__.stub_method("flash.media.Camera", "setKeyFrameInterval");
- }
-
- public function setLoopback(compress:Boolean = false) {
- __ruffle__.stub_method("flash.media.Camera", "setLoopback");
- }
-
- public function setMode(width:int, height:int, fps:Number, favorArea:Boolean = true) {
- __ruffle__.stub_method("flash.media.Camera", "setMode");
- }
-
- public function setMotionLevel(motionLevel:int, timeout:int = 2000) {
- __ruffle__.stub_method("flash.media.Camera", "setMotionLevel");
- }
-
- public function setQuality(bandwidth:int, quality:int) {
- __ruffle__.stub_method("flash.media.Camera", "setQuality");
- }
-
- public function get activityLevel(): Number {
- __ruffle__.stub_getter("flash.media.Camera", "activityLevel");
- return 0;
- }
-
- public function get bandwidth(): int {
- __ruffle__.stub_getter("flash.media.Camera", "bandwidth");
- return 0;
- }
-
- public function get currentFPS(): Number {
- __ruffle__.stub_getter("flash.media.Camera", "currentFPS");
- return 0;
- }
-
- public function get fps(): Number {
- __ruffle__.stub_getter("flash.media.Camera", "fps");
- return 0;
- }
-
- public function get height(): int {
- __ruffle__.stub_getter("flash.media.Camera", "height");
- return 0;
- }
-
- public function get index(): int {
- __ruffle__.stub_getter("flash.media.Camera", "index");
- return 0;
- }
-
- public static function get isSupported(): Boolean {
- __ruffle__.stub_getter("flash.media.Camera", "isSupported");
- return false;
- }
-
- public function get keyFrameInterval(): int {
- __ruffle__.stub_getter("flash.media.Camera", "keyFrameInterval");
- return 0;
- }
-
- public function get loopback(): Boolean {
- __ruffle__.stub_getter("flash.media.Camera", "loopback");
- return false;
- }
-
- public function get motionLevel(): int {
- __ruffle__.stub_getter("flash.media.Camera", "motionLevel");
- return 0;
- }
-
- public function get motionTimeout(): int {
- __ruffle__.stub_getter("flash.media.Camera", "motionTimeout");
- return 0;
- }
-
- public function get muted(): Boolean {
- __ruffle__.stub_getter("flash.media.Camera", "muted");
- return true;
- }
-
- public function get name(): String {
- __ruffle__.stub_getter("flash.media.Camera", "name");
- return "";
- }
-
- public static function get names(): Array {
- __ruffle__.stub_getter("flash.media.Camera", "names");
- return [];
- }
-
- public function get quality(): int {
- __ruffle__.stub_getter("flash.media.Camera", "quality");
- return 0;
- }
-
- public function get width(): int {
- __ruffle__.stub_getter("flash.media.Camera", "width");
- return 0;
- }
- }
+package flash.media
+{
+ import flash.events.EventDispatcher;
+ import flash.utils.ByteArray;
+ import flash.geom.Rectangle;
+ import flash.display.BitmapData;
+
+ public final class Camera extends EventDispatcher
+ {
+ [API("682")]
+ public function copyToByteArray(rect:Rectangle, destination:ByteArray)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "copyToByteArray");
+ }
+
+ [API("682")]
+ public function copyToVector(rect:Rectangle, destination:Vector.)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "copyToVector");
+ }
+
+ [API("682")]
+ public function drawToBitmapData(destination:BitmapData)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "drawToBitmapData");
+ }
+
+ public static function getCamera(name:String = null):Camera
+ {
+ __ruffle__.stub_method("flash.media.Camera", "getCamera");
+ return null;
+ }
+
+ public function setKeyFrameInterval(keyFrameInterval:int)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "setKeyFrameInterval");
+ }
+
+ public function setLoopback(compress:Boolean = false)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "setLoopback");
+ }
+
+ public function setMode(width:int, height:int, fps:Number, favorArea:Boolean = true)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "setMode");
+ }
+
+ public function setMotionLevel(motionLevel:int, timeout:int = 2000)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "setMotionLevel");
+ }
+
+ public function setQuality(bandwidth:int, quality:int)
+ {
+ __ruffle__.stub_method("flash.media.Camera", "setQuality");
+ }
+
+ public function get activityLevel():Number
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "activityLevel");
+ return 0;
+ }
+
+ public function get bandwidth():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "bandwidth");
+ return 0;
+ }
+
+ public function get currentFPS():Number
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "currentFPS");
+ return 0;
+ }
+
+ public function get fps():Number
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "fps");
+ return 0;
+ }
+
+ public function get height():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "height");
+ return 0;
+ }
+
+ public function get index():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "index");
+ return 0;
+ }
+
+ public static function get isSupported():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "isSupported");
+ return false;
+ }
+
+ public function get keyFrameInterval():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "keyFrameInterval");
+ return 0;
+ }
+
+ public function get loopback():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "loopback");
+ return false;
+ }
+
+ public function get motionLevel():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "motionLevel");
+ return 0;
+ }
+
+ public function get motionTimeout():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "motionTimeout");
+ return 0;
+ }
+
+ public function get muted():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "muted");
+ return true;
+ }
+
+ public function get name():String
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "name");
+ return "";
+ }
+
+ public static function get names():Array
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "names");
+ return [];
+ }
+
+ public function get quality():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "quality");
+ return 0;
+ }
+
+ public function get width():int
+ {
+ __ruffle__.stub_getter("flash.media.Camera", "width");
+ return 0;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/media/H264Level.as b/core/src/avm2/globals/flash/media/H264Level.as
index f850994081e7..25605d3acfe8 100644
--- a/core/src/avm2/globals/flash/media/H264Level.as
+++ b/core/src/avm2/globals/flash/media/H264Level.as
@@ -6,56 +6,56 @@
package flash.media
{
- [API("674")]
- public final class H264Level
- {
- // Constant for H.264 level 1.
- public static const LEVEL_1:String = "1";
+ [API("674")]
+ public final class H264Level
+ {
+ // Constant for H.264 level 1.
+ public static const LEVEL_1:String = "1";
- // Constant for H.264 level 1.1.
- public static const LEVEL_1_1:String = "1.1";
+ // Constant for H.264 level 1.1.
+ public static const LEVEL_1_1:String = "1.1";
- // Constant for H.264 level 1.2.
- public static const LEVEL_1_2:String = "1.2";
+ // Constant for H.264 level 1.2.
+ public static const LEVEL_1_2:String = "1.2";
- // Constant for H.264 level 1.3.
- public static const LEVEL_1_3:String = "1.3";
+ // Constant for H.264 level 1.3.
+ public static const LEVEL_1_3:String = "1.3";
- // Constant for H.264 level 1b.
- public static const LEVEL_1B:String = "1b";
+ // Constant for H.264 level 1b.
+ public static const LEVEL_1B:String = "1b";
- // Constant for H.264 level 2.
- public static const LEVEL_2:String = "2";
+ // Constant for H.264 level 2.
+ public static const LEVEL_2:String = "2";
- // Constant for H.264 level 2.1.
- public static const LEVEL_2_1:String = "2.1";
+ // Constant for H.264 level 2.1.
+ public static const LEVEL_2_1:String = "2.1";
- // Constant for H.264 level 2.2.
- public static const LEVEL_2_2:String = "2.2";
+ // Constant for H.264 level 2.2.
+ public static const LEVEL_2_2:String = "2.2";
- // Constant for H.264 level 3.
- public static const LEVEL_3:String = "3";
+ // Constant for H.264 level 3.
+ public static const LEVEL_3:String = "3";
- // Constant for H.264 level 3.1.
- public static const LEVEL_3_1:String = "3.1";
+ // Constant for H.264 level 3.1.
+ public static const LEVEL_3_1:String = "3.1";
- // Constant for H.264 level 3.2.
- public static const LEVEL_3_2:String = "3.2";
+ // Constant for H.264 level 3.2.
+ public static const LEVEL_3_2:String = "3.2";
- // Constant for H.264 level 4.
- public static const LEVEL_4:String = "4";
+ // Constant for H.264 level 4.
+ public static const LEVEL_4:String = "4";
- // Constant for H.264 level 4.1.
- public static const LEVEL_4_1:String = "4.1";
+ // Constant for H.264 level 4.1.
+ public static const LEVEL_4_1:String = "4.1";
- // Constant for H.264 level 4.2.
- public static const LEVEL_4_2:String = "4.2";
+ // Constant for H.264 level 4.2.
+ public static const LEVEL_4_2:String = "4.2";
- // Constant for H.264 level 5.
- public static const LEVEL_5:String = "5";
+ // Constant for H.264 level 5.
+ public static const LEVEL_5:String = "5";
- // Constant for H.264 level 5.1.
- public static const LEVEL_5_1:String = "5.1";
+ // Constant for H.264 level 5.1.
+ public static const LEVEL_5_1:String = "5.1";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/H264Profile.as b/core/src/avm2/globals/flash/media/H264Profile.as
index 7bdbdecdfb45..adf35ae4f9f3 100644
--- a/core/src/avm2/globals/flash/media/H264Profile.as
+++ b/core/src/avm2/globals/flash/media/H264Profile.as
@@ -6,14 +6,14 @@
package flash.media
{
- [API("674")]
- public final class H264Profile
- {
- // Constant for H.264/AVC baseline profile.
- public static const BASELINE:String = "baseline";
+ [API("674")]
+ public final class H264Profile
+ {
+ // Constant for H.264/AVC baseline profile.
+ public static const BASELINE:String = "baseline";
- // Constant for H.264/AVC main profile.
- public static const MAIN:String = "main";
+ // Constant for H.264/AVC main profile.
+ public static const MAIN:String = "main";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/ID3Info.as b/core/src/avm2/globals/flash/media/ID3Info.as
index 26e1bdf312c9..608b42852352 100644
--- a/core/src/avm2/globals/flash/media/ID3Info.as
+++ b/core/src/avm2/globals/flash/media/ID3Info.as
@@ -1,12 +1,14 @@
-package flash.media {
-
- public final dynamic class ID3Info {
- public var album:String;
- public var artist:String;
- public var comment:String;
- public var genre:String;
- public var songName:String;
- public var track:String;
- public var year:String;
- }
+package flash.media
+{
+
+ public final dynamic class ID3Info
+ {
+ public var album:String;
+ public var artist:String;
+ public var comment:String;
+ public var genre:String;
+ public var songName:String;
+ public var track:String;
+ public var year:String;
+ }
}
diff --git a/core/src/avm2/globals/flash/media/Microphone.as b/core/src/avm2/globals/flash/media/Microphone.as
index dda4051161e7..4fba7d12b06f 100644
--- a/core/src/avm2/globals/flash/media/Microphone.as
+++ b/core/src/avm2/globals/flash/media/Microphone.as
@@ -1,157 +1,191 @@
-package flash.media {
- import flash.events.EventDispatcher;
-
- public final class Microphone extends EventDispatcher {
-
- [API("672")]
- public static function getEnhancedMicrophone(index:int = -1):Microphone {
- __ruffle__.stub_method("flash.media.Microphone", "getEnhancedMicrophone");
- return new Microphone();
- }
-
- public static function getMicrophone(index:int = -1):Microphone {
- __ruffle__.stub_method("flash.media.Microphone", "getMicrophone");
- return new Microphone();
- }
-
- public function setLoopBack(isLooped:Boolean=true) {
- __ruffle__.stub_method("flash.media.Microphone", "setLoopBack");
- }
-
- public function setSilenceLevel(silenceLevel:Number, timeout:int = -1) {
- __ruffle__.stub_method("flash.media.Microphone", "setSilenceLevel");
- }
-
- public function setUseEchoSuppression(isEchoSuppressed:Boolean) {
- __ruffle__.stub_method("flash.media.Microphone", "setUseEchoSuppression");
- }
-
- public function get activityLevel():Number {
- __ruffle__.stub_getter("flash.media.Microphone", "activityLevel");
- return 0.0;
- }
-
- public function get codec():String {
- __ruffle__.stub_getter("flash.media.Microphone", "codec");
- return "";
- }
-
- public function set codec(codec:String) {
- __ruffle__.stub_setter("flash.media.Microphone", "codec");
- }
-
- public function get enableVAD():Boolean {
- __ruffle__.stub_getter("flash.media.Microphone", "enableVAD");
- return false;
- }
-
- public function set enableVAD(isEnabled:Boolean) {
- __ruffle__.stub_setter("flash.media.Microphone", "enableVAD");
- }
-
- public function get encodeQuality():int {
- __ruffle__.stub_getter("flash.media.Microphone", "encodeQuality");
- return 0;
- }
-
- public function set encodeQuality(quality:int) {
- __ruffle__.stub_setter("flash.media.Microphone", "encodeQuality");
- }
-
- [API("672")]
- public function get enhancedOptions():MicrophoneEnhancedOptions {
- __ruffle__.stub_getter("flash.media.Microphone", "enhancedOptions");
- return new MicrophoneEnhancedOptions();
- }
-
- [API("672")]
- public function set enhancedOptions(params:MicrophoneEnhancedOptions) {
- __ruffle__.stub_setter("flash.media.Microphone", "enhancedOptions");
- }
-
- public function get framesPerPacket():int {
- __ruffle__.stub_getter("flash.media.Microphone", "framesPerPacket");
- return 0;
- }
-
- public function set framesPerPacket(fpp:int) {
- __ruffle__.stub_setter("flash.media.Microphone", "framesPerPacket");
- }
-
- public function get gain():Number {
- __ruffle__.stub_getter("flash.media.Microphone", "gain");
- return 0.0;
- }
-
- public function set gain(gain:Number) {
- __ruffle__.stub_setter("flash.media.Microphone", "gain");
- }
-
- public function get index():int {
- __ruffle__.stub_getter("flash.media.Microphone", "index");
- return 0;
- }
-
- public static function get isSupported():Boolean {
- __ruffle__.stub_getter("flash.media.Microphone", "isSupported");
- return false;
- }
-
- public function get muted():Boolean {
- __ruffle__.stub_getter("flash.media.Microphone", "muted");
- return true;
- }
-
- public function get name():Boolean {
- __ruffle__.stub_getter("flash.media.Microphone", "name");
- return "";
- }
-
- public static function get names():Array {
- __ruffle__.stub_getter("flash.media.Microphone", "names");
- return [];
- }
-
- public function get noiseSuppressionLevel():int {
- __ruffle__.stub_getter("flash.media.Microphone", "noiseSuppressionLevel");
- return 0;
- }
-
- public function set noiseSuppressionLevel(level:int) {
- __ruffle__.stub_setter("flash.media.Microphone", "noiseSuppressionLevel");
- }
-
- public function get rate():int {
- __ruffle__.stub_getter("flash.media.Microphone", "rate");
- return 0;
- }
-
- public function set rate(level:int) {
- __ruffle__.stub_setter("flash.media.Microphone", "rate");
- }
-
- public function get silenceLevel():int {
- __ruffle__.stub_getter("flash.media.Microphone", "silenceLevel");
- return 0;
- }
-
- public function get silenceTimeout():int {
- __ruffle__.stub_getter("flash.media.Microphone", "silenceTimeout");
- return 0;
- }
-
- public function get soundTransform():flash.media.SoundTransform {
- __ruffle__.stub_getter("flash.media.Microphone", "soundTransform");
- return new SoundTransform();
- }
-
- public function set soundTransform(tf:flash.media.SoundTransform) {
- __ruffle__.stub_setter("flash.media.Microphone", "soundTransform");
- }
-
- public function get useEchoSuppression():Boolean {
- __ruffle__.stub_getter("flash.media.Microphone", "useEchoSuppression");
- return false;
- }
- }
+package flash.media
+{
+ import flash.events.EventDispatcher;
+
+ public final class Microphone extends EventDispatcher
+ {
+
+ [API("672")]
+ public static function getEnhancedMicrophone(index:int = -1):Microphone
+ {
+ __ruffle__.stub_method("flash.media.Microphone", "getEnhancedMicrophone");
+ return new Microphone();
+ }
+
+ public static function getMicrophone(index:int = -1):Microphone
+ {
+ __ruffle__.stub_method("flash.media.Microphone", "getMicrophone");
+ return new Microphone();
+ }
+
+ public function setLoopBack(isLooped:Boolean = true)
+ {
+ __ruffle__.stub_method("flash.media.Microphone", "setLoopBack");
+ }
+
+ public function setSilenceLevel(silenceLevel:Number, timeout:int = -1)
+ {
+ __ruffle__.stub_method("flash.media.Microphone", "setSilenceLevel");
+ }
+
+ public function setUseEchoSuppression(isEchoSuppressed:Boolean)
+ {
+ __ruffle__.stub_method("flash.media.Microphone", "setUseEchoSuppression");
+ }
+
+ public function get activityLevel():Number
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "activityLevel");
+ return 0.0;
+ }
+
+ public function get codec():String
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "codec");
+ return "";
+ }
+
+ public function set codec(codec:String)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "codec");
+ }
+
+ public function get enableVAD():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "enableVAD");
+ return false;
+ }
+
+ public function set enableVAD(isEnabled:Boolean)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "enableVAD");
+ }
+
+ public function get encodeQuality():int
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "encodeQuality");
+ return 0;
+ }
+
+ public function set encodeQuality(quality:int)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "encodeQuality");
+ }
+
+ [API("672")]
+ public function get enhancedOptions():MicrophoneEnhancedOptions
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "enhancedOptions");
+ return new MicrophoneEnhancedOptions();
+ }
+
+ [API("672")]
+ public function set enhancedOptions(params:MicrophoneEnhancedOptions)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "enhancedOptions");
+ }
+
+ public function get framesPerPacket():int
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "framesPerPacket");
+ return 0;
+ }
+
+ public function set framesPerPacket(fpp:int)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "framesPerPacket");
+ }
+
+ public function get gain():Number
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "gain");
+ return 0.0;
+ }
+
+ public function set gain(gain:Number)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "gain");
+ }
+
+ public function get index():int
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "index");
+ return 0;
+ }
+
+ public static function get isSupported():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "isSupported");
+ return false;
+ }
+
+ public function get muted():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "muted");
+ return true;
+ }
+
+ public function get name():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "name");
+ return "";
+ }
+
+ public static function get names():Array
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "names");
+ return [];
+ }
+
+ public function get noiseSuppressionLevel():int
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "noiseSuppressionLevel");
+ return 0;
+ }
+
+ public function set noiseSuppressionLevel(level:int)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "noiseSuppressionLevel");
+ }
+
+ public function get rate():int
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "rate");
+ return 0;
+ }
+
+ public function set rate(level:int)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "rate");
+ }
+
+ public function get silenceLevel():int
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "silenceLevel");
+ return 0;
+ }
+
+ public function get silenceTimeout():int
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "silenceTimeout");
+ return 0;
+ }
+
+ public function get soundTransform():flash.media.SoundTransform
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "soundTransform");
+ return new SoundTransform();
+ }
+
+ public function set soundTransform(tf:flash.media.SoundTransform)
+ {
+ __ruffle__.stub_setter("flash.media.Microphone", "soundTransform");
+ }
+
+ public function get useEchoSuppression():Boolean
+ {
+ __ruffle__.stub_getter("flash.media.Microphone", "useEchoSuppression");
+ return false;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as b/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as
index 8f23c8460bcb..87c0d69b57f8 100644
--- a/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as
+++ b/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as
@@ -6,23 +6,23 @@
package flash.media
{
- [API("672")]
- public final class MicrophoneEnhancedMode
- {
- // Use this mode to allow both parties to talk at the same time.
- public static const FULL_DUPLEX:String = "fullDuplex";
+ [API("672")]
+ public final class MicrophoneEnhancedMode
+ {
+ // Use this mode to allow both parties to talk at the same time.
+ public static const FULL_DUPLEX:String = "fullDuplex";
- // Use this mode for older and lower-quality speakers and microphones.
- public static const HALF_DUPLEX:String = "halfDuplex";
+ // Use this mode for older and lower-quality speakers and microphones.
+ public static const HALF_DUPLEX:String = "halfDuplex";
- // Use this mode when both parties are using headsets.
- public static const HEADSET:String = "headset";
+ // Use this mode when both parties are using headsets.
+ public static const HEADSET:String = "headset";
- // All enhanced microphone functionality is off.
- public static const OFF:String = "off";
+ // All enhanced microphone functionality is off.
+ public static const OFF:String = "off";
- // Use this mode when the speaker is muted.
- public static const SPEAKER_MUTE:String = "speakerMute";
+ // Use this mode when the speaker is muted.
+ public static const SPEAKER_MUTE:String = "speakerMute";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as b/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as
index cef60dc7116b..fd0e519910b7 100644
--- a/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as
+++ b/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as
@@ -1,9 +1,11 @@
-package flash.media {
- [API("672")]
- public final class MicrophoneEnhancedOptions {
- public var echoPath: int;
- public var isVoiceDetected: int;
- public var mode: String;
- public var nonLinearProcessing: Boolean;
- }
+package flash.media
+{
+ [API("672")]
+ public final class MicrophoneEnhancedOptions
+ {
+ public var echoPath:int;
+ public var isVoiceDetected:int;
+ public var mode:String;
+ public var nonLinearProcessing:Boolean;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/media/Sound.as b/core/src/avm2/globals/flash/media/Sound.as
index e353704cc1fb..c0d929a52194 100644
--- a/core/src/avm2/globals/flash/media/Sound.as
+++ b/core/src/avm2/globals/flash/media/Sound.as
@@ -1,30 +1,32 @@
-package flash.media {
- import flash.events.EventDispatcher;
- import flash.utils.ByteArray;
- import flash.net.URLRequest;
-
- [Ruffle(InstanceAllocator)]
- public class Sound extends EventDispatcher {
- public function Sound(stream:URLRequest = null, context:SoundLoaderContext = null) {
- this.init(stream, context)
- }
- private native function init(stream:URLRequest, context:SoundLoaderContext);
+package flash.media
+{
+ import flash.events.EventDispatcher;
+ import flash.utils.ByteArray;
+ import flash.net.URLRequest;
+ [Ruffle(InstanceAllocator)]
+ public class Sound extends EventDispatcher
+ {
+ public function Sound(stream:URLRequest = null, context:SoundLoaderContext = null)
+ {
+ this.init(stream, context);
+ }
+ private native function init(stream:URLRequest, context:SoundLoaderContext);
- public native function get bytesLoaded():uint;
- public native function get bytesTotal():int;
- public native function get isBuffering():Boolean;
- public native function get isURLInaccessible():Boolean;
- public native function get url():String;
- public native function get length():Number;
- public native function get id3():ID3Info;
- public native function play(startTime:Number = 0, loops:int = 0, sndTransform:SoundTransform = null):SoundChannel;
- public native function extract(target:ByteArray, length:Number, startPosition:Number = -1):Number;
- public native function close():void;
- public native function load(stream:URLRequest, context:SoundLoaderContext = null):void;
- [API("674")]
- public native function loadCompressedDataFromByteArray(bytes:ByteArray, bytesLength:uint):void;
- [API("674")]
- public native function loadPCMFromByteArray(bytes:ByteArray, samples:uint, format:String = "float", stereo:Boolean = true, sampleRate:Number = 44100.0):void
- }
+ public native function get bytesLoaded():uint;
+ public native function get bytesTotal():int;
+ public native function get isBuffering():Boolean;
+ public native function get isURLInaccessible():Boolean;
+ public native function get url():String;
+ public native function get length():Number;
+ public native function get id3():ID3Info;
+ public native function play(startTime:Number = 0, loops:int = 0, sndTransform:SoundTransform = null):SoundChannel;
+ public native function extract(target:ByteArray, length:Number, startPosition:Number = -1):Number;
+ public native function close():void;
+ public native function load(stream:URLRequest, context:SoundLoaderContext = null):void;
+ [API("674")]
+ public native function loadCompressedDataFromByteArray(bytes:ByteArray, bytesLength:uint):void;
+ [API("674")]
+ public native function loadPCMFromByteArray(bytes:ByteArray, samples:uint, format:String = "float", stereo:Boolean = true, sampleRate:Number = 44100.0):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/media/SoundChannel.as b/core/src/avm2/globals/flash/media/SoundChannel.as
index ab9b41ee9109..cc552e8cf3a0 100644
--- a/core/src/avm2/globals/flash/media/SoundChannel.as
+++ b/core/src/avm2/globals/flash/media/SoundChannel.as
@@ -1,13 +1,15 @@
-package flash.media {
- import flash.events.EventDispatcher;
-
- [Ruffle(InstanceAllocator)]
- public final class SoundChannel extends EventDispatcher {
- public native function get leftPeak():Number;
- public native function get rightPeak():Number;
- public native function get position():Number;
- public native function get soundTransform():SoundTransform;
- public native function set soundTransform(value:SoundTransform):void;
- public native function stop():void;
- }
+package flash.media
+{
+ import flash.events.EventDispatcher;
+
+ [Ruffle(InstanceAllocator)]
+ public final class SoundChannel extends EventDispatcher
+ {
+ public native function get leftPeak():Number;
+ public native function get rightPeak():Number;
+ public native function get position():Number;
+ public native function get soundTransform():SoundTransform;
+ public native function set soundTransform(value:SoundTransform):void;
+ public native function stop():void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/media/SoundCodec.as b/core/src/avm2/globals/flash/media/SoundCodec.as
index 17e582bc8ea3..18758f62f219 100644
--- a/core/src/avm2/globals/flash/media/SoundCodec.as
+++ b/core/src/avm2/globals/flash/media/SoundCodec.as
@@ -6,19 +6,19 @@
package flash.media
{
- public final class SoundCodec
- {
- // Specifies that the Nellymoser codec be used for compressing audio.
- public static const NELLYMOSER:String = "NellyMoser";
+ public final class SoundCodec
+ {
+ // Specifies that the Nellymoser codec be used for compressing audio.
+ public static const NELLYMOSER:String = "NellyMoser";
- // Specifies that the G711 A-law codec be used for compressing audio.
- public static const PCMA:String = "pcma";
+ // Specifies that the G711 A-law codec be used for compressing audio.
+ public static const PCMA:String = "pcma";
- // Specifies that the G711 u-law codec be used for compressing audio.
- public static const PCMU:String = "pcmu";
+ // Specifies that the G711 u-law codec be used for compressing audio.
+ public static const PCMU:String = "pcmu";
- // Specifies that the Speex codec be used for compressing audio.
- public static const SPEEX:String = "Speex";
+ // Specifies that the Speex codec be used for compressing audio.
+ public static const SPEEX:String = "Speex";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/SoundLoaderContext.as b/core/src/avm2/globals/flash/media/SoundLoaderContext.as
index bb4e617c7a55..4b42a02f8acf 100644
--- a/core/src/avm2/globals/flash/media/SoundLoaderContext.as
+++ b/core/src/avm2/globals/flash/media/SoundLoaderContext.as
@@ -1,11 +1,14 @@
-package flash.media {
- public class SoundLoaderContext {
- public var bufferTime:Number = 1000;
- public var checkPolicyFile:Boolean = false;
+package flash.media
+{
+ public class SoundLoaderContext
+ {
+ public var bufferTime:Number = 1000;
+ public var checkPolicyFile:Boolean = false;
- public function SoundLoaderContext(bufferTime:Number = 1000, checkPolicyFile:Boolean = false) {
- this.checkPolicyFile = checkPolicyFile;
- this.bufferTime = bufferTime;
- }
- }
+ public function SoundLoaderContext(bufferTime:Number = 1000, checkPolicyFile:Boolean = false)
+ {
+ this.checkPolicyFile = checkPolicyFile;
+ this.bufferTime = bufferTime;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/SoundMixer.as b/core/src/avm2/globals/flash/media/SoundMixer.as
index 70cc4c1a4066..33d5800408a0 100644
--- a/core/src/avm2/globals/flash/media/SoundMixer.as
+++ b/core/src/avm2/globals/flash/media/SoundMixer.as
@@ -1,16 +1,18 @@
-package flash.media {
- import flash.utils.ByteArray;
-
- public final class SoundMixer {
+package flash.media
+{
+ import flash.utils.ByteArray;
- public static native function get soundTransform():SoundTransform;
- public static native function set soundTransform(value:SoundTransform):void;
+ public final class SoundMixer
+ {
- public static native function get bufferTime():int;
- public static native function set bufferTime(value:int):void;
+ public static native function get soundTransform():SoundTransform;
+ public static native function set soundTransform(value:SoundTransform):void;
- public static native function stopAll():void;
- public static native function areSoundsInaccessible():Boolean
- public static native function computeSpectrum(outputArray:ByteArray, FFTMode:Boolean = false, stretchFactor:int = 0):void;
- }
+ public static native function get bufferTime():int;
+ public static native function set bufferTime(value:int):void;
+
+ public static native function stopAll():void;
+ public static native function areSoundsInaccessible():Boolean;
+ public static native function computeSpectrum(outputArray:ByteArray, FFTMode:Boolean = false, stretchFactor:int = 0):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/media/SoundTransform.as b/core/src/avm2/globals/flash/media/SoundTransform.as
index 3dd33f73cde6..b645aade8e83 100644
--- a/core/src/avm2/globals/flash/media/SoundTransform.as
+++ b/core/src/avm2/globals/flash/media/SoundTransform.as
@@ -1,17 +1,20 @@
-package flash.media {
- public final class SoundTransform {
- public var leftToLeft:Number;
- public var leftToRight:Number;
- public var rightToLeft:Number;
- public var rightToRight:Number;
- public var volume:Number;
+package flash.media
+{
+ public final class SoundTransform
+ {
+ public var leftToLeft:Number;
+ public var leftToRight:Number;
+ public var rightToLeft:Number;
+ public var rightToRight:Number;
+ public var volume:Number;
- public function SoundTransform(vol:Number = 1, panning:Number = 0) {
- this.volume = vol;
- this.pan = panning;
- }
+ public function SoundTransform(vol:Number = 1, panning:Number = 0)
+ {
+ this.volume = vol;
+ this.pan = panning;
+ }
- public native function get pan():Number;
- public native function set pan(value:Number):void;
- }
+ public native function get pan():Number;
+ public native function set pan(value:Number):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/media/StageVideoAvailability.as b/core/src/avm2/globals/flash/media/StageVideoAvailability.as
index c9c0cebb3978..e132685c8c9d 100644
--- a/core/src/avm2/globals/flash/media/StageVideoAvailability.as
+++ b/core/src/avm2/globals/flash/media/StageVideoAvailability.as
@@ -6,14 +6,14 @@
package flash.media
{
- [API("670")]
- public final class StageVideoAvailability
- {
- // Stage video is currently available.
- public static const AVAILABLE:String = "available";
+ [API("670")]
+ public final class StageVideoAvailability
+ {
+ // Stage video is currently available.
+ public static const AVAILABLE:String = "available";
- // Stage video is not currently available.
- public static const UNAVAILABLE:String = "unavailable";
+ // Stage video is not currently available.
+ public static const UNAVAILABLE:String = "unavailable";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as b/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as
index 249621b2a31e..823aa2273cba 100644
--- a/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as
+++ b/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as
@@ -6,23 +6,24 @@
package flash.media
{
- [API("688")] // the docs say 670, that's wrong
- public final class StageVideoAvailabilityReason
- {
- // Stage video is not currently available, the driver is too old or black listed
- public static const DRIVER_TOO_OLD:String = "driverTooOld";
+ [API("688")]
+ // the docs say 670, that's wrong
+ public final class StageVideoAvailabilityReason
+ {
+ // Stage video is not currently available, the driver is too old or black listed
+ public static const DRIVER_TOO_OLD:String = "driverTooOld";
- // Stage video is currently available, no errors occurred
- public static const NO_ERROR:String = "noError";
+ // Stage video is currently available, no errors occurred
+ public static const NO_ERROR:String = "noError";
- // Stage video is not currently available, no hardware was available
- public static const UNAVAILABLE:String = "unavailable";
+ // Stage video is not currently available, no hardware was available
+ public static const UNAVAILABLE:String = "unavailable";
- // Stage video is not currently available, the user disabled HW acceleration
- public static const USER_DISABLED:String = "userDisabled";
+ // Stage video is not currently available, the user disabled HW acceleration
+ public static const USER_DISABLED:String = "userDisabled";
- // Stage video is not currently available, the wmode doesn't support Stage video.
- public static const WMODE_INCOMPATIBLE:String = "wModeIncompatible";
+ // Stage video is not currently available, the wmode doesn't support Stage video.
+ public static const WMODE_INCOMPATIBLE:String = "wModeIncompatible";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/Video.as b/core/src/avm2/globals/flash/media/Video.as
index b64553f2a535..73706f517ccf 100644
--- a/core/src/avm2/globals/flash/media/Video.as
+++ b/core/src/avm2/globals/flash/media/Video.as
@@ -1,57 +1,66 @@
package flash.media
{
- import __ruffle__.stub_method;
-
- import flash.display.DisplayObject
- import flash.net.NetStream
-
- [Ruffle(InstanceAllocator)]
- public class Video extends DisplayObject
- {
- private var _deblocking: int;
- private var _smoothing: Boolean;
- private var _videoWidth: int;
- private var _videoHeight: int;
-
- public function Video(width: int = 320, height: int = 240) {
- if (width < 0 || height < 0) {
- throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
- }
- this._videoWidth = width;
- this._videoHeight = height;
- this.init(width, height);
- }
-
- private native function init(width: int, height: int);
-
- public function get deblocking():int {
- return this._deblocking;
- }
-
- public function set deblocking(value:int):void {
- this._deblocking = value;
- }
-
- public function get smoothing():Boolean {
- return this._smoothing;
- }
-
- public function set smoothing(value:Boolean):void {
- this._smoothing = value;
- }
-
- public function get videoWidth():int {
- return this._videoWidth;
- }
-
- public function get videoHeight():int {
- return this._videoHeight;
- }
-
- public native function attachNetStream(netStream: NetStream);
-
- public function clear():void {
- stub_method("flash.media.Video", "clear");
- }
- }
+ import __ruffle__.stub_method;
+
+ import flash.display.DisplayObject;
+ import flash.net.NetStream;
+
+ [Ruffle(InstanceAllocator)]
+ public class Video extends DisplayObject
+ {
+ private var _deblocking:int;
+ private var _smoothing:Boolean;
+ private var _videoWidth:int;
+ private var _videoHeight:int;
+
+ public function Video(width:int = 320, height:int = 240)
+ {
+ if (width < 0 || height < 0)
+ {
+ throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
+ }
+ this._videoWidth = width;
+ this._videoHeight = height;
+ this.init(width, height);
+ }
+
+ private native function init(width:int, height:int);
+
+ public function get deblocking():int
+ {
+ return this._deblocking;
+ }
+
+ public function set deblocking(value:int):void
+ {
+ this._deblocking = value;
+ }
+
+ public function get smoothing():Boolean
+ {
+ return this._smoothing;
+ }
+
+ public function set smoothing(value:Boolean):void
+ {
+ this._smoothing = value;
+ }
+
+ public function get videoWidth():int
+ {
+ return this._videoWidth;
+ }
+
+ public function get videoHeight():int
+ {
+ return this._videoHeight;
+ }
+
+ public native function attachNetStream(netStream:NetStream);
+
+ public function clear():void
+ {
+ stub_method("flash.media.Video", "clear");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/VideoCodec.as b/core/src/avm2/globals/flash/media/VideoCodec.as
index 98158ed9a582..307ce58fcc4c 100644
--- a/core/src/avm2/globals/flash/media/VideoCodec.as
+++ b/core/src/avm2/globals/flash/media/VideoCodec.as
@@ -6,17 +6,17 @@
package flash.media
{
- [API("674")]
- public final class VideoCodec
- {
- // Constant value indicating that H.264/AVC codec is used for compressing video.
- public static const H264AVC:String = "H264Avc";
+ [API("674")]
+ public final class VideoCodec
+ {
+ // Constant value indicating that H.264/AVC codec is used for compressing video.
+ public static const H264AVC:String = "H264Avc";
- // Constant value indicating that Sorenson Spark codec is used for compressing video.
- public static const SORENSON:String = "Sorenson";
+ // Constant value indicating that Sorenson Spark codec is used for compressing video.
+ public static const SORENSON:String = "Sorenson";
- // Constant value indicating that On2Vp6 codec is used for compressing video.
- public static const VP6:String = "VP6";
+ // Constant value indicating that On2Vp6 codec is used for compressing video.
+ public static const VP6:String = "VP6";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/VideoStatus.as b/core/src/avm2/globals/flash/media/VideoStatus.as
index 715333e61c9c..f246250cf415 100644
--- a/core/src/avm2/globals/flash/media/VideoStatus.as
+++ b/core/src/avm2/globals/flash/media/VideoStatus.as
@@ -6,17 +6,17 @@
package flash.media
{
- [API("670")]
- public final class VideoStatus
- {
- // Indicates hardware-accelerated (GPU) video decoding.
- public static const ACCELERATED:String = "accelerated";
+ [API("670")]
+ public final class VideoStatus
+ {
+ // Indicates hardware-accelerated (GPU) video decoding.
+ public static const ACCELERATED:String = "accelerated";
- // Indicates software video decoding.
- public static const SOFTWARE:String = "software";
+ // Indicates software video decoding.
+ public static const SOFTWARE:String = "software";
- // Video decoding is not supported.
- public static const UNAVAILABLE:String = "unavailable";
+ // Video decoding is not supported.
+ public static const UNAVAILABLE:String = "unavailable";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/media/VideoStreamSettings.as b/core/src/avm2/globals/flash/media/VideoStreamSettings.as
index 4c536b61aba7..09495fbc84a9 100644
--- a/core/src/avm2/globals/flash/media/VideoStreamSettings.as
+++ b/core/src/avm2/globals/flash/media/VideoStreamSettings.as
@@ -5,84 +5,84 @@
package flash.media
{
- import __ruffle__.stub_method;
-
- [API("674")]
- public class VideoStreamSettings
- {
- // Retrieve the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second.
- private var _bandwidth: int;
-
- // Video codec used for compression.
- private var _codec: String;
-
- // The maximum frame rate at which the video frames are encoded, in frames per second.
- private var _fps: Number;
-
- // The current encoded height, in pixels.
- private var _height: int;
-
- // The number of video frames transmitted in full (called keyframes or IDR frames) instead of being interpolated by the video compression algorithm.
- private var _keyFrameInterval: int;
-
- // The required level of picture quality, as determined by the amount of compression being applied to each video frame.
- private var _quality: int;
-
- // The current encoded width, in pixels.
- private var _width: int;
-
- // The number of video frames transmitted in full (called keyframes or Instantaneous Decoding Refresh (IDR) frames) instead of being interpolated by the video compression algorithm.
- public function setKeyFrameInterval(keyFrameInterval:int = 15):void
- {
- stub_method("flash.media.VideoStreamSettings", "setKeyFrameInterval");
- }
-
- // Sets the resolution and frame rate used for video encoding.
- public function setMode(width:int = -1, height:int = -1, fps:Number = -1):void
- {
- stub_method("flash.media.VideoStreamSettings", "setMode");
- }
-
- // Sets maximum amount of bandwidth per second or the required picture quality that the current outgoing video feed can use.
- public function setQuality(bandwidth:int = 16384, quality:int = 0):void
- {
- stub_method("flash.media.VideoStreamSettings", "setQuality");
- }
-
- public function get bandwidth() : int
- {
- return this._bandwidth;
- }
-
- public function get codec() : String
- {
- return this._codec;
- }
-
- public function get fps() : Number
- {
- return this._fps;
- }
-
- public function get height() : int
- {
- return this._height;
- }
-
- public function get keyFrameInterval() : int
- {
- return this._keyFrameInterval;
- }
-
- public function get quality() : int
- {
- stub_getter("flash.media.VideoStreamSettings", "quality");
- return this._quality;
- }
-
- public function get width() : int
- {
- return this._width;
- }
- }
+ import __ruffle__.stub_method;
+
+ [API("674")]
+ public class VideoStreamSettings
+ {
+ // Retrieve the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second.
+ private var _bandwidth:int;
+
+ // Video codec used for compression.
+ private var _codec:String;
+
+ // The maximum frame rate at which the video frames are encoded, in frames per second.
+ private var _fps:Number;
+
+ // The current encoded height, in pixels.
+ private var _height:int;
+
+ // The number of video frames transmitted in full (called keyframes or IDR frames) instead of being interpolated by the video compression algorithm.
+ private var _keyFrameInterval:int;
+
+ // The required level of picture quality, as determined by the amount of compression being applied to each video frame.
+ private var _quality:int;
+
+ // The current encoded width, in pixels.
+ private var _width:int;
+
+ // The number of video frames transmitted in full (called keyframes or Instantaneous Decoding Refresh (IDR) frames) instead of being interpolated by the video compression algorithm.
+ public function setKeyFrameInterval(keyFrameInterval:int = 15):void
+ {
+ stub_method("flash.media.VideoStreamSettings", "setKeyFrameInterval");
+ }
+
+ // Sets the resolution and frame rate used for video encoding.
+ public function setMode(width:int = -1, height:int = -1, fps:Number = -1):void
+ {
+ stub_method("flash.media.VideoStreamSettings", "setMode");
+ }
+
+ // Sets maximum amount of bandwidth per second or the required picture quality that the current outgoing video feed can use.
+ public function setQuality(bandwidth:int = 16384, quality:int = 0):void
+ {
+ stub_method("flash.media.VideoStreamSettings", "setQuality");
+ }
+
+ public function get bandwidth():int
+ {
+ return this._bandwidth;
+ }
+
+ public function get codec():String
+ {
+ return this._codec;
+ }
+
+ public function get fps():Number
+ {
+ return this._fps;
+ }
+
+ public function get height():int
+ {
+ return this._height;
+ }
+
+ public function get keyFrameInterval():int
+ {
+ return this._keyFrameInterval;
+ }
+
+ public function get quality():int
+ {
+ stub_getter("flash.media.VideoStreamSettings", "quality");
+ return this._quality;
+ }
+
+ public function get width():int
+ {
+ return this._width;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net.as b/core/src/avm2/globals/flash/net.as
index 588468c43577..d126543a2cc4 100644
--- a/core/src/avm2/globals/flash/net.as
+++ b/core/src/avm2/globals/flash/net.as
@@ -1,14 +1,16 @@
-package flash.net {
+package flash.net
+{
- import flash.net.URLRequest;
- import __ruffle__.stub_method;
+ import flash.net.URLRequest;
+ import __ruffle__.stub_method;
- public native function navigateToURL(request:URLRequest, window:String = null):void;
+ public native function navigateToURL(request:URLRequest, window:String = null):void;
- public native function registerClassAlias(name:String, object:Class):void;
- public native function getClassByAlias(name:String):Class;
+ public native function registerClassAlias(name:String, object:Class):void;
+ public native function getClassByAlias(name:String):Class;
- public function sendToURL(request:URLRequest):void {
- stub_method("flash.net", "sendToURL");
- }
+ public function sendToURL(request:URLRequest):void
+ {
+ stub_method("flash.net", "sendToURL");
+ }
}
diff --git a/core/src/avm2/globals/flash/net/DatagramSocket.as b/core/src/avm2/globals/flash/net/DatagramSocket.as
index 215101cbac6b..9b2d48d50b4e 100644
--- a/core/src/avm2/globals/flash/net/DatagramSocket.as
+++ b/core/src/avm2/globals/flash/net/DatagramSocket.as
@@ -1,6 +1,9 @@
-package flash.net {
- [API("668")] // AIR 2.0
- public class DatagramSocket {
+package flash.net
+{
+ [API("668")]
+ // AIR 2.0
+ public class DatagramSocket
+ {
- }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/net/FileFilter.as b/core/src/avm2/globals/flash/net/FileFilter.as
index 004958cdcc9c..90abd794ae5c 100644
--- a/core/src/avm2/globals/flash/net/FileFilter.as
+++ b/core/src/avm2/globals/flash/net/FileFilter.as
@@ -1,38 +1,47 @@
-package flash.net {
- public final class FileFilter {
- private var _description:String;
- private var _extension:String;
- private var _macType:String;
-
- public function FileFilter(description:String, extension:String, macType:String = null) {
- this._description = description;
- this._extension = extension;
- this._macType = macType;
- }
-
- public function get description(): String {
- return this._description;
- }
-
- public function set description(val: String): void {
- this._description = val;
- }
-
- public function get extension(): String {
- return this._extension;
- }
-
- public function set extension(val: String): void {
- this._extension = val;
- }
-
- public function get macType(): String {
- return this._macType;
- }
-
- public function set macType(val: String): void {
- this._macType = val;
- }
-
- }
+package flash.net
+{
+ public final class FileFilter
+ {
+ private var _description:String;
+ private var _extension:String;
+ private var _macType:String;
+
+ public function FileFilter(description:String, extension:String, macType:String = null)
+ {
+ this._description = description;
+ this._extension = extension;
+ this._macType = macType;
+ }
+
+ public function get description():String
+ {
+ return this._description;
+ }
+
+ public function set description(val:String):void
+ {
+ this._description = val;
+ }
+
+ public function get extension():String
+ {
+ return this._extension;
+ }
+
+ public function set extension(val:String):void
+ {
+ this._extension = val;
+ }
+
+ public function get macType():String
+ {
+ return this._macType;
+ }
+
+ public function set macType(val:String):void
+ {
+ this._macType = val;
+ }
+
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/net/FileReference.as b/core/src/avm2/globals/flash/net/FileReference.as
index 38e2c714b1f8..306770dde03f 100644
--- a/core/src/avm2/globals/flash/net/FileReference.as
+++ b/core/src/avm2/globals/flash/net/FileReference.as
@@ -1,66 +1,74 @@
package flash.net
{
- import flash.events.EventDispatcher;
- import flash.utils.ByteArray;
- import __ruffle__.stub_method;
+ import flash.events.EventDispatcher;
+ import flash.utils.ByteArray;
+ import __ruffle__.stub_method;
- [Ruffle(InstanceAllocator)]
- public class FileReference extends EventDispatcher
- {
- public function FileReference() {
- }
+ [Ruffle(InstanceAllocator)]
+ public class FileReference extends EventDispatcher
+ {
+ public function FileReference()
+ {
+ }
- public native function get creationDate(): Date;
+ public native function get creationDate():Date;
- public function get creator(): String {
- // This was macOS (pre OS X) only. (Deprecated)
- return null;
- }
+ public function get creator():String
+ {
+ // This was macOS (pre OS X) only. (Deprecated)
+ return null;
+ }
- public native function get data(): ByteArray;
+ public native function get data():ByteArray;
- // AIR 1.0
- [API("661")]
- public function get extension(): String {
- // The file extension, excluding the dot.
- return this.type ? this.type.slice(1) : null;
- }
+ // AIR 1.0
+ [API("661")]
+ public function get extension():String
+ {
+ // The file extension, excluding the dot.
+ return this.type ? this.type.slice(1) : null;
+ }
- public native function get modificationDate(): Date;
+ public native function get modificationDate():Date;
- public native function get name(): String;
+ public native function get name():String;
- public native function get size(): Number;
+ public native function get size():Number;
- // File extension, including the dot. (Deprecated)
- public native function get type(): String;
+ // File extension, including the dot. (Deprecated)
+ public native function get type():String;
- public native function browse(typeFilter:Array = null): Boolean;
+ public native function browse(typeFilter:Array = null):Boolean;
- public function cancel():void {
- stub_method("flash.net.FileReference", "cancel");
- }
+ public function cancel():void
+ {
+ stub_method("flash.net.FileReference", "cancel");
+ }
- public function download(request:URLRequest, defaultFileName:String = null):void {
- stub_method("flash.net.FileReference", "download");
- }
+ public function download(request:URLRequest, defaultFileName:String = null):void
+ {
+ stub_method("flash.net.FileReference", "download");
+ }
- public native function load():void;
+ public native function load():void;
- [API("681")]
- public function requestPermission():void {
- stub_method("flash.net.FileReference", "requestPermission");
- }
+ [API("681")]
+ public function requestPermission():void
+ {
+ stub_method("flash.net.FileReference", "requestPermission");
+ }
- public native function save(data:*, defaultFileName:String = null):void;
+ public native function save(data:*, defaultFileName:String = null):void;
- public function upload(request:URLRequest, uploadDataFieldName:String = "Filedata", testUpload:Boolean = false):void {
- stub_method("flash.net.FileReference", "upload");
- }
+ public function upload(request:URLRequest, uploadDataFieldName:String = "Filedata", testUpload:Boolean = false):void
+ {
+ stub_method("flash.net.FileReference", "upload");
+ }
- [API("681")]
- public function uploadUnencoded(request:URLRequest):void {
- stub_method("flash.net.FileReference", "uploadUnencoded");
- }
- }
+ [API("681")]
+ public function uploadUnencoded(request:URLRequest):void
+ {
+ stub_method("flash.net.FileReference", "uploadUnencoded");
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/net/FileReferenceList.as b/core/src/avm2/globals/flash/net/FileReferenceList.as
index d7ea0b340b6c..f6ee8db69c47 100644
--- a/core/src/avm2/globals/flash/net/FileReferenceList.as
+++ b/core/src/avm2/globals/flash/net/FileReferenceList.as
@@ -1,36 +1,41 @@
package flash.net
{
- import flash.events.Event;
- import flash.events.EventDispatcher;
- import __ruffle__.stub_method;
+ import flash.events.Event;
+ import flash.events.EventDispatcher;
+ import __ruffle__.stub_method;
- public class FileReferenceList extends EventDispatcher
- {
- private var _fileList: Array;
- private var _file: FileReference;
+ public class FileReferenceList extends EventDispatcher
+ {
+ private var _fileList:Array;
+ private var _file:FileReference;
- public function FileReferenceList() {
- var self = this;
+ public function FileReferenceList()
+ {
+ var self = this;
- this._file = new FileReference();
- this._file.addEventListener(Event.SELECT, function(e:*): void {
- self._fileList[0] = self._file;
- self.dispatchEvent(new Event(Event.SELECT));
- });
- this._file.addEventListener(Event.CANCEL, function(e:*): void {
- self.dispatchEvent(new Event(Event.CANCEL));
- });
- }
+ this._file = new FileReference();
+ this._file.addEventListener(Event.SELECT, function(e:*):void
+ {
+ self._fileList[0] = self._file;
+ self.dispatchEvent(new Event(Event.SELECT));
+ });
+ this._file.addEventListener(Event.CANCEL, function(e:*):void
+ {
+ self.dispatchEvent(new Event(Event.CANCEL));
+ });
+ }
- public function get fileList(): Array {
- return this._fileList;
- }
+ public function get fileList():Array
+ {
+ return this._fileList;
+ }
- public function browse(typeFilter: Array = null): Boolean {
- stub_method("flash.net.FileReferenceList", "browse");
+ public function browse(typeFilter:Array = null):Boolean
+ {
+ stub_method("flash.net.FileReferenceList", "browse");
- this._fileList = [];
- return this._file.browse(typeFilter);
- }
- }
+ this._fileList = [];
+ return this._file.browse(typeFilter);
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as b/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as
index ea807a8296d8..76a988d8c837 100644
--- a/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as
+++ b/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as
@@ -1,5 +1,7 @@
-package flash.net {
- public interface IDynamicPropertyOutput {
- function writeDynamicProperty(name: String, value: *): void;
- }
+package flash.net
+{
+ public interface IDynamicPropertyOutput
+ {
+ function writeDynamicProperty(name:String, value:*):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as b/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as
index 34c0042f6684..a15ce043448d 100644
--- a/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as
+++ b/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as
@@ -1,5 +1,7 @@
-package flash.net {
- public interface IDynamicPropertyWriter {
- function writeDynamicProperties(obj: Object, output: IDynamicPropertyOutput): void;
- }
+package flash.net
+{
+ public interface IDynamicPropertyWriter
+ {
+ function writeDynamicProperties(obj:Object, output:IDynamicPropertyOutput):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/net/LocalConnection.as b/core/src/avm2/globals/flash/net/LocalConnection.as
index b73f22b8b31e..ccbfcc2bfc0e 100644
--- a/core/src/avm2/globals/flash/net/LocalConnection.as
+++ b/core/src/avm2/globals/flash/net/LocalConnection.as
@@ -1,38 +1,44 @@
-package flash.net {
- import flash.events.EventDispatcher;
- import flash.events.StatusEvent;
- import flash.utils.setTimeout;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
-
- [Ruffle(InstanceAllocator)]
- public class LocalConnection extends EventDispatcher {
- public function LocalConnection() {
- super();
- }
-
- [API("667")]
- public static function get isSupported():Boolean {
- return true;
- }
-
- public native function get domain():String;
-
- public native function close():void;
-
- public native function connect(connectionName:String):void;
-
- public native function send(connectionName: String, methodName: String, ... arguments):void;
-
- public native function get client():Object;
- public native function set client(client:Object):void;
-
- public function allowDomain(... domains): void {
- stub_method("flash.net.LocalConnection", "allowDomain");
- }
-
- public function allowInsecureDomain(... domains): void {
- stub_method("flash.net.LocalConnection", "allowInsecureDomain");
- }
- }
+package flash.net
+{
+ import flash.events.EventDispatcher;
+ import flash.events.StatusEvent;
+ import flash.utils.setTimeout;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+
+ [Ruffle(InstanceAllocator)]
+ public class LocalConnection extends EventDispatcher
+ {
+ public function LocalConnection()
+ {
+ super();
+ }
+
+ [API("667")]
+ public static function get isSupported():Boolean
+ {
+ return true;
+ }
+
+ public native function get domain():String;
+
+ public native function close():void;
+
+ public native function connect(connectionName:String):void;
+
+ public native function send(connectionName:String, methodName:String, ...arguments):void;
+
+ public native function get client():Object;
+ public native function set client(client:Object):void;
+
+ public function allowDomain(...domains):void
+ {
+ stub_method("flash.net.LocalConnection", "allowDomain");
+ }
+
+ public function allowInsecureDomain(...domains):void
+ {
+ stub_method("flash.net.LocalConnection", "allowInsecureDomain");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetConnection.as b/core/src/avm2/globals/flash/net/NetConnection.as
index 79e260e33b18..74129280fb80 100644
--- a/core/src/avm2/globals/flash/net/NetConnection.as
+++ b/core/src/avm2/globals/flash/net/NetConnection.as
@@ -1,44 +1,49 @@
-package flash.net {
- import flash.events.EventDispatcher;
- import flash.errors.IOError;
- import __ruffle__.stub_method;
-
- [Ruffle(InstanceAllocator)]
- public class NetConnection extends EventDispatcher {
-
- public static var defaultObjectEncoding:uint = 3;
-
- public var objectEncoding:uint = NetConnection.defaultObjectEncoding;
- public var client:Object = this;
- public var maxPeerConnections:uint = 8;
- public var proxyType:String = "none";
-
-
- public native function connect(command:String, ... arguments):void;
-
- public native function addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void;
-
- public native function call(command:String, responder:Responder, ... arguments):void;
-
- public native function close():void;
-
- public native function get connected():Boolean;
- public native function get connectedProxyType():String;
- public native function get farID():String;
- public native function get farNonce():String;
- public native function get nearID():String;
- public native function get nearNonce():String;
- public native function get protocol():String;
- public native function get uri():String;
- public native function get usingTLS():Boolean;
-
- public function get unconnectedPeerStreams():Array {
- if (this.connected) {
- // [NA] Arguably this isn't a stub as it can't ever be anything else in our current implementation...
- return [];
- } else {
- throw new ArgumentError("Error #2126: NetConnection object must be connected.", 2126);
- }
- }
- }
+package flash.net
+{
+ import flash.events.EventDispatcher;
+ import flash.errors.IOError;
+ import __ruffle__.stub_method;
+
+ [Ruffle(InstanceAllocator)]
+ public class NetConnection extends EventDispatcher
+ {
+
+ public static var defaultObjectEncoding:uint = 3;
+
+ public var objectEncoding:uint = NetConnection.defaultObjectEncoding;
+ public var client:Object = this;
+ public var maxPeerConnections:uint = 8;
+ public var proxyType:String = "none";
+
+ public native function connect(command:String, ...arguments):void;
+
+ public native function addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void;
+
+ public native function call(command:String, responder:Responder, ...arguments):void;
+
+ public native function close():void;
+
+ public native function get connected():Boolean;
+ public native function get connectedProxyType():String;
+ public native function get farID():String;
+ public native function get farNonce():String;
+ public native function get nearID():String;
+ public native function get nearNonce():String;
+ public native function get protocol():String;
+ public native function get uri():String;
+ public native function get usingTLS():Boolean;
+
+ public function get unconnectedPeerStreams():Array
+ {
+ if (this.connected)
+ {
+ // [NA] Arguably this isn't a stub as it can't ever be anything else in our current implementation...
+ return [];
+ }
+ else
+ {
+ throw new ArgumentError("Error #2126: NetConnection object must be connected.", 2126);
+ }
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetGroup.as b/core/src/avm2/globals/flash/net/NetGroup.as
index a0092d2e9704..6225756966aa 100644
--- a/core/src/avm2/globals/flash/net/NetGroup.as
+++ b/core/src/avm2/globals/flash/net/NetGroup.as
@@ -1,12 +1,15 @@
-package flash.net {
- import __ruffle__.stub_constructor;
+package flash.net
+{
+ import __ruffle__.stub_constructor;
- import flash.events.EventDispatcher;
+ import flash.events.EventDispatcher;
- [API("667")]
- public class NetGroup extends EventDispatcher {
- public function NetGroup(connection:NetConnection, groupspec:String) {
- stub_constructor("flash.net.NetGroup");
- }
- }
+ [API("667")]
+ public class NetGroup extends EventDispatcher
+ {
+ public function NetGroup(connection:NetConnection, groupspec:String)
+ {
+ stub_constructor("flash.net.NetGroup");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as b/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as
index 5fb890ecc19d..8fa4780e60cf 100644
--- a/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as
+++ b/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as
@@ -6,13 +6,13 @@
package flash.net
{
- public final class NetGroupReceiveMode
- {
- // Specifies that this node accepts local messages from neighbors only if the address the neighbor uses matches this node's address exactly.
- public static const EXACT:String = "exact";
+ public final class NetGroupReceiveMode
+ {
+ // Specifies that this node accepts local messages from neighbors only if the address the neighbor uses matches this node's address exactly.
+ public static const EXACT:String = "exact";
- // Specifies that this node accepts local messages from neighbors that send messages to group addresses that don't match this node's address exactly.
- public static const NEAREST:String = "nearest";
+ // Specifies that this node accepts local messages from neighbors that send messages to group addresses that don't match this node's address exactly.
+ public static const NEAREST:String = "nearest";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as b/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as
index 617a6cbd7758..669609e9d09c 100644
--- a/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as
+++ b/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as
@@ -6,13 +6,13 @@
package flash.net
{
- public final class NetGroupReplicationStrategy
- {
- // Specifies that when fetching objects from a neighbor to satisfy a want, the objects with the lowest index numbers are requested first.
- public static const LOWEST_FIRST:String = "lowestFirst";
+ public final class NetGroupReplicationStrategy
+ {
+ // Specifies that when fetching objects from a neighbor to satisfy a want, the objects with the lowest index numbers are requested first.
+ public static const LOWEST_FIRST:String = "lowestFirst";
- // Specifies that when fetching objects from a neighbor to satisfy a want, the objects with the fewest replicas among all the neighbors are requested first.
- public static const RAREST_FIRST:String = "rarestFirst";
+ // Specifies that when fetching objects from a neighbor to satisfy a want, the objects with the fewest replicas among all the neighbors are requested first.
+ public static const RAREST_FIRST:String = "rarestFirst";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetGroupSendMode.as b/core/src/avm2/globals/flash/net/NetGroupSendMode.as
index fbaaa2385963..821bf9b4f24b 100644
--- a/core/src/avm2/globals/flash/net/NetGroupSendMode.as
+++ b/core/src/avm2/globals/flash/net/NetGroupSendMode.as
@@ -6,13 +6,13 @@
package flash.net
{
- public final class NetGroupSendMode
- {
- // Specifies the neighbor with the nearest group address in the decreasing direction.
- public static const NEXT_DECREASING:String = "nextDecreasing";
+ public final class NetGroupSendMode
+ {
+ // Specifies the neighbor with the nearest group address in the decreasing direction.
+ public static const NEXT_DECREASING:String = "nextDecreasing";
- // Specifies the neighbor with the nearest group address in the increasing direction.
- public static const NEXT_INCREASING:String = "nextIncreasing";
+ // Specifies the neighbor with the nearest group address in the increasing direction.
+ public static const NEXT_INCREASING:String = "nextIncreasing";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetGroupSendResult.as b/core/src/avm2/globals/flash/net/NetGroupSendResult.as
index 98d27fe0dc1c..c66880b8c297 100644
--- a/core/src/avm2/globals/flash/net/NetGroupSendResult.as
+++ b/core/src/avm2/globals/flash/net/NetGroupSendResult.as
@@ -6,16 +6,16 @@
package flash.net
{
- public final class NetGroupSendResult
- {
- // Indicates an error occurred (such as no permission) when using a Directed Routing method.
- public static const ERROR:String = "error";
+ public final class NetGroupSendResult
+ {
+ // Indicates an error occurred (such as no permission) when using a Directed Routing method.
+ public static const ERROR:String = "error";
- // Indicates no neighbor could be found to route the message toward its requested destination.
- public static const NO_ROUTE:String = "no route";
+ // Indicates no neighbor could be found to route the message toward its requested destination.
+ public static const NO_ROUTE:String = "no route";
- // Indicates that a route was found for the message and it was forwarded toward its destination.
- public static const SENT:String = "sent";
+ // Indicates that a route was found for the message and it was forwarded toward its destination.
+ public static const SENT:String = "sent";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetStream.as b/core/src/avm2/globals/flash/net/NetStream.as
index 18598c723e7c..7c67ee7f9a92 100644
--- a/core/src/avm2/globals/flash/net/NetStream.as
+++ b/core/src/avm2/globals/flash/net/NetStream.as
@@ -1,367 +1,439 @@
-package flash.net {
- import flash.net.NetConnection;
- import flash.net.NetStreamPlayOptions;
- import flash.net.NetStreamInfo;
- import flash.events.EventDispatcher;
- import flash.utils.ByteArray;
- import flash.media.Microphone;
- import flash.media.Camera;
- import flash.media.VideoStreamSettings;
-
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
-
- [Ruffle(InstanceAllocator)]
- public class NetStream extends EventDispatcher {
- public static const CONNECT_TO_FMS: String = "connectToFMS";
- public static const DIRECT_CONNECTIONS: String = "directConnections";
-
- public function NetStream(connection:NetConnection, peer:String = CONNECT_TO_FMS) {
-
- }
-
- public function appendBytes(bytes:ByteArray) {
- stub_method("flash.net.NetStream", "appendBytes");
- }
-
- public function appendBytesAction(action:String) {
- stub_method("flash.net.NetStream", "appendBytesAction");
- }
-
- public function attach(connection:NetConnection) {
- stub_method("flash.net.NetStream", "attach");
- }
-
- public function attachAudio(mic:Microphone) {
- stub_method("flash.net.NetStream", "attachAudio");
- }
-
- public function attachCamera(cam:Camera, ms:int = -1) {
- stub_method("flash.net.NetStream", "attachCamera");
- }
-
- public function close() {
- stub_method("flash.net.NetStream", "close");
- }
-
- [API("674")]
- public function dispose() {
- stub_method("flash.net.NetStream", "dispose");
- }
-
- public native function pause();
-
- public native function play(...args);
-
- public function play2(param:NetStreamPlayOptions) {
- stub_method("flash.net.NetStream", "play2");
- }
-
- [API("663")]
- public function preloadEmbeddedData(param:NetStreamPlayOptions) {
- stub_method("flash.net.NetStream", "preloadEmbeddedData");
- }
-
- public function publish(name:String=null, type:String=null) {
- stub_method("flash.net.NetStream", "publish");
- }
-
- public function receiveAudio(flag:Boolean) {
- stub_method("flash.net.NetStream", "receiveAudio");
- }
-
- public function receiveVideo(flag:Boolean) {
- stub_method("flash.net.NetStream", "receiveVideo");
- }
-
- public function receiveVideoFPS(fps:Number) {
- stub_method("flash.net.NetStream", "receiveVideoFPS");
- }
-
- [API("690")]
- public static function resetDRMVouchers() {
- stub_method("flash.net.NetStream", "resetDRMVouchers");
- }
-
- public native function resume();
-
- public native function seek(offset:Number);
-
- public function send(handlerName:String, ...args) {
- stub_method("flash.net.NetStream", "send");
- }
-
- [API("661")]
- public function setDRMAuthenticationCredentials(userName:String, password:String, type:String) {
- stub_method("flash.net.NetStream", "setDRMAuthenticationCredentials");
- }
-
- public function step(frames:int) {
- stub_method("flash.net.NetStream", "step");
- }
-
- public native function togglePause();
-
- public function get audioReliable():Boolean {
- stub_getter("flash.net.NetStream", "audioReliable");
- return false;
- }
-
- public function set audioReliable(isReliable:Boolean) {
- stub_setter("flash.net.NetStream", "audioReliable");
- }
-
- public function get audioSampleAccess():Boolean {
- stub_getter("flash.net.NetStream", "audioSampleAccess");
- return false;
- }
-
- public function set audioSampleAccess(isAccessible:Boolean) {
- stub_setter("flash.net.NetStream", "audioSampleAccess");
- }
-
- public function get backBufferLength():Number {
- stub_getter("flash.net.NetStream", "backBufferLength");
- return 0.0;
- }
-
- public function get backBufferTime():Number {
- stub_getter("flash.net.NetStream", "backBufferTime");
- return 0.0;
- }
-
- public function set backBufferTime(time:Number) {
- stub_setter("flash.net.NetStream", "backBufferTime");
- }
-
- public function get bufferLength():Number {
- stub_getter("flash.net.NetStream", "bufferLength");
- return 0.0;
- }
-
- public function get bufferTime():Number {
- stub_getter("flash.net.NetStream", "bufferTime");
- return 0.0;
- }
-
- public function set bufferTime(time:Number) {
- stub_setter("flash.net.NetStream", "bufferTime");
- }
-
- public function get bufferTimeMax():Number {
- stub_getter("flash.net.NetStream", "bufferTimeMax");
- return 0.0;
- }
-
- public function set bufferTimeMax(time:Number) {
- stub_setter("flash.net.NetStream", "bufferTimeMax");
- }
-
- public native function get bytesLoaded():uint;
-
- public native function get bytesTotal():uint;
-
- public function get checkPolicyFile():Boolean {
- stub_getter("flash.net.NetStream", "checkPolicyFile");
- return false;
- }
-
- public function set checkPolicyFile(doCheck:Boolean) {
- stub_setter("flash.net.NetStream", "checkPolicyFile");
- }
-
- public native function get client():Object;
-
- public native function set client(client:Object);
-
- public function get currentFPS():Number {
- stub_getter("flash.net.NetStream", "currentFPS");
- return 0.0;
- }
-
- public function get dataReliable():Boolean {
- stub_getter("flash.net.NetStream", "dataReliable");
- return false;
- }
-
- public function set dataReliable(isReliable:Boolean) {
- stub_setter("flash.net.NetStream", "dataReliable");
- }
-
- public function get farID():String {
- stub_getter("flash.net.NetStream", "farID");
- return "";
- }
-
- public function get farNonce():String {
- stub_getter("flash.net.NetStream", "farNonce");
- return "";
- }
-
- public function get inBufferSeek():Boolean {
- stub_getter("flash.net.NetStream", "inBufferSeek");
- return false;
- }
-
- public function set inBufferSeek(isInBuffer:Boolean) {
- stub_setter("flash.net.NetStream", "inBufferSeek");
- }
-
- public function get info():NetStreamInfo {
- stub_getter("flash.net.NetStream", "info");
- return new NetStreamInfo();
- }
-
-
- public function get liveDelay(): Number {
- stub_getter("flash.net.NetStream", "liveDelay");
- return 0;
-
- };
-
- public function get maxPauseBufferTime(): Number {
- stub_getter("flash.net.NetStream", "maxPauseBufferTime");
- return 0;
- };
-
- public function set maxPauseBufferTime(time:Number) {
- stub_setter("flash.net.NetStream", "maxPauseBufferTime");
- };
-
- public function get multicastAvailabilitySendToAll():Boolean {
- stub_getter("flash.net.NetStream", "multicastAvailabilitySendToAll");
- return false;
- };
-
- public function set multicastAvailabilitySendToAll(toAll:Boolean) {
- stub_setter("flash.net.NetStream", "multicastAvailabilitySendToAll");
- };
-
- public function get multicastAvailabilityUpdatePeriod(): Number {
- stub_getter("flash.net.NetStream", "multicastAvailabilityUpdatePeriod");
- return 0;
- };
-
- public function set multicastAvailabilityUpdatePeriod(period:Number) {
- stub_setter("flash.net.NetStream", "multicastAvailabilityUpdatePeriod");
- };
-
- public function get multicastFetchPeriod():Number {
- stub_getter("flash.net.NetStream", "multicastFetchPeriod");
- return 0;
- };
-
- public function set multicastFetchPeriod(period:Number) {
- stub_setter("flash.net.NetStream", "multicastFetchPeriod");
- };
-
- public function get multicastInfo() : NetStreamMulticastInfo {
- stub_getter("flash.net.NetStream", "multicastInfo");
- return new NetStreamMulticastInfo();
- };
-
- public function get multicastPushNeighborLimit() : Number {
- stub_getter("flash.net.NetStream", "multicastPushNeighborLimit");
- return 0;
- };
-
- public function set multicastPushNeighborLimit(limit:Number) {
- stub_setter("flash.net.NetStream", "multicastPushNeighborLimit");
- };
-
- public function get multicastRelayMarginDuration() : Number {
- stub_getter("flash.net.NetStream", "multicastRelayMarginDuration");
- return 0;
- };
-
- public function set multicastRelayMarginDuration(dur: Number) {
- stub_setter("flash.net.NetStream", "multicastRelayMarginDuration");
- };
-
- public function get multicastWindowDuration() : Number {
- stub_getter("flash.net.NetStream", "multicastWindowDuration");
- return 0;
-
- };
-
- public function set multicastWindowDuration(dur:Number) {
- stub_setter("flash.net.NetStream", "multicastWindowDuration");
- };
-
- public function get nearNonce(): String {
- stub_getter("flash.net.NetStream", "nearNonce");
- return "";
- };
-
- public function get objectEncoding(): uint {
- stub_getter("flash.net.NetStream", "objectEncoding");
- return 0;
- };
-
- public function get peerStreams(): Array {
- stub_getter("flash.net.NetStream", "peerStreams");
- return [];
- };
-
- public function get soundTransform(): flash.media.SoundTransform {
- stub_getter("flash.net.NetStream", "soundTransform");
- return new flash.media.SoundTransform();
- };
-
- public function set soundTransform(tf:flash.media.SoundTransform) {
- stub_setter("flash.net.NetStream", "soundTransform");
- };
-
- public native function get time(): Number;
-
- public function get useHardwareDecoder(): Boolean {
- stub_getter("flash.net.NetStream", "useHardwareDecoder");
- return true;
- };
-
- public function set useHardwareDecoder(dec:Boolean) {
- stub_setter("flash.net.NetStream", "useHardwareDecoder");
- };
-
- [API("680")]
- public function get useJitterBuffer(): Boolean {
- stub_getter("flash.net.NetStream", "useJitterBuffer");
- return false;
- };
-
- [API("680")]
- public function set useJitterBuffer(jbuf:Boolean) {
- stub_setter("flash.net.NetStream", "useJitterBuffer");
- };
-
- public function get videoReliable(): Boolean {
- stub_getter("flash.net.NetStream", "videoReliable");
- return false;
- };
-
- public function set videoReliable(isReliable:Boolean) {
- stub_setter("flash.net.NetStream", "videoReliable");
- };
-
- public function get videoSampleAccess():Boolean {
- stub_getter("flash.net.NetStream", "videoSampleAccess");
- return false;
- };
-
- public function set videoSampleAccess(isReadable:Boolean) {
- stub_setter("flash.net.NetStream", "videoSampleAccess");
- };
-
- [API("674")]
- public function get videoStreamSettings(): VideoStreamSettings {
- stub_getter("flash.net.NetStream", "videoStreamSettings");
- return null;
- };
-
- [API("674")]
- public function set videoStreamSettings(settings: VideoStreamSettings) {
- stub_setter("flash.net.NetStream", "videoStreamSettings");
- };
- }
+package flash.net
+{
+ import flash.net.NetConnection;
+ import flash.net.NetStreamPlayOptions;
+ import flash.net.NetStreamInfo;
+ import flash.events.EventDispatcher;
+ import flash.utils.ByteArray;
+ import flash.media.Microphone;
+ import flash.media.Camera;
+ import flash.media.VideoStreamSettings;
+
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+
+ [Ruffle(InstanceAllocator)]
+ public class NetStream extends EventDispatcher
+ {
+ public static const CONNECT_TO_FMS:String = "connectToFMS";
+ public static const DIRECT_CONNECTIONS:String = "directConnections";
+
+ public function NetStream(connection:NetConnection, peer:String = CONNECT_TO_FMS)
+ {
+
+ }
+
+ public function appendBytes(bytes:ByteArray)
+ {
+ stub_method("flash.net.NetStream", "appendBytes");
+ }
+
+ public function appendBytesAction(action:String)
+ {
+ stub_method("flash.net.NetStream", "appendBytesAction");
+ }
+
+ public function attach(connection:NetConnection)
+ {
+ stub_method("flash.net.NetStream", "attach");
+ }
+
+ public function attachAudio(mic:Microphone)
+ {
+ stub_method("flash.net.NetStream", "attachAudio");
+ }
+
+ public function attachCamera(cam:Camera, ms:int = -1)
+ {
+ stub_method("flash.net.NetStream", "attachCamera");
+ }
+
+ public function close()
+ {
+ stub_method("flash.net.NetStream", "close");
+ }
+
+ [API("674")]
+ public function dispose()
+ {
+ stub_method("flash.net.NetStream", "dispose");
+ }
+
+ public native function pause();
+
+ public native function play(...args);
+
+ public function play2(param:NetStreamPlayOptions)
+ {
+ stub_method("flash.net.NetStream", "play2");
+ }
+
+ [API("663")]
+ public function preloadEmbeddedData(param:NetStreamPlayOptions)
+ {
+ stub_method("flash.net.NetStream", "preloadEmbeddedData");
+ }
+
+ public function publish(name:String = null, type:String = null)
+ {
+ stub_method("flash.net.NetStream", "publish");
+ }
+
+ public function receiveAudio(flag:Boolean)
+ {
+ stub_method("flash.net.NetStream", "receiveAudio");
+ }
+
+ public function receiveVideo(flag:Boolean)
+ {
+ stub_method("flash.net.NetStream", "receiveVideo");
+ }
+
+ public function receiveVideoFPS(fps:Number)
+ {
+ stub_method("flash.net.NetStream", "receiveVideoFPS");
+ }
+
+ [API("690")]
+ public static function resetDRMVouchers()
+ {
+ stub_method("flash.net.NetStream", "resetDRMVouchers");
+ }
+
+ public native function resume();
+
+ public native function seek(offset:Number);
+
+ public function send(handlerName:String, ...args)
+ {
+ stub_method("flash.net.NetStream", "send");
+ }
+
+ [API("661")]
+ public function setDRMAuthenticationCredentials(userName:String, password:String, type:String)
+ {
+ stub_method("flash.net.NetStream", "setDRMAuthenticationCredentials");
+ }
+
+ public function step(frames:int)
+ {
+ stub_method("flash.net.NetStream", "step");
+ }
+
+ public native function togglePause();
+
+ public function get audioReliable():Boolean
+ {
+ stub_getter("flash.net.NetStream", "audioReliable");
+ return false;
+ }
+
+ public function set audioReliable(isReliable:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "audioReliable");
+ }
+
+ public function get audioSampleAccess():Boolean
+ {
+ stub_getter("flash.net.NetStream", "audioSampleAccess");
+ return false;
+ }
+
+ public function set audioSampleAccess(isAccessible:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "audioSampleAccess");
+ }
+
+ public function get backBufferLength():Number
+ {
+ stub_getter("flash.net.NetStream", "backBufferLength");
+ return 0.0;
+ }
+
+ public function get backBufferTime():Number
+ {
+ stub_getter("flash.net.NetStream", "backBufferTime");
+ return 0.0;
+ }
+
+ public function set backBufferTime(time:Number)
+ {
+ stub_setter("flash.net.NetStream", "backBufferTime");
+ }
+
+ public function get bufferLength():Number
+ {
+ stub_getter("flash.net.NetStream", "bufferLength");
+ return 0.0;
+ }
+
+ public function get bufferTime():Number
+ {
+ stub_getter("flash.net.NetStream", "bufferTime");
+ return 0.0;
+ }
+
+ public function set bufferTime(time:Number)
+ {
+ stub_setter("flash.net.NetStream", "bufferTime");
+ }
+
+ public function get bufferTimeMax():Number
+ {
+ stub_getter("flash.net.NetStream", "bufferTimeMax");
+ return 0.0;
+ }
+
+ public function set bufferTimeMax(time:Number)
+ {
+ stub_setter("flash.net.NetStream", "bufferTimeMax");
+ }
+
+ public native function get bytesLoaded():uint;
+
+ public native function get bytesTotal():uint;
+
+ public function get checkPolicyFile():Boolean
+ {
+ stub_getter("flash.net.NetStream", "checkPolicyFile");
+ return false;
+ }
+
+ public function set checkPolicyFile(doCheck:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "checkPolicyFile");
+ }
+
+ public native function get client():Object;
+
+ public native function set client(client:Object);
+
+ public function get currentFPS():Number
+ {
+ stub_getter("flash.net.NetStream", "currentFPS");
+ return 0.0;
+ }
+
+ public function get dataReliable():Boolean
+ {
+ stub_getter("flash.net.NetStream", "dataReliable");
+ return false;
+ }
+
+ public function set dataReliable(isReliable:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "dataReliable");
+ }
+
+ public function get farID():String
+ {
+ stub_getter("flash.net.NetStream", "farID");
+ return "";
+ }
+
+ public function get farNonce():String
+ {
+ stub_getter("flash.net.NetStream", "farNonce");
+ return "";
+ }
+
+ public function get inBufferSeek():Boolean
+ {
+ stub_getter("flash.net.NetStream", "inBufferSeek");
+ return false;
+ }
+
+ public function set inBufferSeek(isInBuffer:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "inBufferSeek");
+ }
+
+ public function get info():NetStreamInfo
+ {
+ stub_getter("flash.net.NetStream", "info");
+ return new NetStreamInfo();
+ }
+
+ public function get liveDelay():Number
+ {
+ stub_getter("flash.net.NetStream", "liveDelay");
+ return 0;
+
+ };
+
+ public function get maxPauseBufferTime():Number
+ {
+ stub_getter("flash.net.NetStream", "maxPauseBufferTime");
+ return 0;
+ };
+
+ public function set maxPauseBufferTime(time:Number)
+ {
+ stub_setter("flash.net.NetStream", "maxPauseBufferTime");
+ };
+
+ public function get multicastAvailabilitySendToAll():Boolean
+ {
+ stub_getter("flash.net.NetStream", "multicastAvailabilitySendToAll");
+ return false;
+ };
+
+ public function set multicastAvailabilitySendToAll(toAll:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "multicastAvailabilitySendToAll");
+ };
+
+ public function get multicastAvailabilityUpdatePeriod():Number
+ {
+ stub_getter("flash.net.NetStream", "multicastAvailabilityUpdatePeriod");
+ return 0;
+ };
+
+ public function set multicastAvailabilityUpdatePeriod(period:Number)
+ {
+ stub_setter("flash.net.NetStream", "multicastAvailabilityUpdatePeriod");
+ };
+
+ public function get multicastFetchPeriod():Number
+ {
+ stub_getter("flash.net.NetStream", "multicastFetchPeriod");
+ return 0;
+ };
+
+ public function set multicastFetchPeriod(period:Number)
+ {
+ stub_setter("flash.net.NetStream", "multicastFetchPeriod");
+ };
+
+ public function get multicastInfo():NetStreamMulticastInfo
+ {
+ stub_getter("flash.net.NetStream", "multicastInfo");
+ return new NetStreamMulticastInfo();
+ };
+
+ public function get multicastPushNeighborLimit():Number
+ {
+ stub_getter("flash.net.NetStream", "multicastPushNeighborLimit");
+ return 0;
+ };
+
+ public function set multicastPushNeighborLimit(limit:Number)
+ {
+ stub_setter("flash.net.NetStream", "multicastPushNeighborLimit");
+ };
+
+ public function get multicastRelayMarginDuration():Number
+ {
+ stub_getter("flash.net.NetStream", "multicastRelayMarginDuration");
+ return 0;
+ };
+
+ public function set multicastRelayMarginDuration(dur:Number)
+ {
+ stub_setter("flash.net.NetStream", "multicastRelayMarginDuration");
+ };
+
+ public function get multicastWindowDuration():Number
+ {
+ stub_getter("flash.net.NetStream", "multicastWindowDuration");
+ return 0;
+
+ };
+
+ public function set multicastWindowDuration(dur:Number)
+ {
+ stub_setter("flash.net.NetStream", "multicastWindowDuration");
+ };
+
+ public function get nearNonce():String
+ {
+ stub_getter("flash.net.NetStream", "nearNonce");
+ return "";
+ };
+
+ public function get objectEncoding():uint
+ {
+ stub_getter("flash.net.NetStream", "objectEncoding");
+ return 0;
+ };
+
+ public function get peerStreams():Array
+ {
+ stub_getter("flash.net.NetStream", "peerStreams");
+ return [];
+ };
+
+ public function get soundTransform():flash.media.SoundTransform
+ {
+ stub_getter("flash.net.NetStream", "soundTransform");
+ return new flash.media.SoundTransform();
+ };
+
+ public function set soundTransform(tf:flash.media.SoundTransform)
+ {
+ stub_setter("flash.net.NetStream", "soundTransform");
+ };
+
+ public native function get time():Number;
+
+ public function get useHardwareDecoder():Boolean
+ {
+ stub_getter("flash.net.NetStream", "useHardwareDecoder");
+ return true;
+ };
+
+ public function set useHardwareDecoder(dec:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "useHardwareDecoder");
+ };
+
+ [API("680")]
+ public function get useJitterBuffer():Boolean
+ {
+ stub_getter("flash.net.NetStream", "useJitterBuffer");
+ return false;
+ };
+
+ [API("680")]
+ public function set useJitterBuffer(jbuf:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "useJitterBuffer");
+ };
+
+ public function get videoReliable():Boolean
+ {
+ stub_getter("flash.net.NetStream", "videoReliable");
+ return false;
+ };
+
+ public function set videoReliable(isReliable:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "videoReliable");
+ };
+
+ public function get videoSampleAccess():Boolean
+ {
+ stub_getter("flash.net.NetStream", "videoSampleAccess");
+ return false;
+ };
+
+ public function set videoSampleAccess(isReadable:Boolean)
+ {
+ stub_setter("flash.net.NetStream", "videoSampleAccess");
+ };
+
+ [API("674")]
+ public function get videoStreamSettings():VideoStreamSettings
+ {
+ stub_getter("flash.net.NetStream", "videoStreamSettings");
+ return null;
+ };
+
+ [API("674")]
+ public function set videoStreamSettings(settings:VideoStreamSettings)
+ {
+ stub_setter("flash.net.NetStream", "videoStreamSettings");
+ };
+ }
}
diff --git a/core/src/avm2/globals/flash/net/NetStreamInfo.as b/core/src/avm2/globals/flash/net/NetStreamInfo.as
index fb3951ab6aa9..40688652b3ca 100644
--- a/core/src/avm2/globals/flash/net/NetStreamInfo.as
+++ b/core/src/avm2/globals/flash/net/NetStreamInfo.as
@@ -1,110 +1,138 @@
-package flash.net {
- public final class NetStreamInfo {
- private var _audioBufferByteLength: Number;
- private var _audioBufferLength: Number;
- private var _audioByteCount: Number;
- private var _audioBytesPerSecond: Number;
- private var _audioLossRate: Number;
- private var _byteCount: Number;
- private var _currentBytesPerSecond: Number;
- private var _dataBufferByteLength: Number;
- private var _dataBufferLength: Number;
- private var _dataByteCount: Number;
- private var _dataBytesPerSecond: Number;
- private var _droppedFrames: Number;
- private var _isLive: Boolean;
- private var _maxBytesPerSecond: Number;
- private var _metaData: Object;
- private var _playbackBytesPerSecond: Number;
- private var _resourceName: String;
- private var _SRTT: Number;
- private var _uri: String;
- private var _videoBufferByteLength: Number;
- private var _videoBufferLength: Number;
- private var _videoByteCount: Number;
- private var _videoBytesPerSecond: Number;
- private var _videoLossRate: Number;
- private var _xmpData: Object;
+package flash.net
+{
+ public final class NetStreamInfo
+ {
+ private var _audioBufferByteLength:Number;
+ private var _audioBufferLength:Number;
+ private var _audioByteCount:Number;
+ private var _audioBytesPerSecond:Number;
+ private var _audioLossRate:Number;
+ private var _byteCount:Number;
+ private var _currentBytesPerSecond:Number;
+ private var _dataBufferByteLength:Number;
+ private var _dataBufferLength:Number;
+ private var _dataByteCount:Number;
+ private var _dataBytesPerSecond:Number;
+ private var _droppedFrames:Number;
+ private var _isLive:Boolean;
+ private var _maxBytesPerSecond:Number;
+ private var _metaData:Object;
+ private var _playbackBytesPerSecond:Number;
+ private var _resourceName:String;
+ private var _SRTT:Number;
+ private var _uri:String;
+ private var _videoBufferByteLength:Number;
+ private var _videoBufferLength:Number;
+ private var _videoByteCount:Number;
+ private var _videoBytesPerSecond:Number;
+ private var _videoLossRate:Number;
+ private var _xmpData:Object;
- public function toString():String {
- __ruffle__.stub_method("flash.net.NetStreamInfo", "toString")
- return super.toString();
- }
+ public function toString():String
+ {
+ __ruffle__.stub_method("flash.net.NetStreamInfo", "toString");
+ return super.toString();
+ }
- public function get audioBufferByteLength(): Number {
- return this._audioBufferByteLength;
- };
- public function get audioBufferLength(): Number {
- return this._audioBufferLength;
- };
- public function get audioByteCount(): Number {
- return this._audioByteCount;
- };
- public function get audioBytesPerSecond(): Number {
- return this._audioBytesPerSecond;
- };
- public function get audioLossRate(): Number {
- return this._audioLossRate;
- };
- public function get byteCount(): Number {
- return this._byteCount;
- };
- public function get currentBytesPerSecond(): Number {
- return this._currentBytesPerSecond;
- };
- public function get dataBufferByteLength(): Number {
- return this._dataBufferByteLength;
- };
- public function get dataBufferLength(): Number {
- return this._dataBufferLength;
- };
- public function get dataByteCount(): Number {
- return this._dataByteCount;
- };
- public function get dataBytesPerSecond(): Number {
- return this._dataBytesPerSecond;
- };
- public function get droppedFrames(): Number {
- return this._droppedFrames;
- };
- public function get isLive():Boolean {
- return this._isLive;
- };
- public function get maxBytesPerSecond(): Number {
- return this._maxBytesPerSecond;
- };
- public function get metaData(): Object {
- return this._metaData;
- };
- public function get playbackBytesPerSecond(): Number {
- return this._playbackBytesPerSecond;
- };
- public function get resourceName(): String {
- return this._resourceName;
- };
- public function get SRTT(): Number {
- return this._SRTT;
- };
- public function get uri(): String {
- return this._uri;
- };
- public function get videoBufferByteLength(): Number {
- return this._videoBufferByteLength;
- };
- public function get videoBufferLength(): Number {
- return this._videoBufferLength;
- };
- public function get videoByteCount(): Number {
- return this._videoByteCount;
- };
- public function get videoBytesPerSecond(): Number {
- return this._videoBytesPerSecond;
- };
- public function get videoLossRate(): Number {
- return this._videoLossRate;
- };
- public function get xmpData(): Object {
- return this._xmpData;
- };
- }
+ public function get audioBufferByteLength():Number
+ {
+ return this._audioBufferByteLength;
+ };
+ public function get audioBufferLength():Number
+ {
+ return this._audioBufferLength;
+ };
+ public function get audioByteCount():Number
+ {
+ return this._audioByteCount;
+ };
+ public function get audioBytesPerSecond():Number
+ {
+ return this._audioBytesPerSecond;
+ };
+ public function get audioLossRate():Number
+ {
+ return this._audioLossRate;
+ };
+ public function get byteCount():Number
+ {
+ return this._byteCount;
+ };
+ public function get currentBytesPerSecond():Number
+ {
+ return this._currentBytesPerSecond;
+ };
+ public function get dataBufferByteLength():Number
+ {
+ return this._dataBufferByteLength;
+ };
+ public function get dataBufferLength():Number
+ {
+ return this._dataBufferLength;
+ };
+ public function get dataByteCount():Number
+ {
+ return this._dataByteCount;
+ };
+ public function get dataBytesPerSecond():Number
+ {
+ return this._dataBytesPerSecond;
+ };
+ public function get droppedFrames():Number
+ {
+ return this._droppedFrames;
+ };
+ public function get isLive():Boolean
+ {
+ return this._isLive;
+ };
+ public function get maxBytesPerSecond():Number
+ {
+ return this._maxBytesPerSecond;
+ };
+ public function get metaData():Object
+ {
+ return this._metaData;
+ };
+ public function get playbackBytesPerSecond():Number
+ {
+ return this._playbackBytesPerSecond;
+ };
+ public function get resourceName():String
+ {
+ return this._resourceName;
+ };
+ public function get SRTT():Number
+ {
+ return this._SRTT;
+ };
+ public function get uri():String
+ {
+ return this._uri;
+ };
+ public function get videoBufferByteLength():Number
+ {
+ return this._videoBufferByteLength;
+ };
+ public function get videoBufferLength():Number
+ {
+ return this._videoBufferLength;
+ };
+ public function get videoByteCount():Number
+ {
+ return this._videoByteCount;
+ };
+ public function get videoBytesPerSecond():Number
+ {
+ return this._videoBytesPerSecond;
+ };
+ public function get videoLossRate():Number
+ {
+ return this._videoLossRate;
+ };
+ public function get xmpData():Object
+ {
+ return this._xmpData;
+ };
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as b/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as
index 0a1aba15f9b8..aab65fb1fc2e 100644
--- a/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as
+++ b/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as
@@ -1,106 +1,128 @@
-package flash.net {
- public final class NetStreamMulticastInfo {
- private var _bytesPushedFromPeers : Number;
- private var _bytesPushedToPeers : Number;
- private var _bytesReceivedFromIPMulticast : Number;
- private var _bytesReceivedFromServer : Number;
- private var _bytesRequestedByPeers : Number;
- private var _bytesRequestedFromPeers : Number;
- private var _fragmentsPushedFromPeers : Number;
- private var _fragmentsPushedToPeers : Number;
- private var _fragmentsReceivedFromIPMulticast : Number;
- private var _fragmentsReceivedFromServer : Number;
- private var _fragmentsRequestedByPeers : Number;
- private var _fragmentsRequestedFromPeers : Number;
- private var _receiveControlBytesPerSecond : Number;
- private var _receiveDataBytesPerSecond : Number;
- private var _receiveDataBytesPerSecondFromIPMulticast : Number;
- private var _receiveDataBytesPerSecondFromServer : Number;
- private var _sendControlBytesPerSecond : Number;
- private var _sendControlBytesPerSecondToServer : Number;
- private var _sendDataBytesPerSecond : Number;
-
- public function toString():String {
- __ruffle__.stub_method("flash.net.NetStreamMulticastInfo", "toString");
-
- return "";
- }
-
- public function get bytesPushedFromPeers() : Number {
- return this._bytesPushedFromPeers;
- };
-
- public function get bytesPushedToPeers() : Number {
- return this._bytesPushedToPeers;
- };
-
- public function get bytesReceivedFromIPMulticast() : Number {
- return this._bytesReceivedFromIPMulticast;
- };
-
- public function get bytesReceivedFromServer() : Number {
- return this._bytesReceivedFromServer;
- };
-
- public function get bytesRequestedByPeers() : Number {
- return this._bytesRequestedByPeers;
- };
-
- public function get bytesRequestedFromPeers() : Number {
- return this._bytesRequestedFromPeers;
- };
-
- public function get fragmentsPushedFromPeers() : Number {
- return this._fragmentsPushedFromPeers;
- };
-
- public function get fragmentsPushedToPeers() : Number {
- return this._fragmentsPushedToPeers;
- };
-
- public function get fragmentsReceivedFromIPMulticast() : Number {
- return this._fragmentsReceivedFromIPMulticast;
- };
-
- public function get fragmentsReceivedFromServer() : Number {
- return this._fragmentsReceivedFromServer;
- };
-
- public function get fragmentsRequestedByPeers() : Number {
- return this._fragmentsRequestedByPeers;
- };
-
- public function get fragmentsRequestedFromPeers() : Number {
- return this._fragmentsRequestedFromPeers;
- };
-
- public function get receiveControlBytesPerSecond() : Number {
- return this._receiveControlBytesPerSecond;
- };
-
- public function get receiveDataBytesPerSecond() : Number {
- return this._receiveDataBytesPerSecond;
- };
-
- public function get receiveDataBytesPerSecondFromIPMulticast() : Number {
- return this._receiveDataBytesPerSecondFromIPMulticast;
- };
-
- public function get receiveDataBytesPerSecondFromServer() : Number {
- return this._receiveDataBytesPerSecondFromServer;
- };
-
- public function get sendControlBytesPerSecond() : Number {
- return this._sendControlBytesPerSecond;
- };
-
- public function get sendControlBytesPerSecondToServer() : Number {
- return this._sendControlBytesPerSecondToServer;
- };
-
- public function get sendDataBytesPerSecond() : Number {
- return this._sendDataBytesPerSecond;
- };
-
- }
+package flash.net
+{
+ public final class NetStreamMulticastInfo
+ {
+ private var _bytesPushedFromPeers:Number;
+ private var _bytesPushedToPeers:Number;
+ private var _bytesReceivedFromIPMulticast:Number;
+ private var _bytesReceivedFromServer:Number;
+ private var _bytesRequestedByPeers:Number;
+ private var _bytesRequestedFromPeers:Number;
+ private var _fragmentsPushedFromPeers:Number;
+ private var _fragmentsPushedToPeers:Number;
+ private var _fragmentsReceivedFromIPMulticast:Number;
+ private var _fragmentsReceivedFromServer:Number;
+ private var _fragmentsRequestedByPeers:Number;
+ private var _fragmentsRequestedFromPeers:Number;
+ private var _receiveControlBytesPerSecond:Number;
+ private var _receiveDataBytesPerSecond:Number;
+ private var _receiveDataBytesPerSecondFromIPMulticast:Number;
+ private var _receiveDataBytesPerSecondFromServer:Number;
+ private var _sendControlBytesPerSecond:Number;
+ private var _sendControlBytesPerSecondToServer:Number;
+ private var _sendDataBytesPerSecond:Number;
+
+ public function toString():String
+ {
+ __ruffle__.stub_method("flash.net.NetStreamMulticastInfo", "toString");
+
+ return "";
+ }
+
+ public function get bytesPushedFromPeers():Number
+ {
+ return this._bytesPushedFromPeers;
+ };
+
+ public function get bytesPushedToPeers():Number
+ {
+ return this._bytesPushedToPeers;
+ };
+
+ public function get bytesReceivedFromIPMulticast():Number
+ {
+ return this._bytesReceivedFromIPMulticast;
+ };
+
+ public function get bytesReceivedFromServer():Number
+ {
+ return this._bytesReceivedFromServer;
+ };
+
+ public function get bytesRequestedByPeers():Number
+ {
+ return this._bytesRequestedByPeers;
+ };
+
+ public function get bytesRequestedFromPeers():Number
+ {
+ return this._bytesRequestedFromPeers;
+ };
+
+ public function get fragmentsPushedFromPeers():Number
+ {
+ return this._fragmentsPushedFromPeers;
+ };
+
+ public function get fragmentsPushedToPeers():Number
+ {
+ return this._fragmentsPushedToPeers;
+ };
+
+ public function get fragmentsReceivedFromIPMulticast():Number
+ {
+ return this._fragmentsReceivedFromIPMulticast;
+ };
+
+ public function get fragmentsReceivedFromServer():Number
+ {
+ return this._fragmentsReceivedFromServer;
+ };
+
+ public function get fragmentsRequestedByPeers():Number
+ {
+ return this._fragmentsRequestedByPeers;
+ };
+
+ public function get fragmentsRequestedFromPeers():Number
+ {
+ return this._fragmentsRequestedFromPeers;
+ };
+
+ public function get receiveControlBytesPerSecond():Number
+ {
+ return this._receiveControlBytesPerSecond;
+ };
+
+ public function get receiveDataBytesPerSecond():Number
+ {
+ return this._receiveDataBytesPerSecond;
+ };
+
+ public function get receiveDataBytesPerSecondFromIPMulticast():Number
+ {
+ return this._receiveDataBytesPerSecondFromIPMulticast;
+ };
+
+ public function get receiveDataBytesPerSecondFromServer():Number
+ {
+ return this._receiveDataBytesPerSecondFromServer;
+ };
+
+ public function get sendControlBytesPerSecond():Number
+ {
+ return this._sendControlBytesPerSecond;
+ };
+
+ public function get sendControlBytesPerSecondToServer():Number
+ {
+ return this._sendControlBytesPerSecondToServer;
+ };
+
+ public function get sendDataBytesPerSecond():Number
+ {
+ return this._sendDataBytesPerSecond;
+ };
+
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as
index 88e2a787e902..e46c0d55d8c2 100644
--- a/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as
+++ b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as
@@ -5,26 +5,26 @@
package flash.net
{
- import flash.events.EventDispatcher;
+ import flash.events.EventDispatcher;
- public dynamic class NetStreamPlayOptions extends EventDispatcher
- {
- // The duration of playback, in seconds, for the stream specified in streamName.
- public var len: Number = -1;
+ public dynamic class NetStreamPlayOptions extends EventDispatcher
+ {
+ // The duration of playback, in seconds, for the stream specified in streamName.
+ public var len:Number = -1;
- // The absolute stream time at which the server switches between streams of different bitrates for Flash Media Server dynamic streaming.
- public var offset: Number = -1;
+ // The absolute stream time at which the server switches between streams of different bitrates for Flash Media Server dynamic streaming.
+ public var offset:Number = -1;
- // The name of the old stream or the stream to transition from.
- public var oldStreamName: String;
+ // The name of the old stream or the stream to transition from.
+ public var oldStreamName:String;
- // The start time, in seconds, for streamName.
- public var start: Number = -2;
+ // The start time, in seconds, for streamName.
+ public var start:Number = -2;
- // The name of the new stream to transition to or to play.
- public var streamName: String;
+ // The name of the new stream to transition to or to play.
+ public var streamName:String;
- // The mode in which streamName is played or transitioned to.
- public var transition: String;
- }
+ // The mode in which streamName is played or transitioned to.
+ public var transition:String;
+ }
}
diff --git a/core/src/avm2/globals/flash/net/ObjectEncoding.as b/core/src/avm2/globals/flash/net/ObjectEncoding.as
index 9d6ac2b12d9b..965e25ebc67e 100644
--- a/core/src/avm2/globals/flash/net/ObjectEncoding.as
+++ b/core/src/avm2/globals/flash/net/ObjectEncoding.as
@@ -1,13 +1,15 @@
-package flash.net {
- public final class ObjectEncoding {
- public static const AMF0: uint = 0;
+package flash.net
+{
+ public final class ObjectEncoding
+ {
+ public static const AMF0:uint = 0;
- public static const AMF3: uint = 3;
+ public static const AMF3:uint = 3;
- public static const DEFAULT: uint = 3;
+ public static const DEFAULT:uint = 3;
- public static native function get dynamicPropertyWriter(): IDynamicPropertyWriter;
+ public static native function get dynamicPropertyWriter():IDynamicPropertyWriter;
- public static native function set dynamicPropertyWriter(value: IDynamicPropertyWriter): void;
- }
+ public static native function set dynamicPropertyWriter(value:IDynamicPropertyWriter):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/net/Responder.as b/core/src/avm2/globals/flash/net/Responder.as
index b956d705ec73..06a86b58abdd 100644
--- a/core/src/avm2/globals/flash/net/Responder.as
+++ b/core/src/avm2/globals/flash/net/Responder.as
@@ -1,10 +1,13 @@
-package flash.net {
-[Ruffle(InstanceAllocator)]
- public class Responder {
- public function Responder(result:Function, status:Function = null) {
- init(result, status);
- }
+package flash.net
+{
+ [Ruffle(InstanceAllocator)]
+ public class Responder
+ {
+ public function Responder(result:Function, status:Function = null)
+ {
+ init(result, status);
+ }
- private native function init(result:Function, status:Function = null):void;
- }
+ private native function init(result:Function, status:Function = null):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/net/SharedObject.as b/core/src/avm2/globals/flash/net/SharedObject.as
index 0f8450c9b945..c79e073cc70c 100644
--- a/core/src/avm2/globals/flash/net/SharedObject.as
+++ b/core/src/avm2/globals/flash/net/SharedObject.as
@@ -1,36 +1,40 @@
-package flash.net {
- import flash.events.EventDispatcher;
- import __ruffle__.stub_method;
-
- namespace ruffle = "__ruffle__";
-
- [Ruffle(InstanceAllocator)]
- public class SharedObject extends EventDispatcher {
- public function SharedObject() {
- // Unreachable; the allocator always throws
- }
-
- // NOTE: We currently always use AMF3 serialization.
- // If you implement the `defaultObjectEncoding` or `objectEncoding`,
- // you will need to adjust the serialization and deserialization code
- // to work with AMF0.
-
- public static native function getLocal(name:String, localPath:String = null, secure:Boolean = false): SharedObject;
-
- public native function get size() : uint;
- public native function get objectEncoding() : uint;
- public native function set objectEncoding(value:uint) : void;
-
- public native function flush(minDiskSpace:int = 0) : String;
- public native function close() : void;
- public native function clear() : void;
-
- public function setProperty(propertyName:String, value:Object = null):void {
- this.data[propertyName] = value;
- // This should also mark remote SharedObjects as dirty,
- // but we don't support them yet
- }
-
- public native function get data():Object;
- }
+package flash.net
+{
+ import flash.events.EventDispatcher;
+ import __ruffle__.stub_method;
+
+ namespace ruffle = "__ruffle__";
+
+ [Ruffle(InstanceAllocator)]
+ public class SharedObject extends EventDispatcher
+ {
+ public function SharedObject()
+ {
+ // Unreachable; the allocator always throws
+ }
+
+ // NOTE: We currently always use AMF3 serialization.
+ // If you implement the `defaultObjectEncoding` or `objectEncoding`,
+ // you will need to adjust the serialization and deserialization code
+ // to work with AMF0.
+
+ public static native function getLocal(name:String, localPath:String = null, secure:Boolean = false):SharedObject;
+
+ public native function get size():uint;
+ public native function get objectEncoding():uint;
+ public native function set objectEncoding(value:uint):void;
+
+ public native function flush(minDiskSpace:int = 0):String;
+ public native function close():void;
+ public native function clear():void;
+
+ public function setProperty(propertyName:String, value:Object = null):void
+ {
+ this.data[propertyName] = value;
+ // This should also mark remote SharedObjects as dirty,
+ // but we don't support them yet
+ }
+
+ public native function get data():Object;
+ }
}
diff --git a/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as b/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as
index 2285ec9d1b01..e0e9e7caeae3 100644
--- a/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as
+++ b/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as
@@ -1,6 +1,8 @@
-package flash.net {
- public final class SharedObjectFlushStatus {
- public static const FLUSHED: String = "flushed";
- public static const PENDING: String = "pending";
- }
+package flash.net
+{
+ public final class SharedObjectFlushStatus
+ {
+ public static const FLUSHED:String = "flushed";
+ public static const PENDING:String = "pending";
+ }
}
diff --git a/core/src/avm2/globals/flash/net/Socket.as b/core/src/avm2/globals/flash/net/Socket.as
index 2ba0bccf1a3d..046987291ce9 100644
--- a/core/src/avm2/globals/flash/net/Socket.as
+++ b/core/src/avm2/globals/flash/net/Socket.as
@@ -1,73 +1,78 @@
-package flash.net {
- import flash.events.EventDispatcher;
- import flash.utils.ByteArray;
- import flash.utils.Endian;
- import flash.utils.IDataInput;
- import flash.utils.IDataOutput;
+package flash.net
+{
+ import flash.events.EventDispatcher;
+ import flash.utils.ByteArray;
+ import flash.utils.Endian;
+ import flash.utils.IDataInput;
+ import flash.utils.IDataOutput;
- import __ruffle__.stub_getter;
+ import __ruffle__.stub_getter;
- [Ruffle(InstanceAllocator)]
- public class Socket extends EventDispatcher implements IDataOutput, IDataInput {
+ [Ruffle(InstanceAllocator)]
+ public class Socket extends EventDispatcher implements IDataOutput, IDataInput
+ {
- public function Socket(host:String = null, port:int = 0) {
- this.timeout = 20000;
- if (host != null) {
- this.connect(host, port);
- }
- }
+ public function Socket(host:String = null, port:int = 0)
+ {
+ this.timeout = 20000;
+ if (host != null)
+ {
+ this.connect(host, port);
+ }
+ }
- public native function connect(host: String, port: int):void;
+ public native function connect(host:String, port:int):void;
- public native function get timeout():uint;
- public native function set timeout(value:uint):void;
+ public native function get timeout():uint;
+ public native function set timeout(value:uint):void;
- public native function close():void;
+ public native function close():void;
- public native function get bytesAvailable():uint;
+ public native function get bytesAvailable():uint;
- [API("674")]
- public function get bytesPending():uint {
- stub_getter("flash.net.Socket", "bytesPending");
- return 0;
- }
+ [API("674")]
+ public function get bytesPending():uint
+ {
+ stub_getter("flash.net.Socket", "bytesPending");
+ return 0;
+ }
- public native function get endian():String;
- public native function set endian(value:String):void;
+ public native function get endian():String;
+ public native function set endian(value:String):void;
- public native function get connected():Boolean;
+ public native function get connected():Boolean;
- public native function get objectEncoding():uint;
- public native function set objectEncoding(value:uint):void;
+ public native function get objectEncoding():uint;
+ public native function set objectEncoding(value:uint):void;
- public native function flush():void;
+ public native function flush():void;
- public native function readBoolean():Boolean;
- public native function readByte():int;
- public native function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
- public native function readDouble():Number;
- public native function readFloat():Number;
- public native function readInt():int;
- public native function readMultiByte(length:uint, charSet:String):String;
- public native function readObject():*;
- public native function readShort():int;
- public native function readUnsignedByte():uint;
- public native function readUnsignedInt():uint;
- public native function readUnsignedShort():uint;
- public native function readUTF():String;
- public native function readUTFBytes(length:uint):String;
+ public native function readBoolean():Boolean;
+ public native function readByte():int;
+ public native function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
+ public native function readDouble():Number;
+ public native function readFloat():Number;
+ public native function readInt():int;
+ public native function readMultiByte(length:uint, charSet:String):String;
+ public native function readObject():*;
+ public native function readShort():int;
+ public native function readUnsignedByte():uint;
+ public native function readUnsignedInt():uint;
+ public native function readUnsignedShort():uint;
+ public native function readUTF():String;
+ public native function readUTFBytes(length:uint):String;
- public native function writeBoolean(value:Boolean):void;
- public native function writeByte(value:int):void;
- public native function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
- public native function writeDouble(value:Number):void;
- public native function writeFloat(value:Number):void;
- public native function writeInt(value:int):void;
- public native function writeMultiByte(value:String, charSet:String):void;
- public native function writeObject(value:*):void;
- public native function writeShort(value:int):void;
- public native function writeUnsignedInt(value:uint):void;
- public native function writeUTF(value:String):void;
- public native function writeUTFBytes(value:String):void;
- }
+ public native function writeBoolean(value:Boolean):void;
+ public native function writeByte(value:int):void;
+ public native function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
+ public native function writeDouble(value:Number):void;
+ public native function writeFloat(value:Number):void;
+ public native function writeInt(value:int):void;
+ public native function writeMultiByte(value:String, charSet:String):void;
+ public native function writeObject(value:*):void;
+ public native function writeShort(value:int):void;
+ public native function writeUnsignedInt(value:uint):void;
+ public native function writeUTF(value:String):void;
+ public native function writeUTFBytes(value:String):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/net/URLLoader.as b/core/src/avm2/globals/flash/net/URLLoader.as
index 8f9a3ba1e314..42efa09cfd3a 100644
--- a/core/src/avm2/globals/flash/net/URLLoader.as
+++ b/core/src/avm2/globals/flash/net/URLLoader.as
@@ -1,34 +1,42 @@
-package flash.net {
+package flash.net
+{
import flash.events.EventDispatcher;
import flash.net.URLRequest;
import __ruffle__.stub_method;
- public class URLLoader extends EventDispatcher {
- public var data: *;
- public var dataFormat: String = "text";
+ public class URLLoader extends EventDispatcher
+ {
+ public var data:*;
+ public var dataFormat:String = "text";
- public function URLLoader(request:URLRequest = null) {
- if (request != null) {
+ public function URLLoader(request:URLRequest = null)
+ {
+ if (request != null)
+ {
this.load(request);
}
}
// FIXME - this should be a normal property for consistency with Flash
- public function get bytesTotal():uint {
- if (this.data) {
+ public function get bytesTotal():uint
+ {
+ if (this.data)
+ {
return this.data.length;
}
return 0;
}
// FIXME - this should be a normal property for consistency with Flash
- public function get bytesLoaded():uint {
+ public function get bytesLoaded():uint
+ {
// TODO - update this as the download progresses
- return this.bytesTotal
+ return this.bytesTotal;
}
public native function load(request:URLRequest):void;
- public function close():void {
+ public function close():void
+ {
stub_method("flash.net.URLLoader", "close");
}
}
diff --git a/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as b/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as
index 7fdf67cd7c1b..1589d186316d 100644
--- a/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as
+++ b/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as
@@ -1,7 +1,9 @@
-package flash.net {
- public final class URLLoaderDataFormat {
- public static const TEXT: String = "text";
- public static const BINARY: String = "binary";
- public static const VARIABLES: String = "variables";
- }
+package flash.net
+{
+ public final class URLLoaderDataFormat
+ {
+ public static const TEXT:String = "text";
+ public static const BINARY:String = "binary";
+ public static const VARIABLES:String = "variables";
+ }
}
diff --git a/core/src/avm2/globals/flash/net/URLRequest.as b/core/src/avm2/globals/flash/net/URLRequest.as
index eea7374f5b2b..7895dd7e59d2 100644
--- a/core/src/avm2/globals/flash/net/URLRequest.as
+++ b/core/src/avm2/globals/flash/net/URLRequest.as
@@ -1,32 +1,38 @@
-package flash.net {
+package flash.net
+{
import __ruffle__.stub_getter;
import __ruffle__.stub_setter;
- public final class URLRequest {
+ public final class URLRequest
+ {
// NOTE - when implementing properties (e.g. `contentType`, `data`, etc.)
// be sure to also check for them in `URLLoader`
// FIXME - this should be a getter/setter for consistency with Flash
public var url:String;
- private var _contentType: String = "application/x-www-form-urlencoded"; // ignored
- private var _requestHeaders: Array = [];
+ private var _contentType:String = "application/x-www-form-urlencoded"; // ignored
+ private var _requestHeaders:Array = [];
public var digest:String;
private var _method:String = URLRequestMethod.GET;
private var _data:Object;
- public function URLRequest(url:String = null) {
+ public function URLRequest(url:String = null)
+ {
this.url = url;
}
- public function get method():String {
+ public function get method():String
+ {
return this._method;
}
- public function set method(value: String):void {
+ public function set method(value:String):void
+ {
// The method can apparently either be all upper or lower case, but not mixed.
- if (value !== "GET" && value !== "get" && value !== "POST" && value !== "post") {
+ if (value !== "GET" && value !== "get" && value !== "POST" && value !== "post")
+ {
throw new ArgumentError("Error #2008: Parameter method must be one of the accepted values.", 2008);
}
@@ -34,27 +40,33 @@ package flash.net {
this._method = value;
}
- public function get data():Object {
+ public function get data():Object
+ {
return this._data;
}
- public function set data(newData:Object):void {
+ public function set data(newData:Object):void
+ {
this._data = newData;
}
- public function set contentType(value:String):void {
+ public function set contentType(value:String):void
+ {
this._contentType = value;
}
- public function get contentType():String {
+ public function get contentType():String
+ {
return this._contentType;
}
- public function get requestHeaders():Array {
+ public function get requestHeaders():Array
+ {
return _requestHeaders;
}
- public function set requestHeaders(headers:Array):void {
+ public function set requestHeaders(headers:Array):void
+ {
_requestHeaders = headers;
}
diff --git a/core/src/avm2/globals/flash/net/URLRequestDefaults.as b/core/src/avm2/globals/flash/net/URLRequestDefaults.as
index 32945bec3239..5a940a064adf 100644
--- a/core/src/avm2/globals/flash/net/URLRequestDefaults.as
+++ b/core/src/avm2/globals/flash/net/URLRequestDefaults.as
@@ -5,110 +5,110 @@
package flash.net
{
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
-
- [API("661")]
- public class URLRequestDefaults
- {
- // The default setting for the authenticate property of URLRequest objects.
- public static var _authenticate: Boolean = true;
-
- // The default setting for the cacheResponse property of URLRequest objects.
- public static var _cacheResponse: Boolean = true;
-
- // The default setting for the followRedirects property of URLRequest objects.
- public static var _followRedirects: Boolean = true;
-
- // The default setting for the idleTimeout property of URLRequest objects and HTMLLoader objects.
- public static var _idleTimeout: Number = 0;
-
- // The default setting for the manageCookies property of URLRequest objects.
- public static var _manageCookies: Boolean = true;
-
- // The default setting for the useCache property of URLRequest objects.
- public static var _useCache: Boolean = true;
-
- // The default setting for the userAgent property of URLRequest objects.
- public static var _userAgent: String;
-
- // Sets default user and password credentials for a selected host.
- public static function setLoginCredentialsForHost(hostname:String, user:String, password:String):*
- {
- stub_method("flash.media.URLRequestDefaults", "setLoginCredentialsForHost");
- }
-
- public static function get authenticate():Boolean
- {
- return _authenticate;
- }
-
- public static function set authenticate(value:Boolean):void
- {
- _authenticate = value;
- }
-
- public static function get cacheResponse():Boolean
- {
- return _cacheResponse;
- }
-
- public static function set cacheResponse(value:Boolean):void
- {
- _cacheResponse = value;
- }
-
- public static function get followRedirects():Boolean
- {
- return _followRedirects;
- }
-
- public static function set followRedirects(value:Boolean):void
- {
- _followRedirects = value;
- }
-
- public static function get idleTimeout():Number
- {
- return _idleTimeout;
- }
-
- public static function set idleTimeout(value:Number):void
- {
- _idleTimeout = value;
- }
-
- public static function get manageCookies():Boolean
- {
- return _manageCookies;
- }
-
- public static function set manageCookies(value:Boolean):void
- {
- _manageCookies = value;
- }
-
- public static function get useCache():Boolean
- {
- return _useCache;
- }
-
- public static function set useCache(value:Boolean):void
- {
- _useCache = value;
- }
-
- public static function get userAgent():String
- {
- stub_getter("flash.net.URLRequestDefaults", "userAgent");
- return _userAgent;
- }
-
- public static function set userAgent(value:String):void
- {
- stub_setter("flash.net.URLRequestDefaults", "userAgent");
- _userAgent = value;
- }
- }
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+
+ [API("661")]
+ public class URLRequestDefaults
+ {
+ // The default setting for the authenticate property of URLRequest objects.
+ public static var _authenticate:Boolean = true;
+
+ // The default setting for the cacheResponse property of URLRequest objects.
+ public static var _cacheResponse:Boolean = true;
+
+ // The default setting for the followRedirects property of URLRequest objects.
+ public static var _followRedirects:Boolean = true;
+
+ // The default setting for the idleTimeout property of URLRequest objects and HTMLLoader objects.
+ public static var _idleTimeout:Number = 0;
+
+ // The default setting for the manageCookies property of URLRequest objects.
+ public static var _manageCookies:Boolean = true;
+
+ // The default setting for the useCache property of URLRequest objects.
+ public static var _useCache:Boolean = true;
+
+ // The default setting for the userAgent property of URLRequest objects.
+ public static var _userAgent:String;
+
+ // Sets default user and password credentials for a selected host.
+ public static function setLoginCredentialsForHost(hostname:String, user:String, password:String):*
+ {
+ stub_method("flash.media.URLRequestDefaults", "setLoginCredentialsForHost");
+ }
+
+ public static function get authenticate():Boolean
+ {
+ return _authenticate;
+ }
+
+ public static function set authenticate(value:Boolean):void
+ {
+ _authenticate = value;
+ }
+
+ public static function get cacheResponse():Boolean
+ {
+ return _cacheResponse;
+ }
+
+ public static function set cacheResponse(value:Boolean):void
+ {
+ _cacheResponse = value;
+ }
+
+ public static function get followRedirects():Boolean
+ {
+ return _followRedirects;
+ }
+
+ public static function set followRedirects(value:Boolean):void
+ {
+ _followRedirects = value;
+ }
+
+ public static function get idleTimeout():Number
+ {
+ return _idleTimeout;
+ }
+
+ public static function set idleTimeout(value:Number):void
+ {
+ _idleTimeout = value;
+ }
+
+ public static function get manageCookies():Boolean
+ {
+ return _manageCookies;
+ }
+
+ public static function set manageCookies(value:Boolean):void
+ {
+ _manageCookies = value;
+ }
+
+ public static function get useCache():Boolean
+ {
+ return _useCache;
+ }
+
+ public static function set useCache(value:Boolean):void
+ {
+ _useCache = value;
+ }
+
+ public static function get userAgent():String
+ {
+ stub_getter("flash.net.URLRequestDefaults", "userAgent");
+ return _userAgent;
+ }
+
+ public static function set userAgent(value:String):void
+ {
+ stub_setter("flash.net.URLRequestDefaults", "userAgent");
+ _userAgent = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/URLRequestHeader.as b/core/src/avm2/globals/flash/net/URLRequestHeader.as
index 570895376860..40a0d08c945e 100644
--- a/core/src/avm2/globals/flash/net/URLRequestHeader.as
+++ b/core/src/avm2/globals/flash/net/URLRequestHeader.as
@@ -1,11 +1,14 @@
-package flash.net {
- public final class URLRequestHeader {
- public var name: String;
- public var value: String;
+package flash.net
+{
+ public final class URLRequestHeader
+ {
+ public var name:String;
+ public var value:String;
- public function URLRequestHeader(name: String = "", value: String = "") {
- this.name = name;
- this.value = value;
- }
- }
+ public function URLRequestHeader(name:String = "", value:String = "")
+ {
+ this.name = name;
+ this.value = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/URLRequestMethod.as b/core/src/avm2/globals/flash/net/URLRequestMethod.as
index 92a59ea23afd..df619dd5133b 100644
--- a/core/src/avm2/globals/flash/net/URLRequestMethod.as
+++ b/core/src/avm2/globals/flash/net/URLRequestMethod.as
@@ -1,10 +1,12 @@
-package flash.net {
- public final class URLRequestMethod {
- public static const POST: String = "POST";
- public static const GET: String = "GET";
- public static const PUT: String = "PUT";
- public static const DELETE: String = "DELETE";
- public static const HEAD: String = "HEAD";
- public static const OPTIONS: String = "OPTIONS";
- }
+package flash.net
+{
+ public final class URLRequestMethod
+ {
+ public static const POST:String = "POST";
+ public static const GET:String = "GET";
+ public static const PUT:String = "PUT";
+ public static const DELETE:String = "DELETE";
+ public static const HEAD:String = "HEAD";
+ public static const OPTIONS:String = "OPTIONS";
+ }
}
diff --git a/core/src/avm2/globals/flash/net/URLStream.as b/core/src/avm2/globals/flash/net/URLStream.as
index a746949a367c..c88da5b08028 100644
--- a/core/src/avm2/globals/flash/net/URLStream.as
+++ b/core/src/avm2/globals/flash/net/URLStream.as
@@ -1,144 +1,180 @@
-package flash.net {
- import flash.events.Event;
- import flash.events.EventDispatcher;
- import flash.utils.Endian;
- import flash.utils.IDataInput;
- import flash.utils.ByteArray;
- import flash.events.Event;
- import flash.events.HTTPStatusEvent;
- import flash.events.IOErrorEvent;
- import flash.events.ProgressEvent;
- import flash.events.SecurityErrorEvent;
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
+package flash.net
+{
+ import flash.events.Event;
+ import flash.events.EventDispatcher;
+ import flash.utils.Endian;
+ import flash.utils.IDataInput;
+ import flash.utils.ByteArray;
+ import flash.events.Event;
+ import flash.events.HTTPStatusEvent;
+ import flash.events.IOErrorEvent;
+ import flash.events.ProgressEvent;
+ import flash.events.SecurityErrorEvent;
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
- public class URLStream extends EventDispatcher implements IDataInput {
- private var _endian:String = Endian.BIG_ENDIAN;
- private var _connected:Boolean = false;
+ public class URLStream extends EventDispatcher implements IDataInput
+ {
+ private var _endian:String = Endian.BIG_ENDIAN;
+ private var _connected:Boolean = false;
- // FIXME - we currently implement `URLStream` using a `URLLoader`,
- // which means that content can't actually be "streamed" (it becomes
- // available all at once when the entire download finishes).
- // We should write an actual "streaming" implementation that exposes
- // content as it comes in over the network, but this will require changes
- // to `NavigatorBackend`. See https://github.com/ruffle-rs/ruffle/pull/11046
- private var _loader:URLLoader = new URLLoader();
+ // FIXME - we currently implement `URLStream` using a `URLLoader`,
+ // which means that content can't actually be "streamed" (it becomes
+ // available all at once when the entire download finishes).
+ // We should write an actual "streaming" implementation that exposes
+ // content as it comes in over the network, but this will require changes
+ // to `NavigatorBackend`. See https://github.com/ruffle-rs/ruffle/pull/11046
+ private var _loader:URLLoader = new URLLoader();
- public function URLStream() {
- stub_constructor("flash.net.URLStream", "streaming support");
+ public function URLStream()
+ {
+ stub_constructor("flash.net.URLStream", "streaming support");
- this._loader.dataFormat = URLLoaderDataFormat.BINARY;
- var self = this;
+ this._loader.dataFormat = URLLoaderDataFormat.BINARY;
+ var self = this;
- this._loader.addEventListener(Event.OPEN, function(e:*):void {
- self.dispatchEvent(new Event(Event.OPEN));
- });
- this._loader.addEventListener(Event.COMPLETE, function(e:*):void {
- self._loader.data.endian = self._endian;
- self.dispatchEvent(new Event(Event.COMPLETE));
- });
- this._loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:*):void {
- self.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
- });
- this._loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(e:*):void {
- self.dispatchEvent(new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR));
- });
- this._loader.addEventListener(ProgressEvent.PROGRESS, function(e:*):void {
- self._loader.data.endian = self._endian;
- self.dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, e.bytesLoaded, e.bytesTotal));
- });
- this._loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, function(e:*):void {
- self.dispatchEvent(new HTTPStatusEvent(HTTPStatusEvent.HTTP_STATUS, false, false, e.status, e.redirected));
- });
- }
+ this._loader.addEventListener(Event.OPEN, function(e:*):void
+ {
+ self.dispatchEvent(new Event(Event.OPEN));
+ });
+ this._loader.addEventListener(Event.COMPLETE, function(e:*):void
+ {
+ self._loader.data.endian = self._endian;
+ self.dispatchEvent(new Event(Event.COMPLETE));
+ });
+ this._loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:*):void
+ {
+ self.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
+ });
+ this._loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(e:*):void
+ {
+ self.dispatchEvent(new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR));
+ });
+ this._loader.addEventListener(ProgressEvent.PROGRESS, function(e:*):void
+ {
+ self._loader.data.endian = self._endian;
+ self.dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, e.bytesLoaded, e.bytesTotal));
+ });
+ this._loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, function(e:*):void
+ {
+ self.dispatchEvent(new HTTPStatusEvent(HTTPStatusEvent.HTTP_STATUS, false, false, e.status, e.redirected));
+ });
+ }
- public function get bytesAvailable():uint {
- if (this._loader.data) {
- return this._loader.data.bytesAvailable;
- }
- return 0;
- }
+ public function get bytesAvailable():uint
+ {
+ if (this._loader.data)
+ {
+ return this._loader.data.bytesAvailable;
+ }
+ return 0;
+ }
- public function get connected():Boolean {
- return _connected;
- }
+ public function get connected():Boolean
+ {
+ return _connected;
+ }
- public function get endian():String {
- return _endian;
- }
+ public function get endian():String
+ {
+ return _endian;
+ }
- public function set endian(value:String):void {
- if (value === Endian.BIG_ENDIAN || value === Endian.LITTLE_ENDIAN) {
- this._endian = value;
- if (this._loader.data) {
- this._loader.data.endian = value;
- }
- } else {
- throw new ArgumentError("Error #2008: Parameter endian must be one of the accepted values.", 2008);
- }
- }
+ public function set endian(value:String):void
+ {
+ if (value === Endian.BIG_ENDIAN || value === Endian.LITTLE_ENDIAN)
+ {
+ this._endian = value;
+ if (this._loader.data)
+ {
+ this._loader.data.endian = value;
+ }
+ }
+ else
+ {
+ throw new ArgumentError("Error #2008: Parameter endian must be one of the accepted values.", 2008);
+ }
+ }
- public function load(request:URLRequest):void {
- this._loader.load(request);
- this._connected = true;
- }
+ public function load(request:URLRequest):void
+ {
+ this._loader.load(request);
+ this._connected = true;
+ }
- public function close():void {
- this._loader.close();
- this._connected = false;
- }
+ public function close():void
+ {
+ this._loader.close();
+ this._connected = false;
+ }
- public function get objectEncoding():uint {
- stub_getter("flash.net.URLStream", "objectEncoding");
- return 0;
- }
- public function set objectEncoding(value:uint):void {
- stub_setter("flash.net.URLStream", "objectEncoding");
- }
+ public function get objectEncoding():uint
+ {
+ stub_getter("flash.net.URLStream", "objectEncoding");
+ return 0;
+ }
+ public function set objectEncoding(value:uint):void
+ {
+ stub_setter("flash.net.URLStream", "objectEncoding");
+ }
- public function readBoolean():Boolean {
- return this._loader.data.readBoolean();
- }
- public function readByte():int {
- return this._loader.data.readByte();
- }
- public function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void {
- this._loader.data.readBytes(bytes, offset, length);
- }
- public function readDouble():Number {
- return this._loader.data.readDouble();
- }
- public function readFloat():Number {
- return this._loader.data.readFloat();
- }
- public function readInt():int {
- return this._loader.data.readInt();
- }
- public function readMultiByte(length:uint, charSet:String):String {
- return this._loader.data.readMultiByte(length, charSet);
- }
- public function readObject():* {
- return this._loader.data.readObject();
- }
- public function readShort():int {
- return this._loader.data.readShort();
- }
- public function readUnsignedByte():uint {
- return this._loader.data.readUnsignedByte();
- }
- public function readUnsignedInt():uint {
- return this._loader.data.readUnsignedInt();
- }
- public function readUnsignedShort():uint {
- return this._loader.data.readUnsignedShort();
- }
- public function readUTF():String {
- return this._loader.data.readUTF();
- }
- public function readUTFBytes(length:uint):String {
- return this._loader.data.readUTFBytes(length);
- }
- }
+ public function readBoolean():Boolean
+ {
+ return this._loader.data.readBoolean();
+ }
+ public function readByte():int
+ {
+ return this._loader.data.readByte();
+ }
+ public function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void
+ {
+ this._loader.data.readBytes(bytes, offset, length);
+ }
+ public function readDouble():Number
+ {
+ return this._loader.data.readDouble();
+ }
+ public function readFloat():Number
+ {
+ return this._loader.data.readFloat();
+ }
+ public function readInt():int
+ {
+ return this._loader.data.readInt();
+ }
+ public function readMultiByte(length:uint, charSet:String):String
+ {
+ return this._loader.data.readMultiByte(length, charSet);
+ }
+ public function readObject():*
+ {
+ return this._loader.data.readObject();
+ }
+ public function readShort():int
+ {
+ return this._loader.data.readShort();
+ }
+ public function readUnsignedByte():uint
+ {
+ return this._loader.data.readUnsignedByte();
+ }
+ public function readUnsignedInt():uint
+ {
+ return this._loader.data.readUnsignedInt();
+ }
+ public function readUnsignedShort():uint
+ {
+ return this._loader.data.readUnsignedShort();
+ }
+ public function readUTF():String
+ {
+ return this._loader.data.readUTF();
+ }
+ public function readUTFBytes(length:uint):String
+ {
+ return this._loader.data.readUTFBytes(length);
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/net/URLVariables.as b/core/src/avm2/globals/flash/net/URLVariables.as
index bc8822763a18..a076806b1756 100644
--- a/core/src/avm2/globals/flash/net/URLVariables.as
+++ b/core/src/avm2/globals/flash/net/URLVariables.as
@@ -1,55 +1,71 @@
-package flash.net {
- import flash.utils.escapeMultiByte;
- import flash.utils.unescapeMultiByte;
- public dynamic class URLVariables {
- public function URLVariables(str: String = null) {
- if (str) {
- this.decode(str);
- }
- }
+package flash.net
+{
+ import flash.utils.escapeMultiByte;
+ import flash.utils.unescapeMultiByte;
+ public dynamic class URLVariables
+ {
+ public function URLVariables(str:String = null)
+ {
+ if (str)
+ {
+ this.decode(str);
+ }
+ }
- public function decode(str: String) {
- for each (var pair in str.AS3::split("&")) {
- var splitIndex = pair.AS3::indexOf("=");
- if (splitIndex === -1) {
- throw new Error("Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.", 2101);
- }
- pair = pair.AS3::replace("+", " ");
- var prop = unescapeMultiByte(pair.AS3::slice(0, splitIndex));
- var val = unescapeMultiByte(pair.AS3::slice(splitIndex + 1));
- if (this[prop] == null) {
- this[prop] = val;
- } else if (this[prop] instanceof Array) {
- this[prop].push(val);
- } else {
- this[prop] = [this[prop], val];
- }
- }
- }
+ public function decode(str:String)
+ {
+ for each (var pair in str.AS3::split("&"))
+ {
+ var splitIndex = pair.AS3::indexOf("=");
+ if (splitIndex === -1)
+ {
+ throw new Error("Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.", 2101);
+ }
+ pair = pair.AS3::replace("+", " ");
+ var prop = unescapeMultiByte(pair.AS3::slice(0, splitIndex));
+ var val = unescapeMultiByte(pair.AS3::slice(splitIndex + 1));
+ if (this[prop] == null)
+ {
+ this[prop] = val;
+ }
+ else if (this[prop]instanceof Array)
+ {
+ this[prop].push(val);
+ }
+ else
+ {
+ this[prop] = [this[prop], val];
+ }
+ }
+ }
- public function toString(): String {
- var acc : String = ""
- var sep :String = ""
- for (p in this) {
- var pe : String = escapeMultiByte(p);
- var val = this[p];
- if (val is Array) {
- for (i in val) {
- acc += sep;
- acc += pe;
- acc += "=";
- acc += escapeMultiByte(val[i]);
- sep = "&";
- }
- continue;
- }
- acc += sep;
- acc += pe;
- acc += "=";
- acc += escapeMultiByte(val);
- sep="&";
- }
- return acc;
- }
- }
+ public function toString():String
+ {
+ var acc:String = "";
+ var sep:String = "";
+ for (p in this)
+ {
+ var pe:String = escapeMultiByte(p);
+ var val = this[p];
+ if (val is Array)
+ {
+ for (i in val)
+ {
+ acc += sep;
+ acc += pe;
+ acc += "=";
+ acc += escapeMultiByte(val[i]);
+ sep = "&";
+ }
+ continue;
+ }
+ acc += sep;
+ acc += pe;
+ acc += "=";
+ acc += escapeMultiByte(val);
+ sep = "&";
+ }
+ return acc;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/XMLSocket.as b/core/src/avm2/globals/flash/net/XMLSocket.as
index 3fd7b9c482e1..e373dea7c1d7 100644
--- a/core/src/avm2/globals/flash/net/XMLSocket.as
+++ b/core/src/avm2/globals/flash/net/XMLSocket.as
@@ -1,129 +1,129 @@
package flash.net
{
- import flash.net.Socket;
- import flash.events.EventDispatcher;
- import flash.events.ProgressEvent;
- import flash.events.IOErrorEvent;
- import flash.events.SecurityErrorEvent;
- import flash.events.Event;
- import flash.events.DataEvent;
- import flash.utils.ByteArray;
-
- public class XMLSocket extends EventDispatcher
- {
- private var tempBuf:ByteArray = new ByteArray();
- private var socket:Socket;
-
- public function XMLSocket(host:String = null, port:int = 0)
- {
- this.socket = new Socket();
-
- this.socket.addEventListener(Event.CLOSE, this.socketCloseListener);
- this.socket.addEventListener(Event.CONNECT, this.socketConnectEvent);
- this.socket.addEventListener(ProgressEvent.SOCKET_DATA, this.socketDataListener);
- this.socket.addEventListener(IOErrorEvent.IO_ERROR, this.socketIoErrorListener);
- this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.socketSecurityErrorListener);
-
- if (host != null)
- {
- this.connect(host, port);
- }
- }
-
- private native function get domain():String;
-
- private function socketCloseListener(evt:Event):void
- {
- this.tempBuf.clear();
- this.dispatchEvent(evt);
- }
-
- private function socketConnectEvent(evt:Event):void
- {
- this.dispatchEvent(evt);
- }
-
- private function socketDataListener(evt:ProgressEvent):void
- {
- // FIXME: There is probably a better way to do this.
- for (var i:uint = 0; i < evt.bytesLoaded; i++)
- {
- var byte:int = this.socket.readByte();
-
- if (byte == 0)
- {
- var length:uint = this.tempBuf.position;
- this.tempBuf.position = 0;
-
- var data:String = this.tempBuf.readUTFBytes(length);
- this.tempBuf.clear();
-
- this.dispatchEvent(new DataEvent(DataEvent.DATA, false, false, data));
- }
- else
- {
- this.tempBuf.writeByte(byte);
- }
- }
- }
-
- private function socketIoErrorListener(evt:IOErrorEvent):void
- {
- this.dispatchEvent(evt);
- }
-
- private function socketSecurityErrorListener(evt:SecurityErrorEvent):void
- {
- this.dispatchEvent(evt);
- }
-
- public function get connected():Boolean
- {
- return this.socket.connected;
- }
-
- public function get timeout():int
- {
- return this.socket.timeout;
- }
-
- public function set timeout(value:int)
- {
- this.socket.timeout = value;
- }
-
- public function close():void
- {
- this.tempBuf.clear();
- this.socket.close();
- }
-
- public function connect(host:String, port:int):void
- {
- if (host == null)
- {
- host = this.domain();
- }
-
- socket.connect(host, port);
- }
-
- public function send(object:*):void
- {
- var val:String;
-
- if (object is XML || object is XMLList)
- {
- val = object.toXMLString();
- }
- else
- {
- val = object.toString();
- }
-
- this.socket.writeUTFBytes(val);
- this.socket.writeByte(0);
- this.socket.flush();
- }
- }
+ import flash.net.Socket;
+ import flash.events.EventDispatcher;
+ import flash.events.ProgressEvent;
+ import flash.events.IOErrorEvent;
+ import flash.events.SecurityErrorEvent;
+ import flash.events.Event;
+ import flash.events.DataEvent;
+ import flash.utils.ByteArray;
+
+ public class XMLSocket extends EventDispatcher
+ {
+ private var tempBuf:ByteArray = new ByteArray();
+ private var socket:Socket;
+
+ public function XMLSocket(host:String = null, port:int = 0)
+ {
+ this.socket = new Socket();
+
+ this.socket.addEventListener(Event.CLOSE, this.socketCloseListener);
+ this.socket.addEventListener(Event.CONNECT, this.socketConnectEvent);
+ this.socket.addEventListener(ProgressEvent.SOCKET_DATA, this.socketDataListener);
+ this.socket.addEventListener(IOErrorEvent.IO_ERROR, this.socketIoErrorListener);
+ this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.socketSecurityErrorListener);
+
+ if (host != null)
+ {
+ this.connect(host, port);
+ }
+ }
+
+ private native function get domain():String;
+
+ private function socketCloseListener(evt:Event):void
+ {
+ this.tempBuf.clear();
+ this.dispatchEvent(evt);
+ }
+
+ private function socketConnectEvent(evt:Event):void
+ {
+ this.dispatchEvent(evt);
+ }
+
+ private function socketDataListener(evt:ProgressEvent):void
+ {
+ // FIXME: There is probably a better way to do this.
+ for (var i:uint = 0; i < evt.bytesLoaded; i++)
+ {
+ var byte:int = this.socket.readByte();
+
+ if (byte == 0)
+ {
+ var length:uint = this.tempBuf.position;
+ this.tempBuf.position = 0;
+
+ var data:String = this.tempBuf.readUTFBytes(length);
+ this.tempBuf.clear();
+
+ this.dispatchEvent(new DataEvent(DataEvent.DATA, false, false, data));
+ }
+ else
+ {
+ this.tempBuf.writeByte(byte);
+ }
+ }
+ }
+
+ private function socketIoErrorListener(evt:IOErrorEvent):void
+ {
+ this.dispatchEvent(evt);
+ }
+
+ private function socketSecurityErrorListener(evt:SecurityErrorEvent):void
+ {
+ this.dispatchEvent(evt);
+ }
+
+ public function get connected():Boolean
+ {
+ return this.socket.connected;
+ }
+
+ public function get timeout():int
+ {
+ return this.socket.timeout;
+ }
+
+ public function set timeout(value:int)
+ {
+ this.socket.timeout = value;
+ }
+
+ public function close():void
+ {
+ this.tempBuf.clear();
+ this.socket.close();
+ }
+
+ public function connect(host:String, port:int):void
+ {
+ if (host == null)
+ {
+ host = this.domain();
+ }
+
+ socket.connect(host, port);
+ }
+
+ public function send(object:*):void
+ {
+ var val:String;
+
+ if (object is XML || object is XMLList)
+ {
+ val = object.toXMLString();
+ }
+ else
+ {
+ val = object.toString();
+ }
+
+ this.socket.writeUTFBytes(val);
+ this.socket.writeByte(0);
+ this.socket.flush();
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/net/drm/LoadVoucherSetting.as b/core/src/avm2/globals/flash/net/drm/LoadVoucherSetting.as
index 4ef26b518c92..a9dc978f1827 100644
--- a/core/src/avm2/globals/flash/net/drm/LoadVoucherSetting.as
+++ b/core/src/avm2/globals/flash/net/drm/LoadVoucherSetting.as
@@ -1,10 +1,12 @@
-package flash.net.drm {
- [API("667")]
- public final class LoadVoucherSetting {
- public static const ALLOW_SERVER:String = "allowServer";
+package flash.net.drm
+{
+ [API("667")]
+ public final class LoadVoucherSetting
+ {
+ public static const ALLOW_SERVER:String = "allowServer";
- public static const FORCE_REFRESH:String = "forceRefresh";
+ public static const FORCE_REFRESH:String = "forceRefresh";
- public static const LOCAL_ONLY:String = "localOnly";
- }
+ public static const LOCAL_ONLY:String = "localOnly";
+ }
}
diff --git a/core/src/avm2/globals/flash/printing/PrintJob.as b/core/src/avm2/globals/flash/printing/PrintJob.as
index b2cc5fd87644..0c4d30537a7b 100644
--- a/core/src/avm2/globals/flash/printing/PrintJob.as
+++ b/core/src/avm2/globals/flash/printing/PrintJob.as
@@ -1,6 +1,8 @@
-package flash.printing {
- import flash.events.EventDispatcher;
+package flash.printing
+{
+ import flash.events.EventDispatcher;
- public class PrintJob extends EventDispatcher {
- }
+ public class PrintJob extends EventDispatcher
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/printing/PrintJobOptions.as b/core/src/avm2/globals/flash/printing/PrintJobOptions.as
index 4d0361e177be..54e7ac9ac625 100644
--- a/core/src/avm2/globals/flash/printing/PrintJobOptions.as
+++ b/core/src/avm2/globals/flash/printing/PrintJobOptions.as
@@ -3,14 +3,16 @@
// by https://github.com/golfinq/ActionScript_Event_Builder
// It won't be regenerated in the future, so feel free to edit and/or fix
-package flash.printing {
- public class PrintJobOptions {
- // Specifies whether the content in the print job is printed as a bitmap or as a vector.
- public var printAsBitmap: Boolean;
+package flash.printing
+{
+ public class PrintJobOptions
+ {
+ // Specifies whether the content in the print job is printed as a bitmap or as a vector.
+ public var printAsBitmap:Boolean;
- public function PrintJobOptions(printAsBitmap:Boolean = false)
- {
- this.printAsBitmap = printAsBitmap;
- }
- }
+ public function PrintJobOptions(printAsBitmap:Boolean = false)
+ {
+ this.printAsBitmap = printAsBitmap;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/printing/PrintJobOrientation.as b/core/src/avm2/globals/flash/printing/PrintJobOrientation.as
index 740eedc41472..396d7bb6f535 100644
--- a/core/src/avm2/globals/flash/printing/PrintJobOrientation.as
+++ b/core/src/avm2/globals/flash/printing/PrintJobOrientation.as
@@ -6,13 +6,13 @@
package flash.printing
{
- public final class PrintJobOrientation
- {
- // The landscape (horizontal) image orientation for printing.
- public static const LANDSCAPE:String = "landscape";
+ public final class PrintJobOrientation
+ {
+ // The landscape (horizontal) image orientation for printing.
+ public static const LANDSCAPE:String = "landscape";
- // The portrait (vertical) image orientation for printing.
- public static const PORTRAIT:String = "portrait";
+ // The portrait (vertical) image orientation for printing.
+ public static const PORTRAIT:String = "portrait";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/profiler.as b/core/src/avm2/globals/flash/profiler.as
index eb54d65b3f85..5230b2c1e04b 100644
--- a/core/src/avm2/globals/flash/profiler.as
+++ b/core/src/avm2/globals/flash/profiler.as
@@ -1,7 +1,9 @@
-package flash.profiler {
- import __ruffle__.stub_method;
+package flash.profiler
+{
+ import __ruffle__.stub_method;
- public function showRedrawRegions(on:Boolean, color:uint = 0xFF0000):void {
- stub_method("flash.profiler", "showRedrawRegions");
- }
+ public function showRedrawRegions(on:Boolean, color:uint = 0xFF0000):void
+ {
+ stub_method("flash.profiler", "showRedrawRegions");
+ }
}
diff --git a/core/src/avm2/globals/flash/profiler/Telemetry.as b/core/src/avm2/globals/flash/profiler/Telemetry.as
index 6a15c4e39ff8..79e1ba8825f9 100644
--- a/core/src/avm2/globals/flash/profiler/Telemetry.as
+++ b/core/src/avm2/globals/flash/profiler/Telemetry.as
@@ -1,18 +1,27 @@
-package flash.profiler {
- [API("678")] // the docs say 682, that's wrong
- public final class Telemetry {
- public static const connected: Boolean = false;
- public static const spanMarker: Number = 0;
+package flash.profiler
+{
+ [API("678")]
+ // the docs say 682, that's wrong
+ public final class Telemetry
+ {
+ public static const connected:Boolean = false;
+ public static const spanMarker:Number = 0;
- public static function sendMetric(metric:String, value:*):void {}
- public static function sendSpanMetric(metric:String, startSpanMarker:Number, value:* = null):void {}
-
- public static function registerCommandHandler(commandName:String, handler:Function):Boolean {
- return false;
- }
+ public static function sendMetric(metric:String, value:*):void
+ {
+ }
+ public static function sendSpanMetric(metric:String, startSpanMarker:Number, value:* = null):void
+ {
+ }
- public static function unregisterCommandHandler(commandName:String):Boolean {
- return false;
- }
- }
+ public static function registerCommandHandler(commandName:String, handler:Function):Boolean
+ {
+ return false;
+ }
+
+ public static function unregisterCommandHandler(commandName:String):Boolean
+ {
+ return false;
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/sampler.as b/core/src/avm2/globals/flash/sampler.as
index 113658348b20..01e03b604dfb 100644
--- a/core/src/avm2/globals/flash/sampler.as
+++ b/core/src/avm2/globals/flash/sampler.as
@@ -1,82 +1,100 @@
-package flash.sampler {
- import __ruffle__.stub_method;
-
- public function clearSamples(): void {
- stub_method("flash.sampler", "clearSamples");
- }
-
- public function getGetterInvocationCount(obj: Object, name: QName): Number {
- stub_method("flash.sampler", "getGetterInvocationCount");
- return -1;
- }
-
- public function getInvocationCount(obj: Object, name: QName): Number {
- stub_method("flash.sampler", "getInvocationCount");
- return -1;
- }
-
- public function getLexicalScopes(fun: Function): Array {
- stub_method("flash.sampler", "getLexicalScopes");
- return null;
- }
-
- public function getMasterString(str: String): String {
- stub_method("flash.sampler", "getMasterString");
- return null;
- }
-
- public function getMemberNames(obj: Object, instanceNames: Boolean = false): Object {
- stub_method("flash.sampler", "getMemberNames");
- return null;
- }
-
- public function getSampleCount(): Number {
- stub_method("flash.sampler", "getSampleCount");
- return 0;
- }
-
- public function getSamples(): Object {
- stub_method("flash.sampler", "getSamples");
- return {};
- }
-
- public function getSavedThis(fun: Function): Object {
- stub_method("flash.sampler", "getSavedThis");
- return undefined;
- }
-
- public function getSetterInvocationCount(obj: Object, name: QName): Number {
- stub_method("flash.sampler", "getSetterInvocationCount");
- return -1;
- }
-
- public function getSize(param1: *): Number {
- stub_method("flash.sampler", "getSize");
- return 0;
- }
-
- public function isGetterSetter(obj: Object, name: QName): Boolean {
- stub_method("flash.sampler", "isGetterSetter");
- return false;
- }
-
- public function pauseSampling(): void {
- stub_method("flash.sampler", "pauseSampling");
- }
-
- public function sampleInternalAllocs(everything: Boolean): void {
- stub_method("flash.sampler", "sampleInternalAllocs");
- }
-
- public function setSamplerCallback(fun: Function): void {
- stub_method("flash.sampler", "setSamplerCallback");
- }
-
- public function startSampling(): void {
- stub_method("flash.sampler", "startSampling");
- }
-
- public function stopSampling():void {
- stub_method("flash.sampler", "stopSampling");
- }
+package flash.sampler
+{
+ import __ruffle__.stub_method;
+
+ public function clearSamples():void
+ {
+ stub_method("flash.sampler", "clearSamples");
+ }
+
+ public function getGetterInvocationCount(obj:Object, name:QName):Number
+ {
+ stub_method("flash.sampler", "getGetterInvocationCount");
+ return -1;
+ }
+
+ public function getInvocationCount(obj:Object, name:QName):Number
+ {
+ stub_method("flash.sampler", "getInvocationCount");
+ return -1;
+ }
+
+ public function getLexicalScopes(fun:Function):Array
+ {
+ stub_method("flash.sampler", "getLexicalScopes");
+ return null;
+ }
+
+ public function getMasterString(str:String):String
+ {
+ stub_method("flash.sampler", "getMasterString");
+ return null;
+ }
+
+ public function getMemberNames(obj:Object, instanceNames:Boolean = false):Object
+ {
+ stub_method("flash.sampler", "getMemberNames");
+ return null;
+ }
+
+ public function getSampleCount():Number
+ {
+ stub_method("flash.sampler", "getSampleCount");
+ return 0;
+ }
+
+ public function getSamples():Object
+ {
+ stub_method("flash.sampler", "getSamples");
+ return {};
+ }
+
+ public function getSavedThis(fun:Function):Object
+ {
+ stub_method("flash.sampler", "getSavedThis");
+ return undefined;
+ }
+
+ public function getSetterInvocationCount(obj:Object, name:QName):Number
+ {
+ stub_method("flash.sampler", "getSetterInvocationCount");
+ return -1;
+ }
+
+ public function getSize(param1:*):Number
+ {
+ stub_method("flash.sampler", "getSize");
+ return 0;
+ }
+
+ public function isGetterSetter(obj:Object, name:QName):Boolean
+ {
+ stub_method("flash.sampler", "isGetterSetter");
+ return false;
+ }
+
+ public function pauseSampling():void
+ {
+ stub_method("flash.sampler", "pauseSampling");
+ }
+
+ public function sampleInternalAllocs(everything:Boolean):void
+ {
+ stub_method("flash.sampler", "sampleInternalAllocs");
+ }
+
+ public function setSamplerCallback(fun:Function):void
+ {
+ stub_method("flash.sampler", "setSamplerCallback");
+ }
+
+ public function startSampling():void
+ {
+ stub_method("flash.sampler", "startSampling");
+ }
+
+ public function stopSampling():void
+ {
+ stub_method("flash.sampler", "stopSampling");
+ }
}
diff --git a/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as b/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as
index 56407a5cc70e..4eb3f2a8e573 100644
--- a/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as
+++ b/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as
@@ -1,8 +1,9 @@
-package flash.sampler {
- public final class DeleteObjectSample extends Sample {
- public const id:Number;
-
- public const size:Number;
- }
-}
+package flash.sampler
+{
+ public final class DeleteObjectSample extends Sample
+ {
+ public const id:Number;
+ public const size:Number;
+ }
+}
diff --git a/core/src/avm2/globals/flash/sampler/NewObjectSample.as b/core/src/avm2/globals/flash/sampler/NewObjectSample.as
index 315a56ce6050..6a846343e41d 100644
--- a/core/src/avm2/globals/flash/sampler/NewObjectSample.as
+++ b/core/src/avm2/globals/flash/sampler/NewObjectSample.as
@@ -1,20 +1,23 @@
-package flash.sampler {
- import __ruffle__.stub_getter;
+package flash.sampler
+{
+ import __ruffle__.stub_getter;
- public final class NewObjectSample extends Sample {
- public const id:Number;
-
- public const type:Class;
+ public final class NewObjectSample extends Sample
+ {
+ public const id:Number;
- public function get object():* {
- stub_getter("flash.sampler.NewObjectSample", "object");
- return {};
- }
+ public const type:Class;
- public function get size():Number {
- stub_getter("flash.sampler.NewObjectSample", "size");
- return 0;
- }
- }
-}
+ public function get object():*
+ {
+ stub_getter("flash.sampler.NewObjectSample", "object");
+ return {};
+ }
+ public function get size():Number
+ {
+ stub_getter("flash.sampler.NewObjectSample", "size");
+ return 0;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/sampler/Sample.as b/core/src/avm2/globals/flash/sampler/Sample.as
index 6ec2cc0c5b4e..b31bdef83b80 100644
--- a/core/src/avm2/globals/flash/sampler/Sample.as
+++ b/core/src/avm2/globals/flash/sampler/Sample.as
@@ -1,8 +1,9 @@
-package flash.sampler {
- public class Sample {
- public const time:Number;
-
- public const stack:Array;
- }
-}
+package flash.sampler
+{
+ public class Sample
+ {
+ public const time:Number;
+ public const stack:Array;
+ }
+}
diff --git a/core/src/avm2/globals/flash/sampler/StackFrame.as b/core/src/avm2/globals/flash/sampler/StackFrame.as
index 4a365d9d9b0c..0694de0e84fd 100644
--- a/core/src/avm2/globals/flash/sampler/StackFrame.as
+++ b/core/src/avm2/globals/flash/sampler/StackFrame.as
@@ -1,20 +1,25 @@
-package flash.sampler {
- public final class StackFrame {
- public const name:String;
+package flash.sampler
+{
+ public final class StackFrame
+ {
+ public const name:String;
- public const file:String;
+ public const file:String;
- public const line:uint;
-
- public const scriptID:Number;
-
- public function toString():String {
- if (this.file) {
- return this.name + "()[" + this.file + ":" + this.line + "]";
- } else {
- return this.name + "()";
- }
- }
- }
-}
+ public const line:uint;
+
+ public const scriptID:Number;
+ public function toString():String
+ {
+ if (this.file)
+ {
+ return this.name + "()[" + this.file + ":" + this.line + "]";
+ }
+ else
+ {
+ return this.name + "()";
+ }
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/security/CertificateStatus.as b/core/src/avm2/globals/flash/security/CertificateStatus.as
index 29320d7c8e05..088a4c1a4f18 100644
--- a/core/src/avm2/globals/flash/security/CertificateStatus.as
+++ b/core/src/avm2/globals/flash/security/CertificateStatus.as
@@ -6,34 +6,34 @@
package flash.security
{
- public final class CertificateStatus
- {
- // The certificate is outside its valid period.
- public static const EXPIRED:String = "expired";
+ public final class CertificateStatus
+ {
+ // The certificate is outside its valid period.
+ public static const EXPIRED:String = "expired";
- // An invalid certificate.
- public static const INVALID:String = "invalid";
+ // An invalid certificate.
+ public static const INVALID:String = "invalid";
- // A root or intermediate certificate in this certificate's chain is invalid.
- public static const INVALID_CHAIN:String = "invalidChain";
+ // A root or intermediate certificate in this certificate's chain is invalid.
+ public static const INVALID_CHAIN:String = "invalidChain";
- // The certificate is not yet valid.
- public static const NOT_YET_VALID:String = "notYetValid";
+ // The certificate is not yet valid.
+ public static const NOT_YET_VALID:String = "notYetValid";
- // The certificate common name does not match the expected host name.
- public static const PRINCIPAL_MISMATCH:String = "principalMismatch";
+ // The certificate common name does not match the expected host name.
+ public static const PRINCIPAL_MISMATCH:String = "principalMismatch";
- // The certificate has been revoked.
- public static const REVOKED:String = "revoked";
+ // The certificate has been revoked.
+ public static const REVOKED:String = "revoked";
- // A valid, trusted certificate.
- public static const TRUSTED:String = "trusted";
+ // A valid, trusted certificate.
+ public static const TRUSTED:String = "trusted";
- // The validity of the certificate is not known.
- public static const UNKNOWN:String = "unknown";
+ // The validity of the certificate is not known.
+ public static const UNKNOWN:String = "unknown";
- // The certificate does not chain to a trusted root certificate.
- public static const UNTRUSTED_SIGNERS:String = "untrustedSigners";
+ // The certificate does not chain to a trusted root certificate.
+ public static const UNTRUSTED_SIGNERS:String = "untrustedSigners";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/security/X500DistinguishedName.as b/core/src/avm2/globals/flash/security/X500DistinguishedName.as
index 440b82139bf9..cc323c33729a 100644
--- a/core/src/avm2/globals/flash/security/X500DistinguishedName.as
+++ b/core/src/avm2/globals/flash/security/X500DistinguishedName.as
@@ -1,49 +1,58 @@
package flash.security
{
- [API("674")]
- public final class X500DistinguishedName
- {
- private var _commonName: String;
- private var _countryName: String;
- private var _localityName: String;
- private var _organizationalUnitName: String;
- private var _organizationName: String;
- private var _stateOrProvinceName: String;
-
- public function X500DistinguishedName() {}
-
- public function get commonName():String {
- return this._commonName;
- }
-
- public function get countryName():String {
- return this._countryName;
- }
-
- public function get localityName():String {
- return this._localityName;
- }
-
- public function get organizationalUnitName():String {
- return this._organizationalUnitName;
- }
-
- public function get organizationName():String {
- return this._organizationName;
- }
-
- public function get stateOrProvinceName():String {
- return this._stateOrProvinceName;
- }
-
- public function toString(): String {
- // TODO: figure out exact format
- return "C=" + this._countryName +
- ",S=" + this._stateOrProvinceName +
- ",L=" + this._localityName +
- ",O=" + this._organizationName +
- ",OU=" + this._organizationalUnitName +
- ",CN=" + this._commonName;
- }
- }
+ [API("674")]
+ public final class X500DistinguishedName
+ {
+ private var _commonName:String;
+ private var _countryName:String;
+ private var _localityName:String;
+ private var _organizationalUnitName:String;
+ private var _organizationName:String;
+ private var _stateOrProvinceName:String;
+
+ public function X500DistinguishedName()
+ {
+ }
+
+ public function get commonName():String
+ {
+ return this._commonName;
+ }
+
+ public function get countryName():String
+ {
+ return this._countryName;
+ }
+
+ public function get localityName():String
+ {
+ return this._localityName;
+ }
+
+ public function get organizationalUnitName():String
+ {
+ return this._organizationalUnitName;
+ }
+
+ public function get organizationName():String
+ {
+ return this._organizationName;
+ }
+
+ public function get stateOrProvinceName():String
+ {
+ return this._stateOrProvinceName;
+ }
+
+ public function toString():String
+ {
+ // TODO: figure out exact format
+ return "C=" + this._countryName +
+ ",S=" + this._stateOrProvinceName +
+ ",L=" + this._localityName +
+ ",O=" + this._organizationName +
+ ",OU=" + this._organizationalUnitName +
+ ",CN=" + this._commonName;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/security/X509Certificate.as b/core/src/avm2/globals/flash/security/X509Certificate.as
index 768dfd12b501..2fdb8a465645 100644
--- a/core/src/avm2/globals/flash/security/X509Certificate.as
+++ b/core/src/avm2/globals/flash/security/X509Certificate.as
@@ -1,76 +1,91 @@
package flash.security
{
- [API("674")]
- public final class X509Certificate
- {
- import flash.utils.ByteArray;
+ [API("674")]
+ public final class X509Certificate
+ {
+ import flash.utils.ByteArray;
- private var _encoded: ByteArray;
- private var _issuer: X500DistinguishedName;
- private var _issuerUniqueID: String;
- private var _serialNumber: String;
- private var _signatureAlgorithmOID: String;
- private var _signatureAlgorithmParams: ByteArray;
- private var _subject: X500DistinguishedName;
- private var _subjectPublicKey: String;
- private var _subjectPublicKeyAlgorithmOID: String;
- private var _subjectUniqueID: String;
- private var _validNotAfter: Date;
- private var _validNotBefore: Date;
- private var _version: uint;
+ private var _encoded:ByteArray;
+ private var _issuer:X500DistinguishedName;
+ private var _issuerUniqueID:String;
+ private var _serialNumber:String;
+ private var _signatureAlgorithmOID:String;
+ private var _signatureAlgorithmParams:ByteArray;
+ private var _subject:X500DistinguishedName;
+ private var _subjectPublicKey:String;
+ private var _subjectPublicKeyAlgorithmOID:String;
+ private var _subjectUniqueID:String;
+ private var _validNotAfter:Date;
+ private var _validNotBefore:Date;
+ private var _version:uint;
- public function X509Certificate() {}
+ public function X509Certificate()
+ {
+ }
- public function get encoded():ByteArray {
- return this._encoded;
- }
-
- public function get issuer():X500DistinguishedName {
- return this._issuer;
- }
+ public function get encoded():ByteArray
+ {
+ return this._encoded;
+ }
- public function get issuerUniqueID():String {
- return this._issuerUniqueID;
- }
+ public function get issuer():X500DistinguishedName
+ {
+ return this._issuer;
+ }
- public function get serialNumber():String {
- return this._serialNumber;
- }
+ public function get issuerUniqueID():String
+ {
+ return this._issuerUniqueID;
+ }
- public function get signatureAlgorithmOID():String {
- return this._signatureAlgorithmOID;
- }
+ public function get serialNumber():String
+ {
+ return this._serialNumber;
+ }
- public function get signatureAlgorithmParams():ByteArray {
- return this._signatureAlgorithmParams;
- }
+ public function get signatureAlgorithmOID():String
+ {
+ return this._signatureAlgorithmOID;
+ }
- public function get subject():X500DistinguishedName {
- return this._subject;
- }
-
- public function get subjectPublicKey():String {
- return this._subjectPublicKey;
- }
+ public function get signatureAlgorithmParams():ByteArray
+ {
+ return this._signatureAlgorithmParams;
+ }
- public function get subjectPublicKeyAlgorithmOID():String {
- return this._subjectPublicKeyAlgorithmOID;
- }
+ public function get subject():X500DistinguishedName
+ {
+ return this._subject;
+ }
- public function get subjectUniqueID():String {
- return this._subjectUniqueID;
- }
+ public function get subjectPublicKey():String
+ {
+ return this._subjectPublicKey;
+ }
- public function get validNotAfter():Date {
- return this._validNotAfter;
- }
+ public function get subjectPublicKeyAlgorithmOID():String
+ {
+ return this._subjectPublicKeyAlgorithmOID;
+ }
- public function get validNotBefore():Date {
- return this._validNotBefore;
- }
+ public function get subjectUniqueID():String
+ {
+ return this._subjectUniqueID;
+ }
- public function get version():uint {
- return this._version;
- }
- }
+ public function get validNotAfter():Date
+ {
+ return this._validNotAfter;
+ }
+
+ public function get validNotBefore():Date
+ {
+ return this._validNotBefore;
+ }
+
+ public function get version():uint
+ {
+ return this._version;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/sensors/Accelerometer.as b/core/src/avm2/globals/flash/sensors/Accelerometer.as
index 89164c48a56b..136378133218 100644
--- a/core/src/avm2/globals/flash/sensors/Accelerometer.as
+++ b/core/src/avm2/globals/flash/sensors/Accelerometer.as
@@ -1,19 +1,24 @@
-package flash.sensors {
- import flash.events.EventDispatcher;
+package flash.sensors
+{
+ import flash.events.EventDispatcher;
- [API("667")]
- public class Accelerometer extends EventDispatcher {
- public static function get isSupported():Boolean {
- return false;
- }
+ [API("667")]
+ public class Accelerometer extends EventDispatcher
+ {
+ public static function get isSupported():Boolean
+ {
+ return false;
+ }
- public function setRequestedUpdateInterval(interval: Number) {
- __ruffle__.stub_method("flash.sensors.Accelerometer", "setRequestedUpdateInterval");
- }
+ public function setRequestedUpdateInterval(interval:Number)
+ {
+ __ruffle__.stub_method("flash.sensors.Accelerometer", "setRequestedUpdateInterval");
+ }
- public function get muted(): Boolean {
- __ruffle__.stub_getter("flash.sensors.Accelerometer", "muted");
- return true;
- }
- }
+ public function get muted():Boolean
+ {
+ __ruffle__.stub_getter("flash.sensors.Accelerometer", "muted");
+ return true;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/sensors/Geolocation.as b/core/src/avm2/globals/flash/sensors/Geolocation.as
index 4efbfaeb47b2..119ecf695e31 100644
--- a/core/src/avm2/globals/flash/sensors/Geolocation.as
+++ b/core/src/avm2/globals/flash/sensors/Geolocation.as
@@ -1,9 +1,12 @@
-package flash.sensors {
- import flash.events.EventDispatcher;
- [API("668")]
- public class Geolocation extends EventDispatcher {
- public static function get isSupported():Boolean {
- return false;
- }
- }
+package flash.sensors
+{
+ import flash.events.EventDispatcher;
+ [API("668")]
+ public class Geolocation extends EventDispatcher
+ {
+ public static function get isSupported():Boolean
+ {
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system.as b/core/src/avm2/globals/flash/system.as
index 03bf95e4d9bc..37ffcb1925bb 100644
--- a/core/src/avm2/globals/flash/system.as
+++ b/core/src/avm2/globals/flash/system.as
@@ -1,4 +1,4 @@
-package flash.system {
- public native function fscommand(command:String, args:String = ""):void;
+package flash.system
+{
+ public native function fscommand(command:String, args:String = ""):void;
}
-
diff --git a/core/src/avm2/globals/flash/system/ApplicationDomain.as b/core/src/avm2/globals/flash/system/ApplicationDomain.as
index ca589e5cb234..6c345e3efd66 100644
--- a/core/src/avm2/globals/flash/system/ApplicationDomain.as
+++ b/core/src/avm2/globals/flash/system/ApplicationDomain.as
@@ -1,28 +1,32 @@
-package flash.system {
- import flash.utils.ByteArray;
+package flash.system
+{
+ import flash.utils.ByteArray;
- [Ruffle(InstanceAllocator)]
- public final class ApplicationDomain {
- public static native function get currentDomain():ApplicationDomain;
+ [Ruffle(InstanceAllocator)]
+ public final class ApplicationDomain
+ {
+ public static native function get currentDomain():ApplicationDomain;
- public function ApplicationDomain(parentDomain:ApplicationDomain = null) {
- this.init(parentDomain)
- }
+ public function ApplicationDomain(parentDomain:ApplicationDomain = null)
+ {
+ this.init(parentDomain);
+ }
- private native function init(parentDomain:ApplicationDomain):void;
+ private native function init(parentDomain:ApplicationDomain):void;
- public native function get domainMemory():ByteArray;
- public native function set domainMemory(value:ByteArray):void;
- public native function get parentDomain():ApplicationDomain;
+ public native function get domainMemory():ByteArray;
+ public native function set domainMemory(value:ByteArray):void;
+ public native function get parentDomain():ApplicationDomain;
- public native function getDefinition(name:String):Object;
- public native function hasDefinition(name:String):Boolean;
+ public native function getDefinition(name:String):Object;
+ public native function hasDefinition(name:String):Boolean;
- public native function getQualifiedDefinitionNames():Vector.;
+ public native function getQualifiedDefinitionNames():Vector.;
- public static function get MIN_DOMAIN_MEMORY_LENGTH():uint {
- return 1024;
- }
+ public static function get MIN_DOMAIN_MEMORY_LENGTH():uint
+ {
+ return 1024;
+ }
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/Capabilities.as b/core/src/avm2/globals/flash/system/Capabilities.as
index 96fe83290b3b..65bfc93f4438 100644
--- a/core/src/avm2/globals/flash/system/Capabilities.as
+++ b/core/src/avm2/globals/flash/system/Capabilities.as
@@ -1,23 +1,29 @@
-package flash.system {
- import __ruffle__.stub_getter;
- public final class Capabilities {
- public native static function get os(): String;
- public native static function get playerType(): String;
- public native static function get version(): String;
- public native static function get screenResolutionX():Number;
- public native static function get screenResolutionY():Number;
- public native static function get pixelAspectRatio():Number;
- public native static function get screenDPI():Number;
- public static function get manufacturer(): String {
- stub_getter("flash.system.Capabilities", "manufacturer");
- return "Adobe Windows"
- }
- public static function get language(): String {
- stub_getter("flash.system.Capabilities", "language");
- return "en"
- }
- public static function get isDebugger(): Boolean {
- return false
- }
- }
+package flash.system
+{
+ import __ruffle__.stub_getter;
+ public final class Capabilities
+ {
+ public native static function get os():String;
+ public native static function get playerType():String;
+ public native static function get version():String;
+ public native static function get screenResolutionX():Number;
+ public native static function get screenResolutionY():Number;
+ public native static function get pixelAspectRatio():Number;
+ public native static function get screenDPI():Number;
+ public static function get manufacturer():String
+ {
+ stub_getter("flash.system.Capabilities", "manufacturer");
+ return "Adobe Windows";
+ }
+ public static function get language():String
+ {
+ stub_getter("flash.system.Capabilities", "language");
+ return "en";
+ }
+ public static function get isDebugger():Boolean
+ {
+ return false;
+
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/IME.as b/core/src/avm2/globals/flash/system/IME.as
index 7f4f6a13ea05..cc2cfd391c80 100644
--- a/core/src/avm2/globals/flash/system/IME.as
+++ b/core/src/avm2/globals/flash/system/IME.as
@@ -5,73 +5,73 @@
package flash.system
{
- import flash.events.EventDispatcher;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
+ import flash.events.EventDispatcher;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
- public final class IME extends EventDispatcher
- {
- // The conversion mode of the current IME.
- private static var _conversionMode: String = "ALPHANUMERIC_HALF";
+ public final class IME extends EventDispatcher
+ {
+ // The conversion mode of the current IME.
+ private static var _conversionMode:String = "ALPHANUMERIC_HALF";
- // Indicates whether the system IME is enabled (true) or disabled (false).
- private static var _enabled: Boolean;
+ // Indicates whether the system IME is enabled (true) or disabled (false).
+ private static var _enabled:Boolean;
- // The isSupported property is set to true if the IME class is available on the current platform, otherwise it is set to false.
- private static var _isSupported: Boolean;
+ // The isSupported property is set to true if the IME class is available on the current platform, otherwise it is set to false.
+ private static var _isSupported:Boolean;
- // Causes the runtime to abandon any composition that is in progress.
- public static function compositionAbandoned():void
- {
- stub_method("flash.system.IME", "compositionAbandoned");
- }
+ // Causes the runtime to abandon any composition that is in progress.
+ public static function compositionAbandoned():void
+ {
+ stub_method("flash.system.IME", "compositionAbandoned");
+ }
- // Call this method when the selection within the composition has been updated, either interactively or programmatically.
- public static function compositionSelectionChanged(start:int, end:int):void
- {
- stub_method("flash.system.IME", "compositionSelectionChanged");
- }
+ // Call this method when the selection within the composition has been updated, either interactively or programmatically.
+ public static function compositionSelectionChanged(start:int, end:int):void
+ {
+ stub_method("flash.system.IME", "compositionSelectionChanged");
+ }
- // Instructs the IME to select the first candidate for the current composition string.
- public static function doConversion():void
- {
- stub_method("flash.system.IME", "doConversion");
- }
+ // Instructs the IME to select the first candidate for the current composition string.
+ public static function doConversion():void
+ {
+ stub_method("flash.system.IME", "doConversion");
+ }
- // Sets the IME composition string.
- public static function setCompositionString(composition:String):void
- {
- stub_method("flash.system.IME", "setCompositionString");
- }
+ // Sets the IME composition string.
+ public static function setCompositionString(composition:String):void
+ {
+ stub_method("flash.system.IME", "setCompositionString");
+ }
- public function get isSupported() : Boolean
- {
- return _isSupported;
- }
+ public function get isSupported():Boolean
+ {
+ return _isSupported;
+ }
- public static function get enabled():Boolean
- {
- stub_getter("flash.system.IME", "enabled");
- return _enabled;
- }
+ public static function get enabled():Boolean
+ {
+ stub_getter("flash.system.IME", "enabled");
+ return _enabled;
+ }
- public static function set enabled(value:Boolean):void
- {
- stub_setter("flash.system.IME", "enabled");
- _enabled = value;
- }
+ public static function set enabled(value:Boolean):void
+ {
+ stub_setter("flash.system.IME", "enabled");
+ _enabled = value;
+ }
- public static function get conversionMode():String
- {
- stub_getter("flash.system.IME", "conversionMode");
- return _conversionMode;
- }
+ public static function get conversionMode():String
+ {
+ stub_getter("flash.system.IME", "conversionMode");
+ return _conversionMode;
+ }
- public static function set conversionMode(value:String):void
- {
- stub_setter("flash.system.IME", "conversionMode");
- _conversionMode = value;
- }
- }
+ public static function set conversionMode(value:String):void
+ {
+ stub_setter("flash.system.IME", "conversionMode");
+ _conversionMode = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/IMEConversionMode.as b/core/src/avm2/globals/flash/system/IMEConversionMode.as
index a7d34ce1cca4..4d96cb30081c 100644
--- a/core/src/avm2/globals/flash/system/IMEConversionMode.as
+++ b/core/src/avm2/globals/flash/system/IMEConversionMode.as
@@ -6,31 +6,31 @@
package flash.system
{
- public final class IMEConversionMode
- {
- // The string "ALPHANUMERIC_FULL", for use with the IME.conversionMode property.
- public static const ALPHANUMERIC_FULL:String = "ALPHANUMERIC_FULL";
+ public final class IMEConversionMode
+ {
+ // The string "ALPHANUMERIC_FULL", for use with the IME.conversionMode property.
+ public static const ALPHANUMERIC_FULL:String = "ALPHANUMERIC_FULL";
- // The string "ALPHANUMERIC_HALF", for use with the IME.conversionMode property.
- public static const ALPHANUMERIC_HALF:String = "ALPHANUMERIC_HALF";
+ // The string "ALPHANUMERIC_HALF", for use with the IME.conversionMode property.
+ public static const ALPHANUMERIC_HALF:String = "ALPHANUMERIC_HALF";
- // The string "CHINESE", for use with the IME.conversionMode property.
- public static const CHINESE:String = "CHINESE";
+ // The string "CHINESE", for use with the IME.conversionMode property.
+ public static const CHINESE:String = "CHINESE";
- // The string "JAPANESE_HIRAGANA", for use with the IME.conversionMode property.
- public static const JAPANESE_HIRAGANA:String = "JAPANESE_HIRAGANA";
+ // The string "JAPANESE_HIRAGANA", for use with the IME.conversionMode property.
+ public static const JAPANESE_HIRAGANA:String = "JAPANESE_HIRAGANA";
- // The string "JAPANESE_KATAKANA_FULL", for use with the IME.conversionMode property.
- public static const JAPANESE_KATAKANA_FULL:String = "JAPANESE_KATAKANA_FULL";
+ // The string "JAPANESE_KATAKANA_FULL", for use with the IME.conversionMode property.
+ public static const JAPANESE_KATAKANA_FULL:String = "JAPANESE_KATAKANA_FULL";
- // The string "JAPANESE_KATAKANA_HALF", for use with the IME.conversionMode property.
- public static const JAPANESE_KATAKANA_HALF:String = "JAPANESE_KATAKANA_HALF";
+ // The string "JAPANESE_KATAKANA_HALF", for use with the IME.conversionMode property.
+ public static const JAPANESE_KATAKANA_HALF:String = "JAPANESE_KATAKANA_HALF";
- // The string "KOREAN", for use with the IME.conversionMode property.
- public static const KOREAN:String = "KOREAN";
+ // The string "KOREAN", for use with the IME.conversionMode property.
+ public static const KOREAN:String = "KOREAN";
- // The string "UNKNOWN", which can be returned by a call to the IME.conversionMode property.
- public static const UNKNOWN:String = "UNKNOWN";
+ // The string "UNKNOWN", which can be returned by a call to the IME.conversionMode property.
+ public static const UNKNOWN:String = "UNKNOWN";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/ImageDecodingPolicy.as b/core/src/avm2/globals/flash/system/ImageDecodingPolicy.as
index 4445524445b6..e25345953f8d 100644
--- a/core/src/avm2/globals/flash/system/ImageDecodingPolicy.as
+++ b/core/src/avm2/globals/flash/system/ImageDecodingPolicy.as
@@ -1,7 +1,9 @@
-package flash.system {
- [API("674")]
- public final class ImageDecodingPolicy {
- public static const ON_DEMAND:String = "onDemand";
- public static const ON_LOAD:String = "onLoad";
- }
+package flash.system
+{
+ [API("674")]
+ public final class ImageDecodingPolicy
+ {
+ public static const ON_DEMAND:String = "onDemand";
+ public static const ON_LOAD:String = "onLoad";
+ }
}
diff --git a/core/src/avm2/globals/flash/system/JPEGLoaderContext.as b/core/src/avm2/globals/flash/system/JPEGLoaderContext.as
index c2b743246c6b..4c7b5e5e5533 100644
--- a/core/src/avm2/globals/flash/system/JPEGLoaderContext.as
+++ b/core/src/avm2/globals/flash/system/JPEGLoaderContext.as
@@ -5,17 +5,17 @@
package flash.system
{
- // Both the docs and playerglobal.swc says this is "663", but it's actually available in regular Flash Player
- [API("662")]
- public class JPEGLoaderContext extends LoaderContext
- {
- // Specifies the strength of the deblocking filter.
- public var deblockingFilter: Number = 0.0;
+ // Both the docs and playerglobal.swc says this is "663", but it's actually available in regular Flash Player
+ [API("662")]
+ public class JPEGLoaderContext extends LoaderContext
+ {
+ // Specifies the strength of the deblocking filter.
+ public var deblockingFilter:Number = 0.0;
- public function JPEGLoaderContext(deblockingFilter:Number = 0.0, checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null)
- {
- super(checkPolicyFile,applicationDomain,securityDomain);
- this.deblockingFilter = deblockingFilter;
- }
- }
+ public function JPEGLoaderContext(deblockingFilter:Number = 0.0, checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null)
+ {
+ super(checkPolicyFile, applicationDomain, securityDomain);
+ this.deblockingFilter = deblockingFilter;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/LoaderContext.as b/core/src/avm2/globals/flash/system/LoaderContext.as
index 0850caf35ff6..cd70963074ca 100644
--- a/core/src/avm2/globals/flash/system/LoaderContext.as
+++ b/core/src/avm2/globals/flash/system/LoaderContext.as
@@ -1,35 +1,40 @@
-package flash.system {
- import flash.display.DisplayObjectContainer;
+package flash.system
+{
+ import flash.display.DisplayObjectContainer;
- public class LoaderContext {
- public var allowCodeImport : Boolean;
- public var applicationDomain : ApplicationDomain;
- public var checkPolicyFile : Boolean;
- [API("674")]
- public var imageDecodingPolicy : String;
- [API("670")]
- public var parameters : Object; // unset by default
- [API("670")]
- public var requestedContentParent : DisplayObjectContainer; // unset by default
- public var securityDomain : SecurityDomain;
+ public class LoaderContext
+ {
+ public var allowCodeImport:Boolean;
+ public var applicationDomain:ApplicationDomain;
+ public var checkPolicyFile:Boolean;
+ [API("674")]
+ public var imageDecodingPolicy:String;
+ [API("670")]
+ public var parameters:Object; // unset by default
+ [API("670")]
+ public var requestedContentParent:DisplayObjectContainer; // unset by default
+ public var securityDomain:SecurityDomain;
- public function LoaderContext(checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null) {
- this.allowCodeImport = true;
- this.applicationDomain = applicationDomain;
- this.checkPolicyFile = checkPolicyFile;
- // This should be `ImageDecodingPolicy.ON_DEMAND;`, but that's an AIR only class.
- this.imageDecodingPolicy = "onDemand";
- this.securityDomain = securityDomain;
- }
+ public function LoaderContext(checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null)
+ {
+ this.allowCodeImport = true;
+ this.applicationDomain = applicationDomain;
+ this.checkPolicyFile = checkPolicyFile;
+ // This should be `ImageDecodingPolicy.ON_DEMAND;`, but that's an AIR only class.
+ this.imageDecodingPolicy = "onDemand";
+ this.securityDomain = securityDomain;
+ }
- [API("661")]
- public function get allowLoadBytesCodeExecution(): Boolean {
- return this.allowCodeImport;
- }
+ [API("661")]
+ public function get allowLoadBytesCodeExecution():Boolean
+ {
+ return this.allowCodeImport;
+ }
- [API("661")]
- public function set allowLoadBytesCodeExecution(value:Boolean): void {
- this.allowCodeImport = value;
- }
- }
+ [API("661")]
+ public function set allowLoadBytesCodeExecution(value:Boolean):void
+ {
+ this.allowCodeImport = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/MessageChannel.as b/core/src/avm2/globals/flash/system/MessageChannel.as
index 71d3a78c992a..0b727663f5b2 100644
--- a/core/src/avm2/globals/flash/system/MessageChannel.as
+++ b/core/src/avm2/globals/flash/system/MessageChannel.as
@@ -1,10 +1,13 @@
-package flash.system {
- import flash.events.EventDispatcher;
+package flash.system
+{
+ import flash.events.EventDispatcher;
- [API("682")]
- public final class MessageChannel extends EventDispatcher {
- public function MessageChannel() {
- super();
- }
- }
+ [API("682")]
+ public final class MessageChannel extends EventDispatcher
+ {
+ public function MessageChannel()
+ {
+ super();
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/MessageChannelState.as b/core/src/avm2/globals/flash/system/MessageChannelState.as
index 8ef77d769957..032412d99a91 100644
--- a/core/src/avm2/globals/flash/system/MessageChannelState.as
+++ b/core/src/avm2/globals/flash/system/MessageChannelState.as
@@ -6,17 +6,17 @@
package flash.system
{
- [API("682")]
- public final class MessageChannelState
- {
- // This state indicates that the message channel has been closed and doesn't have any more messages to deliver.
- public static const CLOSED:String = "closed";
+ [API("682")]
+ public final class MessageChannelState
+ {
+ // This state indicates that the message channel has been closed and doesn't have any more messages to deliver.
+ public static const CLOSED:String = "closed";
- // This state indicates that the message channel has been instructed to close and is in the process of delivering the remaining messages on the channel.
- public static const CLOSING:String = "closing";
+ // This state indicates that the message channel has been instructed to close and is in the process of delivering the remaining messages on the channel.
+ public static const CLOSING:String = "closing";
- // This state indicates that the message channel is open and available for use.
- public static const OPEN:String = "open";
+ // This state indicates that the message channel is open and available for use.
+ public static const OPEN:String = "open";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/Security.as b/core/src/avm2/globals/flash/system/Security.as
index 5ef54247b5d9..18584594c819 100644
--- a/core/src/avm2/globals/flash/system/Security.as
+++ b/core/src/avm2/globals/flash/system/Security.as
@@ -1,12 +1,14 @@
-package flash.system {
- public final class Security {
+package flash.system
+{
+ public final class Security
+ {
public static native function get pageDomain():String;
public static native function get sandboxType():String;
- public static native function allowDomain(... domains):void;
- public static native function allowInsecureDomain(... domains):void;
- public static native function loadPolicyFile(url: String):void;
- public static native function showSettings(panel: String = "default"):void;
+ public static native function allowDomain(...domains):void;
+ public static native function allowInsecureDomain(...domains):void;
+ public static native function loadPolicyFile(url:String):void;
+ public static native function showSettings(panel:String = "default"):void;
[API("661")]
public static const APPLICATION:String = "application";
diff --git a/core/src/avm2/globals/flash/system/SecurityDomain.as b/core/src/avm2/globals/flash/system/SecurityDomain.as
index bebeb4797a77..f42ef11531da 100644
--- a/core/src/avm2/globals/flash/system/SecurityDomain.as
+++ b/core/src/avm2/globals/flash/system/SecurityDomain.as
@@ -1,8 +1,11 @@
-package flash.system {
- public class SecurityDomain {
- private static var dummyDomain : SecurityDomain = new SecurityDomain();
- public static function get currentDomain() : SecurityDomain {
- return dummyDomain;
- }
- }
+package flash.system
+{
+ public class SecurityDomain
+ {
+ private static var dummyDomain:SecurityDomain = new SecurityDomain();
+ public static function get currentDomain():SecurityDomain
+ {
+ return dummyDomain;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/SecurityPanel.as b/core/src/avm2/globals/flash/system/SecurityPanel.as
index 0ddc44744d3d..8a6466353c8d 100644
--- a/core/src/avm2/globals/flash/system/SecurityPanel.as
+++ b/core/src/avm2/globals/flash/system/SecurityPanel.as
@@ -6,28 +6,28 @@
package flash.system
{
- public final class SecurityPanel
- {
- // When passed to Security.showSettings(), displays the Camera panel in Flash Player Settings.
- public static const CAMERA:String = "camera";
+ public final class SecurityPanel
+ {
+ // When passed to Security.showSettings(), displays the Camera panel in Flash Player Settings.
+ public static const CAMERA:String = "camera";
- // When passed to Security.showSettings(), displays the panel that was open the last time the user closed the Flash Player Settings.
- public static const DEFAULT:String = "default";
+ // When passed to Security.showSettings(), displays the panel that was open the last time the user closed the Flash Player Settings.
+ public static const DEFAULT:String = "default";
- // When passed to Security.showSettings(), displays the Display panel in Flash Player Settings.
- public static const DISPLAY:String = "display";
+ // When passed to Security.showSettings(), displays the Display panel in Flash Player Settings.
+ public static const DISPLAY:String = "display";
- // When passed to Security.showSettings(), displays the Local Storage Settings panel in Flash Player Settings.
- public static const LOCAL_STORAGE:String = "localStorage";
+ // When passed to Security.showSettings(), displays the Local Storage Settings panel in Flash Player Settings.
+ public static const LOCAL_STORAGE:String = "localStorage";
- // When passed to Security.showSettings(), displays the Microphone panel in Flash Player Settings.
- public static const MICROPHONE:String = "microphone";
+ // When passed to Security.showSettings(), displays the Microphone panel in Flash Player Settings.
+ public static const MICROPHONE:String = "microphone";
- // When passed to Security.showSettings(), displays the Privacy Settings panel in Flash Player Settings.
- public static const PRIVACY:String = "privacy";
+ // When passed to Security.showSettings(), displays the Privacy Settings panel in Flash Player Settings.
+ public static const PRIVACY:String = "privacy";
- // When passed to Security.showSettings(), displays the Settings Manager (in a separate browser window).
- public static const SETTINGS_MANAGER:String = "settingsManager";
+ // When passed to Security.showSettings(), displays the Settings Manager (in a separate browser window).
+ public static const SETTINGS_MANAGER:String = "settingsManager";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/System.as b/core/src/avm2/globals/flash/system/System.as
index 73044bc0d294..5fe2dd06ec8a 100644
--- a/core/src/avm2/globals/flash/system/System.as
+++ b/core/src/avm2/globals/flash/system/System.as
@@ -1,19 +1,24 @@
-package flash.system {
- public final class System {
- import __ruffle__.stub_method;
+package flash.system
+{
+ public final class System
+ {
+ import __ruffle__.stub_method;
- public static function gc(): void {
+ public static function gc():void
+ {
- }
+ }
- public static function pauseForGCIfCollectionImminent(imminence:Number = 0.75): void {
- stub_method("flash.system.System", "pauseForGCIfCollectionImminent");
- }
+ public static function pauseForGCIfCollectionImminent(imminence:Number = 0.75):void
+ {
+ stub_method("flash.system.System", "pauseForGCIfCollectionImminent");
+ }
- public static native function setClipboard(string:String): void;
+ public static native function setClipboard(string:String):void;
- public static function disposeXML(node:XML):void {
- stub_method("flash.system.System", "disposeXML");
- }
- }
+ public static function disposeXML(node:XML):void
+ {
+ stub_method("flash.system.System", "disposeXML");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/SystemUpdaterType.as b/core/src/avm2/globals/flash/system/SystemUpdaterType.as
index 106152131b72..d900f6c361d0 100644
--- a/core/src/avm2/globals/flash/system/SystemUpdaterType.as
+++ b/core/src/avm2/globals/flash/system/SystemUpdaterType.as
@@ -6,13 +6,13 @@
package flash.system
{
- public class SystemUpdaterType
- {
- // Updates the DRM module.
- public static const DRM:String = "drm";
+ public class SystemUpdaterType
+ {
+ // Updates the DRM module.
+ public static const DRM:String = "drm";
- // Updates the player runtime itself.
- public static const SYSTEM:String = "system";
+ // Updates the player runtime itself.
+ public static const SYSTEM:String = "system";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/TouchscreenType.as b/core/src/avm2/globals/flash/system/TouchscreenType.as
index 93fefe05f3f9..277cb0c59796 100644
--- a/core/src/avm2/globals/flash/system/TouchscreenType.as
+++ b/core/src/avm2/globals/flash/system/TouchscreenType.as
@@ -6,16 +6,16 @@
package flash.system
{
- public final class TouchscreenType
- {
- // A touchscreen designed to respond to finger touches.
- public static const FINGER:String = "finger";
+ public final class TouchscreenType
+ {
+ // A touchscreen designed to respond to finger touches.
+ public static const FINGER:String = "finger";
- // The computer or device does not have a supported touchscreen.
- public static const NONE:String = "none";
+ // The computer or device does not have a supported touchscreen.
+ public static const NONE:String = "none";
- // A touchscreen designed for use with a stylus.
- public static const STYLUS:String = "stylus";
+ // A touchscreen designed for use with a stylus.
+ public static const STYLUS:String = "stylus";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/Worker.as b/core/src/avm2/globals/flash/system/Worker.as
index 74c573a285dc..a780bfa2dd08 100644
--- a/core/src/avm2/globals/flash/system/Worker.as
+++ b/core/src/avm2/globals/flash/system/Worker.as
@@ -1,14 +1,18 @@
-package flash.system {
- import flash.events.EventDispatcher;
+package flash.system
+{
+ import flash.events.EventDispatcher;
- [API("682")]
- public final class Worker extends EventDispatcher {
- public function Worker() {
- throw new ArgumentError("Error #2012: Worker$ class cannot be instantiated.", 2012);
- }
+ [API("682")]
+ public final class Worker extends EventDispatcher
+ {
+ public function Worker()
+ {
+ throw new ArgumentError("Error #2012: Worker$ class cannot be instantiated.", 2012);
+ }
- public static function get isSupported():Boolean {
- return false;
- }
- }
+ public static function get isSupported():Boolean
+ {
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/system/WorkerDomain.as b/core/src/avm2/globals/flash/system/WorkerDomain.as
index c4c114c73b9a..a8a07feacc76 100644
--- a/core/src/avm2/globals/flash/system/WorkerDomain.as
+++ b/core/src/avm2/globals/flash/system/WorkerDomain.as
@@ -1,10 +1,14 @@
-package flash.system {
- [API("680")] // the docs say 682, that's wrong
- public final class WorkerDomain {
- public static const isSupported: Boolean = false;
+package flash.system
+{
+ [API("680")]
+ // the docs say 682, that's wrong
+ public final class WorkerDomain
+ {
+ public static const isSupported:Boolean = false;
- public function WorkerDomain() {
- throw new ArgumentError("Error #2012: WorkerDomain$ class cannot be instantiated.", 2012)
- }
- }
+ public function WorkerDomain()
+ {
+ throw new ArgumentError("Error #2012: WorkerDomain$ class cannot be instantiated.", 2012);
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/system/WorkerState.as b/core/src/avm2/globals/flash/system/WorkerState.as
index 56293c0be8f2..a80704543ab3 100644
--- a/core/src/avm2/globals/flash/system/WorkerState.as
+++ b/core/src/avm2/globals/flash/system/WorkerState.as
@@ -6,17 +6,17 @@
package flash.system
{
- [API("682")]
- public final class WorkerState
- {
- // This state indicates that an object that represents the new worker has been created, but the worker is not executing code.
- public static const NEW:String = "new";
+ [API("682")]
+ public final class WorkerState
+ {
+ // This state indicates that an object that represents the new worker has been created, but the worker is not executing code.
+ public static const NEW:String = "new";
- // This state indicates that the worker has begun executing application code and it has not been instructed to stop execution.
- public static const RUNNING:String = "running";
+ // This state indicates that the worker has begun executing application code and it has not been instructed to stop execution.
+ public static const RUNNING:String = "running";
- // This state indicates that the worker has been stopped by code in another worker calling this Worker object's terminate() method.
- public static const TERMINATED:String = "terminated";
+ // This state indicates that the worker has been stopped by code in another worker calling this Worker object's terminate() method.
+ public static const TERMINATED:String = "terminated";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/AntiAliasType.as b/core/src/avm2/globals/flash/text/AntiAliasType.as
index e0a75a696ad7..41f5999910d6 100644
--- a/core/src/avm2/globals/flash/text/AntiAliasType.as
+++ b/core/src/avm2/globals/flash/text/AntiAliasType.as
@@ -1,5 +1,7 @@
-package flash.text {
- public final class AntiAliasType {
+package flash.text
+{
+ public final class AntiAliasType
+ {
public static const ADVANCED:String = "advanced";
public static const NORMAL:String = "normal";
}
diff --git a/core/src/avm2/globals/flash/text/CSMSettings.as b/core/src/avm2/globals/flash/text/CSMSettings.as
index d8b27c65351e..d0465557f41f 100644
--- a/core/src/avm2/globals/flash/text/CSMSettings.as
+++ b/core/src/avm2/globals/flash/text/CSMSettings.as
@@ -1,16 +1,19 @@
-package flash.text {
- public final class CSMSettings {
+package flash.text
+{
+ public final class CSMSettings
+ {
- public var fontSize:Number;
-
- public var insideCutoff:Number;
-
- public var outsideCutoff:Number;
-
- public function CSMSettings(fontSize:Number, insideCutoff:Number, outsideCutoff:Number) {
- this.fontSize = fontSize;
- this.insideCutoff = insideCutoff;
- this.outsideCutoff = outsideCutoff;
- }
- }
+ public var fontSize:Number;
+
+ public var insideCutoff:Number;
+
+ public var outsideCutoff:Number;
+
+ public function CSMSettings(fontSize:Number, insideCutoff:Number, outsideCutoff:Number)
+ {
+ this.fontSize = fontSize;
+ this.insideCutoff = insideCutoff;
+ this.outsideCutoff = outsideCutoff;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/Font.as b/core/src/avm2/globals/flash/text/Font.as
index ccebcecada75..d81cfdde1b33 100644
--- a/core/src/avm2/globals/flash/text/Font.as
+++ b/core/src/avm2/globals/flash/text/Font.as
@@ -1,13 +1,15 @@
-package flash.text {
- [Ruffle(InstanceAllocator)]
- public class Font {
- public static native function enumerateFonts(enumerateDeviceFonts:Boolean = false):Array;
- public static native function registerFont(font:Class):void;
+package flash.text
+{
+ [Ruffle(InstanceAllocator)]
+ public class Font
+ {
+ public static native function enumerateFonts(enumerateDeviceFonts:Boolean = false):Array;
+ public static native function registerFont(font:Class):void;
- public native function get fontName():String;
- public native function get fontStyle():String;
- public native function get fontType():String;
+ public native function get fontName():String;
+ public native function get fontStyle():String;
+ public native function get fontType():String;
- public native function hasGlyphs(str:String):Boolean;
- }
+ public native function hasGlyphs(str:String):Boolean;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/text/FontStyle.as b/core/src/avm2/globals/flash/text/FontStyle.as
index 596c5f4152ff..a1baab8d4f71 100644
--- a/core/src/avm2/globals/flash/text/FontStyle.as
+++ b/core/src/avm2/globals/flash/text/FontStyle.as
@@ -1,8 +1,10 @@
-package flash.text {
- public final class FontStyle {
- public static const REGULAR: String = "regular";
- public static const BOLD: String = "bold";
- public static const ITALIC: String = "italic";
- public static const BOLD_ITALIC: String = "boldItalic";
- }
+package flash.text
+{
+ public final class FontStyle
+ {
+ public static const REGULAR:String = "regular";
+ public static const BOLD:String = "bold";
+ public static const ITALIC:String = "italic";
+ public static const BOLD_ITALIC:String = "boldItalic";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/FontType.as b/core/src/avm2/globals/flash/text/FontType.as
index 3b056b7b9b12..04879b05f8ae 100644
--- a/core/src/avm2/globals/flash/text/FontType.as
+++ b/core/src/avm2/globals/flash/text/FontType.as
@@ -1,7 +1,9 @@
-package flash.text {
- public final class FontType {
- public static const EMBEDDED: String = "embedded";
- public static const EMBEDDED_CFF: String = "embeddedCFF";
- public static const DEVICE: String = "device";
- }
+package flash.text
+{
+ public final class FontType
+ {
+ public static const EMBEDDED:String = "embedded";
+ public static const EMBEDDED_CFF:String = "embeddedCFF";
+ public static const DEVICE:String = "device";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/GridFitType.as b/core/src/avm2/globals/flash/text/GridFitType.as
index 72191dddc3c7..3fb3a8702e5e 100644
--- a/core/src/avm2/globals/flash/text/GridFitType.as
+++ b/core/src/avm2/globals/flash/text/GridFitType.as
@@ -1,7 +1,9 @@
-package flash.text {
- public final class GridFitType {
- public static const NONE: String = "none";
- public static const PIXEL: String = "pixel";
- public static const SUBPIXEL: String = "subpixel";
- }
+package flash.text
+{
+ public final class GridFitType
+ {
+ public static const NONE:String = "none";
+ public static const PIXEL:String = "pixel";
+ public static const SUBPIXEL:String = "subpixel";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/StaticText.as b/core/src/avm2/globals/flash/text/StaticText.as
index 9fcb1f352684..5c0835cc8b21 100644
--- a/core/src/avm2/globals/flash/text/StaticText.as
+++ b/core/src/avm2/globals/flash/text/StaticText.as
@@ -1,8 +1,10 @@
-package flash.text {
- import flash.display.DisplayObject;
-
- [Ruffle(InstanceAllocator)]
- public final class StaticText extends DisplayObject {
- public native function get text():String;
- }
+package flash.text
+{
+ import flash.display.DisplayObject;
+
+ [Ruffle(InstanceAllocator)]
+ public final class StaticText extends DisplayObject
+ {
+ public native function get text():String;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/text/StyleSheet.as b/core/src/avm2/globals/flash/text/StyleSheet.as
index 378fc09986a1..6f5a4f3a4ea6 100644
--- a/core/src/avm2/globals/flash/text/StyleSheet.as
+++ b/core/src/avm2/globals/flash/text/StyleSheet.as
@@ -1,135 +1,176 @@
-package flash.text {
- import flash.events.EventDispatcher;
-
- public dynamic class StyleSheet extends EventDispatcher {
- // Shallow copies of the original style objects. Not used by Ruffle itself, just for getStyle()
- private var _styles: Object = {};
-
- public function StyleSheet() {}
-
- public function get styleNames():Array {
- var result = [];
- for (var key in _styles) {
- result.push(key);
- }
- return result;
- }
-
- public function clear():void {
- _styles = {};
- }
-
- public function getStyle(styleName:String):Object {
- return _createShallowCopy(_styles[styleName.toLowerCase()]);
- }
-
- public function parseCSS(CSSText:String):void {
- var parsed = innerParseCss(CSSText);
- if (!parsed) {
- // No thrown errors, silent failure. If the whole thing doesn't parse, just ignore it all.
- return;
- }
-
- for (var key in parsed) {
- setStyle(key, parsed[key]);
- }
- }
-
- public function setStyle(styleName:String, styleObject:Object):void {
- _styles[styleName.toLowerCase()] = _createShallowCopy(styleObject);
- transform(_createShallowCopy(styleObject)); // TODO: Store this in a way that Rust can access it, when we implement `TextField.stylesheet`
- }
-
- public function transform(formatObject:Object):TextFormat {
- if (!formatObject) {
- return null;
- }
- var result = new TextFormat();
-
- if (formatObject.color) {
- result.color = innerParseColor(formatObject.color);
- }
-
- if (formatObject.display) {
- result.display = formatObject.display;
- }
-
- if (formatObject.fontFamily) {
- result.font = innerParseFontFamily(formatObject.fontFamily);
- }
-
- if (formatObject.fontSize) {
- var size = parseInt(formatObject.fontSize);
- if (size > 0) {
- result.size = size;
- }
- }
-
- if (formatObject.fontStyle == "italic") {
- result.italic = true;
- } else if (formatObject.fontStyle == "normal") {
- result.italic = false;
- }
-
- if (formatObject.fontWeight == "bold") {
- result.bold = true;
- } else if (formatObject.fontWeight == "normal") {
- result.bold = false;
- }
-
- if (formatObject.kerning == "true") {
- result.kerning = true;
- } else if (formatObject.kerning == "false") {
- result.kerning = false;
- } else {
- // Seems to always set, not just if defined
- result.kerning = parseInt(formatObject.kerning);
- }
-
- if (formatObject.leading) {
- result.leading = parseInt(formatObject.leading);
- }
-
- if (formatObject.letterSpacing) {
- result.letterSpacing = parseFloat(formatObject.letterSpacing);
- }
-
- if (formatObject.marginLeft) {
- result.leftMargin = parseFloat(formatObject.marginLeft);
- }
-
- if (formatObject.marginRight) {
- result.rightMargin = parseFloat(formatObject.marginRight);
- }
-
- if (formatObject.textAlign) {
- result.align = formatObject.textAlign;
- }
-
- if (formatObject.textDecoration == "underline") {
- result.underline = true;
- } else if (formatObject.textDecoration == "none") {
- result.underline = false;
- }
-
- if (formatObject.textIndent) {
- result.indent = parseInt(formatObject.textIndent);
- }
-
- return result;
- }
-
- private function _createShallowCopy(original: *): Object {
- var copy = {};
- for (var key in original) {
- copy[key] = original[key];
- }
- return copy;
- }
-
- // Avoid doing potentially expensive string parsing in AS :D
- private native function innerParseCss(css: String): Object;
- private native function innerParseColor(color: String): Number;
- private native function innerParseFontFamily(fontFamily: String): String;
- }
+package flash.text
+{
+ import flash.events.EventDispatcher;
+
+ public dynamic class StyleSheet extends EventDispatcher
+ {
+ // Shallow copies of the original style objects. Not used by Ruffle itself, just for getStyle()
+ private var _styles:Object = {};
+
+ public function StyleSheet()
+ {
+ }
+
+ public function get styleNames():Array
+ {
+ var result = [];
+ for (var key in _styles)
+ {
+ result.push(key);
+ }
+ return result;
+ }
+
+ public function clear():void
+ {
+ _styles = {};
+ }
+
+ public function getStyle(styleName:String):Object
+ {
+ return _createShallowCopy(_styles[styleName.toLowerCase()]);
+ }
+
+ public function parseCSS(CSSText:String):void
+ {
+ var parsed = innerParseCss(CSSText);
+ if (!parsed)
+ {
+ // No thrown errors, silent failure. If the whole thing doesn't parse, just ignore it all.
+ return;
+ }
+
+ for (var key in parsed)
+ {
+ setStyle(key, parsed[key]);
+ }
+ }
+
+ public function setStyle(styleName:String, styleObject:Object):void
+ {
+ _styles[styleName.toLowerCase()] = _createShallowCopy(styleObject);
+ transform(_createShallowCopy(styleObject)); // TODO: Store this in a way that Rust can access it, when we implement `TextField.stylesheet`
+ }
+
+ public function transform(formatObject:Object):TextFormat
+ {
+ if (!formatObject)
+ {
+ return null;
+ }
+ var result = new TextFormat();
+
+ if (formatObject.color)
+ {
+ result.color = innerParseColor(formatObject.color);
+ }
+
+ if (formatObject.display)
+ {
+ result.display = formatObject.display;
+ }
+
+ if (formatObject.fontFamily)
+ {
+ result.font = innerParseFontFamily(formatObject.fontFamily);
+ }
+
+ if (formatObject.fontSize)
+ {
+ var size = parseInt(formatObject.fontSize);
+ if (size > 0)
+ {
+ result.size = size;
+ }
+ }
+
+ if (formatObject.fontStyle == "italic")
+ {
+ result.italic = true;
+ }
+ else if (formatObject.fontStyle == "normal")
+ {
+ result.italic = false;
+ }
+
+ if (formatObject.fontWeight == "bold")
+ {
+ result.bold = true;
+ }
+ else if (formatObject.fontWeight == "normal")
+ {
+ result.bold = false;
+ }
+
+ if (formatObject.kerning == "true")
+ {
+ result.kerning = true;
+ }
+ else if (formatObject.kerning == "false")
+ {
+ result.kerning = false;
+ }
+ else
+ {
+ // Seems to always set, not just if defined
+ result.kerning = parseInt(formatObject.kerning);
+ }
+
+ if (formatObject.leading)
+ {
+ result.leading = parseInt(formatObject.leading);
+ }
+
+ if (formatObject.letterSpacing)
+ {
+ result.letterSpacing = parseFloat(formatObject.letterSpacing);
+ }
+
+ if (formatObject.marginLeft)
+ {
+ result.leftMargin = parseFloat(formatObject.marginLeft);
+ }
+
+ if (formatObject.marginRight)
+ {
+ result.rightMargin = parseFloat(formatObject.marginRight);
+ }
+
+ if (formatObject.textAlign)
+ {
+ result.align = formatObject.textAlign;
+ }
+
+ if (formatObject.textDecoration == "underline")
+ {
+ result.underline = true;
+ }
+ else if (formatObject.textDecoration == "none")
+ {
+ result.underline = false;
+ }
+
+ if (formatObject.textIndent)
+ {
+ result.indent = parseInt(formatObject.textIndent);
+ }
+
+ return result;
+ }
+
+ private function _createShallowCopy(original:*):Object
+ {
+ var copy = {};
+ for (var key in original)
+ {
+ copy[key] = original[key];
+ }
+ return copy;
+ }
+
+ // Avoid doing potentially expensive string parsing in AS :D
+ private native function innerParseCss(css:String):Object;
+ private native function innerParseColor(color:String):Number;
+ private native function innerParseFontFamily(fontFamily:String):String;
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextColorType.as b/core/src/avm2/globals/flash/text/TextColorType.as
index 59f8e59c22d8..efcd12574841 100644
--- a/core/src/avm2/globals/flash/text/TextColorType.as
+++ b/core/src/avm2/globals/flash/text/TextColorType.as
@@ -1,6 +1,8 @@
-package flash.text {
- public final class TextColorType {
- public static const DARK_COLOR: String = "dark";
- public static const LIGHT_COLOR: String = "light";
- }
+package flash.text
+{
+ public final class TextColorType
+ {
+ public static const DARK_COLOR:String = "dark";
+ public static const LIGHT_COLOR:String = "light";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextDisplayMode.as b/core/src/avm2/globals/flash/text/TextDisplayMode.as
index 92b66ffa1c8a..d4d99e8c70fd 100644
--- a/core/src/avm2/globals/flash/text/TextDisplayMode.as
+++ b/core/src/avm2/globals/flash/text/TextDisplayMode.as
@@ -1,7 +1,9 @@
-package flash.text {
- public final class TextDisplayMode {
- public static const LCD: String = "lcd";
- public static const CRT: String = "crt";
- public static const DEFAULT: String = "default";
- }
+package flash.text
+{
+ public final class TextDisplayMode
+ {
+ public static const LCD:String = "lcd";
+ public static const CRT:String = "crt";
+ public static const DEFAULT:String = "default";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextExtent.as b/core/src/avm2/globals/flash/text/TextExtent.as
index 6f57d6e8fa57..8e1ce557951d 100644
--- a/core/src/avm2/globals/flash/text/TextExtent.as
+++ b/core/src/avm2/globals/flash/text/TextExtent.as
@@ -1,19 +1,22 @@
-package flash.text {
- public class TextExtent {
- public var width: Number;
- public var height: Number;
- public var textFieldWidth: Number;
- public var textFieldHeight: Number;
- public var ascent: Number;
- public var descent: Number;
+package flash.text
+{
+ public class TextExtent
+ {
+ public var width:Number;
+ public var height:Number;
+ public var textFieldWidth:Number;
+ public var textFieldHeight:Number;
+ public var ascent:Number;
+ public var descent:Number;
- public function TextExtent(width: Number, height: Number, textFieldWidth: Number, textFieldHeight: Number, ascent: Number, descent: Number) {
- this.width = width;
- this.height = height;
- this.textFieldWidth = textFieldWidth;
- this.textFieldHeight = textFieldHeight;
- this.ascent = ascent;
- this.descent = descent;
- }
- }
+ public function TextExtent(width:Number, height:Number, textFieldWidth:Number, textFieldHeight:Number, ascent:Number, descent:Number)
+ {
+ this.width = width;
+ this.height = height;
+ this.textFieldWidth = textFieldWidth;
+ this.textFieldHeight = textFieldHeight;
+ this.ascent = ascent;
+ this.descent = descent;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextField.as b/core/src/avm2/globals/flash/text/TextField.as
index b0326ccee604..4095dc67f95d 100644
--- a/core/src/avm2/globals/flash/text/TextField.as
+++ b/core/src/avm2/globals/flash/text/TextField.as
@@ -1,177 +1,187 @@
-package flash.text {
- import flash.display.InteractiveObject;
- import flash.display.DisplayObject;
- import flash.geom.Rectangle;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
- import __ruffle__.stub_method;
+package flash.text
+{
+ import flash.display.InteractiveObject;
+ import flash.display.DisplayObject;
+ import flash.geom.Rectangle;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+ import __ruffle__.stub_method;
- [Ruffle(InstanceAllocator)]
- public class TextField extends InteractiveObject {
- internal var _styleSheet:StyleSheet;
- internal var _useRichTextClipboard:Boolean;
+ [Ruffle(InstanceAllocator)]
+ public class TextField extends InteractiveObject
+ {
+ internal var _styleSheet:StyleSheet;
+ internal var _useRichTextClipboard:Boolean;
- public native function get alwaysShowSelection():Boolean;
- public native function set alwaysShowSelection(value:Boolean):void;
+ public native function get alwaysShowSelection():Boolean;
+ public native function set alwaysShowSelection(value:Boolean):void;
- public native function get autoSize():String;
- public native function set autoSize(value:String):void;
+ public native function get autoSize():String;
+ public native function set autoSize(value:String):void;
- public native function get background():Boolean;
- public native function set background(value:Boolean):void;
+ public native function get background():Boolean;
+ public native function set background(value:Boolean):void;
- public native function get backgroundColor():uint;
- public native function set backgroundColor(value:uint):void;
+ public native function get backgroundColor():uint;
+ public native function set backgroundColor(value:uint):void;
- public native function get border():Boolean;
- public native function set border(value:Boolean):void;
+ public native function get border():Boolean;
+ public native function set border(value:Boolean):void;
- public native function get borderColor():uint;
- public native function set borderColor(value:uint):void;
+ public native function get borderColor():uint;
+ public native function set borderColor(value:uint):void;
- public native function get bottomScrollV():int;
+ public native function get bottomScrollV():int;
- public native function get condenseWhite():Boolean
- public native function set condenseWhite(value:Boolean):void
+ public native function get condenseWhite():Boolean;
+ public native function set condenseWhite(value:Boolean):void;
- public native function get defaultTextFormat():TextFormat;
- public native function set defaultTextFormat(value:TextFormat):void;
+ public native function get defaultTextFormat():TextFormat;
+ public native function set defaultTextFormat(value:TextFormat):void;
- public native function get displayAsPassword():Boolean;
- public native function set displayAsPassword(value:Boolean):void;
+ public native function get displayAsPassword():Boolean;
+ public native function set displayAsPassword(value:Boolean):void;
- public native function get embedFonts():Boolean;
- public native function set embedFonts(value:Boolean):void;
+ public native function get embedFonts():Boolean;
+ public native function set embedFonts(value:Boolean):void;
- public native function get htmlText():String;
- public native function set htmlText(value:String):void;
+ public native function get htmlText():String;
+ public native function set htmlText(value:String):void;
- public native function get length():int;
+ public native function get length():int;
- public native function get maxScrollH():int;
+ public native function get maxScrollH():int;
- public native function get maxScrollV():int;
+ public native function get maxScrollV():int;
- public native function get maxChars():int;
- public native function set maxChars(value:int):void;
+ public native function get maxChars():int;
+ public native function set maxChars(value:int):void;
- public native function get mouseWheelEnabled():Boolean
- public native function set mouseWheelEnabled(value:Boolean):void
+ public native function get mouseWheelEnabled():Boolean;
+ public native function set mouseWheelEnabled(value:Boolean):void;
- public native function get multiline():Boolean;
- public native function set multiline(value:Boolean):void;
+ public native function get multiline():Boolean;
+ public native function set multiline(value:Boolean):void;
- public native function get restrict():String;
- public native function set restrict(value:String):void;
+ public native function get restrict():String;
+ public native function set restrict(value:String):void;
- public native function get scrollH():int;
- public native function set scrollH(value:int):void;
+ public native function get scrollH():int;
+ public native function set scrollH(value:int):void;
- public native function get scrollV():int;
- public native function set scrollV(value:int):void;
+ public native function get scrollV():int;
+ public native function set scrollV(value:int):void;
- public native function get selectable():Boolean;
- public native function set selectable(value:Boolean):void;
+ public native function get selectable():Boolean;
+ public native function set selectable(value:Boolean):void;
- public function get styleSheet():StyleSheet {
- return this._styleSheet;
- }
- public function set styleSheet(value:StyleSheet):void {
- this._styleSheet = value;
- stub_setter("flash.text.TextField", "styleSheet");
- }
+ public function get styleSheet():StyleSheet
+ {
+ return this._styleSheet;
+ }
+ public function set styleSheet(value:StyleSheet):void
+ {
+ this._styleSheet = value;
+ stub_setter("flash.text.TextField", "styleSheet");
+ }
- public native function get text():String;
- public native function set text(value:String):void;
+ public native function get text():String;
+ public native function set text(value:String):void;
- public native function get textColor():uint;
- public native function set textColor(value:uint):void;
+ public native function get textColor():uint;
+ public native function set textColor(value:uint):void;
- public native function get textHeight():Number;
+ public native function get textHeight():Number;
- public native function get textWidth():Number;
+ public native function get textWidth():Number;
- public native function get type():String;
- public native function set type(value:String):void;
+ public native function get type():String;
+ public native function set type(value:String):void;
- public function get useRichTextClipboard():Boolean {
- return this._useRichTextClipboard;
- }
+ public function get useRichTextClipboard():Boolean
+ {
+ return this._useRichTextClipboard;
+ }
- public function set useRichTextClipboard(value:Boolean):void {
- this._useRichTextClipboard = value;
- stub_setter("flash.text.TextField", "useRichTextClipboard");
- }
+ public function set useRichTextClipboard(value:Boolean):void
+ {
+ this._useRichTextClipboard = value;
+ stub_setter("flash.text.TextField", "useRichTextClipboard");
+ }
- public native function get wordWrap():Boolean;
- public native function set wordWrap(value:Boolean):void;
+ public native function get wordWrap():Boolean;
+ public native function set wordWrap(value:Boolean):void;
- public native function get antiAliasType():String;
- public native function set antiAliasType(value:String):void;
+ public native function get antiAliasType():String;
+ public native function set antiAliasType(value:String):void;
- public native function get gridFitType():String;
- public native function set gridFitType(value:String):void;
+ public native function get gridFitType():String;
+ public native function set gridFitType(value:String):void;
- public native function get thickness():Number;
- public native function set thickness(value:Number):void;
+ public native function get thickness():Number;
+ public native function set thickness(value:Number):void;
- public native function get sharpness():Number;
- public native function set sharpness(value:Number):void;
+ public native function get sharpness():Number;
+ public native function set sharpness(value:Number):void;
- public native function get numLines():int;
+ public native function get numLines():int;
- public native function get caretIndex(): int;
+ public native function get caretIndex():int;
- public native function get selectionBeginIndex(): int;
- public native function get selectionEndIndex(): int;
+ public native function get selectionBeginIndex():int;
+ public native function get selectionEndIndex():int;
- public native function appendText(text:String):void;
- public native function getLineMetrics(lineIndex:int):TextLineMetrics;
- public native function getTextFormat(beginIndex:int = -1, endIndex:int = -1):TextFormat;
- public native function setTextFormat(format:TextFormat, beginIndex:int = -1, endIndex:int = -1):void;
- public native function replaceSelectedText(value:String):void;
- public native function replaceText(beginIndex:int, endIndex:int, newText:String):void;
- public native function setSelection(beginIndex:int, endIndex:int):void;
- public native function getTextRuns():Array;
+ public native function appendText(text:String):void;
+ public native function getLineMetrics(lineIndex:int):TextLineMetrics;
+ public native function getTextFormat(beginIndex:int = -1, endIndex:int = -1):TextFormat;
+ public native function setTextFormat(format:TextFormat, beginIndex:int = -1, endIndex:int = -1):void;
+ public native function replaceSelectedText(value:String):void;
+ public native function replaceText(beginIndex:int, endIndex:int, newText:String):void;
+ public native function setSelection(beginIndex:int, endIndex:int):void;
+ public native function getTextRuns():Array;
- public native function get selectedText():String;
+ public native function get selectedText():String;
- public function insertXMLText(beginIndex:int, endIndex:int, text:String, paste:Boolean = false):void {
- stub_method("flash.text.TextField", "insertXMLText");
- }
+ public function insertXMLText(beginIndex:int, endIndex:int, text:String, paste:Boolean = false):void
+ {
+ stub_method("flash.text.TextField", "insertXMLText");
+ }
- public native function getCharIndexAtPoint(x:Number, y:Number):int;
+ public native function getCharIndexAtPoint(x:Number, y:Number):int;
- public native function getLineLength(lineIndex:int):int;
+ public native function getLineLength(lineIndex:int):int;
- public native function getLineText(lineIndex:int):String;
+ public native function getLineText(lineIndex:int):String;
- public native function getLineOffset(lineIndex:int):int;
+ public native function getLineOffset(lineIndex:int):int;
- public native function getCharBoundaries(charIndex:int):Rectangle;
+ public native function getCharBoundaries(charIndex:int):Rectangle;
- public native function getFirstCharInParagraph(charIndex:int):int;
+ public native function getFirstCharInParagraph(charIndex:int):int;
- public function getImageReference(id:String):DisplayObject {
- stub_method("flash.text.TextField", "getImageReference");
- return null;
- }
+ public function getImageReference(id:String):DisplayObject
+ {
+ stub_method("flash.text.TextField", "getImageReference");
+ return null;
+ }
- public native function getLineIndexAtPoint(x:Number, y:Number):int;
+ public native function getLineIndexAtPoint(x:Number, y:Number):int;
- public native function getLineIndexOfChar(charIndex:int):int;
+ public native function getLineIndexOfChar(charIndex:int):int;
- public native function getParagraphLength(charIndex:int):int;
+ public native function getParagraphLength(charIndex:int):int;
- public static function isFontCompatible(fontName:String, fontStyle:String):Boolean {
- stub_method("flash.text.TextField", "isFontCompatible");
- return true;
- }
+ public static function isFontCompatible(fontName:String, fontStyle:String):Boolean
+ {
+ stub_method("flash.text.TextField", "isFontCompatible");
+ return true;
+ }
- [API("670")]
- public function get textInteractionMode():String {
- stub_getter("flash.text.TextField", "textInteractionMode");
- return TextInteractionMode.NORMAL;
- }
- }
+ [API("670")]
+ public function get textInteractionMode():String
+ {
+ stub_getter("flash.text.TextField", "textInteractionMode");
+ return TextInteractionMode.NORMAL;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextFieldAutoSize.as b/core/src/avm2/globals/flash/text/TextFieldAutoSize.as
index 66a0a1d5886b..dea1c51372cf 100644
--- a/core/src/avm2/globals/flash/text/TextFieldAutoSize.as
+++ b/core/src/avm2/globals/flash/text/TextFieldAutoSize.as
@@ -1,8 +1,10 @@
-package flash.text {
- public final class TextFieldAutoSize {
- public static const NONE: String = "none";
- public static const LEFT: String = "left";
- public static const CENTER: String = "center";
- public static const RIGHT: String = "right";
- }
+package flash.text
+{
+ public final class TextFieldAutoSize
+ {
+ public static const NONE:String = "none";
+ public static const LEFT:String = "left";
+ public static const CENTER:String = "center";
+ public static const RIGHT:String = "right";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextFieldType.as b/core/src/avm2/globals/flash/text/TextFieldType.as
index cb5be99d80c8..1e25185e7ca8 100644
--- a/core/src/avm2/globals/flash/text/TextFieldType.as
+++ b/core/src/avm2/globals/flash/text/TextFieldType.as
@@ -1,6 +1,8 @@
-package flash.text {
- public final class TextFieldType {
- public static const INPUT: String = "input";
- public static const DYNAMIC: String = "dynamic";
- }
+package flash.text
+{
+ public final class TextFieldType
+ {
+ public static const INPUT:String = "input";
+ public static const DYNAMIC:String = "dynamic";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextFormat.as b/core/src/avm2/globals/flash/text/TextFormat.as
index 24496674ad20..8d035b5fe9d4 100644
--- a/core/src/avm2/globals/flash/text/TextFormat.as
+++ b/core/src/avm2/globals/flash/text/TextFormat.as
@@ -1,63 +1,79 @@
-package flash.text {
+package flash.text
+{
- [Ruffle(InstanceAllocator)]
- public class TextFormat {
- public function TextFormat(
- font:String = null, size:Object = null, color:Object = null, bold:Object = null, italic:Object = null, underline:Object = null,
- url:String = null, target:String = null, align:String = null, leftMargin:Object = null, rightMargin:Object = null, indent:Object = null, leading:Object = null
- ) {
- if (font != null) this.font = font;
- if (size != null) this.size = size;
- if (color != null) this.color = color;
- if (bold != null) this.bold = bold;
- if (italic != null) this.italic = italic;
- if (underline != null) this.underline = underline;
- if (url != null) this.url = url;
- if (target != null) this.target = target;
- if (align != null) this.align = align;
- if (leftMargin != null) this.leftMargin = leftMargin;
- if (rightMargin != null) this.rightMargin = rightMargin;
- if (indent != null) this.indent = indent;
- if (leading != null) this.leading = leading;
- }
+ [Ruffle(InstanceAllocator)]
+ public class TextFormat
+ {
+ public function TextFormat(
+ font:String = null, size:Object = null, color:Object = null, bold:Object = null, italic:Object = null, underline:Object = null,
+ url:String = null, target:String = null, align:String = null, leftMargin:Object = null, rightMargin:Object = null, indent:Object = null, leading:Object = null
+ )
+ {
+ if (font != null)
+ this.font = font;
+ if (size != null)
+ this.size = size;
+ if (color != null)
+ this.color = color;
+ if (bold != null)
+ this.bold = bold;
+ if (italic != null)
+ this.italic = italic;
+ if (underline != null)
+ this.underline = underline;
+ if (url != null)
+ this.url = url;
+ if (target != null)
+ this.target = target;
+ if (align != null)
+ this.align = align;
+ if (leftMargin != null)
+ this.leftMargin = leftMargin;
+ if (rightMargin != null)
+ this.rightMargin = rightMargin;
+ if (indent != null)
+ this.indent = indent;
+ if (leading != null)
+ this.leading = leading;
+ }
- public native function get align(): String;
- public native function set align(param1:String): void;
- public native function get blockIndent(): Object;
- public native function set blockIndent(param1:Object): void;
- public native function get bold(): Object;
- public native function set bold(param1:Object): void;
- public native function get bullet(): Object;
- public native function set bullet(param1:Object): void;
- public native function get color(): Object;
- public native function set color(param1:Object): void;
- public native function get display(): String;
- public native function set display(param1:String): void;
- public native function get font(): String;
- public native function set font(param1:String): void;
- public native function get indent(): Object;
- public native function set indent(param1:Object): void;
- public native function get italic(): Object;
- public native function set italic(param1:Object): void;
- public native function get kerning(): Object;
- public native function set kerning(param1:Object): void;
- public native function get leading(): Object;
- public native function set leading(param1:Object): void;
- public native function get leftMargin(): Object;
- public native function set leftMargin(param1:Object): void;
- public native function get letterSpacing(): Object;
- public native function set letterSpacing(param1:Object): void;
- public native function get rightMargin(): Object;
- public native function set rightMargin(param1:Object): void;
- public native function get size(): Object;
- public native function set size(param1:Object): void;
- public native function get tabStops(): Array;
- public native function set tabStops(param1:Array): void;
- public native function get target(): String;
- public native function set target(param1:String): void;
- public native function get underline(): Object;
- public native function set underline(param1:Object): void;
- public native function get url(): String;
- public native function set url(param1:String): void;
- }
+ public native function get align():String;
+ public native function set align(param1:String):void;
+ public native function get blockIndent():Object;
+ public native function set blockIndent(param1:Object):void;
+ public native function get bold():Object;
+ public native function set bold(param1:Object):void;
+ public native function get bullet():Object;
+ public native function set bullet(param1:Object):void;
+ public native function get color():Object;
+ public native function set color(param1:Object):void;
+ public native function get display():String;
+ public native function set display(param1:String):void;
+ public native function get font():String;
+ public native function set font(param1:String):void;
+ public native function get indent():Object;
+ public native function set indent(param1:Object):void;
+ public native function get italic():Object;
+ public native function set italic(param1:Object):void;
+ public native function get kerning():Object;
+ public native function set kerning(param1:Object):void;
+ public native function get leading():Object;
+ public native function set leading(param1:Object):void;
+ public native function get leftMargin():Object;
+ public native function set leftMargin(param1:Object):void;
+ public native function get letterSpacing():Object;
+ public native function set letterSpacing(param1:Object):void;
+ public native function get rightMargin():Object;
+ public native function set rightMargin(param1:Object):void;
+ public native function get size():Object;
+ public native function set size(param1:Object):void;
+ public native function get tabStops():Array;
+ public native function set tabStops(param1:Array):void;
+ public native function get target():String;
+ public native function set target(param1:String):void;
+ public native function get underline():Object;
+ public native function set underline(param1:Object):void;
+ public native function get url():String;
+ public native function set url(param1:String):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/text/TextFormatAlign.as b/core/src/avm2/globals/flash/text/TextFormatAlign.as
index b221c65d9ec6..870598f69190 100644
--- a/core/src/avm2/globals/flash/text/TextFormatAlign.as
+++ b/core/src/avm2/globals/flash/text/TextFormatAlign.as
@@ -1,10 +1,12 @@
-package flash.text {
- public final class TextFormatAlign {
- public static const LEFT: String = "left";
- public static const CENTER: String = "center";
- public static const RIGHT: String = "right";
- public static const JUSTIFY: String = "justify";
- public static const START: String = "start";
- public static const END: String = "end";
- }
+package flash.text
+{
+ public final class TextFormatAlign
+ {
+ public static const LEFT:String = "left";
+ public static const CENTER:String = "center";
+ public static const RIGHT:String = "right";
+ public static const JUSTIFY:String = "justify";
+ public static const START:String = "start";
+ public static const END:String = "end";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextFormatDisplay.as b/core/src/avm2/globals/flash/text/TextFormatDisplay.as
index 6ca44b57c7c1..9bc0253198d2 100644
--- a/core/src/avm2/globals/flash/text/TextFormatDisplay.as
+++ b/core/src/avm2/globals/flash/text/TextFormatDisplay.as
@@ -1,6 +1,8 @@
-package flash.text {
- public final class TextFormatDisplay {
- public static const BLOCK: String = "block";
- public static const INLINE: String = "inline";
- }
+package flash.text
+{
+ public final class TextFormatDisplay
+ {
+ public static const BLOCK:String = "block";
+ public static const INLINE:String = "inline";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextInteractionMode.as b/core/src/avm2/globals/flash/text/TextInteractionMode.as
index ee802a032b8a..06b6cc633d88 100644
--- a/core/src/avm2/globals/flash/text/TextInteractionMode.as
+++ b/core/src/avm2/globals/flash/text/TextInteractionMode.as
@@ -1,6 +1,8 @@
-package flash.text {
- public final class TextInteractionMode {
- public static const NORMAL: String = "normal";
- public static const SELECTION: String = "selection";
- }
+package flash.text
+{
+ public final class TextInteractionMode
+ {
+ public static const NORMAL:String = "normal";
+ public static const SELECTION:String = "selection";
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextLineMetrics.as b/core/src/avm2/globals/flash/text/TextLineMetrics.as
index b086402c8459..4d9a0fc0b244 100644
--- a/core/src/avm2/globals/flash/text/TextLineMetrics.as
+++ b/core/src/avm2/globals/flash/text/TextLineMetrics.as
@@ -1,19 +1,22 @@
-package flash.text {
- public class TextLineMetrics {
- public var x: Number;
- public var width: Number;
- public var height: Number;
- public var ascent: Number;
- public var descent: Number;
- public var leading: Number;
+package flash.text
+{
+ public class TextLineMetrics
+ {
+ public var x:Number;
+ public var width:Number;
+ public var height:Number;
+ public var ascent:Number;
+ public var descent:Number;
+ public var leading:Number;
- public function TextLineMetrics(x: Number, width: Number, height: Number, ascent: Number, descent: Number, leading: Number) {
- this.x = x;
- this.width = width;
- this.height = height;
- this.ascent = ascent;
- this.descent = descent;
- this.leading = leading;
- }
- }
+ public function TextLineMetrics(x:Number, width:Number, height:Number, ascent:Number, descent:Number, leading:Number)
+ {
+ this.x = x;
+ this.width = width;
+ this.height = height;
+ this.ascent = ascent;
+ this.descent = descent;
+ this.leading = leading;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextRenderer.as b/core/src/avm2/globals/flash/text/TextRenderer.as
index 83804e5c5085..cf81c80f3f6a 100644
--- a/core/src/avm2/globals/flash/text/TextRenderer.as
+++ b/core/src/avm2/globals/flash/text/TextRenderer.as
@@ -5,46 +5,46 @@
package flash.text
{
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
-
- public final class TextRenderer
- {
- // Controls the rendering of advanced anti-aliased text.
- private static var _displayMode: String = "default";
-
- // The adaptively sampled distance fields (ADFs) quality level for advanced anti-aliasing.
- private static var _maxLevel: int = 4;
-
- // Sets a custom continuous stroke modulation (CSM) lookup table for a font.
- public static function setAdvancedAntiAliasingTable(fontName:String, fontStyle:String, colorType:String, advancedAntiAliasingTable:Array):void
- {
- stub_method("flash.text.TextRenderer", "setAdvancedAntiAliasingTable");
- }
-
- public static function get displayMode():String
- {
- stub_getter("flash.text.TextRenderer", "displayMode");
- return _displaymode;
- }
-
- public static function set displayMode(value:String):void
- {
- stub_setter("flash.text.TextRenderer", "displayMode");
- _displayMode = value;
- }
-
- public static function get maxLevel():int
- {
- stub_getter("flash.text.TextRenderer", "maxLevel");
- return _maxLevel;
- }
-
- public static function set maxLevel(value:int):void
- {
- stub_setter("flash.text.TextRenderer", "maxLevel");
- _maxLevel = value;
- }
- }
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+
+ public final class TextRenderer
+ {
+ // Controls the rendering of advanced anti-aliased text.
+ private static var _displayMode:String = "default";
+
+ // The adaptively sampled distance fields (ADFs) quality level for advanced anti-aliasing.
+ private static var _maxLevel:int = 4;
+
+ // Sets a custom continuous stroke modulation (CSM) lookup table for a font.
+ public static function setAdvancedAntiAliasingTable(fontName:String, fontStyle:String, colorType:String, advancedAntiAliasingTable:Array):void
+ {
+ stub_method("flash.text.TextRenderer", "setAdvancedAntiAliasingTable");
+ }
+
+ public static function get displayMode():String
+ {
+ stub_getter("flash.text.TextRenderer", "displayMode");
+ return _displaymode;
+ }
+
+ public static function set displayMode(value:String):void
+ {
+ stub_setter("flash.text.TextRenderer", "displayMode");
+ _displayMode = value;
+ }
+
+ public static function get maxLevel():int
+ {
+ stub_getter("flash.text.TextRenderer", "maxLevel");
+ return _maxLevel;
+ }
+
+ public static function set maxLevel(value:int):void
+ {
+ stub_setter("flash.text.TextRenderer", "maxLevel");
+ _maxLevel = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextRun.as b/core/src/avm2/globals/flash/text/TextRun.as
index f5544619a5ca..c29cf8861122 100644
--- a/core/src/avm2/globals/flash/text/TextRun.as
+++ b/core/src/avm2/globals/flash/text/TextRun.as
@@ -1,13 +1,16 @@
-package flash.text {
- public class TextRun {
- public var beginIndex:int;
- public var endIndex:int;
- public var textFormat:TextFormat;
+package flash.text
+{
+ public class TextRun
+ {
+ public var beginIndex:int;
+ public var endIndex:int;
+ public var textFormat:TextFormat;
- public function TextRun(beginIndex:int, endIndex:int, textFormat:TextFormat) {
- this.beginIndex = beginIndex;
- this.endIndex = endIndex;
- this.textFormat = textFormat;
- }
- }
+ public function TextRun(beginIndex:int, endIndex:int, textFormat:TextFormat)
+ {
+ this.beginIndex = beginIndex;
+ this.endIndex = endIndex;
+ this.textFormat = textFormat;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/TextSnapshot.as b/core/src/avm2/globals/flash/text/TextSnapshot.as
index 1073d321f3c7..a0bb4efd44c7 100644
--- a/core/src/avm2/globals/flash/text/TextSnapshot.as
+++ b/core/src/avm2/globals/flash/text/TextSnapshot.as
@@ -1,55 +1,67 @@
-package flash.text {
-
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_method;
- import __ruffle__.stub_getter;
-
- public class TextSnapshot {
- public function TextSnapshot() {
- stub_constructor("flash.text.TextSnapshot");
- }
-
- public function get charCount():int {
- stub_getter("flash.text.TextSnapshot", "charCount");
- return 0;
- }
-
- public function findText(beginIndex:int, textToFind:String, caseSensitive:Boolean):int {
- stub_method("flash.text.TextSnapshot", "findText");
- return -1;
- }
-
- public function getSelected(beginIndex:int, endIndex:int):Boolean {
- stub_method("flash.text.TextSnapshot", "getSelected");
- return false;
- }
-
- public function getSelectedText(includeLineEndings:Boolean = false):String {
- stub_method("flash.text.TextSnapshot", "getSelectedText");
- return "";
- }
-
- public function getText(beginIndex:int, endIndex:int, includeLineEndings:Boolean = false):String {
- stub_method("flash.text.TextSnapshot", "getText");
- return "";
- }
-
- public function getTextRunInfo(beginIndex:int, endIndex:int):Array {
- stub_method("flash.text.TextSnapshot", "getTextRunInfo");
- return [];
- }
-
- public function hitTestTextNearPos(x:Number, y:Number, maxDistance:Number = 0):Number {
- stub_method("flash.text.TextSnapshot", "hitTestTextNearPos");
- return -1;
- }
-
- public function setSelectColor(hexColor:uint = 0xFFFF00):void {
- stub_method("flash.text.TextSnapshot", "setSelectColor");
- }
-
- public function setSelected(beginIndex:int, endIndex:int, select:Boolean):void {
- stub_method("flash.text.TextSnapshot", "setSelected");
- }
- }
+package flash.text
+{
+
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+
+ public class TextSnapshot
+ {
+ public function TextSnapshot()
+ {
+ stub_constructor("flash.text.TextSnapshot");
+ }
+
+ public function get charCount():int
+ {
+ stub_getter("flash.text.TextSnapshot", "charCount");
+ return 0;
+ }
+
+ public function findText(beginIndex:int, textToFind:String, caseSensitive:Boolean):int
+ {
+ stub_method("flash.text.TextSnapshot", "findText");
+ return -1;
+ }
+
+ public function getSelected(beginIndex:int, endIndex:int):Boolean
+ {
+ stub_method("flash.text.TextSnapshot", "getSelected");
+ return false;
+ }
+
+ public function getSelectedText(includeLineEndings:Boolean = false):String
+ {
+ stub_method("flash.text.TextSnapshot", "getSelectedText");
+ return "";
+ }
+
+ public function getText(beginIndex:int, endIndex:int, includeLineEndings:Boolean = false):String
+ {
+ stub_method("flash.text.TextSnapshot", "getText");
+ return "";
+ }
+
+ public function getTextRunInfo(beginIndex:int, endIndex:int):Array
+ {
+ stub_method("flash.text.TextSnapshot", "getTextRunInfo");
+ return [];
+ }
+
+ public function hitTestTextNearPos(x:Number, y:Number, maxDistance:Number = 0):Number
+ {
+ stub_method("flash.text.TextSnapshot", "hitTestTextNearPos");
+ return -1;
+ }
+
+ public function setSelectColor(hexColor:uint = 0xFFFF00):void
+ {
+ stub_method("flash.text.TextSnapshot", "setSelectColor");
+ }
+
+ public function setSelected(beginIndex:int, endIndex:int, select:Boolean):void
+ {
+ stub_method("flash.text.TextSnapshot", "setSelected");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as b/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as
index 4d5258bfae2f..2a0fea95b491 100644
--- a/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as
+++ b/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as
@@ -5,22 +5,20 @@
package flash.text.engine
{
-
-
- public final class BreakOpportunity
- {
- // Treats all characters in the ContentElement object as line break opportunities, meaning that a line break will occur after each character.
- public static const ALL:String = "all";
-
- // Treats any character in the ContentElement object as a line break opportunity.
- public static const ANY:String = "any";
-
- // Bases line break opportunities on Unicode character properties.
- public static const AUTO:String = "auto";
-
- // Treats no characters in the ContentElement object as line break opportunities.
- public static const NONE:String = "none";
-
-
- }
+
+ public final class BreakOpportunity
+ {
+ // Treats all characters in the ContentElement object as line break opportunities, meaning that a line break will occur after each character.
+ public static const ALL:String = "all";
+
+ // Treats any character in the ContentElement object as a line break opportunity.
+ public static const ANY:String = "any";
+
+ // Bases line break opportunities on Unicode character properties.
+ public static const AUTO:String = "auto";
+
+ // Treats no characters in the ContentElement object as line break opportunities.
+ public static const NONE:String = "none";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/CFFHinting.as b/core/src/avm2/globals/flash/text/engine/CFFHinting.as
index 4a7d4f3bd78d..8362bc120ea7 100644
--- a/core/src/avm2/globals/flash/text/engine/CFFHinting.as
+++ b/core/src/avm2/globals/flash/text/engine/CFFHinting.as
@@ -5,16 +5,14 @@
package flash.text.engine
{
-
-
- public final class CFFHinting
- {
- // Fits strong horizontal stems to the pixel grid for improved readability.
- public static const HORIZONTAL_STEM:String = "horizontalStem";
-
- // No hinting is applied.
- public static const NONE:String = "none";
-
-
- }
+
+ public final class CFFHinting
+ {
+ // Fits strong horizontal stems to the pixel grid for improved readability.
+ public static const HORIZONTAL_STEM:String = "horizontalStem";
+
+ // No hinting is applied.
+ public static const NONE:String = "none";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/ContentElement.as b/core/src/avm2/globals/flash/text/engine/ContentElement.as
index 398871e0a95e..fbae4f1add62 100644
--- a/core/src/avm2/globals/flash/text/engine/ContentElement.as
+++ b/core/src/avm2/globals/flash/text/engine/ContentElement.as
@@ -1,32 +1,39 @@
-package flash.text.engine {
- import flash.events.EventDispatcher;
- public class ContentElement {
- public static const GRAPHIC_ELEMENT:uint = 65007;
- public var userData;
+package flash.text.engine
+{
+ import flash.events.EventDispatcher;
+ public class ContentElement
+ {
+ public static const GRAPHIC_ELEMENT:uint = 65007;
+ public var userData;
- internal var _text:String = null;
-
- private var _elementFormat:ElementFormat;
-
- public function ContentElement(elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") {
- // FIXME: `new ContentElement()` throws an error in Flash; see TextJustifier
- this._elementFormat = elementFormat;
- }
+ internal var _text:String = null;
- public function get text():String {
- return this._text;
- }
+ private var _elementFormat:ElementFormat;
- public function get rawText():String {
- return this._text;
- }
-
- public function get elementFormat():ElementFormat {
- return this._elementFormat;
- }
-
- public function set elementFormat(value:ElementFormat):void {
- this._elementFormat = value;
- }
- }
+ public function ContentElement(elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ // FIXME: `new ContentElement()` throws an error in Flash; see TextJustifier
+ this._elementFormat = elementFormat;
+ }
+
+ public function get text():String
+ {
+ return this._text;
+ }
+
+ public function get rawText():String
+ {
+ return this._text;
+ }
+
+ public function get elementFormat():ElementFormat
+ {
+ return this._elementFormat;
+ }
+
+ public function set elementFormat(value:ElementFormat):void
+ {
+ this._elementFormat = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/DigitCase.as b/core/src/avm2/globals/flash/text/engine/DigitCase.as
index 828f09473698..8565b67ddbbc 100644
--- a/core/src/avm2/globals/flash/text/engine/DigitCase.as
+++ b/core/src/avm2/globals/flash/text/engine/DigitCase.as
@@ -5,19 +5,17 @@
package flash.text.engine
{
-
-
- public final class DigitCase
- {
- // Used to specify default digit case.
- public static const DEFAULT:String = "default";
-
- // Used to specify lining digit case.
- public static const LINING:String = "lining";
-
- // Used to specify old style digit case.
- public static const OLD_STYLE:String = "oldStyle";
-
-
- }
+
+ public final class DigitCase
+ {
+ // Used to specify default digit case.
+ public static const DEFAULT:String = "default";
+
+ // Used to specify lining digit case.
+ public static const LINING:String = "lining";
+
+ // Used to specify old style digit case.
+ public static const OLD_STYLE:String = "oldStyle";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/DigitWidth.as b/core/src/avm2/globals/flash/text/engine/DigitWidth.as
index 079f3614904e..632e4383debf 100644
--- a/core/src/avm2/globals/flash/text/engine/DigitWidth.as
+++ b/core/src/avm2/globals/flash/text/engine/DigitWidth.as
@@ -5,19 +5,17 @@
package flash.text.engine
{
-
-
- public final class DigitWidth
- {
- // Used to specify default digit width.
- public static const DEFAULT:String = "default";
-
- // Used to specify proportional digit width.
- public static const PROPORTIONAL:String = "proportional";
-
- // Used to specify tabular digit width.
- public static const TABULAR:String = "tabular";
-
-
- }
+
+ public final class DigitWidth
+ {
+ // Used to specify default digit width.
+ public static const DEFAULT:String = "default";
+
+ // Used to specify proportional digit width.
+ public static const PROPORTIONAL:String = "proportional";
+
+ // Used to specify tabular digit width.
+ public static const TABULAR:String = "tabular";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/EastAsianJustifier.as b/core/src/avm2/globals/flash/text/engine/EastAsianJustifier.as
index 9281c6ad5417..5e4dc0ef1d52 100644
--- a/core/src/avm2/globals/flash/text/engine/EastAsianJustifier.as
+++ b/core/src/avm2/globals/flash/text/engine/EastAsianJustifier.as
@@ -1,7 +1,10 @@
-package flash.text.engine {
- public final class EastAsianJustifier extends TextJustifier {
- public function EastAsianJustifier(locale:String = "ja", lineJustification:String = "allButLast", justificationStyle:String = "pushInKinsoku") {
- super(locale, lineJustification);
- }
- }
+package flash.text.engine
+{
+ public final class EastAsianJustifier extends TextJustifier
+ {
+ public function EastAsianJustifier(locale:String = "ja", lineJustification:String = "allButLast", justificationStyle:String = "pushInKinsoku")
+ {
+ super(locale, lineJustification);
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/ElementFormat.as b/core/src/avm2/globals/flash/text/engine/ElementFormat.as
index c270f77a43e8..d4e51f4da342 100644
--- a/core/src/avm2/globals/flash/text/engine/ElementFormat.as
+++ b/core/src/avm2/globals/flash/text/engine/ElementFormat.as
@@ -1,200 +1,236 @@
-package flash.text.engine {
- public final class ElementFormat {
- private var _alignmentBaseline:String;
+package flash.text.engine
+{
+ public final class ElementFormat
+ {
+ private var _alignmentBaseline:String;
- private var _alpha:Number;
+ private var _alpha:Number;
- private var _baselineShift:Number;
+ private var _baselineShift:Number;
- private var _breakOpportunity:String;
+ private var _breakOpportunity:String;
- private var _color:uint;
+ private var _color:uint;
- private var _digitCase:String;
+ private var _digitCase:String;
- private var _digitWidth:String;
+ private var _digitWidth:String;
- private var _dominantBaseline:String;
+ private var _dominantBaseline:String;
- private var _fontDescription:FontDescription;
+ private var _fontDescription:FontDescription;
- private var _fontSize:Number;
+ private var _fontSize:Number;
+
+ private var _kerning:String;
- private var _kerning:String;
+ private var _ligatureLevel:String;
+
+ private var _locale:String;
- private var _ligatureLevel:String;
-
- private var _locale:String;
-
- private var _textRotation:String;
-
- private var _trackingLeft:Number;
-
- private var _trackingRight:Number;
-
- private var _typographicCase:String;
-
-
- public function ElementFormat(fontDescription:FontDescription = null, fontSize:Number = 12, color:uint = 0, alpha:Number = 1,
- textRotation:String = "auto", dominantBaseline:String = "roman",
- alignmentBaseline:String = "useDominantBaseline", baselineShift:Number = 0, kerning:String = "on",
- trackingRight:Number = 0, trackingLeft:Number = 0, locale:String = "en", breakOpportunity:String = "auto",
- digitCase:String = "default", digitWidth:String = "default", ligatureLevel:String = "common",
- typographicCase:String = "default") {
- this.fontDescription = (fontDescription != null) ? fontDescription : new FontDescription();
-
- this.alignmentBaseline = alignmentBaseline;
- this.alpha = alpha;
- this.baselineShift = baselineShift;
- this.breakOpportunity = breakOpportunity;
- this.color = color;
- this.digitCase = digitCase;
- this.digitWidth = digitWidth;
- this.dominantBaseline = dominantBaseline;
- this.fontSize = fontSize;
- this.kerning = kerning;
- this.ligatureLevel = ligatureLevel;
- this.locale = locale;
- this.textRotation = textRotation;
- this.trackingLeft = trackingLeft;
- this.trackingRight = trackingRight;
- this.typographicCase = typographicCase;
- }
-
- public function get alignmentBaseline():String {
- return this._alignmentBaseline;
- }
-
- public function set alignmentBaseline(value:String):void {
- this._alignmentBaseline = value;
- }
-
- public function get alpha():Number {
- return this._alpha;
- }
-
- public function set alpha(value:Number):void {
- this._alpha = value;
- }
-
- public function get baselineShift():Number {
- return this._baselineShift;
- }
-
- public function set baselineShift(value:Number):void {
- this._baselineShift = value;
- }
-
- public function get breakOpportunity():String {
- return this._breakOpportunity;
- }
-
- public function set breakOpportunity(value:String):void {
- this._breakOpportunity = value;
- }
-
- public function get color():uint {
- return this._color;
- }
-
- public function set color(value:uint):void {
- this._color = value;
- }
-
- public function get digitCase():String {
- return this._digitCase;
- }
-
- public function set digitCase(value:String):void {
- this._digitCase = value;
- }
-
- public function get digitWidth():String {
- return this._digitWidth;
- }
-
- public function set digitWidth(value:String):void {
- this._digitWidth = value;
- }
-
- public function get dominantBaseline():String {
- return this._dominantBaseline;
- }
-
- public function set dominantBaseline(value:String):void {
- this._dominantBaseline = value;
- }
-
- public function get fontDescription():FontDescription {
- return this._fontDescription;
- }
-
- public function set fontDescription(value:FontDescription):void {
- this._fontDescription = value;
- }
-
- public function get fontSize():Number {
- return this._fontSize;
- }
-
- public function set fontSize(value:Number):void {
- this._fontSize = value;
- }
-
- public function get kerning():String {
- return this._kerning;
- }
-
- public function set kerning(value:String):void {
- this._kerning = value;
- }
-
- public function get ligatureLevel():String {
- return this._ligatureLevel;
- }
-
- public function set ligatureLevel(value:String):void {
- this._ligatureLevel = value;
- }
-
- public function get locale():String {
- return this._locale;
- }
-
- public function set locale(value:String):void {
- this._locale = value;
- }
-
- public function get textRotation():String {
- return this._textRotation;
- }
-
- public function set textRotation(value:String):void {
- this._textRotation = value;
- }
-
- public function get trackingLeft():Number {
- return this._trackingLeft;
- }
-
- public function set trackingLeft(value:Number):void {
- this._trackingLeft = value;
- }
-
- public function get trackingRight():Number {
- return this._trackingRight;
- }
-
- public function set trackingRight(value:Number):void {
- this._trackingRight = value;
- }
-
- public function get typographicCase():String {
- return this._typographicCase;
- }
-
- public function set typographicCase(value:String):void {
- this._typographicCase = value;
- }
- }
+ private var _textRotation:String;
+
+ private var _trackingLeft:Number;
+
+ private var _trackingRight:Number;
+
+ private var _typographicCase:String;
+
+ public function ElementFormat(fontDescription:FontDescription = null, fontSize:Number = 12, color:uint = 0, alpha:Number = 1,
+ textRotation:String = "auto", dominantBaseline:String = "roman",
+ alignmentBaseline:String = "useDominantBaseline", baselineShift:Number = 0, kerning:String = "on",
+ trackingRight:Number = 0, trackingLeft:Number = 0, locale:String = "en", breakOpportunity:String = "auto",
+ digitCase:String = "default", digitWidth:String = "default", ligatureLevel:String = "common",
+ typographicCase:String = "default")
+ {
+ this.fontDescription = (fontDescription != null) ? fontDescription : new FontDescription();
+
+ this.alignmentBaseline = alignmentBaseline;
+ this.alpha = alpha;
+ this.baselineShift = baselineShift;
+ this.breakOpportunity = breakOpportunity;
+ this.color = color;
+ this.digitCase = digitCase;
+ this.digitWidth = digitWidth;
+ this.dominantBaseline = dominantBaseline;
+ this.fontSize = fontSize;
+ this.kerning = kerning;
+ this.ligatureLevel = ligatureLevel;
+ this.locale = locale;
+ this.textRotation = textRotation;
+ this.trackingLeft = trackingLeft;
+ this.trackingRight = trackingRight;
+ this.typographicCase = typographicCase;
+ }
+
+ public function get alignmentBaseline():String
+ {
+ return this._alignmentBaseline;
+ }
+
+ public function set alignmentBaseline(value:String):void
+ {
+ this._alignmentBaseline = value;
+ }
+
+ public function get alpha():Number
+ {
+ return this._alpha;
+ }
+
+ public function set alpha(value:Number):void
+ {
+ this._alpha = value;
+ }
+
+ public function get baselineShift():Number
+ {
+ return this._baselineShift;
+ }
+
+ public function set baselineShift(value:Number):void
+ {
+ this._baselineShift = value;
+ }
+
+ public function get breakOpportunity():String
+ {
+ return this._breakOpportunity;
+ }
+
+ public function set breakOpportunity(value:String):void
+ {
+ this._breakOpportunity = value;
+ }
+
+ public function get color():uint
+ {
+ return this._color;
+ }
+
+ public function set color(value:uint):void
+ {
+ this._color = value;
+ }
+
+ public function get digitCase():String
+ {
+ return this._digitCase;
+ }
+
+ public function set digitCase(value:String):void
+ {
+ this._digitCase = value;
+ }
+
+ public function get digitWidth():String
+ {
+ return this._digitWidth;
+ }
+
+ public function set digitWidth(value:String):void
+ {
+ this._digitWidth = value;
+ }
+
+ public function get dominantBaseline():String
+ {
+ return this._dominantBaseline;
+ }
+
+ public function set dominantBaseline(value:String):void
+ {
+ this._dominantBaseline = value;
+ }
+
+ public function get fontDescription():FontDescription
+ {
+ return this._fontDescription;
+ }
+
+ public function set fontDescription(value:FontDescription):void
+ {
+ this._fontDescription = value;
+ }
+
+ public function get fontSize():Number
+ {
+ return this._fontSize;
+ }
+
+ public function set fontSize(value:Number):void
+ {
+ this._fontSize = value;
+ }
+
+ public function get kerning():String
+ {
+ return this._kerning;
+ }
+
+ public function set kerning(value:String):void
+ {
+ this._kerning = value;
+ }
+
+ public function get ligatureLevel():String
+ {
+ return this._ligatureLevel;
+ }
+
+ public function set ligatureLevel(value:String):void
+ {
+ this._ligatureLevel = value;
+ }
+
+ public function get locale():String
+ {
+ return this._locale;
+ }
+
+ public function set locale(value:String):void
+ {
+ this._locale = value;
+ }
+
+ public function get textRotation():String
+ {
+ return this._textRotation;
+ }
+
+ public function set textRotation(value:String):void
+ {
+ this._textRotation = value;
+ }
+
+ public function get trackingLeft():Number
+ {
+ return this._trackingLeft;
+ }
+
+ public function set trackingLeft(value:Number):void
+ {
+ this._trackingLeft = value;
+ }
+
+ public function get trackingRight():Number
+ {
+ return this._trackingRight;
+ }
+
+ public function set trackingRight(value:Number):void
+ {
+ this._trackingRight = value;
+ }
+
+ public function get typographicCase():String
+ {
+ return this._typographicCase;
+ }
+
+ public function set typographicCase(value:String):void
+ {
+ this._typographicCase = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/FontDescription.as b/core/src/avm2/globals/flash/text/engine/FontDescription.as
index 38ae97256ff0..71023b4124e7 100644
--- a/core/src/avm2/globals/flash/text/engine/FontDescription.as
+++ b/core/src/avm2/globals/flash/text/engine/FontDescription.as
@@ -1,115 +1,144 @@
-package flash.text.engine {
- import __ruffle__.stub_method;
-
- public final class FontDescription {
- private var _fontName:String;
-
- private var _fontWeight:String;
-
- private var _fontPosture:String;
-
- private var _fontLookup:String;
-
- private var _renderingMode:String;
-
- private var _cffHinting:String;
-
- public function FontDescription(fontName:String = "_serif", fontWeight:String = "normal", fontPosture:String = "normal",
- fontLookup:String = "device", renderingMode:String = "cff", cffHinting:String = "horizontalStem") {
- this.fontName = fontName;
- this.fontWeight = fontWeight;
- this.fontPosture = fontPosture;
- this.fontLookup = fontLookup;
- this.renderingMode = renderingMode;
- this.cffHinting = cffHinting;
- }
-
- public function get fontName():String {
- return this._fontName;
- }
-
- public function set fontName(value:String):void {
- if (value == null) throwNonNull("fontName");
-
- this._fontName = value;
- }
-
- public function get fontWeight():String {
- return this._fontWeight;
- }
-
- public function set fontWeight(value:String):void {
- if (value == null) throwNonNull("fontWeight");
- if (value != FontWeight.NORMAL && value != FontWeight.BOLD) {
- throwNotAccepted("fontWeight");
- }
-
- this._fontWeight = value;
- }
-
- public function get fontPosture():String {
- return this._fontPosture;
- }
-
- public function set fontPosture(value:String):void {
- if (value == null) throwNonNull("fontPosture");
- if (value != FontPosture.NORMAL && value != FontPosture.ITALIC) {
- throwNotAccepted("fontPosture");
- }
-
- this._fontPosture = value;
- }
-
- public function get fontLookup():String {
- return this._fontLookup;
- }
-
- public function set fontLookup(value:String):void {
- if (value == null) throwNonNull("fontLookup");
- if (value != FontLookup.DEVICE && value != FontLookup.EMBEDDED_CFF) {
- throwNotAccepted("fontLookup");
- }
-
- this._fontLookup = value;
- }
-
- public function get renderingMode():String {
- return this._renderingMode;
- }
-
- public function set renderingMode(value:String):void {
- if (value == null) throwNonNull("renderingMode");
- if (value != RenderingMode.NORMAL && value != RenderingMode.CFF) {
- throwNotAccepted("renderingMode");
- }
-
- this._renderingMode = value;
- }
-
- public function get cffHinting():String {
- return this._cffHinting;
- }
-
- public function set cffHinting(value:String):void {
- if (value == null) throwNonNull("cffHinting");
- if (value != CFFHinting.NONE && value != CFFHinting.HORIZONTAL_STEM) {
- throwNotAccepted("cffHinting");
- }
-
- this._cffHinting = value;
- }
-
- public static function isFontCompatible(fontName: String, fontWeight: String, fontPosture: String): Boolean {
- stub_method("flash.text.engine.FontDescription", "isFontCompatible");
- return false;
- }
-
- private static function throwNonNull(name: String) {
- throw new TypeError("Error #2007: Parameter " + name + " must be non-null.", 2007);
- }
-
- private static function throwNotAccepted(name: String) {
- throw new ArgumentError("Error #2008: Parameter " + name + " must be one of the accepted values.", 2008);
- }
- }
+package flash.text.engine
+{
+ import __ruffle__.stub_method;
+
+ public final class FontDescription
+ {
+ private var _fontName:String;
+
+ private var _fontWeight:String;
+
+ private var _fontPosture:String;
+
+ private var _fontLookup:String;
+
+ private var _renderingMode:String;
+
+ private var _cffHinting:String;
+
+ public function FontDescription(fontName:String = "_serif", fontWeight:String = "normal", fontPosture:String = "normal",
+ fontLookup:String = "device", renderingMode:String = "cff", cffHinting:String = "horizontalStem")
+ {
+ this.fontName = fontName;
+ this.fontWeight = fontWeight;
+ this.fontPosture = fontPosture;
+ this.fontLookup = fontLookup;
+ this.renderingMode = renderingMode;
+ this.cffHinting = cffHinting;
+ }
+
+ public function get fontName():String
+ {
+ return this._fontName;
+ }
+
+ public function set fontName(value:String):void
+ {
+ if (value == null)
+ throwNonNull("fontName");
+
+ this._fontName = value;
+ }
+
+ public function get fontWeight():String
+ {
+ return this._fontWeight;
+ }
+
+ public function set fontWeight(value:String):void
+ {
+ if (value == null)
+ throwNonNull("fontWeight");
+ if (value != FontWeight.NORMAL && value != FontWeight.BOLD)
+ {
+ throwNotAccepted("fontWeight");
+ }
+
+ this._fontWeight = value;
+ }
+
+ public function get fontPosture():String
+ {
+ return this._fontPosture;
+ }
+
+ public function set fontPosture(value:String):void
+ {
+ if (value == null)
+ throwNonNull("fontPosture");
+ if (value != FontPosture.NORMAL && value != FontPosture.ITALIC)
+ {
+ throwNotAccepted("fontPosture");
+ }
+
+ this._fontPosture = value;
+ }
+
+ public function get fontLookup():String
+ {
+ return this._fontLookup;
+ }
+
+ public function set fontLookup(value:String):void
+ {
+ if (value == null)
+ throwNonNull("fontLookup");
+ if (value != FontLookup.DEVICE && value != FontLookup.EMBEDDED_CFF)
+ {
+ throwNotAccepted("fontLookup");
+ }
+
+ this._fontLookup = value;
+ }
+
+ public function get renderingMode():String
+ {
+ return this._renderingMode;
+ }
+
+ public function set renderingMode(value:String):void
+ {
+ if (value == null)
+ throwNonNull("renderingMode");
+ if (value != RenderingMode.NORMAL && value != RenderingMode.CFF)
+ {
+ throwNotAccepted("renderingMode");
+ }
+
+ this._renderingMode = value;
+ }
+
+ public function get cffHinting():String
+ {
+ return this._cffHinting;
+ }
+
+ public function set cffHinting(value:String):void
+ {
+ if (value == null)
+ throwNonNull("cffHinting");
+ if (value != CFFHinting.NONE && value != CFFHinting.HORIZONTAL_STEM)
+ {
+ throwNotAccepted("cffHinting");
+ }
+
+ this._cffHinting = value;
+ }
+
+ public static function isFontCompatible(fontName:String, fontWeight:String, fontPosture:String):Boolean
+ {
+ stub_method("flash.text.engine.FontDescription", "isFontCompatible");
+ return false;
+ }
+
+ private static function throwNonNull(name:String)
+ {
+ throw new TypeError("Error #2007: Parameter " + name + " must be non-null.", 2007);
+ }
+
+ private static function throwNotAccepted(name:String)
+ {
+ throw new ArgumentError("Error #2008: Parameter " + name + " must be one of the accepted values.", 2008);
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/FontLookup.as b/core/src/avm2/globals/flash/text/engine/FontLookup.as
index b3156bb49634..b3c9de030c5e 100644
--- a/core/src/avm2/globals/flash/text/engine/FontLookup.as
+++ b/core/src/avm2/globals/flash/text/engine/FontLookup.as
@@ -5,16 +5,14 @@
package flash.text.engine
{
-
-
- public final class FontLookup
- {
- // Used to indicate device font lookup.
- public static const DEVICE:String = "device";
-
- // Used to indicate embedded CFF (Compact Font Format) font lookup.
- public static const EMBEDDED_CFF:String = "embeddedCFF";
-
-
- }
+
+ public final class FontLookup
+ {
+ // Used to indicate device font lookup.
+ public static const DEVICE:String = "device";
+
+ // Used to indicate embedded CFF (Compact Font Format) font lookup.
+ public static const EMBEDDED_CFF:String = "embeddedCFF";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/FontMetrics.as b/core/src/avm2/globals/flash/text/engine/FontMetrics.as
index 5aa5017526ac..d38aae39a24f 100644
--- a/core/src/avm2/globals/flash/text/engine/FontMetrics.as
+++ b/core/src/avm2/globals/flash/text/engine/FontMetrics.as
@@ -1,40 +1,42 @@
-package flash.text.engine {
- import flash.geom.Rectangle;
+package flash.text.engine
+{
+ import flash.geom.Rectangle;
- public final class FontMetrics {
- public var emBox:Rectangle;
+ public final class FontMetrics
+ {
+ public var emBox:Rectangle;
- public var strikethroughOffset:Number;
+ public var strikethroughOffset:Number;
- public var strikethroughThickness:Number;
+ public var strikethroughThickness:Number;
- public var underlineOffset:Number;
+ public var underlineOffset:Number;
- public var underlineThickness:Number;
+ public var underlineThickness:Number;
- public var subscriptOffset:Number;
+ public var subscriptOffset:Number;
- public var subscriptScale:Number;
+ public var subscriptScale:Number;
- public var superscriptOffset:Number;
+ public var superscriptOffset:Number;
- public var superscriptScale:Number;
+ public var superscriptScale:Number;
- [API("674")]
- public var lineGap:Number;
-
- public function FontMetrics(emBox:Rectangle, strikethroughOffset:Number, strikethroughThickness:Number, underlineOffset:Number, underlineThickness:Number, subscriptOffset:Number, subscriptScale:Number, superscriptOffset:Number, superscriptScale:Number, lineGap:Number = 0) {
- this.emBox = emBox;
- this.strikethroughOffset = strikethroughOffset;
- this.strikethroughThickness = strikethroughThickness;
- this.underlineOffset = underlineOffset;
- this.underlineThickness = underlineThickness;
- this.subscriptOffset = subscriptOffset;
- this.subscriptScale = subscriptScale;
- this.superscriptOffset = superscriptOffset;
- this.superscriptScale = superscriptScale;
- this.lineGap = lineGap;
- }
- }
-}
+ [API("674")]
+ public var lineGap:Number;
+ public function FontMetrics(emBox:Rectangle, strikethroughOffset:Number, strikethroughThickness:Number, underlineOffset:Number, underlineThickness:Number, subscriptOffset:Number, subscriptScale:Number, superscriptOffset:Number, superscriptScale:Number, lineGap:Number = 0)
+ {
+ this.emBox = emBox;
+ this.strikethroughOffset = strikethroughOffset;
+ this.strikethroughThickness = strikethroughThickness;
+ this.underlineOffset = underlineOffset;
+ this.underlineThickness = underlineThickness;
+ this.subscriptOffset = subscriptOffset;
+ this.subscriptScale = subscriptScale;
+ this.superscriptOffset = superscriptOffset;
+ this.superscriptScale = superscriptScale;
+ this.lineGap = lineGap;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/text/engine/FontPosture.as b/core/src/avm2/globals/flash/text/engine/FontPosture.as
index 3b9f9a95fce6..2002081d8b13 100644
--- a/core/src/avm2/globals/flash/text/engine/FontPosture.as
+++ b/core/src/avm2/globals/flash/text/engine/FontPosture.as
@@ -5,16 +5,14 @@
package flash.text.engine
{
-
-
- public final class FontPosture
- {
- // Used to indicate italic font posture.
- public static const ITALIC:String = "italic";
-
- // Used to indicate normal font posture.
- public static const NORMAL:String = "normal";
-
-
- }
+
+ public final class FontPosture
+ {
+ // Used to indicate italic font posture.
+ public static const ITALIC:String = "italic";
+
+ // Used to indicate normal font posture.
+ public static const NORMAL:String = "normal";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/FontWeight.as b/core/src/avm2/globals/flash/text/engine/FontWeight.as
index 06b214ecac61..b61093561735 100644
--- a/core/src/avm2/globals/flash/text/engine/FontWeight.as
+++ b/core/src/avm2/globals/flash/text/engine/FontWeight.as
@@ -5,16 +5,14 @@
package flash.text.engine
{
-
-
- public final class FontWeight
- {
- // Used to indicate bold font weight.
- public static const BOLD:String = "bold";
-
- // Used to indicate normal font weight.
- public static const NORMAL:String = "normal";
-
-
- }
+
+ public final class FontWeight
+ {
+ // Used to indicate bold font weight.
+ public static const BOLD:String = "bold";
+
+ // Used to indicate normal font weight.
+ public static const NORMAL:String = "normal";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/GraphicElement.as b/core/src/avm2/globals/flash/text/engine/GraphicElement.as
index 74223dea3378..157036963c59 100644
--- a/core/src/avm2/globals/flash/text/engine/GraphicElement.as
+++ b/core/src/avm2/globals/flash/text/engine/GraphicElement.as
@@ -1,40 +1,49 @@
-package flash.text.engine {
- import flash.display.DisplayObject;
- import flash.events.EventDispatcher;
+package flash.text.engine
+{
+ import flash.display.DisplayObject;
+ import flash.events.EventDispatcher;
- import __ruffle__.stub_constructor;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
+ import __ruffle__.stub_constructor;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
- public final class GraphicElement extends ContentElement {
- public function GraphicElement(graphic:DisplayObject = null, elementWidth:Number = 15.0, elementHeight:Number = 15.0, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") {
- stub_constructor("flash.text.engine.GraphicElement");
- }
+ public final class GraphicElement extends ContentElement
+ {
+ public function GraphicElement(graphic:DisplayObject = null, elementWidth:Number = 15.0, elementHeight:Number = 15.0, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ stub_constructor("flash.text.engine.GraphicElement");
+ }
- public function get elementHeight():Number {
- stub_getter("flash.text.engine.GraphicElement", "elementHeight");
- return 15.0;
- }
- public function set elementHeight(value:Number):void {
- stub_setter("flash.text.engine.GraphicElement", "elementHeight");
- }
+ public function get elementHeight():Number
+ {
+ stub_getter("flash.text.engine.GraphicElement", "elementHeight");
+ return 15.0;
+ }
+ public function set elementHeight(value:Number):void
+ {
+ stub_setter("flash.text.engine.GraphicElement", "elementHeight");
+ }
- public function get elementWidth():Number {
- stub_getter("flash.text.engine.GraphicElement", "elementWidth");
- return 15.0;
- }
+ public function get elementWidth():Number
+ {
+ stub_getter("flash.text.engine.GraphicElement", "elementWidth");
+ return 15.0;
+ }
- public function set elementWidth(value:Number):void {
- stub_setter("flash.text.engine.GraphicElement", "elementWidth");
- }
+ public function set elementWidth(value:Number):void
+ {
+ stub_setter("flash.text.engine.GraphicElement", "elementWidth");
+ }
- public function get graphic():DisplayObject {
- stub_getter("flash.text.engine.GraphicElement", "graphic");
- return null;
- }
+ public function get graphic():DisplayObject
+ {
+ stub_getter("flash.text.engine.GraphicElement", "graphic");
+ return null;
+ }
- public function set graphic(value:DisplayObject):void {
- stub_setter("flash.text.engine.GraphicElement", "graphic");
- }
- }
+ public function set graphic(value:DisplayObject):void
+ {
+ stub_setter("flash.text.engine.GraphicElement", "graphic");
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/text/engine/GroupElement.as b/core/src/avm2/globals/flash/text/engine/GroupElement.as
index 89fb9f41c4f4..30b80e2047db 100644
--- a/core/src/avm2/globals/flash/text/engine/GroupElement.as
+++ b/core/src/avm2/globals/flash/text/engine/GroupElement.as
@@ -1,85 +1,105 @@
-package flash.text.engine {
- import __ruffle__.stub_method;
-
- import flash.events.EventDispatcher;
-
- public final class GroupElement extends ContentElement {
- internal var _elements = null;
-
- public function GroupElement(elements:Vector. = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") {
- super(elementFormat, eventMirror, textRotation);
- this.setElements(elements);
- }
-
- public function get elementCount():int {
- return this._elements.length;
- }
-
- public function getElementAt(index:int):ContentElement {
- if (index < 0 || index >= this._elements.length) {
- throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
- }
- return this._elements[index];
- }
-
- public function getElementIndex(element:ContentElement):int {
- return this._elements.indexOf(element);
- }
-
- public function setElements(elements:Vector.):void {
- if (elements == null) {
- this._elements = new Vector.();
- } else {
- this._elements = elements.AS3::concat();
- }
- }
-
- public function replaceElements(beginIndex:int, endIndex:int, newElements:Vector.):Vector. {
- // This some sort of special case that doesn't throw.
- if (beginIndex == endIndex && newElements == null) {
- return null;
- }
- if (beginIndex < 0 || beginIndex > this._elements.length ||
- endIndex < 0 || endIndex > this._elements.length) {
- throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
- }
-
- var old = this._elements.AS3::splice(beginIndex, endIndex - beginIndex);
- if (newElements) {
- for (var i = 0; i < newElements.length; i++) {
- this._elements.AS3::insertAt(beginIndex + i, newElements[i]);
- }
- }
- return old;
- }
-
- public function splitTextElement(elementIndex:int, splitIndex:int): TextElement {
- var element = getElementAt(elementIndex);
- if (!(element instanceof TextElement)) {
- throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
- }
-
- var text = element.text;
- if (splitIndex < 0 || splitIndex >= text.length) {
- throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
- }
-
- element.text = text.slice(0, splitIndex);
- var newTextElement = new TextElement(text.slice(splitIndex));
- this._elements.AS3::insertAt(elementIndex + 1, newTextElement);
- return newTextElement;
- }
-
- // FIXME: This is wrong, FP doesn't do an override of `get text` in GroupElement
- override public function get text():String {
- var resultingText:String = "";
-
- for (var i = 0; i < this._elements.length; i ++) {
- resultingText += this._elements[i].text;
- }
-
- return resultingText;
- }
- }
+package flash.text.engine
+{
+ import __ruffle__.stub_method;
+
+ import flash.events.EventDispatcher;
+
+ public final class GroupElement extends ContentElement
+ {
+ internal var _elements = null;
+
+ public function GroupElement(elements:Vector. = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ super(elementFormat, eventMirror, textRotation);
+ this.setElements(elements);
+ }
+
+ public function get elementCount():int
+ {
+ return this._elements.length;
+ }
+
+ public function getElementAt(index:int):ContentElement
+ {
+ if (index < 0 || index >= this._elements.length)
+ {
+ throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
+ }
+ return this._elements[index];
+ }
+
+ public function getElementIndex(element:ContentElement):int
+ {
+ return this._elements.indexOf(element);
+ }
+
+ public function setElements(elements:Vector.):void
+ {
+ if (elements == null)
+ {
+ this._elements = new Vector.();
+ }
+ else
+ {
+ this._elements = elements.AS3::concat();
+ }
+ }
+
+ public function replaceElements(beginIndex:int, endIndex:int, newElements:Vector.):Vector.
+ {
+ // This some sort of special case that doesn't throw.
+ if (beginIndex == endIndex && newElements == null)
+ {
+ return null;
+ }
+ if (beginIndex < 0 || beginIndex > this._elements.length ||
+ endIndex < 0 || endIndex > this._elements.length)
+ {
+ throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
+ }
+
+ var old = this._elements.AS3::splice(beginIndex, endIndex - beginIndex);
+ if (newElements)
+ {
+ for (var i = 0; i < newElements.length; i++)
+ {
+ this._elements.AS3::insertAt(beginIndex + i, newElements[i]);
+ }
+ }
+ return old;
+ }
+
+ public function splitTextElement(elementIndex:int, splitIndex:int):TextElement
+ {
+ var element = getElementAt(elementIndex);
+ if (!(elementinstanceof TextElement))
+ {
+ throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
+ }
+
+ var text = element.text;
+ if (splitIndex < 0 || splitIndex >= text.length)
+ {
+ throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
+ }
+
+ element.text = text.slice(0, splitIndex);
+ var newTextElement = new TextElement(text.slice(splitIndex));
+ this._elements.AS3::insertAt(elementIndex + 1, newTextElement);
+ return newTextElement;
+ }
+
+ // FIXME: This is wrong, FP doesn't do an override of `get text` in GroupElement
+ override public function get text():String
+ {
+ var resultingText:String = "";
+
+ for (var i = 0; i < this._elements.length; i++)
+ {
+ resultingText += this._elements[i].text;
+ }
+
+ return resultingText;
+ }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/text/engine/JustificationStyle.as b/core/src/avm2/globals/flash/text/engine/JustificationStyle.as
index 93dbb45f973c..587433dd901d 100644
--- a/core/src/avm2/globals/flash/text/engine/JustificationStyle.as
+++ b/core/src/avm2/globals/flash/text/engine/JustificationStyle.as
@@ -5,19 +5,17 @@
package flash.text.engine
{
-
-
- public final class JustificationStyle
- {
- // Bases justification on either expanding or compressing the line, whichever gives a result closest to the desired width.
- public static const PRIORITIZE_LEAST_ADJUSTMENT:String = "prioritizeLeastAdjustment";
-
- // Bases justification on compressing kinsoku at the end of the line, or expanding it if no kinsoku occurs or if that space is insufficient.
- public static const PUSH_IN_KINSOKU:String = "pushInKinsoku";
-
- // Bases justification on expanding the line.
- public static const PUSH_OUT_ONLY:String = "pushOutOnly";
-
-
- }
+
+ public final class JustificationStyle
+ {
+ // Bases justification on either expanding or compressing the line, whichever gives a result closest to the desired width.
+ public static const PRIORITIZE_LEAST_ADJUSTMENT:String = "prioritizeLeastAdjustment";
+
+ // Bases justification on compressing kinsoku at the end of the line, or expanding it if no kinsoku occurs or if that space is insufficient.
+ public static const PUSH_IN_KINSOKU:String = "pushInKinsoku";
+
+ // Bases justification on expanding the line.
+ public static const PUSH_OUT_ONLY:String = "pushOutOnly";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/Kerning.as b/core/src/avm2/globals/flash/text/engine/Kerning.as
index d78dbf70993a..1ca069c56295 100644
--- a/core/src/avm2/globals/flash/text/engine/Kerning.as
+++ b/core/src/avm2/globals/flash/text/engine/Kerning.as
@@ -5,19 +5,17 @@
package flash.text.engine
{
-
-
- public final class Kerning
- {
- // Used to indicate that kerning is enabled except where inappropriate in Asian typography.
- public static const AUTO:String = "auto";
-
- // Used to indicate kerning is disabled.
- public static const OFF:String = "off";
-
- // Used to indicate kerning is enabled.
- public static const ON:String = "on";
-
-
- }
+
+ public final class Kerning
+ {
+ // Used to indicate that kerning is enabled except where inappropriate in Asian typography.
+ public static const AUTO:String = "auto";
+
+ // Used to indicate kerning is disabled.
+ public static const OFF:String = "off";
+
+ // Used to indicate kerning is enabled.
+ public static const ON:String = "on";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/LigatureLevel.as b/core/src/avm2/globals/flash/text/engine/LigatureLevel.as
index fbde792eb0d1..b1905b43b978 100644
--- a/core/src/avm2/globals/flash/text/engine/LigatureLevel.as
+++ b/core/src/avm2/globals/flash/text/engine/LigatureLevel.as
@@ -5,25 +5,23 @@
package flash.text.engine
{
-
-
- public final class LigatureLevel
- {
- // Used to specify common ligatures.
- public static const COMMON:String = "common";
-
- // Used to specify exotic ligatures.
- public static const EXOTIC:String = "exotic";
-
- // Used to specify minimum ligatures.
- public static const MINIMUM:String = "minimum";
-
- // Used to specify no ligatures.
- public static const NONE:String = "none";
-
- // Used to specify uncommon ligatures.
- public static const UNCOMMON:String = "uncommon";
-
-
- }
+
+ public final class LigatureLevel
+ {
+ // Used to specify common ligatures.
+ public static const COMMON:String = "common";
+
+ // Used to specify exotic ligatures.
+ public static const EXOTIC:String = "exotic";
+
+ // Used to specify minimum ligatures.
+ public static const MINIMUM:String = "minimum";
+
+ // Used to specify no ligatures.
+ public static const NONE:String = "none";
+
+ // Used to specify uncommon ligatures.
+ public static const UNCOMMON:String = "uncommon";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/LineJustification.as b/core/src/avm2/globals/flash/text/engine/LineJustification.as
index b4a2258d2bfd..9fcf58a43999 100644
--- a/core/src/avm2/globals/flash/text/engine/LineJustification.as
+++ b/core/src/avm2/globals/flash/text/engine/LineJustification.as
@@ -5,23 +5,21 @@
package flash.text.engine
{
-
-
- public final class LineJustification
- {
- // Justify all but the last line.
- public static const ALL_BUT_LAST:String = "allButLast";
-
- // Justify all but the last line and lines ending in mandatory breaks.
- [API("674")]
- public static const ALL_BUT_MANDATORY_BREAK:String = "allButMandatoryBreak";
-
- // Justify all lines.
- public static const ALL_INCLUDING_LAST:String = "allIncludingLast";
-
- // Do not justify lines.
- public static const UNJUSTIFIED:String = "unjustified";
-
-
- }
+
+ public final class LineJustification
+ {
+ // Justify all but the last line.
+ public static const ALL_BUT_LAST:String = "allButLast";
+
+ // Justify all but the last line and lines ending in mandatory breaks.
+ [API("674")]
+ public static const ALL_BUT_MANDATORY_BREAK:String = "allButMandatoryBreak";
+
+ // Justify all lines.
+ public static const ALL_INCLUDING_LAST:String = "allIncludingLast";
+
+ // Do not justify lines.
+ public static const UNJUSTIFIED:String = "unjustified";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/RenderingMode.as b/core/src/avm2/globals/flash/text/engine/RenderingMode.as
index a8881e2d1f9a..5b788749ce13 100644
--- a/core/src/avm2/globals/flash/text/engine/RenderingMode.as
+++ b/core/src/avm2/globals/flash/text/engine/RenderingMode.as
@@ -5,16 +5,14 @@
package flash.text.engine
{
-
-
- public final class RenderingMode
- {
- // Sets rendering mode to CFF (Compact Font Format).
- public static const CFF:String = "cff";
-
- // Sets rendering mode to the rendering mode that is used in Flash Player 7 and earlier.
- public static const NORMAL:String = "normal";
-
-
- }
+
+ public final class RenderingMode
+ {
+ // Sets rendering mode to CFF (Compact Font Format).
+ public static const CFF:String = "cff";
+
+ // Sets rendering mode to the rendering mode that is used in Flash Player 7 and earlier.
+ public static const NORMAL:String = "normal";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/SpaceJustifier.as b/core/src/avm2/globals/flash/text/engine/SpaceJustifier.as
index d5fb1f2914eb..bd9c89d78812 100644
--- a/core/src/avm2/globals/flash/text/engine/SpaceJustifier.as
+++ b/core/src/avm2/globals/flash/text/engine/SpaceJustifier.as
@@ -1,45 +1,56 @@
-package flash.text.engine {
- public final class SpaceJustifier extends TextJustifier {
- private var _letterSpacing:Boolean;
- private var _minimumSpacing:Number = 0.5;
- private var _optimumSpacing:Number = 1.0;
- private var _maximumSpacing:Number = 1.5;
-
- public function SpaceJustifier(locale:String = "en", lineJustification:String = "unjustified", letterSpacing:Boolean = false) {
- super(locale, lineJustification);
- this._letterSpacing = letterSpacing;
- }
-
- public function get letterSpacing():Boolean {
- return this._letterSpacing;
- }
-
- public function set letterSpacing(value:Boolean):void {
- this._letterSpacing = value;
- }
-
- public function get minimumSpacing():Number {
- return this._minimumSpacing;
- }
-
- public function set minimumSpacing(value:Number):void {
- this._minimumSpacing = value;
- }
-
- public function get maximumSpacing():Number {
- return this._maximumSpacing;
- }
-
- public function set maximumSpacing(value:Number):void {
- this._maximumSpacing = value;
- }
-
- public function get optimumSpacing():Number {
- return this._optimumSpacing;
- }
-
- public function set optimumSpacing(value:Number):void {
- this._optimumSpacing = value;
- }
- }
+package flash.text.engine
+{
+ public final class SpaceJustifier extends TextJustifier
+ {
+ private var _letterSpacing:Boolean;
+ private var _minimumSpacing:Number = 0.5;
+ private var _optimumSpacing:Number = 1.0;
+ private var _maximumSpacing:Number = 1.5;
+
+ public function SpaceJustifier(locale:String = "en", lineJustification:String = "unjustified", letterSpacing:Boolean = false)
+ {
+ super(locale, lineJustification);
+ this._letterSpacing = letterSpacing;
+ }
+
+ public function get letterSpacing():Boolean
+ {
+ return this._letterSpacing;
+ }
+
+ public function set letterSpacing(value:Boolean):void
+ {
+ this._letterSpacing = value;
+ }
+
+ public function get minimumSpacing():Number
+ {
+ return this._minimumSpacing;
+ }
+
+ public function set minimumSpacing(value:Number):void
+ {
+ this._minimumSpacing = value;
+ }
+
+ public function get maximumSpacing():Number
+ {
+ return this._maximumSpacing;
+ }
+
+ public function set maximumSpacing(value:Number):void
+ {
+ this._maximumSpacing = value;
+ }
+
+ public function get optimumSpacing():Number
+ {
+ return this._optimumSpacing;
+ }
+
+ public function set optimumSpacing(value:Number):void
+ {
+ this._optimumSpacing = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TabAlignment.as b/core/src/avm2/globals/flash/text/engine/TabAlignment.as
index 66baf0654e51..5d449e08fb51 100644
--- a/core/src/avm2/globals/flash/text/engine/TabAlignment.as
+++ b/core/src/avm2/globals/flash/text/engine/TabAlignment.as
@@ -5,22 +5,20 @@
package flash.text.engine
{
-
-
- public final class TabAlignment
- {
- // Positions the center of the tabbed text at the tab stop.
- public static const CENTER:String = "center";
-
- // Positions the alignment token of the tabbed text at the tab stop.
- public static const DECIMAL:String = "decimal";
-
- // Positions the end of the tabbed text at the tab stop.
- public static const END:String = "end";
-
- // Positions the start of the tabbed text at the tab stop.
- public static const START:String = "start";
-
-
- }
+
+ public final class TabAlignment
+ {
+ // Positions the center of the tabbed text at the tab stop.
+ public static const CENTER:String = "center";
+
+ // Positions the alignment token of the tabbed text at the tab stop.
+ public static const DECIMAL:String = "decimal";
+
+ // Positions the end of the tabbed text at the tab stop.
+ public static const END:String = "end";
+
+ // Positions the start of the tabbed text at the tab stop.
+ public static const START:String = "start";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TabStop.as b/core/src/avm2/globals/flash/text/engine/TabStop.as
index e8b5dd739f9b..c9322402517a 100644
--- a/core/src/avm2/globals/flash/text/engine/TabStop.as
+++ b/core/src/avm2/globals/flash/text/engine/TabStop.as
@@ -1,14 +1,17 @@
-package flash.text.engine {
- public final class TabStop {
- // FIXME: These should be getters/setters to match Flash
- public var alignment:String;
- public var position:Number;
- public var decimalAlignmentToken:String;
-
- public function TabStop(alignment:String = "start", position:Number = 0, decimalAlignmentToken:String = "") {
- this.alignment = alignment;
- this.position = position;
- this.decimalAlignmentToken = decimalAlignmentToken;
- }
- }
+package flash.text.engine
+{
+ public final class TabStop
+ {
+ // FIXME: These should be getters/setters to match Flash
+ public var alignment:String;
+ public var position:Number;
+ public var decimalAlignmentToken:String;
+
+ public function TabStop(alignment:String = "start", position:Number = 0, decimalAlignmentToken:String = "")
+ {
+ this.alignment = alignment;
+ this.position = position;
+ this.decimalAlignmentToken = decimalAlignmentToken;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextBaseline.as b/core/src/avm2/globals/flash/text/engine/TextBaseline.as
index c3ed82223fd7..538233cf13ba 100644
--- a/core/src/avm2/globals/flash/text/engine/TextBaseline.as
+++ b/core/src/avm2/globals/flash/text/engine/TextBaseline.as
@@ -5,31 +5,29 @@
package flash.text.engine
{
-
-
- public final class TextBaseline
- {
- // Specifies an ascent baseline.
- public static const ASCENT:String = "ascent";
-
- // Specifies a descent baseline.
- public static const DESCENT:String = "descent";
-
- // Specifies an ideographic bottom baseline.
- public static const IDEOGRAPHIC_BOTTOM:String = "ideographicBottom";
-
- // Specifies an ideographic center baseline.
- public static const IDEOGRAPHIC_CENTER:String = "ideographicCenter";
-
- // Specifies an ideographic top baseline.
- public static const IDEOGRAPHIC_TOP:String = "ideographicTop";
-
- // Specifies a roman baseline.
- public static const ROMAN:String = "roman";
-
- // Specifies that the alignmentBaseline is the same as the dominantBaseline.
- public static const USE_DOMINANT_BASELINE:String = "useDominantBaseline";
-
-
- }
+
+ public final class TextBaseline
+ {
+ // Specifies an ascent baseline.
+ public static const ASCENT:String = "ascent";
+
+ // Specifies a descent baseline.
+ public static const DESCENT:String = "descent";
+
+ // Specifies an ideographic bottom baseline.
+ public static const IDEOGRAPHIC_BOTTOM:String = "ideographicBottom";
+
+ // Specifies an ideographic center baseline.
+ public static const IDEOGRAPHIC_CENTER:String = "ideographicCenter";
+
+ // Specifies an ideographic top baseline.
+ public static const IDEOGRAPHIC_TOP:String = "ideographicTop";
+
+ // Specifies a roman baseline.
+ public static const ROMAN:String = "roman";
+
+ // Specifies that the alignmentBaseline is the same as the dominantBaseline.
+ public static const USE_DOMINANT_BASELINE:String = "useDominantBaseline";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextBlock.as b/core/src/avm2/globals/flash/text/engine/TextBlock.as
index 94323ba842c3..c1828661936c 100644
--- a/core/src/avm2/globals/flash/text/engine/TextBlock.as
+++ b/core/src/avm2/globals/flash/text/engine/TextBlock.as
@@ -1,175 +1,211 @@
-package flash.text.engine {
- import __ruffle__.stub_method;
-
- public final class TextBlock {
- public var userData;
-
- private var _applyNonLinearFontScaling:Boolean;
- private var _baselineFontDescription:FontDescription = null;
- private var _baselineFontSize:Number = 12;
- private var _baselineZero:String = "roman";
- private var _bidiLevel:int;
- private var _lineRotation:String;
- private var _tabStops:Vector.;
- private var _textJustifier:TextJustifier;
- private var _content:ContentElement;
-
- internal var _textLineCreationResult:String = null;
- internal var _firstLine:TextLine = null;
-
-
- public function TextBlock(content:ContentElement = null,
- tabStops:Vector. = null,
- textJustifier:TextJustifier = null,
- lineRotation:String = "rotate0",
- baselineZero:String = "roman",
- bidiLevel:int = 0,
- applyNonLinearFontScaling:Boolean = true,
- baselineFontDescription:FontDescription = null,
- baselineFontSize:Number = 12
- ) {
- // The order of setting these properties matters- if lineRotation
- // is null/invalid, the rest won't be set because it will throw an error
- if (content) {
- this.content = content;
- }
- if (tabStops) {
- this.tabStops = tabStops;
- }
- if (textJustifier) {
- this.textJustifier = textJustifier;
- } else {
- // This should create a new TextJustifier with locale "en", but we don't actually support creating TextJustifiers yet.
- }
-
- this.lineRotation = lineRotation;
-
- if (baselineZero) {
- this.baselineZero = baselineZero;
- }
- if (baselineFontDescription) {
- this.baselineFontDescription = baselineFontDescription;
- this.baselineFontSize = baselineFontSize;
- }
- this.applyNonLinearFontScaling = applyNonLinearFontScaling;
- }
-
- public function get applyNonLinearFontScaling():Boolean {
- return this._applyNonLinearFontScaling;
- }
-
- public function set applyNonLinearFontScaling(value:Boolean):void {
- this._applyNonLinearFontScaling = value;
- }
-
- public function get baselineFontDescription():FontDescription {
- return this._baselineFontDescription;
- }
-
- public function set baselineFontDescription(value:FontDescription):void {
- this._baselineFontDescription = value;
- }
-
- public function get baselineFontSize():Number {
- return this._baselineFontSize;
- }
-
- public function set baselineFontSize(value:Number):void {
- this._baselineFontSize = value;
- }
-
- public function get baselineZero():String {
- return this._baselineZero;
- }
-
- public function set baselineZero(value:String):void {
- this._baselineZero = value;
- }
-
- public function get bidiLevel():int {
- return this._bidiLevel;
- }
-
- public function set bidiLevel(value:int):void {
- this._bidiLevel = value;
- }
-
- public function get lineRotation():String {
- return this._lineRotation;
- }
-
- public function set lineRotation(value:String):void {
- if (value == null) {
- throw new TypeError("Error #2007: Parameter lineRotation must be non-null.", 2007);
- }
- // TODO: This should validate that `value` is a member of TextRotation
- this._lineRotation = value;
- }
-
- // Note: FP returns a copy of the Vector passed to it, so modifying the returned Vector doesn't affect the actual internal representation
- public function get tabStops():Vector. {
- return this._tabStops;
- }
-
- // Note: FP makes a copy of the Vector passed to it, then sets its internal representation to that
- public function set tabStops(value:Vector.):void {
- this._tabStops = value;
- }
-
- public function get textJustifier():TextJustifier {
- return this._textJustifier;
- }
-
- public function set textJustifier(value:TextJustifier):void {
- this._textJustifier = value;
- }
-
- public function get content():ContentElement {
- return this._content;
- }
-
- public function set content(value:ContentElement):void {
- this._content = value;
- }
-
- public native function createTextLine(previousLine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0, fitSomething:Boolean = false):TextLine;
-
- public function recreateTextLine(textLine:TextLine, previousLine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0, fitSomething:Boolean = false):TextLine {
- if (textLine == null) {
- throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
- }
-
- if (previousLine) {
- return null;
- }
-
- stub_method("flash.text.engine.TextBlock", "recreateTextLine");
-
- // FIXME: Properly recalculate new properties of new TextLine. Text layout
- // modules often depend on this returning the same textLine, so we can't
- // call `createTextLine` again.
- return textLine;
- }
-
- public function get textLineCreationResult():String {
- return this._textLineCreationResult;
- }
-
- public function get firstLine():TextLine {
- return this._firstLine;
- }
-
- public function get lastLine():TextLine {
- return this._firstLine;
- }
-
- public function releaseLines(start:TextLine, end:TextLine):void {
- if (start != end || end != this._firstLine) {
- stub_method("flash.text.engine.TextBlock", "releaseLines", "with start != end or multiple lines");
- return;
- }
- this._firstLine._validity = "invalid";
- this._firstLine._textBlock = null;
- }
- }
+package flash.text.engine
+{
+ import __ruffle__.stub_method;
+
+ public final class TextBlock
+ {
+ public var userData;
+
+ private var _applyNonLinearFontScaling:Boolean;
+ private var _baselineFontDescription:FontDescription = null;
+ private var _baselineFontSize:Number = 12;
+ private var _baselineZero:String = "roman";
+ private var _bidiLevel:int;
+ private var _lineRotation:String;
+ private var _tabStops:Vector.;
+ private var _textJustifier:TextJustifier;
+ private var _content:ContentElement;
+
+ internal var _textLineCreationResult:String = null;
+ internal var _firstLine:TextLine = null;
+
+ public function TextBlock(content:ContentElement = null,
+ tabStops:Vector. = null,
+ textJustifier:TextJustifier = null,
+ lineRotation:String = "rotate0",
+ baselineZero:String = "roman",
+ bidiLevel:int = 0,
+ applyNonLinearFontScaling:Boolean = true,
+ baselineFontDescription:FontDescription = null,
+ baselineFontSize:Number = 12
+ )
+ {
+ // The order of setting these properties matters- if lineRotation
+ // is null/invalid, the rest won't be set because it will throw an error
+ if (content)
+ {
+ this.content = content;
+ }
+ if (tabStops)
+ {
+ this.tabStops = tabStops;
+ }
+ if (textJustifier)
+ {
+ this.textJustifier = textJustifier;
+ }
+ else
+ {
+ // This should create a new TextJustifier with locale "en", but we don't actually support creating TextJustifiers yet.
+ }
+
+ this.lineRotation = lineRotation;
+
+ if (baselineZero)
+ {
+ this.baselineZero = baselineZero;
+ }
+ if (baselineFontDescription)
+ {
+ this.baselineFontDescription = baselineFontDescription;
+ this.baselineFontSize = baselineFontSize;
+ }
+ this.applyNonLinearFontScaling = applyNonLinearFontScaling;
+ }
+
+ public function get applyNonLinearFontScaling():Boolean
+ {
+ return this._applyNonLinearFontScaling;
+ }
+
+ public function set applyNonLinearFontScaling(value:Boolean):void
+ {
+ this._applyNonLinearFontScaling = value;
+ }
+
+ public function get baselineFontDescription():FontDescription
+ {
+ return this._baselineFontDescription;
+ }
+
+ public function set baselineFontDescription(value:FontDescription):void
+ {
+ this._baselineFontDescription = value;
+ }
+
+ public function get baselineFontSize():Number
+ {
+ return this._baselineFontSize;
+ }
+
+ public function set baselineFontSize(value:Number):void
+ {
+ this._baselineFontSize = value;
+ }
+
+ public function get baselineZero():String
+ {
+ return this._baselineZero;
+ }
+
+ public function set baselineZero(value:String):void
+ {
+ this._baselineZero = value;
+ }
+
+ public function get bidiLevel():int
+ {
+ return this._bidiLevel;
+ }
+
+ public function set bidiLevel(value:int):void
+ {
+ this._bidiLevel = value;
+ }
+
+ public function get lineRotation():String
+ {
+ return this._lineRotation;
+ }
+
+ public function set lineRotation(value:String):void
+ {
+ if (value == null)
+ {
+ throw new TypeError("Error #2007: Parameter lineRotation must be non-null.", 2007);
+ }
+ // TODO: This should validate that `value` is a member of TextRotation
+ this._lineRotation = value;
+ }
+
+ // Note: FP returns a copy of the Vector passed to it, so modifying the returned Vector doesn't affect the actual internal representation
+ public function get tabStops():Vector.
+ {
+ return this._tabStops;
+ }
+
+ // Note: FP makes a copy of the Vector passed to it, then sets its internal representation to that
+ public function set tabStops(value:Vector.):void
+ {
+ this._tabStops = value;
+ }
+
+ public function get textJustifier():TextJustifier
+ {
+ return this._textJustifier;
+ }
+
+ public function set textJustifier(value:TextJustifier):void
+ {
+ this._textJustifier = value;
+ }
+
+ public function get content():ContentElement
+ {
+ return this._content;
+ }
+
+ public function set content(value:ContentElement):void
+ {
+ this._content = value;
+ }
+
+ public native function createTextLine(previousLine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0, fitSomething:Boolean = false):TextLine;
+
+ public function recreateTextLine(textLine:TextLine, previousLine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0, fitSomething:Boolean = false):TextLine
+ {
+ if (textLine == null)
+ {
+ throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004);
+ }
+
+ if (previousLine)
+ {
+ return null;
+ }
+
+ stub_method("flash.text.engine.TextBlock", "recreateTextLine");
+
+ // FIXME: Properly recalculate new properties of new TextLine. Text layout
+ // modules often depend on this returning the same textLine, so we can't
+ // call `createTextLine` again.
+ return textLine;
+ }
+
+ public function get textLineCreationResult():String
+ {
+ return this._textLineCreationResult;
+ }
+
+ public function get firstLine():TextLine
+ {
+ return this._firstLine;
+ }
+
+ public function get lastLine():TextLine
+ {
+ return this._firstLine;
+ }
+
+ public function releaseLines(start:TextLine, end:TextLine):void
+ {
+ if (start != end || end != this._firstLine)
+ {
+ stub_method("flash.text.engine.TextBlock", "releaseLines", "with start != end or multiple lines");
+ return;
+ }
+ this._firstLine._validity = "invalid";
+ this._firstLine._textBlock = null;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextElement.as b/core/src/avm2/globals/flash/text/engine/TextElement.as
index 52f26b564742..45711aeb3ad6 100644
--- a/core/src/avm2/globals/flash/text/engine/TextElement.as
+++ b/core/src/avm2/globals/flash/text/engine/TextElement.as
@@ -1,31 +1,37 @@
-package flash.text.engine {
- import flash.events.EventDispatcher;
- import __ruffle__.stub_setter;
- import __ruffle__.stub_method;
-
- public final class TextElement extends ContentElement {
- public function TextElement(text:String = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") {
- super(elementFormat, eventMirror, textRotation);
- this.text = text;
- }
-
- // Contrary to the documentation, TextElement does not implement a getter here. It inherits the getter from ContentElement.
- public function set text(value:String):void {
- this._text = value;
- }
+package flash.text.engine
+{
+ import flash.events.EventDispatcher;
+ import __ruffle__.stub_setter;
+ import __ruffle__.stub_method;
- public function replaceText(beginIndex:int, endIndex:int, newText:String):void {
- var realText:String = this.text;
- if (realText == null) {
- realText = "";
- }
+ public final class TextElement extends ContentElement
+ {
+ public function TextElement(text:String = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0")
+ {
+ super(elementFormat, eventMirror, textRotation);
+ this.text = text;
+ }
- if (beginIndex < 0 || endIndex < 0 || beginIndex > realText.length || endIndex > realText.length) {
- throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
- }
+ // Contrary to the documentation, TextElement does not implement a getter here. It inherits the getter from ContentElement.
+ public function set text(value:String):void
+ {
+ this._text = value;
+ }
- this.text = realText.slice(0, beginIndex) + newText + realText.slice(endIndex, realText.length);
- }
- }
-}
+ public function replaceText(beginIndex:int, endIndex:int, newText:String):void
+ {
+ var realText:String = this.text;
+ if (realText == null)
+ {
+ realText = "";
+ }
+
+ if (beginIndex < 0 || endIndex < 0 || beginIndex > realText.length || endIndex > realText.length)
+ {
+ throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006);
+ }
+ this.text = realText.slice(0, beginIndex) + newText + realText.slice(endIndex, realText.length);
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/text/engine/TextJustifier.as b/core/src/avm2/globals/flash/text/engine/TextJustifier.as
index 6914c95f570d..2ad6135cda10 100644
--- a/core/src/avm2/globals/flash/text/engine/TextJustifier.as
+++ b/core/src/avm2/globals/flash/text/engine/TextJustifier.as
@@ -1,27 +1,34 @@
-package flash.text.engine {
- import flash.utils.getQualifiedClassName;
+package flash.text.engine
+{
+ import flash.utils.getQualifiedClassName;
- public class TextJustifier {
- private var _lineJustification:String = null;
- public function TextJustifier(locale:String, lineJustification:String) {
- // TODO: Is there a better way to do this?
- if (getQualifiedClassName(this) === "flash.text.engine::TextJustifier") {
- throw new ArgumentError("Error #2012: TextJustifier$ class cannot be instantiated.", 2012);
- }
+ public class TextJustifier
+ {
+ private var _lineJustification:String = null;
+ public function TextJustifier(locale:String, lineJustification:String)
+ {
+ // TODO: Is there a better way to do this?
+ if (getQualifiedClassName(this) === "flash.text.engine::TextJustifier")
+ {
+ throw new ArgumentError("Error #2012: TextJustifier$ class cannot be instantiated.", 2012);
+ }
- this.lineJustification = lineJustification;
- }
+ this.lineJustification = lineJustification;
+ }
- public function get lineJustification():String {
- return this._lineJustification;
- }
+ public function get lineJustification():String
+ {
+ return this._lineJustification;
+ }
- public function set lineJustification(value:String):void {
- this._lineJustification = value;
- }
+ public function set lineJustification(value:String):void
+ {
+ this._lineJustification = value;
+ }
- public function clone():TextJustifier {
- return null;
- }
- }
+ public function clone():TextJustifier
+ {
+ return null;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextLine.as b/core/src/avm2/globals/flash/text/engine/TextLine.as
index 183794670909..aa6bc216dc25 100644
--- a/core/src/avm2/globals/flash/text/engine/TextLine.as
+++ b/core/src/avm2/globals/flash/text/engine/TextLine.as
@@ -1,165 +1,198 @@
-package flash.text.engine {
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
- import __ruffle__.stub_method;
-
- import flash.display.DisplayObjectContainer;
- import flash.errors.IllegalOperationError;
- import flash.geom.Rectangle;
- import flash.ui.ContextMenu;
-
- // FIXME: None of the DisplayObjectContainer methods actually work on
- // the TextLine class in Ruffle, despite the methods working fine in FP-
- // however, it's unlikely that SWFs will actually attempt to add children
- // to a TextLine.
- [Ruffle(SuperInitializer)]
- public final class TextLine extends DisplayObjectContainer {
- internal var _specifiedWidth:Number = 0.0;
- internal var _textBlock:TextBlock = null;
- internal var _rawTextLength:int = 0;
- internal var _validity:String = "valid";
-
- public static const MAX_LINE_WIDTH:int = 1000000;
-
- public var userData;
-
- public function TextLine() {
- throw new ArgumentError("Error #2012: TextLine$ class cannot be instantiated.", 2012);
- }
-
- public function get rawTextLength():int {
- return this._rawTextLength;
- }
-
- public function get textBlockBeginIndex():int {
- stub_getter("flash.text.engine.TextLine", "textBlockBeginIndex");
- return 0;
- }
-
- public function get specifiedWidth():Number {
- return this._specifiedWidth;
- }
-
- public function get textBlock():TextBlock {
- return this._textBlock;
- }
-
- public function get ascent():Number {
- stub_getter("flash.text.engine.TextLine", "ascent");
- return 12.0;
- }
-
- public function get descent():Number {
- stub_getter("flash.text.engine.TextLine", "descent");
- return 3.0;
- }
-
- public function get unjustifiedTextWidth():Number {
- stub_getter("flash.text.engine.TextLine", "unjustifiedTextWidth");
- return this._specifiedWidth;
- }
-
- public native function get textWidth():Number;
- public native function get textHeight():Number;
-
- public function get validity():String {
- stub_getter("flash.text.engine.TextLine", "validity");
- return this._validity;
- }
-
- public function set validity(value:String):void {
- stub_setter("flash.text.engine.TextLine", "validity");
- this._validity = value;
- }
-
- public function get hasGraphicElement():Boolean {
- stub_getter("flash.text.engine.TextLine", "hasGraphicElement");
- return false;
- }
-
- public function get atomCount():int {
- stub_getter("flash.text.engine.TextLine", "atomCount");
- return this._rawTextLength;
- }
-
- public function get nextLine():TextLine {
- return null;
- }
-
- public function get previousLine():TextLine {
- return null;
- }
-
- public function getBaselinePosition(baseline:String):Number {
- stub_method("flash.text.engine.TextLine", "getBaselinePosition");
- return 0.0;
- }
-
- public function get hasTabs():Boolean {
- stub_getter("flash.text.engine.TextLine", "hasTabs");
- return false;
- }
-
- public function getAtomIndexAtPoint(stageX:Number, stageY:Number):int {
- stub_method("flash.text.engine.TextLine", "getAtomIndexAtPoint");
- return -1;
- }
-
- public function getAtomIndexAtCharIndex(charIndex:int):int {
- stub_method("flash.text.engine.TextLine", "getAtomIndexAtCharIndex");
- return -1;
- }
-
- public function getAtomBounds(index:int):Rectangle {
- stub_method("flash.text.engine.TextLine", "getAtomBounds");
- return new Rectangle(0, 0, 0, 0);
- }
-
- // This function does nothing in Flash Player 32
- public function flushAtomData():void { }
-
- // Overrides
-
- override public function get contextMenu():ContextMenu {
- return null;
- }
-
- override public function set contextMenu(cm:ContextMenu):void {
- throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
- }
-
- override public function get focusRect():Object {
- return null;
- }
-
- override public function set focusRect(value:Object):void {
- throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
- }
-
- override public function get tabChildren():Boolean {
- return false;
- }
-
- override public function set tabChildren(value:Boolean):void {
- throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
- }
-
- override public function get tabEnabled():Boolean {
- return false;
- }
-
- override public function set tabEnabled(value:Boolean):void {
- throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
- }
-
- override public function get tabIndex():int {
- return -1;
- }
-
- override public function set tabIndex(index:int):void {
- throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
- }
-
- // End of overrides
- }
+package flash.text.engine
+{
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+ import __ruffle__.stub_method;
+
+ import flash.display.DisplayObjectContainer;
+ import flash.errors.IllegalOperationError;
+ import flash.geom.Rectangle;
+ import flash.ui.ContextMenu;
+
+ // FIXME: None of the DisplayObjectContainer methods actually work on
+ // the TextLine class in Ruffle, despite the methods working fine in FP-
+ // however, it's unlikely that SWFs will actually attempt to add children
+ // to a TextLine.
+ [Ruffle(SuperInitializer)]
+ public final class TextLine extends DisplayObjectContainer
+ {
+ internal var _specifiedWidth:Number = 0.0;
+ internal var _textBlock:TextBlock = null;
+ internal var _rawTextLength:int = 0;
+ internal var _validity:String = "valid";
+
+ public static const MAX_LINE_WIDTH:int = 1000000;
+
+ public var userData;
+
+ public function TextLine()
+ {
+ throw new ArgumentError("Error #2012: TextLine$ class cannot be instantiated.", 2012);
+ }
+
+ public function get rawTextLength():int
+ {
+ return this._rawTextLength;
+ }
+
+ public function get textBlockBeginIndex():int
+ {
+ stub_getter("flash.text.engine.TextLine", "textBlockBeginIndex");
+ return 0;
+ }
+
+ public function get specifiedWidth():Number
+ {
+ return this._specifiedWidth;
+ }
+
+ public function get textBlock():TextBlock
+ {
+ return this._textBlock;
+ }
+
+ public function get ascent():Number
+ {
+ stub_getter("flash.text.engine.TextLine", "ascent");
+ return 12.0;
+ }
+
+ public function get descent():Number
+ {
+ stub_getter("flash.text.engine.TextLine", "descent");
+ return 3.0;
+ }
+
+ public function get unjustifiedTextWidth():Number
+ {
+ stub_getter("flash.text.engine.TextLine", "unjustifiedTextWidth");
+ return this._specifiedWidth;
+ }
+
+ public native function get textWidth():Number;
+ public native function get textHeight():Number;
+
+ public function get validity():String
+ {
+ stub_getter("flash.text.engine.TextLine", "validity");
+ return this._validity;
+ }
+
+ public function set validity(value:String):void
+ {
+ stub_setter("flash.text.engine.TextLine", "validity");
+ this._validity = value;
+ }
+
+ public function get hasGraphicElement():Boolean
+ {
+ stub_getter("flash.text.engine.TextLine", "hasGraphicElement");
+ return false;
+ }
+
+ public function get atomCount():int
+ {
+ stub_getter("flash.text.engine.TextLine", "atomCount");
+ return this._rawTextLength;
+ }
+
+ public function get nextLine():TextLine
+ {
+ return null;
+ }
+
+ public function get previousLine():TextLine
+ {
+ return null;
+ }
+
+ public function getBaselinePosition(baseline:String):Number
+ {
+ stub_method("flash.text.engine.TextLine", "getBaselinePosition");
+ return 0.0;
+ }
+
+ public function get hasTabs():Boolean
+ {
+ stub_getter("flash.text.engine.TextLine", "hasTabs");
+ return false;
+ }
+
+ public function getAtomIndexAtPoint(stageX:Number, stageY:Number):int
+ {
+ stub_method("flash.text.engine.TextLine", "getAtomIndexAtPoint");
+ return -1;
+ }
+
+ public function getAtomIndexAtCharIndex(charIndex:int):int
+ {
+ stub_method("flash.text.engine.TextLine", "getAtomIndexAtCharIndex");
+ return -1;
+ }
+
+ public function getAtomBounds(index:int):Rectangle
+ {
+ stub_method("flash.text.engine.TextLine", "getAtomBounds");
+ return new Rectangle(0, 0, 0, 0);
+ }
+
+ // This function does nothing in Flash Player 32
+ public function flushAtomData():void
+ {
+ }
+
+ // Overrides
+
+ override public function get contextMenu():ContextMenu
+ {
+ return null;
+ }
+
+ override public function set contextMenu(cm:ContextMenu):void
+ {
+ throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
+ }
+
+ override public function get focusRect():Object
+ {
+ return null;
+ }
+
+ override public function set focusRect(value:Object):void
+ {
+ throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
+ }
+
+ override public function get tabChildren():Boolean
+ {
+ return false;
+ }
+
+ override public function set tabChildren(value:Boolean):void
+ {
+ throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
+ }
+
+ override public function get tabEnabled():Boolean
+ {
+ return false;
+ }
+
+ override public function set tabEnabled(value:Boolean):void
+ {
+ throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
+ }
+
+ override public function get tabIndex():int
+ {
+ return -1;
+ }
+
+ override public function set tabIndex(index:int):void
+ {
+ throw new IllegalOperationError("Error #2181: The TextLine class does not implement this property or method.", 2181);
+ }
+
+ // End of overrides
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as b/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as
index 940048175560..b617e7dde0b5 100644
--- a/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as
+++ b/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as
@@ -5,22 +5,20 @@
package flash.text.engine
{
-
-
- public final class TextLineCreationResult
- {
- // Indicates no line was created because all text in the block had already been broken.
- public static const COMPLETE:String = "complete";
-
- // Indicates the line was created with an emergency break because no break opportunity was available in the specified width.
- public static const EMERGENCY:String = "emergency";
-
- // Indicates no line was created because no text could fit in the specified width and fitSomething was not specified in the call to createTextLine().
- public static const INSUFFICIENT_WIDTH:String = "insufficientWidth";
-
- // Indicates the line was successfully broken.
- public static const SUCCESS:String = "success";
-
-
- }
+
+ public final class TextLineCreationResult
+ {
+ // Indicates no line was created because all text in the block had already been broken.
+ public static const COMPLETE:String = "complete";
+
+ // Indicates the line was created with an emergency break because no break opportunity was available in the specified width.
+ public static const EMERGENCY:String = "emergency";
+
+ // Indicates no line was created because no text could fit in the specified width and fitSomething was not specified in the call to createTextLine().
+ public static const INSUFFICIENT_WIDTH:String = "insufficientWidth";
+
+ // Indicates the line was successfully broken.
+ public static const SUCCESS:String = "success";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextLineMirrorRegion.as b/core/src/avm2/globals/flash/text/engine/TextLineMirrorRegion.as
index 7022a94f4b04..b1a3198b49be 100644
--- a/core/src/avm2/globals/flash/text/engine/TextLineMirrorRegion.as
+++ b/core/src/avm2/globals/flash/text/engine/TextLineMirrorRegion.as
@@ -1,8 +1,11 @@
-package flash.text.engine {
- [API("662")]
- public final class TextLineMirrorRegion {
- public function TextLineMirrorRegion() {
- throw new ArgumentError("Error #2012: TextLineMirrorRegion$ class cannot be instantiated.", 2012);
- }
- }
+package flash.text.engine
+{
+ [API("662")]
+ public final class TextLineMirrorRegion
+ {
+ public function TextLineMirrorRegion()
+ {
+ throw new ArgumentError("Error #2012: TextLineMirrorRegion$ class cannot be instantiated.", 2012);
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextLineValidity.as b/core/src/avm2/globals/flash/text/engine/TextLineValidity.as
index f9ffa393cd6b..6fa814123194 100644
--- a/core/src/avm2/globals/flash/text/engine/TextLineValidity.as
+++ b/core/src/avm2/globals/flash/text/engine/TextLineValidity.as
@@ -5,22 +5,20 @@
package flash.text.engine
{
-
-
- public final class TextLineValidity
- {
- // Specifies that the line is invalid.
- public static const INVALID:String = "invalid";
-
- // Specifies that the text line is possibly invalid.
- public static const POSSIBLY_INVALID:String = "possiblyInvalid";
-
- // Specifies that the line is static, and that the connection between the line and the text block has been severed.
- public static const STATIC:String = "static";
-
- // Specifies that the text line is valid.
- public static const VALID:String = "valid";
-
-
- }
+
+ public final class TextLineValidity
+ {
+ // Specifies that the line is invalid.
+ public static const INVALID:String = "invalid";
+
+ // Specifies that the text line is possibly invalid.
+ public static const POSSIBLY_INVALID:String = "possiblyInvalid";
+
+ // Specifies that the line is static, and that the connection between the line and the text block has been severed.
+ public static const STATIC:String = "static";
+
+ // Specifies that the text line is valid.
+ public static const VALID:String = "valid";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TextRotation.as b/core/src/avm2/globals/flash/text/engine/TextRotation.as
index ef8a40913cc6..a940615eb677 100644
--- a/core/src/avm2/globals/flash/text/engine/TextRotation.as
+++ b/core/src/avm2/globals/flash/text/engine/TextRotation.as
@@ -5,25 +5,23 @@
package flash.text.engine
{
-
-
- public final class TextRotation
- {
- // Specifies a 90 degree counter clockwise rotation for full width and wide glyphs only, as determined by the Unicode properties of the glyph.
- public static const AUTO:String = "auto";
-
- // Specifies no rotation.
- public static const ROTATE_0:String = "rotate0";
-
- // Specifies a 180 degree rotation.
- public static const ROTATE_180:String = "rotate180";
-
- // Specifies a 270 degree clockwise rotation.
- public static const ROTATE_270:String = "rotate270";
-
- // Specifies a 90 degree clockwise rotation.
- public static const ROTATE_90:String = "rotate90";
-
-
- }
+
+ public final class TextRotation
+ {
+ // Specifies a 90 degree counter clockwise rotation for full width and wide glyphs only, as determined by the Unicode properties of the glyph.
+ public static const AUTO:String = "auto";
+
+ // Specifies no rotation.
+ public static const ROTATE_0:String = "rotate0";
+
+ // Specifies a 180 degree rotation.
+ public static const ROTATE_180:String = "rotate180";
+
+ // Specifies a 270 degree clockwise rotation.
+ public static const ROTATE_270:String = "rotate270";
+
+ // Specifies a 90 degree clockwise rotation.
+ public static const ROTATE_90:String = "rotate90";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/engine/TypographicCase.as b/core/src/avm2/globals/flash/text/engine/TypographicCase.as
index 233e62738ded..23025459061e 100644
--- a/core/src/avm2/globals/flash/text/engine/TypographicCase.as
+++ b/core/src/avm2/globals/flash/text/engine/TypographicCase.as
@@ -5,31 +5,29 @@
package flash.text.engine
{
-
-
- public final class TypographicCase
- {
- // Specifies that spacing is adjusted for uppercase characters on output.
- public static const CAPS:String = "caps";
-
- // Specifies that all lowercase characters use small-caps glyphs on output.
- public static const CAPS_AND_SMALL_CAPS:String = "capsAndSmallCaps";
-
- // Specifies default typographic case.
- public static const DEFAULT:String = "default";
-
- // Specifies that all characters use lowercase glyphs on output.
- public static const LOWERCASE:String = "lowercase";
-
- // Specifies that uppercase characters use small-caps glyphs on output.
- public static const SMALL_CAPS:String = "smallCaps";
-
- // Specifies that uppercase characters use title glyphs on output.
- public static const TITLE:String = "title";
-
- // Specifies that all characters use uppercase glyphs on output.
- public static const UPPERCASE:String = "uppercase";
-
-
- }
+
+ public final class TypographicCase
+ {
+ // Specifies that spacing is adjusted for uppercase characters on output.
+ public static const CAPS:String = "caps";
+
+ // Specifies that all lowercase characters use small-caps glyphs on output.
+ public static const CAPS_AND_SMALL_CAPS:String = "capsAndSmallCaps";
+
+ // Specifies default typographic case.
+ public static const DEFAULT:String = "default";
+
+ // Specifies that all characters use lowercase glyphs on output.
+ public static const LOWERCASE:String = "lowercase";
+
+ // Specifies that uppercase characters use small-caps glyphs on output.
+ public static const SMALL_CAPS:String = "smallCaps";
+
+ // Specifies that uppercase characters use title glyphs on output.
+ public static const TITLE:String = "title";
+
+ // Specifies that all characters use uppercase glyphs on output.
+ public static const UPPERCASE:String = "uppercase";
+
+ }
}
diff --git a/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as b/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as
index 3403f735e116..a544fa420202 100644
--- a/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as
+++ b/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as
@@ -1,19 +1,21 @@
-package flash.text.ime {
- public final class CompositionAttributeRange {
- public var converted:Boolean;
+package flash.text.ime
+{
+ public final class CompositionAttributeRange
+ {
+ public var converted:Boolean;
- public var relativeStart:int;
-
- public var relativeEnd:int;
-
- public var selected:Boolean;
-
- public function CompositionAttributeRange(relativeStart:int, relativeEnd:int, selected:Boolean, converted:Boolean) {
- this.relativeStart = relativeStart;
- this.relativeEnd = relativeEnd;
- this.selected = selected;
- this.converted = converted;
- }
- }
-}
+ public var relativeStart:int;
+
+ public var relativeEnd:int;
+ public var selected:Boolean;
+
+ public function CompositionAttributeRange(relativeStart:int, relativeEnd:int, selected:Boolean, converted:Boolean)
+ {
+ this.relativeStart = relativeStart;
+ this.relativeEnd = relativeEnd;
+ this.selected = selected;
+ this.converted = converted;
+ }
+ }
+}
diff --git a/core/src/avm2/globals/flash/text/ime/IIMEClient.as b/core/src/avm2/globals/flash/text/ime/IIMEClient.as
index 25a35fb93dcb..c1a80b449af9 100644
--- a/core/src/avm2/globals/flash/text/ime/IIMEClient.as
+++ b/core/src/avm2/globals/flash/text/ime/IIMEClient.as
@@ -1,25 +1,26 @@
-package flash.text.ime {
- import flash.geom.Rectangle;
+package flash.text.ime
+{
+ import flash.geom.Rectangle;
- public interface IIMEClient {
- function confirmComposition(text:String = null, preserveSelection:Boolean = false):void;
+ public interface IIMEClient
+ {
+ function confirmComposition(text:String = null, preserveSelection:Boolean = false):void;
- function getTextBounds(startIndex:int, endIndex:int):Rectangle;
+ function getTextBounds(startIndex:int, endIndex:int):Rectangle;
- function getTextInRange(startIndex:int, endIndex:int):String;
+ function getTextInRange(startIndex:int, endIndex:int):String;
- function selectRange(anchorIndex:int, activeIndex:int):void;
+ function selectRange(anchorIndex:int, activeIndex:int):void;
- function updateComposition(text:String, attributes:Vector., compositionStartIndex:int, compositionEndIndex:int):void;
+ function updateComposition(text:String, attributes:Vector., compositionStartIndex:int, compositionEndIndex:int):void;
- function get compositionStartIndex():int;
- function get compositionEndIndex():int;
+ function get compositionStartIndex():int;
+ function get compositionEndIndex():int;
- function get selectionAnchorIndex():int;
+ function get selectionAnchorIndex():int;
- function get selectionActiveIndex():int;
+ function get selectionActiveIndex():int;
- function get verticalTextLayout():Boolean;
- }
+ function get verticalTextLayout():Boolean;
+ }
}
-
diff --git a/core/src/avm2/globals/flash/trace/Trace.as b/core/src/avm2/globals/flash/trace/Trace.as
index 06fc5699c977..3aabb4a69be1 100644
--- a/core/src/avm2/globals/flash/trace/Trace.as
+++ b/core/src/avm2/globals/flash/trace/Trace.as
@@ -1,12 +1,14 @@
-package flash.trace {
- public class Trace {
- public static const OFF:int = 0;
- public static const METHODS:int = 1;
- public static const METHODS_WITH_ARGS:int = 2;
- public static const METHODS_AND_LINES:int = 3;
- public static const METHODS_AND_LINES_WITH_ARGS:int = 4;
+package flash.trace
+{
+ public class Trace
+ {
+ public static const OFF:int = 0;
+ public static const METHODS:int = 1;
+ public static const METHODS_WITH_ARGS:int = 2;
+ public static const METHODS_AND_LINES:int = 3;
+ public static const METHODS_AND_LINES_WITH_ARGS:int = 4;
- public static const FILE = 1;
- public static const LISTENER = 2;
- }
+ public static const FILE = 1;
+ public static const LISTENER = 2;
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/ContextMenu.as b/core/src/avm2/globals/flash/ui/ContextMenu.as
index 7721c42a5192..c2d9288fa2f4 100644
--- a/core/src/avm2/globals/flash/ui/ContextMenu.as
+++ b/core/src/avm2/globals/flash/ui/ContextMenu.as
@@ -1,60 +1,69 @@
package flash.ui
{
- import flash.display.NativeMenu;
- import __ruffle__.stub_getter;
-
- public final class ContextMenu extends NativeMenu
- {
- public function ContextMenu()
- {
- super();
- this.customItems = new Array();
- }
-
- private var _customItems:Array;
- private var _clipboardMenu:Boolean;
-
- public function get customItems():Array {
- return this._customItems;
- }
-
- public function set customItems(value:Array):void {
- this._customItems = value;
- }
-
- public native function hideBuiltInItems(): void;
-
- private var _builtInItems: ContextMenuBuiltInItems = new ContextMenuBuiltInItems();
- private var _clipboardItems: ContextMenuClipboardItems = new ContextMenuClipboardItems();
-
- public function get builtInItems(): ContextMenuBuiltInItems {
- return this._builtInItems;
- }
-
- public function set builtInItems(value:ContextMenuBuiltInItems):void {
- this._builtInItems = value;
- }
-
- public function get clipboardItems(): ContextMenuClipboardItems {
- return this._clipboardItems;
- }
-
- public function set clipboardItems(value:ContextMenuClipboardItems):void {
- this._clipboardItems = value;
- }
-
- public function get clipboardMenu():Boolean {
- return _clipboardMenu;
- }
-
- public function set clipboardMenu(value:Boolean):void {
- _clipboardMenu = value;
- }
-
- public static function get isSupported():Boolean {
- // TODO: return true when implementation actually affects the context menu
- stub_getter("flash.ui.ContextMenu", "isSupported");
- return false;
- }
- }
+ import flash.display.NativeMenu;
+ import __ruffle__.stub_getter;
+
+ public final class ContextMenu extends NativeMenu
+ {
+ public function ContextMenu()
+ {
+ super();
+ this.customItems = new Array();
+ }
+
+ private var _customItems:Array;
+ private var _clipboardMenu:Boolean;
+
+ public function get customItems():Array
+ {
+ return this._customItems;
+ }
+
+ public function set customItems(value:Array):void
+ {
+ this._customItems = value;
+ }
+
+ public native function hideBuiltInItems():void;
+
+ private var _builtInItems:ContextMenuBuiltInItems = new ContextMenuBuiltInItems();
+ private var _clipboardItems:ContextMenuClipboardItems = new ContextMenuClipboardItems();
+
+ public function get builtInItems():ContextMenuBuiltInItems
+ {
+ return this._builtInItems;
+ }
+
+ public function set builtInItems(value:ContextMenuBuiltInItems):void
+ {
+ this._builtInItems = value;
+ }
+
+ public function get clipboardItems():ContextMenuClipboardItems
+ {
+ return this._clipboardItems;
+ }
+
+ public function set clipboardItems(value:ContextMenuClipboardItems):void
+ {
+ this._clipboardItems = value;
+ }
+
+ public function get clipboardMenu():Boolean
+ {
+ return _clipboardMenu;
+ }
+
+ public function set clipboardMenu(value:Boolean):void
+ {
+ _clipboardMenu = value;
+ }
+
+ public static function get isSupported():Boolean
+ {
+ // TODO: return true when implementation actually affects the context menu
+ stub_getter("flash.ui.ContextMenu", "isSupported");
+ return false;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as b/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as
index 1ab65396d131..3b1cd9e80d02 100644
--- a/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as
+++ b/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as
@@ -1,97 +1,108 @@
package flash.ui
{
- public final class ContextMenuBuiltInItems {
- private var _forwardAndBack:Boolean = true;
- private var _loop:Boolean = true;
- private var _play:Boolean = true;
- private var _print:Boolean = true;
- private var _quality:Boolean = true;
- private var _rewind:Boolean = true;
- private var _save:Boolean = true;
- private var _zoom:Boolean = true;
-
- public function get forwardAndBack():Boolean {
- return this._forwardAndBack;
- }
-
- public function set forwardAndBack(value:Boolean):void {
- this._forwardAndBack = value;
- }
-
-
- public function get loop():Boolean {
- return this._loop;
- }
-
- public function set loop(value:Boolean):void {
- this._loop = value;
- }
-
-
- public function get play():Boolean {
- return this._play;
- }
-
- public function set play(value:Boolean):void {
- this._play = value;
- }
-
-
- public function get print():Boolean {
- return this._print;
- }
-
- public function set print(value:Boolean):void {
- this._print = value;
- }
-
-
- public function get quality():Boolean {
- return this._quality;
- }
-
- public function set quality(value:Boolean):void {
- this._quality = value;
- }
-
-
- public function get rewind():Boolean {
- return this._rewind;
- }
-
- public function set rewind(value:Boolean):void {
- this._rewind = value;
- }
-
-
- public function get save():Boolean {
- return this._save;
- }
-
- public function set save(value:Boolean):void {
- this._save = value;
- }
-
-
- public function get zoom():Boolean {
- return this._zoom;
- }
-
- public function set zoom(value:Boolean):void {
- this._zoom = value;
- }
-
- public function clone():ContextMenuBuiltInItems {
- var items:ContextMenuBuiltInItems = new ContextMenuBuiltInItems();
- items.forwardAndBack = this.forwardAndBack;
- items.loop = this.loop;
- items.play = this.play;
- items.print = this.print;
- items.quality = this.quality;
- items.rewind = this.rewind;
- items.save = this.save;
- items.zoom = this.zoom;
- return items;
- }
- }
+ public final class ContextMenuBuiltInItems
+ {
+ private var _forwardAndBack:Boolean = true;
+ private var _loop:Boolean = true;
+ private var _play:Boolean = true;
+ private var _print:Boolean = true;
+ private var _quality:Boolean = true;
+ private var _rewind:Boolean = true;
+ private var _save:Boolean = true;
+ private var _zoom:Boolean = true;
+
+ public function get forwardAndBack():Boolean
+ {
+ return this._forwardAndBack;
+ }
+
+ public function set forwardAndBack(value:Boolean):void
+ {
+ this._forwardAndBack = value;
+ }
+
+ public function get loop():Boolean
+ {
+ return this._loop;
+ }
+
+ public function set loop(value:Boolean):void
+ {
+ this._loop = value;
+ }
+
+ public function get play():Boolean
+ {
+ return this._play;
+ }
+
+ public function set play(value:Boolean):void
+ {
+ this._play = value;
+ }
+
+ public function get print():Boolean
+ {
+ return this._print;
+ }
+
+ public function set print(value:Boolean):void
+ {
+ this._print = value;
+ }
+
+ public function get quality():Boolean
+ {
+ return this._quality;
+ }
+
+ public function set quality(value:Boolean):void
+ {
+ this._quality = value;
+ }
+
+ public function get rewind():Boolean
+ {
+ return this._rewind;
+ }
+
+ public function set rewind(value:Boolean):void
+ {
+ this._rewind = value;
+ }
+
+ public function get save():Boolean
+ {
+ return this._save;
+ }
+
+ public function set save(value:Boolean):void
+ {
+ this._save = value;
+ }
+
+ public function get zoom():Boolean
+ {
+ return this._zoom;
+ }
+
+ public function set zoom(value:Boolean):void
+ {
+ this._zoom = value;
+ }
+
+ public function clone():ContextMenuBuiltInItems
+ {
+ var items:ContextMenuBuiltInItems = new ContextMenuBuiltInItems();
+ items.forwardAndBack = this.forwardAndBack;
+ items.loop = this.loop;
+ items.play = this.play;
+ items.print = this.print;
+ items.quality = this.quality;
+ items.rewind = this.rewind;
+ items.save = this.save;
+ items.zoom = this.zoom;
+ return items;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as b/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as
index 9d7ff79a9959..4c0cb637bdc9 100644
--- a/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as
+++ b/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as
@@ -1,59 +1,72 @@
-package flash.ui {
- public final class ContextMenuClipboardItems {
- private var _clear:Boolean;
- private var _copy:Boolean;
- private var _cut:Boolean;
- private var _paste:Boolean;
- private var _selectAll:Boolean;
-
- public function get clear():Boolean {
- return this._clear;
- }
-
- public function set clear(value:Boolean):void {
- this._clear = value;
- }
-
- public function get copy():Boolean {
- return this._copy;
- }
-
- public function set copy(value:Boolean):void {
- this._copy = value;
- }
-
- public function get cut():Boolean {
- return this._cut;
- }
-
- public function set cut(value:Boolean):void {
- this._cut = value;
- }
-
- public function get paste():Boolean {
- return this._paste;
- }
-
- public function set paste(value:Boolean):void {
- this._paste = value;
- }
-
- public function get selectAll():Boolean {
- return this._selectAll;
- }
-
- public function set selectAll(value:Boolean):void {
- this._selectAll = value;
- }
-
- public function clone():ContextMenuClipboardItems {
- var items:ContextMenuClipboardItems = new ContextMenuClipboardItems();
- items.clear = this.clear;
- items.copy = this.copy;
- items.cut = this.cut;
- items.paste = this.paste;
- items.selectAll = this.selectAll;
- return items;
- }
- }
+package flash.ui
+{
+ public final class ContextMenuClipboardItems
+ {
+ private var _clear:Boolean;
+ private var _copy:Boolean;
+ private var _cut:Boolean;
+ private var _paste:Boolean;
+ private var _selectAll:Boolean;
+
+ public function get clear():Boolean
+ {
+ return this._clear;
+ }
+
+ public function set clear(value:Boolean):void
+ {
+ this._clear = value;
+ }
+
+ public function get copy():Boolean
+ {
+ return this._copy;
+ }
+
+ public function set copy(value:Boolean):void
+ {
+ this._copy = value;
+ }
+
+ public function get cut():Boolean
+ {
+ return this._cut;
+ }
+
+ public function set cut(value:Boolean):void
+ {
+ this._cut = value;
+ }
+
+ public function get paste():Boolean
+ {
+ return this._paste;
+ }
+
+ public function set paste(value:Boolean):void
+ {
+ this._paste = value;
+ }
+
+ public function get selectAll():Boolean
+ {
+ return this._selectAll;
+ }
+
+ public function set selectAll(value:Boolean):void
+ {
+ this._selectAll = value;
+ }
+
+ public function clone():ContextMenuClipboardItems
+ {
+ var items:ContextMenuClipboardItems = new ContextMenuClipboardItems();
+ items.clear = this.clear;
+ items.copy = this.copy;
+ items.cut = this.cut;
+ items.paste = this.paste;
+ items.selectAll = this.selectAll;
+ return items;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/ContextMenuItem.as b/core/src/avm2/globals/flash/ui/ContextMenuItem.as
index 40f29bacfb1c..ad3537e17f45 100644
--- a/core/src/avm2/globals/flash/ui/ContextMenuItem.as
+++ b/core/src/avm2/globals/flash/ui/ContextMenuItem.as
@@ -1,29 +1,29 @@
package flash.ui
{
- import flash.display.NativeMenuItem;
+ import flash.display.NativeMenuItem;
- public final class ContextMenuItem extends NativeMenuItem
- {
- public function ContextMenuItem(
- caption:String,
- separatorBefore:Boolean = false,
- enabled:Boolean = true,
- visible:Boolean = true
- )
- {
- this.caption = caption;
- this.separatorBefore = separatorBefore;
- this.enabled = enabled;
- this.visible = visible;
- }
+ public final class ContextMenuItem extends NativeMenuItem
+ {
+ public function ContextMenuItem(
+ caption:String,
+ separatorBefore:Boolean = false,
+ enabled:Boolean = true,
+ visible:Boolean = true
+ )
+ {
+ this.caption = caption;
+ this.separatorBefore = separatorBefore;
+ this.enabled = enabled;
+ this.visible = visible;
+ }
- public function clone(): ContextMenuItem
- {
- return new ContextMenuItem(this.caption, this.separatorBefore, this.enabled, this.visible);
- }
+ public function clone():ContextMenuItem
+ {
+ return new ContextMenuItem(this.caption, this.separatorBefore, this.enabled, this.visible);
+ }
- public var caption: String;
- public var separatorBefore: Boolean;
- public var visible: Boolean;
- }
+ public var caption:String;
+ public var separatorBefore:Boolean;
+ public var visible:Boolean;
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/GameInput.as b/core/src/avm2/globals/flash/ui/GameInput.as
index 851f7cdfca6d..51ef8f2702f8 100644
--- a/core/src/avm2/globals/flash/ui/GameInput.as
+++ b/core/src/avm2/globals/flash/ui/GameInput.as
@@ -1,18 +1,23 @@
-package flash.ui {
- import flash.events.EventDispatcher;
+package flash.ui
+{
+ import flash.events.EventDispatcher;
- [API("688")]
- public final class GameInput extends EventDispatcher {
- public static function get isSupported():Boolean {
- return false;
- }
+ [API("688")]
+ public final class GameInput extends EventDispatcher
+ {
+ public static function get isSupported():Boolean
+ {
+ return false;
+ }
- public static function get numDevices():int {
- return 0;
- }
+ public static function get numDevices():int
+ {
+ return 0;
+ }
- public static function getDeviceAt(index:int):GameInputDevice {
- throw new RangeError("Error #1506: The specified range is invalid.", 1506);
- }
- }
+ public static function getDeviceAt(index:int):GameInputDevice
+ {
+ throw new RangeError("Error #1506: The specified range is invalid.", 1506);
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/ui/GameInputControl.as b/core/src/avm2/globals/flash/ui/GameInputControl.as
index dc08097b2356..15533e28b67e 100644
--- a/core/src/avm2/globals/flash/ui/GameInputControl.as
+++ b/core/src/avm2/globals/flash/ui/GameInputControl.as
@@ -1,10 +1,13 @@
-package flash.ui {
- import flash.events.EventDispatcher;
+package flash.ui
+{
+ import flash.events.EventDispatcher;
- [API("688")]
- public dynamic class GameInputControl extends EventDispatcher {
- public function GameInputControl() {
- throw new ArgumentError("Error #2012: GameInputControl$ class cannot be instantiated.", 2012)
- }
- }
+ [API("688")]
+ public dynamic class GameInputControl extends EventDispatcher
+ {
+ public function GameInputControl()
+ {
+ throw new ArgumentError("Error #2012: GameInputControl$ class cannot be instantiated.", 2012);
+ }
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/ui/GameInputDevice.as b/core/src/avm2/globals/flash/ui/GameInputDevice.as
index 65bbe6059308..f53b2c4786ad 100644
--- a/core/src/avm2/globals/flash/ui/GameInputDevice.as
+++ b/core/src/avm2/globals/flash/ui/GameInputDevice.as
@@ -1,11 +1,13 @@
-package flash.ui {
- // The AS3 docs say this is only available in AIR 3.7.
- // That was determined to be a lie.
- [API("688")]
- public final class GameInputDevice {
- // Specifies the maximum size for the buffer used to cache sampled
- // control values. If `startCachingSamples` returns samples that
- // require more memory than you specify, it throws a memory error.
- public static const MAX_BUFFER_SIZE:int = 32000;
- }
+package flash.ui
+{
+ // The AS3 docs say this is only available in AIR 3.7.
+ // That was determined to be a lie.
+ [API("688")]
+ public final class GameInputDevice
+ {
+ // Specifies the maximum size for the buffer used to cache sampled
+ // control values. If `startCachingSamples` returns samples that
+ // require more memory than you specify, it throws a memory error.
+ public static const MAX_BUFFER_SIZE:int = 32000;
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/KeyLocation.as b/core/src/avm2/globals/flash/ui/KeyLocation.as
index 22484ab3566e..64142c7110a6 100644
--- a/core/src/avm2/globals/flash/ui/KeyLocation.as
+++ b/core/src/avm2/globals/flash/ui/KeyLocation.as
@@ -6,25 +6,25 @@
package flash.ui
{
- public final class KeyLocation
- {
- // Indicates the key activation originated on a directional pad of input device.
- // Example: The trackball on a mobile device or the left arrow on a remote control.
- [API("669")]
- public static const D_PAD:uint = 4;
+ public final class KeyLocation
+ {
+ // Indicates the key activation originated on a directional pad of input device.
+ // Example: The trackball on a mobile device or the left arrow on a remote control.
+ [API("669")]
+ public static const D_PAD:uint = 4;
- // Indicates the key activated is in the left key location (there is more than one possible location for this key).
- public static const LEFT:uint = 1;
+ // Indicates the key activated is in the left key location (there is more than one possible location for this key).
+ public static const LEFT:uint = 1;
- // Indicates the key activation originated on the numeric keypad or with a virtual key corresponding to the numeric keypad.
- public static const NUM_PAD:uint = 3;
+ // Indicates the key activation originated on the numeric keypad or with a virtual key corresponding to the numeric keypad.
+ public static const NUM_PAD:uint = 3;
- // Indicates the key activated is in the right key location (there is more than one possible location for this key).
- public static const RIGHT:uint = 2;
+ // Indicates the key activated is in the right key location (there is more than one possible location for this key).
+ public static const RIGHT:uint = 2;
- // Indicates the key activation is not distinguished as the left or right version of the key, and did not originate on the numeric keypad
- // (or did not originate with a virtual key corresponding to the numeric keypad).
- public static const STANDARD:uint = 0;
+ // Indicates the key activation is not distinguished as the left or right version of the key, and did not originate on the numeric keypad
+ // (or did not originate with a virtual key corresponding to the numeric keypad).
+ public static const STANDARD:uint = 0;
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/Keyboard.as b/core/src/avm2/globals/flash/ui/Keyboard.as
index ac22ee6a4ee9..38cba49d9a23 100644
--- a/core/src/avm2/globals/flash/ui/Keyboard.as
+++ b/core/src/avm2/globals/flash/ui/Keyboard.as
@@ -1,399 +1,402 @@
-package flash.ui {
- public final class Keyboard {
- public static native function get capsLock(): Boolean;
- public static native function get hasVirtualKeyboard(): Boolean;
- public static native function get numLock(): Boolean;
- public static native function get physicalKeyboardType(): String;
- public static native function isAccessible(): Boolean;
+package flash.ui
+{
+ public final class Keyboard
+ {
+ public static native function get capsLock():Boolean;
+ public static native function get hasVirtualKeyboard():Boolean;
+ public static native function get numLock():Boolean;
+ public static native function get physicalKeyboardType():String;
+ public static native function isAccessible():Boolean;
- public static const BACKSPACE: uint = 8;
- public static const TAB: uint = 9;
- public static const ENTER: uint = 13;
- public static const COMMAND: uint = 15;
- public static const SHIFT: uint = 16;
- public static const CONTROL: uint = 17;
- public static const ALTERNATE: uint = 18;
- public static const CAPS_LOCK: uint = 20;
- public static const NUMPAD: uint = 21;
- public static const ESCAPE: uint = 27;
- public static const SPACE: uint = 32;
- public static const PAGE_UP: uint = 33;
- public static const PAGE_DOWN: uint = 34;
- public static const END: uint = 35;
- public static const HOME: uint = 36;
- public static const LEFT: uint = 37;
- public static const UP: uint = 38;
- public static const RIGHT: uint = 39;
- public static const DOWN: uint = 40;
- public static const INSERT: uint = 45;
- public static const DELETE: uint = 46;
- public static const NUMBER_0: uint = 48;
- public static const NUMBER_1: uint = 49;
- public static const NUMBER_2: uint = 50;
- public static const NUMBER_3: uint = 51;
- public static const NUMBER_4: uint = 52;
- public static const NUMBER_5: uint = 53;
- public static const NUMBER_6: uint = 54;
- public static const NUMBER_7: uint = 55;
- public static const NUMBER_8: uint = 56;
- public static const NUMBER_9: uint = 57;
- public static const A: uint = 65;
- public static const B: uint = 66;
- public static const C: uint = 67;
- public static const D: uint = 68;
- public static const E: uint = 69;
- public static const F: uint = 70;
- public static const G: uint = 71;
- public static const H: uint = 72;
- public static const I: uint = 73;
- public static const J: uint = 74;
- public static const K: uint = 75;
- public static const L: uint = 76;
- public static const M: uint = 77;
- public static const N: uint = 78;
- public static const O: uint = 79;
- public static const P: uint = 80;
- public static const Q: uint = 81;
- public static const R: uint = 82;
- public static const S: uint = 83;
- public static const T: uint = 84;
- public static const U: uint = 85;
- public static const V: uint = 86;
- public static const W: uint = 87;
- public static const X: uint = 88;
- public static const Y: uint = 89;
- public static const Z: uint = 90;
- public static const NUMPAD_0: uint = 96;
- public static const NUMPAD_1: uint = 97;
- public static const NUMPAD_2: uint = 98;
- public static const NUMPAD_3: uint = 99;
- public static const NUMPAD_4: uint = 100;
- public static const NUMPAD_5: uint = 101;
- public static const NUMPAD_6: uint = 102;
- public static const NUMPAD_7: uint = 103;
- public static const NUMPAD_8: uint = 104;
- public static const NUMPAD_9: uint = 105;
- public static const NUMPAD_MULTIPLY: uint = 106;
- public static const NUMPAD_ADD: uint = 107;
- public static const NUMPAD_ENTER: uint = 108;
- public static const NUMPAD_SUBTRACT: uint = 109;
- public static const NUMPAD_DECIMAL: uint = 110;
- public static const NUMPAD_DIVIDE: uint = 111;
- public static const F1: uint = 112;
- public static const F2: uint = 113;
- public static const F3: uint = 114;
- public static const F4: uint = 115;
- public static const F5: uint = 116;
- public static const F6: uint = 117;
- public static const F7: uint = 118;
- public static const F8: uint = 119;
- public static const F9: uint = 120;
- public static const F10: uint = 121;
- public static const F11: uint = 122;
- public static const F12: uint = 123;
- public static const F13: uint = 124;
- public static const F14: uint = 125;
- public static const F15: uint = 126;
- public static const SEMICOLON: uint = 186;
- public static const EQUAL: uint = 187;
- public static const COMMA: uint = 188;
- public static const MINUS: uint = 189;
- public static const PERIOD: uint = 190;
- public static const SLASH: uint = 191;
- public static const BACKQUOTE: uint = 192;
- public static const LEFTBRACKET: uint = 219;
- public static const BACKSLASH: uint = 220;
- public static const RIGHTBRACKET: uint = 221;
- public static const QUOTE: uint = 222;
+ public static const BACKSPACE:uint = 8;
+ public static const TAB:uint = 9;
+ public static const ENTER:uint = 13;
+ public static const COMMAND:uint = 15;
+ public static const SHIFT:uint = 16;
+ public static const CONTROL:uint = 17;
+ public static const ALTERNATE:uint = 18;
+ public static const CAPS_LOCK:uint = 20;
+ public static const NUMPAD:uint = 21;
+ public static const ESCAPE:uint = 27;
+ public static const SPACE:uint = 32;
+ public static const PAGE_UP:uint = 33;
+ public static const PAGE_DOWN:uint = 34;
+ public static const END:uint = 35;
+ public static const HOME:uint = 36;
+ public static const LEFT:uint = 37;
+ public static const UP:uint = 38;
+ public static const RIGHT:uint = 39;
+ public static const DOWN:uint = 40;
+ public static const INSERT:uint = 45;
+ public static const DELETE:uint = 46;
+ public static const NUMBER_0:uint = 48;
+ public static const NUMBER_1:uint = 49;
+ public static const NUMBER_2:uint = 50;
+ public static const NUMBER_3:uint = 51;
+ public static const NUMBER_4:uint = 52;
+ public static const NUMBER_5:uint = 53;
+ public static const NUMBER_6:uint = 54;
+ public static const NUMBER_7:uint = 55;
+ public static const NUMBER_8:uint = 56;
+ public static const NUMBER_9:uint = 57;
+ public static const A:uint = 65;
+ public static const B:uint = 66;
+ public static const C:uint = 67;
+ public static const D:uint = 68;
+ public static const E:uint = 69;
+ public static const F:uint = 70;
+ public static const G:uint = 71;
+ public static const H:uint = 72;
+ public static const I:uint = 73;
+ public static const J:uint = 74;
+ public static const K:uint = 75;
+ public static const L:uint = 76;
+ public static const M:uint = 77;
+ public static const N:uint = 78;
+ public static const O:uint = 79;
+ public static const P:uint = 80;
+ public static const Q:uint = 81;
+ public static const R:uint = 82;
+ public static const S:uint = 83;
+ public static const T:uint = 84;
+ public static const U:uint = 85;
+ public static const V:uint = 86;
+ public static const W:uint = 87;
+ public static const X:uint = 88;
+ public static const Y:uint = 89;
+ public static const Z:uint = 90;
+ public static const NUMPAD_0:uint = 96;
+ public static const NUMPAD_1:uint = 97;
+ public static const NUMPAD_2:uint = 98;
+ public static const NUMPAD_3:uint = 99;
+ public static const NUMPAD_4:uint = 100;
+ public static const NUMPAD_5:uint = 101;
+ public static const NUMPAD_6:uint = 102;
+ public static const NUMPAD_7:uint = 103;
+ public static const NUMPAD_8:uint = 104;
+ public static const NUMPAD_9:uint = 105;
+ public static const NUMPAD_MULTIPLY:uint = 106;
+ public static const NUMPAD_ADD:uint = 107;
+ public static const NUMPAD_ENTER:uint = 108;
+ public static const NUMPAD_SUBTRACT:uint = 109;
+ public static const NUMPAD_DECIMAL:uint = 110;
+ public static const NUMPAD_DIVIDE:uint = 111;
+ public static const F1:uint = 112;
+ public static const F2:uint = 113;
+ public static const F3:uint = 114;
+ public static const F4:uint = 115;
+ public static const F5:uint = 116;
+ public static const F6:uint = 117;
+ public static const F7:uint = 118;
+ public static const F8:uint = 119;
+ public static const F9:uint = 120;
+ public static const F10:uint = 121;
+ public static const F11:uint = 122;
+ public static const F12:uint = 123;
+ public static const F13:uint = 124;
+ public static const F14:uint = 125;
+ public static const F15:uint = 126;
+ public static const SEMICOLON:uint = 186;
+ public static const EQUAL:uint = 187;
+ public static const COMMA:uint = 188;
+ public static const MINUS:uint = 189;
+ public static const PERIOD:uint = 190;
+ public static const SLASH:uint = 191;
+ public static const BACKQUOTE:uint = 192;
+ public static const LEFTBRACKET:uint = 219;
+ public static const BACKSLASH:uint = 220;
+ public static const RIGHTBRACKET:uint = 221;
+ public static const QUOTE:uint = 222;
- [API("669")]
- public static const SETUP: uint = 0x0100001C;
- [API("669")]
- public static const NEXT: uint = 0x0100000E;
- [API("669")]
- public static const MENU: uint = 0x01000012;
- [API("669")]
- public static const CHANNEL_UP: uint = 0x01000004;
- [API("669")]
- public static const EXIT: uint = 0x01000015;
- [API("669")]
- public static const BLUE: uint = 0x01000003;
- [API("669")]
- public static const CHANNEL_DOWN: uint = 0x01000005;
- [API("669")]
- public static const INPUT: uint = 0x0100001B;
- [API("669")]
- public static const DVR: uint = 0x01000019;
- [API("669")]
- public static const SEARCH: uint = 0x0100001F;
- [API("669")]
- public static const MASTER_SHELL: uint = 0x0100001E;
- [API("669")]
- public static const SKIP_BACKWARD: uint = 0x0100000D;
- [API("669")] // [NA] This should be 719, but it's not supported at time of writing
- public static const PLAY_PAUSE: uint = 0x01000020;
- [API("669")]
- public static const HELP: uint = 0x0100001D;
- [API("669")]
- public static const VOD: uint = 0x0100001A;
- [API("669")]
- public static const LIVE: uint = 0x01000010;
- [API("669")]
- public static const RED: uint = 0x01000000;
- [API("669")]
- public static const PREVIOUS: uint = 0x0100000F;
- [API("669")]
- public static const RECORD: uint = 0x01000006;
- [API("669")]
- public static const STOP: uint = 0x01000009;
- [API("669")]
- public static const SUBTITLE: uint = 0x01000018;
- [API("669")]
- public static const PLAY: uint = 0x01000007;
- [API("669")]
- public static const GUIDE: uint = 0x01000014;
- [API("669")]
- public static const YELLOW: uint = 0x01000002;
- [API("669")]
- public static const REWIND: uint = 0x0100000B;
- [API("669")]
- public static const INFO: uint = 0x01000013;
- [API("669")]
- public static const LAST: uint = 0x01000011;
- [API("669")]
- public static const PAUSE: uint = 0x01000008;
- [API("669")]
- public static const AUDIO: uint = 0x01000017;
- [API("669")]
- public static const GREEN: uint = 0x01000001;
- [API("669")]
- public static const FAST_FORWARD: uint = 0x0100000A;
- [API("669")]
- public static const SKIP_FORWARD: uint = 0x0100000C;
- [API("669")]
- public static const BACK: uint = 0x01000016;
+ [API("669")]
+ public static const SETUP:uint = 0x0100001C;
+ [API("669")]
+ public static const NEXT:uint = 0x0100000E;
+ [API("669")]
+ public static const MENU:uint = 0x01000012;
+ [API("669")]
+ public static const CHANNEL_UP:uint = 0x01000004;
+ [API("669")]
+ public static const EXIT:uint = 0x01000015;
+ [API("669")]
+ public static const BLUE:uint = 0x01000003;
+ [API("669")]
+ public static const CHANNEL_DOWN:uint = 0x01000005;
+ [API("669")]
+ public static const INPUT:uint = 0x0100001B;
+ [API("669")]
+ public static const DVR:uint = 0x01000019;
+ [API("669")]
+ public static const SEARCH:uint = 0x0100001F;
+ [API("669")]
+ public static const MASTER_SHELL:uint = 0x0100001E;
+ [API("669")]
+ public static const SKIP_BACKWARD:uint = 0x0100000D;
+ [API("669")]
+ // [NA] This should be 719, but it's not supported at time of writing
+ public static const PLAY_PAUSE:uint = 0x01000020;
+ [API("669")]
+ public static const HELP:uint = 0x0100001D;
+ [API("669")]
+ public static const VOD:uint = 0x0100001A;
+ [API("669")]
+ public static const LIVE:uint = 0x01000010;
+ [API("669")]
+ public static const RED:uint = 0x01000000;
+ [API("669")]
+ public static const PREVIOUS:uint = 0x0100000F;
+ [API("669")]
+ public static const RECORD:uint = 0x01000006;
+ [API("669")]
+ public static const STOP:uint = 0x01000009;
+ [API("669")]
+ public static const SUBTITLE:uint = 0x01000018;
+ [API("669")]
+ public static const PLAY:uint = 0x01000007;
+ [API("669")]
+ public static const GUIDE:uint = 0x01000014;
+ [API("669")]
+ public static const YELLOW:uint = 0x01000002;
+ [API("669")]
+ public static const REWIND:uint = 0x0100000B;
+ [API("669")]
+ public static const INFO:uint = 0x01000013;
+ [API("669")]
+ public static const LAST:uint = 0x01000011;
+ [API("669")]
+ public static const PAUSE:uint = 0x01000008;
+ [API("669")]
+ public static const AUDIO:uint = 0x01000017;
+ [API("669")]
+ public static const GREEN:uint = 0x01000001;
+ [API("669")]
+ public static const FAST_FORWARD:uint = 0x0100000A;
+ [API("669")]
+ public static const SKIP_FORWARD:uint = 0x0100000C;
+ [API("669")]
+ public static const BACK:uint = 0x01000016;
- public static const STRING_BEGIN: String = "\uf72a";
- public static const STRING_BREAK: String = "\uf732";
- public static const STRING_CLEARDISPLAY: String = "\uf73a";
- public static const STRING_CLEARLINE: String = "\uf739";
- public static const STRING_DELETE: String = "\uf728";
- public static const STRING_DELETECHAR: String = "\uf73e";
- public static const STRING_DELETELINE: String = "\uf73c";
- public static const STRING_DOWNARROW: String = "\uf701";
- public static const STRING_END: String = "\uf72b";
- public static const STRING_EXECUTE: String = "\uf742";
- public static const STRING_F1: String = "\uf704";
- public static const STRING_F2: String = "\uf705";
- public static const STRING_F3: String = "\uf706";
- public static const STRING_F4: String = "\uf707";
- public static const STRING_F5: String = "\uf708";
- public static const STRING_F6: String = "\uf709";
- public static const STRING_F7: String = "\uf70a";
- public static const STRING_F8: String = "\uf70b";
- public static const STRING_F9: String = "\uf70c";
- public static const STRING_F10: String = "\uf70d";
- public static const STRING_F11: String = "\uf70e";
- public static const STRING_F12: String = "\uf70f";
- public static const STRING_F13: String = "\uf710";
- public static const STRING_F14: String = "\uf711";
- public static const STRING_F15: String = "\uf712";
- public static const STRING_F16: String = "\uf713";
- public static const STRING_F17: String = "\uf714";
- public static const STRING_F18: String = "\uf715";
- public static const STRING_F19: String = "\uf716";
- public static const STRING_F20: String = "\uf717";
- public static const STRING_F21: String = "\uf718";
- public static const STRING_F22: String = "\uf719";
- public static const STRING_F23: String = "\uf71a";
- public static const STRING_F24: String = "\uf71b";
- public static const STRING_F25: String = "\uf71c";
- public static const STRING_F26: String = "\uf71d";
- public static const STRING_F27: String = "\uf71e";
- public static const STRING_F28: String = "\uf71f";
- public static const STRING_F29: String = "\uf720";
- public static const STRING_F30: String = "\uf721";
- public static const STRING_F31: String = "\uf722";
- public static const STRING_F32: String = "\uf723";
- public static const STRING_F33: String = "\uf724";
- public static const STRING_F34: String = "\uf725";
- public static const STRING_F35: String = "\uf726";
- public static const STRING_FIND: String = "\uf745";
- public static const STRING_HELP: String = "\uf746";
- public static const STRING_HOME: String = "\uf729";
- public static const STRING_INSERT: String = "\uf727";
- public static const STRING_INSERTCHAR: String = "\uf73d";
- public static const STRING_INSERTLINE: String = "\uf73b";
- public static const STRING_LEFTARROW: String = "\uf702";
- public static const STRING_MENU: String = "\uf735";
- public static const STRING_MODESWITCH: String = "\uf747";
- public static const STRING_NEXT: String = "\uf740";
- public static const STRING_PAGEDOWN: String = "\uf72d";
- public static const STRING_PAGEUP: String = "\uf72c";
- public static const STRING_PAUSE: String = "\uf730";
- public static const STRING_PREV: String = "\uf73f";
- public static const STRING_PRINT: String = "\uf738";
- public static const STRING_PRINTSCREEN: String = "\uf72e";
- public static const STRING_REDO: String = "\uf744";
- public static const STRING_RESET: String = "\uf733";
- public static const STRING_RIGHTARROW: String = "\uf703";
- public static const STRING_SCROLLLOCK: String = "\uf72f";
- public static const STRING_SELECT: String = "\uf741";
- public static const STRING_STOP: String = "\uf734";
- public static const STRING_SYSREQ: String = "\uf731";
- public static const STRING_SYSTEM: String = "\uf737";
- public static const STRING_UNDO: String = "\uf743";
- public static const STRING_UPARROW: String = "\uf700";
- public static const STRING_USER: String = "\uf736";
+ public static const STRING_BEGIN:String = "";
+ public static const STRING_BREAK:String = "";
+ public static const STRING_CLEARDISPLAY:String = "";
+ public static const STRING_CLEARLINE:String = "";
+ public static const STRING_DELETE:String = "";
+ public static const STRING_DELETECHAR:String = "";
+ public static const STRING_DELETELINE:String = "";
+ public static const STRING_DOWNARROW:String = "";
+ public static const STRING_END:String = "";
+ public static const STRING_EXECUTE:String = "";
+ public static const STRING_F1:String = "";
+ public static const STRING_F2:String = "";
+ public static const STRING_F3:String = "";
+ public static const STRING_F4:String = "";
+ public static const STRING_F5:String = "";
+ public static const STRING_F6:String = "";
+ public static const STRING_F7:String = "";
+ public static const STRING_F8:String = "";
+ public static const STRING_F9:String = "";
+ public static const STRING_F10:String = "";
+ public static const STRING_F11:String = "";
+ public static const STRING_F12:String = "";
+ public static const STRING_F13:String = "";
+ public static const STRING_F14:String = "";
+ public static const STRING_F15:String = "";
+ public static const STRING_F16:String = "";
+ public static const STRING_F17:String = "";
+ public static const STRING_F18:String = "";
+ public static const STRING_F19:String = "";
+ public static const STRING_F20:String = "";
+ public static const STRING_F21:String = "";
+ public static const STRING_F22:String = "";
+ public static const STRING_F23:String = "";
+ public static const STRING_F24:String = "";
+ public static const STRING_F25:String = "";
+ public static const STRING_F26:String = "";
+ public static const STRING_F27:String = "";
+ public static const STRING_F28:String = "";
+ public static const STRING_F29:String = "";
+ public static const STRING_F30:String = "";
+ public static const STRING_F31:String = "";
+ public static const STRING_F32:String = "";
+ public static const STRING_F33:String = "";
+ public static const STRING_F34:String = "";
+ public static const STRING_F35:String = "";
+ public static const STRING_FIND:String = "";
+ public static const STRING_HELP:String = "";
+ public static const STRING_HOME:String = "";
+ public static const STRING_INSERT:String = "";
+ public static const STRING_INSERTCHAR:String = "";
+ public static const STRING_INSERTLINE:String = "";
+ public static const STRING_LEFTARROW:String = "";
+ public static const STRING_MENU:String = "";
+ public static const STRING_MODESWITCH:String = "";
+ public static const STRING_NEXT:String = "";
+ public static const STRING_PAGEDOWN:String = "";
+ public static const STRING_PAGEUP:String = "";
+ public static const STRING_PAUSE:String = "";
+ public static const STRING_PREV:String = "";
+ public static const STRING_PRINT:String = "";
+ public static const STRING_PRINTSCREEN:String = "";
+ public static const STRING_REDO:String = "";
+ public static const STRING_RESET:String = "";
+ public static const STRING_RIGHTARROW:String = "";
+ public static const STRING_SCROLLLOCK:String = "";
+ public static const STRING_SELECT:String = "";
+ public static const STRING_STOP:String = "";
+ public static const STRING_SYSREQ:String = "";
+ public static const STRING_SYSTEM:String = "";
+ public static const STRING_UNDO:String = "";
+ public static const STRING_UPARROW:String = "";
+ public static const STRING_USER:String = "";
- public static const KEYNAME_UPARROW: String = "Up";
- public static const KEYNAME_DOWNARROW: String = "Down";
- public static const KEYNAME_LEFTARROW: String = "Left";
- public static const KEYNAME_RIGHTARROW: String = "Right";
- public static const KEYNAME_F1: String = "F1";
- public static const KEYNAME_F2: String = "F2";
- public static const KEYNAME_F3: String = "F3";
- public static const KEYNAME_F4: String = "F4";
- public static const KEYNAME_F5: String = "F5";
- public static const KEYNAME_F6: String = "F6";
- public static const KEYNAME_F7: String = "F7";
- public static const KEYNAME_F8: String = "F8";
- public static const KEYNAME_F9: String = "F9";
- public static const KEYNAME_F10: String = "F10";
- public static const KEYNAME_F11: String = "F11";
- public static const KEYNAME_F12: String = "F12";
- public static const KEYNAME_F13: String = "F13";
- public static const KEYNAME_F14: String = "F14";
- public static const KEYNAME_F15: String = "F15";
- public static const KEYNAME_F16: String = "F16";
- public static const KEYNAME_F17: String = "F17";
- public static const KEYNAME_F18: String = "F18";
- public static const KEYNAME_F19: String = "F19";
- public static const KEYNAME_F20: String = "F20";
- public static const KEYNAME_F21: String = "F21";
- public static const KEYNAME_F22: String = "F22";
- public static const KEYNAME_F23: String = "F23";
- public static const KEYNAME_F24: String = "F24";
- public static const KEYNAME_F25: String = "F25";
- public static const KEYNAME_F26: String = "F26";
- public static const KEYNAME_F27: String = "F27";
- public static const KEYNAME_F28: String = "F28";
- public static const KEYNAME_F29: String = "F29";
- public static const KEYNAME_F30: String = "F30";
- public static const KEYNAME_F31: String = "F31";
- public static const KEYNAME_F32: String = "F32";
- public static const KEYNAME_F33: String = "F33";
- public static const KEYNAME_F34: String = "F34";
- public static const KEYNAME_F35: String = "F35";
- public static const KEYNAME_INSERT: String = "Insert";
- public static const KEYNAME_DELETE: String = "Delete";
- public static const KEYNAME_HOME: String = "Home";
- public static const KEYNAME_BEGIN: String = "Begin";
- public static const KEYNAME_END: String = "End";
- public static const KEYNAME_PAGEUP: String = "PgUp";
- public static const KEYNAME_PAGEDOWN: String = "PgDn";
- public static const KEYNAME_PRINTSCREEN: String = "PrntScrn";
- public static const KEYNAME_SCROLLLOCK: String = "ScrlLck";
- public static const KEYNAME_PAUSE: String = "Pause";
- public static const KEYNAME_SYSREQ: String = "SysReq";
- public static const KEYNAME_BREAK: String = "Break";
- public static const KEYNAME_RESET: String = "Reset";
- public static const KEYNAME_STOP: String = "Stop";
- public static const KEYNAME_MENU: String = "Menu";
- public static const KEYNAME_USER: String = "User";
- public static const KEYNAME_SYSTEM: String = "Sys";
- public static const KEYNAME_PRINT: String = "Print";
- public static const KEYNAME_CLEARLINE: String = "ClrLn";
- public static const KEYNAME_CLEARDISPLAY: String = "ClrDsp";
- public static const KEYNAME_INSERTLINE: String = "InsLn";
- public static const KEYNAME_DELETELINE: String = "DelLn";
- public static const KEYNAME_INSERTCHAR: String = "InsChr";
- public static const KEYNAME_DELETECHAR: String = "DelChr";
- public static const KEYNAME_PREV: String = "Prev";
- public static const KEYNAME_NEXT: String = "Next";
- public static const KEYNAME_SELECT: String = "Select";
- public static const KEYNAME_EXECUTE: String = "Exec";
- public static const KEYNAME_UNDO: String = "Undo";
- public static const KEYNAME_REDO: String = "Redo";
- public static const KEYNAME_FIND: String = "Find";
- public static const KEYNAME_HELP: String = "Help";
- public static const KEYNAME_MODESWITCH: String = "ModeSw";
- public static const KEYNAME_PLAYPAUSE: String = "PlayPause";
+ public static const KEYNAME_UPARROW:String = "Up";
+ public static const KEYNAME_DOWNARROW:String = "Down";
+ public static const KEYNAME_LEFTARROW:String = "Left";
+ public static const KEYNAME_RIGHTARROW:String = "Right";
+ public static const KEYNAME_F1:String = "F1";
+ public static const KEYNAME_F2:String = "F2";
+ public static const KEYNAME_F3:String = "F3";
+ public static const KEYNAME_F4:String = "F4";
+ public static const KEYNAME_F5:String = "F5";
+ public static const KEYNAME_F6:String = "F6";
+ public static const KEYNAME_F7:String = "F7";
+ public static const KEYNAME_F8:String = "F8";
+ public static const KEYNAME_F9:String = "F9";
+ public static const KEYNAME_F10:String = "F10";
+ public static const KEYNAME_F11:String = "F11";
+ public static const KEYNAME_F12:String = "F12";
+ public static const KEYNAME_F13:String = "F13";
+ public static const KEYNAME_F14:String = "F14";
+ public static const KEYNAME_F15:String = "F15";
+ public static const KEYNAME_F16:String = "F16";
+ public static const KEYNAME_F17:String = "F17";
+ public static const KEYNAME_F18:String = "F18";
+ public static const KEYNAME_F19:String = "F19";
+ public static const KEYNAME_F20:String = "F20";
+ public static const KEYNAME_F21:String = "F21";
+ public static const KEYNAME_F22:String = "F22";
+ public static const KEYNAME_F23:String = "F23";
+ public static const KEYNAME_F24:String = "F24";
+ public static const KEYNAME_F25:String = "F25";
+ public static const KEYNAME_F26:String = "F26";
+ public static const KEYNAME_F27:String = "F27";
+ public static const KEYNAME_F28:String = "F28";
+ public static const KEYNAME_F29:String = "F29";
+ public static const KEYNAME_F30:String = "F30";
+ public static const KEYNAME_F31:String = "F31";
+ public static const KEYNAME_F32:String = "F32";
+ public static const KEYNAME_F33:String = "F33";
+ public static const KEYNAME_F34:String = "F34";
+ public static const KEYNAME_F35:String = "F35";
+ public static const KEYNAME_INSERT:String = "Insert";
+ public static const KEYNAME_DELETE:String = "Delete";
+ public static const KEYNAME_HOME:String = "Home";
+ public static const KEYNAME_BEGIN:String = "Begin";
+ public static const KEYNAME_END:String = "End";
+ public static const KEYNAME_PAGEUP:String = "PgUp";
+ public static const KEYNAME_PAGEDOWN:String = "PgDn";
+ public static const KEYNAME_PRINTSCREEN:String = "PrntScrn";
+ public static const KEYNAME_SCROLLLOCK:String = "ScrlLck";
+ public static const KEYNAME_PAUSE:String = "Pause";
+ public static const KEYNAME_SYSREQ:String = "SysReq";
+ public static const KEYNAME_BREAK:String = "Break";
+ public static const KEYNAME_RESET:String = "Reset";
+ public static const KEYNAME_STOP:String = "Stop";
+ public static const KEYNAME_MENU:String = "Menu";
+ public static const KEYNAME_USER:String = "User";
+ public static const KEYNAME_SYSTEM:String = "Sys";
+ public static const KEYNAME_PRINT:String = "Print";
+ public static const KEYNAME_CLEARLINE:String = "ClrLn";
+ public static const KEYNAME_CLEARDISPLAY:String = "ClrDsp";
+ public static const KEYNAME_INSERTLINE:String = "InsLn";
+ public static const KEYNAME_DELETELINE:String = "DelLn";
+ public static const KEYNAME_INSERTCHAR:String = "InsChr";
+ public static const KEYNAME_DELETECHAR:String = "DelChr";
+ public static const KEYNAME_PREV:String = "Prev";
+ public static const KEYNAME_NEXT:String = "Next";
+ public static const KEYNAME_SELECT:String = "Select";
+ public static const KEYNAME_EXECUTE:String = "Exec";
+ public static const KEYNAME_UNDO:String = "Undo";
+ public static const KEYNAME_REDO:String = "Redo";
+ public static const KEYNAME_FIND:String = "Find";
+ public static const KEYNAME_HELP:String = "Help";
+ public static const KEYNAME_MODESWITCH:String = "ModeSw";
+ public static const KEYNAME_PLAYPAUSE:String = "PlayPause";
- public static const CharCodeStrings: Array = [
- KEYNAME_UPARROW,
- KEYNAME_DOWNARROW,
- KEYNAME_LEFTARROW,
- KEYNAME_RIGHTARROW,
- KEYNAME_F1,
- KEYNAME_F2,
- KEYNAME_F3,
- KEYNAME_F4,
- KEYNAME_F5,
- KEYNAME_F6,
- KEYNAME_F7,
- KEYNAME_F8,
- KEYNAME_F9,
- KEYNAME_F10,
- KEYNAME_F11,
- KEYNAME_F12,
- KEYNAME_F13,
- KEYNAME_F14,
- KEYNAME_F15,
- KEYNAME_F16,
- KEYNAME_F17,
- KEYNAME_F18,
- KEYNAME_F19,
- KEYNAME_F20,
- KEYNAME_F21,
- KEYNAME_F22,
- KEYNAME_F23,
- KEYNAME_F24,
- KEYNAME_F25,
- KEYNAME_F26,
- KEYNAME_F27,
- KEYNAME_F28,
- KEYNAME_F29,
- KEYNAME_F30,
- KEYNAME_F31,
- KEYNAME_F32,
- KEYNAME_F33,
- KEYNAME_F34,
- KEYNAME_F35,
- KEYNAME_INSERT,
- KEYNAME_DELETE,
- KEYNAME_HOME,
- KEYNAME_BEGIN,
- KEYNAME_END,
- KEYNAME_PAGEUP,
- KEYNAME_PAGEDOWN,
- KEYNAME_PRINTSCREEN,
- KEYNAME_SCROLLLOCK,
- KEYNAME_PAUSE,
- KEYNAME_SYSREQ,
- KEYNAME_BREAK,
- KEYNAME_RESET,
- KEYNAME_STOP,
- KEYNAME_MENU,
- KEYNAME_USER,
- KEYNAME_SYSTEM,
- KEYNAME_PRINT,
- KEYNAME_CLEARLINE,
- KEYNAME_CLEARDISPLAY,
- KEYNAME_INSERTLINE,
- KEYNAME_DELETELINE,
- KEYNAME_INSERTCHAR,
- KEYNAME_DELETECHAR,
- KEYNAME_PREV,
- KEYNAME_NEXT,
- KEYNAME_SELECT,
- KEYNAME_EXECUTE,
- KEYNAME_UNDO,
- KEYNAME_REDO,
- KEYNAME_FIND,
- KEYNAME_HELP,
- KEYNAME_MODESWITCH,
- KEYNAME_PLAYPAUSE,
- ];
- }
+ public static const CharCodeStrings:Array = [
+ KEYNAME_UPARROW,
+ KEYNAME_DOWNARROW,
+ KEYNAME_LEFTARROW,
+ KEYNAME_RIGHTARROW,
+ KEYNAME_F1,
+ KEYNAME_F2,
+ KEYNAME_F3,
+ KEYNAME_F4,
+ KEYNAME_F5,
+ KEYNAME_F6,
+ KEYNAME_F7,
+ KEYNAME_F8,
+ KEYNAME_F9,
+ KEYNAME_F10,
+ KEYNAME_F11,
+ KEYNAME_F12,
+ KEYNAME_F13,
+ KEYNAME_F14,
+ KEYNAME_F15,
+ KEYNAME_F16,
+ KEYNAME_F17,
+ KEYNAME_F18,
+ KEYNAME_F19,
+ KEYNAME_F20,
+ KEYNAME_F21,
+ KEYNAME_F22,
+ KEYNAME_F23,
+ KEYNAME_F24,
+ KEYNAME_F25,
+ KEYNAME_F26,
+ KEYNAME_F27,
+ KEYNAME_F28,
+ KEYNAME_F29,
+ KEYNAME_F30,
+ KEYNAME_F31,
+ KEYNAME_F32,
+ KEYNAME_F33,
+ KEYNAME_F34,
+ KEYNAME_F35,
+ KEYNAME_INSERT,
+ KEYNAME_DELETE,
+ KEYNAME_HOME,
+ KEYNAME_BEGIN,
+ KEYNAME_END,
+ KEYNAME_PAGEUP,
+ KEYNAME_PAGEDOWN,
+ KEYNAME_PRINTSCREEN,
+ KEYNAME_SCROLLLOCK,
+ KEYNAME_PAUSE,
+ KEYNAME_SYSREQ,
+ KEYNAME_BREAK,
+ KEYNAME_RESET,
+ KEYNAME_STOP,
+ KEYNAME_MENU,
+ KEYNAME_USER,
+ KEYNAME_SYSTEM,
+ KEYNAME_PRINT,
+ KEYNAME_CLEARLINE,
+ KEYNAME_CLEARDISPLAY,
+ KEYNAME_INSERTLINE,
+ KEYNAME_DELETELINE,
+ KEYNAME_INSERTCHAR,
+ KEYNAME_DELETECHAR,
+ KEYNAME_PREV,
+ KEYNAME_NEXT,
+ KEYNAME_SELECT,
+ KEYNAME_EXECUTE,
+ KEYNAME_UNDO,
+ KEYNAME_REDO,
+ KEYNAME_FIND,
+ KEYNAME_HELP,
+ KEYNAME_MODESWITCH,
+ KEYNAME_PLAYPAUSE,
+ ];
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/KeyboardType.as b/core/src/avm2/globals/flash/ui/KeyboardType.as
index 5bf11308f111..ad01699e45cb 100644
--- a/core/src/avm2/globals/flash/ui/KeyboardType.as
+++ b/core/src/avm2/globals/flash/ui/KeyboardType.as
@@ -6,16 +6,16 @@
package flash.ui
{
- public final class KeyboardType
- {
- // A standard keyboard with a full set of numbers and letters.
- public static const ALPHANUMERIC:String = "alphanumeric";
+ public final class KeyboardType
+ {
+ // A standard keyboard with a full set of numbers and letters.
+ public static const ALPHANUMERIC:String = "alphanumeric";
- // A phone-style 12-button keypad.
- public static const KEYPAD:String = "keypad";
+ // A phone-style 12-button keypad.
+ public static const KEYPAD:String = "keypad";
- // No physical keyboard is supported.
- public static const NONE:String = "none";
+ // No physical keyboard is supported.
+ public static const NONE:String = "none";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/Mouse.as b/core/src/avm2/globals/flash/ui/Mouse.as
index f6a92f3b0af3..5d4b4ddc07ad 100644
--- a/core/src/avm2/globals/flash/ui/Mouse.as
+++ b/core/src/avm2/globals/flash/ui/Mouse.as
@@ -1,26 +1,32 @@
-package flash.ui {
+package flash.ui
+{
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
- public final class Mouse {
- public static native function hide(): void;
- public static native function show(): void;
- public static function get supportsCursor():Boolean {
- stub_getter("flash.ui.Mouse", "supportsCursor");
- return true;
- }
- public static function get supportsNativeCursor():Boolean {
- stub_getter("flash.ui.Mouse", "supportsNativeCursor");
- return true;
- }
+ public final class Mouse
+ {
+ public static native function hide():void;
+ public static native function show():void;
+ public static function get supportsCursor():Boolean
+ {
+ stub_getter("flash.ui.Mouse", "supportsCursor");
+ return true;
+ }
+ public static function get supportsNativeCursor():Boolean
+ {
+ stub_getter("flash.ui.Mouse", "supportsNativeCursor");
+ return true;
+ }
- public static function registerCursor(name:String, cursor:MouseCursorData):void {
- stub_method("flash.ui.Mouse", "registerCursor");
- }
+ public static function registerCursor(name:String, cursor:MouseCursorData):void
+ {
+ stub_method("flash.ui.Mouse", "registerCursor");
+ }
- public static function unregisterCursor(name:String):void {
- stub_method("flash.ui.Mouse", "unregisterCursor");
- }
- }
+ public static function unregisterCursor(name:String):void
+ {
+ stub_method("flash.ui.Mouse", "unregisterCursor");
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/MouseCursor.as b/core/src/avm2/globals/flash/ui/MouseCursor.as
index 0b63488e10aa..918e0272788e 100644
--- a/core/src/avm2/globals/flash/ui/MouseCursor.as
+++ b/core/src/avm2/globals/flash/ui/MouseCursor.as
@@ -6,22 +6,22 @@
package flash.ui
{
- public final class MouseCursor
- {
- // Used to specify that the arrow cursor should be used.
- public static const ARROW:String = "arrow";
+ public final class MouseCursor
+ {
+ // Used to specify that the arrow cursor should be used.
+ public static const ARROW:String = "arrow";
- // Used to specify that the cursor should be selected automatically based on the object under the mouse.
- public static const AUTO:String = "auto";
+ // Used to specify that the cursor should be selected automatically based on the object under the mouse.
+ public static const AUTO:String = "auto";
- // Used to specify that the button pressing hand cursor should be used.
- public static const BUTTON:String = "button";
+ // Used to specify that the button pressing hand cursor should be used.
+ public static const BUTTON:String = "button";
- // Used to specify that the dragging hand cursor should be used.
- public static const HAND:String = "hand";
+ // Used to specify that the dragging hand cursor should be used.
+ public static const HAND:String = "hand";
- // Used to specify that the I-beam cursor should be used.
- public static const IBEAM:String = "ibeam";
+ // Used to specify that the I-beam cursor should be used.
+ public static const IBEAM:String = "ibeam";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/MouseCursorData.as b/core/src/avm2/globals/flash/ui/MouseCursorData.as
index ca0557d21403..abe2121f616b 100644
--- a/core/src/avm2/globals/flash/ui/MouseCursorData.as
+++ b/core/src/avm2/globals/flash/ui/MouseCursorData.as
@@ -5,56 +5,56 @@
package flash.ui
{
- import flash.geom.Point;
- import flash.display.BitmapData;
- import __ruffle__.stub_getter;
- import __ruffle__.stub_setter;
-
- public final class MouseCursorData
- {
- // A Vector of BitmapData objects containing the cursor image or images.
- private var _data: Vector.;
-
- // The frame rate for animating the cursor.
- private var _frameRate: Number;
-
- // The hot spot of the cursor in pixels.
- private var _hotSpot: Point = new Point(0,0);
-
- public function get data():Vector.
- {
- stub_getter("flash.ui.MouseCursorData", "data");
- return this._data;
- }
-
- public function set data(value:Vector.):void
- {
- stub_setter("flash.ui.MouseCursorData", "data");
- this._data = value;
- }
-
- public function get frameRate():Number
- {
- stub_getter("flash.ui.MouseCursorData", "frameRate");
- return this._frameRate;
- }
-
- public function set frameRate(value:Number):void
- {
- stub_setter("flash.ui.MouseCursorData", "frameRate");
- this._frameRate = value;
- }
-
- public function get hotSpot():Point
- {
- stub_getter("flash.ui.MouseCursorData", "hotSpot");
- return this._hotSpot;
- }
-
- public function set hotSpot(value:Point):void
- {
- stub_setter("flash.ui.MouseCursorData", "hotSpot");
- this._hotSpot = value;
- }
- }
+ import flash.geom.Point;
+ import flash.display.BitmapData;
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_setter;
+
+ public final class MouseCursorData
+ {
+ // A Vector of BitmapData objects containing the cursor image or images.
+ private var _data:Vector.;
+
+ // The frame rate for animating the cursor.
+ private var _frameRate:Number;
+
+ // The hot spot of the cursor in pixels.
+ private var _hotSpot:Point = new Point(0, 0);
+
+ public function get data():Vector.
+ {
+ stub_getter("flash.ui.MouseCursorData", "data");
+ return this._data;
+ }
+
+ public function set data(value:Vector.):void
+ {
+ stub_setter("flash.ui.MouseCursorData", "data");
+ this._data = value;
+ }
+
+ public function get frameRate():Number
+ {
+ stub_getter("flash.ui.MouseCursorData", "frameRate");
+ return this._frameRate;
+ }
+
+ public function set frameRate(value:Number):void
+ {
+ stub_setter("flash.ui.MouseCursorData", "frameRate");
+ this._frameRate = value;
+ }
+
+ public function get hotSpot():Point
+ {
+ stub_getter("flash.ui.MouseCursorData", "hotSpot");
+ return this._hotSpot;
+ }
+
+ public function set hotSpot(value:Point):void
+ {
+ stub_setter("flash.ui.MouseCursorData", "hotSpot");
+ this._hotSpot = value;
+ }
+ }
}
diff --git a/core/src/avm2/globals/flash/ui/Multitouch.as b/core/src/avm2/globals/flash/ui/Multitouch.as
index c7775a971517..969ba9ea8852 100644
--- a/core/src/avm2/globals/flash/ui/Multitouch.as
+++ b/core/src/avm2/globals/flash/ui/Multitouch.as
@@ -1,6 +1,8 @@
-package flash.ui {
- public final class Multitouch {
- // FIXME - implement a setter and gett
- public static var inputMode:String = MultitouchInputMode.GESTURE;
- }
+package flash.ui
+{
+ public final class Multitouch
+ {
+ // FIXME - implement a setter and gett
+ public static var inputMode:String = MultitouchInputMode.GESTURE;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/ui/MultitouchInputMode.as b/core/src/avm2/globals/flash/ui/MultitouchInputMode.as
index d3d3080388cb..4e9507e1d4b8 100644
--- a/core/src/avm2/globals/flash/ui/MultitouchInputMode.as
+++ b/core/src/avm2/globals/flash/ui/MultitouchInputMode.as
@@ -6,17 +6,17 @@
package flash.ui
{
- public final class MultitouchInputMode
- {
- // Specifies that TransformGestureEvent, PressAndTapGestureEvent, and GestureEvent events are dispatched for the related user interaction supported by the current environment,
- // and other touch events (such as a simple tap) are interpreted as mouse events.
- public static const GESTURE:String = "gesture";
+ public final class MultitouchInputMode
+ {
+ // Specifies that TransformGestureEvent, PressAndTapGestureEvent, and GestureEvent events are dispatched for the related user interaction supported by the current environment,
+ // and other touch events (such as a simple tap) are interpreted as mouse events.
+ public static const GESTURE:String = "gesture";
- // Specifies that all user contact with a touch-enabled device is interpreted as a type of mouse event.
- public static const NONE:String = "none";
+ // Specifies that all user contact with a touch-enabled device is interpreted as a type of mouse event.
+ public static const NONE:String = "none";
- // Specifies that events are dispatched only for basic touch events, such as a single finger tap.
- public static const TOUCH_POINT:String = "touchPoint";
+ // Specifies that events are dispatched only for basic touch events, such as a single finger tap.
+ public static const TOUCH_POINT:String = "touchPoint";
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/utils.as b/core/src/avm2/globals/flash/utils.as
index 93767b2c0a21..e856c45cd036 100644
--- a/core/src/avm2/globals/flash/utils.as
+++ b/core/src/avm2/globals/flash/utils.as
@@ -1,25 +1,28 @@
-package flash.utils {
+package flash.utils
+{
- public native function getDefinitionByName(name:String):Object;
- public native function getQualifiedClassName(value:*):String;
- public native function getQualifiedSuperclassName(value:*):String;
- public native function getTimer():int;
+ public native function getDefinitionByName(name:String):Object;
+ public native function getQualifiedClassName(value:*):String;
+ public native function getQualifiedSuperclassName(value:*):String;
+ public native function getTimer():int;
- public function describeType(value:*): XML {
- // TODO: Also set @alias on the resulting XML
- if (value === undefined) {
- // avmplus throws this error from the alias-lookup code,
- // which we don't currently have implemented
- throw new TypeError("Error #1010: A term is undefined and has no properties.", 1010);
- }
+ public function describeType(value:*):XML
+ {
+ // TODO: Also set @alias on the resulting XML
+ if (value === undefined)
+ {
+ // avmplus throws this error from the alias-lookup code,
+ // which we don't currently have implemented
+ throw new TypeError("Error #1010: A term is undefined and has no properties.", 1010);
+ }
- return avmplus.describeType(value, avmplus.FLASH10_FLAGS);
- }
+ return avmplus.describeType(value, avmplus.FLASH10_FLAGS);
+ }
- public native function setInterval(closure:Function, delay:Number, ... arguments):uint;
- public native function clearInterval(id:uint):void;
- public native function setTimeout(closure:Function, delay:Number, ... arguments):uint;
- public native function clearTimeout(id:uint):void;
- public native function escapeMultiByte(s:String):String;
- public native function unescapeMultiByte(s:String):String;
+ public native function setInterval(closure:Function, delay:Number, ...arguments):uint;
+ public native function clearInterval(id:uint):void;
+ public native function setTimeout(closure:Function, delay:Number, ...arguments):uint;
+ public native function clearTimeout(id:uint):void;
+ public native function escapeMultiByte(s:String):String;
+ public native function unescapeMultiByte(s:String):String;
}
diff --git a/core/src/avm2/globals/flash/utils/ByteArray.as b/core/src/avm2/globals/flash/utils/ByteArray.as
index 8bbd262a1b1b..2a009ce913dc 100644
--- a/core/src/avm2/globals/flash/utils/ByteArray.as
+++ b/core/src/avm2/globals/flash/utils/ByteArray.as
@@ -1,12 +1,16 @@
-package flash.utils {
+package flash.utils
+{
[Ruffle(InstanceAllocator)]
- public class ByteArray implements IDataInput2, IDataOutput2 {
+ public class ByteArray implements IDataInput2, IDataOutput2
+ {
private static var _defaultObjectEncoding:uint = 3;
- public static function get defaultObjectEncoding():uint {
+ public static function get defaultObjectEncoding():uint
+ {
return _defaultObjectEncoding;
}
- public static function set defaultObjectEncoding(encoding:uint):void {
+ public static function set defaultObjectEncoding(encoding:uint):void
+ {
_defaultObjectEncoding = encoding;
}
@@ -24,23 +28,26 @@ package flash.utils {
public native function get position():uint;
public native function set position(value:uint):void;
- public function ByteArray() {
+ public function ByteArray()
+ {
this.objectEncoding = _defaultObjectEncoding;
}
public native function clear():void;
- public function deflate(): void {
+ public function deflate():void
+ {
this.compress("deflate");
}
- public native function compress(algorithm: String = CompressionAlgorithm.ZLIB): void;
+ public native function compress(algorithm:String = CompressionAlgorithm.ZLIB):void;
- public function inflate(): void {
+ public function inflate():void
+ {
this.uncompress("deflate");
}
- public native function uncompress(algorithm: String = CompressionAlgorithm.ZLIB): void;
+ public native function uncompress(algorithm:String = CompressionAlgorithm.ZLIB):void;
public native function toString():String;
@@ -71,10 +78,11 @@ package flash.utils {
public native function writeUTF(value:String):void;
public native function writeUTFBytes(value:String):void;
public native function writeObject(object:*):void;
-
- prototype.toJSON = function(k:String):* {
+
+ prototype.toJSON = function(k:String):*
+ {
return "ByteArray";
- }
+ };
prototype.setPropertyIsEnumerable("toJSON", false);
}
}
diff --git a/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as b/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as
index 3e81225dec70..00dd368f3666 100644
--- a/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as
+++ b/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as
@@ -1,7 +1,9 @@
-package flash.utils {
- public final class CompressionAlgorithm {
- public static const ZLIB: String = "zlib";
- public static const DEFLATE: String = "deflate";
- public static const LZMA: String = "lzma";
- }
+package flash.utils
+{
+ public final class CompressionAlgorithm
+ {
+ public static const ZLIB:String = "zlib";
+ public static const DEFLATE:String = "deflate";
+ public static const LZMA:String = "lzma";
+ }
}
diff --git a/core/src/avm2/globals/flash/utils/Dictionary.as b/core/src/avm2/globals/flash/utils/Dictionary.as
index 299aca43746f..8793c94cc2d4 100644
--- a/core/src/avm2/globals/flash/utils/Dictionary.as
+++ b/core/src/avm2/globals/flash/utils/Dictionary.as
@@ -1,14 +1,17 @@
-package flash.utils {
+package flash.utils
+{
import __ruffle__.stub_constructor;
[Ruffle(InstanceAllocator)]
- public dynamic class Dictionary {
+ public dynamic class Dictionary
+ {
public function Dictionary(weakKeys:Boolean = false)
{
- if (weakKeys) {
+ if (weakKeys)
+ {
stub_constructor("flash.utils.Dictionary", "with weak keys");
}
}
- }
+ }
}
diff --git a/core/src/avm2/globals/flash/utils/Endian.as b/core/src/avm2/globals/flash/utils/Endian.as
index 29ca8b9be23b..3b610b5f78cb 100644
--- a/core/src/avm2/globals/flash/utils/Endian.as
+++ b/core/src/avm2/globals/flash/utils/Endian.as
@@ -1,6 +1,8 @@
-package flash.utils {
- public final class Endian {
- public static const BIG_ENDIAN: String = "bigEndian";
- public static const LITTLE_ENDIAN: String = "littleEndian";
- }
+package flash.utils
+{
+ public final class Endian
+ {
+ public static const BIG_ENDIAN:String = "bigEndian";
+ public static const LITTLE_ENDIAN:String = "littleEndian";
+ }
}
diff --git a/core/src/avm2/globals/flash/utils/IDataInput.as b/core/src/avm2/globals/flash/utils/IDataInput.as
index 30b57a3f863d..b78b176a458d 100644
--- a/core/src/avm2/globals/flash/utils/IDataInput.as
+++ b/core/src/avm2/globals/flash/utils/IDataInput.as
@@ -1,26 +1,28 @@
-package flash.utils {
- public interface IDataInput {
- function get bytesAvailable():uint;
+package flash.utils
+{
+ public interface IDataInput
+ {
+ function get bytesAvailable():uint;
- function get objectEncoding():uint;
- function set objectEncoding(version:uint):void;
+ function get objectEncoding():uint;
+ function set objectEncoding(version:uint):void;
- function get endian():String;
- function set endian(type:String):void;
+ function get endian():String;
+ function set endian(type:String):void;
- function readBoolean():Boolean;
- function readByte():int;
- function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
- function readDouble():Number;
- function readFloat():Number;
- function readInt():int;
- function readMultiByte(length:uint, charSet:String):String;
- function readObject():*;
- function readShort():int;
- function readUnsignedByte():uint;
- function readUnsignedInt():uint;
- function readUnsignedShort():uint;
- function readUTF():String;
- function readUTFBytes(length:uint):String;
- }
+ function readBoolean():Boolean;
+ function readByte():int;
+ function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
+ function readDouble():Number;
+ function readFloat():Number;
+ function readInt():int;
+ function readMultiByte(length:uint, charSet:String):String;
+ function readObject():*;
+ function readShort():int;
+ function readUnsignedByte():uint;
+ function readUnsignedInt():uint;
+ function readUnsignedShort():uint;
+ function readUTF():String;
+ function readUTFBytes(length:uint):String;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/utils/IDataInput2.as b/core/src/avm2/globals/flash/utils/IDataInput2.as
index 9242eaec6544..7505ef9439f4 100644
--- a/core/src/avm2/globals/flash/utils/IDataInput2.as
+++ b/core/src/avm2/globals/flash/utils/IDataInput2.as
@@ -1,4 +1,6 @@
-package flash.utils {
- internal interface IDataInput2 extends IDataInput {
- }
+package flash.utils
+{
+ internal interface IDataInput2 extends IDataInput
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/utils/IDataOutput.as b/core/src/avm2/globals/flash/utils/IDataOutput.as
index 0a2dae4ecadb..28285606e3cb 100644
--- a/core/src/avm2/globals/flash/utils/IDataOutput.as
+++ b/core/src/avm2/globals/flash/utils/IDataOutput.as
@@ -1,22 +1,24 @@
-package flash.utils {
- public interface IDataOutput {
- function get objectEncoding():uint;
- function set objectEncoding(version:uint):void;
+package flash.utils
+{
+ public interface IDataOutput
+ {
+ function get objectEncoding():uint;
+ function set objectEncoding(version:uint):void;
- function get endian():String;
- function set endian(type:String):void;
+ function get endian():String;
+ function set endian(type:String):void;
- function writeBoolean(value:Boolean):void;
- function writeByte(value:int):void;
- function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
- function writeDouble(value:Number):void;
- function writeFloat(value:Number):void;
- function writeInt(value:int):void;
- function writeMultiByte(value:String, charSet:String):void;
- function writeObject(object:*):void;
- function writeShort(value:int):void;
- function writeUnsignedInt(value:uint):void;
- function writeUTF(value:String):void;
- function writeUTFBytes(value:String):void;
- }
+ function writeBoolean(value:Boolean):void;
+ function writeByte(value:int):void;
+ function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
+ function writeDouble(value:Number):void;
+ function writeFloat(value:Number):void;
+ function writeInt(value:int):void;
+ function writeMultiByte(value:String, charSet:String):void;
+ function writeObject(object:*):void;
+ function writeShort(value:int):void;
+ function writeUnsignedInt(value:uint):void;
+ function writeUTF(value:String):void;
+ function writeUTFBytes(value:String):void;
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/utils/IDataOutput2.as b/core/src/avm2/globals/flash/utils/IDataOutput2.as
index 8356850320e4..e9d7bf7c7a38 100644
--- a/core/src/avm2/globals/flash/utils/IDataOutput2.as
+++ b/core/src/avm2/globals/flash/utils/IDataOutput2.as
@@ -1,4 +1,6 @@
-package flash.utils {
- internal interface IDataOutput2 extends IDataOutput {
- }
+package flash.utils
+{
+ internal interface IDataOutput2 extends IDataOutput
+ {
+ }
}
\ No newline at end of file
diff --git a/core/src/avm2/globals/flash/utils/IExternalizable.as b/core/src/avm2/globals/flash/utils/IExternalizable.as
index 10411db25958..b7f40da4bbda 100644
--- a/core/src/avm2/globals/flash/utils/IExternalizable.as
+++ b/core/src/avm2/globals/flash/utils/IExternalizable.as
@@ -1,7 +1,9 @@
-package flash.utils {
- public interface IExternalizable {
- function readExternal(input:IDataInput):void;
+package flash.utils
+{
+ public interface IExternalizable
+ {
+ function readExternal(input:IDataInput):void;
- function writeExternal(output:IDataOutput):void;
- }
+ function writeExternal(output:IDataOutput):void;
+ }
}
diff --git a/core/src/avm2/globals/flash/utils/Proxy.as b/core/src/avm2/globals/flash/utils/Proxy.as
index e61b320521ee..3acd1b94d7a4 100644
--- a/core/src/avm2/globals/flash/utils/Proxy.as
+++ b/core/src/avm2/globals/flash/utils/Proxy.as
@@ -1,58 +1,57 @@
-
package flash.utils
{
- import flash.errors.IllegalOperationError;
-
- public namespace flash_proxy = "http://www.adobe.com/2006/actionscript/flash/proxy";
-
- [Ruffle(InstanceAllocator)]
- public class Proxy
- {
- flash_proxy function getProperty(name:*) : *
- {
- throw new IllegalOperationError("Error #2088: The Proxy class does not implement getProperty. It must be overridden by a subclass.", 2088);
- }
-
- flash_proxy function setProperty(name:*, value:*) : void
- {
- throw new IllegalOperationError("Error #2089: The Proxy class does not implement setProperty. It must be overridden by a subclass.", 2089);
- }
-
- flash_proxy function callProperty(name:*, ... rest) : *
- {
- throw new IllegalOperationError("Error #2090: The Proxy class does not implement callProperty. It must be overridden by a subclass.", 2090);
- }
-
- flash_proxy function hasProperty(name:*) : Boolean
- {
- throw new IllegalOperationError("Error #2091: The Proxy class does not implement hasProperty. It must be overridden by a subclass.", 2091);
- }
-
- flash_proxy function deleteProperty(name:*) : Boolean
- {
- throw new IllegalOperationError("Error #2092: The Proxy class does not implement deleteProperty. It must be overridden by a subclass.", 2092);
- }
-
- flash_proxy function getDescendants(name:*) : *
- {
- throw new IllegalOperationError("Error #2093: The Proxy class does not implement getDescendants. It must be overridden by a subclass.", 2093);
- }
-
- flash_proxy function nextNameIndex(index:int) : int
- {
- throw new IllegalOperationError("Error #2105: The Proxy class does not implement nextNameIndex. It must be overridden by a subclass.", 2105);
- }
-
- flash_proxy function nextName(index:int) : String
- {
- throw new IllegalOperationError("Error #2106: The Proxy class does not implement nextName. It must be overridden by a subclass.", 2106);
- }
-
- flash_proxy function nextValue(index:int) : *
- {
- throw new IllegalOperationError("Error #2107: The Proxy class does not implement nextValue. It must be overridden by a subclass.", 2107);
- }
-
- native flash_proxy function isAttribute(name:*) : Boolean;
- }
+ import flash.errors.IllegalOperationError;
+
+ public namespace flash_proxy = "http://www.adobe.com/2006/actionscript/flash/proxy";
+
+ [Ruffle(InstanceAllocator)]
+ public class Proxy
+ {
+ flash_proxy function getProperty(name:*):*
+ {
+ throw new IllegalOperationError("Error #2088: The Proxy class does not implement getProperty. It must be overridden by a subclass.", 2088);
+ }
+
+ flash_proxy function setProperty(name:*, value:*):void
+ {
+ throw new IllegalOperationError("Error #2089: The Proxy class does not implement setProperty. It must be overridden by a subclass.", 2089);
+ }
+
+ flash_proxy function callProperty(name:*, ...rest):*
+ {
+ throw new IllegalOperationError("Error #2090: The Proxy class does not implement callProperty. It must be overridden by a subclass.", 2090);
+ }
+
+ flash_proxy function hasProperty(name:*):Boolean
+ {
+ throw new IllegalOperationError("Error #2091: The Proxy class does not implement hasProperty. It must be overridden by a subclass.", 2091);
+ }
+
+ flash_proxy function deleteProperty(name:*):Boolean
+ {
+ throw new IllegalOperationError("Error #2092: The Proxy class does not implement deleteProperty. It must be overridden by a subclass.", 2092);
+ }
+
+ flash_proxy function getDescendants(name:*):*
+ {
+ throw new IllegalOperationError("Error #2093: The Proxy class does not implement getDescendants. It must be overridden by a subclass.", 2093);
+ }
+
+ flash_proxy function nextNameIndex(index:int):int
+ {
+ throw new IllegalOperationError("Error #2105: The Proxy class does not implement nextNameIndex. It must be overridden by a subclass.", 2105);
+ }
+
+ flash_proxy function nextName(index:int):String
+ {
+ throw new IllegalOperationError("Error #2106: The Proxy class does not implement nextName. It must be overridden by a subclass.", 2106);
+ }
+
+ flash_proxy function nextValue(index:int):*
+ {
+ throw new IllegalOperationError("Error #2107: The Proxy class does not implement nextValue. It must be overridden by a subclass.", 2107);
+ }
+
+ native flash_proxy function isAttribute(name:*):Boolean;
+ }
}
diff --git a/core/src/avm2/globals/flash/utils/Timer.as b/core/src/avm2/globals/flash/utils/Timer.as
index c17b8b0eec6c..f748cf191aa7 100644
--- a/core/src/avm2/globals/flash/utils/Timer.as
+++ b/core/src/avm2/globals/flash/utils/Timer.as
@@ -1,59 +1,73 @@
-package flash.utils {
+package flash.utils
+{
import flash.events.EventDispatcher;
import flash.events.TimerEvent;
- public class Timer extends EventDispatcher {
- internal var _currentCount: int;
- internal var _delay: Number;
- internal var _repeatCount: int;
- internal var _timerId: int = -1;
+ public class Timer extends EventDispatcher
+ {
+ internal var _currentCount:int;
+ internal var _delay:Number;
+ internal var _repeatCount:int;
+ internal var _timerId:int = -1;
- private function checkDelay(delay:Number): void {
- if (!isFinite(delay) || delay < 0) {
+ private function checkDelay(delay:Number):void
+ {
+ if (!isFinite(delay) || delay < 0)
+ {
throw new RangeError("Timer delay out of range", 2066);
}
}
- public function Timer(delay:Number, repeatCount:int=0) {
+ public function Timer(delay:Number, repeatCount:int = 0)
+ {
this.checkDelay(delay);
this._currentCount = 0;
this._delay = delay;
this._repeatCount = repeatCount;
}
- public function get currentCount(): int {
+ public function get currentCount():int
+ {
return this._currentCount;
}
- public function get delay(): Number {
+ public function get delay():Number
+ {
return this._delay;
}
- public function set delay(value:Number): void {
+ public function set delay(value:Number):void
+ {
this.checkDelay(delay);
this._delay = value;
- if (this.running) {
+ if (this.running)
+ {
this.updateDelay();
}
}
private native function updateDelay():void;
- public function get repeatCount(): int {
+ public function get repeatCount():int
+ {
return this._repeatCount;
}
- public function set repeatCount(value:int): void {
+ public function set repeatCount(value:int):void
+ {
this._repeatCount = value;
- if (this._repeatCount != 0 && this._repeatCount <= this._currentCount) {
+ if (this._repeatCount != 0 && this._repeatCount <= this._currentCount)
+ {
this.stop();
}
}
- public function get running(): Boolean {
+ public function get running():Boolean
+ {
return this._timerId != -1;
}
- public function reset():void {
+ public function reset():void
+ {
this._currentCount = 0;
this.stop();
}
@@ -62,10 +76,12 @@ package flash.utils {
public native function start():void;
// Returns 'true' if we should cancel the underlying Ruffle native timer
- internal function onUpdate():Boolean {
+ internal function onUpdate():Boolean
+ {
this._currentCount += 1;
this.dispatchEvent(new TimerEvent(TimerEvent.TIMER, false, false));
- if (this.repeatCount != 0 && this._currentCount >= this._repeatCount) {
+ if (this.repeatCount != 0 && this._currentCount >= this._repeatCount)
+ {
// This will make 'running' return false in a TIMER_COMPLETE event handler
this._timerId = -1;
this.dispatchEvent(new TimerEvent(TimerEvent.TIMER_COMPLETE, false, false));
diff --git a/core/src/avm2/globals/flash/xml/XMLDocument.as b/core/src/avm2/globals/flash/xml/XMLDocument.as
index 35917dba2c36..1d1ba79bc20d 100644
--- a/core/src/avm2/globals/flash/xml/XMLDocument.as
+++ b/core/src/avm2/globals/flash/xml/XMLDocument.as
@@ -1,98 +1,118 @@
package flash.xml
{
-import flash.xml.XMLNode;
-import flash.xml.XMLNodeType;
+ import flash.xml.XMLNode;
+ import flash.xml.XMLNodeType;
- public class XMLDocument extends XMLNode {
+ public class XMLDocument extends XMLNode
+ {
- public var ignoreWhite: Boolean = false;
+ public var ignoreWhite:Boolean = false;
- public function XMLDocument(input: String = null) {
- super(XMLNodeType.ELEMENT_NODE, null);
- if (input != null) {
- parseXML(input);
- }
- }
+ public function XMLDocument(input:String = null)
+ {
+ super(XMLNodeType.ELEMENT_NODE, null);
+ if (input != null)
+ {
+ parseXML(input);
+ }
+ }
- public function parseXML(input: String): void {
- // This is something of a hack, but that's somewhat the nature of XMLDocument
- // It accepts things like `... foo` which is FOUR children:
- // `...` gets parsed as an element
- // ` ` gets parsed as a text node
- // `` gets parsed as a comment
- // ` foo` is another text node
- // To achieve this, just wrap it all together in a parent.
+ public function parseXML(input:String):void
+ {
+ // This is something of a hack, but that's somewhat the nature of XMLDocument
+ // It accepts things like `... foo` which is FOUR children:
+ // `...` gets parsed as an element
+ // ` ` gets parsed as a text node
+ // `` gets parsed as a comment
+ // ` foo` is another text node
+ // To achieve this, just wrap it all together in a parent.
- var oldSettings = XML.AS3::settings();
- var newSettings = XML.AS3::defaultSettings();
- newSettings.ignoreWhitespace = this.ignoreWhite;
- XML.AS3::setSettings(newSettings);
+ var oldSettings = XML.AS3::settings();
+ var newSettings = XML.AS3::defaultSettings();
+ newSettings.ignoreWhitespace = this.ignoreWhite;
+ XML.AS3::setSettings(newSettings);
- try {
- clear();
- var root = new XML("" + input + "");
- for each (var child in root.children()) {
- appendChild(_convertXmlNode(child));
- }
- } finally {
- XML.AS3::setSettings(oldSettings);
- }
- }
+ try
+ {
+ clear();
+ var root = new XML("" + input + "");
+ for each (var child in root.children())
+ {
+ appendChild(_convertXmlNode(child));
+ }
+ }
+ finally
+ {
+ XML.AS3::setSettings(oldSettings);
+ }
+ }
- private function _convertXmlNode(original: XML): XMLNode {
- var nodeType = _convertXmlNodeType(original.nodeKind());
- var nodeValue = nodeType == XMLNodeType.ELEMENT_NODE ?
- _convertXmlName(original) : original.toString();
- var result = new XMLNode(nodeType, nodeValue);
- for each (var originalChild in original.children()) {
- result.appendChild(_convertXmlNode(originalChild));
- }
+ private function _convertXmlNode(original:XML):XMLNode
+ {
+ var nodeType = _convertXmlNodeType(original.nodeKind());
+ var nodeValue = nodeType == XMLNodeType.ELEMENT_NODE ?
+ _convertXmlName(original) : original.toString();
+ var result = new XMLNode(nodeType, nodeValue);
+ for each (var originalChild in original.children())
+ {
+ result.appendChild(_convertXmlNode(originalChild));
+ }
- var attributes = {};
- for each (var attribute in original.attributes()) {
- attributes[_convertXmlName(attribute)] = attribute.toString();
- }
- for each (var ns in original.namespaceDeclarations()) {
- var name = "xmlns";
- if (ns.prefix) {
- name += ":" + ns.prefix;
- }
- attributes[name] = ns.uri;
- }
+ var attributes = {};
+ for each (var attribute in original.attributes())
+ {
+ attributes[_convertXmlName(attribute)] = attribute.toString();
+ }
+ for each (var ns in original.namespaceDeclarations())
+ {
+ var name = "xmlns";
+ if (ns.prefix)
+ {
+ name += ":" + ns.prefix;
+ }
+ attributes[name] = ns.uri;
+ }
- result.attributes = attributes;
- return result;
- }
+ result.attributes = attributes;
+ return result;
+ }
- private function _convertXmlName(node: XML): String {
- var ns = node.namespace();
- if (ns.prefix) {
- return ns.prefix + ":" + node.localName();
- }
- return node.localName();
- }
+ private function _convertXmlName(node:XML):String
+ {
+ var ns = node.namespace ();
+ if (ns.prefix)
+ {
+ return ns.prefix + ":" + node.localName();
+ }
+ return node.localName();
+ }
- private function _convertXmlNodeType(kind: String): uint {
- if (kind == "text") {
- return XMLNodeType.TEXT_NODE;
- }
- if (kind == "comment") {
- return XMLNodeType.COMMENT_NODE;
- }
- if (kind == "element") {
- return XMLNodeType.ELEMENT_NODE;
- }
- throw new Error("Invalid XML Node kind '" + kind + "' found whilst constructing (legacy) XMLDocument");
- }
+ private function _convertXmlNodeType(kind:String):uint
+ {
+ if (kind == "text")
+ {
+ return XMLNodeType.TEXT_NODE;
+ }
+ if (kind == "comment")
+ {
+ return XMLNodeType.COMMENT_NODE;
+ }
+ if (kind == "element")
+ {
+ return XMLNodeType.ELEMENT_NODE;
+ }
+ throw new Error("Invalid XML Node kind '" + kind + "' found whilst constructing (legacy) XMLDocument");
+ }
- public function createElement(name:String): XMLNode {
- return new XMLNode(XMLNodeType.ELEMENT_NODE, name);
- }
+ public function createElement(name:String):XMLNode
+ {
+ return new XMLNode(XMLNodeType.ELEMENT_NODE, name);
+ }
- public function createTextNode(text:String): XMLNode {
- return new XMLNode(XMLNodeType.TEXT_NODE, text);
- }
- }
+ public function createTextNode(text:String):XMLNode
+ {
+ return new XMLNode(XMLNodeType.TEXT_NODE, text);
+ }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/xml/XMLNode.as b/core/src/avm2/globals/flash/xml/XMLNode.as
index 62f4a6f362f1..a7451fe072c1 100644
--- a/core/src/avm2/globals/flash/xml/XMLNode.as
+++ b/core/src/avm2/globals/flash/xml/XMLNode.as
@@ -1,257 +1,322 @@
package flash.xml
{
- import __ruffle__.stub_getter;
- import __ruffle__.stub_method;
-
- import flash.xml.XMLNode;
- import flash.xml.XMLNodeType;
-
- public class XMLNode {
- internal var _children: Array = [];
-
- public var nodeType:uint;
-
- public var attributes:Object = {};
-
- public var nodeName:String = null;
- public var nodeValue:String = null;
-
- // [NA] parentNode, xChild and xSibling are settable in Flash. It makes no sense though and 100% would break things.
- // Oh well. Less work for us.
- public var parentNode:XMLNode = null;
-
- public var firstChild:XMLNode = null;
- public var lastChild:XMLNode = null;
-
- public var previousSibling:XMLNode = null;
- public var nextSibling:XMLNode = null;
-
- public function XMLNode(type: uint, input: String) {
- nodeType = type;
- if (type == XMLNodeType.ELEMENT_NODE) {
- nodeName = input;
- } else {
- nodeValue = input;
- }
- }
-
- public function get childNodes(): Array {
- return _children;
- }
-
- public function hasChildNodes(): Boolean {
- return _children.length > 0;
- }
-
- public function cloneNode(deep: Boolean): XMLNode {
- var clone = new XMLNode(nodeType, nodeType == XMLNodeType.ELEMENT_NODE
- ? nodeName : nodeValue);
- for (var key in attributes) {
- clone.attributes[key] = attributes[key];
- }
-
- if (deep) {
- for (var i = 0; i < childNodes.length; i++) {
- clone.appendChild(childNodes[i].cloneNode(true));
- }
- }
-
- return clone;
- }
-
- public function removeNode(): void {
- if (parentNode) {
- if (parentNode.firstChild === this) {
- parentNode.firstChild = nextSibling;
- }
- if (parentNode.lastChild === this) {
- parentNode.lastChild = previousSibling;
- }
- var index = parentNode.childNodes.indexOf(this);
- if (index > -1) {
- parentNode.childNodes.removeAt(index);
- }
- }
-
- if (previousSibling) {
- previousSibling.nextSibling = nextSibling;
- }
- if (nextSibling) {
- nextSibling.previousSibling = previousSibling;
- }
-
- parentNode = null;
- previousSibling = null;
- nextSibling = null;
- }
-
- public function insertBefore(node: XMLNode, before: XMLNode = null): void {
- if (before == null) {
- appendChild(node);
- return;
- }
-
- if (before.previousSibling != null) {
- // inserting in the middle
- before.previousSibling.nextSibling = node;
-
- for (var i = 0; i < childNodes.length; i++) {
- if (childNodes[i] === before) {
- childNodes.splice(i, 0, node);
- break;
- }
- }
- } else {
- // inserting at the start
- firstChild = node;
- }
-
- node.previousSibling = before.previousSibling;
- before.previousSibling = node;
- node.nextSibling = before;
- node.parentNode = this;
- }
-
- public function appendChild(node: XMLNode): void {
- if (node.parentNode === this) {
- return;
- }
- if (lastChild != null) {
- lastChild.nextSibling = node;
- node.previousSibling = lastChild;
- } else {
- firstChild = node;
- node.previousSibling = null;
- }
- node.nextSibling = null;
- node.parentNode = this;
- lastChild = node;
-
- _children.push(node);
- }
-
- public function getNamespaceForPrefix(prefix: String): String {
- for (var attr in attributes) {
- if (attr.indexOf("xmlns:") != 0) {
- continue;
- }
- if (attr.substring(6) == prefix) {
- return attributes[attr];
- }
- }
-
- if (parentNode) {
- return parentNode.getNamespaceForPrefix(prefix);
- }
-
- return null;
- }
-
- public function getPrefixForNamespace(ns: String): String {
- for (var attr in attributes) {
- if (attr.indexOf("xmlns:") != 0) {
- continue;
- }
- if (attributes[attr] == ns) {
- return attr.substring(6);
- }
- }
-
- if (parentNode) {
- return parentNode.getPrefixForNamespace(ns);
- }
-
- return null;
- }
-
- public function get localName(): String {
- if (nodeName == null) {
- return null;
- }
- var index = nodeName.indexOf(":");
- if (index > -1) {
- return nodeName.substring(index + 1);
- } else {
- return nodeName;
- }
- }
-
- public function get prefix(): String {
- if (nodeName == null) {
- return null;
- }
- var index = nodeName.indexOf(":");
- if (index > -1) {
- return nodeName.substring(0, index);
- } else {
- return "";
- }
- }
-
- public function get namespaceURI(): String {
- if (prefix) {
- return getNamespaceForPrefix(prefix);
- }
-
- var node: XMLNode = this;
- do {
- if (node.attributes.xmlns) {
- return node.attributes.xmlns;
- }
-
- node = node.parentNode;
- } while (node);
-
- return null;
- }
-
- public function toString(): String {
- if (nodeType != XMLNodeType.ELEMENT_NODE) {
- return _escapeXML(nodeValue);
- }
-
- var result = "";
- if (nodeName != null) {
- result += "<" + nodeName;
- }
-
- for (var key in this.attributes) {
- result += " " + key + "=\"" + _escapeXML(this.attributes[key]) + "\"";
- }
-
- if (hasChildNodes()) {
- if (nodeName != null) {
- result += ">";
- }
- for each (var child in childNodes) {
- result += child.toString();
- }
- if (nodeName != null) {
- result += "" + nodeName + ">";
- }
- } else if (nodeName != null) {
- result += " />";
- }
-
- return result;
- }
-
- private native static function _escapeXML(text: String): String;
-
- internal function clear(): void {
- _children = [];
-
- attributes = {};
-
- parentNode = null;
-
- firstChild = null;
- lastChild = null;
-
- previousSibling = null;
- nextSibling = null;
- }
- }
+ import __ruffle__.stub_getter;
+ import __ruffle__.stub_method;
+
+ import flash.xml.XMLNode;
+ import flash.xml.XMLNodeType;
+
+ public class XMLNode
+ {
+ internal var _children:Array = [];
+
+ public var nodeType:uint;
+
+ public var attributes:Object = {};
+
+ public var nodeName:String = null;
+ public var nodeValue:String = null;
+
+ // [NA] parentNode, xChild and xSibling are settable in Flash. It makes no sense though and 100% would break things.
+ // Oh well. Less work for us.
+ public var parentNode:XMLNode = null;
+
+ public var firstChild:XMLNode = null;
+ public var lastChild:XMLNode = null;
+
+ public var previousSibling:XMLNode = null;
+ public var nextSibling:XMLNode = null;
+
+ public function XMLNode(type:uint, input:String)
+ {
+ nodeType = type;
+ if (type == XMLNodeType.ELEMENT_NODE)
+ {
+ nodeName = input;
+ }
+ else
+ {
+ nodeValue = input;
+ }
+ }
+
+ public function get childNodes():Array
+ {
+ return _children;
+ }
+
+ public function hasChildNodes():Boolean
+ {
+ return _children.length > 0;
+ }
+
+ public function cloneNode(deep:Boolean):XMLNode
+ {
+ var clone = new XMLNode(nodeType, nodeType == XMLNodeType.ELEMENT_NODE
+ ? nodeName : nodeValue);
+ for (var key in attributes)
+ {
+ clone.attributes[key] = attributes[key];
+ }
+
+ if (deep)
+ {
+ for (var i = 0; i < childNodes.length; i++)
+ {
+ clone.appendChild(childNodes[i].cloneNode(true));
+ }
+ }
+
+ return clone;
+ }
+
+ public function removeNode():void
+ {
+ if (parentNode)
+ {
+ if (parentNode.firstChild === this)
+ {
+ parentNode.firstChild = nextSibling;
+ }
+ if (parentNode.lastChild === this)
+ {
+ parentNode.lastChild = previousSibling;
+ }
+ var index = parentNode.childNodes.indexOf(this);
+ if (index > -1)
+ {
+ parentNode.childNodes.removeAt(index);
+ }
+ }
+
+ if (previousSibling)
+ {
+ previousSibling.nextSibling = nextSibling;
+ }
+ if (nextSibling)
+ {
+ nextSibling.previousSibling = previousSibling;
+ }
+
+ parentNode = null;
+ previousSibling = null;
+ nextSibling = null;
+ }
+
+ public function insertBefore(node:XMLNode, before:XMLNode = null):void
+ {
+ if (before == null)
+ {
+ appendChild(node);
+ return;
+ }
+
+ if (before.previousSibling != null)
+ {
+ // inserting in the middle
+ before.previousSibling.nextSibling = node;
+
+ for (var i = 0; i < childNodes.length; i++)
+ {
+ if (childNodes[i] === before)
+ {
+ childNodes.splice(i, 0, node);
+ break;
+ }
+ }
+ }
+ else
+ {
+ // inserting at the start
+ firstChild = node;
+ }
+
+ node.previousSibling = before.previousSibling;
+ before.previousSibling = node;
+ node.nextSibling = before;
+ node.parentNode = this;
+ }
+
+ public function appendChild(node:XMLNode):void
+ {
+ if (node.parentNode === this)
+ {
+ return;
+ }
+ if (lastChild != null)
+ {
+ lastChild.nextSibling = node;
+ node.previousSibling = lastChild;
+ }
+ else
+ {
+ firstChild = node;
+ node.previousSibling = null;
+ }
+ node.nextSibling = null;
+ node.parentNode = this;
+ lastChild = node;
+
+ _children.push(node);
+ }
+
+ public function getNamespaceForPrefix(prefix:String):String
+ {
+ for (var attr in attributes)
+ {
+ if (attr.indexOf("xmlns:") != 0)
+ {
+ continue;
+ }
+ if (attr.substring(6) == prefix)
+ {
+ return attributes[attr];
+ }
+ }
+
+ if (parentNode)
+ {
+ return parentNode.getNamespaceForPrefix(prefix);
+ }
+
+ return null;
+ }
+
+ public function getPrefixForNamespace(ns:String):String
+ {
+ for (var attr in attributes)
+ {
+ if (attr.indexOf("xmlns:") != 0)
+ {
+ continue;
+ }
+ if (attributes[attr] == ns)
+ {
+ return attr.substring(6);
+ }
+ }
+
+ if (parentNode)
+ {
+ return parentNode.getPrefixForNamespace(ns);
+ }
+
+ return null;
+ }
+
+ public function get localName():String
+ {
+ if (nodeName == null)
+ {
+ return null;
+ }
+ var index = nodeName.indexOf(":");
+ if (index > -1)
+ {
+ return nodeName.substring(index + 1);
+ }
+ else
+ {
+ return nodeName;
+ }
+ }
+
+ public function get prefix():String
+ {
+ if (nodeName == null)
+ {
+ return null;
+ }
+ var index = nodeName.indexOf(":");
+ if (index > -1)
+ {
+ return nodeName.substring(0, index);
+ }
+ else
+ {
+ return "";
+ }
+ }
+
+ public function get namespaceURI():String
+ {
+ if (prefix)
+ {
+ return getNamespaceForPrefix(prefix);
+ }
+
+ var node:XMLNode = this;
+ do
+ {
+ if (node.attributes.xmlns)
+ {
+ return node.attributes.xmlns;
+ }
+
+ node = node.parentNode;
+ }
+ while (node);
+
+ return null;
+ }
+
+ public function toString():String
+ {
+ if (nodeType != XMLNodeType.ELEMENT_NODE)
+ {
+ return _escapeXML(nodeValue);
+ }
+
+ var result = "";
+ if (nodeName != null)
+ {
+ result += "<" + nodeName;
+ }
+
+ for (var key in this.attributes)
+ {
+ result += " " + key + "=\"" + _escapeXML(this.attributes[key]) + "\"";
+ }
+
+ if (hasChildNodes())
+ {
+ if (nodeName != null)
+ {
+ result += ">";
+ }
+ for each (var child in childNodes)
+ {
+ result += child.toString();
+ }
+ if (nodeName != null)
+ {
+ result += "" + nodeName + ">";
+ }
+ }
+ else if (nodeName != null)
+ {
+ result += " />";
+ }
+
+ return result;
+ }
+
+ private native static function _escapeXML(text:String):String;
+
+ internal function clear():void
+ {
+ _children = [];
+
+ attributes = {};
+
+ parentNode = null;
+
+ firstChild = null;
+ lastChild = null;
+
+ previousSibling = null;
+ nextSibling = null;
+ }
+ }
}
-
diff --git a/core/src/avm2/globals/flash/xml/XMLNodeType.as b/core/src/avm2/globals/flash/xml/XMLNodeType.as
index 702d23df95f9..c721704bbb63 100644
--- a/core/src/avm2/globals/flash/xml/XMLNodeType.as
+++ b/core/src/avm2/globals/flash/xml/XMLNodeType.as
@@ -1,23 +1,22 @@
package flash.xml
{
- public final class XMLNodeType
- {
-
- public static const ELEMENT_NODE:uint = 1;
-
- public static const TEXT_NODE:uint = 3;
-
- // The rest of these are undocumented properties.
-
- public static const CDATA_NODE:uint = 4;
-
- public static const PROCESSING_INSTRUCTION_NODE:uint = 7;
-
- public static const COMMENT_NODE:uint = 8;
-
- public static const DOCUMENT_TYPE_NODE:uint = 10;
-
- public static const XML_DECLARATION:uint = 13;
- }
-}
+ public final class XMLNodeType
+ {
+
+ public static const ELEMENT_NODE:uint = 1;
+
+ public static const TEXT_NODE:uint = 3;
+
+ // The rest of these are undocumented properties.
+
+ public static const CDATA_NODE:uint = 4;
+ public static const PROCESSING_INSTRUCTION_NODE:uint = 7;
+
+ public static const COMMENT_NODE:uint = 8;
+
+ public static const DOCUMENT_TYPE_NODE:uint = 10;
+
+ public static const XML_DECLARATION:uint = 13;
+ }
+}
diff --git a/core/src/avm2/globals/int.as b/core/src/avm2/globals/int.as
index b9c739d0cdb4..a15cd9af1fdd 100644
--- a/core/src/avm2/globals/int.as
+++ b/core/src/avm2/globals/int.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `int.rs`
-package {
- public final class int {
- }
+package
+{
+ public final class int
+ {
+ }
}
diff --git a/core/src/avm2/globals/uint.as b/core/src/avm2/globals/uint.as
index 43658d7cd3ff..e47007162b2b 100644
--- a/core/src/avm2/globals/uint.as
+++ b/core/src/avm2/globals/uint.as
@@ -1,5 +1,7 @@
// This is a stub - the actual class is defined in `uint.rs`
-package {
- public final class uint {
- }
+package
+{
+ public final class uint
+ {
+ }
}