You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/05/10 22:34:31 UTC

[royale-asjs] 02/04: add new SparkRoyale project with Spark Button that compiles

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit b43920cd44cd46f9ace71d25100a0af70f4d77bf
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu May 10 14:53:57 2018 -0700

    add new SparkRoyale project with Spark Button that compiles
---
 frameworks/js/projects/SparkRoyaleJS/build.xml     | 125 ++++++
 .../src/main/config/compile-js-config.xml          | 106 +++++
 frameworks/projects/SparkRoyale/build.xml          | 134 +++++++
 frameworks/projects/SparkRoyale/pom.xml            |  90 +++++
 .../src/main/config/compile-swf-config.xml         | 101 +++++
 .../SparkRoyale/src/main/resources/defaults.css    |  59 +++
 .../src/main/resources/spark-royale-manifest.xml   |  26 ++
 .../src/main/royale/SparkRoyaleClasses.as          |  34 ++
 .../src/main/royale/spark/components/Button.as     | 179 +++++++++
 .../spark/components/supportClasses/ButtonBase.as  | 440 +++++++++++++++++++++
 .../supportClasses/SkinnableComponent.as           | 236 +++++++++++
 11 files changed, 1530 insertions(+)

diff --git a/frameworks/js/projects/SparkRoyaleJS/build.xml b/frameworks/js/projects/SparkRoyaleJS/build.xml
new file mode 100644
index 0000000..60a3a44
--- /dev/null
+++ b/frameworks/js/projects/SparkRoyaleJS/build.xml
@@ -0,0 +1,125 @@
+<?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="SparkRoyaleJS" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../../.."/>
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    <echo file="${basedir}/${target.name}.properties">target.name.nojs=${ant.project.name}</echo>
+    <replaceregexp file="${basedir}/${target.name}.properties" match="(.*)JS$" replace="\1" flags="m" />
+    <property file="${basedir}/${target.name}.properties"/>
+    <delete file="${basedir}/${target.name}.properties"/>
+    
+    <target name="main" depends="clean,check-compiler,compile" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${ROYALE_HOME}/frameworks/js/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+    </target>
+    
+    <target name="compile" depends="check-compiler">
+        <echo message="Cross-compiling ${target.name}"/>
+        <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
+        <mkdir dir="${basedir}/target/generated-sources/royale"/>
+        <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+royalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="-compiler.define+=GOOG::DEBUG,goog.DEBUG" />
+            <arg value="-compiler.strict-xml=true" />
+            <arg value="-compiler.targets=SWF,JSRoyale" />
+            <arg value="-output=${basedir}/target/${target.name}" />
+            <arg value="-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
+            <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml" />
+        </java>
+        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/js/libs/${target.name}" />
+    </target>
+    
+    <target name="copy-js" >
+        <mkdir dir="${ROYALE_HOME}/frameworks/js/generated-sources"/>
+        <copy todir="${ROYALE_HOME}/frameworks/js/generated-sources">
+            <fileset dir="${basedir}/target/generated-sources/royale">
+                <include name="**/**" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="check-compiler" depends="check-compiler-home, check-transpiler-home">
+        <path id="lib.path">
+            <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-compiler-home" unless="ROYALE_SWF_COMPILER_HOME"
+        description="Check ROYALE_SWF_COMPILER_HOME is a directory.">
+        
+        <echo message="ROYALE_SWF_COMPILER_HOME is ${env.ROYALE_SWF_COMPILER_HOME}"/>
+        
+        <available file="${env.ROYALE_SWF_COMPILER_HOME}/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${env.ROYALE_SWF_COMPILER_HOME}"/>
+        
+        <available file="${ROYALE_HOME}/../royale-compiler/compiler/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${ROYALE_HOME}/../royale-compiler/compiler"/>
+        
+        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or a Royale SDK folder"
+        unless="ROYALE_SWF_COMPILER_HOME"/>
+    </target>
+    
+    <target name="check-transpiler-home" unless="ROYALE_COMPILER_HOME"
+        description="Check ROYALE_SWF_COMPILER_HOME is a directory.">
+        
+        <echo message="ROYALE_COMPILER_HOME is ${env.ROYALE_COMPILER_HOME}"/>
+        
+        <available file="${env.ROYALE_COMPILER_HOME}/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${env.ROYALE_COMPILER_HOME}"/>
+        
+        <available file="${ROYALE_HOME}/../royale-compiler/compiler-jx/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${ROYALE_HOME}/../royale-compiler/compiler-jx"/>
+        
+        <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK"
+        unless="ROYALE_COMPILER_HOME"/>
+    </target>
+    
+</project>
diff --git a/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml
new file mode 100644
index 0000000..b17c814
--- /dev/null
+++ b/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml
@@ -0,0 +1,106 @@
+<!--
+
+  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.
+
+-->
+<royale-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <!-- build both SWF and JS. -->
+        <targets>
+            <target>SWF</target>
+            <target>JSRoyale</target>
+        </targets>
+        <strict-xml>true</strict-xml>
+
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.royale.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.royale.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <allow-subclass-overrides>true</allow-subclass-overrides>
+
+        <define>
+            <name>COMPILE::SWF</name>
+            <value>false</value>
+        </define>
+        <define>
+            <name>COMPILE::JS</name>
+            <value>true</value>
+        </define>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <!-- overwrite the default library-path setting -->
+        <library-path>
+            <path-element>../../../../../../../js/libs/GCL.swc</path-element>
+            <!-- asjscompc won't 'link' these classes in, but will list their requires
+             if these swcs are on the external-library-path then their requires
+             will not be listed -->
+            <path-element>../../../../../libs/CoreJS.swc</path-element>
+            <path-element>../../../../../libs/BindingJS.swc</path-element>
+            <path-element>../../../../../libs/BasicJS.swc</path-element>
+            <path-element>../../../../../libs/EffectsJS.swc</path-element>
+            <path-element>../../../../../libs/ExpressJS.swc</path-element>
+            <path-element>../../../../../libs/GraphicsJS.swc</path-element>
+            <path-element>../../../../../libs/ChartsJS.swc</path-element>
+            <path-element>../../../../../libs/MXRoyaleJS.swc</path-element>
+        </library-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/royale/spark</uri>
+                <manifest>../../../../../../projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>../../../../../../projects/SparkRoyale/src/main/royale</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>defaults.css</name>
+        <path>../../../../../../projects/SparkRoyale/src/main/resources/defaults.css</path>
+    </include-file>
+    
+    <include-file>
+    </include-file>
+
+    <include-classes>
+        <class>SparkRoyaleClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/royale/spark</uri>
+    </include-namespaces>
+        
+
+</royale-config>
diff --git a/frameworks/projects/SparkRoyale/build.xml b/frameworks/projects/SparkRoyale/build.xml
new file mode 100644
index 0000000..03640ad
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/build.xml
@@ -0,0 +1,134 @@
+<?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="SparkRoyale" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="compile-js">
+        <ant dir="${ROYALE_HOME}/frameworks/js/projects/${ant.project.name}JS/" inheritAll="false" >
+            <property name="ROYALE_SWF_COMPILER_HOME" value="${ROYALE_SWF_COMPILER_HOME}"/>
+            <property name="ROYALE_COMPILER_HOME" value="${ROYALE_COMPILER_HOME}"/>
+            <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+        </ant>
+    </target>
+    
+    <target name="copy-swc" if="env.AIR_HOME">
+        <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/royale/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" />
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${ROYALE_HOME}/frameworks/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/royale" target="clean"/>
+    </target>
+    
+    <target name="compile" description="Compiles .as files into .swc" if="env.AIR_HOME">
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
+        <echo message="ROYALE_HOME: ${ROYALE_HOME}"/>
+        <echo message="ROYALE_SWF_COMPILER_HOME: ${ROYALE_SWF_COMPILER_HOME}"/>
+        <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/>
+        
+        <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" >
+            <jvmarg value="-Xmx384m" />
+            <jvmarg value="-Dsun.io.useCanonCaches=false" />
+            <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+royalelib=${ROYALE_HOME}/frameworks" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-compiler.strict-xml=true" />
+            <arg value="-compiler.targets=SWF,JSRoyale" />
+            <arg value="-compiler.define+=GOOG::DEBUG,true" />
+            <arg value="-output=${basedir}/target/${target.name}" />
+            <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" />
+            <arg value="-js-compiler-define+=GOOG::DEBUG,goog.DEBUG" />
+            <arg value="-js-compiler-define+=COMPILE::SWF,false" />
+            <arg value="-js-compiler-define+=COMPILE::JS,true" />
+            <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
+            <arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
+        </java>
+    </target>
+    
+    <target name="check-compiler" depends="check-compiler-home,check-transpiler-home">
+        <path id="lib.path">
+            <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-compiler-home"
+        description="Set ROYALE_SWF_COMPILER_HOME to point at the compiler.">
+        
+        <available file="${ROYALE_HOME}/lib/compiler-mxmlc.jar"
+        type="file"
+        property="ROYALE_SWF_COMPILER_HOME"
+        value="${ROYALE_HOME}"/>
+        
+        <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or the root of a Royale SDK"
+        unless="ROYALE_SWF_COMPILER_HOME"/>
+    </target>
+    
+    <target name="check-transpiler-home"
+        description="Set ROYALE_COMPILER_HOME to point at the cross-compiler.">
+        
+        <available file="${ROYALE_HOME}/js/lib/jsc.jar"
+        type="file"
+        property="ROYALE_COMPILER_HOME"
+        value="${ROYALE_HOME}/js"/>
+        
+        <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK"
+        unless="ROYALE_COMPILER_HOME"/>
+    </target>
+    
+</project>
diff --git a/frameworks/projects/SparkRoyale/pom.xml b/frameworks/projects/SparkRoyale/pom.xml
new file mode 100644
index 0000000..df7c312
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/pom.xml
@@ -0,0 +1,90 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.framework</groupId>
+    <artifactId>projects</artifactId>
+    <version>0.9.2-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>MXRoyale</artifactId>
+  <version>0.9.2-SNAPSHOT</version>
+  <packaging>swc</packaging>
+
+  <name>Apache Royale: Framework: Libs: MXRoyale</name>
+
+  <build>
+    <sourceDirectory>src/main/royale</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+        <version>${royale.compiler.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <namespaces>
+            <namespace>
+              <uri>library://ns.apache.org/royale/mx</uri>
+              <manifest>${project.basedir}/src/main/resources/mx-royale-manifest.xml</manifest>
+            </namespace>
+          </namespaces>
+          <includeClasses>
+            <includeClass>MXRoyaleClasses</includeClass>
+          </includeClasses>
+          <skipExtern>true</skipExtern>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.9.2-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.9.2-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.royale.framework</groupId>
+        <artifactId>Basic</artifactId>
+        <version>0.9.2-SNAPSHOT</version>
+        <type>swc</type>
+        <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.royale.framework</groupId>
+        <artifactId>Basic</artifactId>
+        <version>0.9.2-SNAPSHOT</version>
+        <type>swc</type>
+        <classifier>js</classifier>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/frameworks/projects/SparkRoyale/src/main/config/compile-swf-config.xml b/frameworks/projects/SparkRoyale/src/main/config/compile-swf-config.xml
new file mode 100644
index 0000000..f1ed79a
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/config/compile-swf-config.xml
@@ -0,0 +1,101 @@
+<!--
+
+  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.
+
+-->
+<royale-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <!-- build both SWF and JS. -->
+        <targets>
+            <target>SWF</target>
+            <target>JSRoyale</target>
+        </targets>
+        <strict-xml>true</strict-xml>
+
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../../../../libs/Core.swc</path-element>
+            <path-element>../../../../../libs/Basic.swc</path-element>
+            <path-element>../../../../../libs/Collections.swc</path-element>
+            <path-element>../../../../../libs/Graphics.swc</path-element>
+            <path-element>../../../../../libs/MXRoyale.swc</path-element>
+        </external-library-path>
+        
+        <allow-subclass-overrides>true</allow-subclass-overrides>
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.royale.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.royale.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+        
+        <define>
+            <name>COMPILE::SWF</name>
+            <value>true</value>
+        </define>
+        <define>
+            <name>COMPILE::JS</name>
+            <value>false</value>
+        </define>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/royale/spark</uri>
+                <manifest>../resources/spark-royale-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>../royale</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>defaults.css</name>
+        <path>../resources/defaults.css</path>
+    </include-file>
+    
+    <include-lookup-only>true</include-lookup-only>
+    
+    <include-classes>
+        <class>SparkRoyaleClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/royale/spark</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</royale-config>
diff --git a/frameworks/projects/SparkRoyale/src/main/resources/defaults.css b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
new file mode 100644
index 0000000..f5dba01
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
@@ -0,0 +1,59 @@
+/*
+*
+*  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.
+*
+*/
+
+@namespace "library://ns.apache.org/royale/mx";
+
+.royale *, . royale *:before, . royale *:after {
+	-moz-box-sizing: border-box;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+}
+
+global {
+    IStatesImpl:            ClassReference("org.apache.royale.core.StatesWithTransitionsImpl");
+	IEffectTimer: 			ClassReference("org.apache.royale.utils.EffectTimer");
+}
+
+/* -------------------------------------------------------
+ * Common Platform Styles
+ * -------------------------------------------------------
+ */
+
+
+Button
+{
+    IBeadModel: ClassReference("org.apache.royale.html.beads.models.ImageAndTextModel");
+}
+
+/* -------------------------------------------------------
+* SWF specific styles
+* -------------------------------------------------------
+*/
+
+@media -royale-swf
+{
+	/* Global style declaration for Flash only.  This will effectively be the same
+	   as the browser defaults */
+	
+	Button
+	{
+		IBeadView: ClassReference("mx.controls.beads.CSSImageAndTextButtonView");
+	}
+	
+}
\ No newline at end of file
diff --git a/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml b/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
new file mode 100644
index 0000000..bc68b23
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
@@ -0,0 +1,26 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+	<component id="Button" class="spark.components.Button" />
+	
+</componentPackage>
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
new file mode 100644
index 0000000..34350b4
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+
+/**
+ *  @private
+ *  This class is used to link additional classes into SparkRoyale.swc
+ *  beyond those that are found by dependecy analysis starting
+ *  from the classes specified in manifest.xml.
+ */
+internal class SparkRoyaleClasses
+{
+    import spark.components.supportClasses.SkinnableComponent; SkinnableComponent;
+}
+
+}
+
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Button.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Button.as
new file mode 100644
index 0000000..26f11e2
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Button.as
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.components
+{
+
+import org.apache.royale.events.Event;
+import spark.components.supportClasses.ButtonBase;
+//import mx.core.IButton;
+
+
+/**
+ *  Color applied to the button when the emphasized flag is true. 
+ * 
+ *  @default #0099FF
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="accentColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]
+
+/**
+ *  Color of text shadows.
+ * 
+ *  @default #FFFFFF
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="textShadowColor", type="uint", format="Color", inherit="yes", theme="mobile")]
+
+/**
+ *  Alpha of text shadows.
+ * 
+ *  @default 0.55
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="textShadowAlpha", type="Number",inherit="yes", minValue="0.0", maxValue="1.0", theme="mobile")]
+
+[Exclude(name="textAlign", kind="style")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+//[IconFile("Button.png")]
+
+/**
+ *  The Button component is a commonly used rectangular button.
+ *  The Button component looks like it can be pressed.
+ *  The default skin has a text label.
+ *  Define a custom skin class to add an image to the control.
+ *
+ *  <p>Buttons typically use event listeners to perform an action 
+ *  when the user selects the control. When a user clicks the mouse 
+ *  on a Button control, and the Button control is enabled, 
+ *  it dispatches a <code>click</code> event and a <code>buttonDown</code> event. 
+ *  A button always dispatches events such as the <code>mouseMove</code>, 
+ *  <code>mouseOver</code>, <code>mouseOut</code>, <code>rollOver</code>, 
+ *  <code>rollOut</code>, <code>mouseDown</code>, and 
+ *  <code>mouseUp</code> events whether enabled or disabled.</p>
+ *
+ *  <p>To use this component in a list-based component, such as a List or DataGrid, 
+ *  create an item renderer.
+ *  For information about creating an item renderer, see 
+ *  <a href="http://help.adobe.com/en_US/flex/using/WS4bebcd66a74275c3-fc6548e124e49b51c4-8000.html">
+ *  Custom Spark item renderers</a>. </p>
+ *
+ *  <p>The Button control has the following default characteristics:</p>
+ *     <table class="innertable">
+ *        <tr>
+ *           <th>Characteristic</th>
+ *           <th>Description</th>
+ *        </tr>
+ *        <tr>
+ *           <td>Default size</td>
+ *           <td>Wide enough to display the text label of the control</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Minimum size</td>
+ *           <td>21 pixels wide and 21 pixels high</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Maximum size</td>
+ *           <td>10000 pixels wide and 10000 pixels high</td>
+ *        </tr>
+ *        <tr>
+ *           <td>Default skin class</td>
+ *           <td>spark.skins.spark.ButtonSkin</td>
+ *        </tr>
+ *     </table>
+ *
+ *  @mxml <p>The <code>&lt;s:Button&gt;</code> tag inherits all of the tag 
+ *  attributes of its superclass and adds the following tag attributes:</p>
+ *
+ *  <pre>
+ *  &lt;s:Button 
+ *    <strong>Properties</strong>
+ *    emphasized="false"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @see spark.skins.spark.ButtonSkin
+ *  @includeExample examples/ButtonExample.mxml
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class Button extends ButtonBase // implements IButton
+{
+//    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */    
+    public function Button()
+    {
+        super();
+    }   
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+    
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+}
+}
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
new file mode 100644
index 0000000..27819cc
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
@@ -0,0 +1,440 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.components.supportClasses
+{
+COMPILE::JS
+{
+    import goog.DEBUG;
+}
+
+/*
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.events.TimerEvent;
+import flash.ui.Keyboard;
+import flash.utils.Timer;
+
+import mx.core.IVisualElement;
+import mx.core.InteractionMode;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.events.SandboxMouseEvent;
+import mx.events.TouchInteractionEvent;
+
+import spark.core.IDisplayText;
+import spark.primitives.BitmapImage;
+
+use namespace mx_internal;
+*/
+import org.apache.royale.core.ITextModel;
+import mx.managers.IFocusManagerComponent;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+//include "../../styles/metadata/BasicInheritingTextStyles.as"
+
+/**
+ *  The radius of the corners of this component.
+ *
+ *  @default 4
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="spark", minValue="0.0")]
+
+/**
+ *  The alpha of the focus ring for this component.
+ *
+ *  @default 0.5
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="focusAlpha", type="Number", inherit="no", theme="spark, mobile", minValue="0.0", maxValue="1.0")]
+
+/**
+ *  @copy spark.components.supportClasses.GroupBase#style:focusColor
+ *   
+ *  @default 0x70B2EE
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */ 
+//[Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]
+
+/**
+ *  Class or instance to use as the default icon.
+ *  The icon can render from various graphical sources, including the following:  
+ *  <ul>
+ *   <li>A Bitmap or BitmapData instance.</li>
+ *   <li>A class representing a subclass of DisplayObject. The BitmapFill 
+ *       instantiates the class and creates a bitmap rendering of it.</li>
+ *   <li>An instance of a DisplayObject. The BitmapFill copies it into a 
+ *       Bitmap for filling.</li>
+ *   <li>The name of an external image file. </li>
+ *  </ul>
+ * 
+ *  @default null 
+ * 
+ *  @see spark.primitives.BitmapImage.source
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+//[Style(name="icon", type="Object", inherit="no")]
+
+/**
+ *  Orientation of the icon in relation to the label.
+ *  Valid MXML values are <code>right</code>, <code>left</code>,
+ *  <code>bottom</code>, and <code>top</code>.
+ *
+ *  <p>In ActionScript, you can use the following constants
+ *  to set this property:
+ *  <code>IconPlacement.RIGHT</code>,
+ *  <code>IconPlacement.LEFT</code>,
+ *  <code>IconPlacement.BOTTOM</code>, and
+ *  <code>IconPlacement.TOP</code>.</p>
+ *
+ *  @default IconPlacement.LEFT
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="iconPlacement", type="String", enumeration="top,bottom,right,left", inherit="no", theme="spark, mobile")]
+
+/**
+ *  Number of milliseconds to wait after the first <code>buttonDown</code>
+ *  event before repeating <code>buttonDown</code> events at each 
+ *  <code>repeatInterval</code>.
+ * 
+ *  @default 500
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="repeatDelay", type="Number", format="Time", inherit="no", minValue="0.0")]
+
+/**
+ *  Number of milliseconds between <code>buttonDown</code> events
+ *  if the user presses and holds the mouse on a button.
+ *  
+ *  @default 35
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="repeatInterval", type="Number", format="Time", inherit="no", minValueExclusive="0.0")]
+
+/**
+ *  When in touch interaction mode, the number of milliseconds to wait after the user 
+ *  interaction has occured before showing the component in a visually down state.
+ * 
+ *  <p>The reason for this delay is because when a user initiates a scroll gesture, we don't want 
+ *  components to flicker as they touch the screen.  By having a reasonable delay, we make 
+ *  sure that the user still gets feedback when they press down on a component, but that the 
+ *  feedback doesn't come too quickly that it gets displayed during a scroll gesture 
+ *  operation.</p>
+ *  
+ *  <p>If the mobile theme is applied, the default value for this style is 100 ms for 
+ *  components inside of a Scroller and 0 ms for components outside of a Scroller.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+//[Style(name="touchDelay", type="Number", format="Time", inherit="yes", minValue="0.0")]
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the user presses the ButtonBase control.
+ *  If the <code>autoRepeat</code> property is <code>true</code>,
+ *  this event is dispatched repeatedly as long as the button stays down.
+ *
+ *  @eventType mx.events.FlexEvent.BUTTON_DOWN
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Event(name="buttonDown", type="mx.events.FlexEvent")]
+
+//--------------------------------------
+//  Skin states
+//--------------------------------------
+
+/**
+ *  Up State of the Button
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[SkinState("up")]
+
+/**
+ *  Over State of the Button
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[SkinState("over")]
+
+/**
+ *  Down State of the Button
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[SkinState("down")]
+
+/**
+ *  Disabled State of the Button
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[SkinState("disabled")]
+ 
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+//[AccessibilityClass(implementation="spark.accessibility.ButtonBaseAccImpl")]
+
+[DefaultTriggerEvent("click")]
+
+[DefaultProperty("label")]
+
+/**
+ *  The ButtonBase class is the base class for the all Spark button components.
+ *  The Button and ToggleButtonBase classes are subclasses of ButtonBase.
+ *  ToggleButton. 
+ *  The CheckBox and RadioButton classes are subclasses of ToggleButtonBase.
+ * 
+ *  @mxml
+ *
+ *  <p>The <code>&lt;s:ButtonBase&gt;</code> tag inherits all of the tag 
+ *  attributes of its superclass and adds the following tag attributes:</p>
+ *
+ *  <pre>
+ *  &lt;s:ButtonBase
+ *    <strong>Properties</strong>
+ *    autoRepeat="false"
+ *    content="null"
+ *    label=""
+ *    stickyHighlighting="false"
+ *  
+ *    <strong>Events</strong>
+ *    buttonDown="<i>No default</i>"
+ *
+ *    <strong>Styles</strong>
+ *    alignmentBaseline="USE_DOMINANT_BASELINE"
+ *    cffHinting="HORIZONTAL_STEM"
+ *    color="0"
+ *    cornerRadius="4"
+ *    digitCase="DEFAULT"
+ *    digitWidth="DEFAULT"
+ *    direction="LTR"
+ *    dominantBaseline="AUTO"
+ *    focusAlpha="0.5"
+ *    focusColor="0x70B2EE"
+ *    fontFamily="Arial"
+ *    fontLookup="DEVICE"
+ *    fontSize="12"
+ *    fontStyle="NORMAL"
+ *    fontWeight="NORMAL"
+ *    justificationRule="AUTO"
+ *    justificationStyle="AUTO"
+ *    kerning="AUTO"
+ *    ligatureLevel="COMMON"
+ *    lineHeight="120%"
+ *    lineThrough="false"
+ *    locale="en"
+ *    renderingMode="CFF"
+ *    repeatDelay="500"
+ *    repeatInterval="35"
+ *    textAlign="START"
+ *    textAlignLast="START"
+ *    textAlpha="1"
+ *    textDecoration="NONE"
+ *    textJustify="INTER_WORD"
+ *    trackingLeft="0"
+ *    trackingRight="0"
+ *    typographicCase="DEFAULT"
+ *    wordSpacing="100%"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @see spark.components.Button
+ *  @see spark.components.supportClasses.ToggleButtonBase
+ *  @see spark.components.ToggleButton
+ *  @see spark.components.CheckBox
+ *  @see spark.components.RadioButton
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class ButtonBase extends SkinnableComponent implements IFocusManagerComponent
+{
+//    include "../../core/Version.as";
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */    
+    public function ButtonBase()
+    {
+        super();
+
+        // DisplayObjectContainer properties.
+        // Setting mouseChildren to false ensures that mouse events
+        // are dispatched from the Button itself,
+        // not from its skins, icons, or TextField.
+        // One reason for doing this is that if you press the mouse button
+        // while over the TextField and release the mouse button while over
+        // a skin or icon, we want the player to dispatch a "click" event.
+        // Another is that if mouseChildren were true and someone uses
+        // Sprites rather than Shapes for the skins or icons,
+        // then we we wouldn't get a click because the current skin or icon
+        // changes between the mouseDown and the mouseUp.
+        // (This doesn't happen even when mouseChildren is true if the skins
+        // and icons are Shapes, because Shapes never dispatch mouse events;
+        // they are dispatched from the Button in this case.)
+        COMPILE::SWF
+        {
+            mouseChildren = false;                
+        }
+    }   
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    [Bindable("contentChange")]
+    [Inspectable(category="General", defaultValue="")]
+
+    /**
+     *  Text to appear on the ButtonBase control.
+     * 
+     *  <p>If the label is wider than the ButtonBase control,
+     *  the label is truncated and terminated by an ellipsis (...).
+     *  The full label displays as a tooltip
+     *  when the user moves the mouse over the control.
+     *  If you have also set a tooltip by using the <code>tooltip</code>
+     *  property, the tooltip is displayed rather than the label text.</p>
+     *
+     *  <p>This is the default ButtonBase property.</p>
+     *
+     *  <p>This property is a <code>String</code> typed facade to the
+     *  <code>content</code> property.  This property is bindable and it shares
+     *  dispatching the "contentChange" event with the <code>content</code>
+     *  property.</p> 
+     *  
+     *  @default ""
+     *  @see #content
+     *  @eventType contentChange
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function set label(value:String):void
+    {
+        ITextModel(model).text = value;
+        COMPILE::JS {
+            setInnerHTML();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    public function get label():String          
+    {
+        return ITextModel(model).text;
+    }
+
+    /**
+     * @royaleignorecoercion HTMLImageElement
+     */
+    COMPILE::JS
+    protected function setInnerHTML():void
+    {
+        if (label != null) {
+            element.innerHTML = label;
+        }
+                
+        measuredWidth = Number.NaN;
+        measuredHeight = Number.NaN;
+    };
+
+}
+
+}
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as
new file mode 100644
index 0000000..a5d1702
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as
@@ -0,0 +1,236 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.components.supportClasses
+{
+COMPILE::JS
+{
+    import goog.DEBUG;
+}
+
+/*
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.geom.Point;
+import flash.utils.*;
+import mx.core.FlexVersion;
+import mx.core.IFactory;
+import mx.core.ILayoutElement;
+import mx.core.IVisualElement;
+import mx.core.mx_internal;
+import mx.events.PropertyChangeEvent;
+
+import spark.events.SkinPartEvent;
+import spark.utils.FTETextUtil;
+
+use namespace mx_internal;
+*/
+
+import mx.core.UIComponent;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  @copy spark.components.supportClasses.GroupBase#style:chromeColor
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="chromeColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]
+
+/**
+ *  Name of the skin class to use for this component when a validation error occurs. 
+ *  
+ *  @default spark.skins.spark.ErrorSkin
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="errorSkin", type="Class")]
+
+/**
+ *  Name of the skin class to use for this component. The skin must be a class 
+ *  that extends UIComponent. 
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+//[Style(name="skinClass", type="Class")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="themeColor", kind="style")]
+[Exclude(name="addChild", kind="method")]
+[Exclude(name="addChildAt", kind="method")]
+[Exclude(name="removeChild", kind="method")]
+[Exclude(name="removeChildAt", kind="method")]
+[Exclude(name="setChildIndex", kind="method")]
+[Exclude(name="swapChildren", kind="method")]
+[Exclude(name="swapChildrenAt", kind="method")]
+[Exclude(name="numChildren", kind="property")]
+[Exclude(name="getChildAt", kind="method")]
+[Exclude(name="getChildIndex", kind="method")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+//[ResourceBundle("components")]
+
+/**
+ *  The SkinnableComponent class defines the base class for skinnable components. 
+ *  The skins used by a SkinnableComponent class are typically child classes of 
+ *  the Skin class.
+ *
+ *  <p>Associate a skin class with a component class by setting the <code>skinClass</code> style property of the 
+ *  component class. You can set the <code>skinClass</code> property in CSS, as the following example shows:</p>
+ *
+ *  <pre>MyComponent
+ *  {
+ *    skinClass: ClassReference("my.skins.MyComponentSkin")
+ *  }</pre>
+ *
+ *  <p>The following example sets the <code>skinClass</code> property in MXML:</p>
+ *
+ *  <pre>
+ *  &lt;MyComponent skinClass="my.skins.MyComponentSkin"/&gt;</pre>
+ *
+ *
+ *  @see spark.components.supportClasses.Skin
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class SkinnableComponent extends UIComponent
+{
+//    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Constructor.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function SkinnableComponent()
+    {
+    }
+    
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Specifies whether the UIComponent object receives <code>doubleClick</code> events.
+     *  The default value is <code>false</code>, which means that the UIComponent object
+     *  does not receive <code>doubleClick</code> events.
+     *
+     *  <p>The <code>mouseEnabled</code> property must also be set to <code>true</code>,
+     *  its default value, for the object to receive <code>doubleClick</code> events.</p>
+     *
+     *  @default false
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get skinClass():Class
+    {
+        // TODO
+        if (GOOG::DEBUG)
+            trace("skinClass not implemented");
+        return null;
+    }
+        
+    /**
+     *  @private
+     */
+    public function set skinClass(value:Class):void
+    {
+        // TODO
+        if (GOOG::DEBUG)
+            trace("skinClass not implemented");
+    }
+        
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
+
+    /**
+     *  @private
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        super.enabled = value;
+        invalidateSkinState();
+    }
+  
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+    }
+
+ 
+    /**
+     *  Marks the component so that the new state of the skin is set
+     *  during a later screen update.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function invalidateSkinState():void
+    {
+        if (GOOG::DEBUG)
+            trace("invalidateSkinState not implemented");
+    }
+
+}
+
+}

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.