http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/RollEventsTest/src/RollEvent.as
----------------------------------------------------------------------
diff --git a/manualtests/RollEventsTest/src/RollEvent.as 
b/manualtests/RollEventsTest/src/RollEvent.as
new file mode 100644
index 0000000..7aa3ca0
--- /dev/null
+++ b/manualtests/RollEventsTest/src/RollEvent.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+       import org.apache.flex.events.Event;
+       
+       public class RollEvent extends Event
+       {
+               public function RollEvent(type:String, bubbles:Boolean=false, 
cancelable:Boolean=false)
+               {
+                       super("rollEvent", bubbles, cancelable);
+                       rollEventType = type;
+               }
+               
+               public var rollEventType:String;
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/RollEventsTest/src/RollEventController.as
----------------------------------------------------------------------
diff --git a/manualtests/RollEventsTest/src/RollEventController.as 
b/manualtests/RollEventsTest/src/RollEventController.as
new file mode 100644
index 0000000..09b80cb
--- /dev/null
+++ b/manualtests/RollEventsTest/src/RollEventController.as
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+       import org.apache.flex.core.IBeadController;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.EventDispatcher;
+       import org.apache.flex.events.IEventDispatcher;
+       import org.apache.flex.events.MouseEvent;
+       
+       [Event("rollEvent")]
+       
+       public class RollEventController extends EventDispatcher implements 
IBeadController
+       {
+               public function RollEventController()
+               {
+                       super();
+               }
+               
+               private var _strand:IStrand;
+               
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       
+                       var dispatcher:IEventDispatcher = value as 
IEventDispatcher;
+                       
+                       dispatcher.addEventListener(MouseEvent.MOUSE_OVER, 
handleOver);
+                       dispatcher.addEventListener(MouseEvent.MOUSE_OUT, 
handleOut);
+                       dispatcher.addEventListener(MouseEvent.MOUSE_DOWN, 
handleDown);
+                       dispatcher.addEventListener(MouseEvent.MOUSE_UP, 
handleUp);
+               }
+               
+               private function handleOver(event:MouseEvent):void
+               {
+                       trace("RolledOver");
+                       
+                       dispatchEvent(new RollEvent("rollOver"));
+               }
+               
+               private function handleOut(event:MouseEvent):void
+               {
+                       trace("RolledOut");
+                       
+                       dispatchEvent(new RollEvent("rollOut"));
+               }
+               
+               private function handleDown(event:MouseEvent):void
+               {
+                       trace("Detected Down");
+                       
+                       dispatchEvent(new RollEvent("mouseDown"));
+               }
+               
+               private function handleUp(event:MouseEvent):void
+               {
+                       trace("Detected Up");
+                       
+                       dispatchEvent(new RollEvent("mouseUp"));
+               }
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/RollEventsTest/src/RollEventsTest.mxml
----------------------------------------------------------------------
diff --git a/manualtests/RollEventsTest/src/RollEventsTest.mxml 
b/manualtests/RollEventsTest/src/RollEventsTest.mxml
new file mode 100644
index 0000000..80e3e08
--- /dev/null
+++ b/manualtests/RollEventsTest/src/RollEventsTest.mxml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!---
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
+                               xmlns:local="*"
+                               xmlns:models="models.*"
+                               xmlns:js="library://ns.apache.org/flexjs/basic" 
+                               xmlns:controller="controller.*"
+                               xmlns:views="views.*" 
+                               >
+       
+       <js:valuesImpl>
+               <js:SimpleCSSValuesImpl />
+       </js:valuesImpl>
+       
+       <fx:Style>
+               @namespace js "library://ns.apache.org/flexjs/basic";
+                       
+               .ContainerBackground {
+                       background-color: #FFFFCC;
+               }
+       </fx:Style>
+       
+       <js:initialView>
+               <js:ViewBase>
+                       <js:Container x="50" y="50" width="400" height="400" 
className="ContainerBackground">
+                               <js:beads>
+                                       <js:BasicLayout />
+                                       <local:RollEventController 
rollEvent="output.text=(event as RollEvent).rollEventType" />
+                               </js:beads>
+                       </js:Container>
+                       <js:Label id="output" x="500" y="50" text="roll here" />
+               </js:ViewBase>
+       </js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/VanillaSDK_POC/build.xml
----------------------------------------------------------------------
diff --git a/manualtests/VanillaSDK_POC/build.xml 
b/manualtests/VanillaSDK_POC/build.xml
new file mode 100644
index 0000000..ee188cb
--- /dev/null
+++ b/manualtests/VanillaSDK_POC/build.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+
+<project name="build-with-falconjx" default="main" basedir=".">
+
+       <property name="FLEX_HOME" 
+               location="/Users/erik/Documents/ApacheFlex/repo/sdk.done" />
+
+       <property name="APP_ROOT" 
+               value="${basedir}/src/" />
+
+       <property name="DIR_APACHE_JS_GOOG_PROJECT" 
+               location="${FLEX_HOME}/frameworks/projects/apache-js-goog" />
+
+       <property name="DIR_CLOSURE_LIBRARY" 
+               
location="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library" 
/>
+
+       <property name="DIR_FALCONJX_COMPILE_SCRIPT" 
+               
location="/Users/erik/Documents/ApacheFlex/repo/falcon/compiler.jx/bin" />
+
+       <target name="main">
+               <exec executable="./mxmlc" dir="${DIR_FALCONJX_COMPILE_SCRIPT}">
+                       <arg 
value="-library-path+=${DIR_APACHE_JS_GOOG_PROJECT}/bin" />
+                       <arg value="${APP_ROOT}/Example.as" />
+                       <arg value="-js-output-type=GOOG" />
+                       <arg 
value="-vanilla-sdk-lib=${DIR_APACHE_JS_GOOG_PROJECT}/src" />
+                       <arg value="-closure-lib=${DIR_CLOSURE_LIBRARY}" />
+               </exec>
+       </target>
+       
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/VanillaSDK_POC/src/Example.as
----------------------------------------------------------------------
diff --git a/manualtests/VanillaSDK_POC/src/Example.as 
b/manualtests/VanillaSDK_POC/src/Example.as
new file mode 100644
index 0000000..39195f9
--- /dev/null
+++ b/manualtests/VanillaSDK_POC/src/Example.as
@@ -0,0 +1,83 @@
+package  
+{
+
+import flash.events.MouseEvent;
+
+import js.goog.spark.components.Button;
+import js.goog.spark.components.Group;
+import js.goog.spark.components.Label;
+
+public class Example extends Group
+{
+       private const BYEBYE:String = "Bye Bye";
+       private const HELLOWORLD:String = "Hello World";
+       
+       private var _counter:int = 100;
+
+       public function Example() 
+       {
+               init();
+       }
+       
+       private var _btn1:Button;
+       private var _btn2:Button;
+       private var _btn3:Button;
+       private var _lbl1:Label;
+       private var _lbl2:Label;
+       
+       public function init():void
+       {
+               _lbl1 = new Label();
+               _lbl1.x = 100;
+               _lbl1.y = 25;
+               _lbl1.text = HELLOWORLD;
+               addElement(_lbl1);
+               
+               _lbl2 = new Label();
+               _lbl2.x = 200;
+               _lbl2.y = 25;
+               _lbl2.text = _counter + "";
+               addElement(_lbl2);
+               
+               _btn1 = new Button();
+               _btn1.x = 100;
+               _btn1.y = 50;
+               _btn1.label = "Click me";
+               addElement(_btn1);
+               _btn1.addEventListener(MouseEvent.CLICK, btn1clickHandler);
+
+               _btn2 = new Button();
+               _btn2.x = 200;
+               _btn2.y = 50;
+               _btn2.label = "Add it";
+               addElement(_btn2);
+               _btn2.addEventListener(MouseEvent.CLICK, btn2clickHandler);
+               
+               _btn3 = new Button();
+               _btn3.x = 300;
+               _btn3.y = 50;
+               _btn3.label = "Move it";
+               addElement(_btn3);
+               _btn3.addEventListener(MouseEvent.CLICK, btn3clickHandler);
+       }
+       
+       protected function btn1clickHandler(event:MouseEvent):void
+       {
+               if (_lbl1.text == HELLOWORLD)
+                       _lbl1.text = BYEBYE;
+               else
+                       _lbl1.text = HELLOWORLD;
+       }
+       
+       protected function btn2clickHandler(event:MouseEvent):void
+       {
+               _lbl2.text = --_counter + "";
+       }
+       
+       protected function btn3clickHandler(event:MouseEvent):void
+       {
+               _btn3.x += 10;
+       }
+       
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/VanillaSDK_POC/src/Main.mxml
----------------------------------------------------------------------
diff --git a/manualtests/VanillaSDK_POC/src/Main.mxml 
b/manualtests/VanillaSDK_POC/src/Main.mxml
new file mode 100644
index 0000000..bb91c17
--- /dev/null
+++ b/manualtests/VanillaSDK_POC/src/Main.mxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<g:Application xmlns:fx="http://ns.adobe.com/mxml/2009"; 
+                          xmlns:g="http://flex.apache.org/jsg";
+                          creationComplete="creationCompleteHandler(event)" >
+       
+       <fx:Script><![CDATA[
+               
+               import js.goog.mx.events.FlexEvent;
+               
+               protected function creationCompleteHandler(event:FlexEvent):void
+               {
+                       var main:Example = new Example();
+                       
+                       this.addElement(main);
+               }
+               
+       ]]></fx:Script>
+       
+       <fx:Declarations />
+       
+</g:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/build.xml
----------------------------------------------------------------------
diff --git a/manualtests/build.xml b/manualtests/build.xml
new file mode 100644
index 0000000..919982e
--- /dev/null
+++ b/manualtests/build.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+
+<!-- Note:
+    If you modify this file you may have to make the same change in 
build_framework.xml.
+    build_framework.xml is renamed to build.xml when it is packaged.
+    It is used to build the frameworks directory from the zip file. 
+-->
+<project name="examples" default="main" basedir=".">
+
+    <property name="FLEXJS_HOME" location=".."/>
+
+    <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
+    <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
+    <!-- local.d32 is set/used in build.properties so this needs to be done 
first. -->
+    <condition property="local.d32" value="-d32">
+        <and>
+            <os family="mac"/>
+            <matches pattern="1.6.*" string="${java.version}"/>
+            <equals arg1="${sun.arch.data.model}" arg2="64"/>
+            <equals arg1="${os.arch}" arg2="x86_64"/>
+        </and>
+    </condition>
+
+    <!-- Property for the platform.  -->
+    <condition property="isMac">
+        <os family="mac"/>
+    </condition>
+    <condition property="isWindows">
+        <os family="windows" />
+    </condition>   
+    <condition property="isLinux">
+        <and>
+          <os family="unix"/>    
+          <not>
+            <os family="mac"/>    
+          </not>
+        </and>
+    </condition>  
+
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+ 
+    <target name="main" depends="check-compile-env,clean,prepare,compile" 
+        description="Clean build of all examples"/>
+
+    <target name="check-compile-env" description="Check for the required 
environment variables">
+        <ant antfile="${FLEXJS_HOME}/build.xml" target="check-compile-env" 
dir="${FLEXJS_HOME}"/>
+    </target>
+
+    
+    <target name="prepare" depends="thirdparty-downloads"/>
+            
+    <target name="thirdparty-downloads" unless="no.thirdparty-downloads" 
description="Downloads all the required thirdparty code.">
+        <!--<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>-->
+    </target>
+    
+    <target name="compile" description="Compile Examples" >
+        <ant dir="${basedir}/CordovaCameraExample"/>
+        <ant dir="${basedir}/ContainerTest"/>
+        <ant dir="${basedir}/DataBindingExample"/>
+        <ant dir="${basedir}/DataBindingExample_as"/>
+        <ant dir="${basedir}/DataBindingExample_Flat"/>
+        <ant dir="${basedir}/DataGridExample"/>
+               <ant dir="${basedir}/DateChooserExample"/>
+        <ant dir="${basedir}/DesktopMap"/>
+        <ant dir="${basedir}/EffectsExample"/>
+        <ant dir="${basedir}/FlexJSStore"/>
+        <ant dir="${basedir}/FlexJSStore_jquery"/>
+        <ant dir="${basedir}/FlexJSTest_basic"/>
+        <ant dir="${basedir}/FlexJSTest_createjs"/>
+        <ant dir="${basedir}/FlexJSTest_HTML5"/>
+        <ant dir="${basedir}/FlexJSTest_jquery"/>
+        <ant dir="${basedir}/FlexJSTest_Panel"/>
+        <ant dir="${basedir}/FlexJSTest_SVG"/>
+        <ant dir="${basedir}/FormExample"/>
+        <ant dir="${basedir}/ImageTest"/>
+        <ant dir="${basedir}/LanguageTests"/>
+        <ant dir="${basedir}/ListsTest"/>
+        <ant dir="${basedir}/MapSearch"/>
+        <ant dir="${basedir}/MobileTrader"/>
+        <ant dir="${basedir}/RollEventsTest"/>
+        <ant dir="${basedir}/StockQuote"/>
+        <ant dir="${basedir}/ChartExample"/>
+        <ant dir="${basedir}/TodoListSampleApp"/>
+    </target>
+          
+    <!--
+               Cleanup
+       -->
+
+    <target name="super-clean" depends="thirdparty-clean,clean" 
description="Cleans everything including thirdparty downloads."/>
+       
+    <target name="thirdparty-clean" unless="no.thirdparty-clean" 
description="Removes all thirdparty downloads.">
+        <!--<ant antfile="${basedir}/downloads.xml" target="clean" 
dir="${basedir}"/>-->
+    </target>
+    
+    <target name="clean" description="Cleans all SWCs and their resource 
bundles">
+        <ant dir="${basedir}/CordovaCameraExample" target="clean"/>
+        <ant dir="${basedir}/ContainerTest" target="clean"/>
+        <ant dir="${basedir}/DataBindingExample" target="clean"/>
+        <ant dir="${basedir}/DataBindingExample_as" target="clean"/>
+        <ant dir="${basedir}/DataBindingExample_Flat" target="clean"/>
+        <ant dir="${basedir}/DataGridExample" target="clean"/>
+        <ant dir="${basedir}/DateChooserExample" target="clean"/>
+        <ant dir="${basedir}/DesktopMap" target="clean"/>
+        <ant dir="${basedir}/EffectsExample" target="clean"/>
+        <ant dir="${basedir}/FlexJSStore" target="clean"/>
+        <ant dir="${basedir}/FlexJSStore_jquery" target="clean"/>
+        <ant dir="${basedir}/FlexJSTest_basic" target="clean"/>
+        <ant dir="${basedir}/FlexJSTest_createjs" target="clean"/>
+        <ant dir="${basedir}/FlexJSTest_HTML5" target="clean"/>
+        <ant dir="${basedir}/FlexJSTest_jquery" target="clean"/>
+        <ant dir="${basedir}/FlexJSTest_Panel" target="clean"/>
+        <ant dir="${basedir}/FlexJSTest_SVG" target="clean"/>
+        <ant dir="${basedir}/FormatExample" target="clean"/>
+        <ant dir="${basedir}/FormExample" target="clean"/>
+        <ant dir="${basedir}/ImageTest" target="clean"/>
+        <ant dir="${basedir}/LanguageTests" target="clean"/>
+        <ant dir="${basedir}/ListsTest" target="clean"/>
+        <ant dir="${basedir}/MapSearch" target="clean"/>
+        <ant dir="${basedir}/MobileTrader" target="clean"/>
+        <ant dir="${basedir}/RollEventsTest" target="clean"/>
+        <ant dir="${basedir}/StatesTest" target="clean"/>
+        <ant dir="${basedir}/StockQuote" target="clean"/>
+        <ant dir="${basedir}/ChartExample" target="clean"/>
+        <ant dir="${basedir}/TodoListSampleApp" target="clean"/>
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0485c8b6/manualtests/build_example.xml
----------------------------------------------------------------------
diff --git a/manualtests/build_example.xml b/manualtests/build_example.xml
new file mode 100644
index 0000000..81a263e
--- /dev/null
+++ b/manualtests/build_example.xml
@@ -0,0 +1,356 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+
+<project name="build_example" basedir=".">
+
+    <path id="lib.path">
+      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+    </path>
+    
+    <target name="compile" description="Compiles ${example}">
+        <echo message="Compiling ${example}.swf"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+
+        <!-- Load the <compc> task. We can't do this at the <project> level -->
+        <!-- because targets that run before flexTasks.jar gets built would 
fail. -->
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <!-- this is a dummy var placeholder in case some example needs to 
define a theme
+            then they would set theme_arg=-theme=<path to theme> -->
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+        <mxmlc fork="true"
+               file="${basedir}/src/${example}.mxml"
+               output="${basedir}/bin-debug/${example}.swf">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <arg value="+flexlib=${basedir}/frameworks" />
+            <arg value="-debug" />
+            <arg value="${theme_arg}" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg 
value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg 
value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg value="-compiler.binding-value-change-event-type=valueChange" 
/>
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+        </mxmlc>
+        
+        <html-wrapper 
+            height="100%" 
+            width="100%"
+            bgcolor="#ffffff"
+            name="${example}"
+            versionmajor="11"
+            versionminor="1"
+            versionrevision="0" 
+            output="${basedir}/bin-debug"/> 
+ 
+        <copy todir="${basedir}/bin-debug">
+            <fileset dir="${basedir}/src">
+                <include name="**/*.png" />
+                <include name="**/*.jpg" />
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/bin-debug/fonts">
+            <fileset dir="${FLEX_HOME}/frameworks/fonts">
+                <include name="**/*.swf" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="compileair" description="Compiles ${example}">
+        <echo message="Compiling ${example}.swf"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        
+        <!-- Load the <compc> task. We can't do this at the <project> level -->
+        <!-- because targets that run before flexTasks.jar gets built would 
fail. -->
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+        <mxmlc fork="true"
+            file="${basedir}/src/${example}.mxml"
+            output="${basedir}/bin-debug/${example}.swf">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <arg value="+flexlib=${basedir}/frameworks" />
+            <arg value="+configname=air" />
+            <arg value="-debug" />
+            <arg value="${theme_arg}" />
+            <arg value="-target-player=${playerglobal.version}" />
+            <arg value="-swf-version=${swf.version}" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg 
value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg 
value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg value="-compiler.binding-value-change-event-type=valueChange" 
/>
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+        </mxmlc>
+        
+        <copy todir="${basedir}/bin-debug">
+            <fileset dir="${basedir}/src">
+                <include name="*.png" />
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/bin-debug">
+            <fileset dir="${basedir}">
+                <include name="*-app.xml" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="compileas" description="Compiles ${example}">
+        <echo message="Compiling ${example}.swf"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+
+        <!-- Load the <compc> task. We can't do this at the <project> level -->
+        <!-- because targets that run before flexTasks.jar gets built would 
fail. -->
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+        <mxmlc fork="true"
+               file="${basedir}/src/${example}.as"
+               output="${basedir}/bin-debug/${example}.swf">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <arg value="+flexlib=${basedir}/frameworks" />
+            <arg value="-debug" />
+            <arg value="${theme_arg}" />
+            <arg value="-define=CONFIG::as_only,true" />
+            <arg value="-define=CONFIG::js_only,false" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg 
value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg 
value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg value="-compiler.binding-value-change-event-type=valueChange" 
/>
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+        </mxmlc>
+        
+        <html-wrapper 
+            height="300" 
+            width="400"
+            bgcolor="#ffffff"
+            name="${example}"
+            versionmajor="11"
+            versionminor="1"
+            versionrevision="0" 
+            output="${basedir}/bin-debug"/> 
+ 
+    </target>
+
+    <target name="compilejs" description="Cross-compiles ${example}" 
unless="no.js">
+        <echo message="Compiling ${example}.js"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+
+        <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
+            fork="true">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
+            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
+            <arg value="-debug" />
+            <arg value="${theme_arg}" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg 
value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg 
value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg value="-compiler.binding-value-change-event-type=valueChange" 
/>
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-closure-lib=${GOOG_HOME}" />
+            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" 
/>
+            <arg 
value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs/jquery_externals.js"
 />
+            <arg 
value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs/createjs_externals.js"
 />
+            <arg value="${basedir}/src/${example}.mxml" />      
+        </java>
+        <fail>
+                       <condition>
+                               <not>
+                                       <or>
+                                               <equals arg1="${errorCode}" 
arg2="0" />
+                                               <equals arg1="${errorCode}" 
arg2="2" />
+                                       </or>
+                               </not>
+                       </condition>
+               </fail>
+    </target>
+
+    <target name="compilejsair" description="Cross-compiles ${example}" 
unless="no.js">
+        <echo message="Compiling ${example}.js"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+        
+        <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
+            fork="true">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
+            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
+            <arg value="+configname=air" />
+            <arg value="-debug" />
+            <arg value="${theme_arg}" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg 
value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg 
value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg value="-compiler.binding-value-change-event-type=valueChange" 
/>
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-closure-lib=${GOOG_HOME}" />
+            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" 
/>
+            <arg 
value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs/jquery_externals.js"
 />
+            <arg 
value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs/createjs_externals.js"
 />
+            <arg value="${basedir}/src/${example}.mxml" />
+        </java>
+        <fail>
+            <condition>
+                <not>
+                    <or>
+                        <equals arg1="${errorCode}" arg2="0" />
+                        <equals arg1="${errorCode}" arg2="2" />
+                    </or>
+                </not>
+            </condition>
+        </fail>
+    </target>
+
+    <target name="compileasjs" description="Cross-compiles ${example}" 
unless="no.js">
+        <echo message="Compiling ${example}.js"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+
+        <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
+            fork="true">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
+            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
+            <arg value="-debug" />
+            <arg value="${theme_arg}" />
+            <arg value="-define=CONFIG::as_only,false" />
+            <arg value="-define=CONFIG::js_only,true" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg 
value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg 
value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
 />
+            <arg value="-compiler.binding-value-change-event-type=valueChange" 
/>
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-closure-lib=${GOOG_HOME}" />
+            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" 
/>
+            <arg 
value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs/jquery_externals.js"
 />
+            <arg 
value="-external-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs/createjs_externals.js"
 />
+            <arg value="${basedir}/src/${example}.as" />      
+        </java>
+        <fail>
+                       <condition>
+                               <not>
+                                       <or>
+                                               <equals arg1="${errorCode}" 
arg2="0" />
+                                               <equals arg1="${errorCode}" 
arg2="2" />
+                                       </or>
+                               </not>
+                       </condition>
+               </fail>        
+    </target>
+
+    <macrodef name="html-wrapper">
+        <attribute name="width"/>
+        <attribute name="height"/>
+        <attribute name="bgcolor"/>
+        <attribute name="name"/>
+        <attribute name="versionmajor"/>
+        <attribute name="versionminor"/>
+        <attribute name="versionrevision"/>
+        <attribute name="output"/>
+            <sequential>
+                <copy toFile="@{output}/@{name}.html" 
+                    
file="${FLEXJS_HOME}/templates/swfobject/index.template.html" />
+                <copy toDir="@{output}/history">
+                    <fileset dir="${FLEXJS_HOME}/templates/swfobject/history">
+                        <include name="**"/>
+                    </fileset>
+                </copy>
+                <copy toDir="@{output}">
+                    <fileset dir="${FLEXJS_HOME}/templates/swfobject">
+                        <include name="*"/>
+                        <exclude name="index.template.html"/>
+                    </fileset>
+                </copy>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${title}"
+                        value="@{name}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${bgcolor}"
+                        value="@{bgcolor}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${useBrowserHistory}"
+                        value="--"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${version_major}"
+                        value="@{versionmajor}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${version_minor}"
+                        value="@{versionminor}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${version_revision}"
+                        value="@{versionrevision}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${expressInstallSwf}"
+                        value="expressInstall.swf"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${expressInstallSwf}"
+                        value="expressInstall.swf"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${width}"
+                        value="@{width}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${height}"
+                        value="@{height}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${application}"
+                        value="@{name}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${swf}"
+                        value="@{name}"/>
+                </replace>
+        </sequential>
+    </macrodef>
+    
+</project>

Reply via email to