You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/08/01 13:35:29 UTC
git commit: [flex-asjs] [refs/heads/develop] - VF2JS example projects.
Repository: flex-asjs
Updated Branches:
refs/heads/develop 644f932fe -> 517a29723
VF2JS example projects.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/517a2972
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/517a2972
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/517a2972
Branch: refs/heads/develop
Commit: 517a29723b7737c0b7e51049d06e24ddab386e2b
Parents: 644f932
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Aug 1 13:35:16 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Aug 1 13:35:16 2014 +0200
----------------------------------------------------------------------
examples/build_example.xml | 67 ++++
examples/vf2js_DatabindingTest/build.xml | 45 +++
.../src/StockDataJSONItemConverter.as | 78 +++++
.../vf2js_DatabindingTest/src/models/MyModel.as | 174 ++++++++++
.../src/vf2js_DatabindingTest.mxml | 321 +++++++++++++++++++
examples/vf2js_SimpleTest/build.xml | 45 +++
.../vf2js_SimpleTest/src/vf2js_SimpleTest.mxml | 30 ++
7 files changed, 760 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/517a2972/examples/build_example.xml
----------------------------------------------------------------------
diff --git a/examples/build_example.xml b/examples/build_example.xml
index aeb05b8..f4cb6c7 100644
--- a/examples/build_example.xml
+++ b/examples/build_example.xml
@@ -75,6 +75,41 @@
</copy>
</target>
+ <target name="compile_vf2js" description="Compiles ${example} (VF2JS style)">
+ <echo message="Compiling ${example}.swf"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+
+ <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+
+ <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="+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"/>
+
+ <copy todir="${basedir}/bin-debug">
+ <fileset dir="${basedir}/src">
+ <include name="*.png" />
+ <include name="*.jpg" />
+ </fileset>
+ </copy>
+ </target>
+
<target name="compileair" description="Compiles ${example}">
<echo message="Compiling ${example}.swf"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
@@ -206,6 +241,38 @@
</fail>
</target>
+ <target name="compilejs_vf2js" description="Cross-compiles ${example} (VF2JS style)">
+ <echo message="Compiling ${example}.js"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FLEXJS_HOME: ${FLEXJS_HOME}"/>
+ <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+ <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+
+ <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
+ fork="true">
+ <jvmarg line="${mxmlc.jvm.args}"/>
+ <jvmarg line="-Dflexlib=${FLEX_HOME}/frameworks}"/>
+ <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+ <arg value="+playerglobal.version=${playerglobal.version}" />
+ <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+ <arg value="-js-output-type=VF2JS" />
+ <arg value="-closure-lib=${GOOG_HOME}" />
+ <arg value="-sdk-js-lib=${FLEXJS_HOME}/vf2js/frameworks/js/src" />
+ <arg value="-output=${basedir}" />
+ <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}">
<echo message="Compiling ${example}.js"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/517a2972/examples/vf2js_DatabindingTest/build.xml
----------------------------------------------------------------------
diff --git a/examples/vf2js_DatabindingTest/build.xml b/examples/vf2js_DatabindingTest/build.xml
new file mode 100644
index 0000000..cea6c04
--- /dev/null
+++ b/examples/vf2js_DatabindingTest/build.xml
@@ -0,0 +1,45 @@
+<?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="vf2js_databindingtest" default="main" basedir=".">
+
+ <property name="example" value="vf2js_DataBindingTest" />
+
+ <property environment="env" />
+
+ <property name="FLEXJS_HOME" location="../.." />
+ <property file="${FLEXJS_HOME}/env.properties" />
+ <property file="${FLEXJS_HOME}/build.properties" />
+
+ <property name="FLEX_HOME" value="${env.FLEX_HOME}" />
+ <property name="FALCON_HOME" value="${env.FALCON_HOME}" />
+ <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}" />
+ <property name="GOOG_HOME" value="${env.GOOG_HOME}" />
+
+ <include file="${basedir}/../build_example.xml"/>
+
+ <target name="main" depends="clean,build_example.compile_vf2js,build_example.compilejs_vf2js" description="Clean build of ${example}" />
+
+ <target name="clean">
+ <delete dir="${basedir}/bin" failonerror="false" />
+ <delete dir="${basedir}/bin-debug" failonerror="false" />
+ <delete dir="${basedir}/bin-release" failonerror="false" />
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/517a2972/examples/vf2js_DatabindingTest/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --git a/examples/vf2js_DatabindingTest/src/StockDataJSONItemConverter.as b/examples/vf2js_DatabindingTest/src/StockDataJSONItemConverter.as
new file mode 100644
index 0000000..8c25b37
--- /dev/null
+++ b/examples/vf2js_DatabindingTest/src/StockDataJSONItemConverter.as
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 mx.rpc.http.AbstractOperation;
+import mx.rpc.http.SerializationFilter;
+
+public class StockDataJSONItemConverter extends SerializationFilter
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ public function StockDataJSONItemConverter()
+ {
+ super();
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------
+ // _deserializedResult
+ //--------------------------------------
+
+ private var _deserializedResult:Object;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------
+ // deserializeResult
+ //--------------------------------------
+
+ override public function deserializeResult(operation:AbstractOperation,
+ result:Object):Object
+ {
+ _deserializedResult = JSON.parse(String(result));
+
+ return result;
+ }
+
+ //--------------------------------------
+ // getItemAt
+ //--------------------------------------
+
+ public function getItemAt(index:int):Object
+ {
+ return _deserializedResult.query.results.quote;
+ }
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/517a2972/examples/vf2js_DatabindingTest/src/models/MyModel.as
----------------------------------------------------------------------
diff --git a/examples/vf2js_DatabindingTest/src/models/MyModel.as b/examples/vf2js_DatabindingTest/src/models/MyModel.as
new file mode 100644
index 0000000..82985d0
--- /dev/null
+++ b/examples/vf2js_DatabindingTest/src/models/MyModel.as
@@ -0,0 +1,174 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 models
+{
+
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import mx.collections.ArrayCollection;
+
+public class MyModel extends EventDispatcher
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ public function MyModel()
+ {
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //--------------------------------------
+ // allData
+ //--------------------------------------
+
+ private var _allData:String = "";
+
+ [Bindable("responseDataChanged")]
+ public function get allData():String
+ {
+ if (_allData == "" && _responseData != null)
+ {
+ for (var p:String in _responseData)
+ {
+ _allData += p + ": " + _responseData[p] + "\n";
+ }
+ }
+ return _allData;
+ }
+
+ //--------------------------------------
+ // requestedField
+ //--------------------------------------
+
+ private var _requestedField:String = "Ask";
+
+ [Bindable("requestedFieldChanged")]
+ public function get requestedField():String
+ {
+ return _requestedField;
+ }
+
+ public function set requestedField(value:String):void
+ {
+ if (value != _requestedField)
+ {
+ _requestedField = value;
+ dispatchEvent(new Event("requestedFieldChanged"));
+ if (_responseData)
+ {
+ dispatchEvent(new Event("responseTextChanged"));
+ }
+ }
+ }
+
+ //--------------------------------------
+ // responseData
+ //--------------------------------------
+
+ private var _responseData:Object;
+
+ [Bindable("responseDataChanged")]
+ public function get responseData():Object
+ {
+ return _responseData;
+ }
+
+ public function set responseData(value:Object):void
+ {
+ if (value != _responseData)
+ {
+ _responseData = value;
+ _allData = "";
+ dispatchEvent(new Event("responseDataChanged"));
+ dispatchEvent(new Event("responseTextChanged"));
+ }
+ }
+
+ //--------------------------------------
+ // responseText
+ //--------------------------------------
+
+ private var _responseText:String;
+
+ [Bindable("responseTextChanged")]
+ public function get responseText():String
+ {
+ if (_responseData == null)
+ {
+ return "";
+ }
+ if (_responseData == "No Data")
+ {
+ return _responseData as String;
+ }
+ var s:String = _responseData[_requestedField];
+ if (s == null)
+ {
+ if (_requestedField == "Ask")
+ {
+ s = _responseData["Bid"];
+ }
+ }
+ return s;
+ }
+
+ //--------------------------------------
+ // stockSymbol
+ //--------------------------------------
+
+ private var _stockSymbol:String;
+
+ [Bindable(event = "stockSymbolChanged")]
+ public function get stockSymbol():String
+ {
+ return _stockSymbol;
+ }
+
+ public function set stockSymbol(value:String):void
+ {
+ if (_stockSymbol !== value)
+ {
+ _stockSymbol = value;
+ dispatchEvent(new Event("stockSymbolChanged"));
+ }
+ }
+
+ //--------------------------------------
+ // strings
+ //--------------------------------------
+
+ private var _strings:ArrayCollection = new ArrayCollection([ "AAPL", "ADBE",
+ "GOOG", "MSFT", "YHOO" ]);
+
+ public function get strings():ArrayCollection
+ {
+ return _strings;
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/517a2972/examples/vf2js_DatabindingTest/src/vf2js_DatabindingTest.mxml
----------------------------------------------------------------------
diff --git a/examples/vf2js_DatabindingTest/src/vf2js_DatabindingTest.mxml b/examples/vf2js_DatabindingTest/src/vf2js_DatabindingTest.mxml
new file mode 100644
index 0000000..1e69d4d
--- /dev/null
+++ b/examples/vf2js_DatabindingTest/src/vf2js_DatabindingTest.mxml
@@ -0,0 +1,321 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:local="*"
+ xmlns:models="models.*"
+ creationComplete="init();">
+
+ <fx:Style>
+
+ @namespace s "library://ns.adobe.com/flex/spark";
+ @namespace mx "library://ns.adobe.com/flex/mx";
+
+ .leftSide {
+ /* Implemented as properties, not styles */
+ /*vertical-align: top;
+ margin-right: 10px;*/
+ }
+
+ .output {
+ font-size: 20;
+ }
+
+ .quoteButton {
+ /* No applicable styles or properties available in Spark Button */
+ /*margin-top: 10px;
+ margin-bottom: 10px;*/
+ }
+
+ .rightSide {
+ /* Implemented as properties, not styles */
+ /*vertical-align: top;
+ margin-left: 10px;
+ padding-left: 10px;*/
+ }
+
+ .topContainer {
+ /* Implemented as properties, not styles */
+ /*padding: 10px;*/
+ }
+
+ </fx:Style>
+
+ <fx:Script><![CDATA[
+
+ import mx.rpc.events.ResultEvent;
+
+ //----------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //----------------------------------------------------------------------
+
+ //--------------------------------------
+ // fieldText
+ //--------------------------------------
+
+ [Bindable]
+ public var fieldText:String;
+
+ //--------------------------------------
+ // requestedField
+ //--------------------------------------
+
+ public function get requestedField():String
+ {
+ return group1.selectedValue as String;
+ }
+
+ //--------------------------------------
+ // symbol
+ //--------------------------------------
+
+ private var _symbol:String;
+
+ public function get symbol():String
+ {
+ return _symbol;
+ }
+
+ //--------------------------------------
+ // _queryBegin
+ //--------------------------------------
+
+ private var _queryBegin:String =
+ "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20" +
+ "yahoo.finance.quotes%20where%20symbol%20in%20(%22";
+
+ //--------------------------------------
+ // _queryEnd
+ //--------------------------------------
+
+ private var _queryEnd:String =
+ "%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&" +
+ "format=json";
+
+ //----------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //----------------------------------------------------------------------
+
+ //--------------------------------------
+ // buttonClickHandler
+ //--------------------------------------
+
+ private function buttonClickHandler(event:Event):void
+ {
+ service.url = _queryBegin + symbol + _queryEnd;
+ service.send();
+ service.addEventListener("result", completeHandler);
+ }
+
+ //--------------------------------------
+ // completeHandler
+ //--------------------------------------
+
+ private function completeHandler(event:ResultEvent):void
+ {
+ myModel.responseData = collection.getItemAt(0);
+ }
+
+ //--------------------------------------
+ // init
+ //--------------------------------------
+
+ private function init():void
+ {
+ addEventListener("buttonClicked", buttonClickHandler);
+ addEventListener("radioClicked", radioClickHandler);
+ addEventListener("listChanged", listChangedHandler);
+
+ myModel.stockSymbol = 'ADBE';
+
+ list.selectedItem = myModel.stockSymbol;
+
+ group1.selectedValue = myModel.requestedField;
+
+ radio1.selected = true;
+
+ fieldText = radio1.label;
+ }
+
+ //--------------------------------------
+ // listChangedHandler
+ //--------------------------------------
+
+ private function listChangedHandler(event:Event):void
+ {
+ myModel.stockSymbol = symbol;
+ }
+
+ //--------------------------------------
+ // radioChanged
+ //--------------------------------------
+
+ private function radioChanged(e:Event):void
+ {
+ dispatchEvent(new Event("radioClicked"));
+ fieldText = RadioButton(e.target).label;
+ }
+
+ //--------------------------------------
+ // radioClickHandler
+ //--------------------------------------
+
+ private function radioClickHandler(event:Event):void
+ {
+ var field:String = requestedField;
+
+ myModel.requestedField = field;
+ }
+
+ //--------------------------------------
+ // setState
+ //--------------------------------------
+
+ private function setState():void
+ {
+ currentState = showAllData.selected ? "showAll" : "hideAll";
+ }
+
+ ]]></fx:Script>
+
+ <fx:Declarations>
+
+ <s:HTTPService id="service">
+
+ <s:serializationFilter>
+
+ <local:StockDataJSONItemConverter id="collection" />
+
+ </s:serializationFilter>
+
+ </s:HTTPService>
+
+ <models:MyModel id="myModel" />
+
+ <s:RadioButtonGroup id="group1" />
+
+ </fx:Declarations>
+
+ <s:states>
+
+ <s:State name="hideAll" />
+
+ <s:State name="showAll" />
+
+ </s:states>
+
+ <s:VGroup>
+
+ <s:Label
+ width="300"
+ text="Enter Stock Symbol or choose from list:" />
+
+ <s:HGroup
+ paddingBottom="10"
+ paddingLeft="10"
+ paddingRight="10"
+ paddingTop="10"
+ styleName="topContainer">
+
+ <s:VGroup
+ paddingRight="10"
+ verticalAlign="top"
+ styleName="leftSide">
+
+ <s:TextInput id="symbolTI"
+ text="{myModel.stockSymbol}" />
+
+ <s:Button
+ label="Get Quote"
+ styleName="quoteButton"
+ click="_symbol = symbolTI.text; dispatchEvent(new Event('buttonClicked'));" />
+
+ <s:Label id="field"
+ text="{fieldText}" />
+
+ <s:Label
+ height="24"
+ styleName="output"
+ text="{myModel.responseText}" />
+
+ </s:VGroup>
+
+ <s:VGroup
+ paddingLeft="20"
+ styleName="rightSide">
+
+ <s:DropDownList id="list"
+ width="100" height="17"
+ dataProvider="{myModel.strings}"
+ change="_symbol = list.selectedItem as String; dispatchEvent(new Event('listChanged'))" />
+
+ <s:RadioButton id="radio1"
+ label="Price"
+ value="Ask"
+ click="radioChanged(event);"
+ group="{group1}" />
+
+ <s:RadioButton id="radio2"
+ label="Change"
+ value="Change"
+ click="radioChanged(event);"
+ group="{group1}" />
+
+ <s:RadioButton id="radio3"
+ label="Day's High"
+ value="DaysHigh"
+ click="radioChanged(event);"
+ group="{group1}" />
+
+ <s:RadioButton id="radio4"
+ label="Day's Low"
+ value="DaysLow"
+ click="radioChanged(event);"
+ group="{group1}" />
+
+ <s:CheckBox id="showAllData"
+ label="Show All Data"
+ change="setState();" />
+
+ </s:VGroup>
+
+ </s:HGroup>
+
+ <s:Label id="bindtest"
+ text="{fieldText + ' expression binding'}" />
+
+ <s:Label
+ width="300"
+ text.showAll="110"
+ includeIn="showAll" />
+
+ <s:TextArea id="ta"
+ width="300" height="100" height.showAll="110"
+ text="{myModel.allData}"
+ includeIn="showAll" />
+
+ </s:VGroup>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/517a2972/examples/vf2js_SimpleTest/build.xml
----------------------------------------------------------------------
diff --git a/examples/vf2js_SimpleTest/build.xml b/examples/vf2js_SimpleTest/build.xml
new file mode 100644
index 0000000..f52c984
--- /dev/null
+++ b/examples/vf2js_SimpleTest/build.xml
@@ -0,0 +1,45 @@
+<?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="vf2js_simpletest" default="main" basedir=".">
+
+ <property name="example" value="vf2js_SimpleTest" />
+
+ <property environment="env" />
+
+ <property name="FLEXJS_HOME" location="../.." />
+ <property file="${FLEXJS_HOME}/env.properties" />
+ <property file="${FLEXJS_HOME}/build.properties" />
+
+ <property name="FLEX_HOME" value="${env.FLEX_HOME}" />
+ <property name="FALCON_HOME" value="${env.FALCON_HOME}" />
+ <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}" />
+ <property name="GOOG_HOME" value="${env.GOOG_HOME}" />
+
+ <include file="${basedir}/../build_example.xml"/>
+
+ <target name="main" depends="clean,build_example.compile_vf2js,build_example.compilejs_vf2js" description="Clean build of ${example}" />
+
+ <target name="clean">
+ <delete dir="${basedir}/bin" failonerror="false" />
+ <delete dir="${basedir}/bin-debug" failonerror="false" />
+ <delete dir="${basedir}/bin-release" failonerror="false" />
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/517a2972/examples/vf2js_SimpleTest/src/vf2js_SimpleTest.mxml
----------------------------------------------------------------------
diff --git a/examples/vf2js_SimpleTest/src/vf2js_SimpleTest.mxml b/examples/vf2js_SimpleTest/src/vf2js_SimpleTest.mxml
new file mode 100644
index 0000000..9227ede
--- /dev/null
+++ b/examples/vf2js_SimpleTest/src/vf2js_SimpleTest.mxml
@@ -0,0 +1,30 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations />
+
+ <s:Button x="100" label="Start" />
+
+ <s:Button x="200" label="Stop" />
+
+</s:Application>