diff --git a/core/src/avm2/globals/flash/accessibility/Accessibility.as b/core/src/avm2/globals/flash/accessibility/Accessibility.as new file mode 100644 index 000000000..6e253b5ac --- /dev/null +++ b/core/src/avm2/globals/flash/accessibility/Accessibility.as @@ -0,0 +1,27 @@ +// 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/accessibility/Accessibility.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.accessibility +{ + import __ruffle__.stub_method + + public final class Accessibility + { + // Indicates whether a screen reader is active and the application is communicating with it. + private static var _active: Boolean; + + // 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; + } + + } +} diff --git a/core/src/avm2/globals/flash/globalization/CurrencyParseResult.as b/core/src/avm2/globals/flash/globalization/CurrencyParseResult.as new file mode 100644 index 000000000..2612be0dc --- /dev/null +++ b/core/src/avm2/globals/flash/globalization/CurrencyParseResult.as @@ -0,0 +1,32 @@ +// 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/globalization/CurrencyParseResult.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.globalization +{ + 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; + + 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 currencyString() : String + { + return this._currencyString; + } + } +} diff --git a/core/src/avm2/globals/flash/media/AVNetworkingParams.as b/core/src/avm2/globals/flash/media/AVNetworkingParams.as new file mode 100644 index 000000000..550f6ad98 --- /dev/null +++ b/core/src/avm2/globals/flash/media/AVNetworkingParams.as @@ -0,0 +1,80 @@ +// 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/media/AVNetworkingParams.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.media +{ + public class AVNetworkingParams + { + private var _forceNativeNetworking: Boolean; + + private var _readSetCookieHeader: Boolean; + + private var _useCookieHeaderForAllRequests: Boolean; + + private var _networkDownVerificationUrl: 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 get appendRandomQueryParameter():String + { + return this._appendRandomQueryParameter; + } + + 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 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 set readSetCookieHeader(value:Boolean):void + { + this._readSetCookieHeader = value; + } + + public function get useCookieHeaderForAllRequests():Boolean + { + return this._useCookieHeaderForAllRequests; + } + + public function set useCookieHeaderForAllRequests(value:Boolean):void + { + this._useCookieHeaderForAllRequests = value; + } + } +} diff --git a/core/src/avm2/globals/flash/media/AVTagData.as b/core/src/avm2/globals/flash/media/AVTagData.as new file mode 100644 index 000000000..5514cbe54 --- /dev/null +++ b/core/src/avm2/globals/flash/media/AVTagData.as @@ -0,0 +1,34 @@ +// 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/media/AVTagData.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.media +{ + public class AVTagData + { + // Data in the tag. + private var _data: String; + + // 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 get data() : String + { + return this._data; + } + + public function get localTime() : Number + { + return this._localTime; + } + } +} diff --git a/core/src/avm2/globals/flash/media/VideoStreamSettings.as b/core/src/avm2/globals/flash/media/VideoStreamSettings.as new file mode 100644 index 000000000..6f1111a36 --- /dev/null +++ b/core/src/avm2/globals/flash/media/VideoStreamSettings.as @@ -0,0 +1,87 @@ +// 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/media/VideoStreamSettings.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.media +{ + import __ruffle__.stub_method; + + 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/NetStreamPlayOptions.as b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as new file mode 100644 index 000000000..4f2c06267 --- /dev/null +++ b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as @@ -0,0 +1,30 @@ +// 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/net/NetStreamPlayOptions.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.net +{ + 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; + + // The absoulte 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 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 mode in which streamName is played or transitioned to. + public var transition: String; + } +} diff --git a/core/src/avm2/globals/flash/net/URLRequestDefaults.as b/core/src/avm2/globals/flash/net/URLRequestDefaults.as new file mode 100644 index 000000000..e3ae2d81f --- /dev/null +++ b/core/src/avm2/globals/flash/net/URLRequestDefaults.as @@ -0,0 +1,113 @@ +// 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/net/URLRequestDefaults.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.net +{ + import __ruffle__.stub_method; + import __ruffle__.stub_getter; + import __ruffle__.stub_setter; + + 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/system/IME.as b/core/src/avm2/globals/flash/system/IME.as new file mode 100644 index 000000000..f7b6a0172 --- /dev/null +++ b/core/src/avm2/globals/flash/system/IME.as @@ -0,0 +1,77 @@ +// 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/system/IME.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.system +{ + 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. + public static var _conversionMode: String = "ALPHANUMERIC_HALF"; + + // Indicates whether the system IME is enabled (true) or disabled (false). + public 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; + + // 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"); + } + + // 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"); + } + + public function get isSupported() : Boolean + { + return _isSupported; + } + + 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 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; + } + } +} diff --git a/core/src/avm2/globals/flash/system/JPEGLoaderContext.as b/core/src/avm2/globals/flash/system/JPEGLoaderContext.as new file mode 100644 index 000000000..0201bc05c --- /dev/null +++ b/core/src/avm2/globals/flash/system/JPEGLoaderContext.as @@ -0,0 +1,19 @@ +// 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/system/JPEGLoaderContext.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.system +{ + 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; + } + } +} diff --git a/core/src/avm2/globals/flash/text/TextRenderer.as b/core/src/avm2/globals/flash/text/TextRenderer.as new file mode 100644 index 000000000..5fe7bbd64 --- /dev/null +++ b/core/src/avm2/globals/flash/text/TextRenderer.as @@ -0,0 +1,48 @@ +// 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/text/TextRenderer.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.text +{ + import __ruffle__.stub_method; + + public final class TextRenderer + { + // Controls the rendering of advanced anti-aliased text. + public static var _displayMode: String = "default"; + + // The adaptively sampled distance fields (ADFs) quality level for advanced anti-aliasing. + public 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/ui/MouseCursorData.as b/core/src/avm2/globals/flash/ui/MouseCursorData.as new file mode 100644 index 000000000..31839a78e --- /dev/null +++ b/core/src/avm2/globals/flash/ui/MouseCursorData.as @@ -0,0 +1,60 @@ +// 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/ui/MouseCursorData.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.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. + public var _data: Vector.; + + // The frame rate for animating the cursor. + public var _frameRate: Number; + + // The hot spot of the cursor in pixels. + public 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.net.MouseCursorData", "data"); + return this._frameRate; + } + + public function set frameRate(value:Number):void + { + stub_setter("flash.net.MouseCursorData", "data"); + 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/globals.as b/core/src/avm2/globals/globals.as index 659e6e767..0eb61839a 100644 --- a/core/src/avm2/globals/globals.as +++ b/core/src/avm2/globals/globals.as @@ -19,6 +19,7 @@ include "VerifyError.as" include "avmplus.as" include "flash/accessibility/AccessibilityProperties.as" +include "flash/accessibility/Accessibility.as" include "flash/crypto.as" include "flash/utils/IDataInput.as" include "flash/utils/IDataOutput.as" @@ -196,14 +197,18 @@ include "flash/geom/Rectangle.as" include "flash/geom/Transform.as" include "flash/geom/Vector3D.as" include "flash/globalization/CollatorMode.as" +include "flash/globalization/CurrencyParseResult.as" include "flash/globalization/CurrencyFormatter.as" include "flash/globalization/DateTimeNameContext.as" include "flash/globalization/DateTimeNameStyle.as" include "flash/globalization/DateTimeStyle.as" include "flash/globalization/LastOperationStatus.as" include "flash/globalization/NationalDigitsType.as" + include "flash/media/AudioDecoder.as" include "flash/media/AudioOutputChangeReason.as" +include "flash/media/AVNetworkingParams.as" +include "flash/media/AVTagData.as" include "flash/media/Camera.as" include "flash/media/H264Level.as" include "flash/media/H264Profile.as" @@ -220,6 +225,8 @@ include "flash/media/Video.as" include "flash/media/VideoCodec.as" include "flash/media/VideoStatus.as" +include "flash/media/VideoStreamSettings.as" + include "flash/external/ExternalInterface.as" include "flash/net.as" @@ -234,6 +241,8 @@ include "flash/net/NetGroupReceiveMode.as" include "flash/net/NetGroupReplicationStrategy.as" include "flash/net/NetGroupSendMode.as" include "flash/net/NetGroupSendResult.as" +include "flash/net/NetStreamPlayOptions.as" +include "flash/net/URLRequestDefaults.as" include "flash/net/ObjectEncoding.as" include "flash/net/Responder.as" include "flash/net/SharedObject.as" @@ -252,8 +261,10 @@ include "flash/profiler.as" include "flash/security/CertificateStatus.as" include "flash/system/Capabilities.as" +include "flash/system/IME.as" include "flash/system/IMEConversionMode.as" include "flash/system/LoaderContext.as" +include "flash/system/JPEGLoaderContext.as" include "flash/system/MessageChannelState.as" include "flash/system/Security.as" include "flash/system/SecurityDomain.as" @@ -281,6 +292,7 @@ include "flash/text/TextFormatAlign.as" include "flash/text/TextFormatDisplay.as" include "flash/text/TextInteractionMode.as" include "flash/text/TextLineMetrics.as" +include "flash/text/TextRenderer.as" include "flash/text/engine/BreakOpportunity.as" include "flash/text/engine/CFFHinting.as" @@ -310,6 +322,7 @@ include "flash/ui/KeyboardType.as" include "flash/ui/KeyLocation.as" include "flash/ui/Mouse.as" include "flash/ui/MouseCursor.as" +include "flash/ui/MouseCursorData.as" // `MultitouchInputMode` needs to come before `Multitouch`, since `Multitouch` uses constants from // `MultitouchInputMode`. include "flash/ui/MultitouchInputMode.as" diff --git a/tests/tests/swfs/avm2/accessibility/Test.as b/tests/tests/swfs/avm2/accessibility/Test.as new file mode 100644 index 000000000..125f8fc05 --- /dev/null +++ b/tests/tests/swfs/avm2/accessibility/Test.as @@ -0,0 +1,9 @@ +package { + import flash.display.MovieClip; + import flash.accessibility.Accessibility; + public class Test extends MovieClip { + public function Test() { + trace(Accessibility.active); + } + } +} diff --git a/tests/tests/swfs/avm2/accessibility/output.txt b/tests/tests/swfs/avm2/accessibility/output.txt new file mode 100644 index 000000000..c508d5366 --- /dev/null +++ b/tests/tests/swfs/avm2/accessibility/output.txt @@ -0,0 +1 @@ +false diff --git a/tests/tests/swfs/avm2/accessibility/test.swf b/tests/tests/swfs/avm2/accessibility/test.swf new file mode 100644 index 000000000..cb0e2a636 Binary files /dev/null and b/tests/tests/swfs/avm2/accessibility/test.swf differ diff --git a/tests/tests/swfs/avm2/accessibility/test.toml b/tests/tests/swfs/avm2/accessibility/test.toml new file mode 100644 index 000000000..dbee897f5 --- /dev/null +++ b/tests/tests/swfs/avm2/accessibility/test.toml @@ -0,0 +1 @@ +num_frames = 1 diff --git a/tests/tests/swfs/avm2/av_networking_params/Test.as b/tests/tests/swfs/avm2/av_networking_params/Test.as new file mode 100644 index 000000000..1abc0dcbd --- /dev/null +++ b/tests/tests/swfs/avm2/av_networking_params/Test.as @@ -0,0 +1,20 @@ +package { + import flash.display.MovieClip; + import flash.media.AVNetworkingParams; + public class Test extends MovieClip { + public function Test() { + var avnp1:AVNetworkingParams = new AVNetworkingParams(); + trace(avnp1.forceNativeNetworking); + trace(avnp1.readSetCookieHeader); + trace(avnp1.useCookieHeaderForAllRequests); + var avnp2:AVNetworkingParams = new AVNetworkingParams(false, true, false); + trace(avnp2.forceNativeNetworking); + trace(avnp2.readSetCookieHeader); + trace(avnp2.useCookieHeaderForAllRequests); + var avnp3:AVNetworkingParams = new AVNetworkingParams(true, false, true); + trace(avnp3.forceNativeNetworking); + trace(avnp3.readSetCookieHeader); + trace(avnp3.useCookieHeaderForAllRequests); + } + } +} diff --git a/tests/tests/swfs/avm2/av_networking_params/output.txt b/tests/tests/swfs/avm2/av_networking_params/output.txt new file mode 100644 index 000000000..2135f7857 --- /dev/null +++ b/tests/tests/swfs/avm2/av_networking_params/output.txt @@ -0,0 +1,9 @@ +false +true +false +false +true +false +true +false +true diff --git a/tests/tests/swfs/avm2/av_networking_params/test.swf b/tests/tests/swfs/avm2/av_networking_params/test.swf new file mode 100644 index 000000000..173f5049c Binary files /dev/null and b/tests/tests/swfs/avm2/av_networking_params/test.swf differ diff --git a/tests/tests/swfs/avm2/av_networking_params/test.toml b/tests/tests/swfs/avm2/av_networking_params/test.toml new file mode 100644 index 000000000..dbee897f5 --- /dev/null +++ b/tests/tests/swfs/avm2/av_networking_params/test.toml @@ -0,0 +1 @@ +num_frames = 1 diff --git a/tests/tests/swfs/avm2/av_tag_data/Test.as b/tests/tests/swfs/avm2/av_tag_data/Test.as new file mode 100644 index 000000000..de3dcdd1b --- /dev/null +++ b/tests/tests/swfs/avm2/av_tag_data/Test.as @@ -0,0 +1,11 @@ +package { + import flash.display.MovieClip; + import flash.media.AVTagData; + public class Test extends MovieClip { + public function Test() { + var avTag:AVTagData = new AVTagData("test string", 1); + trace(avTag.data); + trace(avTag.localTime); + } + } +} diff --git a/tests/tests/swfs/avm2/av_tag_data/output.txt b/tests/tests/swfs/avm2/av_tag_data/output.txt new file mode 100644 index 000000000..af8eba2b1 --- /dev/null +++ b/tests/tests/swfs/avm2/av_tag_data/output.txt @@ -0,0 +1,2 @@ +test string +1 diff --git a/tests/tests/swfs/avm2/av_tag_data/test.swf b/tests/tests/swfs/avm2/av_tag_data/test.swf new file mode 100644 index 000000000..d701f9390 Binary files /dev/null and b/tests/tests/swfs/avm2/av_tag_data/test.swf differ diff --git a/tests/tests/swfs/avm2/av_tag_data/test.toml b/tests/tests/swfs/avm2/av_tag_data/test.toml new file mode 100644 index 000000000..dbee897f5 --- /dev/null +++ b/tests/tests/swfs/avm2/av_tag_data/test.toml @@ -0,0 +1 @@ +num_frames = 1 diff --git a/tests/tests/swfs/avm2/currency_parse_result/Test.as b/tests/tests/swfs/avm2/currency_parse_result/Test.as new file mode 100644 index 000000000..3b1cb37dc --- /dev/null +++ b/tests/tests/swfs/avm2/currency_parse_result/Test.as @@ -0,0 +1,20 @@ +package { + import flash.display.MovieClip; + import flash.globalization.CurrencyParseResult; + public class Test extends MovieClip { + public function Test() { + var cr1:CurrencyParseResult = new CurrencyParseResult(NaN, ""); + trace(cr1.currencyString); + trace(cr1.value); + var cr2:CurrencyParseResult = new CurrencyParseResult(10, "$"); + trace(cr2.currencyString); + trace(cr2.value); + var cr3:CurrencyParseResult = new CurrencyParseResult(200.10, "£"); + trace(cr3.currencyString); + trace(cr3.value); + var cr4:CurrencyParseResult = new CurrencyParseResult(-10, "€"); + trace(cr4.currencyString); + trace(cr4.value); + } + } +} diff --git a/tests/tests/swfs/avm2/currency_parse_result/output.txt b/tests/tests/swfs/avm2/currency_parse_result/output.txt new file mode 100644 index 000000000..87b05018b --- /dev/null +++ b/tests/tests/swfs/avm2/currency_parse_result/output.txt @@ -0,0 +1,8 @@ + +NaN +$ +10 +£ +200.1 +€ +-10 diff --git a/tests/tests/swfs/avm2/currency_parse_result/test.swf b/tests/tests/swfs/avm2/currency_parse_result/test.swf new file mode 100644 index 000000000..991faa2b1 Binary files /dev/null and b/tests/tests/swfs/avm2/currency_parse_result/test.swf differ diff --git a/tests/tests/swfs/avm2/currency_parse_result/test.toml b/tests/tests/swfs/avm2/currency_parse_result/test.toml new file mode 100644 index 000000000..dbee897f5 --- /dev/null +++ b/tests/tests/swfs/avm2/currency_parse_result/test.toml @@ -0,0 +1 @@ +num_frames = 1 diff --git a/tests/tests/swfs/avm2/jpeg_loader_context/Test.as b/tests/tests/swfs/avm2/jpeg_loader_context/Test.as new file mode 100644 index 000000000..a4cc3483c --- /dev/null +++ b/tests/tests/swfs/avm2/jpeg_loader_context/Test.as @@ -0,0 +1,17 @@ +package { + import flash.display.MovieClip; + import flash.system.JPEGLoaderContext; + public class Test extends MovieClip { + public function Test() { + var jpegLoaderContext1:JPEGLoaderContext = new JPEGLoaderContext(); + trace(jpegLoaderContext1.checkPolicyFile); + trace(jpegLoaderContext1.deblockingFilter); + var jpegLoaderContext2:JPEGLoaderContext = new JPEGLoaderContext(0, false); + trace(jpegLoaderContext1.checkPolicyFile); + trace(jpegLoaderContext1.deblockingFilter); + var jpegLoaderContext3:JPEGLoaderContext = new JPEGLoaderContext(1, true); + trace(jpegLoaderContext3.checkPolicyFile); + trace(jpegLoaderContext3.deblockingFilter); + } + } +} diff --git a/tests/tests/swfs/avm2/jpeg_loader_context/output.txt b/tests/tests/swfs/avm2/jpeg_loader_context/output.txt new file mode 100644 index 000000000..f68edce3f --- /dev/null +++ b/tests/tests/swfs/avm2/jpeg_loader_context/output.txt @@ -0,0 +1,6 @@ +false +0 +false +0 +true +1 diff --git a/tests/tests/swfs/avm2/jpeg_loader_context/test.swf b/tests/tests/swfs/avm2/jpeg_loader_context/test.swf new file mode 100644 index 000000000..93fe0bc80 Binary files /dev/null and b/tests/tests/swfs/avm2/jpeg_loader_context/test.swf differ diff --git a/tests/tests/swfs/avm2/jpeg_loader_context/test.toml b/tests/tests/swfs/avm2/jpeg_loader_context/test.toml new file mode 100644 index 000000000..dbee897f5 --- /dev/null +++ b/tests/tests/swfs/avm2/jpeg_loader_context/test.toml @@ -0,0 +1 @@ +num_frames = 1 diff --git a/tests/tests/swfs/avm2/net_stream_play_options/Test.as b/tests/tests/swfs/avm2/net_stream_play_options/Test.as new file mode 100644 index 000000000..e22d7076a --- /dev/null +++ b/tests/tests/swfs/avm2/net_stream_play_options/Test.as @@ -0,0 +1,15 @@ +package { + import flash.display.MovieClip; + import flash.net.NetStreamPlayOptions; + public class Test extends MovieClip { + public function Test() { + var nspo:NetStreamPlayOptions = new NetStreamPlayOptions(); + trace(nspo.len); + trace(nspo.offset); + trace(nspo.oldStreamName); + trace(nspo.start); + trace(nspo.streamName); + trace(nspo.transition); + } + } +} diff --git a/tests/tests/swfs/avm2/net_stream_play_options/output.txt b/tests/tests/swfs/avm2/net_stream_play_options/output.txt new file mode 100644 index 000000000..a1abce9e9 --- /dev/null +++ b/tests/tests/swfs/avm2/net_stream_play_options/output.txt @@ -0,0 +1,6 @@ +-1 +-1 +null +-2 +null +null diff --git a/tests/tests/swfs/avm2/net_stream_play_options/test.swf b/tests/tests/swfs/avm2/net_stream_play_options/test.swf new file mode 100644 index 000000000..ea75a17a4 Binary files /dev/null and b/tests/tests/swfs/avm2/net_stream_play_options/test.swf differ diff --git a/tests/tests/swfs/avm2/net_stream_play_options/test.toml b/tests/tests/swfs/avm2/net_stream_play_options/test.toml new file mode 100644 index 000000000..dbee897f5 --- /dev/null +++ b/tests/tests/swfs/avm2/net_stream_play_options/test.toml @@ -0,0 +1 @@ +num_frames = 1