Repository: flex-tourjs
Updated Branches:
  refs/heads/develop 54708ba63 -> 90bc8e5e8


A couple of initial examples.


Project: http://git-wip-us.apache.org/repos/asf/flex-tourjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tourjs/commit/90bc8e5e
Tree: http://git-wip-us.apache.org/repos/asf/flex-tourjs/tree/90bc8e5e
Diff: http://git-wip-us.apache.org/repos/asf/flex-tourjs/diff/90bc8e5e

Branch: refs/heads/develop
Commit: 90bc8e5e8c8ea762d28abb93c7ffa2b8589b6b1b
Parents: 54708ba
Author: Peter Ent <[email protected]>
Authored: Tue Jan 24 15:13:19 2017 -0500
Committer: Peter Ent <[email protected]>
Committed: Tue Jan 24 15:13:19 2017 -0500

----------------------------------------------------------------------
 README.txt                                      |   4 +
 examples/build.xml                              |  96 ++++
 examples/build_example.xml                      | 466 +++++++++++++++++++
 .../generalComponents/alert/Alert/build.xml     |  46 ++
 .../alert/Alert/src/main/flex/Alert.mxml        |  42 ++
 .../alert/SimpleAlert/build.xml                 |  46 ++
 .../SimpleAlert/src/main/flex/SimpleAlert.mxml  |  39 ++
 7 files changed, 739 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/90bc8e5e/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
index 2c03ec7..5b36184 100644
--- a/README.txt
+++ b/README.txt
@@ -19,3 +19,7 @@
 Tour de FlexJS - 12 Jan 2017
 
 This repository contains this source and resource files for the Apache FlexJS, 
"Tour de FlexJS". A collection of examples of every component in the FlexJS 
framework.
+
+TourJS: The actual “Tour de FlexJS” application. The source and build for 
this app lies within this directory. The content displayed also lives in this 
directory within the src/main/resources directory.
+
+Examples: The sources to the samples displayed in the TourJS. 

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/90bc8e5e/examples/build.xml
----------------------------------------------------------------------
diff --git a/examples/build.xml b/examples/build.xml
new file mode 100644
index 0000000..fa27030
--- /dev/null
+++ b/examples/build.xml
@@ -0,0 +1,96 @@
+<?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="../../flex-asjs"/>
+
+    <!-- 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}/visualComponents/generalComponents/alert/Alert"/>
+        <ant 
dir="${basedir}/visualComponents/generalComponents/alert/SimpleAlert"/>
+    </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}/visualComponents/generalComponents/alert/Alert" 
target="clean"/>
+        <ant 
dir="${basedir}/visualComponents/generalComponents/alert/SimpleAlert" 
target="clean"/>
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/90bc8e5e/examples/build_example.xml
----------------------------------------------------------------------
diff --git a/examples/build_example.xml b/examples/build_example.xml
new file mode 100644
index 0000000..42a351d
--- /dev/null
+++ b/examples/build_example.xml
@@ -0,0 +1,466 @@
+<?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=".">
+
+       <echo message="FLEXJS_HOME: ${FLEXJS_HOME}"/>
+       
+    <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
+        <and>
+            <not>
+                <isset property="FALCON_HOME" />
+            </not>
+            <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" 
type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCON_HOME" 
value="${FLEXJS_HOME}/../flex-falcon/compiler">
+        <and>
+            <not>
+                <isset property="FALCON_HOME" />
+            </not>
+            <available 
file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" 
/>
+        </and>
+    </condition>
+
+    <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
+        <and>
+            <not>
+                <isset property="FALCON_HOME" />
+            </not>
+            <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" 
/>
+        </and>
+    </condition>
+
+    <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
+        <and>
+            <not>
+                <isset property="FALCONJX_HOME" />
+            </not>
+            <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
+        <and>
+            <not>
+                <isset property="FALCONJX_HOME" />
+            </not>
+            <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCONJX_HOME" 
value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
+        <and>
+            <not>
+                <isset property="FALCONJX_HOME" />
+            </not>
+            <available 
file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
+        </and>
+    </condition>
+
+    <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
+        <and>
+            <not>
+                <isset property="GOOG_HOME" />
+            </not>
+            <available file="${env.GOOG_HOME}/closure/goog/base.js" 
type="file" />
+        </and>
+    </condition>
+
+    <condition property="GOOG_HOME" 
value="${FLEXJS_HOME}/js/lib/google/closure-library">
+        <and>
+            <not>
+                <isset property="GOOG_HOME" />
+            </not>
+            <available 
file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" 
type="file" />
+        </and>
+    </condition>
+
+    <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/main/flex/${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="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <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"/> 
+ 
+        <antcall target="build_example.copy-resources" />
+        <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/main/flex/${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="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+        </mxmlc>
+        
+        <antcall target="build_example.copy-resources" />
+        <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/main/flex/${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="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <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" />
+        <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
+        <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
+        <property name="opt2_arg" value="-define=CONFIG::opt2,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=false" />
+            <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="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="${extlib_arg}" />
+            <arg value="${opt1_arg}" />
+            <arg value="${opt2_arg}" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-closure-lib=${GOOG_HOME}" />
+            <arg 
value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
+            <arg value="${basedir}/src/main/flex/${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" />
+        <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
+        <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
+        <property name="opt2_arg" value="-define=CONFIG::opt2,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=false" />
+            <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="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="${extlib_arg}" />
+            <arg value="${opt1_arg}" />
+            <arg value="${opt2_arg}" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-closure-lib=${GOOG_HOME}" />
+            <arg 
value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
+            <arg value="${basedir}/src/main/flex/${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" />
+        <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
+        <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
+        <property name="opt2_arg" value="-define=CONFIG::opt2,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=false" />
+            <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="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
 />
+                       <arg 
value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="${extlib_arg}" />
+            <arg value="${opt1_arg}" />
+            <arg value="${opt2_arg}" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-closure-lib=${GOOG_HOME}" />
+            <arg 
value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
+            <arg value="${basedir}/src/main/flex/${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>
+    
+    <target name="check-resources" >
+        <available file="${basedir}/src/main/resources"
+        type="dir"
+        property="has-resources"/>
+    </target>
+    
+    <target name="copy-resources" depends="check-resources" if="has-resources">
+        <copy todir="${basedir}/bin-debug">
+            <fileset dir="${basedir}/src/main/resources">
+                <include name="**/*.png" />
+                <include name="**/*.jpg" />
+                <include name="**/*.json" />
+            </fileset>
+        </copy>
+    </target>
+</project>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/90bc8e5e/examples/visualComponents/generalComponents/alert/Alert/build.xml
----------------------------------------------------------------------
diff --git a/examples/visualComponents/generalComponents/alert/Alert/build.xml 
b/examples/visualComponents/generalComponents/alert/Alert/build.xml
new file mode 100644
index 0000000..b114701
--- /dev/null
+++ b/examples/visualComponents/generalComponents/alert/Alert/build.xml
@@ -0,0 +1,46 @@
+<?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="alert" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../../../../../flex-asjs"/>
+    <property name="example" value="Alert" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" 
/>
+
+    <include file="${basedir}/../../../../build_example.xml" />
+    
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/90bc8e5e/examples/visualComponents/generalComponents/alert/Alert/src/main/flex/Alert.mxml
----------------------------------------------------------------------
diff --git 
a/examples/visualComponents/generalComponents/alert/Alert/src/main/flex/Alert.mxml
 
b/examples/visualComponents/generalComponents/alert/Alert/src/main/flex/Alert.mxml
new file mode 100644
index 0000000..e428763
--- /dev/null
+++ 
b/examples/visualComponents/generalComponents/alert/Alert/src/main/flex/Alert.mxml
@@ -0,0 +1,42 @@
+<?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:js="library://ns.apache.org/flexjs/basic" >
+    <fx:Script>
+       <![CDATA[
+               import org.apache.flex.html.Alert;
+               
+               private function showAlert():void {
+                       Alert.show("This is a standard FlexJS alert. Do you 
wish to continue?", 
+                                  mainView, 
+                                  "Standard Alert", 
+                                  Alert.YES|Alert.NO);
+               }
+       ]]>
+    </fx:Script>
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+    <js:initialView>
+        <js:View id="mainView">
+               <js:TextButton text="Show Alert" click="showAlert()" />
+        </js:View>
+    </js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/90bc8e5e/examples/visualComponents/generalComponents/alert/SimpleAlert/build.xml
----------------------------------------------------------------------
diff --git 
a/examples/visualComponents/generalComponents/alert/SimpleAlert/build.xml 
b/examples/visualComponents/generalComponents/alert/SimpleAlert/build.xml
new file mode 100644
index 0000000..2d8ddd7
--- /dev/null
+++ b/examples/visualComponents/generalComponents/alert/SimpleAlert/build.xml
@@ -0,0 +1,46 @@
+<?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="simplealert" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../../../../../flex-asjs"/>
+    <property name="example" value="SimpleAlert" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" 
/>
+
+    <include file="${basedir}/../../../../build_example.xml" />
+    
+    <target name="main" 
depends="clean,build_example.compile,build_example.compilejs" 
description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/90bc8e5e/examples/visualComponents/generalComponents/alert/SimpleAlert/src/main/flex/SimpleAlert.mxml
----------------------------------------------------------------------
diff --git 
a/examples/visualComponents/generalComponents/alert/SimpleAlert/src/main/flex/SimpleAlert.mxml
 
b/examples/visualComponents/generalComponents/alert/SimpleAlert/src/main/flex/SimpleAlert.mxml
new file mode 100644
index 0000000..7aa0c47
--- /dev/null
+++ 
b/examples/visualComponents/generalComponents/alert/SimpleAlert/src/main/flex/SimpleAlert.mxml
@@ -0,0 +1,39 @@
+<?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:js="library://ns.apache.org/flexjs/basic" >
+    <fx:Script>
+       <![CDATA[
+               import org.apache.flex.html.SimpleAlert;
+               
+               private function showAlert():void {
+                       SimpleAlert.show("This is a Simple Alert", mainView);
+               }
+       ]]>
+    </fx:Script>
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+    <js:initialView>
+        <js:View id="mainView">
+               <js:TextButton text="Show Simple Alert" click="showAlert()" />
+        </js:View>
+    </js:initialView>
+</js:Application>

Reply via email to