diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 055d1354ec..74b981b050 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -98,7 +98,7 @@ jobs: haxelib install hxcpp --quiet haxelib install format --quiet haxelib install hxp --quiet - haxelib install lime 8.1.3 --quiet + haxelib install lime --quiet haxelib install utest --quiet - name: Setup environment diff --git a/src/openfl/display/BitmapData.hx b/src/openfl/display/BitmapData.hx index 33402bf296..41d38c0b4d 100644 --- a/src/openfl/display/BitmapData.hx +++ b/src/openfl/display/BitmapData.hx @@ -112,6 +112,10 @@ import openfl.display._internal.stats.DrawCallContext; @see `openfl.display.Graphics.beginBitmapFill()` @see `openfl.display.Graphics.lineBitmapStyle()` **/ +#if !openfl_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end @:access(lime.graphics.opengl.GL) @:access(lime.graphics.Image) @:access(lime.graphics.ImageBuffer) @@ -127,9 +131,6 @@ import openfl.display._internal.stats.DrawCallContext; @:access(openfl.geom.Matrix) @:access(openfl.geom.Point) @:access(openfl.geom.Rectangle) -#if !openfl_debug -@:fileXml('tags="haxe,release"') @:noDebug -#end @:autoBuild(openfl.utils._internal.AssetsMacro.embedBitmap()) class BitmapData implements IBitmapDrawable { @@ -618,16 +619,16 @@ class BitmapData implements IBitmapDrawable the new channel data is placed. To copy only channel data from one area to a different area in the destination image, specify a point other than - (0,0). + (0,0). @param sourceChannel The source channel. Use a value from the BitmapDataChannel class - (`BitmapDataChannel.RED`, + (`BitmapDataChannel.RED`, `BitmapDataChannel.BLUE`, `BitmapDataChannel.GREEN`, `BitmapDataChannel.ALPHA`). @param destChannel The destination channel. Use a value from the BitmapDataChannel class - (`BitmapDataChannel.RED`, + (`BitmapDataChannel.RED`, `BitmapDataChannel.BLUE`, `BitmapDataChannel.GREEN`, `BitmapDataChannel.ALPHA`). diff --git a/src/openfl/display/Graphics.hx b/src/openfl/display/Graphics.hx index de829f1141..3b672af84e 100644 --- a/src/openfl/display/Graphics.hx +++ b/src/openfl/display/Graphics.hx @@ -140,10 +140,10 @@ import js.html.CanvasRenderingContext2D; example, you can use the following matrix to rotate a bitmap by 45 degrees(pi/4 radians): - ```haxe - matrix = new openfl.geom.Matrix(); - matrix.rotate(Math.PI / 4); - ``` + ```haxe + matrix = new openfl.geom.Matrix(); + matrix.rotate(Math.PI / 4); + ``` @param repeat If `true`, the bitmap image repeats in a tiled pattern. If `false`, the bitmap image does not @@ -605,7 +605,7 @@ import js.html.CanvasRenderingContext2D; /** Draws an ellipse. Set the line style, fill, or both before you call the `drawEllipse()` method, by calling the - `linestyle()`, `lineGradientStyle()`, + `lineStyle()`, `lineGradientStyle()`, `beginFill()`, `beginGradientFill()`, or `beginBitmapFill()` method. @@ -943,7 +943,7 @@ import js.html.CanvasRenderingContext2D; /** Draws a rectangle. Set the line style, fill, or both before you call the - `drawRect()` method, by calling the `linestyle()`, + `drawRect()` method, by calling the `lineStyle()`, `lineGradientStyle()`, `beginFill()`, `beginGradientFill()`, or `beginBitmapFill()` method. @@ -956,7 +956,7 @@ import js.html.CanvasRenderingContext2D; @param height The height of the rectangle (in pixels). @throws ArgumentError If the `width` or `height` parameters are not a number - (`Number.NaN`). + (`Number.NaN`). @see [Drawing shapes using built-in methods](https://books.openfl.org/openfl-developers-guide/using-the-drawing-api/drawing-shapes-using-built-in-methods.html) **/ @@ -978,7 +978,7 @@ import js.html.CanvasRenderingContext2D; /** Draws a rounded rectangle. Set the line style, fill, or both before you call the `drawRoundRect()` method, by calling the - `linestyle()`, `lineGradientStyle()`, + `lineStyle()`, `lineGradientStyle()`, `beginFill()`, `beginGradientFill()`, or `beginBitmapFill()` method. @@ -987,7 +987,7 @@ import js.html.CanvasRenderingContext2D; object(in pixels). @param y A number indicating the vertical position relative to the registration point of the parent display object - (in pixels). + (in pixels). @param width The width of the round rectangle (in pixels). @param height The height of the round rectangle (in pixels). @param ellipseWidth The width of the ellipse used to draw the rounded @@ -1341,7 +1341,7 @@ import js.html.CanvasRenderingContext2D; @param color A hexadecimal color value of the line; for example, red is 0xFF0000, blue is 0x0000FF, and so on. If a value is not indicated, the default is 0x000000 - (black). Optional. + (black). Optional. @param alpha A number that indicates the alpha value of the color of the line; valid values are 0 to 1. If a value is not indicated, the default is 1 (solid). If the value @@ -1360,7 +1360,7 @@ import js.html.CanvasRenderingContext2D; rectangles that are identical, except that the `pixelHinting` parameter used in the `lineStyle()` method is set differently - (the images are scaled by 200%, to emphasize the + (the images are scaled by 200%, to emphasize the difference): ![pixelHinting false and pixelHinting true](/images/lineStyle_pixelHinting.jpg) @@ -1373,7 +1373,7 @@ import js.html.CanvasRenderingContext2D; * `LineScaleMode.NORMAL` - Always scale the line thickness when the object is scaled - (the default). + (the default). * `LineScaleMode.NONE` - Never scale the line thickness. * `LineScaleMode.VERTICAL` - Do not diff --git a/src/openfl/display/GraphicsStroke.hx b/src/openfl/display/GraphicsStroke.hx index 972302b0f0..64c0aa7856 100644 --- a/src/openfl/display/GraphicsStroke.hx +++ b/src/openfl/display/GraphicsStroke.hx @@ -99,24 +99,23 @@ import openfl.display._internal.GraphicsDataType; /** Specifies the stroke thickness scaling. Valid values are: - * `LineScaleMode.NORMAL` - Always scale the line thickness + * `LineScaleMode.NORMAL` - Always scale the line thickness when the object is scaled (the default). - * `LineScaleMode.NONE` - Never scale the line thickness. + * `LineScaleMode.NONE` - Never scale the line thickness. - * `LineScaleMode.VERTICAL` - Do not scale the line + * `LineScaleMode.VERTICAL` - Do not scale the line thickness if the object is scaled vertically _only_. For example, consider the following circles, drawn with a one-pixel line, and each with the `scaleMode` parameter set to `LineScaleMode.VERTICAL`. The circle on the left is scaled vertically only, and the circle on the right is scaled both vertically and horizontally: - * `LineScaleMode.HORIZONTAL` - Do not scale the line + * `LineScaleMode.HORIZONTAL` - Do not scale the line thickness if the object is scaled horizontally _only_. For example, consider the following circles, drawn with a one-pixel line, and each with - the `scaleMode` parameter set to - `LineScaleMode.HORIZONTAL`. The circle on the left is scaled - horizontally only, and the circle on the right is scaled both vertically - and horizontally: + the `scaleMode` parameter set to `LineScaleMode.HORIZONTAL`. The circle + on the left is scaled horizontally only, and the circle on the right is + scaled both vertically and horizontally: **/ public var scaleMode:LineScaleMode; @@ -147,7 +146,7 @@ import openfl.display._internal.GraphicsDataType; rounded rectangles that are identical, except that the `pixelHinting` parameter used in the `lineStyle()` method is set differently - (the images are scaled by 200%, to emphasize the + (the images are scaled by 200%, to emphasize the difference): If a value is not supplied, the line does not use @@ -157,7 +156,7 @@ import openfl.display._internal.GraphicsDataType; * `LineScaleMode.NORMAL` - Always scale the line thickness when the object is scaled - (the default). + (the default). * `LineScaleMode.NONE` - Never scale the line thickness. * `LineScaleMode.VERTICAL` - Do not diff --git a/src/openfl/display/MovieClip.hx b/src/openfl/display/MovieClip.hx index 1a98abe62f..5f970a7834 100644 --- a/src/openfl/display/MovieClip.hx +++ b/src/openfl/display/MovieClip.hx @@ -32,7 +32,7 @@ import openfl.events.MouseEvent; stop the playhead in any child MovieClip objects of that MovieClip object. - **Note:**Flash Lite 4 supports the MovieClip.opaqueBackground + **Note:** Flash Lite 4 supports the MovieClip.opaqueBackground property only if FEATURE_BITMAPCACHE is defined. The default configuration of Flash Lite 4 does not define FEATURE_BITMAPCACHE. To enable the MovieClip.opaqueBackground property for a suitable device, define diff --git a/src/openfl/display/OpenGLRenderer.hx b/src/openfl/display/OpenGLRenderer.hx index b5356bdd1c..0944075956 100644 --- a/src/openfl/display/OpenGLRenderer.hx +++ b/src/openfl/display/OpenGLRenderer.hx @@ -991,17 +991,18 @@ class OpenGLRenderer extends DisplayObjectRenderer { if (clipRect != null) { - var x = Math.floor(clipRect.x); - var y = Math.floor(clipRect.y); - var width = (clipRect.width > 0 ? Math.ceil(clipRect.right) - x : 0); - var height = (clipRect.height > 0 ? Math.ceil(clipRect.bottom) - y : 0); + var x = Math.ffloor(clipRect.x); + var y = Math.ffloor(clipRect.y); + var width = (clipRect.width > 0 ? Math.fceil(clipRect.right) - x : 0); + var height = (clipRect.height > 0 ? Math.fceil(clipRect.bottom) - y : 0); #if !openfl_dpi_aware if (__context3D.__backBufferWantsBestResolution) { - x = Math.floor(clipRect.x / __pixelRatio); - y = Math.floor(clipRect.y / __pixelRatio); - width = (clipRect.width > 0 ? Math.ceil(clipRect.right / __pixelRatio) - x : 0); - height = (clipRect.height > 0 ? Math.ceil(clipRect.bottom / __pixelRatio) - y : 0); + var uv = 1.5 / __pixelRatio; + x = clipRect.x / __pixelRatio; + y = clipRect.y / __pixelRatio; + width = (clipRect.width > 0 ? (clipRect.right / __pixelRatio) - x + uv : 0); + height = (clipRect.height > 0 ? (clipRect.bottom / __pixelRatio) - y + uv : 0); } #end diff --git a/src/openfl/display/Stage.hx b/src/openfl/display/Stage.hx index 9fcb872139..b14eefbe28 100644 --- a/src/openfl/display/Stage.hx +++ b/src/openfl/display/Stage.hx @@ -2162,7 +2162,11 @@ class Stage extends DisplayObjectContainer #if lime implements IModule #end Telemetry.__endTiming(TelemetryCommandName.RENDER); Telemetry.__rewindStack(stack); #end - + + #if HXCPP_TRACY + cpp.vm.tracy.TracyProfiler.frameMark(); + #end + return cancelled; } diff --git a/src/openfl/display/_internal/CairoGraphics.hx b/src/openfl/display/_internal/CairoGraphics.hx index 2cea6f5289..754ec5c06d 100644 --- a/src/openfl/display/_internal/CairoGraphics.hx +++ b/src/openfl/display/_internal/CairoGraphics.hx @@ -136,7 +136,7 @@ class CairoGraphics ratio = ratios[i] / 0xFF; if (ratio < 0) ratio = 0; - if (ratio > 1) ratio = 1; + else if (ratio > 1) ratio = 1; pattern.addColorStopRGBA(ratio, r, g, b, alpha); } @@ -533,11 +533,17 @@ class CairoGraphics c.anchorY - offsetY); + positionX = c.anchorX; + positionY = c.anchorY; + case CURVE_TO: var c = data.readCurveTo(); hasPath = true; quadraticCurveTo(c.controlX - offsetX, c.controlY - offsetY, c.anchorX - offsetX, c.anchorY - offsetY); + positionX = c.anchorX; + positionY = c.anchorY; + case DRAW_CIRCLE: var c = data.readDrawCircle(); hasPath = true; diff --git a/src/openfl/display/_internal/CanvasGraphics.hx b/src/openfl/display/_internal/CanvasGraphics.hx index da91375fed..e54a458be8 100644 --- a/src/openfl/display/_internal/CanvasGraphics.hx +++ b/src/openfl/display/_internal/CanvasGraphics.hx @@ -137,34 +137,53 @@ class CanvasGraphics { ratio = ratios[i] / 0xFF; if (ratio < 0) ratio = 0; - if (ratio > 1) ratio = 1; + else if (ratio > 1) ratio = 1; gradientFill.addColorStop(ratio, getRGBA(colors[i], alphas[i])); } - case LINEAR: - var gradientScale:Float = spreadMethod == PAD ? 1.0 : 25.0; - var dx = 0.5 * (gradientScale - 1.0) * 1638.4; - var canvas:CanvasElement = cast Browser.document.createElement("canvas"); - var context2 = canvas.getContext("2d"); + if (point != null) Point.__pool.release(point); + if (point2 != null) Point.__pool.release(point2); + if (releaseMatrix) Matrix.__pool.release(matrix); - var dimensions:Dynamic = getDimensions(matrix); + return cast(gradientFill); - canvas.width = context.canvas.width; - canvas.height = context.canvas.height; - gradientFill = context.createLinearGradient(-819.2 - dx, 0, 819.2 + dx, 0); + case LINEAR: if (spreadMethod == PAD) { + gradientFill = context.createLinearGradient(-819.2, 0, 819.2, 0); + + pendingMatrix = matrix.clone(); + inversePendingMatrix = matrix.clone(); + inversePendingMatrix.invert(); + for (i in 0...colors.length) { ratio = ratios[i] / 0xFF; if (ratio < 0) ratio = 0; - if (ratio > 1) ratio = 1; + else if (ratio > 1) ratio = 1; gradientFill.addColorStop(ratio, getRGBA(colors[i], alphas[i])); } + + if (point != null) Point.__pool.release(point); + if (point2 != null) Point.__pool.release(point2); + if (releaseMatrix) Matrix.__pool.release(matrix); + + return cast(gradientFill); } - else if (spreadMethod == REFLECT) + + var gradientScale:Float = spreadMethod == PAD ? 1.0 : 25.0; + var dx = 0.5 * (gradientScale - 1.0) * 1638.4; + var canvas:CanvasElement = cast Browser.document.createElement("canvas"); + var context2 = canvas.getContext("2d"); + + var dimensions:Dynamic = getDimensions(matrix); + + canvas.width = context.canvas.width; + canvas.height = context.canvas.height; + gradientFill = context.createLinearGradient(-819.2 - dx, 0, 819.2 + dx, 0); + if (spreadMethod == REFLECT) { var t:Float = 0; var step:Float = 1 / 25; @@ -176,7 +195,7 @@ class CanvasGraphics ratio = ratios[i] / 0xFF; ratio = t + ratio * step; if (ratio < 0) ratio = 0; - if (ratio > 1) ratio = 1; + else if (ratio > 1) ratio = 1; gradientFill.addColorStop(ratio, getRGBA(colors[i], alphas[i])); } @@ -187,7 +206,7 @@ class CanvasGraphics ratio = ratios[a] / 0xFF; ratio = t + (1.0 - ratio) * step; if (ratio < 0) ratio = 0; - if (ratio > 1) ratio = 1; + else if (ratio > 1) ratio = 1; gradientFill.addColorStop(ratio, getRGBA(colors[a], alphas[a])); a--; } @@ -206,14 +225,14 @@ class CanvasGraphics ratio = ratios[i] / 0xFF; ratio = t + ratio * step; if (ratio < 0) ratio = 0; - if (ratio > 1) ratio = 1 - 0.001; + else if (ratio > 1) ratio = 1 - 0.001; gradientFill.addColorStop(ratio, getRGBA(colors[i], alphas[i])); } ratio = t + 0.001; if (ratio < 0) ratio = 0; - if (ratio > 1) ratio = 1; + else if (ratio > 1) ratio = 1; gradientFill.addColorStop(ratio - 0.001, getRGBA(colors[colors.length - 1], alphas[alphas.length - 1])); gradientFill.addColorStop(ratio, getRGBA(colors[0], alphas[0])); @@ -686,11 +705,17 @@ class CanvasGraphics c.anchorY - offsetY); + positionX = c.anchorX; + positionY = c.anchorY; + case CURVE_TO: var c = data.readCurveTo(); hasPath = true; context.quadraticCurveTo(c.controlX - offsetX, c.controlY - offsetY, c.anchorX - offsetX, c.anchorY - offsetY); + positionX = c.anchorX; + positionY = c.anchorY; + case DRAW_CIRCLE: var c = data.readDrawCircle(); hasPath = true; diff --git a/src/openfl/media/Sound.hx b/src/openfl/media/Sound.hx index 69a861f422..a88178788f 100644 --- a/src/openfl/media/Sound.hx +++ b/src/openfl/media/Sound.hx @@ -196,9 +196,7 @@ class Sound extends EventDispatcher these security limitations. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). **/ public var id3(get, never):ID3Info; diff --git a/src/openfl/media/SoundLoaderContext.hx b/src/openfl/media/SoundLoaderContext.hx index 5d7a47f980..619c1bff12 100644 --- a/src/openfl/media/SoundLoaderContext.hx +++ b/src/openfl/media/SoundLoaderContext.hx @@ -129,9 +129,7 @@ class SoundLoaderContext content, regardless of its origin. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). **/ public var checkPolicyFile:Bool; diff --git a/src/openfl/media/SoundMixer.hx b/src/openfl/media/SoundMixer.hx index 1a8eeba2f6..945d5774ad 100644 --- a/src/openfl/media/SoundMixer.hx +++ b/src/openfl/media/SoundMixer.hx @@ -163,9 +163,7 @@ package openfl.media; these security limitations. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). **/ public static function stopAll():Void diff --git a/src/openfl/net/FileReference.hx b/src/openfl/net/FileReference.hx index aa11ef40dc..bb98d99c4a 100644 --- a/src/openfl/net/FileReference.hx +++ b/src/openfl/net/FileReference.hx @@ -722,9 +722,7 @@ class FileReference extends EventDispatcher these security limitations. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). When you download a file using this method, it is flagged as downloaded on operating systems that flag downloaded files: @@ -1200,9 +1198,7 @@ class FileReference extends EventDispatcher these security limitations. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). Note that because of new functionality added to the Flash Player, when publishing to Flash Player 10, you can have only one of the following diff --git a/src/openfl/net/NetConnection.hx b/src/openfl/net/NetConnection.hx index e7912b922f..ea8e869a3b 100644 --- a/src/openfl/net/NetConnection.hx +++ b/src/openfl/net/NetConnection.hx @@ -448,8 +448,7 @@ class NetConnection extends EventDispatcher these security limitations. For more information about security, see the Adobe Flash Player - Developer Center: Security. + Developer Center: [Security](http://www.adobe.com/go/devnet_security_en). @param command Use one of the following values for the `command` parameter: diff --git a/src/openfl/net/NetStream.hx b/src/openfl/net/NetStream.hx index 07286eeb94..b611bcb9e7 100644 --- a/src/openfl/net/NetStream.hx +++ b/src/openfl/net/NetStream.hx @@ -25,7 +25,7 @@ import js.Browser; * Call `NetStream.appendBytes()` to pass ByteArray data into the NetStream. - **Note:**You cannot play and publish a stream over the same NetStream + **Note:** You cannot play and publish a stream over the same NetStream object. Adobe AIR and Flash Player 9.0.115.0 and later versions support files @@ -509,8 +509,7 @@ import js.Browser; **/ @:access(openfl.media.SoundMixer) #if !openfl_debug -@:fileXml('tags="haxe,release"') -@:noDebug +@:fileXml('tags="haxe,release"') @:noDebug #end class NetStream extends EventDispatcher { @@ -781,9 +780,7 @@ class NetStream extends EventDispatcher For more information on policy files, see "Website controls (policy files)" in the _OpenFL Developer's Guide_ and the Flash - Player Developer Center Topic: Security. + Player Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). **/ public var checkPolicyFile:Bool; @@ -1553,7 +1550,7 @@ class NetStream extends EventDispatcher To play a recorded file, pass the file name. 6. Call `addChild()` and pass the Video object to display the video. - **Note:**To see sample code, scroll to the example at the bottom of + **Note:** To see sample code, scroll to the example at the bottom of this page. **Enable Data Generation Mode** @@ -1580,8 +1577,7 @@ class NetStream extends EventDispatcher setting the `allowNetworking` parameter of the the `object` and `embed` tags in the HTML page that contains the SWF content. For more information related to security, see the Flash Player Developer Center - Topic: Security. + Topic: [Security](http://www.adobe.com/go/devnet_security_en). @throws ArgumentError At least one parameter must be specified. @throws Error The NetStream Object is invalid. This may be due @@ -1676,7 +1672,7 @@ class NetStream extends EventDispatcher href="http://www.adobe.com/go/fms_tools" scope="external">www.adobe.com/go/fms_tools. - **Note:**Do not use this method to play a stream. To play a stream, + **Note:** Do not use this method to play a stream. To play a stream, call the `NetStream.play()` method. Workflow for publishing a stream diff --git a/src/openfl/net/SharedObject.hx b/src/openfl/net/SharedObject.hx index 434cff131d..ec372ed5e0 100644 --- a/src/openfl/net/SharedObject.hx +++ b/src/openfl/net/SharedObject.hx @@ -430,16 +430,16 @@ class SharedObject extends EventDispatcher allotted for this object. @return Either of the following values: - * `SharedObjectFlushStatus.PENDING`: The user has - permitted local information storage for objects from this domain, - but the amount of space allotted is not sufficient to store the - object. Flash Player prompts the user to allow more space. To - allow space for the shared object to grow when it is saved, thus - avoiding a `SharedObjectFlushStatus.PENDING` return - value, pass a value for `minDiskSpace`. - * `SharedObjectFlushStatus.FLUSHED`: The shared - object has been successfully written to a file on the local - disk. + * `SharedObjectFlushStatus.PENDING`: The user has permitted + local information storage for objects from this domain, but the + amount of space allotted is not sufficient to store the object. + Flash Player prompts the user to allow more space. To allow + space for the shared object to grow when it is saved, thus + avoiding a `SharedObjectFlushStatus.PENDING` return + value, pass a value for `minDiskSpace`. + + * `SharedObjectFlushStatus.FLUSHED`: The shared object has been + successfully written to a file on the local disk. @throws Error Flash Player cannot write the shared object to disk. This error might occur if the user has permanently disallowed @@ -848,9 +848,8 @@ class SharedObject extends EventDispatcher the server that the value of the property has changed. The `setProperty()` method explicitly marks properties as changed, or dirty. - For more information about remote shared objects see the Flash Media Server - documentation. + For more information about remote shared objects see the + [Flash Media Server documentation](http://www.adobe.com/go/learn_fms_docs_en). **Note:** The `SharedObject.setProperty()` method implements the `setDirty()` method. In most cases, such as when the value of a diff --git a/src/openfl/net/Socket.hx b/src/openfl/net/Socket.hx index 97a41aa8c8..5df67ef4ee 100644 --- a/src/openfl/net/Socket.hx +++ b/src/openfl/net/Socket.hx @@ -95,8 +95,7 @@ import sys.net.Socket as SysSocket; application security sandbox. For more information related to security, see the Flash Player Developer - Center Topic: Security + Center Topic: [Security](http://www.adobe.com/go/devnet_security_en).s @event close Dispatched when the server closes the socket connection. @@ -287,9 +286,7 @@ class Socket extends EventDispatcher implements IDataInput implements IDataOutpu more information on policy files, see "Website controls (policy files)" in the _OpenFL Developer's Guide_ and the Flash Player Developer - Center Topic: Security. + Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). **/ public function new(host:String = null, port:Int = 0) { @@ -370,9 +367,7 @@ class Socket extends EventDispatcher implements IDataInput implements IDataOutpu more information on policy files, see "Website controls (policy files)" in the _OpenFL Developer's Guide_ and the Flash Player Developer - Center Topic: Security. + Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). **/ public function connect(host:String, port:Int):Void { diff --git a/src/openfl/net/URLStream.hx b/src/openfl/net/URLStream.hx index c3acbb7576..5cae4ec368 100644 --- a/src/openfl/net/URLStream.hx +++ b/src/openfl/net/URLStream.hx @@ -194,9 +194,7 @@ class URLStream extends EventDispatcher implements IDataInput security limitations. For more information related to security, see The Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). In AIR, a URLRequest object can register for the `httpResponse` status event. Unlike the `httpStatus` event, the `httpResponseStatus` event diff --git a/src/openfl/net/XMLSocket.hx b/src/openfl/net/XMLSocket.hx index 737c321412..b8492fd47e 100644 --- a/src/openfl/net/XMLSocket.hx +++ b/src/openfl/net/XMLSocket.hx @@ -66,8 +66,7 @@ import openfl.utils.ByteArray; security limitations. For more information related to security, see the Flash Player Developer - Center Topic: Security. + Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). @event close Dispatched when the server closes the socket connection. The `close` event is dispatched only when @@ -179,9 +178,7 @@ class XMLSocket extends EventDispatcher `allowNetworking` parameter of the the `object` and `embed` tags in the HTML page that contains the SWF content. - For more information, see the Flash Player Developer Center Topic: Security. + For more information, see the Flash Player Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). @param host A fully qualified DNS domain name or an IP address in the form _111.222.333.444_. You can also specify `null` to diff --git a/src/openfl/system/Security.hx b/src/openfl/system/Security.hx index 70cbff0f15..4410ff304b 100644 --- a/src/openfl/system/Security.hx +++ b/src/openfl/system/Security.hx @@ -135,9 +135,7 @@ class Security content and data from any domain. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). **/ public static var sandboxType(default, null):String; @@ -311,9 +309,7 @@ class Security It is usually safer to use the `_url` property. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). @throws SecurityError Calling this method from code in the AIR application security sandbox throws a @@ -362,9 +358,7 @@ class Security with security architecture and should be used for background information only. The Flash Player Developer Center contains extensive information on Flash Player and security. For more information, see - the Flash Player Developer Center Topic Security. + the Flash Player Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). Suppose you are building an e-commerce site that consists of two components: a catalog, which does not need to be secure, because it @@ -464,9 +458,7 @@ class Security sure to consider the consequences carefully before doing so. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). @throws SecurityError Calling this method from code in the AIR application security sandbox causes a @@ -567,9 +559,7 @@ class Security HTML page that contains the SWF content. For more information related to security, see the Flash Player - Developer Center Topic: Security. + Developer Center Topic: [Security](http://www.adobe.com/go/devnet_security_en). @param url The URL location of the policy file to be loaded. **/ diff --git a/tests/bitmapdata/src/BitmapDataFileIOTest.hx b/tests/bitmapdata/src/BitmapDataFileIOTest.hx index 83cb7c4794..dd04d0a918 100644 --- a/tests/bitmapdata/src/BitmapDataFileIOTest.hx +++ b/tests/bitmapdata/src/BitmapDataFileIOTest.hx @@ -12,6 +12,7 @@ class BitmapDataFileIOTest extends Test #if flash @Ignored #end + @:timeout(1000) public function test_BitmapData_fromBase64(async:Async) { ByteArray.loadFromFile("openfl-base64.txt").onComplete(function(logoBytes) diff --git a/tests/filesystem/src/FileStreamTest.hx b/tests/filesystem/src/FileStreamTest.hx index 0c5c662ed8..81dd6b8528 100644 --- a/tests/filesystem/src/FileStreamTest.hx +++ b/tests/filesystem/src/FileStreamTest.hx @@ -73,7 +73,7 @@ class FileStreamTest extends Test Assert.equals("this is a text file", contentsRead); } - @:timeout(1000) + @:timeout(2000) public function test_readText_async(async:Async) { var file = assetsDirectory.resolvePath("asset.txt"); diff --git a/tests/filesystem/src/FileTest.hx b/tests/filesystem/src/FileTest.hx index 7c87cd8b54..6bbc25e6fa 100644 --- a/tests/filesystem/src/FileTest.hx +++ b/tests/filesystem/src/FileTest.hx @@ -151,7 +151,7 @@ class FileTest extends Test Assert.isFalse(directoryToDelete.isDirectory); } - @:timeout(1000) + @:timeout(2000) public function test_deleteDirectoryAsync(async:Async) { var directoryToDelete = writableDirectory.resolvePath("deleteDirectoryAsync-test"); @@ -189,7 +189,7 @@ class FileTest extends Test Assert.isFalse(fileToDelete.exists); } - @:timeout(1000) + @:timeout(2000) public function test_deleteFileAsync(async:Async) { var sourceFile = assetsDirectory.resolvePath("asset.txt"); @@ -223,7 +223,7 @@ class FileTest extends Test Assert.notNull(assetFile); } - @:timeout(1000) + @:timeout(2000) public function test_getDirectoryListingAsync(async:Async) { Assert.isTrue(assetsDirectory.exists); @@ -267,7 +267,7 @@ class FileTest extends Test Assert.equals("this is a text file", contentsRead); } - @:timeout(1000) + @:timeout(2000) public function test_copyToAsync(async:Async) { var sourceFile = assetsDirectory.resolvePath("asset.txt"); @@ -321,7 +321,7 @@ class FileTest extends Test Assert.equals(contents, contentsRead); } - @:timeout(1000) + @:timeout(2000) public function test_moveToAsync(async:Async) { var sourceFile = writableDirectory.resolvePath("sourceFile.txt");