A table showing how each ActionScript language 'feature' is should be translated to Google Closure Tools assisted JavaScript by the FalconJS Compiler.
Description |
ActionScript |
JavaScript |
---|---|---|
Classes |
|
|
Simple |
package com.example.components { public class MyClass { public function MyClass() {} } } |
goog.provide('com.example.components.MyClass'); /** * @constructor */ com.example.components.MyClass = function() {}; |
Inheriting |
package com.example.components{ import org.apache.flex.Button; public class MyClass extends Button { public function MyClass() { super(); } } } |
goog.provide('com.example.components.MyClass'); goog.require('org.apache.flex.Button'); /** * @constructor * @extends {org.apache.flex.Button} */ com.example.components.MyClass = function() { goog.base(this); }; goog.inherits(com.example.components.MyClass, org.apache.flex.Button); |
Implementing |
TBD |
TBD |
Inheriting + Implementing |
TBD |
TBD |
|
|
|
Variables |
|
|
private |
private var _myVar:String = ""; |
Inside the constructor function: /** * @private * @type {string} */this._myVar = ''; |
protected |
This is how far I got today ;-) |
|
public |
|
|