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 | Code Block |
---|
|
package com.example.components
{
public class MyClass
{
public function MyClass() {}
}
}
|
| Code Block |
---|
|
goog.provide('com.example.components.MyClass');
/**
* @constructor
*/
com.example.components.MyClass = function() {};
|
|
Inheriting | Code Block |
---|
|
package com.example.components{
import org.apache.flex.Button;
public class MyClass extends Button
{
public function MyClass()
{
super();
}
}
}
|
| Code Block |
---|
|
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 |
Code Block |
---|
private var _myVar:String = "";
|
| Inside the constructor function:
Code Block |
---|
/** * @private * @type {string}
*/this._myVar = '';
|
|
protected | This is how far I got today ;-) | |
public | | |