You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/10/31 17:49:15 UTC

[1/6] PlayerGlobalToJS AIR app

Repository: flex-asjs
Updated Branches:
  refs/heads/develop f4eb38ee2 -> 83c26c9d0


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as
new file mode 100644
index 0000000..25149bb
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as
@@ -0,0 +1,489 @@
+package nl.ixms.vo
+{
+
+import mx.utils.StringUtil;
+
+import nl.ixms.Utils;
+
+import org.as3commons.lang.ClassUtils;
+import org.as3commons.reflect.BaseParameter;
+import org.as3commons.reflect.Constructor;
+import org.as3commons.reflect.Parameter;
+import org.as3commons.reflect.Type;
+
+public final class Clazz
+{
+	//----------------------------------------------------------------------
+	//
+	//  Class Constants 
+	//
+	//----------------------------------------------------------------------
+	
+	public static const MEMBER_SEPARATOR:String = ';\n\n\n';
+
+	
+	
+	//----------------------------------------------------------------------
+	//
+	//  Constants 
+	//
+	//----------------------------------------------------------------------
+	
+	public function Clazz(type:Type) {
+		this.type_ = type;
+	}
+	
+
+	
+	//----------------------------------------------------------------------
+	//
+	//  Constants 
+	//
+	//----------------------------------------------------------------------
+	
+	private const ES5_STRICT:String = '\'use strict\';\n\n';
+	
+	private const GOOG_INHERITS:String = 'goog.inherits({0}, {1});';
+	
+	private const GOOG_PROVIDE:String = 'goog.provide(\'{0}\');';
+	
+	private const GOOG_REQUIRE:String = 'goog.require(\'{0}\');';
+	
+	private const JSDOC_FILE_OVERVIEW:String = 
+		'/**\n' +
+		' * @fileoverview \'{0}\'\n' +
+		' *\n' +
+		' * @author erikdebruin@apache.org (Erik de Bruin)\n' +
+		' */\n\n';
+	
+	private const JS_BLOCK_COMMENT_MAJOR:String = 
+		'//------------------------------------------------------------------' +
+		    '------------\n' +
+		'//\n' +
+		'//  {0}\n' + 
+		'//\n' +
+		'//------------------------------------------------------------------' +
+		    '------------\n\n\n';
+	
+	private const JS_METADATA:String = 
+		'{0}.prototype.FLEXJS_CLASS_INFO =\n' +
+		'    { names: [{ name: \'{1}\', qName: \'{0}\'}],\n' + 
+		'      interfaces: [{2}] }';
+	
+	private const JS_CONSTRUCTOR:String = '{0} = function({1}) {{3}{2}};{4}\n';
+	
+	
+	
+	//----------------------------------------------------------------------
+	//
+	//  Properties 
+	//
+	//----------------------------------------------------------------------
+	
+	//--------------------------------------
+	//  compositeClazz 
+	//--------------------------------------
+	
+	private var compositeClazz_:Type;
+	
+	private var compositeClazzIsSet_:Boolean;
+	
+	public function get compositeClazz():Type {
+		var compositeClazzInterface:String,
+			compositeClazzNameArr:Array;
+		
+		if (!compositeClazzIsSet_) {
+			if (this.qName.indexOf('flash.') === 0) {
+				compositeClazzNameArr = compositeClazzName.split('.');
+				compositeClazzNameArr[compositeClazzNameArr.length - 1] = 'I' + 
+					compositeClazzNameArr[compositeClazzNameArr.length - 1];
+				compositeClazzInterface = compositeClazzNameArr.join('.');
+				
+				compositeClazz_ = Type.forName(compositeClazzInterface);
+			}
+			
+			compositeClazzIsSet_ = true;
+		}
+		
+		return compositeClazz_;
+	}
+	
+	//--------------------------------------
+	//  compositeClazzName
+	//--------------------------------------
+	
+	public function get compositeClazzName():String {
+		return this.qName.replace('flash', 'vf2js');
+	}
+	
+	//--------------------------------------
+	//  interfaces 
+	//--------------------------------------
+	
+	private var interfaces_:Array;
+	
+	private var interfacesIsSet_:Boolean;
+	
+	public function get interfaces():Array {
+		var i:int,
+			j:int,
+			superInterfaces:Array,
+			superInterfacesClazz:Class;
+		
+		if (!interfacesIsSet_) {
+			interfaces_ = this.type.interfaces;
+			superInterfacesClazz = ClassUtils.getSuperClass(this.type.clazz);
+			if (superInterfacesClazz && interfaces_.length > 0) {
+				superInterfaces = 
+					ClassUtils.getFullyQualifiedImplementedInterfaceNames(
+						superInterfacesClazz);
+				if (superInterfaces) {
+					for (i = interfaces_.length - 1; i > -1; i--) {
+						for (j = superInterfaces.length - 1; j > -1; j--) {
+							if (interfaces_[i] === 
+									Utils.cleanClassQName(superInterfaces[j])) {
+								interfaces_.splice(i, 1);
+								
+								break;
+							}
+						}
+					}
+				}
+			}
+			
+			interfacesIsSet_ = true;
+		}
+		
+		return interfaces_;
+	}
+	
+	//--------------------------------------
+	//  name 
+	//--------------------------------------
+	
+	private var name_:String;
+
+	public function get name():String {
+		return name_;
+	}
+	
+	public function set name(value:String):void {
+		if (name_ === value) {
+			return;
+		}
+		
+		name_ = value;
+	}
+	
+	//--------------------------------------
+	//  output 
+	//--------------------------------------
+	
+	private var output_:String;
+
+	public function get output():String {
+		return output_;
+	}
+
+	public function set output(value:String):void {
+		if (output_ === value) {
+			return;
+		}
+		
+		output_ = value;
+	}
+
+	//--------------------------------------
+	//  qName 
+	//--------------------------------------
+	
+	private var qName_:String;
+	
+	public function get qName():String {
+		return qName_;
+	}
+	
+	public function set qName(value:String):void {
+		if (qName_ === value) {
+			return;
+		}
+		
+		qName_ = value;
+	}
+	
+	//--------------------------------------
+	//  requires 
+	//--------------------------------------
+	
+	private var requires_:Array;
+	
+	private var requiresIsSet_:Boolean;
+	
+	public function get requires():Array {
+		var i:int,
+			n:int;
+		
+		if (!requiresIsSet_) {
+			requires_ = [];
+			
+			if (superClazz) {
+				requires_.push(superClazz);
+			}
+			
+			if (compositeClazz) {
+				requires_.push(compositeClazzName);
+			}
+			
+			for (i = 0, n = interfaces.length; i < n; i++) {
+				requires_.push(interfaces[i]);
+			}
+			
+			requires_.sort();
+			
+			requiresIsSet_ = true;
+		}
+		
+		return requires_;
+	}
+	
+	//--------------------------------------
+	//  superClazz 
+	//--------------------------------------
+	
+	private var superClazz_:String;
+	
+	private var superClazzIsSet_:Boolean;
+	
+	public function get superClazz():String {
+		if (!superClazzIsSet_) {
+			if (this.type.extendsClasses.length > 0) {
+				superClazz_ = 
+					Utils.cleanClassQName(this.type.extendsClasses[0]);
+				if (superClazz_ === 'Object' && this.qName !== 'Class') {
+					superClazz_ = 'Class';
+				}
+			}
+			
+			superClazzIsSet_ = true;
+		}
+		
+		return superClazz_;
+	}
+	
+	//--------------------------------------
+	//  type 
+	//--------------------------------------
+	
+	private var type_:Type;
+	
+	public function get type():Type {
+		return type_;
+	}
+	
+	public function set type(value:Type):void {
+		if (type_ === value) {
+			return;
+		}
+		
+		type_ = value;
+	}
+
+	
+	
+	//----------------------------------------------------------------------
+	//
+	//  Methods 
+	//
+	//----------------------------------------------------------------------
+	
+	//--------------------------------------
+	//  addConstructor
+	//--------------------------------------
+	
+	private function addConstructor():void {
+		var baseParameter:BaseParameter,
+			compositeClazzLine:String,
+			i:int,
+			n:int,
+			parameter:Parameter,
+			parameterName:String,
+			parameterNames:String,
+			parameterNamesArray:Array,
+			parameters:Array,
+			tmp1:String,
+			tmp2:String;
+		
+		tmp1 = '';
+		tmp2 = '';
+		
+		compositeClazzLine = '';
+		
+		if (!this.type) { // function (e.g. flash.utils.getDefinitionByName)
+			/*
+			flash.net.navigateToURL
+			+flash.utils.getDefinitionByName
+			flash.net.getClassByAlias
+			flash.utils.flash_proxy
+			flash.utils.getQualifiedClassName
+			flash.utils.clearInterval
+			flash.utils.setTimeout
+			flash.utils.describeType
+			flash.utils.getTimer
+			flash.net.sendToURL
+			flash.system.fscommand
+			flash.crypto.generateRandomBytes
+			flash.utils.setInterval
+			flash.utils.escapeMultiByte
+			flash.utils.getQualifiedSuperclassName
+			flash.utils.unescapeMultiByte
+			flash.utils.clearTimeout
+			flash.net.registerClassAlias
+			mx.core.mx_internal
+			flash.utils.getAliasName
+			*/
+
+			baseParameter = new BaseParameter('String', null, false);
+			parameter = new Parameter(baseParameter, 0);
+			
+			parameterName = 'arg0';
+			
+			if (compositeClazz) {
+				compositeClazzLine = '\n  return this.$_implementation = new ' + 
+					compositeClazzName + '(' + parameterName + ');\n';
+			}
+			
+			this.requires_ = [];
+			if (compositeClazzName === 'vf2js.utils.getDefinitionByName') {
+				this.requires_.push(compositeClazzName);
+			}
+			this.requiresIsSet_ = true;
+			this.addGoogRequires();
+			
+			this.output += JSDoc.emitJSDoc(JSDoc.CONSTRUCTOR, '', '', 
+				[parameter]);
+			
+			this.output += StringUtil.substitute(JS_CONSTRUCTOR, 
+				[this.qName,
+				 [parameterName],
+				 compositeClazzLine,
+				 tmp1,
+				 tmp2]);
+		} else {
+			parameters = Constructor(this.type.constructor).parameters;
+			
+			parameterNamesArray = [];
+			for (i = 0, n = parameters.length; i < n; i++) {
+				parameterNamesArray.push(
+					((Parameter(parameters[i]).isOptional) ? 'opt_' : '') + 
+					'arg' + i);
+			}
+			parameterNames = parameterNamesArray.join(', ');
+			if (superClazz && !(this.qName === 'Class')) {
+				tmp1 = '\n  ' + this.qName + '.base(this, \'constructor\'' + 
+					((parameterNamesArray.length > 0) ? ', ' : '') + 
+					parameterNames + ');\n';
+				tmp2 = '\n' + StringUtil.substitute(GOOG_INHERITS, 
+					[this.qName, superClazz]);
+			}
+			
+			if (compositeClazz) {
+				compositeClazzLine = '';
+				compositeClazzLine += '\n  /**';
+				compositeClazzLine += '\n   * @type {' + compositeClazzName + '}';
+				compositeClazzLine += '\n   */';
+				compositeClazzLine += '\n  this.$_implementation = new ' + 
+					compositeClazzName + '(' + parameterNames + ');\n';
+			}
+			
+			this.addGoogRequires();
+			
+			this.output += JSDoc.emitJSDoc(
+				((this.type.isInterface) ? 
+					JSDoc.INTERFACE : 
+					JSDoc.CONSTRUCTOR), 
+				superClazz, interfaces, parameters);
+			
+			this.output += StringUtil.substitute(JS_CONSTRUCTOR, 
+				[this.qName,
+				 parameterNames,
+				 compositeClazzLine,
+				 tmp1,
+				 tmp2]);
+		}
+		
+		this.output += '\n\n';
+		
+		this.addMetaData();
+	}
+	
+	//--------------------------------------
+	//  addGoogRequire
+	//--------------------------------------
+	
+	private function addGoogRequire(qName:String):void {
+		this.output += StringUtil.substitute(GOOG_REQUIRE, [qName]);
+	}
+	
+	//--------------------------------------
+	//  addGoogRequires
+	//--------------------------------------
+	
+	private function addGoogRequires():void {
+		var i:int,
+			n:int;
+		
+		if (requires[0] !== 'Object') {
+			this.output += ((requires.length > 0) ? '\n' : '');
+			
+			for (i = 0, n = requires.length; i < n; i++) {
+				this.addGoogRequire(requires[i]);
+				this.output += '\n';
+			}
+		}
+		
+		this.output += '\n\n\n';
+	}
+	
+	//--------------------------------------
+	//  addMajorBlockComment 
+	//--------------------------------------
+	
+	public function addMajorBlockComment(type:String):void {
+		this.output += StringUtil.substitute(JS_BLOCK_COMMENT_MAJOR, [type]);
+	}
+	
+	//--------------------------------------
+	//  addMetaData
+	//--------------------------------------
+	
+	private function addMetaData():void {
+		this.output += JSDoc.emitJSDoc(JSDoc.METADATA);
+		
+		this.output += StringUtil.substitute(JS_METADATA, 
+			[this.qName, this.name, ((interfaces_) ? interfaces_ : [''])]);
+		
+		this.output += '\n\n\n';
+	}
+	
+	//--------------------------------------
+	//  startOutput 
+	//--------------------------------------
+	
+	public function startOutput():void {
+		this.output = '';
+		
+		this.output += StringUtil.substitute(JSDOC_FILE_OVERVIEW, 
+			[this.qName_]); 
+		
+		this.output += ES5_STRICT; 
+		
+		this.output += StringUtil.substitute(GOOG_PROVIDE, [this.qName_]); 
+		
+		this.output += '\n';
+		
+		this.addConstructor();
+	}
+	
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as
new file mode 100644
index 0000000..da2223c
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as
@@ -0,0 +1,11 @@
+package nl.ixms.vo
+{
+	
+public final class ClazzMemberTypeLists
+{
+	public function ClazzMemberTypeLists() {}
+	
+	
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as
new file mode 100644
index 0000000..750111b
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as
@@ -0,0 +1,111 @@
+package nl.ixms.vo
+{
+
+import nl.ixms.Utils;
+
+import org.as3commons.reflect.Parameter;
+
+public final class JSDoc
+{
+	public static const CONSTRUCTOR:String = 'constructor';
+	public static const INTERFACE:String = 'interface';
+	public static const METADATA:String = 'metadata';
+	public static const METHOD:String = 'method';
+	public static const FIELD:String = 'field';
+	
+	private static const JSDOC_END:String = ' */\n';
+	private static const JSDOC_LINE:String = ' *';
+	private static const JSDOC_START:String = '/**\n';
+	
+	public static function emitJSDoc(which:String, ...parameters):String {
+		var i:int, n:int, parameter:Parameter, result:String;
+		
+		result = JSDOC_START;
+		
+		switch (which) {
+			case CONSTRUCTOR :
+			case INTERFACE :
+				if (which === INTERFACE) {
+					result += JSDOC_LINE + ' @interface\n';
+				} else {
+					result += JSDOC_LINE + ' @constructor\n';
+					result += JSDOC_LINE + ' @struct\n';
+				}
+				if (parameters[0] && parameters[0] !== '' && parameters[0] !== 'Object') {
+					result += JSDOC_LINE + ' @extends {' + parameters[0] + '}\n';
+				}
+				if (parameters[1] && parameters[1] !== '') {
+					for (i = 0, n = parameters[1].length; i < n; i++) {
+						result += JSDOC_LINE + ' @implements {' + parameters[1][i] + '}\n';
+					}
+				}
+				if (parameters[2]) {
+					for (i = 0, n = parameters[2].length; i < n; i++) {
+						parameter = Parameter(parameters[2][i]);
+						result += JSDOC_LINE + ' @param {' + 
+							Utils.parseType(parameter.type.name) + 
+							((parameter.isOptional) ? '=' : '') + 
+							'} ' +
+							((parameter.isOptional) ? 'opt_' : '') + 
+							'arg' + i +
+							' Argument ' + i +
+							((parameter.isOptional) ? ' (optional)' : '') + 
+							'\n';
+					}
+				}
+				
+				break;
+			
+			case METADATA :
+				result += JSDOC_LINE + ' Metadata\n';
+				result += JSDOC_LINE + '\n';
+				result += JSDOC_LINE + ' @type {Object.<string, Array.<Object>>}\n';
+				
+				break;
+			
+			
+			case METHOD :
+				result += JSDOC_LINE + ' ' + parameters[0] + '\n';
+				
+				if (parameters[1] && parameters[1].length > 0) {
+					result += JSDOC_LINE + '\n';
+					for (i = 0, n = parameters[1].length; i < n; i++) {
+						parameter = Parameter(parameters[1][i]);
+						result += JSDOC_LINE + ' @param {' + 
+							Utils.parseType(parameter.type.name) + 
+							((parameter.isOptional) ? '=' : '') + 
+							'} ' +
+							((parameter.isOptional) ? 'opt_' : '') + 
+							'arg' + i +
+							' Argument ' + i +
+							((parameter.isOptional) ? ' (optional)' : '') + 
+							'\n';
+					}
+				}
+				if (parameters[2]) {
+					result += JSDOC_LINE + '\n';
+					result += JSDOC_LINE + ' @return {' + parameters[2] + '}\n';
+				}
+				
+				break;
+			
+			case FIELD :
+				result += JSDOC_LINE + ' ' + parameters[0] + '\n';
+				result += JSDOC_LINE + '\n';
+				result += JSDOC_LINE + ' @type {' + parameters[1] + '}\n';
+				
+				break;
+			
+			default :
+				break;
+		}
+		
+		result += JSDOC_END;
+		
+		return result;
+	};
+	
+	public function JSDoc() {}
+	
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/shadowInterfaces.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/shadowInterfaces.as b/vf2js/utils/PlayerGlobalToJS/src/shadowInterfaces.as
new file mode 100644
index 0000000..53518ad
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/shadowInterfaces.as
@@ -0,0 +1,16 @@
+
+import vf2js.display.IDisplayObject; vf2js.display.IDisplayObject;
+import vf2js.display.IDisplayObjectContainer; vf2js.display.IDisplayObjectContainer;
+import vf2js.display.IInteractiveObject; vf2js.display.IInteractiveObject;
+import vf2js.display.ILoaderInfo; vf2js.display.ILoaderInfo;
+import vf2js.display.IMovieClip; vf2js.display.IMovieClip;
+import vf2js.display.ISprite; vf2js.display.ISprite;
+import vf2js.display.IStage; vf2js.display.IStage;
+import vf2js.events.IEvent; vf2js.events.IEvent;
+import vf2js.events.IEventDispatcher; vf2js.events.IEventDispatcher;
+import vf2js.events.IProgressEvent; vf2js.events.IProgressEvent;
+import vf2js.events.ITimerEvent; vf2js.events.ITimerEvent;
+import vf2js.system.ICapabilities; vf2js.system.ICapabilities;
+import vf2js.system.IApplicationDomain; vf2js.system.IApplicationDomain;
+import vf2js.utils.IgetDefinitionByName; vf2js.utils.IgetDefinitionByName;
+import vf2js.utils.ITimer; vf2js.utils.ITimer;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as
new file mode 100644
index 0000000..5fd7821
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as
@@ -0,0 +1,27 @@
+package vf2js.display
+{
+
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.LoaderInfo;
+import flash.display.Stage;
+
+public interface IDisplayObject
+{
+	function get loaderInfo():LoaderInfo;
+	
+	function get parent():DisplayObjectContainer;
+	function set parent(value:DisplayObjectContainer):void;
+	
+	function get root():DisplayObject;
+	
+	function get stage():Stage;
+	
+	function get scaleX():Number;
+	function set scaleX(value:Number):void;
+	
+	function get scaleY():Number;
+	function set scaleY(value:Number):void;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as
new file mode 100644
index 0000000..de2298c
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as
@@ -0,0 +1,12 @@
+package vf2js.display
+{
+
+import flash.display.DisplayObject;
+
+public interface IDisplayObjectContainer
+{
+	function addChild(child:DisplayObject):	DisplayObject;
+	function addChildAt(child:DisplayObject, index:int):DisplayObject;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as
new file mode 100644
index 0000000..490355c
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as
@@ -0,0 +1,8 @@
+package vf2js.display
+{
+
+public interface IInteractiveObject
+{
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as
new file mode 100644
index 0000000..c38f38e
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as
@@ -0,0 +1,21 @@
+package vf2js.display
+{
+
+import flash.events.Event;
+
+public interface ILoaderInfo
+{
+	function get bytesLoaded():uint;
+
+	function get bytesTotal():uint;
+
+	function get height():int;
+	
+	function get url():String;
+	
+	function get width():int;
+
+	function dispatchEvent(event:Event):void;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as
new file mode 100644
index 0000000..61c1b28
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as
@@ -0,0 +1,17 @@
+package vf2js.display
+{
+
+public interface IMovieClip
+{
+	function get currentFrame():int;
+	
+	function get framesLoaded():int;
+	
+	function get totalFrames():int;
+	
+	function nextFrame():void;
+	
+	function stop():void;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as
new file mode 100644
index 0000000..cab5c41
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as
@@ -0,0 +1,8 @@
+package vf2js.display
+{
+
+public interface ISprite
+{
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as
new file mode 100644
index 0000000..c8c783e
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as
@@ -0,0 +1,26 @@
+package vf2js.display
+{
+
+import flash.events.Event;
+
+public interface IStage
+{
+	function get align():String;
+	function set align(value:String):void;
+	
+	function get quality():String;
+	function set quality(value:String):void;
+	
+	function get scaleMode():String;
+	function set scaleMode(value:String):void;
+	
+	function get stageHeight():int;
+	
+	function get stageWidth():int;
+	
+	function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void;
+	function dispatchEvent(event:Event):Boolean;
+	function hasEventListener(type:String):Boolean;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as
new file mode 100644
index 0000000..d3a5bc4
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as
@@ -0,0 +1,15 @@
+package vf2js.events
+{
+
+public interface IEvent
+{
+	function get bubbles():Boolean;
+	
+	function get cancelable():Boolean;
+	
+	function get type():String;
+	
+	function toString():String;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as
new file mode 100644
index 0000000..620320a
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as
@@ -0,0 +1,15 @@
+package vf2js.events
+{
+
+import flash.events.Event;
+
+public interface IEventDispatcher
+{
+	function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void;
+	function dispatchEvent(event:Event):void;
+	function hasEventListener(type:String):void;
+	function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void;
+	function toString():String;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as
new file mode 100644
index 0000000..6780d93
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as
@@ -0,0 +1,9 @@
+package vf2js.events
+{
+
+public interface IProgressEvent
+{
+	function toString():String;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as
new file mode 100644
index 0000000..1404cd5
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as
@@ -0,0 +1,9 @@
+package vf2js.events
+{
+
+public interface ITimerEvent
+{
+	function toString():String;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as
new file mode 100644
index 0000000..6fc8d3c
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as
@@ -0,0 +1,10 @@
+package vf2js.system
+{
+
+public interface IApplicationDomain
+{
+	function getDefinition(name:String):Object;
+	function hasDefinition(name:String):Boolean;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as
new file mode 100644
index 0000000..0e71876
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as
@@ -0,0 +1,17 @@
+package vf2js.system
+{
+
+public interface ICapabilities
+{
+	function get language():String;
+	
+	function get os():String;
+	
+	function get playerType():String;
+	
+	function get screenDPI():Number;
+	
+	function get version():String;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as
new file mode 100644
index 0000000..28f830e
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as
@@ -0,0 +1,14 @@
+package vf2js.utils
+{
+
+public interface ITimer
+{
+	function get delay():Number;
+	function set delay(value:Number):void;
+
+	function reset():void;
+	function start():void;
+	function stop():void;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as b/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as
new file mode 100644
index 0000000..409a77f
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as
@@ -0,0 +1,8 @@
+package vf2js.utils
+{
+
+public interface IgetDefinitionByName
+{
+}
+
+}
\ No newline at end of file


[4/6] git commit: [flex-asjs] [refs/heads/develop] - Added FP 12 - 15 swfversion conditions

Posted by er...@apache.org.
Added FP 12 - 15 swfversion conditions

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/97c1fd80
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/97c1fd80
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/97c1fd80

Branch: refs/heads/develop
Commit: 97c1fd8007d4b227ad88c4dda2a221e5c7b26103
Parents: f4eb38e
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Oct 24 13:42:30 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Oct 31 17:02:00 2014 +0100

----------------------------------------------------------------------
 frameworks/as/build.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/97c1fd80/frameworks/as/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/build.xml b/frameworks/as/build.xml
index 7573898..46e2145 100644
--- a/frameworks/as/build.xml
+++ b/frameworks/as/build.xml
@@ -190,6 +190,18 @@
 		<condition property="playerglobal.swfversion" value="22">
 			<equals arg1="${playerglobal.version}" arg2="11.9" />
 		</condition>
+		<condition property="playerglobal.swfversion" value="23">
+			<equals arg1="${playerglobal.version}" arg2="12.0" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="24">
+			<equals arg1="${playerglobal.version}" arg2="13.0" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="25">
+			<equals arg1="${playerglobal.version}" arg2="14.0" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="26">
+			<equals arg1="${playerglobal.version}" arg2="15.0" />
+		</condition>
 	</target>	
 
 </project>


[5/6] git commit: [flex-asjs] [refs/heads/develop] - Updated .gitignore to exclude generated files

Posted by er...@apache.org.
Updated .gitignore to exclude generated files

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/911f6443
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/911f6443
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/911f6443

Branch: refs/heads/develop
Commit: 911f64434d024aa01077f6f01a5ab5ec109fcdd9
Parents: cde5a71
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Oct 31 16:57:43 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Oct 31 17:02:00 2014 +0100

----------------------------------------------------------------------
 .gitignore | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/911f6443/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index e9e0002..a21209c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -118,3 +118,7 @@ _ReSharper*/
 *.rar
 *.tar
 html-template
+
+#VF2JS generated files
+bin
+vf2js/frameworks/js/
\ No newline at end of file


[2/6] git commit: [flex-asjs] [refs/heads/develop] - PlayerGlobalToJS AIR app

Posted by er...@apache.org.
PlayerGlobalToJS AIR app

AIR application to create JS stubs from 'playerglobal.swc' classes and provide implementations of selected class members in JS through 'shadow' interfaces.

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/83c26c9d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/83c26c9d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/83c26c9d

Branch: refs/heads/develop
Commit: 83c26c9d00a0ffd115abebf29bf35c0a8f777999
Parents: 911f644
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Oct 31 17:00:09 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Oct 31 17:02:00 2014 +0100

----------------------------------------------------------------------
 .../src/PlayerGlobalToJS-app.xml                | 232 +++++++
 .../PlayerGlobalToJS/src/PlayerGlobalToJS.mxml  | 660 +++++++++++++++++++
 .../src/assets/vf2js/display/DisplayObject.js   | 173 +++++
 .../vf2js/display/DisplayObjectContainer.js     | 110 ++++
 .../assets/vf2js/display/InteractiveObject.js   |  33 +
 .../src/assets/vf2js/display/LoaderInfo.js      | 125 ++++
 .../src/assets/vf2js/display/MovieClip.js       | 115 ++++
 .../src/assets/vf2js/display/Sprite.js          |  33 +
 .../src/assets/vf2js/display/Stage.js           | 210 ++++++
 .../src/assets/vf2js/events/Event.js            | 136 ++++
 .../src/assets/vf2js/events/EventDispatcher.js  | 154 +++++
 .../src/assets/vf2js/events/ProgressEvent.js    |  75 +++
 .../src/assets/vf2js/events/TimerEvent.js       |  72 ++
 .../assets/vf2js/system/ApplicationDomain.js    |  77 +++
 .../src/assets/vf2js/system/Capabilities.js     |  98 +++
 .../src/assets/vf2js/utils/Timer.js             | 182 +++++
 .../assets/vf2js/utils/getDefinitionByName.js   |  53 ++
 .../utils/PlayerGlobalToJS/src/nl/ixms/Utils.as |  44 ++
 .../src/nl/ixms/enums/MemberType.as             |  62 ++
 .../PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as    | 489 ++++++++++++++
 .../src/nl/ixms/vo/ClazzMemberTypeLists.as      |  11 +
 .../PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as    | 111 ++++
 .../PlayerGlobalToJS/src/shadowInterfaces.as    |  16 +
 .../src/vf2js/display/IDisplayObject.as         |  27 +
 .../vf2js/display/IDisplayObjectContainer.as    |  12 +
 .../src/vf2js/display/IInteractiveObject.as     |   8 +
 .../src/vf2js/display/ILoaderInfo.as            |  21 +
 .../src/vf2js/display/IMovieClip.as             |  17 +
 .../src/vf2js/display/ISprite.as                |   8 +
 .../src/vf2js/display/IStage.as                 |  26 +
 .../PlayerGlobalToJS/src/vf2js/events/IEvent.as |  15 +
 .../src/vf2js/events/IEventDispatcher.as        |  15 +
 .../src/vf2js/events/IProgressEvent.as          |   9 +
 .../src/vf2js/events/ITimerEvent.as             |   9 +
 .../src/vf2js/system/IApplicationDomain.as      |  10 +
 .../src/vf2js/system/ICapabilities.as           |  17 +
 .../PlayerGlobalToJS/src/vf2js/utils/ITimer.as  |  14 +
 .../src/vf2js/utils/IgetDefinitionByName.as     |   8 +
 38 files changed, 3487 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml b/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml
new file mode 100644
index 0000000..efd4a3e
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<application xmlns="http://ns.adobe.com/air/application/15.0">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.1
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- A universally unique application identifier. Must be unique across all AIR applications.
+	Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
+	<id>PlayerGlobalToJS</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>PlayerGlobalToJS</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>PlayerGlobalToJS</name>
+	
+	<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. 
+	Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
+	An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
+	<versionNumber>0.0.1</versionNumber>
+		         
+	<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
+	<!-- <versionLabel></versionLabel> -->
+
+	<!-- Description, displayed in the AIR application installer.
+	May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
+	<!-- <publisherID></publisherID> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
+		<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width in pixels. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height in pixels. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+
+        <!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device -->
+
+        <!-- <aspectRatio></aspectRatio> -->
+
+        <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
+
+        <!-- <autoOrients></autoOrients> -->
+
+        <!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
+
+        <!-- <fullScreen></fullScreen> -->
+
+        <!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto -->
+
+        <!-- <renderMode></renderMode> -->
+
+		<!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none").  Optional.  Defaults "pan." -->
+		<!-- <softKeyboardBehavior></softKeyboardBehavior> -->
+	<autoOrients>false</autoOrients>
+        <fullScreen>false</fullScreen>
+        <visible>false</visible>
+    </initialWindow>
+
+	<!-- We recommend omitting the supportedProfiles element, -->
+	<!-- which in turn permits your application to be deployed to all -->
+	<!-- devices supported by AIR. If you wish to restrict deployment -->
+	<!-- (i.e., to only mobile devices) then add this element and list -->
+	<!-- only the profiles which your application does support. -->
+	<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+	specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image36x36></image36x36>
+		<image48x48></image48x48>
+		<image57x57></image57x57>
+		<image72x72></image72x72>
+		<image114x114></image114x114>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+    <!-- iOS specific capabilities -->
+	<!-- <iPhone> -->
+		<!-- A list of plist key/value pairs to be added to the application Info.plist -->
+		<!-- <InfoAdditions>
+            <![CDATA[
+                <key>UIDeviceFamily</key>
+                <array>
+                    <string>1</string>
+                    <string>2</string>
+                </array>
+                <key>UIStatusBarStyle</key>
+                <string>UIStatusBarStyleBlackOpaque</string>
+                <key>UIRequiresPersistentWiFi</key>
+                <string>YES</string>
+            ]]>
+        </InfoAdditions> -->
+        <!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
+		<!-- <Entitlements>
+            <![CDATA[
+                <key>keychain-access-groups</key>
+                <array>
+                    <string></string>
+                    <string></string>
+                </array>
+            ]]>
+        </Entitlements> -->
+	<!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
+	<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
+	<!-- </iPhone> -->
+
+	<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
+    <!--<android> -->
+    <!--	<manifestAdditions>
+		<![CDATA[
+			<manifest android:installLocation="auto">
+				<uses-permission android:name="android.permission.INTERNET"/>
+				<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+				<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+				<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
+				<application android:enabled="true">
+					<activity android:excludeFromRecents="false">
+						<intent-filter>
+							<action android:name="android.intent.action.MAIN"/>
+							<category android:name="android.intent.category.LAUNCHER"/>
+						</intent-filter>
+					</activity>
+				</application>
+            </manifest>
+		]]>
+        </manifestAdditions> -->
+	    <!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
+        <!-- <colorDepth></colorDepth> -->
+    <!-- </android> -->
+	<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml b/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml
new file mode 100755
index 0000000..4b2a97c
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml
@@ -0,0 +1,660 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
+					   xmlns:s="library://ns.adobe.com/flex/spark"
+					   xmlns:mx="library://ns.adobe.com/flex/mx"
+					   creationComplete="creationCompleteHandler(event)">
+	
+	<fx:Script><![CDATA[
+		
+		import flash.utils.Dictionary;
+		import flash.utils.getQualifiedClassName;
+		
+		import mx.events.FlexEvent;
+		import mx.utils.StringUtil;
+		
+		import nl.ixms.Utils;
+		import nl.ixms.enums.MemberType;
+		import nl.ixms.vo.Clazz;
+		import nl.ixms.vo.JSDoc;
+		
+		import org.as3commons.reflect.Accessor;
+		import org.as3commons.reflect.Constant;
+		import org.as3commons.reflect.Method;
+		import org.as3commons.reflect.Parameter;
+		import org.as3commons.reflect.Type;
+		import org.as3commons.reflect.Variable;
+		
+		include './shadowInterfaces.as';
+		
+		
+		
+		//----------------------------------------------------------------------
+		//
+		//  Constants 
+		//
+		//----------------------------------------------------------------------
+		
+		private const ACTION_UNIMPLEMENTED:String = 
+			'console.log(\'VF2JS Error: call to unimplemented class member ({0})\');';
+		
+		
+		
+		//----------------------------------------------------------------------
+		//
+		//  Properties 
+		//
+		//----------------------------------------------------------------------
+		
+		//--------------------------------------
+		//  catalogXML_ 
+		//--------------------------------------
+		
+		private var catalogXML_:XMLList;
+		
+		//--------------------------------------
+		//  classes_ 
+		//--------------------------------------
+		
+		private var classes_:Dictionary;
+		
+		//--------------------------------------
+		//  functions_ 
+		//--------------------------------------
+		
+		private var functions_:Dictionary;
+		
+		//--------------------------------------
+		//  outputRoot_ 
+		//--------------------------------------
+		
+		private var outputRoot_:File;
+		
+		
+		
+		//----------------------------------------------------------------------
+		//
+		//  Methods 
+		//
+		//----------------------------------------------------------------------
+		
+		//--------------------------------------
+		//  createOutputDirectory 
+		//--------------------------------------
+		
+		private function createOutputDirectory():void {
+			outputRoot_ = 
+				new File(File.applicationDirectory.nativePath).resolvePath(
+					'../out');
+			
+			if (outputRoot_.exists) {
+				outputRoot_.deleteDirectory(true);
+			}
+			
+			outputRoot_.createDirectory();
+
+			File.applicationDirectory.resolvePath('assets/vf2js').copyTo(
+				outputRoot_.resolvePath('vf2js')); 
+		}
+		
+		//--------------------------------------
+		//  creationCompleteHandler 
+		//--------------------------------------
+		
+		private function creationCompleteHandler(event:FlexEvent):void {
+			var clazz:Clazz, 
+			    clsAccessor:Accessor, 
+				clsConstant:Constant, 
+				clsMemberName:MemberType, 
+				clsMemberTypeNames:Array,
+				clsMemberType:String, 
+				clsMemberValue:Object, 
+				clsField:Object,
+				clsMembers:Dictionary,
+				clsType:Type, 
+				clsVariable:Variable,
+				funczion:Object,
+				i:int,
+				j:int, 
+				key:String, 
+				m:int, 
+				n:int, 
+				p:int, 
+				parameter:Parameter,
+				parameters:Array,
+				parameterNames:Array,
+				q:int;
+			
+				clsMemberTypeNames = [ 
+					MemberType.STATIC_CONSTANT,
+					MemberType.STATIC_VARIABLE,
+					MemberType.STATIC_PROPERTY,
+					MemberType.STATIC_METHOD,
+					MemberType.CONSTANT,
+					MemberType.VARIABLE,
+					MemberType.PROPERTY,
+					MemberType.METHOD ];
+			
+			createOutputDirectory();
+			
+			readCatalogXML();
+			
+			parseClasses();
+			
+			// VERY special case
+			functions_['mx.core.mx_internal'] = 'mx.core.mx_internal';
+			
+			for (key in functions_) {
+				clazz = new Clazz(null);
+				
+				clazz.qName = key;
+				
+				if (key.split('.').length > 1) {
+					clazz.name = clazz.qName.substring(
+						clazz.qName.lastIndexOf('.') + 1, clazz.qName.length);
+				} else {
+					continue;
+				}
+				
+				clazz.startOutput();
+				
+				writeClassFile(clazz);
+			}
+
+			for (key in classes_) {
+				clazz = Clazz(classes_[key]);
+				
+				clsType = clazz.type;
+				if (clsType && 
+					clsType.fullName && 
+					clsType.fullName !== 'Object') {
+					
+					clsMembers = parseClassMembers(clazz);
+					
+					clazz.startOutput();
+					
+					// Member stubs
+					for (var count:int = 0, total:int = clsMemberTypeNames.length; count < total; count++) {
+						clsMemberName = clsMemberTypeNames[count];
+						if (clsMembers[clsMemberName].length > 0) {
+							
+							clazz.addMajorBlockComment(
+								clsMemberName.toString().toUpperCase().replace('_', ' '));
+							
+							for (j = 0, m = clsMembers[clsMemberName].length; j < m; j++) {
+								if (clsMembers[clsMemberName][j] is Constant ||
+									clsMembers[clsMemberName][j] is Variable) {
+									clsField = clsMembers[clsMemberName][j];
+									clsMemberType = 
+										Utils.parseType(flash.utils.getQualifiedClassName(
+											clsField.type.clazz));
+									
+									clazz.output += JSDoc.emitJSDoc(
+										JSDoc.FIELD,
+										clsField.name,
+										clsMemberType);
+									
+									clazz.output += 
+										clazz.qName + 
+										'.' + 
+										((clsField.isStatic) ? '' : 'prototype.') +
+										clsField.name;
+									
+									clsMemberValue = clsField.getValue();
+									if (clsMemberValue) {
+										clazz.output += ' = ';
+
+										if (clsMemberType === 'Array') {
+											clazz.output += '[';
+											for (var k:int = 0, l:int = clsMemberValue.length; k < l; k++) {
+												if (k > 0) {
+													clazz.output += ', ';
+												}
+												clazz.output += '\'' + clsMemberValue[k] + '\'';
+											}
+											clazz.output += ']';
+										} else {
+											clazz.output += 
+												((clsMemberType === 'string') ? '\'' : '') +
+												clsMemberValue +
+												((clsMemberType === 'string') ? '\'' : '');
+										}
+									}
+									
+									clazz.output += Clazz.MEMBER_SEPARATOR;
+								} else if (clsMembers[clsMemberName][j] is Accessor) {
+									clsField = clsMembers[clsMemberName][j];
+									clsMemberType = 
+										Utils.parseType(flash.utils.getQualifiedClassName(
+											clsField.type.clazz));
+									
+									clazz.output += JSDoc.emitJSDoc(
+										JSDoc.METHOD,
+										clsField.name,
+										'', clsMemberType);
+									
+									clazz.output += 
+										clazz.qName + 
+										'.' + 
+										((clsField.isStatic) ? '' : 'prototype.') +
+										'get_' + clsField.name + ' = ' +
+										'function() {\n' +
+										'  ' + getImplementation(
+											clazz, clsField, 'get_', true) + '\n' +
+										'}';
+
+									if (Accessor(clsField).writeable) {
+										clazz.output += Clazz.MEMBER_SEPARATOR;
+										
+										parameter = new Parameter(null, 0);
+
+										clazz.output += JSDoc.emitJSDoc(
+											JSDoc.FIELD,
+											clsField.name);
+										
+										clazz.output += 
+											clazz.qName + 
+											'.' + 
+											((clsField.isStatic) ? '' : 'prototype.') +
+											'set_' + clsField.name + ' = ' +
+											'function(value) {\n' +
+											'  ' + getImplementation(
+												clazz, clsField, 'set_') + '\n' +
+											'}';
+									}
+									
+									/*
+									clazz.output += JSDoc.emitJSDoc(
+										JSDoc.FIELD,
+										clsField.name,
+										clsMemberType);
+									
+									clazz.output += 
+										clazz.qName + 
+										'.' + 
+										((clsField.isStatic) ? '' : 'prototype.') +
+										clsField.name +
+										';\n\n';
+									
+									clazz.output += 
+										'Object.defineProperty(' + clazz.qName + ((clsField.isStatic) ? '' : '.prototype') + ', \'' + clsField.name + '\', {\n' +
+										'  get: function() {\n' +
+										'    ' + StringUtil.substitute(ACTION_UNIMPLEMENTED, [clazz.qName + '::' + clsField.name]) + '\n' +
+										'  }';
+									if (Accessor(clsField).writeable) {
+										clazz.output += 
+											',\n  set: function(value) {\n' +
+											'    ' + StringUtil.substitute(ACTION_UNIMPLEMENTED, [clazz.qName + '::' + clsField.name]) + '\n' +
+											'  }';
+									}
+									clazz.output += 
+										'\n})';
+									*/
+									
+									clazz.output += Clazz.MEMBER_SEPARATOR;
+								} else if (clsMembers[clsMemberName][j] is Method) {
+									clsField = clsMembers[clsMemberName][j];
+
+									parameters = Method(clsField).parameters;
+									
+									parameterNames = [];
+									for (i = 0, n = parameters.length; i < n; i++) {
+										parameterNames.push(((parameters[i].isOptional) ? 'opt_' : '') + 'arg' + i);
+									}
+
+									var returnType:String = Utils.parseType(Method(clsField).returnType.fullName);
+									if (returnType === 'void') {
+										returnType = '';
+									}
+									
+									clazz.output += JSDoc.emitJSDoc(
+										JSDoc.METHOD, 
+										clsField.name, 
+										parameters,
+									    returnType);
+									
+									clazz.output += 
+										clazz.qName + 
+										'.' + 
+										((clsField.isStatic) ? '' : 'prototype.') +
+										clsField.name +
+										' = function(' +
+										parameterNames.join(', ') + 
+										') {';
+										if (!clazz.type.isInterface) {
+											clazz.output += '\n  ' + getImplementation(
+												clazz, clsField, '', 
+												(returnType !== ''),
+												parameterNames.join(', ')) + '\n';
+										}
+										clazz.output += '}';
+									
+									clazz.output += Clazz.MEMBER_SEPARATOR;
+								}
+							}
+						}
+					}
+					
+					writeClassFile(clazz);
+				}
+			}
+			
+			this.exit();
+		}
+		
+		//--------------------------------------
+		//  getImplementation
+		//--------------------------------------
+		
+		private function getImplementation(clazz:Clazz, 
+										   clsField:Object, 
+										   prefix:String = '', 
+										   returns:Boolean = false,
+										   parameters:String = ''):String {
+			var compositeClazzMembers:Array,
+				hasImplementation:Boolean = false,
+				i:int,
+				isStatic:Boolean,
+				implementation:String,
+				memberName:String;
+
+			if (clazz.compositeClazz) {
+				if (clsField is Accessor) {
+					memberName = Accessor(clsField).name;
+					isStatic = Accessor(clsField).isStatic;
+					
+					compositeClazzMembers = clazz.compositeClazz.accessors; 
+					
+					for (i = compositeClazzMembers.length - 1; i > -1; i--) {
+						if (compositeClazzMembers[i].name === memberName) {
+							hasImplementation = true;
+							
+							break;
+						}
+					}
+					
+					if (hasImplementation) {
+						implementation = ((returns) ? 'return ' : '') + 
+							((isStatic) ? clazz.compositeClazzName + '.' : 'this.$_implementation.') + 
+							prefix + memberName + '();';
+					} else {
+						implementation = 
+							StringUtil.substitute(ACTION_UNIMPLEMENTED, 
+								[clazz.qName + '::' + prefix + memberName]);
+					}
+				} else if (clsField is Method) {
+					memberName = Method(clsField).name;
+					isStatic = Method(clsField).isStatic;
+					
+					compositeClazzMembers = clazz.compositeClazz.methods; 
+					
+					for (i = compositeClazzMembers.length - 1; i > -1; i--) {
+						if (compositeClazzMembers[i].name === memberName) {
+							hasImplementation = true;
+							
+							break;
+						}
+					}
+					
+					if (hasImplementation) {
+						implementation = ((returns) ? 'return ' : '') + 
+							((isStatic) ? clazz.compositeClazzName + '.' : 'this.$_implementation.') + 
+							memberName + '(' + parameters + ');';
+					} else {
+						implementation = 
+							StringUtil.substitute(ACTION_UNIMPLEMENTED, 
+								[clazz.qName + '::' + memberName]);
+						
+						if (returns) {
+							implementation += 
+								'\n\n  return null; // placeholder to appease gjslint';
+						}
+					}
+				}
+			}
+			
+			return implementation;
+		}
+		
+		//--------------------------------------
+		//  parseClassMembers
+		//--------------------------------------
+		
+		private function parseClassMembers(clazz:Clazz):Dictionary {
+			var clsField:Object, 
+				clsFieldsArray:Array, 
+				clsMembers:Dictionary, 
+			    clsMethod:Method, 
+				clsMethodsArray:Array, 
+				clsType:Type, 
+				i:int, 
+				n:int;
+			
+			clsMembers = new Dictionary();
+			clsMembers[MemberType.STATIC_CONSTANT] = [];
+			clsMembers[MemberType.STATIC_VARIABLE] = [];
+			clsMembers[MemberType.STATIC_PROPERTY] = [];
+			clsMembers[MemberType.STATIC_METHOD] = [];
+			clsMembers[MemberType.CONSTANT] = [];
+			clsMembers[MemberType.VARIABLE] = [];
+			clsMembers[MemberType.PROPERTY] = [];
+			clsMembers[MemberType.METHOD] = [];
+			
+			clsType = clazz.type;
+			
+			clsFieldsArray = clsType.fields;
+			for (i = 0, n = clsFieldsArray.length; i < n; i++) {
+				clsField = clsFieldsArray[i];
+				if (clsField.declaringType.name === clsType.name) {
+					if (clsField is Constant && clsField.name !== 'length') {
+						if (clsField.isStatic) {
+							clsMembers[MemberType.STATIC_CONSTANT].push(clsField);
+						} else {
+							clsMembers[MemberType.CONSTANT].push(clsField);
+						}
+					} else if (clsField is Variable) {
+						if (clsField.isStatic) {
+							clsMembers[MemberType.STATIC_VARIABLE].push(clsField);
+						} else {
+							clsMembers[MemberType.VARIABLE].push(clsField);
+						}
+					} else if (clsField is Accessor) {
+						if (clsField.isStatic) {
+							clsMembers[MemberType.STATIC_PROPERTY].push(clsField);
+						} else {
+							clsMembers[MemberType.PROPERTY].push(clsField);
+						}
+					}
+				}
+			}
+			
+			clsMethodsArray = clsType.methods;
+			for (i = 0, n = clsMethodsArray.length; i < n; i++) {
+				clsMethod = clsMethodsArray[i];
+				if (clsMethod.declaringType.name === clsType.name) {
+					if (clsMethod.isStatic) {
+						clsMembers[MemberType.STATIC_METHOD].push(clsMethod);
+					} else {
+						clsMembers[MemberType.METHOD].push(clsMethod);
+					}
+				}
+			}
+			
+			return clsMembers;
+		}
+			
+		//--------------------------------------
+		//  parseClasses
+		//--------------------------------------
+		
+		private function parseClasses():void {
+			var addClazz:Function, className:String, classType:Type, 
+			clazz:Clazz, exclude:Boolean, excludeFunctionPackageArr:Array, 
+			excludeTopLevelClassArr:Array, pkg:String, pkgArr:Array, i:int, 
+			interfaceName:String, interfaceNamesArray:Array, interfaceType:Type, 
+			isClazz:Function, j:int, jsEquivArr:Array, m:int, n:int, 
+			namespaceArray:Array, superClassName:String, 
+			superClassNamesArray:Array, superClassType:Type;
+			
+			addClazz = function (name:String, type:Type):void {
+				var result:Clazz;
+				
+				result = new Clazz(type);
+				result.name = type.name;
+				result.qName = Utils.cleanClassQName(type.fullName);
+
+				if (excludeTopLevelClassArr.indexOf(name) === -1) {
+					classes_[name] = result;
+				}
+			}
+				
+			isClazz = function (clazzName:String):Boolean {
+				var clazzNameArr:Array, firstCharCode:Number;
+				
+				clazzNameArr = clazzName.split('.');
+				if (clazzNameArr && clazzNameArr.length > 0) {
+					clazzName = clazzNameArr[clazzNameArr.length - 1];
+				}
+				firstCharCode = clazzName.charCodeAt(0);
+				
+				return firstCharCode >= 65  && firstCharCode <= 90;
+			}
+				
+			// ToDo (erikdebruin): these classes have an JS counterpart, and we
+			//                     want to only add those members that are not
+			//                     in the JS implementation, or override those
+			//                     with a different implementation.
+			excludeTopLevelClassArr = [
+				'Array', 'Boolean', 'Date',/* 'Error',*/ 'EvalError', 'Function', 
+				'JSON', 'Math', 'Number', 'QName', 'RangeError', 
+				'ReferenceError', 'RegExp', 'String', 'SyntaxError', 
+				'TypeError' ];
+			
+			excludeFunctionPackageArr = [
+				'avmplus', 'avm2.intrinsics.memory', 'bugzilla',
+				'flash.debugger', 'flash.media', 'flash.profiler', 
+				'flash.sampler', 'watson' ];
+			
+			jsEquivArr = [
+				'decodeURI', 'decodeURIComponent', 'encodeURI', 
+				'encodeURIComponent', 'escape', 'isFinite', 
+				'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape' ];
+			
+			classes_ = new Dictionary();
+
+			functions_ = new Dictionary();
+			
+			for (i = 0, n = catalogXML_.length() - 1; i < n; i++) {
+				className = Utils.cleanClassQName(catalogXML_[i].@id);
+				try
+				{
+					if (!classes_[className]) {
+						classType = Type.forName(className);
+						if (classType && classType.fullName) {
+							namespaceArray = className.split('.');
+							if (namespaceArray.length === 1 ||
+								namespaceArray[0] === 'flash') {
+								
+								addClazz(className, classType);
+
+								superClassNamesArray = classType.extendsClasses;
+								m = superClassNamesArray.length;
+								for (j = 0; j < m; j++) {
+									superClassName = Utils.cleanClassQName(
+										superClassNamesArray[j]);
+									if (!classes_[superClassName]) {
+										superClassType = Type.forName(
+											superClassName);
+										if (superClassType) {
+											addClazz(superClassName, 
+												superClassType);
+										}
+									}
+								}
+								
+								// fetch class' interfaces
+								interfaceNamesArray = classType.interfaces;
+								m = interfaceNamesArray.length;
+								for (j = 0; j < m; j++) {
+									interfaceName = interfaceNamesArray[j];
+									if (!classes_[interfaceName]) {
+										interfaceType = Type.forName(
+											interfaceName);
+										if (interfaceType) {
+											addClazz(interfaceName, 
+												interfaceType);
+										}
+									}
+								}
+							}
+						} else { // "function Classes"
+							pkgArr = className.split('.');
+							if (pkgArr.length > 1) {
+								pkgArr.pop();
+							}
+							pkg = pkgArr.join('.');
+							
+							exclude = pkg.charAt(0) === '_' || 
+								excludeFunctionPackageArr.indexOf(pkg) > -1 || 
+								jsEquivArr.indexOf(pkg) > -1;
+							
+							if (!isClazz(className) && !exclude) {
+								functions_[className] = className;
+							}
+						}
+					}
+				}
+				catch (err:Error) { /* eat Type.forName() exceptions */ }
+			}
+		}
+		
+		//--------------------------------------
+		//  readCatalogXML
+		//--------------------------------------
+		
+		private function readCatalogXML():void {
+			var file:File, stream:FileStream, xml:XML;
+			
+			file = File.applicationDirectory.resolvePath(
+				'assets/catalog_15.xml');
+			
+			stream = new FileStream();
+			stream.open(file, FileMode.READ);
+			xml = new XML(
+				stream.readUTFBytes(stream.bytesAvailable).replace(
+					/xmlns=".*"/, ""));
+			stream.close();
+			
+			catalogXML_ = xml..script.children();
+		}
+		
+		//--------------------------------------
+		//  writeClassFile
+		//--------------------------------------
+		
+		private function writeClassFile(clazz:Clazz):void {
+			var file:File, 
+				fileStream:FileStream, 
+				clazzQName:String, 
+				packagePath:String;
+			
+			clazzQName = clazz.qName;
+			
+			packagePath = (clazzQName.indexOf('.') > -1) ? clazzQName : '';
+			packagePath = packagePath.substring(0, packagePath.lastIndexOf('.'));
+			packagePath = packagePath.replace(/\./g, '/');
+			if (packagePath !== '') {
+				packagePath = packagePath + '/';
+			}
+			
+			fileStream = new FileStream();
+			file = outputRoot_.resolvePath(packagePath + clazz.name + '.js');
+			fileStream.open(file, FileMode.WRITE);
+			fileStream.writeUTFBytes(clazz.output);
+			fileStream.close();
+		}
+		
+	]]></fx:Script>
+	
+	<fx:Declarations />
+	
+</s:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js
new file mode 100644
index 0000000..17805e3
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js
@@ -0,0 +1,173 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.display.DisplayObject'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.display.DisplayObject');
+
+goog.require('flash.display.DisplayObject');
+goog.require('flash.display.DisplayObjectContainer');
+goog.require('flash.display.IBitmapDrawable');
+goog.require('flash.display.LoaderInfo');
+goog.require('vf2js.events.EventDispatcher');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {vf2js.events.EventDispatcher}
+ * @implements {flash.display.IBitmapDrawable}
+ */
+vf2js.display.DisplayObject = function() {
+  vf2js.display.DisplayObject.base(this, 'constructor');
+};
+goog.inherits(vf2js.display.DisplayObject, vf2js.events.EventDispatcher);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.display.DisplayObject.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'DisplayObject', qName: 'vf2js.display.DisplayObject'}],
+      interfaces: [flash.display.IBitmapDrawable] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * loaderInfo
+ *
+ * @return {flash.display.LoaderInfo}
+ */
+vf2js.display.DisplayObject.prototype.get_loaderInfo = function() {
+	return window['apache-flex_loaderInfo'];
+};
+
+
+/**
+ * parent_
+ *
+ * @type {flash.display.DisplayObjectContainer}
+ */
+vf2js.display.DisplayObject.prototype.parent_;
+
+
+/**
+ * parent
+ *
+ * @param {flash.display.DisplayObjectContainer} value The parent container.
+ */
+vf2js.display.DisplayObject.prototype.set_parent = function(value) {
+	this.parent_ = value;
+};
+
+
+/**
+ * parent
+ *
+ * @return {flash.display.DisplayObjectContainer}
+ */
+vf2js.display.DisplayObject.prototype.get_parent = function() {
+    return this.parent_
+};
+
+
+/**
+ * root
+ *
+ * @return {flash.display.DisplayObject}
+ */
+vf2js.display.DisplayObject.prototype.get_root = function() {
+    return window['apache-flex_system-manager'];
+};
+
+
+/**
+ * stage
+ *
+ * @return {flash.display.Stage}
+ */
+vf2js.display.DisplayObject.prototype.get_stage = function() {
+    return window['apache-flex_stage'];
+};
+
+
+/**
+ * scaleX_
+ *
+ * @type {number}
+ */
+vf2js.display.DisplayObject.prototype.scaleX_;
+
+
+/**
+ * scaleX
+ *
+ * @return {number}
+ */
+vf2js.display.DisplayObject.prototype.get_scaleX = function() {
+  return scaleX_;
+};
+
+
+/**
+ * scaleX
+ *
+ * @param {number} value The new value.
+ */
+vf2js.display.DisplayObject.prototype.set_scaleX = function(value) {
+	this.scaleX_ = value;
+};
+
+
+/**
+ * scaleY_
+ *
+ * @type {number}
+ */
+vf2js.display.DisplayObject.prototype.scaleY_;
+
+
+/**
+ * scaleY
+ *
+ * @return {number}
+ */
+vf2js.display.DisplayObject.prototype.get_scaleY = function() {
+  return scaleY_;
+};
+
+
+/**
+ * scaleY
+ *
+ * @param {number} value The new value.
+ */
+vf2js.display.DisplayObject.prototype.set_scaleY = function(value) {
+	this.scaleY_ = value;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js
new file mode 100644
index 0000000..5c24e8b
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js
@@ -0,0 +1,110 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.display.DisplayObjectContainer'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.display.DisplayObjectContainer');
+
+goog.require('vf2js.display.InteractiveObject');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {vf2js.display.InteractiveObject}
+ */
+vf2js.display.DisplayObjectContainer = function() {
+  vf2js.display.DisplayObjectContainer.base(this, 'constructor');
+  
+  this.children_ = [];
+};
+goog.inherits(vf2js.display.DisplayObjectContainer, vf2js.display.InteractiveObject);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.display.DisplayObjectContainer.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'DisplayObjectContainer', qName: 'vf2js.display.DisplayObjectContainer'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * children_
+ *
+ * @private
+ *
+ * @type {Array.<flash.display.DisplayObject>}
+ */
+vf2js.display.DisplayObjectContainer.prototype.children_;
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * addChildAt
+ *
+ * @param {flash.display.DisplayObject} arg0 Argument 0
+ * @param {number} arg1 Argument 1
+ *
+ * @return {flash.display.DisplayObject}
+ */
+vf2js.display.DisplayObjectContainer.prototype.addChildAt = function(arg0, arg1) {
+  arg0.$_implementation.set_parent(this);
+  
+  this.children_[arg1] = arg0;
+  
+  this.dispatchEvent(new flash.events.Event(flash.events.Event.ADDED));
+
+  return arg0;
+};
+
+
+/**
+ * addChild
+ *
+ * @param {flash.display.DisplayObject} arg0 Argument 0
+ *
+ * @return {flash.display.DisplayObject}
+ */
+vf2js.display.DisplayObjectContainer.prototype.addChild = function(arg0) {
+  arg0.$_implementation.set_parent(this);
+  
+  this.children_.push(arg0);
+  
+  this.dispatchEvent(new flash.events.Event(flash.events.Event.ADDED));
+
+  return arg0;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js
new file mode 100644
index 0000000..211c8f3
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js
@@ -0,0 +1,33 @@
+/**
+ * @fileoverview 'vf2jsvf2js.display.InteractiveObject'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.display.InteractiveObject');
+
+goog.require('vf2js.display.DisplayObject');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {vf2js.display.DisplayObject}
+ */
+vf2js.display.InteractiveObject = function() {
+  vf2js.display.InteractiveObject.base(this, 'constructor');
+};
+goog.inherits(vf2js.display.InteractiveObject, vf2js.display.DisplayObject);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.display.InteractiveObject.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'InteractiveObject', qName: 'vf2js.display.InteractiveObject'}],
+      interfaces: [] }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js
new file mode 100644
index 0000000..611ae00
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js
@@ -0,0 +1,125 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.display.LoaderInfo'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.display.LoaderInfo');
+
+goog.require('vf2js.events.EventDispatcher');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {vf2js.events.EventDispatcher}
+ */
+vf2js.display.LoaderInfo = function() {
+  vf2js.display.LoaderInfo.base(this, 'constructor');
+};
+goog.inherits(vf2js.display.LoaderInfo, vf2js.events.EventDispatcher);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.display.LoaderInfo.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'LoaderInfo', qName: 'vf2js.display.LoaderInfo'}],
+      interfaces: [flash.events.IEventDispatcher] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * width
+ *
+ * @return {number}
+ */
+vf2js.display.LoaderInfo.prototype.get_width = function() {
+	return 1024;
+};
+
+
+/**
+ * bytesLoaded
+ *
+ * @return {number}
+ */
+vf2js.display.LoaderInfo.prototype.get_bytesLoaded = function() {
+	return 1;
+};
+
+
+/**
+ * height
+ *
+ * @return {number}
+ */
+vf2js.display.LoaderInfo.prototype.get_height = function() {
+	return 768;
+};
+
+
+/**
+ * url
+ *
+ * @return {string}
+ */
+vf2js.display.LoaderInfo.prototype.get_url = function() {
+	console.log('vf2js.display.LoaderInfo.get_url');
+	
+	return document.location.url;
+};
+
+
+/**
+ * bytesTotal
+ *
+ * @return {number}
+ */
+vf2js.display.LoaderInfo.prototype.get_bytesTotal = function() {
+	return 1;
+};
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * dispatchEvent
+ *
+ * @param {Event} arg0 Argument 0
+ *
+ * @return {boolean}
+ */
+vf2js.display.LoaderInfo.prototype.dispatchEvent = function(arg0) {
+  return vf2js.display.LoaderInfo.base(this, 'dispatchEvent', arg0);
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js
new file mode 100644
index 0000000..331ccc2
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js
@@ -0,0 +1,115 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.display.MovieClip'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.display.MovieClip');
+
+goog.require('vf2js.display.Sprite');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {flash.display.Sprite}
+ */
+vf2js.display.MovieClip = function() {
+  vf2js.display.MovieClip.base(this, 'constructor');
+};
+goog.inherits(vf2js.display.MovieClip, vf2js.display.Sprite);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.display.MovieClip.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'MovieClip', qName: 'vf2js.display.MovieClip'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * framesLoaded
+ *
+ * @return {number}
+ */
+vf2js.display.MovieClip.prototype.get_framesLoaded = function() {
+	return 2;
+};
+
+
+/**
+ * currentFrame_
+ *
+ * @type {number}
+ */
+vf2js.display.MovieClip.prototype.currentFrame_ = 1;
+
+
+/**
+ * currentFrame
+ *
+ * @return {number}
+ */
+vf2js.display.MovieClip.prototype.get_currentFrame = function() {
+	return this.currentFrame_;
+};
+
+
+/**
+ * totalFrames
+ *
+ * @return {number}
+ */
+vf2js.display.MovieClip.prototype.get_totalFrames = function() {
+	return 2;
+};
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * nextFrame
+ */
+vf2js.display.MovieClip.prototype.nextFrame = function() {
+    this.currentFrame_++;
+};
+
+
+/**
+ * stop
+ */
+vf2js.display.MovieClip.prototype.stop = function() {
+    // DO NOTHING, WE'RE NOT ON A TIMELINE
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js
new file mode 100644
index 0000000..c55f032
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js
@@ -0,0 +1,33 @@
+/**
+ * @fileoverview 'vf2jsvf2js.display.InteractiveObject'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.display.Sprite');
+
+goog.require('vf2js.display.DisplayObjectContainer');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {vf2js.display.DisplayObjectContainer}
+ */
+vf2js.display.Sprite = function() {
+  vf2js.display.Sprite.base(this, 'constructor');
+};
+goog.inherits(vf2js.display.Sprite, vf2js.display.DisplayObjectContainer);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.display.InteractiveObject.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'Sprite', qName: 'vf2js.display.Sprite'}],
+      interfaces: [] }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js
new file mode 100644
index 0000000..6837d83
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js
@@ -0,0 +1,210 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.display.Stage'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.display.Stage');
+
+goog.require('flash.display.DisplayObjectContainer');
+goog.require('flash.display.StageAlign');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {flash.display.DisplayObjectContainer}
+ */
+vf2js.display.Stage = function() {
+  vf2js.display.Stage.base(this, 'constructor');
+};
+goog.inherits(vf2js.display.Stage, flash.display.DisplayObjectContainer);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.display.Stage.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'Stage', qName: 'vf2js.display.Stage'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * align_
+ *
+ * @private
+ * 
+ * @type {string}
+ */
+vf2js.display.Stage.prototype.align_ = flash.display.StageAlign.TOP;
+
+
+/**
+ * align
+ *
+ * @return {string}
+ */
+vf2js.display.Stage.prototype.get_align = function() {
+	return this.align_;
+};
+
+
+/**
+ * align
+ *
+ * @type {undefined}
+ */
+vf2js.display.Stage.prototype.set_align = function(value) {
+    this.align_ = value;
+};
+
+
+/**
+ * quality_
+ *
+ * @private
+ * 
+ * @type {string}
+ */
+vf2js.display.Stage.prototype.quality_;
+
+
+/**
+ * quality
+ *
+ * @return {string}
+ */
+vf2js.display.Stage.prototype.get_quality = function() {
+    return this.quality_;
+};
+
+
+/**
+ * quality
+ *
+ * @param {string} value The new value.
+ */
+vf2js.display.Stage.prototype.set_quality = function(value) {
+    this.quality_ = value;
+};
+
+
+/**
+ * scaleMode_
+ *
+ * @private
+ * 
+ * @type {string}
+ */
+vf2js.display.Stage.prototype.scaleMode_;
+
+
+/**
+ * scaleMode
+ *
+ * @return {string}
+ */
+vf2js.display.Stage.prototype.get_scaleMode = function() {
+    return this.scaleMode_;
+};
+
+
+/**
+ * scaleMode
+ *
+ * @param {string} value The new value.
+ */
+vf2js.display.Stage.prototype.set_scaleMode = function(value) {
+    this.scaleMode_ = value;
+};
+
+
+/**
+ * stageHeight
+ *
+ * @return {number}
+ */
+vf2js.display.Stage.prototype.get_stageHeight = function() {
+	return 768;
+};
+
+
+/**
+ * stageWidth
+ *
+ * @return {number}
+ */
+vf2js.display.Stage.prototype.get_stageWidth = function() {
+	return 1024;
+};
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * addEventListener
+ *
+ * @param {string} arg0 Argument 0
+ * @param {Function} arg1 Argument 1
+ * @param {boolean=} opt_arg2 Argument 2 (optional)
+ * @param {number=} opt_arg3 Argument 3 (optional)
+ * @param {boolean=} opt_arg4 Argument 4 (optional)
+ */
+vf2js.display.Stage.prototype.addEventListener = function(arg0, arg1, opt_arg2, opt_arg3, opt_arg4) {
+  vf2js.display.Stage.base(this, 'addEventListener', arg0, arg1, opt_arg2, opt_arg3, opt_arg4);
+};
+
+
+/**
+ * dispatchEvent
+ *
+ * @param {Event} arg0 Argument 0
+ *
+ * @return {boolean}
+ */
+vf2js.display.Stage.prototype.dispatchEvent = function(arg0) {
+  return vf2js.display.Stage.base(this, 'dispatchEvent', arg0);
+};
+
+
+/**
+ * hasEventListener
+ *
+ * @param {string} arg0 Argument 0
+ *
+ * @return {boolean}
+ */
+vf2js.display.Stage.prototype.hasEventListener = function(arg0) {
+  return vf2js.display.Stage.base(this, 'hasEventListener', arg0);
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js
new file mode 100644
index 0000000..94f0426
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js
@@ -0,0 +1,136 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.events.Event'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.events.Event');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @param {string} arg0 Argument 0
+ * @param {boolean=} opt_arg1 Argument 1 (optional)
+ * @param {boolean=} opt_arg2 Argument 2 (optional)
+ */
+vf2js.events.Event = function(arg0, opt_arg1, opt_arg2) {
+    this._type = arg0;
+	
+    opt_arg1 = (opt_arg1 !== undefined) ? opt_arg1 : false;
+    this._bubbles = opt_arg1;
+  
+    opt_arg2 = (opt_arg2 !== undefined) ? opt_arg2 : false;
+    this._cancelable = opt_arg2;
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.events.Event.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'Event', qName: 'vf2js.events.Event'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * _bubbles
+ *
+ * @private
+ *
+ * @type{boolean}
+ */
+vf2js.events.Event.prototype._bubbles;
+
+
+/**
+ * bubbles
+ *
+ * @return {boolean}
+ */
+vf2js.events.Event.prototype.get_bubbles = function() {
+    return this._bubbles;
+};
+
+
+/**
+ * _cancelable
+ *
+ * @private
+ *
+ * @type{boolean}
+ */
+vf2js.events.Event.prototype._cancelable;
+
+
+/**
+ * cancelable
+ *
+ * @return {boolean}
+ */
+vf2js.events.Event.prototype.get_cancelable = function() {
+    return this._cancelable;
+};
+
+
+/**
+ * _type
+ *
+ * @private
+ *
+ * @type{string}
+ */
+vf2js.events.Event.prototype._type;
+
+
+/**
+ * type
+ *
+ * @return {string}
+ */
+vf2js.events.Event.prototype.get_type = function() {
+    return this._type;
+};
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * toString
+ *
+ * @return {string}
+ */
+vf2js.events.Event.prototype.toString = function() {
+    return '[Event type=' + this._type + ' bubbles=' + this._bubbles + ' cancelable=' + this._cancelable + ']';
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js
new file mode 100644
index 0000000..01f1d32
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js
@@ -0,0 +1,154 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.events.EventDispatcher'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.events.EventDispatcher');
+
+goog.require('goog.events.EventTarget');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @param {IEventDispatcher=} opt_arg0 Argument 0 (optional)
+ */
+vf2js.events.EventDispatcher = function(opt_arg0) {
+	this.eventTarget_ = new goog.events.EventTarget();
+
+    this.listeners_ = [];
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.events.EventDispatcher.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'EventDispatcher', qName: 'vf2js.events.EventDispatcher'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * listeners_
+ *
+ * @private
+ *
+ * @type {Array.<string>}
+ */
+vf2js.events.EventDispatcher.prototype.listeners_;
+
+
+/**
+ * eventTarget_
+ *
+ * @private
+ *
+ * @type {goog.events.EventTarget}
+ */
+vf2js.events.EventDispatcher.prototype.eventTarget_;
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * dispatchEvent
+ *
+ * @param {Event} arg0 Argument 0
+ *
+ * @return {boolean}
+ */
+vf2js.events.EventDispatcher.prototype.dispatchEvent = function(arg0) {
+    console.log('$ dispatchEvent: ' + arg0.get_type());
+    
+    return this.eventTarget_.dispatchEvent(arg0.get_type());
+};
+
+
+/**
+ * addEventListener
+ *
+ * @param {string} arg0 Argument 0
+ * @param {Function} arg1 Argument 1
+ * @param {boolean=} opt_arg2 Argument 2 (optional)
+ * @param {number=} opt_arg3 Argument 3 (optional)
+ * @param {boolean=} opt_arg4 Argument 4 (optional)
+ */
+vf2js.events.EventDispatcher.prototype.addEventListener = function(arg0, arg1, opt_arg2, opt_arg3, opt_arg4) {
+  console.log('Listen for event: ' + arg0);
+  
+  if (!this.hasEventListener(arg0)) {
+    this.listeners_.push(arg0);
+
+    this.eventTarget_.listen(arg0, arg1);
+  }
+};
+
+
+/**
+ * hasEventListener
+ *
+ * @param {string} arg0 Argument 0
+ *
+ * @return {boolean}
+ */
+vf2js.events.EventDispatcher.prototype.hasEventListener = function(arg0) {
+  return this.listeners_.indexOf(arg0) > -1;
+};
+
+
+/**
+ * removeEventListener
+ *
+ * @param {string} arg0 Argument 0
+ * @param {Function} arg1 Argument 1
+ * @param {boolean=} opt_arg2 Argument 2 (optional)
+ */
+vf2js.events.EventDispatcher.prototype.removeEventListener = function(arg0, arg1, opt_arg2) {
+  console.log('Unlisten event: ' + arg0);
+  
+  this.listeners_.splice(this.listeners_.indexOf(arg0), 1);
+  
+  this.eventTarget_.unlisten(arg0, arg1);
+};
+
+
+/**
+ * toString
+ *
+ * @return {string} The string
+ */
+vf2js.events.EventDispatcher.prototype.toString = function() {
+  //return this.toString();
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js
new file mode 100644
index 0000000..d9c00c0
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js
@@ -0,0 +1,75 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.events.ProgressEvent'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.events.ProgressEvent');
+
+goog.require('vf2js.events.Event');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {vf2js.events.Event}
+ * @param {string} arg0 Argument 0
+ * @param {boolean=} opt_arg1 Argument 1 (optional)
+ * @param {boolean=} opt_arg2 Argument 2 (optional)
+ * @param {Number=} opt_arg3 Argument 3 (optional)
+ * @param {Number=} opt_arg4 Argument 4 (optional)
+ */
+vf2js.events.ProgressEvent = function(arg0, opt_arg1, opt_arg2, opt_arg3, opt_arg4) {
+  vf2js.events.ProgressEvent.base(this, 'constructor', arg0, opt_arg1, opt_arg2, opt_arg3, opt_arg4);
+};
+goog.inherits(vf2js.events.ProgressEvent, vf2js.events.Event);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.events.ProgressEvent.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'ProgressEvent', qName: 'vf2js.events.ProgressEvent'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * toString
+ *
+ * @return {string}
+ */
+vf2js.events.ProgressEvent.prototype.toString = function() {
+	var /** @type {string} */ result;
+	
+	result = vf2js.events.TimerEvent.base(this, 'toString');
+	result = result.replace('[Event ', '[ProgressEvent ');
+	result = result.replace(']', ' bytesLoaded=value bytesTotal=value]');
+	
+	return result;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js
new file mode 100644
index 0000000..9c9da37
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js
@@ -0,0 +1,72 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.events.TimerEvent'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.events.TimerEvent');
+
+goog.require('vf2js.events.Event');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {flash.events.Event}
+ * @param {string} arg0 Argument 0
+ * @param {boolean=} opt_arg1 Argument 1 (optional)
+ * @param {boolean=} opt_arg2 Argument 2 (optional)
+ */
+vf2js.events.TimerEvent = function(arg0, opt_arg1, opt_arg2) {
+  vf2js.events.TimerEvent.base(this, 'constructor', arg0, opt_arg1, opt_arg2);
+};
+goog.inherits(vf2js.events.TimerEvent, vf2js.events.Event);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.events.TimerEvent.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'TimerEvent', qName: 'vf2js.events.TimerEvent'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * toString
+ *
+ * @return {string}
+ */
+vf2js.events.TimerEvent.prototype.toString = function() {
+	var /** @type {string} */ result;
+	
+	result = vf2js.events.TimerEvent.base(this, 'toString');
+	result = result.replace('[Event ', '[TimerEvent ');
+	
+	return result;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js
new file mode 100644
index 0000000..9e4eab4
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js
@@ -0,0 +1,77 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.system.ApplicationDomain'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.system.ApplicationDomain');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @param {ApplicationDomain=} opt_arg0 Argument 0 (optional)
+ */
+vf2js.system.ApplicationDomain = function(opt_arg0) {};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.system.ApplicationDomain.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'ApplicationDomain', qName: 'vf2js.system.ApplicationDomain'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * getDefinition
+ *
+ * @param {string} arg0 Argument 0
+ *
+ * @return {Object}
+ */
+vf2js.system.ApplicationDomain.prototype.getDefinition = function(arg0) {
+  	var fullName;
+
+  	fullName = arg0.replace(/::/gi, '.');
+
+  	return eval('new ' + fullName + '()');
+};
+
+
+/**
+ * hasDefinition
+ *
+ * @param {string} arg0 Argument 0
+ *
+ * @return {boolean}
+ */
+vf2js.system.ApplicationDomain.prototype.hasDefinition = function(arg0) {
+    return true;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js
new file mode 100644
index 0000000..4f349a8
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js
@@ -0,0 +1,98 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.system.Capabilities'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.system.Capabilities');
+
+
+
+/**
+ * @constructor
+ * @struct
+ */
+vf2js.system.Capabilities = function() {};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.system.Capabilities.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'Capabilities', qName: 'vf2js.system.Capabilities'}],
+      interfaces: [] };
+
+
+//------------------------------------------------------------------------------
+//
+//  STATIC PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * language
+ *
+ * @return {string}
+ */
+vf2js.system.Capabilities.get_language = function() {
+	return 'en';
+};
+
+
+/**
+ * playerType
+ *
+ * @return {string}
+ */
+vf2js.system.Capabilities.get_playerType = function() {
+	return 'PlugIn';
+};
+
+
+/**
+ * screenDPI
+ *
+ * @return {Number}
+ */
+vf2js.system.Capabilities.get_screenDPI = function() {
+	return 72;
+};
+
+
+/**
+ * version
+ *
+ * @return {string}
+ */
+vf2js.system.Capabilities.get_version = function() {
+	return 'MAC 15,0,0,0';
+};
+
+
+/**
+ * os
+ *
+ * @return {string}
+ */
+vf2js.system.Capabilities.get_os = function() {
+	return 'Mac OS 10.9.5';
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/Timer.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/Timer.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/Timer.js
new file mode 100644
index 0000000..1246c2e
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/Timer.js
@@ -0,0 +1,182 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.utils.Timer'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.utils.Timer');
+
+goog.require('vf2js.events.EventDispatcher');
+goog.require('flash.events.IEventDispatcher');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @extends {vf2js.events.EventDispatcher}
+ * @param {Number} arg0 Argument 0
+ * @param {number=} opt_arg1 Argument 1 (optional)
+ */
+vf2js.utils.Timer = function(arg0, opt_arg1) {
+  vf2js.utils.Timer.base(this, 'constructor');
+  
+  this._delay = arg0;
+  
+  opt_arg1 = (opt_arg1 !== undefined) ? opt_arg1 : 10;
+  this._repeatCount = opt_arg1;
+  
+  this._currentCount = 0;
+};
+goog.inherits(vf2js.utils.Timer, vf2js.events.EventDispatcher);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.utils.Timer.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'Timer', qName: 'vf2js.utils.Timer'}],
+      interfaces: [flash.events.IEventDispatcher] };
+
+
+//------------------------------------------------------------------------------
+//
+//  PROPERTIES
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * _currentCount
+ *
+ * @private
+ *
+ * @type {number}
+ */
+vf2js.utils.Timer.prototype._currentCount;
+
+
+/**
+ * _delay
+ *
+ * @private
+ *
+ * @type {number}
+ */
+vf2js.utils.Timer.prototype._delay;
+
+
+/**
+ * delay
+ *
+ * @return {number}
+ */
+vf2js.utils.Timer.prototype.get_delay = function() {
+	return this._delay;
+};
+
+
+/**
+ * delay
+ *
+ * @type {number}
+ */
+vf2js.utils.Timer.prototype.set_delay = function(value) {
+	this._delay = value;
+};
+
+
+/**
+ * _repeatCount
+ *
+ * @private
+ *
+ * @type {number}
+ */
+vf2js.utils.Timer.prototype._repeatCount;
+
+
+//------------------------------------------------------------------------------
+//
+//  METHODS
+//
+//------------------------------------------------------------------------------
+
+
+/**
+ * _timerEventHandler
+ *
+ * @private
+ */
+vf2js.utils.Timer.prototype._timerEventHandler = function() {
+    this.dispatchEvent(new flash.events.TimerEvent(flash.events.TimerEvent.TIMER));
+
+    if (this._running) {
+      if (this._repeatCount > 0) {
+        this._currentCount++;
+  
+	    //console.log("### HERE (dispatch) " + this._currentCount);
+        if (this._currentCount <= this._repeatCount) {
+          setTimeout(goog.bind(this._timerEventHandler, this), this._delay);
+        } else {
+          this.reset();
+        }
+      } else {
+        setTimeout(goog.bind(this._timerEventHandler, this), this._delay);
+      }
+    }
+};
+
+
+/**
+ * start
+ */
+vf2js.utils.Timer.prototype.start = function() {
+  this._running = true;
+
+  setTimeout(goog.bind(this._timerEventHandler, this), this._delay);
+  
+  console.log("$ Timer start");
+};
+
+
+/**
+ * reset
+ */
+vf2js.utils.Timer.prototype.reset = function() {
+  this.stop();
+  
+  this._currentCount = 0;
+  
+  console.log("$ Timer reset");
+};
+
+
+/**
+ * stop
+ */
+vf2js.utils.Timer.prototype.stop = function() {
+  this._running = false;
+  
+  console.log("$ Timer stop");
+};
+
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/getDefinitionByName.js
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/getDefinitionByName.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/getDefinitionByName.js
new file mode 100644
index 0000000..65a2466
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/utils/getDefinitionByName.js
@@ -0,0 +1,53 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview 'vf2js.utils.getDefinitionByName'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('vf2js.utils.getDefinitionByName');
+
+
+
+/**
+ * @constructor
+ * @struct
+ * @param {string} value The qName of the class.
+ * @return {Object} A reference to the class.
+ */
+vf2js.utils.getDefinitionByName = function(value) {
+	var fullName;
+	
+	fullName = value.replace(/::/gi, '.');
+	
+	console.log('VF2JS (vf2js.utils.getDefinitionByName): ' + fullName);
+	
+	return eval(fullName + '.prototype');
+}; 
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+vf2js.utils.getDefinitionByName.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'getDefinitionByName', qName: 'vf2js.utils.getDefinitionByName'}],
+      interfaces: [ ] };
+
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as
new file mode 100644
index 0000000..6f54db5
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as
@@ -0,0 +1,44 @@
+package nl.ixms
+{
+public final class Utils
+{
+	public static function cleanClassQName(classQName:String):String {
+		return classQName.
+			replace(/\//g, '.').
+			replace(/:/g, '.').
+			replace(/\.\./g, '.');
+	}
+	
+	public static function parseType(type:String):String {
+		var result:String;
+		
+		switch (type) {
+			case 'int' :
+			case 'uint' :
+				result = 'number';
+				
+				break;
+			
+			case 'Boolean' :
+			case 'String' :
+				result = type.toLowerCase();
+				
+				break;
+			
+			default :
+				if (type.indexOf('.') > 0) {
+					result = Utils.cleanClassQName(type);
+				} else {
+					result = type;
+				}
+				
+				break;
+		}
+		
+		return result;
+	}
+	
+	public function Utils() {}
+	
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83c26c9d/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/enums/MemberType.as
----------------------------------------------------------------------
diff --git a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/enums/MemberType.as b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/enums/MemberType.as
new file mode 100644
index 0000000..77848b8
--- /dev/null
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/enums/MemberType.as
@@ -0,0 +1,62 @@
+package nl.ixms.enums
+{
+	
+public class MemberType
+{
+	
+	//--------------------------------------------------------------------------
+	//
+	//    Class constants
+	//
+	//--------------------------------------------------------------------------
+	
+	public static const CONSTANT:MemberType = new MemberType("constants");
+	public static const METHOD:MemberType = new MemberType("methods");
+	public static const PROPERTY:MemberType = new MemberType("properties");
+	public static const STATIC_CONSTANT:MemberType = new MemberType("static_constants");
+	public static const STATIC_METHOD:MemberType = new MemberType("static_methods");
+	public static const STATIC_PROPERTY:MemberType = new MemberType("static_properties");
+	public static const STATIC_VARIABLE:MemberType = new MemberType("static_variables");
+	public static const VARIABLE:MemberType = new MemberType("variables");
+	
+	
+	
+	//--------------------------------------------------------------------------
+	//
+	//    Constructor
+	//
+	//--------------------------------------------------------------------------
+	
+	public function MemberType(stringValue:String) {
+		this.stringValue = stringValue;
+	}
+	
+	
+	
+	//--------------------------------------------------------------------------
+	//
+	//    Variables
+	//
+	//--------------------------------------------------------------------------
+	
+	private var stringValue:String;
+	
+	
+	
+	//--------------------------------------------------------------------------
+	//
+	//    Methods
+	//
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//    toString
+	//----------------------------------
+	
+	public function toString():String {
+		return stringValue;
+	}
+	
+}
+
+}


[3/6] git commit: [flex-asjs] [refs/heads/develop] - Scripts to create a JS version of the Flex SDK

Posted by er...@apache.org.
Scripts to create a JS version of the Flex SDK

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/cde5a713
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/cde5a713
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/cde5a713

Branch: refs/heads/develop
Commit: cde5a713fcd520a8ebec312c95ca34ed5dbcc514
Parents: 8f6d2cd
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Oct 31 16:57:14 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Oct 31 17:02:00 2014 +0100

----------------------------------------------------------------------
 vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh    | 216 +++++++++++++++++++++++++
 vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh  |   1 +
 vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh |  23 +++
 3 files changed, 240 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cde5a713/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh
----------------------------------------------------------------------
diff --git a/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh b/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh
new file mode 100755
index 0000000..6d0d910
--- /dev/null
+++ b/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh
@@ -0,0 +1,216 @@
+#!/bin/sh
+
+ROOT="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/utils/FlexSDKToJS"
+OUTPUT="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/frameworks/js/vf2js"
+
+ARGS=""
+ARGS="$ARGS +env.PLAYERGLOBAL_HOME="/Users/erik/Documents/apacheFlex/dependencies/PlayerGlobal/player" "
+ARGS="$ARGS +playerglobal.version=15.0 "
+
+ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/flex-config.xml" "
+ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/framework/framework-config.xml" "
+ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/spark/compile-config.xml" "
+
+ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/air/airspark.swc" "
+
+ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/player/15.0/playerglobal.swc" "
+
+ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/osmf.swc" "
+
+ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/textlayout.swc" "
+
+ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/utils/FlexSDKToJS/lcds/libs/fds.swc" "
+
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/utils/FlexSDKToJS/src-framework-3.6.0/src" "
+
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/advancedgrids/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/apache/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/charts/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/core/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/experimental/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/flash-integration/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/framework/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/mx/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/rpc/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/spark/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/spark_dmv/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/sparkskins/src" "
+ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/wireframe/src" "
+
+ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateSkinStateProblem "
+ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateQNameInSourcePathProblem "
+ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.NoDefinitionForSWCDependencyProblem "
+
+ARGS="$ARGS -js-output-type=VF2JS "
+ARGS="$ARGS -keep-asdoc=false "
+
+ARGS="$ARGS -closure-lib="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library" "
+
+ARGS="$ARGS -output=${OUTPUT} "
+
+java -jar "/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/lib/compc.jar" ${ARGS}
+
+
+
+./TextLayoutToJS.sh
+
+
+
+cd ${OUTPUT}
+#pwd
+
+# Delete xClasses.js
+rm ./AdvancedDataGridClasses.js
+rm ./ApacheClasses.js
+rm ./ChartsClasses.js
+rm ./CoreClasses.js
+rm ./ExperimentalClasses.js
+rm ./FrameworkClasses.js
+rm ./MxClasses.js
+rm ./RPCClasses.js
+rm ./SparkClasses.js
+rm ./SparkDmvClasses.js
+rm ./SparkSkinsClasses.js
+rm ./WireframeClasses.js
+
+# Create class 'QName'
+cat <<EOF > ./QName.js
+/**
+ * @fileoverview 'QName'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('QName');
+
+
+
+/**
+ * @constructor
+ * @struct
+ */
+QName = function() {};
+EOF
+
+# Create class 'mx.core.mx_internal'
+cat <<EOF > ./mx/core/mx_internal.js
+/**
+ * @fileoverview 'mx.core.mx_internal'
+ *
+ * @author erikdebruin@apache.org (Erik de Bruin)
+ */
+
+'use strict';
+
+goog.provide('mx.core.mx_internal');
+
+
+
+/**
+ * @constructor
+ * @struct
+ */
+mx.core.mx_internal = function() {};
+EOF
+
+# copy org.apache.flex.utils.Language from FlexJS SDK
+mkdir ./org/apache/flex/utils
+cp /Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js ./org/apache/flex/utils/Language.js
+
+# copy flash.utils.IDataInput and refactor to flash.utils.IDataInput2
+cp ./flash/utils/IDataInput.js ./flash/utils/IDataInput2.js
+sed -i '' -e "s/IDataInput/IDataInput2/g" ./flash/utils/IDataInput2.js
+
+# copy flash.utils.IDataOutput and refactor to flash.utils.IDataOutput2
+cp ./flash/utils/IDataOutput.js ./flash/utils/IDataOutput2.js
+sed -i '' -e "s/IDataOutput/IDataOutput2/g" ./flash/utils/IDataOutput2.js
+
+# Remove 'wrong' chars from mx/utils/StringUtil.js
+sed -i '' -e 's/
//g' ./mx/utils/StringUtil.js
+sed -i '' -e 's/
//g' ./mx/utils/StringUtil.js
+
+# Remove 'wrong' char from spark/components/Label.js
+sed -i '' -e 's/
//g' ./spark/components/Label.js
+
+# Remove 'wrong' public namespace reference from mx/styles/CSSStyleDeclaration.js
+sed -i '' -e 's/public\.this\.setStyle/this\.setStyle/g' ./mx/styles/CSSStyleDeclaration.js
+
+# Add missing namespace to flash/geom/Vector3D.js
+sed -i '' -e 's/= Vector3D/= flash.geom.Vector3D/g' ./flash/geom/Vector3D.js
+
+# Remove namespace from Vector type in spark/components/DataGroup.js
+sed -i '' -e 's/Vector\.<mx\.core\.IVisualElement>/Vector/g' ./spark/components/DataGroup.js
+
+# Remove "difficult" interface reference from mx/core/UIComponent.js
+sed -i '' -e 's/, mx.validators.IValidatorListener, /, /g' ./mx/core/UIComponent.js
+
+# Remove goog.require from spark.layouts.supportClasses.LinearLayoutVector
+tr '\n' '#' < ./spark/layouts/supportClasses/LinearLayoutVector.js > ./spark/layouts/supportClasses/LinearLayoutVector.js_temp
+sed -i '' -e "s/#goog.require('spark.layouts.supportClasses.Block');//g" ./spark/layouts/supportClasses/LinearLayoutVector.js_temp
+tr '#' '\n' < ./spark/layouts/supportClasses/LinearLayoutVector.js_temp > ./spark/layouts/supportClasses/LinearLayoutVector.js
+rm ./spark/layouts/supportClasses/LinearLayoutVector.js_temp
+
+# Add 'global' goog.require to mx.managers.SystemManager
+tr '\n' '#' < ./mx/managers/SystemManager.js > ./mx/managers/SystemManager.js_temp
+
+sed -i '' -e "s/####\/\*\*/##goog.require('org.apache.flex.utils.Language');&/g" ./mx/managers/SystemManager.js_temp
+
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.core.EmbeddedFontRegistry');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.styles.StyleManagerImpl');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.BrowserManagerImpl');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.CursorManagerImpl');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.HistoryManagerImpl');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.LayoutManager');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.PopUpManagerImpl');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.ToolTipManagerImpl');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.DragManagerImpl');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.core.TextFieldFactory');&/g" ./mx/managers/SystemManager.js_temp
+
+sed -i '' -e "s/####\/\*\*/##goog.require('Class');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('int');&/g" ./mx/managers/SystemManager.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('QName');&/g" ./mx/managers/SystemManager.js_temp
+
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.preloaders.DownloadProgressBar');&/g" ./mx/managers/SystemManager.js_temp
+
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.systemClasses.ChildManager');&/g" ./mx/managers/SystemManager.js_temp
+
+sed -i '' -e "s/mx\.managers\.SystemManager = function() {#  /mx\.managers\.SystemManager = function() {#  window['apache-flex_system-manager'] = this;#/g" ./mx/managers/SystemManager.js_temp
+
+tr '#' '\n' < ./mx/managers/SystemManager.js_temp > ./mx/managers/SystemManager.js
+rm ./mx/managers/SystemManager.js_temp
+
+# Add 'missing' (?) goog.require to mx.skins.halo.HaloFocusRect
+tr '\n' '#' < ./mx/skins/halo/HaloFocusRect.js > ./mx/skins/halo/HaloFocusRect.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.skins.ProgrammaticSkin');&/g" ./mx/skins/halo/HaloFocusRect.js_temp
+tr '#' '\n' < ./mx/skins/halo/HaloFocusRect.js_temp > ./mx/skins/halo/HaloFocusRect.js
+rm ./mx/skins/halo/HaloFocusRect.js_temp
+
+# Add 'missing' (?) goog.require to mx.preloaders.DownloadProgressBar
+tr '\n' '#' < ./mx/preloaders/DownloadProgressBar.js > ./mx/preloaders/DownloadProgressBar.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.geom.RoundedRectangle');&/g" ./mx/preloaders/DownloadProgressBar.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.preloaders.IPreloaderDisplay');&/g" ./mx/preloaders/DownloadProgressBar.js_temp
+tr '#' '\n' < ./mx/preloaders/DownloadProgressBar.js_temp > ./mx/preloaders/DownloadProgressBar.js
+rm ./mx/preloaders/DownloadProgressBar.js_temp
+
+# Add 'missing' (?) goog.require to mx.skins.halo.ToolTipBorder
+tr '\n' '#' < ./mx/skins/halo/ToolTipBorder.js > ./mx/skins/halo/ToolTipBorder.js_temp
+sed -i '' -e "s/####\/\*\*/##goog.require('mx.skins.RectangularBorder');&/g" ./mx/skins/halo/ToolTipBorder.js_temp
+tr '#' '\n' < ./mx/skins/halo/ToolTipBorder.js_temp > ./mx/skins/halo/ToolTipBorder.js
+rm ./mx/skins/halo/ToolTipBorder.js_temp
+
+# Move property to below static method in mx.binding.Binding
+tr '\n' '#' < ./mx/binding/Binding.js > ./mx/binding/Binding.js_temp
+sed -i '' -e "s/###\/\*\*# \* @type {Object}# \*\/#mx.binding.Binding.allowedErrors = mx.binding.Binding.generateAllowedErrors();//g" ./mx/binding/Binding.js_temp
+sed -i '' -e "s/  o\[2005\] = 1;#  return o;#};/  o\[2005\] = 1;#  return o;#};###\/\*\*# \* @type {Object}# \*\/#mx.binding.Binding.allowedErrors = mx.binding.Binding.generateAllowedErrors();/g" ./mx/binding/Binding.js_temp
+tr '#' '\n' < ./mx/binding/Binding.js_temp > ./mx/binding/Binding.js
+rm ./mx/binding/Binding.js_temp
+
+
+
+cd ${ROOT}
+#pwd
+
+# create 'deps.js' for SDK + FP JS classes
+./JSFlexSDKDeps.sh

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cde5a713/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh
----------------------------------------------------------------------
diff --git a/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh b/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh
new file mode 100755
index 0000000..325108f
--- /dev/null
+++ b/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh
@@ -0,0 +1 @@
+/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library/closure/bin/build/depswriter.py --root_with_prefix="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library/closure/goog ../../../../../bin/js-debug/library/closure/goog" --root_with_prefix="../../frameworks/js/vf2js ../../../../../bin/js-debug" > ../../frameworks/js/sdk-deps.js

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cde5a713/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh
----------------------------------------------------------------------
diff --git a/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh b/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh
new file mode 100755
index 0000000..329b5eb
--- /dev/null
+++ b/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+ARGS=""
+ARGS="$ARGS +env.PLAYERGLOBAL_HOME="/Users/erik/Documents/apacheFlex/dependencies/PlayerGlobal/player" "
+ARGS="$ARGS +playerglobal.version=15.0 "
+ARGS="$ARGS +source.dir="/Users/erik/Documents/ApacheFlex/git/flex-tlf/TextLayout" "
+
+ARGS="$ARGS -define=CONFIG::debug,false "
+ARGS="$ARGS -define=CONFIG::release,true "
+
+ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-tlf/compile-config.xml" "
+
+ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateSkinStateProblem "
+ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateQNameInSourcePathProblem "
+ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.NoDefinitionForSWCDependencyProblem "
+
+ARGS="$ARGS -js-output-type=VF2JS "
+
+ARGS="$ARGS -closure-lib="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library" "
+
+ARGS="$ARGS -output="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/frameworks/js/vf2js" "
+
+java -jar "/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/lib/compc.jar" ${ARGS}


[6/6] git commit: [flex-asjs] [refs/heads/develop] - Remove obsolete files

Posted by er...@apache.org.
Remove obsolete files

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8f6d2cde
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8f6d2cde
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8f6d2cde

Branch: refs/heads/develop
Commit: 8f6d2cde8d63f392ae0580452c6499c9b36e6269
Parents: 97c1fd8
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Oct 24 13:46:00 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Oct 31 17:02:00 2014 +0100

----------------------------------------------------------------------
 .../vf2js/src/org/apache/flex/utils/Language.js | 186 -------------------
 .../js/vf2js/src/vf2js_mx/components/Button.js  |  24 ---
 .../vf2js/src/vf2js_s/components/Application.js |  30 ---
 .../js/vf2js/src/vf2js_s/components/Button.css  |  17 --
 .../js/vf2js/src/vf2js_s/components/Button.js   | 163 ----------------
 .../src/vf2js_s/components/ButtonRenderer.js    |  92 ---------
 vf2js/frameworks/js/vf2js/tests.html            |  35 ----
 7 files changed, 547 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js b/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js
deleted file mode 100644
index 619edb1..0000000
--- a/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-goog.provide('org.apache.flex.utils.Language');
-
-
-
-/**
- * @constructor
- */
-org.apache.flex.utils.Language = function() {
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org.apache.flex.utils.Language.prototype.FLEXJS_CLASS_INFO =
-    { names: [{ name: 'Language',
-                qName: 'org.apache.flex.utils.Language'}] };
-
-
-/**
- * as()
- *
- * @expose
- * @param {?} leftOperand The lefthand operand of the
- *                        binary as operator in AS3.
- * @param {?} rightOperand The righthand operand of the
- *                         binary operator in AS3.
- * @param {?=} opt_coercion The cast is a coercion,
- *                          throw expception if it fails.
- * @return {?} Returns the lefthand operand if it is of the
- *             type of the righthand operand, otherwise null.
- */
-org.apache.flex.utils.Language.as = function(leftOperand, rightOperand, opt_coercion) {
-  var error, itIs, message;
-
-  opt_coercion = (opt_coercion !== undefined) ? opt_coercion : false;
-
-  itIs = org.apache.flex.utils.Language.is(leftOperand, rightOperand);
-
-  if (!itIs && opt_coercion) {
-    message = 'Type Coercion failed';
-    if (TypeError) {
-      error = new TypeError(message);
-    } else {
-      error = new Error(message);
-    }
-    throw error;
-  }
-
-  return (itIs) ? leftOperand : null;
-};
-
-
-/**
- * int()
- *
- * @expose
- * @param {?} value The value to be cast.
- * @return {number}
- */
-org.apache.flex.utils.Language._int = function(value) {
-  return value >> 0;
-};
-
-
-/**
- * is()
- *
- * @expose
- * @param {?} leftOperand The lefthand operand of the
- *     binary as operator in AS3.
- * @param {?} rightOperand The righthand operand of the
- *     binary operator in AS3.
- * @return {boolean}
- */
-org.apache.flex.utils.Language.is = function(leftOperand, rightOperand) {
-  var checkInterfaces, superClass;
-
-  // (erikdebruin) we intentionally DON'T do null checks on the
-  //               [class].FLEXJS_CLASS_INFO property, as it MUST be
-  //               declared for every FLEXJS JS (framework) class
-
-  if (leftOperand && !rightOperand) {
-    return false;
-  }
-
-  checkInterfaces = function(left) {
-    var i, interfaces;
-
-    interfaces = left.FLEXJS_CLASS_INFO.interfaces;
-    for (i = interfaces.length - 1; i > -1; i--) {
-      if (interfaces[i] === rightOperand) {
-        return true;
-      }
-
-      if (interfaces[i].prototype.FLEXJS_CLASS_INFO.interfaces) {
-        return checkInterfaces(new interfaces[i]());
-      }
-    }
-
-    return false;
-  };
-
-  if ((rightOperand === String && typeof leftOperand === 'string') ||
-      (leftOperand instanceof /** @type {Object} */(rightOperand))) {
-    return true;
-  }
-  if ((rightOperand === Number && typeof leftOperand === 'number') ||
-    (leftOperand instanceof /** @type {Object} */(rightOperand))) {
-    return true;
-  }
-
-  if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
-    if (checkInterfaces(leftOperand)) {
-      return true;
-    }
-  }
-
-  superClass = leftOperand.constructor.superClass_;
-  if (superClass) {
-    while (superClass && superClass.FLEXJS_CLASS_INFO) {
-      if (superClass.FLEXJS_CLASS_INFO.interfaces) {
-        if (checkInterfaces(superClass)) {
-          return true;
-        }
-      }
-      superClass = superClass.constructor.superClass_;
-    }
-  }
-
-  return false;
-};
-
-
-/**
- * trace()
- *
- * @expose
- * @param {string=} opt_value The message to be written to the console.
- */
-org.apache.flex.utils.Language.trace = function(opt_value) {
-  var theConsole;
-
-  opt_value = (opt_value !== undefined) ? opt_value : '';
-
-  theConsole = goog.global.console;
-
-  if (theConsole === undefined && window.console !== undefined)
-    theConsole = window.console;
-
-  try {
-    if (theConsole && theConsole.log) {
-      theConsole.log(opt_value);
-    }
-  } catch (e) {
-    // ignore; at least we tried ;-)
-  }
-};
-
-
-/**
- * uint()
- *
- * @expose
- * @param {?} value The value to be cast.
- * @return {number}
- */
-org.apache.flex.utils.Language.uint = function(value) {
-  return value >>> 0;
-};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js b/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js
deleted file mode 100644
index 6e984b8..0000000
--- a/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the 'License');
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-goog.provide('vf2js_mx.components.Button');
-
-
-
-/**
- * @constructor
- */
-vf2js_mx.components.Button = function() {};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js
deleted file mode 100644
index 247b13c..0000000
--- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the 'License');
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @fileoverview 'Spark' Application class.
- *
- * @author erikdebruin@apache.org (Erik de Bruin)
- */
-
-'use strict';
-
-goog.provide('vf2js_s.components.Application');
-
-
-
-/**
- * @constructor
- */
-vf2js_s.components.Application = function() {};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css
deleted file mode 100644
index 4d05b32..0000000
--- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the 'License');
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-.vf2js_s-components-buttonrenderer {
-  color: red;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.js
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.js b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.js
deleted file mode 100644
index a0beed4..0000000
--- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the 'License');
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @fileoverview A 'Spark' button component.
- *
- * @author erikdebruin@apache.org (Erik de Bruin)
- */
-
-'use strict';
-
-goog.provide('vf2js_s.components.Button');
-
-goog.require('goog.ui.Control');
-goog.require('vf2js_s.components.ButtonRenderer');
-
-
-
-/**
- * @constructor
- * 
- * @extends {goog.ui.Control}
- */
-vf2js_s.components.Button = function() {
-  vf2js_s.components.Button.base(this, 'constructor');
-};
-goog.inherits(vf2js_s.components.Button, goog.ui.Control);
-
-
-//------------------------------------------------------------------------------
-//
-//  Enums
-//
-//------------------------------------------------------------------------------
-
-
-/**
- * IdFragment
- *
- * @enum {string}
- */
-vf2js_s.components.Button.IdFragment = {
-  BUTTON: 'button'
-};
-
-
-//------------------------------------------------------------------------------
-//
-//  Properties
-//
-//------------------------------------------------------------------------------
-
-
-//--------------------------------------
-//  id
-//--------------------------------------
-
-/**
- * @type {string}
- */
-vf2js_s.components.Button.prototype.id;
-
-
-//--------------------------------------
-//  label
-//--------------------------------------
-
-/**
- * @private
- * 
- * @type {string}
- */
-vf2js_s.components.Button.prototype.label_;
-
-/**
- * @type {string}
- */
-vf2js_s.components.Button.prototype.label;
-
-Object.defineProperty(vf2js_s.components.Button.prototype, 'label', {
-  get: function () {
-    return this.label_;
-  },
-  set: function (value) {
-    var /** @type {Element} */ element;
-    
-    this.label_ = value;
-    
-    element = this.getElement();
-    if (element) {
-      element.firstChild.value = this.label_;
-    }
-  }
-});
-
-
-//------------------------------------------------------------------------------
-//
-//  Methods
-//
-//------------------------------------------------------------------------------
-
-
-/**
- * enterDocument
- * 
- * @inheritDoc
- */
-vf2js_s.components.Button.prototype.enterDocument = function() {
-  vf2js_s.components.Button.base(this, 'enterDocument');
-  
-  this.setId(this.id);
-  
-  this.label = this.label_;
-  
-  // - add handlers using 'this.getHandler()'
-};
-
-
-/**
- * exitDocument
- * 
- * @inheritDoc
- */
-vf2js_s.components.Button.prototype.exitDocument = function() {
-  vf2js_s.components.Button.base(this, 'exitDocument');
-  
-  // - remove handlers that are not attached with 'this.getHandler()'
-};
-
-
-/**
- * disposeInternal
- * 
- * @inheritDoc
- */
-vf2js_s.components.Button.prototype.disposeInternal = function() {
-  vf2js_s.components.Button.base(this, 'disposeInternal');
-  
-  //
-};
-
-
-//------------------------------------------------------------------------------
-//
-//  Metadata
-//
-//------------------------------------------------------------------------------
-
-
-goog.ui.registry.setDefaultRenderer(vf2js_s.components.Button,
-    vf2js_s.components.ButtonRenderer);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.js
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.js b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.js
deleted file mode 100644
index 009e9b3..0000000
--- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the 'License');
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @fileoverview The renderer for 'Spark' button components.
- *
- * @author erikdebruin@apache.org (Erik de Bruin)
- */
-
-'use strict';
-
-goog.provide('vf2js_s.components.ButtonRenderer');
-
-goog.require('goog.ui.ControlRenderer');
-
-
-
-/**
- * @constructor
- *
- * @extends {goog.ui.ControlRenderer}
- */
-vf2js_s.components.ButtonRenderer = function() {
-  vf2js_s.components.ButtonRenderer.base(this, 'constructor');
-};
-goog.inherits(vf2js_s.components.ButtonRenderer, goog.ui.ControlRenderer);
-goog.addSingletonGetter(vf2js_s.components.ButtonRenderer);
-
-
-//------------------------------------------------------------------------------
-//
-// Static Constants
-//
-//------------------------------------------------------------------------------
-
-
-/**
- * CSS_CLASS
- * 
- * @const
- * 
- * @type {string}
- */
-vf2js_s.components.ButtonRenderer.CSS_CLASS =
-    'vf2js_s-components-buttonrenderer';
-
-
-//------------------------------------------------------------------------------
-//
-//  Methods
-//
-//------------------------------------------------------------------------------
-
-
-/**
- * getCssClass
- * 
- * @inheritDoc
- */
-vf2js_s.components.ButtonRenderer.prototype.getCssClass = function () {
-  return vf2js_s.components.ButtonRenderer.CSS_CLASS;
-};
-
-
-/**
- * createDom
- * 
- * @inheritDoc
- */
-vf2js_s.components.ButtonRenderer.prototype.createDom = function (button) {
-  var /** @type {?Element} */ element;
-  
-  element = vf2js_s.components.ButtonRenderer.base(this, 'createDom', button);
-  
-  element.appendChild(
-      goog.dom.createDom('input', { 'type': 'button' }));
-
-  button.setElementInternal(element);
-  
-  return element;
-};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/tests.html
----------------------------------------------------------------------
diff --git a/vf2js/frameworks/js/vf2js/tests.html b/vf2js/frameworks/js/vf2js/tests.html
deleted file mode 100644
index 9bdcb83..0000000
--- a/vf2js/frameworks/js/vf2js/tests.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge" >
-  
-  <script src="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library/closure/goog/base.js"></script>
-
-  <script src="/Users/erik/Documents/eclipse (kepler)/.metadata/.closure/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library.js"></script>
-
-  <script src="/Users/erik/Documents/eclipse (kepler)/.metadata/.closure/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js/VF2JS/src.js"></script>
-
-  <script>
-    goog.require('vf2js_s.components.Button');
-  </script>
-
-</head>
-<body onload="init();">
-
-  <script>
-    
-    function init() {
-      var /** @type {vf2js_s.components.Button} */ button;
-    
-      button = new vf2js_s.components.Button();
-      button.id = 'myBtn';
-      button.label = 'helloWorld';
-      button.render();
-    }
-    
-  </script>
-
-</body>
-</html>
\ No newline at end of file