Browse Source

back to flash9 with type fixes

Nicolas Cannasse 14 years ago
parent
commit
3e82d4b399
100 changed files with 170 additions and 290 deletions
  1. 1 1
      std/flash9/accessibility/Accessibility.hx
  2. 1 1
      std/flash9/display/AVM1Movie.hx
  3. 1 1
      std/flash9/display/Bitmap.hx
  4. 10 17
      std/flash9/display/BitmapData.hx
  5. 0 3
      std/flash9/display/BlendMode.hx
  6. 1 14
      std/flash9/display/DisplayObject.hx
  7. 1 1
      std/flash9/display/FrameLabel.hx
  8. 6 15
      std/flash9/display/Graphics.hx
  9. 0 4
      std/flash9/display/Loader.hx
  10. 1 3
      std/flash9/display/LoaderInfo.hx
  11. 2 5
      std/flash9/display/MovieClip.hx
  12. 1 1
      std/flash9/display/Scene.hx
  13. 1 1
      std/flash9/display/Sprite.hx
  14. 4 11
      std/flash9/display/Stage.hx
  15. 1 0
      std/flash9/errors/EOFError.hx
  16. 3 3
      std/flash9/errors/Error.hx
  17. 1 0
      std/flash9/errors/IOError.hx
  18. 1 0
      std/flash9/errors/IllegalOperationError.hx
  19. 1 0
      std/flash9/errors/InvalidSWFError.hx
  20. 1 0
      std/flash9/errors/MemoryError.hx
  21. 1 0
      std/flash9/errors/ScriptTimeoutError.hx
  22. 1 0
      std/flash9/errors/StackOverflowError.hx
  23. 1 1
      std/flash9/events/ActivityEvent.hx
  24. 1 1
      std/flash9/events/AsyncErrorEvent.hx
  25. 1 1
      std/flash9/events/ContextMenuEvent.hx
  26. 1 1
      std/flash9/events/DataEvent.hx
  27. 1 1
      std/flash9/events/ErrorEvent.hx
  28. 5 23
      std/flash9/events/Event.hx
  29. 3 3
      std/flash9/events/EventDispatcher.hx
  30. 1 1
      std/flash9/events/FocusEvent.hx
  31. 1 1
      std/flash9/events/FullScreenEvent.hx
  32. 1 1
      std/flash9/events/HTTPStatusEvent.hx
  33. 2 2
      std/flash9/events/IEventDispatcher.hx
  34. 1 1
      std/flash9/events/IMEEvent.hx
  35. 1 1
      std/flash9/events/IOErrorEvent.hx
  36. 1 1
      std/flash9/events/KeyboardEvent.hx
  37. 1 1
      std/flash9/events/MouseEvent.hx
  38. 1 1
      std/flash9/events/NetFilterEvent.hx
  39. 1 1
      std/flash9/events/NetStatusEvent.hx
  40. 1 1
      std/flash9/events/ProgressEvent.hx
  41. 1 1
      std/flash9/events/SecurityErrorEvent.hx
  42. 1 1
      std/flash9/events/StatusEvent.hx
  43. 1 1
      std/flash9/events/SyncEvent.hx
  44. 1 1
      std/flash9/events/TextEvent.hx
  45. 1 1
      std/flash9/events/TimerEvent.hx
  46. 2 4
      std/flash9/external/ExternalInterface.hx
  47. 2 2
      std/flash9/filters/BevelFilter.hx
  48. 3 3
      std/flash9/filters/BitmapFilterQuality.hx
  49. 2 2
      std/flash9/filters/BlurFilter.hx
  50. 1 1
      std/flash9/filters/ColorMatrixFilter.hx
  51. 3 3
      std/flash9/filters/ConvolutionFilter.hx
  52. 2 2
      std/flash9/filters/DisplacementMapFilter.hx
  53. 2 2
      std/flash9/filters/DropShadowFilter.hx
  54. 2 2
      std/flash9/filters/GlowFilter.hx
  55. 2 2
      std/flash9/filters/GradientBevelFilter.hx
  56. 2 2
      std/flash9/filters/GradientGlowFilter.hx
  57. 1 1
      std/flash9/geom/ColorTransform.hx
  58. 3 3
      std/flash9/geom/Matrix.hx
  59. 1 1
      std/flash9/geom/Point.hx
  60. 1 1
      std/flash9/geom/Rectangle.hx
  61. 0 5
      std/flash9/geom/Transform.hx
  62. 4 4
      std/flash9/media/Camera.hx
  63. 1 1
      std/flash9/media/ID3Info.hx
  64. 4 10
      std/flash9/media/Microphone.hx
  65. 1 4
      std/flash9/media/Sound.hx
  66. 1 1
      std/flash9/media/SoundChannel.hx
  67. 1 1
      std/flash9/media/SoundLoaderContext.hx
  68. 1 1
      std/flash9/media/SoundMixer.hx
  69. 2 2
      std/flash9/media/SoundTransform.hx
  70. 1 1
      std/flash9/media/Video.hx
  71. 1 1
      std/flash9/net/FileFilter.hx
  72. 2 7
      std/flash9/net/FileReference.hx
  73. 2 2
      std/flash9/net/FileReferenceList.hx
  74. 3 3
      std/flash9/net/LocalConnection.hx
  75. 3 13
      std/flash9/net/NetConnection.hx
  76. 4 25
      std/flash9/net/NetStream.hx
  77. 1 1
      std/flash9/net/Responder.hx
  78. 4 4
      std/flash9/net/SharedObject.hx
  79. 4 7
      std/flash9/net/Socket.hx
  80. 1 2
      std/flash9/net/URLRequest.hx
  81. 1 1
      std/flash9/net/URLRequestHeader.hx
  82. 1 1
      std/flash9/net/URLStream.hx
  83. 1 1
      std/flash9/net/XMLSocket.hx
  84. 1 1
      std/flash9/printing/PrintJob.hx
  85. 1 1
      std/flash9/printing/PrintJobOptions.hx
  86. 1 1
      std/flash9/sampler/DeleteObjectSample.hx
  87. 1 1
      std/flash9/sampler/NewObjectSample.hx
  88. 2 2
      std/flash9/sampler/StackFrame.hx
  89. 1 5
      std/flash9/system/ApplicationDomain.hx
  90. 0 3
      std/flash9/system/Capabilities.hx
  91. 1 1
      std/flash9/system/IME.hx
  92. 1 1
      std/flash9/system/LoaderContext.hx
  93. 2 2
      std/flash9/system/Security.hx
  94. 1 1
      std/flash9/text/CSMSettings.hx
  95. 1 1
      std/flash9/text/Font.hx
  96. 1 1
      std/flash9/text/StaticText.hx
  97. 1 1
      std/flash9/text/StyleSheet.hx
  98. 7 5
      std/flash9/text/TextField.hx
  99. 1 1
      std/flash9/text/TextFormat.hx
  100. 4 4
      std/flash9/text/TextSnapshot.hx

+ 1 - 1
std/flash9/accessibility/Accessibility.hx

@@ -2,6 +2,6 @@ package flash.accessibility;
 
 extern class Accessibility {
 	static var active(default,null) : Bool;
-	static function sendEvent(source : flash.display.DisplayObject, childID : UInt, eventType : UInt, ?nonHTML : Bool) : Void;
+	static function sendEvent(source : flash.display.DisplayObject, childID : UInt, eventType : UInt, nonHTML : Bool = false) : Void;
 	static function updateProperties() : Void;
 }

+ 1 - 1
std/flash9/display/AVM1Movie.hx

@@ -3,5 +3,5 @@ package flash.display;
 extern class AVM1Movie extends DisplayObject {
 	function new() : Void;
 	function addCallback(functionName : String, closure : Dynamic) : Void;
-	function call(functionName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Dynamic;
+	function call(functionName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Dynamic;
 }

+ 1 - 1
std/flash9/display/Bitmap.hx

@@ -4,5 +4,5 @@ extern class Bitmap extends DisplayObject {
 	var bitmapData : BitmapData;
 	var pixelSnapping : PixelSnapping;
 	var smoothing : Bool;
-	function new(?bitmapData : BitmapData, ?pixelSnapping : PixelSnapping, ?smoothing : Bool) : Void;
+	function new(?bitmapData : BitmapData, ?pixelSnapping : PixelSnapping, smoothing : Bool = false) : Void;
 }

+ 10 - 17
std/flash9/display/BitmapData.hx

@@ -5,40 +5,33 @@ extern class BitmapData implements IBitmapDrawable {
 	var rect(default,null) : flash.geom.Rectangle;
 	var transparent(default,null) : Bool;
 	var width(default,null) : Int;
-	function new(width : Int, height : Int, ?transparent : Bool, ?fillColor : UInt) : Void;
+	function new(width : Int, height : Int, transparent : Bool = true, fillColor : UInt = 0xFFFFFFFF) : Void;
 	function applyFilter(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, filter : flash.filters.BitmapFilter) : Void;
 	function clone() : BitmapData;
 	function colorTransform(rect : flash.geom.Rectangle, colorTransform : flash.geom.ColorTransform) : Void;
 	function compare(otherBitmapData : BitmapData) : Dynamic;
-	function copyChannel(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, sourceChannel : Int, destChannel : Int) : Void;
-	function copyPixels(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, ?alphaBitmapData : BitmapData, ?alphaPoint : flash.geom.Point, ?mergeAlpha : Bool) : Void;
+	function copyChannel(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, sourceChannel : UInt, destChannel : UInt) : Void;
+	function copyPixels(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, ?alphaBitmapData : BitmapData, ?alphaPoint : flash.geom.Point, mergeAlpha : Bool = false) : Void;
 	function dispose() : Void;
-	function draw(source : IBitmapDrawable, ?matrix : flash.geom.Matrix, ?colorTransform : flash.geom.ColorTransform, ?blendMode : BlendMode, ?clipRect : flash.geom.Rectangle, ?smoothing : Bool) : Void;
+	function draw(source : IBitmapDrawable, ?matrix : flash.geom.Matrix, ?colorTransform : flash.geom.ColorTransform, ?blendMode : BlendMode, ?clipRect : flash.geom.Rectangle, smoothing : Bool = false) : Void;
 	function fillRect(rect : flash.geom.Rectangle, color : UInt) : Void;
 	function floodFill(x : Int, y : Int, color : UInt) : Void;
 	function generateFilterRect(sourceRect : flash.geom.Rectangle, filter : flash.filters.BitmapFilter) : flash.geom.Rectangle;
-	function getColorBoundsRect(mask : UInt, color : UInt, ?findColor : Bool) : flash.geom.Rectangle;
+	function getColorBoundsRect(mask : UInt, color : UInt, findColor : Bool = true) : flash.geom.Rectangle;
 	function getPixel(x : Int, y : Int) : UInt;
 	function getPixel32(x : Int, y : Int) : UInt;
 	function getPixels(rect : flash.geom.Rectangle) : flash.utils.ByteArray;
-	function hitTest(firstPoint : flash.geom.Point, firstAlphaThreshold : UInt, secondObject : Dynamic, ?secondBitmapDataPoint : flash.geom.Point, ?secondAlphaThreshold : UInt) : Bool;
+	function hitTest(firstPoint : flash.geom.Point, firstAlphaThreshold : UInt, secondObject : Dynamic, ?secondBitmapDataPoint : flash.geom.Point, secondAlphaThreshold : UInt = 1) : Bool;
 	function lock() : Void;
 	function merge(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, redMultiplier : UInt, greenMultiplier : UInt, blueMultiplier : UInt, alphaMultiplier : UInt) : Void;
-	function noise(randomSeed : Int, ?low : UInt, ?high : UInt, ?channelOptions : UInt, ?grayScale : Bool) : Void;
+	function noise(randomSeed : Int, low : UInt = 0, high : UInt = 255, channelOptions : UInt = 7, grayScale : Bool = false) : Void;
 	function paletteMap(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, ?redArray : Array<Int>, ?greenArray : Array<Int>, ?blueArray : Array<Int>, ?alphaArray : Array<Int>) : Void;
-	function perlinNoise(baseX : Float, baseY : Float, numOctaves : UInt, randomSeed : Int, stitch : Bool, fractalNoise : Bool, ?channelOptions : UInt, ?grayScale : Bool, ?offsets : Array<flash.geom.Point>) : Void;
-	function pixelDissolve(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, ?randomSeed : Int, ?numPixels : Int, ?fillColor : UInt) : Int;
+	function perlinNoise(baseX : Float, baseY : Float, numOctaves : UInt, randomSeed : Int, stitch : Bool, fractalNoise : Bool, channelOptions : UInt = 7, grayScale : Bool = false, ?offsets : Array<flash.geom.Point>) : Void;
+	function pixelDissolve(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, randomSeed : Int = 0, numPixels : Int = 0, fillColor : UInt = 0) : Int;
 	function scroll(x : Int, y : Int) : Void;
 	function setPixel(x : Int, y : Int, color : UInt) : Void;
 	function setPixel32(x : Int, y : Int, color : UInt) : Void;
 	function setPixels(rect : flash.geom.Rectangle, inputByteArray : flash.utils.ByteArray) : Void;
-	function threshold(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, operation : String, threshold : UInt, ?color : UInt, ?mask : UInt, ?copySource : Bool) : UInt;
+	function threshold(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, operation : String, threshold : UInt, color : UInt = 0, mask : UInt = 0xFFFFFFFF, copySource : Bool = false) : UInt;
 	function unlock(?changeRect : flash.geom.Rectangle) : Void;
-
-	#if flash10
-	function setVector( rect : flash.geom.Rectangle, inputVector : flash.Vector<UInt> ) : Void;
-	function getVector( rect : flash.geom.Rectangle ) : flash.Vector<UInt>;
-	function histogram( ?hRect : flash.geom.Rectangle ) : flash.Vector<flash.Vector<Float>>;
-	#end
-
 }

+ 0 - 3
std/flash9/display/BlendMode.hx

@@ -15,7 +15,4 @@ extern enum BlendMode {
 	OVERLAY;
 	SCREEN;
 	SUBTRACT;
-	#if flash10
-	SHADER;
-	#end
 }

+ 1 - 14
std/flash9/display/DisplayObject.hx

@@ -26,23 +26,10 @@ extern class DisplayObject extends flash.events.EventDispatcher, implements IBit
 	var width : Float;
 	var x : Float;
 	var y : Float;
-
 	function getBounds(targetCoordinateSpace : DisplayObject) : flash.geom.Rectangle;
 	function getRect(targetCoordinateSpace : DisplayObject) : flash.geom.Rectangle;
 	function globalToLocal(point : flash.geom.Point) : flash.geom.Point;
 	function hitTestObject(obj : DisplayObject) : Bool;
-	function hitTestPoint(x : Float, y : Float, ?shapeFlag : Bool = false) : Bool;
+	function hitTestPoint(x : Float, y : Float, shapeFlag : Bool = false) : Bool;
 	function localToGlobal(point : flash.geom.Point) : flash.geom.Point;
-
-	#if flash10
-	var rotationX : Float;
-	var rotationY : Float;
-	var rotationZ : Float;
-	var scaleZ : Float;
-	var z : Float;
-	var blendShader(null,default) : Shader;
-
-	function globalToLocal3D( point : flash.geom.Point) : flash.geom.Vector3D;
-	function local3DToGlobal( point3d : flash.geom.Vector3D ) : flash.geom.Point;
-	#end
 }

+ 1 - 1
std/flash9/display/FrameLabel.hx

@@ -1,6 +1,6 @@
 package flash.display;
 
-extern class FrameLabel {
+@:final extern class FrameLabel {
 	var frame(default,null) : Int;
 	var name(default,null) : String;
 	function new(name : String, frame : Int) : Void;

+ 6 - 15
std/flash9/display/Graphics.hx

@@ -1,10 +1,10 @@
 package flash.display;
 
-extern class Graphics {
+@:final extern class Graphics {
 	function new() : Void;
-	function beginBitmapFill(bitmap : BitmapData, ?matrix : flash.geom.Matrix, ?repeat : Bool, ?smooth : Bool) : Void;
-	function beginFill(color : UInt, ?alpha : Float) : Void;
-	function beginGradientFill(type : GradientType, colors : Array<UInt>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, ?matrix : flash.geom.Matrix, ?spreadMethod : SpreadMethod, ?interpolationMethod : InterpolationMethod, ?focalPointRatio : Float) : Void;
+	function beginBitmapFill(bitmap : BitmapData, ?matrix : flash.geom.Matrix, repeat : Bool = true, smooth : Bool = false) : Void;
+	function beginFill(color : UInt, alpha : Float = 1) : Void;
+	function beginGradientFill(type : GradientType, colors : Array<UInt>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, ?matrix : flash.geom.Matrix, ?spreadMethod : SpreadMethod, ?interpolationMethod : InterpolationMethod, focalPointRatio : Float = 0) : Void;
 	function clear() : Void;
 	function curveTo(controlX : Float, controlY : Float, anchorX : Float, anchorY : Float) : Void;
 	function drawCircle(x : Float, y : Float, radius : Float) : Void;
@@ -13,17 +13,8 @@ extern class Graphics {
 	function drawRoundRect(x : Float, y : Float, width : Float, height : Float, ellipseWidth : Float, ?ellipseHeight : Float) : Void;
 	function drawRoundRectComplex(x : Float, y : Float, width : Float, height : Float, topLeftRadius : Float, topRightRadius : Float, bottomLeftRadius : Float, bottomRightRadius : Float) : Void;
 	function endFill() : Void;
-	function lineGradientStyle(type : GradientType, colors : Array<UInt>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, ?matrix : flash.geom.Matrix, ?spreadMethod : SpreadMethod, ?interpolationMethod : InterpolationMethod, ?focalPointRatio : Float) : Void;
-	function lineStyle(?thickness : Float, ?color : UInt, ?alpha : Float, ?pixelHinting : Bool, ?scaleMode : LineScaleMode, ?caps : CapsStyle, ?joints : JointStyle, ?miterLimit : Float) : Void;
+	function lineGradientStyle(type : GradientType, colors : Array<UInt>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, ?matrix : flash.geom.Matrix, ?spreadMethod : SpreadMethod, ?interpolationMethod : InterpolationMethod, focalPointRatio : Float = 0) : Void;
+	function lineStyle(?thickness : Float, color : UInt = 0, alpha : Float = 1, pixelHinting : Bool = false, ?scaleMode : LineScaleMode, ?caps : CapsStyle, ?joints : JointStyle, miterLimit : Float = 3) : Void;
 	function lineTo(x : Float, y : Float) : Void;
 	function moveTo(x : Float, y : Float) : Void;
-
-	#if flash10
-	function beginShaderFill( ?shader : Shader, ?matrix : flash.geom.Matrix ) : Void;
-	function copyFrom( sourceGraphics : Graphics ) : Void;
-	function drawGraphicsData( graphicsData : flash.Vector<IGraphicsData> ) : Void;
-	function drawPath( ?commands : flash.Vector<Int>, ?data : flash.Vector<Float>, ?winding : GraphicsPathWinding ) : Dynamic;
-	function drawTriangles( ?vertices : flash.Vector<Float>, ?indices : flash.Vector<Int>, ?uvtData : flash.Vector<Float>, ?culling : TriangleCulling ) : Dynamic;
-	function lineBitmapStyle( ?bitmap : BitmapData, ?matrix : flash.geom.Matrix, ?repeat : Bool, ?smooth : Bool ) : Void;
-	#end
 }

+ 0 - 4
std/flash9/display/Loader.hx

@@ -8,8 +8,4 @@ extern class Loader extends DisplayObjectContainer {
 	function load(request : flash.net.URLRequest, ?context : flash.system.LoaderContext) : Void;
 	function loadBytes(bytes : flash.utils.ByteArray, ?context : flash.system.LoaderContext) : Void;
 	function unload() : Void;
-	
-	#if flash10
-	function unloadAndStop(?gc : Bool) : Void;
-	#end
 }

+ 1 - 3
std/flash9/display/LoaderInfo.hx

@@ -3,7 +3,6 @@ package flash.display;
 extern class LoaderInfo extends flash.events.EventDispatcher {
 	var actionScriptVersion(default,null) : ActionScriptVersion;
 	var applicationDomain(default,null) : flash.system.ApplicationDomain;
-	/** new in FP 9.0.115 **/
 	var bytes(default,null) : flash.utils.ByteArray;
 	var bytesLoaded(default,null) : UInt;
 	var bytesTotal(default,null) : UInt;
@@ -21,6 +20,5 @@ extern class LoaderInfo extends flash.events.EventDispatcher {
 	var swfVersion(default,null) : SWFVersion;
 	var url(default,null) : String;
 	var width(default,null) : Int;
-	/** new in FP 9.0.115 **/
-	static function getLoaderInfoByDefinition(object : Dynamic) : flash.display.LoaderInfo;
+	static function getLoaderInfoByDefinition(object : Dynamic) : LoaderInfo;
 }

+ 2 - 5
std/flash9/display/MovieClip.hx

@@ -1,6 +1,6 @@
 package flash.display;
 
-extern class MovieClip extends Sprite #if !flash_strict , implements Dynamic #end {
+extern class MovieClip extends Sprite, #if !flash_strict implements Dynamic #end {
 	var currentFrame(default,null) : Int;
 	var currentLabel(default,null) : String;
 	var currentLabels(default,null) : Array<FrameLabel>;
@@ -11,7 +11,7 @@ extern class MovieClip extends Sprite #if !flash_strict , implements Dynamic #en
 	var totalFrames(default,null) : Int;
 	var trackAsMenu : Bool;
 	function new() : Void;
-	function addFrameScript( ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	function addFrameScript(?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	function gotoAndPlay(frame : Dynamic, ?scene : String) : Void;
 	function gotoAndStop(frame : Dynamic, ?scene : String) : Void;
 	function nextFrame() : Void;
@@ -20,7 +20,4 @@ extern class MovieClip extends Sprite #if !flash_strict , implements Dynamic #en
 	function prevFrame() : Void;
 	function prevScene() : Void;
 	function stop() : Void;
-	#if flash10
-	var currentFrameLabel(default,null) : String;
-	#end
 }

+ 1 - 1
std/flash9/display/Scene.hx

@@ -1,6 +1,6 @@
 package flash.display;
 
-extern class Scene {
+@:final extern class Scene {
 	var labels(default,null) : Array<FrameLabel>;
 	var name(default,null) : String;
 	var numFrames(default,null) : Int;

+ 1 - 1
std/flash9/display/Sprite.hx

@@ -8,6 +8,6 @@ extern class Sprite extends DisplayObjectContainer {
 	var soundTransform : flash.media.SoundTransform;
 	var useHandCursor : Bool;
 	function new() : Void;
-	function startDrag(?lockCenter : Bool = false, ?bounds : flash.geom.Rectangle) : Void;
+	function startDrag(lockCenter : Bool = false, ?bounds : flash.geom.Rectangle) : Void;
 	function stopDrag() : Void;
 }

+ 4 - 11
std/flash9/display/Stage.hx

@@ -2,25 +2,18 @@ package flash.display;
 
 extern class Stage extends DisplayObjectContainer {
 	var align : StageAlign;
+	var displayState : StageDisplayState;
 	var focus : InteractiveObject;
 	var frameRate : Float;
+	var fullScreenHeight(default,null) : UInt;
+	var fullScreenSourceRect : flash.geom.Rectangle;
+	var fullScreenWidth(default,null) : UInt;
 	var quality : StageQuality;
 	var scaleMode : StageScaleMode;
 	var showDefaultContextMenu : Bool;
 	var stageFocusRect : Bool;
 	var stageHeight : Int;
 	var stageWidth : Int;
-
 	function invalidate() : Void;
 	function isFocusInaccessible() : Bool;
-
-	// FP9 - fullscreen support
-	var displayState : StageDisplayState;
-	var fullScreenHeight(default,null) : UInt;
-	var fullScreenSourceRect : flash.geom.Rectangle;
-	var fullScreenWidth(default,null) : UInt;
-
-	#if flash10
-	var enableColorCorrection : Bool;
-	#end
 }

+ 1 - 0
std/flash9/errors/EOFError.hx

@@ -1,4 +1,5 @@
 package flash.errors;
 
 extern class EOFError extends IOError {
+	function new(?message : String, id : Int = 0) : Void;
 }

+ 3 - 3
std/flash9/errors/Error.hx

@@ -1,12 +1,12 @@
 package flash.errors;
 
-extern class Error {
+extern class Error #if !flash_strict implements Dynamic #end {
 	var errorID(default,null) : Int;
 	var message : Dynamic;
 	var name : Dynamic;
-	function new(?message : String, ?id : Int) : Void;
+	function new(?message : Dynamic, id : Dynamic = 0) : Void;
 	function getStackTrace() : String;
 	static var length : Int;
 	static function getErrorMessage(index : Int) : String;
-	static function throwError(type : Class<Dynamic>, index : UInt, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Dynamic;
+	static function throwError(type : Class<Dynamic>, index : UInt, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Dynamic;
 }

+ 1 - 0
std/flash9/errors/IOError.hx

@@ -1,4 +1,5 @@
 package flash.errors;
 
 extern class IOError extends Error {
+	function new(?message : String, id : Int = 0) : Void;
 }

+ 1 - 0
std/flash9/errors/IllegalOperationError.hx

@@ -1,4 +1,5 @@
 package flash.errors;
 
 extern class IllegalOperationError extends Error {
+	function new(?message : String, id : Int = 0) : Void;
 }

+ 1 - 0
std/flash9/errors/InvalidSWFError.hx

@@ -1,4 +1,5 @@
 package flash.errors;
 
 extern class InvalidSWFError extends Error {
+	function new(?message : String, id : Int = 0) : Void;
 }

+ 1 - 0
std/flash9/errors/MemoryError.hx

@@ -1,4 +1,5 @@
 package flash.errors;
 
 extern class MemoryError extends Error {
+	function new(?message : String, id : Int = 0) : Void;
 }

+ 1 - 0
std/flash9/errors/ScriptTimeoutError.hx

@@ -1,4 +1,5 @@
 package flash.errors;
 
 extern class ScriptTimeoutError extends Error {
+	function new(?message : String, id : Int = 0) : Void;
 }

+ 1 - 0
std/flash9/errors/StackOverflowError.hx

@@ -1,4 +1,5 @@
 package flash.errors;
 
 extern class StackOverflowError extends Error {
+	function new(?message : String, id : Int = 0) : Void;
 }

+ 1 - 1
std/flash9/events/ActivityEvent.hx

@@ -2,6 +2,6 @@ package flash.events;
 
 extern class ActivityEvent extends Event {
 	var activating : Bool;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?activating : Bool) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, activating : Bool = false) : Void;
 	static var ACTIVITY : String;
 }

+ 1 - 1
std/flash9/events/AsyncErrorEvent.hx

@@ -2,6 +2,6 @@ package flash.events;
 
 extern class AsyncErrorEvent extends ErrorEvent {
 	var error : flash.errors.Error;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?text : String, ?error : flash.errors.Error) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?text : String, ?error : flash.errors.Error) : Void;
 	static var ASYNC_ERROR : String;
 }

+ 1 - 1
std/flash9/events/ContextMenuEvent.hx

@@ -3,7 +3,7 @@ package flash.events;
 extern class ContextMenuEvent extends Event {
 	var contextMenuOwner : flash.display.InteractiveObject;
 	var mouseTarget : flash.display.InteractiveObject;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?mouseTarget : flash.display.InteractiveObject, ?contextMenuOwner : flash.display.InteractiveObject) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?mouseTarget : flash.display.InteractiveObject, ?contextMenuOwner : flash.display.InteractiveObject) : Void;
 	static var MENU_ITEM_SELECT : String;
 	static var MENU_SELECT : String;
 }

+ 1 - 1
std/flash9/events/DataEvent.hx

@@ -2,7 +2,7 @@ package flash.events;
 
 extern class DataEvent extends TextEvent {
 	var data : String;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?data : String) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?data : String) : Void;
 	static var DATA : String;
 	static var UPLOAD_COMPLETE_DATA : String;
 }

+ 1 - 1
std/flash9/events/ErrorEvent.hx

@@ -1,6 +1,6 @@
 package flash.events;
 
 extern class ErrorEvent extends TextEvent {
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?text : String) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?text : String) : Void;
 	static var ERROR : String;
 }

+ 5 - 23
std/flash9/events/Event.hx

@@ -7,9 +7,9 @@ extern class Event {
 	var eventPhase(default,null) : EventPhase;
 	var target(default,null) : Dynamic;
 	var type(default,null) : String;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false) : Void;
 	function clone() : Event;
-	function formatToString(className : String, ?p1 : String, ?p2 : String, ?p3 : String, ?p4 : String, ?p5 : String ) : String;
+	function formatToString(className : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : String;
 	function isDefaultPrevented() : Bool;
 	function preventDefault() : Void;
 	function stopImmediatePropagation() : Void;
@@ -17,6 +17,7 @@ extern class Event {
 	function toString() : String;
 	static var ACTIVATE : String;
 	static var ADDED : String;
+	static var ADDED_TO_STAGE : String;
 	static var CANCEL : String;
 	static var CHANGE : String;
 	static var CLOSE : String;
@@ -24,11 +25,13 @@ extern class Event {
 	static var CONNECT : String;
 	static var DEACTIVATE : String;
 	static var ENTER_FRAME : String;
+	static var FULLSCREEN : String;
 	static var ID3 : String;
 	static var INIT : String;
 	static var MOUSE_LEAVE : String;
 	static var OPEN : String;
 	static var REMOVED : String;
+	static var REMOVED_FROM_STAGE : String;
 	static var RENDER : String;
 	static var RESIZE : String;
 	static var SCROLL : String;
@@ -38,25 +41,4 @@ extern class Event {
 	static var TAB_ENABLED_CHANGE : String;
 	static var TAB_INDEX_CHANGE : String;
 	static var UNLOAD : String;
-
-	/** added in FP 9.0.28 **/
-	static var ADDED_TO_STAGE : String;
-
-	/** added in FP 9.0.28 **/
-	static var REMOVED_FROM_STAGE : String;
-
-	/** added in FP 9.0.28 **/
-	static var FULLSCREEN : String;
-
-	#if flash10
-	static var FRAME_CONSTRUCTED : String;
-	static var SAMPLES_DATA : String;
-	static var EXIT_FRAME : String;
-	static var CUT : String;
-	static var COPY : String;
-	static var CLEAR : String;
-	static var SELECT_ALL : String;
-	static var PASTE : String;
-	#end
-
 }

+ 3 - 3
std/flash9/events/EventDispatcher.hx

@@ -1,11 +1,11 @@
 package flash.events;
 
 extern class EventDispatcher implements IEventDispatcher {
-	function new(?target : flash.events.IEventDispatcher) : Void;
-	function addEventListener(type : String, listener : Dynamic->Void, ?useCapture : Bool = false, ?priority : Int = 0, ?useWeakReference : Bool = false) : Void;
+	function new(?target : IEventDispatcher) : Void;
+	function addEventListener(type : String, listener : Dynamic, useCapture : Bool = false, priority : Int = 0, useWeakReference : Bool = false) : Void;
 	function dispatchEvent(event : Event) : Bool;
 	function hasEventListener(type : String) : Bool;
-	function removeEventListener(type : String, listener : Dynamic->Void, ?useCapture : Bool = false) : Void;
+	function removeEventListener(type : String, listener : Dynamic, useCapture : Bool = false) : Void;
 	function toString() : String;
 	function willTrigger(type : String) : Bool;
 }

+ 1 - 1
std/flash9/events/FocusEvent.hx

@@ -4,7 +4,7 @@ extern class FocusEvent extends Event {
 	var keyCode : UInt;
 	var relatedObject : flash.display.InteractiveObject;
 	var shiftKey : Bool;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?relatedObject : flash.display.InteractiveObject, ?shiftKey : Bool, ?keyCode : UInt) : Void;
+	function new(type : String, bubbles : Bool = true, cancelable : Bool = false, ?relatedObject : flash.display.InteractiveObject, shiftKey : Bool = false, keyCode : UInt = 0) : Void;
 	static var FOCUS_IN : String;
 	static var FOCUS_OUT : String;
 	static var KEY_FOCUS_CHANGE : String;

+ 1 - 1
std/flash9/events/FullScreenEvent.hx

@@ -2,6 +2,6 @@ package flash.events;
 
 extern class FullScreenEvent extends ActivityEvent {
 	var fullScreen(default,null) : Bool;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?fullScreen : Bool) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, fullScreen : Bool = false) : Void;
 	static var FULL_SCREEN : String;
 }

+ 1 - 1
std/flash9/events/HTTPStatusEvent.hx

@@ -2,6 +2,6 @@ package flash.events;
 
 extern class HTTPStatusEvent extends Event {
 	var status(default,null) : Int;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?status : Int) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, status : Int = 0) : Void;
 	static var HTTP_STATUS : String;
 }

+ 2 - 2
std/flash9/events/IEventDispatcher.hx

@@ -1,9 +1,9 @@
 package flash.events;
 
 extern interface IEventDispatcher {
-	function addEventListener(type : String, listener : Dynamic->Void, ?useCapture : Bool = false, ?priority : Int = 0, ?useWeakReference : Bool = false) : Void;
+	function addEventListener(type : String, listener : Dynamic, useCapture : Bool = false, priority : Int = 0, useWeakReference : Bool = false) : Void;
 	function dispatchEvent(event : Event) : Bool;
 	function hasEventListener(type : String) : Bool;
-	function removeEventListener(type : String, listener : Dynamic->Void, ?useCapture : Bool = false) : Void;
+	function removeEventListener(type : String, listener : Dynamic, useCapture : Bool = false) : Void;
 	function willTrigger(type : String) : Bool;
 }

+ 1 - 1
std/flash9/events/IMEEvent.hx

@@ -1,6 +1,6 @@
 package flash.events;
 
 extern class IMEEvent extends TextEvent {
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?text : String) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?text : String) : Void;
 	static var IME_COMPOSITION : String;
 }

+ 1 - 1
std/flash9/events/IOErrorEvent.hx

@@ -1,7 +1,7 @@
 package flash.events;
 
 extern class IOErrorEvent extends ErrorEvent {
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?text : String) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?text : String) : Void;
 	static var DISK_ERROR : String;
 	static var IO_ERROR : String;
 	static var NETWORK_ERROR : String;

+ 1 - 1
std/flash9/events/KeyboardEvent.hx

@@ -7,7 +7,7 @@ extern class KeyboardEvent extends Event {
 	var keyCode : UInt;
 	var keyLocation : flash.ui.KeyLocation;
 	var shiftKey : Bool;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?charCode : UInt, ?keyCode : UInt, ?keyLocation : flash.ui.KeyLocation, ?ctrlKey : Bool, ?altKey : Bool, ?shiftKey : Bool) : Void;
+	function new(type : String, bubbles : Bool = true, cancelable : Bool = false, charCode : UInt = 0, keyCode : UInt = 0, keyLocation : flash.ui.KeyLocation = 0, ctrlKey : Bool = false, altKey : Bool = false, shiftKey : Bool = false) : Void;
 	function updateAfterEvent() : Void;
 	static var KEY_DOWN : String;
 	static var KEY_UP : String;

+ 1 - 1
std/flash9/events/MouseEvent.hx

@@ -11,7 +11,7 @@ extern class MouseEvent extends Event {
 	var shiftKey : Bool;
 	var stageX(default,null) : Float;
 	var stageY(default,null) : Float;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?localX : Float, ?localY : Float, ?relatedObject : flash.display.InteractiveObject, ?ctrlKey : Bool, ?altKey : Bool, ?shiftKey : Bool, ?buttonDown : Bool, ?delta : Int) : Void;
+	function new(type : String, bubbles : Bool = true, cancelable : Bool = false, ?localX : Float, ?localY : Float, ?relatedObject : flash.display.InteractiveObject, ctrlKey : Bool = false, altKey : Bool = false, shiftKey : Bool = false, buttonDown : Bool = false, delta : Int = 0) : Void;
 	function updateAfterEvent() : Void;
 	static var CLICK : String;
 	static var DOUBLE_CLICK : String;

+ 1 - 1
std/flash9/events/NetFilterEvent.hx

@@ -3,5 +3,5 @@ package flash.events;
 extern class NetFilterEvent extends Event {
 	var data : flash.utils.ByteArray;
 	var header : flash.utils.ByteArray;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?header : flash.utils.ByteArray, ?data : flash.utils.ByteArray) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?header : flash.utils.ByteArray, ?data : flash.utils.ByteArray) : Void;
 }

+ 1 - 1
std/flash9/events/NetStatusEvent.hx

@@ -2,6 +2,6 @@ package flash.events;
 
 extern class NetStatusEvent extends Event {
 	var info : Dynamic;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?info : Dynamic) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?info : Dynamic) : Void;
 	static var NET_STATUS : String;
 }

+ 1 - 1
std/flash9/events/ProgressEvent.hx

@@ -3,7 +3,7 @@ package flash.events;
 extern class ProgressEvent extends Event {
 	var bytesLoaded : UInt;
 	var bytesTotal : UInt;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?bytesLoaded : UInt, ?bytesTotal : UInt) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, bytesLoaded : UInt = 0, bytesTotal : UInt = 0) : Void;
 	static var PROGRESS : String;
 	static var SOCKET_DATA : String;
 }

+ 1 - 1
std/flash9/events/SecurityErrorEvent.hx

@@ -1,6 +1,6 @@
 package flash.events;
 
 extern class SecurityErrorEvent extends ErrorEvent {
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?text : String) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?text : String) : Void;
 	static var SECURITY_ERROR : String;
 }

+ 1 - 1
std/flash9/events/StatusEvent.hx

@@ -3,6 +3,6 @@ package flash.events;
 extern class StatusEvent extends Event {
 	var code : String;
 	var level : String;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?code : String, ?level : String) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?code : String, ?level : String) : Void;
 	static var STATUS : String;
 }

+ 1 - 1
std/flash9/events/SyncEvent.hx

@@ -2,6 +2,6 @@ package flash.events;
 
 extern class SyncEvent extends Event {
 	var changeList : Array<Dynamic>;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?changeList : Array<Dynamic>) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?changeList : Array<Dynamic>) : Void;
 	static var SYNC : String;
 }

+ 1 - 1
std/flash9/events/TextEvent.hx

@@ -2,7 +2,7 @@ package flash.events;
 
 extern class TextEvent extends Event {
 	var text : String;
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool, ?text : String) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, ?text : String) : Void;
 	static var LINK : String;
 	static var TEXT_INPUT : String;
 }

+ 1 - 1
std/flash9/events/TimerEvent.hx

@@ -1,7 +1,7 @@
 package flash.events;
 
 extern class TimerEvent extends Event {
-	function new(type : String, ?bubbles : Bool, ?cancelable : Bool) : Void;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false) : Void;
 	function updateAfterEvent() : Void;
 	static var TIMER : String;
 	static var TIMER_COMPLETE : String;

+ 2 - 4
std/flash9/external/ExternalInterface.hx

@@ -2,10 +2,8 @@ package flash.external;
 
 extern class ExternalInterface {
 	static var available(default,null) : Bool;
-
+	static var marshallExceptions : Bool;
 	static var objectID(default,null) : String;
 	static function addCallback(functionName : String, closure : Dynamic) : Void;
-	static function call(functionName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Dynamic;
-	/** added in FP 9.0.115 **/
-	static var marshallExceptions : Bool;
+	static function call(functionName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Dynamic;
 }

+ 2 - 2
std/flash9/filters/BevelFilter.hx

@@ -1,6 +1,6 @@
 package flash.filters;
 
-extern class BevelFilter extends BitmapFilter {
+@:final extern class BevelFilter extends BitmapFilter {
 	var angle : Float;
 	var blurX : Float;
 	var blurY : Float;
@@ -13,5 +13,5 @@ extern class BevelFilter extends BitmapFilter {
 	var shadowColor : UInt;
 	var strength : Float;
 	var type : BitmapFilterType;
-	function new(?distance : Float, ?angle : Float, ?highlightColor : UInt, ?highlightAlpha : Float, ?shadowColor : UInt, ?shadowAlpha : Float, ?blurX : Float, ?blurY : Float, ?strength : Float, ?quality : Int, ?type : BitmapFilterType, ?knockout : Bool) : Void;
+	function new(distance : Float = 4, angle : Float = 45, highlightColor : UInt = 16777215, highlightAlpha : Float = 1, shadowColor : UInt = 0, shadowAlpha : Float = 1, blurX : Float = 4, blurY : Float = 4, strength : Float = 1, quality : Int = 1, ?type : BitmapFilterType, knockout : Bool = false) : Void;
 }

+ 3 - 3
std/flash9/filters/BitmapFilterQuality.hx

@@ -1,7 +1,7 @@
 package flash.filters;
 
 extern class BitmapFilterQuality {
-	static var HIGH : Int;
-	static var LOW : Int;
-	static var MEDIUM : Int;
+	static inline var HIGH : Int = 3;
+	static inline var LOW : Int = 1;
+	static inline var MEDIUM : Int = 2;
 }

+ 2 - 2
std/flash9/filters/BlurFilter.hx

@@ -1,8 +1,8 @@
 package flash.filters;
 
-extern class BlurFilter extends BitmapFilter {
+@:final extern class BlurFilter extends BitmapFilter {
 	var blurX : Float;
 	var blurY : Float;
 	var quality : Int;
-	function new(?blurX : Float, ?blurY : Float, ?quality : Int) : Void;
+	function new(blurX : Float = 4, blurY : Float = 4, quality : Int = 1) : Void;
 }

+ 1 - 1
std/flash9/filters/ColorMatrixFilter.hx

@@ -1,6 +1,6 @@
 package flash.filters;
 
-extern class ColorMatrixFilter extends BitmapFilter {
+@:final extern class ColorMatrixFilter extends BitmapFilter {
 	var matrix : Array<Dynamic>;
 	function new(?matrix : Array<Dynamic>) : Void;
 }

+ 3 - 3
std/flash9/filters/ConvolutionFilter.hx

@@ -7,8 +7,8 @@ extern class ConvolutionFilter extends BitmapFilter {
 	var color : UInt;
 	var divisor : Float;
 	var matrix : Array<Dynamic>;
-	var matrixX : Int;
-	var matrixY : Int;
+	var matrixX : Float;
+	var matrixY : Float;
 	var preserveAlpha : Bool;
-	function new(?matrixX : Float, ?matrixY : Float, ?matrix : Array<Dynamic>, ?divisor : Float, ?bias : Float, ?preserveAlpha : Bool, ?clamp : Bool, ?color : UInt, ?alpha : Float) : Void;
+	function new(matrixX : Float = 0, matrixY : Float = 0, ?matrix : Array<Dynamic>, divisor : Float = 1, bias : Float = 0, preserveAlpha : Bool = true, clamp : Bool = true, color : UInt = 0, alpha : Float = 0) : Void;
 }

+ 2 - 2
std/flash9/filters/DisplacementMapFilter.hx

@@ -1,6 +1,6 @@
 package flash.filters;
 
-extern class DisplacementMapFilter extends BitmapFilter {
+@:final extern class DisplacementMapFilter extends BitmapFilter {
 	var alpha : Float;
 	var color : UInt;
 	var componentX : UInt;
@@ -10,5 +10,5 @@ extern class DisplacementMapFilter extends BitmapFilter {
 	var mode : DisplacementMapFilterMode;
 	var scaleX : Float;
 	var scaleY : Float;
-	function new(?mapBitmap : flash.display.BitmapData, ?mapPoint : flash.geom.Point, ?componentX : UInt, ?componentY : UInt, ?scaleX : Float, ?scaleY : Float, ?mode : DisplacementMapFilterMode, ?color : UInt, ?alpha : Float) : Void;
+	function new(?mapBitmap : flash.display.BitmapData, ?mapPoint : flash.geom.Point, componentX : UInt = 0, componentY : UInt = 0, scaleX : Float = 0, scaleY : Float = 0, ?mode : DisplacementMapFilterMode, color : UInt = 0, alpha : Float = 0) : Void;
 }

+ 2 - 2
std/flash9/filters/DropShadowFilter.hx

@@ -1,6 +1,6 @@
 package flash.filters;
 
-extern class DropShadowFilter extends BitmapFilter {
+@:final extern class DropShadowFilter extends BitmapFilter {
 	var alpha : Float;
 	var angle : Float;
 	var blurX : Float;
@@ -12,5 +12,5 @@ extern class DropShadowFilter extends BitmapFilter {
 	var knockout : Bool;
 	var quality : Int;
 	var strength : Float;
-	function new(?distance : Float, ?angle : Float, ?color : UInt, ?alpha : Float, ?blurX : Float, ?blurY : Float, ?strength : Float, ?quality : Int, ?inner : Bool, ?knockout : Bool, ?hideObject : Bool) : Void;
+	function new(distance : Float = 4, angle : Float = 45, color : UInt = 0, alpha : Float = 1, blurX : Float = 4, blurY : Float = 4, strength : Float = 1, quality : Int = 1, inner : Bool = false, knockout : Bool = false, hideObject : Bool = false) : Void;
 }

+ 2 - 2
std/flash9/filters/GlowFilter.hx

@@ -1,6 +1,6 @@
 package flash.filters;
 
-extern class GlowFilter extends BitmapFilter {
+@:final extern class GlowFilter extends BitmapFilter {
 	var alpha : Float;
 	var blurX : Float;
 	var blurY : Float;
@@ -9,5 +9,5 @@ extern class GlowFilter extends BitmapFilter {
 	var knockout : Bool;
 	var quality : Int;
 	var strength : Float;
-	function new(?color : UInt, ?alpha : Float, ?blurX : Float, ?blurY : Float, ?strength : Float, ?quality : Int, ?inner : Bool, ?knockout : Bool) : Void;
+	function new(color : UInt = 16711680, alpha : Float = 1, blurX : Float = 6, blurY : Float = 6, strength : Float = 2, quality : Int = 1, inner : Bool = false, knockout : Bool = false) : Void;
 }

+ 2 - 2
std/flash9/filters/GradientBevelFilter.hx

@@ -1,6 +1,6 @@
 package flash.filters;
 
-extern class GradientBevelFilter extends BitmapFilter {
+@:final extern class GradientBevelFilter extends BitmapFilter {
 	var alphas : Array<Dynamic>;
 	var angle : Float;
 	var blurX : Float;
@@ -12,5 +12,5 @@ extern class GradientBevelFilter extends BitmapFilter {
 	var ratios : Array<Dynamic>;
 	var strength : Float;
 	var type : String;
-	function new(?distance : Float, ?angle : Float, ?colors : Array<Dynamic>, ?alphas : Array<Dynamic>, ?ratios : Array<Dynamic>, ?blurX : Float, ?blurY : Float, ?strength : Float, ?quality : Int, ?type : String, ?knockout : Bool) : Void;
+	function new(distance : Float = 4, angle : Float = 45, ?colors : Array<Dynamic>, ?alphas : Array<Dynamic>, ?ratios : Array<Dynamic>, blurX : Float = 4, blurY : Float = 4, strength : Float = 1, quality : Int = 1, ?type : String, knockout : Bool = false) : Void;
 }

+ 2 - 2
std/flash9/filters/GradientGlowFilter.hx

@@ -1,6 +1,6 @@
 package flash.filters;
 
-extern class GradientGlowFilter extends BitmapFilter {
+@:final extern class GradientGlowFilter extends BitmapFilter {
 	var alphas : Array<Dynamic>;
 	var angle : Float;
 	var blurX : Float;
@@ -12,5 +12,5 @@ extern class GradientGlowFilter extends BitmapFilter {
 	var ratios : Array<Dynamic>;
 	var strength : Float;
 	var type : BitmapFilterType;
-	function new(?distance : Float, ?angle : Float, ?colors : Array<Dynamic>, ?alphas : Array<Dynamic>, ?ratios : Array<Dynamic>, ?blurX : Float, ?blurY : Float, ?strength : Float, ?quality : Int, ?type : BitmapFilterType, ?knockout : Bool) : Void;
+	function new(distance : Float = 4, angle : Float = 45, ?colors : Array<Dynamic>, ?alphas : Array<Dynamic>, ?ratios : Array<Dynamic>, blurX : Float = 4, blurY : Float = 4, strength : Float = 1, quality : Int = 1, ?type : BitmapFilterType, knockout : Bool = false) : Void;
 }

+ 1 - 1
std/flash9/geom/ColorTransform.hx

@@ -10,7 +10,7 @@ extern class ColorTransform {
 	var greenOffset : Float;
 	var redMultiplier : Float;
 	var redOffset : Float;
-	function new(?redMultiplier : Float, ?greenMultiplier : Float, ?blueMultiplier : Float, ?alphaMultiplier : Float, ?redOffset : Float, ?greenOffset : Float, ?blueOffset : Float, ?alphaOffset : Float) : Void;
+	function new(redMultiplier : Float = 1, greenMultiplier : Float = 1, blueMultiplier : Float = 1, alphaMultiplier : Float = 1, redOffset : Float = 0, greenOffset : Float = 0, blueOffset : Float = 0, alphaOffset : Float = 0) : Void;
 	function concat(second : ColorTransform) : Void;
 	function toString() : String;
 }

+ 3 - 3
std/flash9/geom/Matrix.hx

@@ -7,11 +7,11 @@ extern class Matrix {
 	var d : Float;
 	var tx : Float;
 	var ty : Float;
-	function new(?a : Float, ?b : Float, ?c : Float, ?d : Float, ?tx : Float, ?ty : Float) : Void;
+	function new(a : Float = 1, b : Float = 0, c : Float = 0, d : Float = 1, tx : Float = 0, ty : Float = 0) : Void;
 	function clone() : Matrix;
 	function concat(m : Matrix) : Void;
-	function createBox(scaleX : Float, scaleY : Float, ?rotation : Float, ?tx : Float, ?ty : Float) : Void;
-	function createGradientBox(width : Float, height : Float, ?rotation : Float, ?tx : Float, ?ty : Float) : Void;
+	function createBox(scaleX : Float, scaleY : Float, rotation : Float = 0, tx : Float = 0, ty : Float = 0) : Void;
+	function createGradientBox(width : Float, height : Float, rotation : Float = 0, tx : Float = 0, ty : Float = 0) : Void;
 	function deltaTransformPoint(point : Point) : Point;
 	function identity() : Void;
 	function invert() : Void;

+ 1 - 1
std/flash9/geom/Point.hx

@@ -4,7 +4,7 @@ extern class Point {
 	var length(default,null) : Float;
 	var x : Float;
 	var y : Float;
-	function new(?x : Float, ?y : Float) : Void;
+	function new(x : Float = 0, y : Float = 0) : Void;
 	function add(v : Point) : Point;
 	function clone() : Point;
 	function equals(toCompare : Point) : Bool;

+ 1 - 1
std/flash9/geom/Rectangle.hx

@@ -12,7 +12,7 @@ extern class Rectangle {
 	var width : Float;
 	var x : Float;
 	var y : Float;
-	function new(?x : Float, ?y : Float, ?width : Float, ?height : Float) : Void;
+	function new(x : Float = 0, y : Float = 0, width : Float = 0, height : Float = 0) : Void;
 	function clone() : Rectangle;
 	function contains(x : Float, y : Float) : Bool;
 	function containsPoint(point : Point) : Bool;

+ 0 - 5
std/flash9/geom/Transform.hx

@@ -7,9 +7,4 @@ extern class Transform {
 	var matrix : Matrix;
 	var pixelBounds(default,null) : Rectangle;
 	function new(displayObject : flash.display.DisplayObject) : Void;
-	#if flash10
-	var matrix3D : flash.geom.Matrix3D;
-	var perspectiveProjection : flash.geom.PerspectiveProjection;
-	function getRelativeMatrix3D( relativeTo:flash.display.DisplayObject ) : Matrix3D;
-	#end
 }

+ 4 - 4
std/flash9/media/Camera.hx

@@ -1,6 +1,6 @@
 package flash.media;
 
-extern class Camera extends flash.events.EventDispatcher {
+@:final extern class Camera extends flash.events.EventDispatcher {
 	var activityLevel(default,null) : Float;
 	var bandwidth(default,null) : Int;
 	var currentFPS(default,null) : Float;
@@ -18,9 +18,9 @@ extern class Camera extends flash.events.EventDispatcher {
 	function new() : Void;
 	function setCursor(value : Bool) : Void;
 	function setKeyFrameInterval(keyFrameInterval : Int) : Void;
-	function setLoopback(?compress : Bool) : Void;
-	function setMode(width : Int, height : Int, fps : Float, ?favorArea : Bool) : Void;
-	function setMotionLevel(motionLevel : Int, ?timeout : Int) : Void;
+	function setLoopback(compress : Bool = false) : Void;
+	function setMode(width : Int, height : Int, fps : Float, favorArea : Bool = true) : Void;
+	function setMotionLevel(motionLevel : Int, timeout : Int = 2000) : Void;
 	function setQuality(bandwidth : Int, quality : Int) : Void;
 	static var names(default,null) : Array<Dynamic>;
 	static function getCamera(?name : String) : Camera;

+ 1 - 1
std/flash9/media/ID3Info.hx

@@ -1,6 +1,6 @@
 package flash.media;
 
-extern class ID3Info {
+@:final extern class ID3Info implements Dynamic {
 	var album : String;
 	var artist : String;
 	var comment : String;

+ 4 - 10
std/flash9/media/Microphone.hx

@@ -1,6 +1,6 @@
 package flash.media;
 
-extern class Microphone extends flash.events.EventDispatcher {
+@:final extern class Microphone extends flash.events.EventDispatcher {
 	var activityLevel(default,null) : Float;
 	var gain : Float;
 	var index(default,null) : Int;
@@ -11,16 +11,10 @@ extern class Microphone extends flash.events.EventDispatcher {
 	var silenceTimeout(default,null) : Int;
 	var soundTransform : SoundTransform;
 	var useEchoSuppression(default,null) : Bool;
-	#if flash10
-	var codec : SoundCodec;
-	var encodeQuality : Int;
-	var framesPerPacket : Int;
-	#end
-
 	function new() : Void;
-	function setLoopBack(?state : Bool) : Void;
-	function setSilenceLevel(silenceLevel : Float, ?timeout : Int) : Void;
+	function setLoopBack(state : Bool = true) : Void;
+	function setSilenceLevel(silenceLevel : Float, timeout : Int = -1) : Void;
 	function setUseEchoSuppression(useEchoSuppression : Bool) : Void;
 	static var names(default,null) : Array<Dynamic>;
-	static function getMicrophone(?index : Int) : Microphone;
+	static function getMicrophone(index : Int = 0) : Microphone;
 }

+ 1 - 4
std/flash9/media/Sound.hx

@@ -10,8 +10,5 @@ extern class Sound extends flash.events.EventDispatcher {
 	function new(?stream : flash.net.URLRequest, ?context : SoundLoaderContext) : Void;
 	function close() : Void;
 	function load(stream : flash.net.URLRequest, ?context : SoundLoaderContext) : Void;
-	function play(?startTime : Float, ?loops : Int, ?sndTransform : SoundTransform) : SoundChannel;
-	#if flash10
-	function extract( ?target : flash.utils.ByteArray, ?length : Float, ?startPosition : Float ) : Float;
-	#end
+	function play(startTime : Float = 0, loops : Int = 0, ?sndTransform : SoundTransform) : SoundChannel;
 }

+ 1 - 1
std/flash9/media/SoundChannel.hx

@@ -1,6 +1,6 @@
 package flash.media;
 
-extern class SoundChannel extends flash.events.EventDispatcher {
+@:final extern class SoundChannel extends flash.events.EventDispatcher {
 	var leftPeak(default,null) : Float;
 	var position(default,null) : Float;
 	var rightPeak(default,null) : Float;

+ 1 - 1
std/flash9/media/SoundLoaderContext.hx

@@ -3,5 +3,5 @@ package flash.media;
 extern class SoundLoaderContext {
 	var bufferTime : Float;
 	var checkPolicyFile : Bool;
-	function new(?bufferTime : Float, ?checkPolicyFile : Bool) : Void;
+	function new(bufferTime : Float = 1000, checkPolicyFile : Bool = false) : Void;
 }

+ 1 - 1
std/flash9/media/SoundMixer.hx

@@ -4,6 +4,6 @@ extern class SoundMixer {
 	static var bufferTime : Int;
 	static var soundTransform : SoundTransform;
 	static function areSoundsInaccessible() : Bool;
-	static function computeSpectrum(outputArray : flash.utils.ByteArray, ?FFTMode : Bool, ?stretchFactor : Int) : Void;
+	static function computeSpectrum(outputArray : flash.utils.ByteArray, FFTMode : Bool = false, stretchFactor : Int = 0) : Void;
 	static function stopAll() : Void;
 }

+ 2 - 2
std/flash9/media/SoundTransform.hx

@@ -1,11 +1,11 @@
 package flash.media;
 
-extern class SoundTransform {
+@:final extern class SoundTransform {
 	var leftToLeft : Float;
 	var leftToRight : Float;
 	var pan : Float;
 	var rightToLeft : Float;
 	var rightToRight : Float;
 	var volume : Float;
-	function new(?vol : Float, ?panning : Float) : Void;
+	function new(vol : Float = 1, panning : Float = 0) : Void;
 }

+ 1 - 1
std/flash9/media/Video.hx

@@ -5,7 +5,7 @@ extern class Video extends flash.display.DisplayObject {
 	var smoothing : Bool;
 	var videoHeight(default,null) : Int;
 	var videoWidth(default,null) : Int;
-	function new(?width : Int, ?height : Int) : Void;
+	function new(width : Int = 320, height : Int = 240) : Void;
 	function attachCamera(camera : Camera) : Void;
 	function attachNetStream(netStream : flash.net.NetStream) : Void;
 	function clear() : Void;

+ 1 - 1
std/flash9/net/FileFilter.hx

@@ -1,6 +1,6 @@
 package flash.net;
 
-extern class FileFilter {
+@:final extern class FileFilter {
 	var description : String;
 	var extension : String;
 	var macType : String;

+ 2 - 7
std/flash9/net/FileReference.hx

@@ -8,13 +8,8 @@ extern class FileReference extends flash.events.EventDispatcher {
 	var size(default,null) : UInt;
 	var type(default,null) : String;
 	function new() : Void;
-	function browse(?typeFilter : Array<flash.net.FileFilter>) : Bool;
+	function browse(?typeFilter : Array<FileFilter>) : Bool;
 	function cancel() : Void;
 	function download(request : URLRequest, ?defaultFileName : String) : Void;
-	function upload(request : URLRequest, ?uploadDataFieldName : String, ?testUpload : Bool) : Void;
-	#if flash10
-	var data(default,null) : flash.utils.ByteArray;
-	function load() : Void;
-	function save( ?data : Dynamic, ?defaultFileName : String ) : Void;
-	#end
+	function upload(request : URLRequest, ?uploadDataFieldName : String, testUpload : Bool = false) : Void;
 }

+ 2 - 2
std/flash9/net/FileReferenceList.hx

@@ -1,7 +1,7 @@
 package flash.net;
 
 extern class FileReferenceList extends flash.events.EventDispatcher {
-	var fileList(default,null) : Array<flash.net.FileReference>;
+	var fileList(default,null) : Array<FileReference>;
 	function new() : Void;
-	function browse(?typeFilter : Array<flash.net.FileFilter>) : Bool;
+	function browse(?typeFilter : Array<FileFilter>) : Bool;
 }

+ 3 - 3
std/flash9/net/LocalConnection.hx

@@ -4,9 +4,9 @@ extern class LocalConnection extends flash.events.EventDispatcher {
 	var client : Dynamic;
 	var domain(default,null) : String;
 	function new() : Void;
-	function allowDomain( ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
-	function allowInsecureDomain( ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	function allowDomain(?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
+	function allowInsecureDomain(?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	function close() : Void;
 	function connect(connectionName : String) : Void;
-	function send(connectionName : String, methodName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	function send(connectionName : String, methodName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 }

+ 3 - 13
std/flash9/net/NetConnection.hx

@@ -9,19 +9,9 @@ extern class NetConnection extends flash.events.EventDispatcher {
 	var uri(default,null) : String;
 	var usingTLS(default,null) : Bool;
 	function new() : Void;
-	function addHeader(operation : String, ?mustUnderstand : Bool, ?param : Dynamic) : Void;
-	function call(command : String, responder : Responder, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	function addHeader(operation : String, mustUnderstand : Bool = false, ?param : Dynamic) : Void;
+	function call(command : String, responder : Responder, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	function close() : Void;
-	function connect(command : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
-	#if flash10
-	var farID(default,null) : String;
-	var farNonce(default,null) : String;
-	var maxPeerConnections : UInt;
-	var nearID(default,null):String;
-	var nearNonce(default,null):String;
-	var protocol(default,null):String;
-	var unconnectedPeerStreams(default,null):Array<Dynamic>;
-	#end
-
+	function connect(command : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	static var defaultObjectEncoding : UInt;
 }

+ 4 - 25
std/flash9/net/NetStream.hx

@@ -15,39 +15,18 @@ extern class NetStream extends flash.events.EventDispatcher {
 	var soundTransform : flash.media.SoundTransform;
 	var time(default,null) : Float;
 	var videoCodec(default,null) : UInt;
-
-	#if flash10
-	function new(connection : flash.net.NetConnection, ?peerID : String ) : Void;
-	#else
-	function new(connection : flash.net.NetConnection) : Void;
-	#end
-
+	function new(connection : NetConnection) : Void;
 	function attachAudio(microphone : flash.media.Microphone) : Void;
-	function attachCamera(theCamera : flash.media.Camera, ?snapshotMilliseconds : Int) : Void;
+	function attachCamera(theCamera : flash.media.Camera, snapshotMilliseconds : Int = -1) : Void;
 	function close() : Void;
 	function pause() : Void;
-	function play( ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	function play(?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	function publish(?name : String, ?type : String) : Void;
 	function receiveAudio(flag : Bool) : Void;
 	function receiveVideo(flag : Bool) : Void;
 	function receiveVideoFPS(FPS : Float) : Void;
 	function resume() : Void;
 	function seek(offset : Float) : Void;
-	function send(handlerName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	function send(handlerName : String, ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	function togglePause() : Void;
-
-	#if flash10
-	var maxPauseBufferTime : Float;
-	var farID(default,null) : String;
-	var farNonce(default,null) : String;
-	var info(default,null) : NetStreamInfo;
-	var nearNonce(default,null) : String;
-	var peerStreams(default,null) : Array<Dynamic>;
-
-	function onPeerConnect( subscriber : NetStream ) : Bool;
-	function play2( param : NetStreamPlayOptions ) : Void;
-
-	static var DIRECT_CONNECTIONS : String;
-	#end
-
 }

+ 1 - 1
std/flash9/net/Responder.hx

@@ -1,5 +1,5 @@
 package flash.net;
 
 extern class Responder {
-	function new(result : Dynamic -> Void, ?status : Dynamic -> Void) : Void;
+	function new(result : Dynamic, ?status : Dynamic) : Void;
 }

+ 4 - 4
std/flash9/net/SharedObject.hx

@@ -10,13 +10,13 @@ extern class SharedObject extends flash.events.EventDispatcher {
 	function clear() : Void;
 	function close() : Void;
 	function connect(myConnection : NetConnection, ?params : String) : Void;
-	function flush(?minDiskSpace : Int) : SharedObjectFlushStatus;
-	function send( ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	function flush(minDiskSpace : Int = 0) : SharedObjectFlushStatus;
+	function send(?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	function setDirty(propertyName : String) : Void;
 	function setProperty(propertyName : String, ?value : Dynamic) : Void;
 	static var defaultObjectEncoding : UInt;
 	static function deleteAll(url : String) : Int;
 	static function getDiskUsage(url : String) : Int;
-	static function getLocal(name : String, ?localPath : String, ?secure : Bool) : SharedObject;
-	static function getRemote(name : String, ?remotePath : String, ?persistence : Dynamic, ?secure : Bool) : SharedObject;
+	static function getLocal(name : String, ?localPath : String, secure : Bool = false) : SharedObject;
+	static function getRemote(name : String, ?remotePath : String, persistence : Dynamic = false, secure : Bool = false) : SharedObject;
 }

+ 4 - 7
std/flash9/net/Socket.hx

@@ -1,20 +1,17 @@
 package flash.net;
 
-extern class Socket extends flash.events.EventDispatcher, implements flash.utils.IDataInput, implements flash.utils.IDataOutput {
+extern class Socket extends flash.events.EventDispatcher, implements flash.utils.IDataOutput, implements flash.utils.IDataInput {
 	var bytesAvailable(default,null) : UInt;
 	var connected(default,null) : Bool;
 	var endian : flash.utils.Endian;
 	var objectEncoding : UInt;
-	#if flash10
-	var timeout : UInt;
-	#end
-	function new(?host : String, ?port : Int) : Void;
+	function new(?host : String, port : Int = 0) : Void;
 	function close() : Void;
 	function connect(host : String, port : Int) : Void;
 	function flush() : Void;
 	function readBoolean() : Bool;
 	function readByte() : Int;
-	function readBytes(bytes : flash.utils.ByteArray, ?offset : UInt, ?length : UInt) : Void;
+	function readBytes(bytes : flash.utils.ByteArray, offset : UInt = 0, length : UInt = 0) : Void;
 	function readDouble() : Float;
 	function readFloat() : Float;
 	function readInt() : Int;
@@ -28,7 +25,7 @@ extern class Socket extends flash.events.EventDispatcher, implements flash.utils
 	function readUnsignedShort() : UInt;
 	function writeBoolean(value : Bool) : Void;
 	function writeByte(value : Int) : Void;
-	function writeBytes(bytes : flash.utils.ByteArray, ?offset : UInt, ?length : UInt) : Void;
+	function writeBytes(bytes : flash.utils.ByteArray, offset : UInt = 0, length : UInt = 0) : Void;
 	function writeDouble(value : Float) : Void;
 	function writeFloat(value : Float) : Void;
 	function writeInt(value : Int) : Void;

+ 1 - 2
std/flash9/net/URLRequest.hx

@@ -1,9 +1,8 @@
 package flash.net;
 
-extern class URLRequest {
+@:final extern class URLRequest {
 	var contentType : String;
 	var data : Dynamic;
-	/** added in FP 9.0.115 **/
 	var digest : String;
 	var method : String;
 	var requestHeaders : Array<URLRequestHeader>;

+ 1 - 1
std/flash9/net/URLRequestHeader.hx

@@ -1,6 +1,6 @@
 package flash.net;
 
-extern class URLRequestHeader {
+@:final extern class URLRequestHeader {
 	var name : String;
 	var value : String;
 	function new(?name : String, ?value : String) : Void;

+ 1 - 1
std/flash9/net/URLStream.hx

@@ -10,7 +10,7 @@ extern class URLStream extends flash.events.EventDispatcher, implements flash.ut
 	function load(request : URLRequest) : Void;
 	function readBoolean() : Bool;
 	function readByte() : Int;
-	function readBytes(bytes : flash.utils.ByteArray, ?offset : UInt, ?length : UInt) : Void;
+	function readBytes(bytes : flash.utils.ByteArray, offset : UInt = 0, length : UInt = 0) : Void;
 	function readDouble() : Float;
 	function readFloat() : Float;
 	function readInt() : Int;

+ 1 - 1
std/flash9/net/XMLSocket.hx

@@ -2,7 +2,7 @@ package flash.net;
 
 extern class XMLSocket extends flash.events.EventDispatcher {
 	var connected(default,null) : Bool;
-	function new(?host : String, ?port : Int) : Void;
+	function new(?host : String, port : Int = 0) : Void;
 	function close() : Void;
 	function connect(host : String, port : Int) : Void;
 	function send(object : Dynamic) : Void;

+ 1 - 1
std/flash9/printing/PrintJob.hx

@@ -7,7 +7,7 @@ extern class PrintJob extends flash.events.EventDispatcher {
 	var paperHeight(default,null) : Int;
 	var paperWidth(default,null) : Int;
 	function new() : Void;
-	function addPage(sprite : flash.display.Sprite, ?printArea : flash.geom.Rectangle, ?options : PrintJobOptions, ?frameNum : Int) : Void;
+	function addPage(sprite : flash.display.Sprite, ?printArea : flash.geom.Rectangle, ?options : PrintJobOptions, frameNum : Int = 0) : Void;
 	function send() : Void;
 	function start() : Bool;
 }

+ 1 - 1
std/flash9/printing/PrintJobOptions.hx

@@ -2,5 +2,5 @@ package flash.printing;
 
 extern class PrintJobOptions {
 	var printAsBitmap : Bool;
-	function new(?printAsBitmap : Bool) : Void;
+	function new(printAsBitmap : Bool = false) : Void;
 }

+ 1 - 1
std/flash9/sampler/DeleteObjectSample.hx

@@ -1,6 +1,6 @@
 package flash.sampler;
 
-extern class DeleteObjectSample extends Sample {
+@:final extern class DeleteObjectSample extends Sample {
 	var id : Float;
 	var size : Float;
 }

+ 1 - 1
std/flash9/sampler/NewObjectSample.hx

@@ -1,6 +1,6 @@
 package flash.sampler;
 
-extern class NewObjectSample extends Sample {
+@:final extern class NewObjectSample extends Sample {
 	var id : Float;
 	var object(default,null) : Dynamic;
 	var type : Class<Dynamic>;

+ 2 - 2
std/flash9/sampler/StackFrame.hx

@@ -1,8 +1,8 @@
 package flash.sampler;
 
-extern class StackFrame {
+@:final extern class StackFrame {
 	var file : String;
 	var line : UInt;
-	var name : String;	
+	var name : String;
 	function toString() : String;
 }

+ 1 - 5
std/flash9/system/ApplicationDomain.hx

@@ -1,13 +1,9 @@
 package flash.system;
 
-extern class ApplicationDomain {
+@:final extern class ApplicationDomain {
 	var parentDomain(default,null) : ApplicationDomain;
 	function new(?parentDomain : ApplicationDomain) : Void;
 	function getDefinition(name : String) : Dynamic;
 	function hasDefinition(name : String) : Bool;
 	static var currentDomain(default,null) : ApplicationDomain;
-	#if flash10
-	static var MIN_DOMAIN_MEMORY_LENGTH(default,null) : UInt;
-	var domainMemory : flash.utils.ByteArray;
-	#end
 }

+ 0 - 3
std/flash9/system/Capabilities.hx

@@ -29,7 +29,4 @@ extern class Capabilities {
 	static var screenResolutionY(default,null) : Float;
 	static var serverString(default,null) : String;
 	static var version(default,null) : String;
-	#if flash10
-	static var hasColorCorrection(default,null) : Bool;
-	#end
 }

+ 1 - 1
std/flash9/system/IME.hx

@@ -1,7 +1,7 @@
 package flash.system;
 
 extern class IME extends flash.events.EventDispatcher {
-	static var constructOK(null,default) : Void;
+	static var constructOK(null,default) : Bool;
 	static var conversionMode : IMEConversionMode;
 	static var enabled : Bool;
 	static function doConversion() : Void;

+ 1 - 1
std/flash9/system/LoaderContext.hx

@@ -4,5 +4,5 @@ extern class LoaderContext {
 	var applicationDomain : ApplicationDomain;
 	var checkPolicyFile : Bool;
 	var securityDomain : SecurityDomain;
-	function new(?checkPolicyFile : Bool, ?applicationDomain : ApplicationDomain, ?securityDomain : SecurityDomain) : Void;
+	function new(checkPolicyFile : Bool = false, ?applicationDomain : ApplicationDomain, ?securityDomain : SecurityDomain) : Void;
 }

+ 2 - 2
std/flash9/system/Security.hx

@@ -8,8 +8,8 @@ extern class Security {
 	static var disableAVM1Loading : Bool;
 	static var exactSettings : Bool;
 	static var sandboxType(default,null) : String;
-	static function allowDomain( ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
-	static function allowInsecureDomain( ?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic ) : Void;
+	static function allowDomain(?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
+	static function allowInsecureDomain(?p1 : Dynamic, ?p2 : Dynamic, ?p3 : Dynamic, ?p4 : Dynamic, ?p5 : Dynamic) : Void;
 	static function loadPolicyFile(url : String) : Void;
 	static function showSettings(?panel : SecurityPanel) : Void;
 }

+ 1 - 1
std/flash9/text/CSMSettings.hx

@@ -1,6 +1,6 @@
 package flash.text;
 
-extern class CSMSettings {
+@:final extern class CSMSettings {
 	var fontSize : Float;
 	var insideCutoff : Float;
 	var outsideCutoff : Float;

+ 1 - 1
std/flash9/text/Font.hx

@@ -6,6 +6,6 @@ extern class Font {
 	var fontType(default,null) : FontType;
 	function new() : Void;
 	function hasGlyphs(str : String) : Bool;
-	static function enumerateFonts(?enumerateDeviceFonts : Bool) : Array<Dynamic>;
+	static function enumerateFonts(enumerateDeviceFonts : Bool = false) : Array<Dynamic>;
 	static function registerFont(font : Class<Dynamic>) : Void;
 }

+ 1 - 1
std/flash9/text/StaticText.hx

@@ -1,6 +1,6 @@
 package flash.text;
 
-extern class StaticText extends flash.display.DisplayObject {
+@:final extern class StaticText extends flash.display.DisplayObject {
 	var text(default,null) : String;
 	function new() : Void;
 }

+ 1 - 1
std/flash9/text/StyleSheet.hx

@@ -1,6 +1,6 @@
 package flash.text;
 
-extern class StyleSheet extends flash.events.EventDispatcher {
+extern class StyleSheet extends flash.events.EventDispatcher, implements Dynamic {
 	var styleNames(default,null) : Array<Dynamic>;
 	function new() : Void;
 	function clear() : Void;

+ 7 - 5
std/flash9/text/TextField.hx

@@ -42,6 +42,7 @@ extern class TextField extends flash.display.InteractiveObject {
 	var wordWrap : Bool;
 	function new() : Void;
 	function appendText(newText : String) : Void;
+	function copyRichText() : String;
 	function getCharBoundaries(charIndex : Int) : flash.geom.Rectangle;
 	function getCharIndexAtPoint(x : Float, y : Float) : Int;
 	function getFirstCharInParagraph(charIndex : Int) : Int;
@@ -54,12 +55,13 @@ extern class TextField extends flash.display.InteractiveObject {
 	function getLineText(lineIndex : Int) : String;
 	function getParagraphLength(charIndex : Int) : Int;
 	function getRawText() : String;
-	function getTextFormat(?beginIndex : Int, ?endIndex : Int) : TextFormat;
-	function getTextRuns(?beginIndex : Int, ?endIndex : Int) : Array<Dynamic>;
-	function getXMLText(?beginIndex : Int, ?endIndex : Int) : String;
-	function insertXMLText(beginIndex : Int, endIndex : Int, richText : String, ?pasting : Bool) : Void;
+	function getTextFormat(beginIndex : Int = -1, endIndex : Int = -1) : TextFormat;
+	function getTextRuns(beginIndex : Int = 0, endIndex : Int = 2147483647) : Array<Dynamic>;
+	function getXMLText(beginIndex : Int = 0, endIndex : Int = 2147483647) : String;
+	function insertXMLText(beginIndex : Int, endIndex : Int, richText : String, pasting : Bool = false) : Void;
+	function pasteRichText(richText : String) : Bool;
 	function replaceSelectedText(value : String) : Void;
 	function replaceText(beginIndex : Int, endIndex : Int, newText : String) : Void;
 	function setSelection(beginIndex : Int, endIndex : Int) : Void;
-	function setTextFormat(format : TextFormat, ?beginIndex : Int, ?endIndex : Int) : Void;
+	function setTextFormat(format : TextFormat, beginIndex : Int = -1, endIndex : Int = -1) : Void;
 }

+ 1 - 1
std/flash9/text/TextFormat.hx

@@ -20,5 +20,5 @@ extern class TextFormat {
 	var target : String;
 	var underline : Null<Bool>;
 	var url : String;
-	function new(?font : String, ?size : Null<Float>, ?color : Null<UInt>, ?bold : Null<Bool>, ?italic : Null<Bool>, ?underline : Null<Bool>, ?url : String, ?target : String, ?align : TextFormatAlign, ?leftMargin : Null<Float>, ?rightMargin : Null<Float>, ?indent : Null<Float>, ?leading : Null<Float>) : Void;
+	function new(?font : String, ?size : Float, ?color : UInt, ?bold : Bool, ?italic : Bool, ?underline : Bool, ?url : String, ?target : String, ?align : TextFormatAlign, ?leftMargin : Float, ?rightMargin : Float, ?indent : Float, ?leading : Float) : Void;
 }

+ 4 - 4
std/flash9/text/TextSnapshot.hx

@@ -5,10 +5,10 @@ extern class TextSnapshot {
 	function new() : Void;
 	function findText(beginIndex : Int, textToFind : String, caseSensitive : Bool) : Int;
 	function getSelected(beginIndex : Int, endIndex : Int) : Bool;
-	function getSelectedText(?includeLineEndings : Bool) : String;
-	function getText(beginIndex : Int, endIndex : Int, ?includeLineEndings : Bool) : String;
+	function getSelectedText(includeLineEndings : Bool = false) : String;
+	function getText(beginIndex : Int, endIndex : Int, includeLineEndings : Bool = false) : String;
 	function getTextRunInfo(beginIndex : Int, endIndex : Int) : Array<Dynamic>;
-	function hitTestTextNearPos(x : Float, y : Float, ?maxDistance : Float) : Float;
-	function setSelectColor(?hexColor : UInt) : Void;
+	function hitTestTextNearPos(x : Float, y : Float, maxDistance : Float = 0) : Float;
+	function setSelectColor(hexColor : UInt = 16776960) : Void;
 	function setSelected(beginIndex : Int, endIndex : Int, select : Bool) : Void;
 }

Some files were not shown because too many files changed in this diff