Erik,
I got your project to compile and create the minified .js!
FlexJSTest_dummy app I used.
The only thing I had to do was install python. A note to others, if
you try this on Windows 7, there seems to be an issue with file
encoding and the closure compiler using python 3.3. I had to uninstall
3.3 and install python 2.7 (and put python in the PATH).
Once I had that, I just ran with the command in the /publisher
directory; ant -Dapp.name=FlexJSTest_dummy
It compiled the framework and app classes to the FlexJS.js file and
loader html file. Loaded in the browser and pushed the button,
galvanize!
Mike
Quoting Erik de Bruin <e...@ixsoftware.nl>:
No framework classes are cross compiled. Only project AS files are run
through FalconJS before they are combined with the JS framework through the
Closure Builder.
The AS framework is there to allow for project development in Flash
Builder. Our job as developers is to provide both sides of the fence (AS
and JS framework) with matching functionality so the compiled project JS
files will behave the same in a browser as their AS equivalent does in the
Flash Player.
EdB
On Thursday, December 6, 2012, Michael @er5ik68Schmalle wrote:
Erik,
I'm trying to get clear on something.
What exact classes or interfaces get translated from .as to .js from the
framework directories?
What files are going to be maintained by hand and tests? I'm still a bit
confused to the flow.
You have FlexObject.js, FlexGlobals.js which obviously has no correlation
in .as. What about that?
Mike
Quoting Erik de Bruin <e...@ixsoftware.nl>:
That looks very promising! Some tweaking is needed, and some of the
output (the bottom part mostly, I guess that is for some kind of
introspection that is in my template provided by other methods) isn't
needed, at least not from what I understand.
I'll look into the details of the new output tomorrow and indicate if
and what changes would be nice ;-)
EdB
On Thu, Dec 6, 2012 at 7:01 PM, Michael Schmalle
<apa...@teotigraphix.com> wrote:
Hi,
Right now after about 5 hours of researching and messing around I can get
the following using the closure compiler flag;
//============================**==============================**=======
AS CODE
package com.example.components
{
import flash.display.Sprite;
public class MyTextButton extends Sprite
{
public function MyTextButton()
{
super();
}
private var _privateVar:String = "do ";
public var publicProperty:Number = 100;
public function myFunction(value: String): String
{
return "Don't " + _privateVar + value;
}
}
}
//============================**==============================**=======
JS CODE
/** @preserve CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-12-06 12:55:52
*/
/**
* CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-12-06 12:52:19
*
* Class: com.example.components.**MyTextButton
* @constructor
* @extends flash.display.Sprite
*/
// Constructor
/**
* Constructor: com.example.components.**MyTextButton()
* @constructor
* @this {com.example.components}
*/
com.example.components.**MyTextButton = function()
{
var self = this;
self.publicProperty /* : Number */ = 100;
goog.base(this);
return self;
}
goog.inherits(com.example.**components.MyTextButton,
flash.display.Sprite);
/**
* Member: com.example.components.**MyTextButton.prototype._CLASS
* @const
* @type {com.example.components.**MyTextButton}
*/
com.example.components.**MyTextButton.prototype._CLASS =
com.example.components.**MyTextButton;
;
/**
* Member: com.example.components.**MyTextButton._privateVar
* @private
* @type {string}
*/
com.example.components.**MyTextButton.prototype._**privateVar /* : String
*/ =
"do ";
;
/**
* Member: com.example.components.**MyTextButton.publicProperty
* @type {number}
*/
com.example.components.**MyTextButton.prototype.**publicProperty /* :
Number */
= 100;
;
/**
* Method: com.example.components.**MyTextButton.myFunction()
* @this {com.example.components.**MyTextButton}
* @param {string} value
* @return {string}
*/
com.example.components.**MyTextButton.prototype.**myFunction =
function(value /*
: String */) /* : String */
{
/** @type {com.example.components.**MyTextButton} */
var self = this;
return (("Don't " + self._privateVar) + value);
}
/**
* Member: com.example.components.**MyTextButton._PACKAGE
* @const
* @type {com.example.components}
*/
com.example.components.**MyTextButton._PACKAGE = com.example.components;
/**
* Member: com.example.components.**MyTextButton._NAME
* @const
* @type {string}
*/
com.example.components.**MyTextButton._NAME = "MyTextButton";
/**
* Member: com.example.components.**MyTextButton._FULLNAME
* @const
* @type {string}
*/
com.example.components.**MyTextButton._FULLNAME =
"com.example.components.**MyTextButton";
/**
* Member: com.example.components.**MyTextButton._SUPER
* @const
* @type {flash.display.Sprite}
*/
com.example.components.**MyTextButton._SUPER = flash.display.Sprite;
/**
* Member: com.example.components.**MyTextButton._NAMESPACES
* @const
* @type {Object}
*/
com.example.components.**MyTextButton._NAMESPACES = {
"_privateVar::7:com.example.**components.MyTextButton" : tr
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com