Nicolas Cannasse 19 years ago
parent
commit
543f8c07ca
46 changed files with 951 additions and 5 deletions
  1. 6 0
      std/flash/Accessibility.hx
  2. 3 0
      std/flash/AsBroadcaster.hx
  3. 35 1
      std/flash/Boot.hx
  4. 32 0
      std/flash/Camera.hx
  5. 10 0
      std/flash/Color.hx
  6. 10 0
      std/flash/Key.hx
  7. 21 0
      std/flash/LoadVars.hx
  8. 15 0
      std/flash/LocalConnection.hx
  9. 26 0
      std/flash/Microphone.hx
  10. 9 0
      std/flash/Mouse.hx
  11. 90 4
      std/flash/MovieClip.hx
  12. 9 0
      std/flash/MovieClipLoader.hx
  13. 12 0
      std/flash/PrintJob.hx
  14. 13 0
      std/flash/Selection.hx
  15. 22 0
      std/flash/SharedObject.hx
  16. 31 0
      std/flash/Sound.hx
  17. 12 0
      std/flash/Stage.hx
  18. 10 0
      std/flash/System.hx
  19. 76 0
      std/flash/TextField.hx
  20. 26 0
      std/flash/TextFormat.hx
  21. 13 0
      std/flash/TextSnapshot.hx
  22. 12 0
      std/flash/Video.hx
  23. 43 0
      std/flash/display/BitmapData.hx
  24. 9 0
      std/flash/external/ExternalInterface.hx
  25. 21 0
      std/flash/filters/BevelFilter.hx
  26. 5 0
      std/flash/filters/BitmapFilter.hx
  27. 12 0
      std/flash/filters/BlurFilter.hx
  28. 10 0
      std/flash/filters/ColorMatrixFilter.hx
  29. 18 0
      std/flash/filters/ConvolutionFilter.hx
  30. 18 0
      std/flash/filters/DisplacementMapFilter.hx
  31. 20 0
      std/flash/filters/DropShadowFilter.hx
  32. 17 0
      std/flash/filters/GlowFilter.hx
  33. 20 0
      std/flash/filters/GradientBevelFilter.hx
  34. 20 0
      std/flash/filters/GradientGlowFilter.hx
  35. 19 0
      std/flash/geom/ColorTransform.hx
  36. 30 0
      std/flash/geom/Matrix.hx
  37. 23 0
      std/flash/geom/Point.hx
  38. 41 0
      std/flash/geom/Rectangle.hx
  39. 13 0
      std/flash/geom/Transform.hx
  40. 22 0
      std/flash/net/FileReference.hx
  41. 13 0
      std/flash/net/FileReferenceList.hx
  42. 32 0
      std/flash/system/Capabilities.hx
  43. 22 0
      std/flash/system/IME.hx
  44. 8 0
      std/flash/system/Security.hx
  45. 14 0
      std/flash/text/StyleSheet.hx
  46. 8 0
      std/flash/text/TextRenderer.hx

+ 6 - 0
std/flash/Accessibility.hx

@@ -0,0 +1,6 @@
+extern class Accessibility
+{
+	static function isActive() : Bool;
+	static function sendEvent(mc : MovieClip, childID : Dynamic, event : Dynamic, isNonHtml : Bool) : Void;
+	static function updateProperties() : Void;
+}

+ 3 - 0
std/flash/AsBroadcaster.hx

@@ -0,0 +1,3 @@
+extern class AsBroadcaster {
+	static function initialize(o : Dynamic) : Void;
+}

+ 35 - 1
std/flash/Boot.hx

@@ -1,7 +1,41 @@
-native class Boot {
+class Boot {
 
 	public static var _global : Dynamic;
 	public static var _root : MovieClip;
 	public static var current : MovieClip;
 
+	public static var newObject : Dynamic -> Array<Dynamic> -> Dynamic;
+
+	private static function __init() {
+		untyped {
+			if( flash == null )
+				flash = newObject(null,[]);
+			else if( flash.text == null )
+				flash.text = newObject(null,[]);
+			flash.text.StyleSheet = TextField["StyleSheet"];
+			flash.system = newObject(null,[]);
+			flash.system.Capabilities = System.capabilities;
+			flash.system.Security = System.security;
+			flash.system.IME = System["IME"];
+			Math.pi = Math["PI"];
+			String.prototype.sub = String.prototype.substr;
+			Array.prototype.copy = Array.prototype.slice;
+			Array.prototype.insert = function(i,x) {
+				this.splice(i,0,x);
+			};
+			Array.prototype.remove = function(obj) {
+				var i = 0;
+				var l = this.length;
+				while( i < l ) {
+					if( this[i] == obj ) {
+						this.splice(i,1);
+						return true;
+					}
+					i++;
+				}
+				return false;
+			}
+		}
+	}
+
 }

+ 32 - 0
std/flash/Camera.hx

@@ -0,0 +1,32 @@
+extern class Camera
+{
+	static var names:Array<String>;
+	static function get(index:Int):Camera;
+
+	var nativeModes:Array<Dynamic>;
+	var keyFrameInterval:Float;
+	var bandwidth:Float;
+	var motionLevel:Float;
+	var motionTimeOut:Float;
+	var quality:Float;
+	var loopback:Bool;
+	var width:Float;
+	var height:Float;
+	var fps:Float;
+	var activityLevel:Float;
+	var muted:Bool;
+	var currentFps:Float;
+	var name:String;
+	var index:Float;
+
+	function setKeyFrameInterval(keyFrameInterval:Float):Void;
+	function setLoopback(compress:Bool):Void;
+	function setMode(width:Float,height:Float,fps:Float,favorArea:Bool):Void;
+	function setMotionLevel(motionLevel:Float,timeOut:Float):Void;
+	function setQuality(bandwidth:Float,quality:Float):Void;
+
+	function onActivity(active:Bool):Void;
+	function onStatus(infoObject:Dynamic):Void;
+}
+
+

+ 10 - 0
std/flash/Color.hx

@@ -0,0 +1,10 @@
+extern class Color
+{
+
+	function new(target : MovieClip) : Void;
+
+	function setRGB(offset:Float):Void;
+	function setTransform(transformObject:Dynamic):Void;
+	function getRGB():Float;
+	function getTransform():Dynamic;
+}

+ 10 - 0
std/flash/Key.hx

@@ -0,0 +1,10 @@
+extern class Key
+{
+	static function getAscii():Int;
+	static function getCode():Int;
+	static function isDown(code:Int):Bool;
+	static function isToggled(code:Int):Bool;
+
+	static function addListener(listener:Dynamic):Void;
+	static function removeListener(listener:Dynamic):Bool;
+}

+ 21 - 0
std/flash/LoadVars.hx

@@ -0,0 +1,21 @@
+extern class LoadVars implements Dynamic<String>
+{
+	var contentType:String;
+	var loaded:Bool;
+	var _customHeaders:Array<String>;
+
+	function new() : Void;
+
+	function addRequestHeader(header:Dynamic, headerValue:String):Void;
+	function load(url:String):Bool;
+	function send(url:String,target:String,method:String):Bool;
+	function sendAndLoad(url:String,target:String,method:String):Bool;
+	function getBytesLoaded():Float;
+	function getBytesTotal():Float;
+	function decode(queryString:String):Void;
+	function toString():String;
+
+	function onLoad(success:Bool):Void;
+	function onData(src:String):Void;
+
+}

+ 15 - 0
std/flash/LocalConnection.hx

@@ -0,0 +1,15 @@
+extern class LocalConnection implements Dynamic<String>
+{
+	function new() : Void;
+
+	function connect(connectionName:String):Bool;
+	function send(connectionName:String, methodName:String, args:Dynamic):Bool;
+	function close():Void;
+	function domain():String;
+	function allowDomain(domain:String):Bool;
+	function allowInsecureDomain(domain:String):Bool;
+
+	function onStatus(infoObject:Dynamic):Void;
+}
+
+

+ 26 - 0
std/flash/Microphone.hx

@@ -0,0 +1,26 @@
+extern class Microphone
+{
+	static var names:Array<Dynamic>;
+	static function get(index:Float):Microphone;
+
+	var gain:Float;
+	var index:Float;
+	var activityLevel:Float;
+	var name:String;
+	var silenceLevel:Float;
+	var silenceTimeOut:Float;
+	var rate:Float;
+	var useEchoSuppression:Bool;
+	var muted:Bool;
+	
+	function setSilenceLevel(silenceLevel:Float,timeOut:Float):Void;
+	function setRate(rate:Float):Void;
+	function setGain(gain:Float):Void;
+	function setUseEchoSuppression(useEchoSuppression:Bool):Void;
+	
+	function onActivity(active:Bool):Void;
+	function onStatus(infoObject:Dynamic):Void;
+}
+
+
+

+ 9 - 0
std/flash/Mouse.hx

@@ -0,0 +1,9 @@
+extern class Mouse
+{
+	static function show():Float;
+	static function hide():Float;
+	static function addListener(listener:Dynamic):Void;
+	static function removeListener(listener:Dynamic):Bool;
+}
+
+

+ 90 - 4
std/flash/MovieClip.hx

@@ -1,5 +1,14 @@
-native class MovieClip implements Dynamic
+extern class MovieClip implements Dynamic
 {
+	var useHandCursor : Bool;
+	var enabled : Bool;
+	var focusEnabled : Bool;
+	var tabChildren : Bool;
+	var tabEnabled : Bool;
+	var tabIndex : Float;
+	var hitArea : Dynamic;
+	var trackAsMenu : Bool;
+
 	var _x : Float;
 	var _y : Float;
 	var _xmouse : Float;
@@ -9,16 +18,93 @@ native class MovieClip implements Dynamic
 	var _width : Float;
 	var _height : Float;
 	var _alpha : Float;
+	var _lockroot : Bool;
 	var _visible : Bool;
+	var _target : String;
 	var _rotation : Float;
 	var _name : String;
-	var _framesloaded : Int;
-	var _currentframe : Int;
-	var _totalframes : Int;
+	var _framesloaded : Float;
+	var _droptarget : String;
+	var _currentframe : Float;
+	var _totalframes : Float;
 	var _quality : String;
 	var _focusrect : Bool;
+	var _soundbuftime : Float;
 	var _url : String;
 	var _parent : MovieClip;
+
+	function getURL(url : String, window : String, method : String) : Void;
+	function unloadMovie() : Void;
+	function loadVariables(url : String, method : String) : Void;
+	function loadMovie(url : String, method : String) : Void;
+	function attachMovie(id : String, name : String, depth : Float, initDynamic : Dynamic) : MovieClip;
+	function swapDepths(mc : Dynamic) : Void;
+	function localToGlobal(pt : Dynamic) : Void;
+	function globalToLocal(pt : Dynamic) : Void;
+	function hitTest() : Bool;
+	function getBounds(bounds  :  Dynamic) : Dynamic;
+	function getBytesLoaded() : Float;
+	function getBytesTotal() : Float;
+	function attachAudio(id : Dynamic) : Void;
+	function attachVideo(id : Dynamic) : Void;
+	function getDepth() : Float;
+	function getInstanceAtDepth(depth : Float) : MovieClip;
+	function getNextHighestDepth() : Float;
+	function setMask(mc : Dynamic) : Void;
+	function play() : Void;
+	function stop() : Void;
+	function nextFrame() : Void;
+	function prevFrame() : Void;
+	function gotoAndPlay(frame : Dynamic) : Void;
+	function gotoAndStop(frame : Dynamic) : Void;
+	function duplicateMovieClip(name : String, depth : Float, initDynamic : Dynamic) : MovieClip;
+	function removeMovieClip() : Void;
+	function startDrag(lockCenter : Bool, left : Float, top : Float, right : Float, bottom : Float) : Void;
+	function stopDrag() : Void;
+	function createEmptyMovieClip(name : String, depth : Float) : MovieClip;
+	function beginFill(rgb : Float, alpha : Float) : Void;
+	function beginGradientFill(fillType : String, colors : Array<Int>, alphas : Array<Float>, ratios : Array<Float>, matrix : Dynamic) : Void;
+	function moveTo(x : Float, y : Float) : Void;
+	function lineTo(x : Float, y : Float) : Void;
+	function curveTo(controlX : Float, controlY : Float, anchorX : Float, anchorY : Float) : Void;
+	function lineStyle(thickness : Float, rgb : Float, alpha : Float) : Void;
+	function endFill() : Void;
+	function clear() : Void;
+	function createTextField(instanceName : String, depth : Float, x : Float, y : Float, width : Float, height : Float) : TextField; /* Void before Flash 8 */
+	function getTextSnapshot() : TextSnapshot;
+	function getSWFVersion() : Float;
+
+	function onData() : Void;
+	function onDragOut() : Void;
+	function onDragOver() : Void;
+	function onEnterFrame() : Void;
+	function onKeyDown() : Void;
+	function onKeyUp() : Void;
+	function onKillFocus(newFocus : Dynamic) : Void;
+	function onLoad() : Void;
+	function onMouseDown() : Void;
+	function onMouseMove() : Void;
+	function onMouseUp() : Void;
+	function onPress() : Void;
+	function onRelease() : Void;
+	function onReleaseOutside() : Void;
+	function onRollOut() : Void;
+	function onRollOver() : Void;
+	function onSetFocus(oldFocus : Dynamic) : Void;
+	function onUnload() : Void;
+
+	// FLASH 8
+
+	var filters : Array<flash.filters.BitmapFilter>;
+	var blendMode : Dynamic;
+	var cacheAsBitmap : Bool;
+	var opaqueBackground : Float;
+	var scrollRect : Dynamic;
+	var transform : flash.geom.Transform;
+	var scale9Grid : flash.geom.Rectangle<Float>;
+	function getRect( bounds : Dynamic ) : Dynamic;
+	function attachBitmap( bmp : flash.display.BitmapData, depth : Float, pixelSnapping : String, smoothing : Bool ) : Void;
+
 }
 
 

+ 9 - 0
std/flash/MovieClipLoader.hx

@@ -0,0 +1,9 @@
+extern class MovieClipLoader
+{
+	function new() : Void;
+	function addListener(listener:Dynamic):Bool;
+	function getProgress(target:Dynamic):Dynamic;
+	function loadClip(url:String, target:Dynamic):Bool;
+	function removeListener(listener:Dynamic):Bool;
+	function unloadClip(target:Dynamic):Bool;
+}

+ 12 - 0
std/flash/PrintJob.hx

@@ -0,0 +1,12 @@
+extern class PrintJob
+{
+	function start():Bool;
+	function addPage(target:Dynamic, printArea:Dynamic, options:Dynamic, frameNum:Float):Bool;
+	function send():Void;
+
+	var paperWidth:Float;
+	var paperHeight:Float;
+	var pageWidth:Float;
+	var pageHeight:Float;
+	var orientation:String;
+}

+ 13 - 0
std/flash/Selection.hx

@@ -0,0 +1,13 @@
+extern class Selection
+{
+	static function getBeginIndex():Float;
+	static function getEndIndex():Float;
+	static function getCaretIndex():Float;
+	static function getFocus():String;
+	static function setFocus(newFocus:Dynamic):Bool;
+	static function setSelection(beginIndex:Float, endIndex:Float):Void;
+	static function addListener(listener:Dynamic):Void;
+	static function removeListener(listener:Dynamic):Bool;
+}
+
+

+ 22 - 0
std/flash/SharedObject.hx

@@ -0,0 +1,22 @@
+extern class SharedObject
+{
+	static function getLocal(name:String,localPath:String):SharedObject;
+	static function getRemote(name:String,remotePath:String,persistence:Dynamic):SharedObject;
+	static function deleteAll(url:String) : Void;
+	static function getDiskUsage(url:String) : Int;
+
+	function send(handlerName:String):Void;
+	function flush(minDiskSpace:Float):Dynamic;
+	function close():Void;
+	function getSize():Float;
+	function setFps(updatesPerSecond:Float):Bool;
+
+	function onStatus(infoObject:Dynamic):Void;
+	function onSync(objArray:Array<Dynamic>):Void;
+
+	function clear() : Void;
+
+	var data:Dynamic;
+}
+
+

+ 31 - 0
std/flash/Sound.hx

@@ -0,0 +1,31 @@
+extern class Sound
+{
+	var duration:Float;
+	var id3:Dynamic;
+	var position:Float;
+
+	function new(target:Dynamic) : Void;
+
+	function onLoad(success:Bool):Void;
+	function onSoundComplete():Void;
+	function onID3():Void;
+
+	function getPan():Float;
+	function getTransform():Dynamic;
+	function getVolume():Float;
+	function setPan(value:Float):Void;
+	function setTransform(transformObject:Dynamic):Void;
+	function setVolume(value:Float):Void;
+	function stop(linkageID:String):Void;
+	function attachSound(id:String):Void;
+	function start(secondOffset:Float, loops:Float):Void;
+	function getDuration():Float;
+	function setDuration(value:Float):Void;
+	function getPosition():Float;
+	function setPosition(value:Float):Void;
+	function loadSound(url:String, isStreaming:Bool):Void;
+	function getBytesLoaded():Float;
+	function getBytesTotal():Float;
+}
+
+

+ 12 - 0
std/flash/Stage.hx

@@ -0,0 +1,12 @@
+extern class Stage
+{
+	static var width:Float;
+	static var height:Float;
+	static var scaleMode:String;
+	static var align:String;
+	static var showMenu:Bool;
+	static function addListener(listener:Dynamic):Void;
+	static function removeListener(listener:Dynamic):Void;
+}
+
+

+ 10 - 0
std/flash/System.hx

@@ -0,0 +1,10 @@
+extern class System
+{
+	static var useCodepage:Bool;
+	static var exactSettings:Bool;
+	static function showSettings(tabID:Float):Void;
+	static function setClipboard(text:String):Void;
+	static function onStatus(infoObject:Dynamic):Void;
+}
+
+

+ 76 - 0
std/flash/TextField.hx

@@ -0,0 +1,76 @@
+extern class TextField
+{
+	var _x:Float;
+	var _y:Float;
+	var _xmouse:Float;
+	var _ymouse:Float;
+	var _xscale:Float;
+	var _yscale:Float;
+	var _width:Float;
+	var _height:Float;
+	var _alpha:Float;
+	var _visible:Bool;
+	var _target:String;
+	var _rotation:Float;
+	var _name:String;
+	var _framesloaded:Float;
+	var _droptarget:String;
+	var _currentframe:Float;
+	var _totalframes:Float;
+	var _quality:String;
+	var _focusrect:Bool;
+	var _soundbuftime:Float;
+	var _url:String;
+	var _parent:MovieClip;
+
+	var autoSize:Dynamic;
+	var background:Bool;
+	var backgroundColor:Float;
+	var border:Bool;
+	var borderColor:Float;
+	var bottomScroll:Float;
+	var condenseWhite:Bool;
+	var embedFonts:Bool;
+	var hscroll:Float;
+	var html:Bool;
+	var htmlText:String;
+	var length:Float;
+	var maxChars:Float;
+	var maxhscroll:Float;
+	var maxscroll:Float;
+	var multiline:Bool;
+	var password:Bool;
+	var restrict:String;
+	var scroll:Float;
+	var selectable:Bool;
+	var tabEnabled:Bool;
+	var tabIndex:Float;
+	var text:String;
+	var textColor:Float;
+	var textHeight:Float;
+	var textWidth:Float;
+	var type:String;
+	var variable:String;
+	var wordWrap:Bool;
+	var mouseWheelEnabled:Bool;
+
+	var styleSheet:flash.text.StyleSheet;
+
+	function replaceText(beginIndex:Float,endIndex:Float,newText:String):Void;
+	function replaceSel(newText:String):Void;
+	function getTextFormat(beginIndex:Float,endIndex:Float):TextFormat;
+	function setTextFormat():Void;
+	function removeTextField():Void;
+	function getNewTextFormat():TextFormat;
+	function setNewTextFormat(tf:TextFormat):Void;
+	function getDepth():Float;
+	function addListener(listener:Dynamic):Bool;
+	function removeListener(listener:Dynamic):Bool;
+	static function getFontList():Array<Dynamic>;
+
+	function onChanged(changedField:TextField):Void;
+	function onKillFocus(newFocus:Dynamic):Void;
+	function onScroller(scrolledField:TextField):Void;
+	function onSetFocus(oldFocus:Dynamic):Void;
+
+}

+ 26 - 0
std/flash/TextFormat.hx

@@ -0,0 +1,26 @@
+extern class TextFormat
+{
+	var font:String;
+	var size:Float;
+	var color:Float;
+	var url:String;
+	var target:String;
+	var bold:Bool;
+	var italic:Bool;
+	var underline:Bool;
+	var align:String;
+	var leftMargin:Float;
+	var rightMargin:Float;
+	var indent:Float;
+	var leading:Float;
+	var blockIndent:Float;
+	var tabStops:Array<Dynamic>;
+	var bullet:Bool;
+	function new(font:String,size:Float,textColor:Float,
+                    	bold:Bool,italic:Bool,underline:Bool,
+                    	url:String,window:String,align:String,
+                    	leftMargin:Float,rightMargin:Float,indent:Float,leading:Float) : Void;
+	function getTextExtent(text:String):Dynamic;
+}
+
+

+ 13 - 0
std/flash/TextSnapshot.hx

@@ -0,0 +1,13 @@
+extern class TextSnapshot
+{
+	function findText(startIndex:Float, textToFind:String, caseSensitive:Bool):Float;
+	function getCount():Float;
+	function getSelected(start:Float, end:Float):Bool;
+	function getSelectedText(includeLineEndings:Bool):String;
+	function getText(start:Float, end:Float, includeLineEndings:Bool):String;
+	function hitTestTextNearPos(x:Float, y:Float, closeDist:Float):Float;
+	function setSelectColor(color:Float):Void;
+	function setSelected(start:Float, end:Float, select:Bool):Void;
+}
+
+

+ 12 - 0
std/flash/Video.hx

@@ -0,0 +1,12 @@
+extern class Video
+{
+	var deblocking : Float;
+	var height : Float;
+	var smoothing : Bool;
+	var width : Float;
+
+	function attachVideo( source : Dynamic ) : Void;
+	function clear() : Void;
+}
+
+

+ 43 - 0
std/flash/display/BitmapData.hx

@@ -0,0 +1,43 @@
+package flash.display;
+
+import flash.geom.Rectangle;
+import flash.geom.Point;
+
+extern class BitmapData {
+
+	static function loadBitmap( id : String ) : BitmapData;
+
+	var width : Int;
+	var height : Int;
+	var rectangle : Rectangle<Int>;
+	var transparent : Bool;
+
+	function new( width : Int, height : Int, transparent : Bool, fillcolor : Int ) : Void;
+
+	function getPixel( x : Int, y : Int ) : Int;
+	function setPixel( x : Int, y : Int, color : Int ) : Void;
+	function getPixel32( x : Int, y : Int ) : Int;
+	function setPixel32( x : Int, y : Int, color : Int ) : Void;
+
+	function fillRect( r : Rectangle<Int>, color : Int ) : Void;
+	function copyPixels( src : BitmapData, srcRect : Rectangle<Int>, dst : Point<Int>, alpha : BitmapData, alphaPos : Point<Int>, mergeAlpha : Bool ) : Void;
+	function applyFilter( source : BitmapData, sourceRect : Rectangle<Int>, dest : Point<Int>, filter : flash.filters.BitmapFilter ) : Int;
+	function scroll( dx : Int, dy : Int ) : Void;
+	function threshold( src : BitmapData , srcRect : Rectangle<Int>, dstPoint : Point<Int>, op : String, threshold : Int, color : Int, mask : Int, copy : Bool ) : Int;
+	function draw( source : Dynamic, matrix : flash.geom.Matrix, colortrans : flash.geom.ColorTransform, blendMode : Dynamic, clipRect : Rectangle<Int>, smooth : Bool) : Void;
+	function pixelDissolve( src : BitmapData, srcRect : Rectangle<Int>, dst : Point<Int>, seed : Int, npixels : Int, fillColor : Int ) : Int;
+	function floodFill( x : Int, y : Int, color : Int ) : Void;
+	function getColorBoundsRect( mask : Int, color : Int, fillColor : Bool ) : Rectangle<Int>;
+	function perlinNoise( x : Int, y : Int, num : Int, seed : Int, stitch : Bool, noise : Bool, channels : Int, gray : Bool, offsets : Dynamic ) : Void;
+	function colorTransform( r : Rectangle<Int>, trans : flash.geom.ColorTransform ) : Void;
+	function hitTest( firstPoint : Point<Int>, firstAlpha : Int, object : Dynamic, secondPoint : Point<Int>, secondAlpha : Int ) : Bool;
+	function paletteMap( source : BitmapData, srcRect : Rectangle<Int>, dst : Point<Int>, reds : Array<Dynamic>, greens : Array<Dynamic>, blues : Array<Dynamic>, alphas : Array<Dynamic> ) : Void;
+	function merge( src : BitmapData, srcRect : Rectangle<Int>, dst : Point<Int>, redMult : Int, greenMult : Int, blueMult : Int, alphaMult : Int ) : Void;
+	function noise( seed : Int, low : Int, high : Int, channels : Int, gray : Bool ) : Void;
+	function copyChannel( source : BitmapData, sourceRect : Rectangle<Int>, dest : Point<Int>, sourceChannel : Int, destChannel : Int ) : Void;
+	function clone() : BitmapData;
+	function dispose() : Void;
+	function generateFilterRect(sourceRect : Rectangle<Int>, filter : flash.filters.BitmapFilter ) : Rectangle<Int>;
+
+}
+

+ 9 - 0
std/flash/external/ExternalInterface.hx

@@ -0,0 +1,9 @@
+package flash.external;
+
+extern class ExternalInterface {
+
+	static var available : Bool;
+	static function addCallback( methodName : String, instance : Dynamic, method : Dynamic ) : Bool;
+	static var call : Dynamic;
+
+}

+ 21 - 0
std/flash/filters/BevelFilter.hx

@@ -0,0 +1,21 @@
+package flash.filters;
+
+extern class BevelFilter extends BitmapFilter {
+
+	var type : String;
+	var blurX : Float;
+	var blurY : Float;
+	var knockout : Bool;
+	var strength : Float;
+	var quality : Float;
+	var shadowAlpha : Float;
+	var shadowColor : Float;
+	var highlightAlpha : Float;
+	var highlightColor : Float;
+	var angle : Float;
+	var distance : Float;
+
+	function new(distance : Float, angle : Float, highlightColor : Float, highlightAlpha : Float, shadowColor : Float, shadowAlpha : Float, blurX : Float, blurY : Float, strength : Float, quality : Float, type : String, knockout : Bool) : Void;
+	function clone() : BevelFilter;
+
+}

+ 5 - 0
std/flash/filters/BitmapFilter.hx

@@ -0,0 +1,5 @@
+package flash.filters;
+
+extern class BitmapFilter {
+
+}

+ 12 - 0
std/flash/filters/BlurFilter.hx

@@ -0,0 +1,12 @@
+package flash.filters;
+
+extern class BlurFilter extends BitmapFilter {
+
+	var quality : Float;
+	var blurX : Float;
+	var blurY : Float;
+
+	function new( bx : Float, by : Float, qual : Float ) : Void;
+	function clone() : BlurFilter;
+
+}

+ 10 - 0
std/flash/filters/ColorMatrixFilter.hx

@@ -0,0 +1,10 @@
+package flash.filters;
+
+extern class ColorMatrixFilter extends BitmapFilter {
+
+	var matrix : Array<Float>; // 20 Numbers
+
+	function new( matrix : Array<Float> ) : Void;
+	function clone() : ColorMatrixFilter;
+
+}

+ 18 - 0
std/flash/filters/ConvolutionFilter.hx

@@ -0,0 +1,18 @@
+package flash.filters;
+
+extern class ConvolutionFilter extends BitmapFilter {
+
+	var alpha : Float;
+	var color : Float;
+	var clamp : Bool;
+	var preserveAlpha : Bool;
+	var bias : Float;
+	var divisor : Float;
+	var matrix : Array<Dynamic>;
+	var matrixX : Float;
+	var matrixY : Float;
+
+	function new(matrixX : Float, matrixY : Float, matrix : Array<Dynamic>, divisor : Float, bias : Float, preserveAlpha : Bool, clamp : Bool, color : Float, alpha : Float) : Void;
+	function clone() : ConvolutionFilter;
+
+}

+ 18 - 0
std/flash/filters/DisplacementMapFilter.hx

@@ -0,0 +1,18 @@
+package flash.filters;
+
+extern class DisplacementMapFilter extends BitmapFilter {
+
+	var alpha : Float;
+	var color : Float;
+	var mode : String;
+	var scaleX : Float;
+	var scaleY : Float;
+	var componentX : Float;
+	var componentY : Float;
+	var mapPoint : flash.geom.Point<Float>;
+	var mapBitmap : flash.display.BitmapData;
+
+	function new(mapBitmap : flash.display.BitmapData, mapPoint : flash.geom.Point<Float>, componentX : Float, componentY : Float, scaleX : Float, scaleY : Float, mode : String, color : Float, alpha : Float) : Void;
+	function clone() : DisplacementMapFilter;
+
+}

+ 20 - 0
std/flash/filters/DropShadowFilter.hx

@@ -0,0 +1,20 @@
+package flash.filters;
+
+extern class DropShadowFilter extends BitmapFilter {
+
+	var hideObject : Bool;
+	var blurX : Float;
+	var blurY : Float;
+	var knockout : Bool;
+	var strength : Float;
+	var inner : Bool;
+	var quality : Float;
+	var alpha : Float;
+	var color : Float;
+	var angle : Float;
+	var distance : Float;
+
+	function new(distance : Float, angle : Float, color : Float, alpha : Float, blurX : Float, blurY : Float, strength : Float, quality : Float, inner : Bool, knockout : Bool, hideObject : Bool) : Void;
+	function clone() : DropShadowFilter;
+
+}

+ 17 - 0
std/flash/filters/GlowFilter.hx

@@ -0,0 +1,17 @@
+package flash.filters;
+
+extern class GlowFilter extends BitmapFilter {
+
+	var blurX : Float;
+	var blurY : Float;
+	var knockout : Bool;
+	var strength : Float;
+	var quality : Float;
+	var inner : Bool;
+	var alpha : Float;
+	var color : Float;
+
+	function new(color : Float, alpha : Float, blurX : Float, blurY : Float, strength : Float, quality : Float, inner : Bool, knockout : Bool) : Void;
+	function clone() : GlowFilter;
+
+}

+ 20 - 0
std/flash/filters/GradientBevelFilter.hx

@@ -0,0 +1,20 @@
+package flash.filters;
+
+extern class GradientBevelFilter extends BitmapFilter {
+
+	var type : String;
+	var knockout : Bool;
+	var strength : Float;
+	var quality : Float;
+	var blurX : Float;
+	var blurY : Float;
+	var ratios : Array<Dynamic>;
+	var alphas : Array<Dynamic>;
+	var colors : Array<Dynamic>;
+	var angle : Float;
+	var distance : Float;
+
+	function new(distance : Float, angle : Float, colors : Array<Dynamic>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, blurX : Float, blurY : Float, strength : Float, quality : Float, type : String, knockout : Bool) : Void;
+	function clone() : GradientBevelFilter;
+
+}

+ 20 - 0
std/flash/filters/GradientGlowFilter.hx

@@ -0,0 +1,20 @@
+package flash.filters;
+
+extern class GradientGlowFilter extends BitmapFilter {
+
+	var type : String;
+	var knockout : Bool;
+	var strength : Float;
+	var quality : Float;
+	var blurX : Float;
+	var blurY : Float;
+	var ratios : Array<Float>;
+	var alphas : Array<Float>;
+	var colors : Array<Float>;
+	var angle : Float;
+	var distance : Float;
+
+	function new(distance : Float, angle : Float, colors : Array<Dynamic>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, blurX : Float, blurY : Float, strength : Float, quality : Float, type : String, knockout : Bool) : Void;
+	function clone() : GradientGlowFilter;
+
+}

+ 19 - 0
std/flash/geom/ColorTransform.hx

@@ -0,0 +1,19 @@
+package flash.geom;
+
+extern class ColorTransform {
+
+	var rgb : Float;
+	var blueOffset : Float;
+	var greenOffset : Float;
+	var redOffset : Float;
+	var alphaOffset : Float;
+	var blueMultiplier : Float;
+	var greenMultiplier : Float;
+	var redMultiplier : Float;
+	var alphaMultiplier : Float;
+
+	function new( rm : Float, gm : Float, bm : Float, am : Float, ro : Float, go : Float, bo : Float, ao : Float ) : Void;
+	function toString() : String;
+	function concat( c : ColorTransform ) : Void;
+
+}

+ 30 - 0
std/flash/geom/Matrix.hx

@@ -0,0 +1,30 @@
+package flash.geom;
+
+extern class Matrix {
+
+	// 3x2 affine 2D matrix
+	var a : Float;
+	var b : Float;
+	var c : Float;
+	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 transformPoint( p : Point<Float> ) : Point<Float>;
+	function deltaTransformPoint( p : Point<Float> ) : Void; // does not apply translation
+	function toString() : String;
+	function scale( sx : Float, sy : Float ) : Void;
+	function translate( tx : Float, ty : Float ) : Void;
+	function rotate( r : Float ) : Void;
+	function identity() : Void;
+	function invert() : Void;
+	function concat( m : Matrix ) : Void;
+	function clone() : Matrix;
+
+	function createGradientBox( width : Float, height : Float, rot : Float, tx : Float, ty : Float ) : Void;
+	function createBox( scalex : Float, scaley : Float, rot : Float, tx : Float, ty : Float ) : Void;
+
+
+}

+ 23 - 0
std/flash/geom/Point.hx

@@ -0,0 +1,23 @@
+package flash.geom;
+
+extern class Point<T> {
+
+	var x : T;
+	var y : T;
+	var length : Float;
+
+	function new( x : T, y : T ) : Void;
+
+	function normalize( length : T ) : Void;
+	function add( p : Point<T> ) : Point<T>;
+	function subtract( p : Point<T> ) : Point<T>;
+	function equals( p : Point<T> ) : Bool;
+	function offset( dx : T, dy : T ) : Void;
+	function clone() : Point<T>;
+	function toString() : String;
+
+	static function distance( p1 : Point<T>, p2 : Point<T> ) : T;
+	static function interpolate( p1 : Point<T>, p2 : Point<T>, f : T ) : Point<T>;
+	static function polar( dist : T, angle : T ) : Point<T>;
+
+}

+ 41 - 0
std/flash/geom/Rectangle.hx

@@ -0,0 +1,41 @@
+package flash.geom;
+
+extern class Rectangle<T> {
+
+	var left : T;
+	var top : T;
+	var right : T;
+	var bottom : T;
+
+	// OR
+	var x : T;
+	var y : T;
+	var width : T;
+	var height : T;
+
+	// OR
+	var size : Point<T>;
+	var bottomRight : Point<T>;
+	var topLeft : Point<T>;
+
+	function new( x : T, y : T, w : T, h : T ) : Void;
+
+	function equals( r : Rectangle<T> ) : Bool;
+	function union( r : Rectangle<T> ) : Rectangle<T>;
+	function intersects( r : Rectangle<T> ) : Bool;
+	function intersection( r : Rectangle<T> ) : Rectangle<T>;
+	function containsRectangle( r : Rectangle<T> ) : Bool;
+	function containsPoint( p : Point<T> ) : Bool;
+	function contains( x : Float, y : Float ) : Bool;
+	function offsetPoint( p : Point<T> ) : Void;
+	function offset( x : T, y : T ) : Void;
+
+	function inflatePoint( p : Point<T> ) : Void;
+	function inflate( x : T, y : T ) : Void;
+	function isEmpty() : Bool;
+	function setEmpty() : Void;
+	function clone() : Rectangle<T>;
+
+	function toString() : String;
+
+}

+ 13 - 0
std/flash/geom/Transform.hx

@@ -0,0 +1,13 @@
+package flash.geom;
+
+extern class Transform {
+
+	var matrix : Matrix;
+	var concatenatedMatrix : Matrix;
+	var colorTransform : ColorTransform;
+	var concatenatedColorTransform : ColorTransform;
+	var pixelBounds : Rectangle<Float>;
+
+	function new( mc : MovieClip ) : Void;
+
+}

+ 22 - 0
std/flash/net/FileReference.hx

@@ -0,0 +1,22 @@
+package flash.net;
+
+extern class FileReference {
+
+	var creator : String;
+	var creationDate : Date;
+	var modificationDate : Date;
+	var size : Float;
+	var type : String;
+	var name : String;
+
+	function new() : Void;
+
+	function browse( typeList : Array<Dynamic> ) : Bool;
+	function upload( url : String ) : Bool;
+	function download( url : String, defaultName : String ) : Bool;
+	function cancel() : Void;
+
+	function addListener( listener : Dynamic ) : Void;
+	function removeListener( listener : Dynamic ) : Bool;
+
+}

+ 13 - 0
std/flash/net/FileReferenceList.hx

@@ -0,0 +1,13 @@
+package flash.net;
+
+extern class FileReferenceList {
+
+	var fileList : Array<Dynamic>;
+
+	function new() : Void;
+
+	function browse( typeList : Array<Dynamic> ) : Bool;
+	function addListener( listener : Dynamic ) : Void;
+	function removeListener( listener : Dynamic ) : Bool;
+
+}

+ 32 - 0
std/flash/system/Capabilities.hx

@@ -0,0 +1,32 @@
+package flash.system;
+
+extern class Capabilities
+{
+	static var hasAudio:Bool;
+	static var hasMP3:Bool;
+	static var hasAudioEncoder:Bool;
+	static var hasVideoEncoder:Bool;
+	static var screenResolutionX:Float;
+	static var screenResolutionY:Float;
+	static var screenDPI:Float;
+	static var screenColor:String;
+	static var pixelAspectRatio:Float;
+	static var hasAccessibility:Bool;
+	static var input:String;
+	static var isDebugger:Bool;
+	static var language:String;
+	static var manufacturer:String;
+	static var os:String;
+	static var serverString:String;
+	static var version:String;
+	static var hasPrinting:Bool;
+	static var playerType:String;
+	static var hasStreamingAudio:Bool;
+	static var hasScreenBroadcast:Bool;
+	static var hasScreenPlayback:Bool;
+	static var hasStreamingVideo:Bool;
+	static var hasEmbeddedVideo:Bool;
+	static var avHardwareDisable:Bool;
+	static var localFileReadDisable:Bool;
+	static var windowlessDisable:Bool;
+}

+ 22 - 0
std/flash/system/IME.hx

@@ -0,0 +1,22 @@
+package flash.system;
+
+extern class IME {
+
+	static var _ALPHANUMERIC_FULL : String;
+	static var _ALPHANUMERIC_HALF : String;
+	static var _CHINESE : String;
+	static var _JAPANESE_HIRAGANA : String;
+	static var _JAPANESE_KATAKANA_FULL : String;
+	static var _JAPANESE_KATAKANA_HALF : String;
+	static var _KOREAN : String;
+	static var _UNKNOWN : String;
+
+	static function getEnabled() : Bool;
+	static function setEnabled(enabled:Bool) : Bool;
+	static function getConversionMode() : String;
+	static function setConversionMode(mode:String) : Bool;
+	static function setCompositionString (composition:String) : Bool;
+	static function doConversion() : Bool;
+	static function addListener(listener:Dynamic) : Void;
+	static function removeListener(listener:Dynamic) : Bool;
+}

+ 8 - 0
std/flash/system/Security.hx

@@ -0,0 +1,8 @@
+package flash.system;
+
+extern class Security
+{
+	static function allowDomain():Void;
+	static function allowInsecureDomain():Void;
+	static function loadPolicyFile(url:String):Void;
+}

+ 14 - 0
std/flash/text/StyleSheet.hx

@@ -0,0 +1,14 @@
+package flash.text;
+
+extern class StyleSheet
+{
+	function getStyle(name:String):Dynamic;
+	function setStyle(name:String,style:Dynamic):Void;
+	function clear():Void;
+	function getStyleNames():Array<Dynamic>;
+	function transform(style:Dynamic):TextFormat;
+	function parseCSS(cssText:String):Bool;
+	function parse(cssText:String):Bool;
+	function load(url:String):Bool;
+	function onLoad(success:Bool):Void;
+}

+ 8 - 0
std/flash/text/TextRenderer.hx

@@ -0,0 +1,8 @@
+package flash.text;
+
+extern class TextRenderer {
+
+	static var maxLevel : Float;
+	static function setAdvancedAntialiasingTable( fontName : String, fontStyle: String, colorType : String, advancedAntialiasingTable : Array<Dynamic> ) : Void;
+
+}