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 [email protected] (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

Reply via email to