You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/06/16 22:59:18 UTC

[01/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - update launch scripts to use js-config.xml

Repository: flex-asjs
Updated Branches:
  refs/heads/spark db3d64f82 -> 77148f4ae


update launch scripts to use js-config.xml


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

Branch: refs/heads/spark
Commit: c914e2b81f9ea7e3cbc39e434e4d85a72fc124e4
Parents: 4c55ca3
Author: Alex Harui <ah...@apache.org>
Authored: Wed Jun 8 07:51:53 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Jun 8 07:51:53 2016 -0700

----------------------------------------------------------------------
 js/bin/asjsc         | 2 +-
 js/bin/asjsc.bat     | 2 +-
 js/bin/asjscompc     | 2 +-
 js/bin/asjscompc.bat | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c914e2b8/js/bin/asjsc
----------------------------------------------------------------------
diff --git a/js/bin/asjsc b/js/bin/asjsc
index 618369d..2467cb3 100755
--- a/js/bin/asjsc
+++ b/js/bin/asjsc
@@ -67,4 +67,4 @@ fi
 
 VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
 
-java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=jsc -external-library-path="$SCRIPT_HOME/../libs/js.swc" "$@"
+java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=jsc +configname=js "$@"

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c914e2b8/js/bin/asjsc.bat
----------------------------------------------------------------------
diff --git a/js/bin/asjsc.bat b/js/bin/asjsc.bat
index 0df6851..172c1c0 100644
--- a/js/bin/asjsc.bat
+++ b/js/bin/asjsc.bat
@@ -26,4 +26,4 @@ if "x%FALCON_HOME%"=="x"  (set "FALCON_HOME=%~dp0..\..") else echo Using Falcon
 
 if "x%FLEX_HOME%"=="x" (set "FLEX_HOME=%~dp0..\..") else echo Using Flex SDK: %FLEX_HOME%
 
-@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\mxmlc.jar" -js-output-type=jsc -external-library-path="%FLEX_HOME%\js\libs\js.swc" %*
\ No newline at end of file
+@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\mxmlc.jar" -js-output-type=jsc +configname=js %*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c914e2b8/js/bin/asjscompc
----------------------------------------------------------------------
diff --git a/js/bin/asjscompc b/js/bin/asjscompc
index 35b8e7a..0d1dff6 100755
--- a/js/bin/asjscompc
+++ b/js/bin/asjscompc
@@ -67,4 +67,4 @@ fi
 
 VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
 
-java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/compc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=jsc -external-library-path="$SCRIPT_HOME/../libs/js.swc" "$@"
+java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/compc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=jsc +configname=js "$@"

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c914e2b8/js/bin/asjscompc.bat
----------------------------------------------------------------------
diff --git a/js/bin/asjscompc.bat b/js/bin/asjscompc.bat
index a9ea897..3cca0bf 100644
--- a/js/bin/asjscompc.bat
+++ b/js/bin/asjscompc.bat
@@ -26,4 +26,4 @@ if "x%FALCON_HOME%"=="x"  (set "FALCON_HOME=%~dp0..\..") else echo Using Falcon
 
 if "x%FLEX_HOME%"=="x" (set "FLEX_HOME=%~dp0..\..") else echo Using Flex SDK: %FLEX_HOME%
 
-@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\compc.jar" -js-output-type=jsc -external-library-path="%FLEX_HOME%\js\libs\js.swc" %*
\ No newline at end of file
+@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\compc.jar" -js-output-type=jsc +configname=js %*
\ No newline at end of file


[17/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - swap COMPILE::AS3 for COMPILE::SWF

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
index 0cd6a7c..ff25bd0 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObject;
         import flash.display.Sprite;
@@ -152,7 +152,7 @@ package org.apache.flex.core
 		{
 			super();
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 MouseEventConverter.setupInstanceConverters(this);
             }
@@ -253,7 +253,7 @@ package org.apache.flex.core
          */
 		public function set percentWidth(value:Number):void
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				if (_percentWidth == value)
 					return;
 				
@@ -296,7 +296,7 @@ package org.apache.flex.core
          */
 		public function set percentHeight(value:Number):void
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				if (_percentHeight == value)
 					return;
 				
@@ -331,7 +331,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         override public function get width():Number
 		{
 			var w:Number = _width;
@@ -366,7 +366,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		override public function set width(value:Number):void
 		{
 			if (explicitWidth != value)
@@ -400,7 +400,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function get $width():Number
 		{
 			return super.width;
@@ -421,7 +421,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		override public function get height():Number
 		{
 			var h:Number = _height;
@@ -456,7 +456,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		override public function set height(value:Number):void
 		{
 			if (explicitHeight != value)
@@ -490,7 +490,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function get $height():Number
 		{
 			return super.height;
@@ -617,7 +617,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-        COMPILE::AS3
+        COMPILE::SWF
         override public function set x(value:Number):void
         {
             super.x = _x = value;
@@ -657,7 +657,7 @@ package org.apache.flex.core
          */
         public function setX(value:Number):void
         {
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				super.x = value;					
 			}
@@ -673,7 +673,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-        COMPILE::AS3
+        COMPILE::SWF
         override public function set y(value:Number):void
         {
             super.y = _y = value;
@@ -713,7 +713,7 @@ package org.apache.flex.core
          */
         public function setY(value:Number):void
         {
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				super.y = value;					
 			}
@@ -728,7 +728,7 @@ package org.apache.flex.core
 		 * @private
 		 */
         [Bindable("visibleChanged")]
-        COMPILE::AS3
+        COMPILE::SWF
 		override public function set visible(value:Boolean):void
 		{
 			super.visible = value;
@@ -795,7 +795,7 @@ package org.apache.flex.core
             return element.childNodes as Array;
         }
         
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _model:IBeadModel;
 
         /**
@@ -806,7 +806,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public function get model():Object
 		{
             if (_model == null)
@@ -820,7 +820,7 @@ package org.apache.flex.core
         /**
          *  @private
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function set model(value:Object):void
 		{
 			if (_model != value)
@@ -989,7 +989,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public function get element():IFlexJSElement
         {
             return this;
@@ -1005,7 +1005,7 @@ package org.apache.flex.core
          */
 		public var beads:Array;
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _beads:Vector.<IBead>;
         
         /**
@@ -1040,7 +1040,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function getBeadByType(classOrInterface:Class):IBead
 		{
 			for each (var bead:IBead in _beads)
@@ -1059,7 +1059,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function removeBead(value:IBead):IBead	
 		{
 			var n:int = _beads.length;
@@ -1085,7 +1085,7 @@ package org.apache.flex.core
          */
 		public function addElement(c:Object, dispatchEvent:Boolean = true):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (c is IUIBase)
                 {
@@ -1112,7 +1112,7 @@ package org.apache.flex.core
          */
         public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (c is IUIBase)
                 {
@@ -1146,7 +1146,7 @@ package org.apache.flex.core
          */
         public function getElementAt(index:int):Object
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return getChildAt(index);
             }
@@ -1167,7 +1167,7 @@ package org.apache.flex.core
          */
         public function getElementIndex(c:Object):int
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (c is IUIBase)
                     return getChildIndex(IUIBase(c).element as DisplayObject);
@@ -1197,7 +1197,7 @@ package org.apache.flex.core
          */
         public function removeElement(c:Object, dispatchEvent:Boolean = true):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (c is IUIBase)
                     removeChild(IUIBase(c).element as DisplayObject);
@@ -1220,7 +1220,7 @@ package org.apache.flex.core
          */
         public function get numElements():int
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return numChildren;
             }
@@ -1350,7 +1350,7 @@ package org.apache.flex.core
 			return measurementBead;
 		}
         
-        COMPILE::AS3
+        COMPILE::SWF
         private var _stageProxy:StageProxy;
         
         /**
@@ -1365,7 +1365,7 @@ package org.apache.flex.core
          */
 		public function get topMostEventDispatcher():IEventDispatcher
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (!_stageProxy)
                 {
@@ -1382,7 +1382,7 @@ package org.apache.flex.core
             }
         }
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function stageProxy_removedFromStageHandler(event:Event):void
         {
             _stageProxy = null;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
index 427c42b..d158665 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
@@ -57,7 +57,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class UIButtonBase extends SimpleButton implements IStrandWithModel, IEventDispatcher, IUIBase, IStyleableObject, ILayoutChild, IFlexJSElement
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
index e79762a..ad510fc 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
@@ -20,7 +20,7 @@ package org.apache.flex.events
 {
 
 	[ExcludeClass]
-	COMPILE::AS3
+	COMPILE::SWF
 	public class ElementEvents
 	{
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
index 8076c66..9ca3743 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.events
 {
-    COMPILE::AS3 {
+    COMPILE::SWF {
         import flash.events.Event;
     }
         
@@ -39,7 +39,7 @@ package org.apache.flex.events
 	 * @playerversion AIR 2.6
 	 * @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class Event extends flash.events.Event
 	{
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
index f6e635b..9847e30 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
@@ -24,7 +24,7 @@ package org.apache.flex.events
 		import goog.events.EventTarget;
 	}
 
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import flash.events.EventDispatcher;
 	}
@@ -38,7 +38,7 @@ package org.apache.flex.events
 	 * @playerversion AIR 2.6
 	 * @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class EventDispatcher extends flash.events.EventDispatcher implements IEventDispatcher
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as
index 6d8c684..944d1ab 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.events
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import flash.events.IEventDispatcher;
 	}
@@ -32,7 +32,7 @@ package org.apache.flex.events
 	 * @playerversion AIR 2.6
 	 * @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public interface IEventDispatcher extends flash.events.IEventDispatcher
 	{
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
index 605885d..d392114 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.events
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.events.MouseEvent;
 		import flash.display.InteractiveObject;
@@ -41,7 +41,7 @@ package org.apache.flex.events
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class MouseEvent extends flash.events.MouseEvent
 	{
         private static function platformConstant(s:String):String

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/IHandlesOriginalEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/IHandlesOriginalEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/IHandlesOriginalEvent.as
index f9f035d..49bad8f 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/IHandlesOriginalEvent.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/IHandlesOriginalEvent.as
@@ -27,7 +27,7 @@ package org.apache.flex.events.utils
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public interface IHandlesOriginalEvent
 	{
 		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
index 1c015fd..48ff1fa 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
@@ -33,7 +33,7 @@ package org.apache.flex.events.utils
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
 	 */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class MouseEventConverter
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as
index 46d4464..433f7cb 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.geom
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.geom.Point;
 }
@@ -35,7 +35,7 @@ COMPILE::AS3
  *  @playerversion AIR 2.6
  *  @productversion FlexJS 0.0
  */
-COMPILE::AS3
+COMPILE::SWF
 public class Point extends flash.geom.Point
 {
     public function Point(x:Number = 0, y:Number = 0)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
index a68c080..c16540b 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.geom
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.geom.Rectangle;
 }
@@ -35,7 +35,7 @@ COMPILE::AS3
  *  @playerversion AIR 2.6
  *  @productversion FlexJS 0.0
  */
-COMPILE::AS3
+COMPILE::SWF
 public class Rectangle extends flash.geom.Rectangle
 {
     public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as
index 4c02934..83f509a 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as
@@ -38,4 +38,4 @@ public class Size
     public var width:Number;
     public var height:Number;
 }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
index 2d6f6ed..0adcf3c 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.utils.ByteArray;
 }
@@ -49,7 +49,7 @@ public class BinaryData
 		
 	}
 	
-    COMPILE::AS3
+    COMPILE::SWF
 	private var ba:ByteArray = new ByteArray();
 	
     COMPILE::JS
@@ -82,7 +82,7 @@ public class BinaryData
      */
 	public function writeByte(byte:int):void
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             ba.writeByte(byte);                
         }
@@ -108,7 +108,7 @@ public class BinaryData
      */
 	public function writeShort(short:int):void
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             ba.writeShort(short);                
         }
@@ -134,7 +134,7 @@ public class BinaryData
      */
 	public function writeUnsignedInt(unsigned:uint):void
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             ba.writeUnsignedInt(unsigned);                
         }
@@ -160,7 +160,7 @@ public class BinaryData
      */
 	public function writeInt(integer:uint):void
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             ba.writeInt(integer);                
         }
@@ -186,7 +186,7 @@ public class BinaryData
      */
 	public function readByte():int
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return ba.readByte();                
         }
@@ -210,7 +210,7 @@ public class BinaryData
      */
 	public function readShort():int
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return ba.readShort();                
         }
@@ -234,7 +234,7 @@ public class BinaryData
      */
 	public function readUnsignedInt():uint
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return ba.readUnsignedInt();                
         }
@@ -258,7 +258,7 @@ public class BinaryData
      */
     public function readInt():int
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return ba.readInt();                
         }
@@ -282,7 +282,7 @@ public class BinaryData
      */
 	public function get length():int
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return ba.length;                
         }
@@ -302,7 +302,7 @@ public class BinaryData
      */
 	public function get bytesAvailable():int
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return ba.bytesAvailable;                
         }
@@ -322,7 +322,7 @@ public class BinaryData
      */
 	public function get position():int
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return ba.position;                
         }
@@ -337,7 +337,7 @@ public class BinaryData
      */
 	public function set position(value:int):void
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             ba.position = value;
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as
index 61fecc7..ef32e1a 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as
@@ -36,7 +36,7 @@ package org.apache.flex.utils
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class CSSBorderUtils
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as
index 868faec..05c605e 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as
@@ -191,4 +191,4 @@ public class CSSContainerUtils
                             borderMetrics.height + paddingMetrics.height);
     }
 }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as
index 3e557d6..505ae48 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.events.EventDispatcher;
     import flash.events.TimerEvent;
@@ -75,7 +75,7 @@ public class EffectTimer extends EventDispatcher implements IEffectTimer
     public function EffectTimer()
     {
 		interval = ValuesManager.valuesImpl.getValue(this, "effectTimerInterval");
-        COMPILE::AS3
+        COMPILE::SWF
         {
     		timer = new flash.utils.Timer(interval);
     		timer.addEventListener("timer", timerHandler);
@@ -84,7 +84,7 @@ public class EffectTimer extends EventDispatcher implements IEffectTimer
 
     private var interval:int;
     
-    COMPILE::AS3
+    COMPILE::SWF
 	private var timer:flash.utils.Timer;
     
     COMPILE::JS
@@ -92,7 +92,7 @@ public class EffectTimer extends EventDispatcher implements IEffectTimer
 	
 	public function start():int
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
     		timer.start();
     		return getTimer();
@@ -108,7 +108,7 @@ public class EffectTimer extends EventDispatcher implements IEffectTimer
 	
 	public function stop():void
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
     		timer.stop();
         }
@@ -119,7 +119,7 @@ public class EffectTimer extends EventDispatcher implements IEffectTimer
         }
 	}
 	
-    COMPILE::AS3
+    COMPILE::SWF
 	private function timerHandler(event:flash.events.TimerEvent):void
 	{
 		event.updateAfterEvent();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/HTMLLoader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/HTMLLoader.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/HTMLLoader.as
index ac8a7c1..7364680 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/HTMLLoader.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/HTMLLoader.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.html.HTMLLoader;
 	import org.apache.flex.events.utils.IHandlesOriginalEvent;
@@ -33,7 +33,7 @@ COMPILE::AS3
  *  @playerversion AIR 2.6
  *  @productversion FlexJS 0.0
  */
-COMPILE::AS3
+COMPILE::SWF
 public class HTMLLoader extends flash.html.HTMLLoader implements IHandlesOriginalEvent
 {
     

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as
index bb97ecd..611bb0f 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as
@@ -20,7 +20,7 @@ package org.apache.flex.utils
 {
 
 	[ExcludeClass]
-	COMPILE::AS3
+	COMPILE::SWF
 	public class Language {}
 
     COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
index c69b550..f280a04 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
@@ -19,7 +19,7 @@
 package org.apache.flex.utils
 {
 
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.display.DisplayObject;
 }
@@ -254,7 +254,7 @@ public class MXMLDataInterpreter
             comp.setStyle(name, value);
         }            
         
-        COMPILE::AS3
+        COMPILE::SWF
         {
             // flexjs on the JS side won't have effects in here, they are regular properties
             // but falcon provides this set for SWFs for future compatibility with
@@ -278,7 +278,7 @@ public class MXMLDataInterpreter
         {
             name = data[i++];
             value = data[i++];
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 comp.addEventListener(name, value);
             }
@@ -293,7 +293,7 @@ public class MXMLDataInterpreter
         {
             comp.setMXMLDescriptor(document, children);                
         }
-        COMPILE::AS3
+        COMPILE::SWF
         {
             if (parent && comp is DisplayObject)
                 parent.addElement(comp, !(parent is IContainer));
@@ -423,7 +423,7 @@ public class MXMLDataInterpreter
             host[name] = value;
         }
         
-        COMPILE::AS3 
+        COMPILE::SWF 
         {
             // flexjs on the JS side won't have effects in here, they are regular properties
             // but falcon provides this set for SWFs for future compatibility with
@@ -447,7 +447,7 @@ public class MXMLDataInterpreter
         {
             name = data[i++];
             value = data[i++];
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 host.addEventListener(name, value as Function);
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as
index ab5dfed..ec61a5c 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as
@@ -19,7 +19,7 @@
 package org.apache.flex.utils
 {
 
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.system.ApplicationDomain;            
 }
@@ -70,7 +70,7 @@ public class MixinManager implements IBead
     {
         _strand = value;
         
-        COMPILE::AS3
+        COMPILE::SWF
         {
             var app:IFlexInfo = value as IFlexInfo;
             if (app)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as
index d34ce13..891708c 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as
@@ -34,7 +34,7 @@ import flash.utils.ByteArray;
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-COMPILE::AS3
+COMPILE::SWF
 public class PNGEncoder
 {
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
index 09c88b4..be960a9 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObject;
         import flash.geom.Point;
@@ -60,7 +60,7 @@ package org.apache.flex.utils
 		 */
 		public static function globalToLocal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var fpt:flash.geom.Point = DisplayObject(local).globalToLocal(pt);
                 return new org.apache.flex.geom.Point(fpt.x, fpt.y);
@@ -101,7 +101,7 @@ package org.apache.flex.utils
          */
         public static function localToGlobal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var fpt:flash.geom.Point = DisplayObject(local).localToGlobal(pt);
                 return new org.apache.flex.geom.Point(fpt.x, fpt.y);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
index 39b6945..d1cec4a 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.utils.Proxy;
 	import flash.utils.flash_proxy;
@@ -42,7 +42,7 @@ COMPILE::JS
  *  @playerversion AIR 2.6
  *  @productversion FlexJS 0.0
  */
-COMPILE::AS3
+COMPILE::SWF
 public dynamic class Proxy extends flash.utils.Proxy
 {
 	private var valueMap:Object = {};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as
index bb74b2a..7d8aa5f 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as
@@ -32,7 +32,7 @@ import flash.display.Graphics;
  *  @playerversion AIR 2.6
  *  @productversion FlexJS 0.0
  */
-COMPILE::AS3
+COMPILE::SWF
 public class SolidBorderUtil
 {
     /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
index fe170df..fe8f581 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
@@ -28,7 +28,7 @@ package org.apache.flex.utils
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class StringTrimmer
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
index 582d884..1e1dafa 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.events.TimerEvent;
     import flash.utils.Timer;
@@ -55,7 +55,7 @@ COMPILE::JS
  *  @playerversion AIR 2.6
  *  @productversion FlexJS 0.0
  */
-COMPILE::AS3
+COMPILE::SWF
 public class Timer extends flash.utils.Timer
 {
     /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as
index 5a2469a..8b41a7f 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as
@@ -19,7 +19,7 @@
 package org.apache.flex.utils
 {
 
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.display.InteractiveObject;
     import flash.events.ContextMenuEvent;
@@ -71,7 +71,7 @@ public class ViewSourceContextMenuOption implements IBead
 	{
 		_strand = value;
 		
-        COMPILE::AS3
+        COMPILE::SWF
         {
     		var menuHost:InteractiveObject = InteractiveObject(value);
     		var cm:ContextMenu = ContextMenu(menuHost.contextMenu);
@@ -87,7 +87,7 @@ public class ViewSourceContextMenuOption implements IBead
         }
 	}
 	
-    COMPILE::AS3
+    COMPILE::SWF
 	private function viewSource(e:ContextMenuEvent):void
 	{
 		var urlRequest:URLRequest = new URLRequest("srcview/index.html");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as
index 3b3da0e..b58881e 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as
@@ -35,7 +35,7 @@ package org.apache.flex.utils.dbg
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class DOMPathUtil
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/test/flex/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/build.xml b/frameworks/projects/Core/src/test/flex/build.xml
index 4835fee..a65c2e5 100644
--- a/frameworks/projects/Core/src/test/flex/build.xml
+++ b/frameworks/projects/Core/src/test/flex/build.xml
@@ -118,7 +118,7 @@
             <jvmarg line="${mxmlc.jvm.args}"/>
             <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
             <arg value="-debug" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as
index df62e31..06d673b 100644
--- a/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as
+++ b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as
@@ -24,4 +24,4 @@ package flexUnitTests
     {
         public var strandTesterTest:StrandTesterTest;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as
index 97a84a3..1c4d7a9 100644
--- a/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as
+++ b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as
@@ -52,4 +52,4 @@ package flexUnitTests
             Assert.assertEquals("Error testing Srand.id", strand.id, "foo");
         }        
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/.actionScriptProperties b/frameworks/projects/CreateJS/.actionScriptProperties
index 25f34a9..458f764 100644
--- a/frameworks/projects/CreateJS/.actionScriptProperties
+++ b/frameworks/projects/CreateJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="CreateJS.as" projectUUID="7d9af24d-d32d-4e14-b0ee-f799e604c2bc" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/build.xml b/frameworks/projects/CreateJS/build.xml
index 1a36a0d..bf7c1cd 100644
--- a/frameworks/projects/CreateJS/build.xml
+++ b/frameworks/projects/CreateJS/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
index 9eccec2..db85a4a 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
@@ -108,7 +108,7 @@ package org.apache.flex.createjs
 	 *  @productversion FlexJS 0.0
 	 */
 	
-	COMPILE::AS3
+	COMPILE::SWF
 	public class Application extends org.apache.flex.core.Application
 	{
 		// does nothing different for SWF side

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as
index f0dfbe8..9f83bb1 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.createjs
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.html.CheckBox;            
     }
@@ -39,7 +39,7 @@ package org.apache.flex.createjs
 	import org.apache.flex.core.graphics.IFill;
 	import org.apache.flex.core.graphics.SolidColor;
 	
-    COMPILE::AS3
+    COMPILE::SWF
 	public class CheckBox extends org.apache.flex.html.CheckBox
 	{			
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Container.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Container.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Container.as
index 697c41e..f73266d 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Container.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Container.as
@@ -32,7 +32,7 @@ package org.apache.flex.createjs
 	import org.apache.flex.states.State;
 	import org.apache.flex.utils.MXMLDataInterpreter;
 	
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.Container;
 	}
@@ -59,7 +59,7 @@ package org.apache.flex.createjs
 	 *  @playerversion AIR 1.1
 	 *  @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class Container extends org.apache.flex.html.Container
 	{
 		// does nothing different for SWF version.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as
index 490b3b9..fefac73 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.createjs
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.html.Label;            
     }
@@ -45,7 +45,7 @@ package org.apache.flex.createjs
 	 *  @productversion FlexJS 0.0
 	 */
     
-    COMPILE::AS3
+    COMPILE::SWF
 	public class Label extends org.apache.flex.html.Label
 	{		
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as
index 6d8415c..068ad10 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.createjs
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.html.Button;            
     }
@@ -46,7 +46,7 @@ package org.apache.flex.createjs
 	 *  @productversion FlexJS 0.0
 	 */
 
-	COMPILE::AS3
+	COMPILE::SWF
 	public class TextButton extends Button
 	{
 		public function TextButton()

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/CreateJSBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/CreateJSBase.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/CreateJSBase.as
index 3f13292..1b74e82 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/CreateJSBase.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/CreateJSBase.as
@@ -33,7 +33,7 @@ package org.apache.flex.createjs.core
 		import org.apache.flex.core.graphics.SolidColor;
     }
 	
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.core.UIBase;
 	}
@@ -49,7 +49,7 @@ package org.apache.flex.createjs.core
 	 *  @productversion FlexJS 0.0
 	 */
 	
-	COMPILE::AS3
+	COMPILE::SWF
 	public class CreateJSBase extends org.apache.flex.core.UIBase
 	{
 		// does nothing for SWF version.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
index 568d954..da5fc63 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
@@ -54,7 +54,7 @@ package org.apache.flex.createjs.core
 	 *  @productversion FlexJS 0.0
 	 */
 	
-	COMPILE::AS3
+	COMPILE::SWF
 	public class UIBase extends org.apache.flex.core.UIBase
 	{
 		// nothing different for the SWF version

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/View.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/View.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/View.as
index 81cf83d..e954fd7 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/View.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/View.as
@@ -66,7 +66,7 @@ package org.apache.flex.createjs.core
 	 *  @productversion FlexJS 0.0
 	 */
 		
-	COMPILE::AS3
+	COMPILE::SWF
 	public class View extends org.apache.flex.core.ViewBase
 	{
 		// nothing different for the SWF version

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Circle.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Circle.as
index f470fbe..e6a31c4 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Circle.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Circle.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.createjs.graphics
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.core.graphics.Circle
 	}
@@ -45,7 +45,7 @@ package org.apache.flex.createjs.graphics
 	 *  @productversion FlexJS 0.0
 	 */
 
-    COMPILE::AS3
+    COMPILE::SWF
 	public class Circle extends org.apache.flex.core.graphics.Circle
 	{
 		// nothing special for SWF version.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/GraphicShape.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/GraphicShape.as
index 8d06985..abe02d3 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/GraphicShape.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/GraphicShape.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.createjs.graphics
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.core.graphics.GraphicShape
 	}
@@ -45,7 +45,7 @@ package org.apache.flex.createjs.graphics
 	 *  @productversion FlexJS 0.0
 	 */
     
-    COMPILE::AS3
+    COMPILE::SWF
 	public class GraphicShape extends org.apache.flex.core.graphics.GraphicShape
 	{
 		// nothing special for SWF version.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Rect.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Rect.as
index eaf0a56..2e735bb 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Rect.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/graphics/Rect.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.createjs.graphics
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.core.graphics.Rect
 	}
@@ -46,7 +46,7 @@ package org.apache.flex.createjs.graphics
 	 *  @productversion FlexJS 0.0
 	 */
     
-    COMPILE::AS3
+    COMPILE::SWF
 	public class Rect extends org.apache.flex.core.graphics.Rect
 	{
 		// nothing special for SWF version.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Ease.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Ease.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Ease.as
index 20d9763..6566d7a 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Ease.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Ease.as
@@ -55,7 +55,7 @@ package org.apache.flex.createjs.tween
 		 */
 		static public function get(value:Number) : Function
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				return null;
 			}
 				COMPILE::JS {
@@ -73,7 +73,7 @@ package org.apache.flex.createjs.tween
 		 */
 		static public function getPowIn(value:Number) : Function
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				return null;
 			}
 			COMPILE::JS {
@@ -91,7 +91,7 @@ package org.apache.flex.createjs.tween
 		 */
 		static public function getPowOut(value:Number) : Function
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				return null;
 			}
 				COMPILE::JS {
@@ -109,7 +109,7 @@ package org.apache.flex.createjs.tween
 		 */
 		static public function getPowInOut(value:Number) : Function
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				return null;
 			}
 			COMPILE::JS {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Tween.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Tween.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Tween.as
index 40319ae..c69cfae 100644
--- a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Tween.as
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/tween/Tween.as
@@ -138,7 +138,7 @@ package org.apache.flex.createjs.tween
 		 */
 		override public function createTweenOptions():Object
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				return null;
 			}
 			COMPILE::JS {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/DragDrop/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/.actionScriptProperties b/frameworks/projects/DragDrop/.actionScriptProperties
index 99d5753..63c5ba8 100644
--- a/frameworks/projects/DragDrop/.actionScriptProperties
+++ b/frameworks/projects/DragDrop/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="DragDrop.as" projectUUID="8736dc4b-71dc-4f2c-9181-5295a09b7c7e" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/DragDrop/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/build.xml b/frameworks/projects/DragDrop/build.xml
index 0cb8755..ff8a41c 100644
--- a/frameworks/projects/DragDrop/build.xml
+++ b/frameworks/projects/DragDrop/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as
index 9df59cf..4de2eb9 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as
@@ -61,4 +61,4 @@ package org.apache.flex.core
         public static const CANCEL:String = "cancel";
         
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
index 7d9fefb..12f42e3 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
@@ -273,7 +273,7 @@ package org.apache.flex.events
          */
 		public function DragEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 super(type, bubbles, cancelable);                    
             }
@@ -300,7 +300,7 @@ package org.apache.flex.events
          */
         public static function createDragEvent(type:String, event:MouseEvent):DragEvent
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var de:DragEvent = new DragEvent(type, true, true);
                 de.localX = event.localX;
@@ -341,7 +341,7 @@ package org.apache.flex.events
          */
         public static function dispatchDragEvent(event:DragEvent, target:IEventDispatcher):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 target.dispatchEvent(event);                    
             }
@@ -370,4 +370,4 @@ package org.apache.flex.events
         private static var dragEventMixin:Boolean = installDragEventMixin();
 
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as
index aaa8ddf..f70b7c6 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.events
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.events.MouseEvent;
     }
@@ -35,7 +35,7 @@ package org.apache.flex.events
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
 	 */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class DragEventBase extends MouseEvent
 	{
         public function DragEventBase(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
@@ -48,4 +48,4 @@ package org.apache.flex.events
     public class DragEventBase extends goog.events.BrowserEvent
     {
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Effects/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/.actionScriptProperties b/frameworks/projects/Effects/.actionScriptProperties
index 04a88d5..4e8a684 100644
--- a/frameworks/projects/Effects/.actionScriptProperties
+++ b/frameworks/projects/Effects/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Effects.as" projectUUID="c7b22e99-ecef-48e3-90be-f80d3bc54d5f" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Effects/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/build.xml b/frameworks/projects/Effects/build.xml
index c3b97fe..f4496a4 100644
--- a/frameworks/projects/Effects/build.xml
+++ b/frameworks/projects/Effects/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
index 9549bc8..76a879f 100644
--- a/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
@@ -343,4 +343,4 @@ package org.apache.flex.core
             }            
         }
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as
index 1e3b412..5f330ff 100644
--- a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as
@@ -20,7 +20,7 @@
 package org.apache.flex.effects
 {
 
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.display.DisplayObject;
     import flash.geom.Rectangle;            
@@ -91,7 +91,7 @@ public class PlatformWiper
      */
     public function set target(value:IUIBase):void
     {
-        COMPILE::AS3
+        COMPILE::SWF
         {
             if (value == null)
                 DisplayObject(_target).scrollRect = null;
@@ -123,7 +123,7 @@ public class PlatformWiper
      */
     public function set visibleRect(value:Rectangle):void
     {
-        COMPILE::AS3
+        COMPILE::SWF
         {
             DisplayObject(_target).scrollRect = value;                
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Flat/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/.actionScriptProperties b/frameworks/projects/Flat/.actionScriptProperties
index 2d5ef3f..496505a 100644
--- a/frameworks/projects/Flat/.actionScriptProperties
+++ b/frameworks/projects/Flat/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Flat.as" projectUUID="ea1b31ea-3d47-4d1e-8e28-ad149f2397e1" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Flat/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/build.xml b/frameworks/projects/Flat/build.xml
index e323e5c..e4fc097 100644
--- a/frameworks/projects/Flat/build.xml
+++ b/frameworks/projects/Flat/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Flat/src/main/flex/FlatClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/FlatClasses.as b/frameworks/projects/Flat/src/main/flex/FlatClasses.as
index 29173ef..0e534ce 100644
--- a/frameworks/projects/Flat/src/main/flex/FlatClasses.as
+++ b/frameworks/projects/Flat/src/main/flex/FlatClasses.as
@@ -27,7 +27,7 @@ package
  */
 internal class FlatClasses
 {	
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.flat.beads.CSSScrollBarView; CSSScrollBarView;
 		import org.apache.flex.flat.beads.CSSScrollBarButtonView; CSSScrollBarButtonView;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as
index 466e9b2..2d09772 100644
--- a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.flat
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.html.CheckBox;            
     }
@@ -38,7 +38,7 @@ package org.apache.flex.flat
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class CheckBox extends org.apache.flex.html.CheckBox
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as
index 265f2c7..1e4b3c7 100644
--- a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as
@@ -20,7 +20,7 @@ package org.apache.flex.flat
 {
     import org.apache.flex.core.UIBase;
 
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.html.DropDownList;            
     }
@@ -44,7 +44,7 @@ package org.apache.flex.flat
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class DropDownList extends org.apache.flex.html.DropDownList
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as
index 1294a25..9fe9d1b 100644
--- a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.flat
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.html.RadioButton;            
     }
@@ -37,7 +37,7 @@ package org.apache.flex.flat
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class RadioButton extends org.apache.flex.html.RadioButton
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Formatters/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/.actionScriptProperties b/frameworks/projects/Formatters/.actionScriptProperties
index 97e41af..1a581a6 100644
--- a/frameworks/projects/Formatters/.actionScriptProperties
+++ b/frameworks/projects/Formatters/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Formatters.as" projectUUID="187f4b92-5fcd-4cee-ac61-58362a56ba1b" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Formatters/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/build.xml b/frameworks/projects/Formatters/build.xml
index a14f28c..daf0972 100644
--- a/frameworks/projects/Formatters/build.xml
+++ b/frameworks/projects/Formatters/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as b/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as
index bbf43ce..d9013dc 100644
--- a/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as
+++ b/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as
@@ -30,7 +30,7 @@ internal class FormattersClasses
 	import org.apache.flex.core.FormatBase; FormatBase;
 	
 	import org.apache.flex.html.accessories.DateFormatMMDDYYYYBead; DateFormatMMDDYYYYBead;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
     	import org.apache.flex.html.beads.FormatableLabelView; FormatableLabelView;
 	    import org.apache.flex.html.beads.FormatableTextInputView; FormatableTextInputView;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as
index b1fa1af..4ccfc35 100644
--- a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as
+++ b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as
@@ -110,4 +110,4 @@ package org.apache.flex.core
 			_strand = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/GoogleMaps/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/.actionScriptProperties b/frameworks/projects/GoogleMaps/.actionScriptProperties
index 7d8a9f1..1cbf05a 100644
--- a/frameworks/projects/GoogleMaps/.actionScriptProperties
+++ b/frameworks/projects/GoogleMaps/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="GoogleMaps.as" projectUUID="7d907ea6-da29-4573-9741-08d2cf0f85d6" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/GoogleMaps/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/build.xml b/frameworks/projects/GoogleMaps/build.xml
index 0dcfb0c..50484bc 100644
--- a/frameworks/projects/GoogleMaps/build.xml
+++ b/frameworks/projects/GoogleMaps/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as b/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as
index 9f6da21..4fc2890 100644
--- a/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as
+++ b/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as
@@ -27,7 +27,7 @@ package
  */
 internal class GoogleStubClasses
 {
-	COMPILE::AS3 {
+	COMPILE::SWF {
 	import google.maps.Animation; Animation;
 	import google.maps.LatLng; LatLng;
 	import google.maps.Marker; Marker;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as
index 304c984..b414c2f 100644
--- a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as
+++ b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.maps.google.beads
 {
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		import flash.events.Event;
 		import flash.net.URLRequest;
 		import flash.filesystem.File;
@@ -408,7 +408,7 @@ package org.apache.flex.maps.google.beads
 	 * The AS3 version of GoogleMapView is geared toward its use with HTMLLoader
 	 * for AIR.
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class GoogleMapView extends BeadViewBase implements IBeadView
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as
index d21314e..ecf795b 100644
--- a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as
+++ b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as
@@ -26,7 +26,7 @@
  */
 package org.apache.flex.maps.google.beads
 {
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		import flash.events.Event;
 		import flash.html.HTMLLoader;
 		import flash.net.URLRequest;
@@ -84,7 +84,7 @@ package org.apache.flex.maps.google.beads
 		}
 	}
 
-	COMPILE::AS3
+	COMPILE::SWF
 	public class MapView_original extends BeadViewBase implements IBeadView
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/.actionScriptProperties b/frameworks/projects/Graphics/.actionScriptProperties
index d539c32..f3a3b57 100644
--- a/frameworks/projects/Graphics/.actionScriptProperties
+++ b/frameworks/projects/Graphics/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Graphics.as" projectUUID="ff3e0531-b7c9-4b0c-9146-05c27a47f837" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/build.xml b/frameworks/projects/Graphics/build.xml
index 1aa386f..df5f5f2 100644
--- a/frameworks/projects/Graphics/build.xml
+++ b/frameworks/projects/Graphics/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />


[40/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/UIComponentGlobals.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/UIComponentGlobals.as
index 5acc825,0000000..11730d0
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/UIComponentGlobals.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/UIComponentGlobals.as
@@@ -1,235 -1,0 +1,235 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.InteractiveObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.InteractiveObject;		
 +}
 +COMPILE::LATER
 +{
 +	import flash.geom.Matrix;		
 +}
 +import mx.managers.ILayoutManager;
 +import mx.managers.SystemManagerGlobals;
 +import mx.managers.ISystemManager;
 +
 +use namespace mx_internal;
 +
 +/**
 +*  @private
 +*/
 +public class UIComponentGlobals
 +{
 +    /**
 +     *  @private
 +     *  A reference to the sole instance of the LayoutManager
 +     *  used by all components.
 +     *
 +     *  <p>This property is set in the constructor of the Application class.
 +     *  If you need to override or replace LayoutManager,
 +     *  set UIComponent.layoutManager in your application's constructor
 +     *  after calling super().</p>
 +     */
 +    mx_internal static var layoutManager:ILayoutManager;
 +
 +    /**
 +     *  @private
 +     *  When this variable is non-zero, no methods queued
 +     *  by the <code>callLater()</code> method get invoked.
 +     *  This is used to allow short effects to play without interruption.
 +     *  This counter is incremented by suspendBackgroundProcessing(),
 +     *  decremented by resumeBackgroundProcessing(), and checked by
 +     *  callLaterDispatcher().
 +     */
 +    mx_internal static var callLaterSuspendCount:int = 0;
 +
 +    /**
 +     *  @private
 +     *  There is a bug (139390) where setting focus from within callLaterDispatcher
 +     *  screws up the ActiveX player.  We defer focus until enterframe.
 +     */
 +    mx_internal static var callLaterDispatcherCount:int = 0;
 +
 +    /**
 +     *  @private
 +     *  There is a bug (139390) where setting focus from within callLaterDispatcher
 +     *  screws up the ActiveX player.  We defer focus until enterframe.
 +     */
 +    mx_internal static var nextFocusObject:InteractiveObject;
 +
 +    /**
 +     *  @private
 +     *  This single Matrix is used to pass information from the
 +     *  horizontalGradientMatrix() or verticalGradientMatrix()
 +     *  utility methods to the drawRoundRect() method.
 +     *  Each call to horizontalGradientMatrix() or verticalGradientMatrix()
 +     *  simply calls createGradientBox() to stuff this Matrix with new values.
 +     *  We can keep restuffing the same Matrix object because these utility
 +     *  methods are only used inside a call to drawRoundRect()
 +     *  and the Matrix isn't needed after drawRoundRect() returns.
 +     */
 +	COMPILE::LATER
 +    mx_internal static var tempMatrix:Matrix = new Matrix();
 +
 +    /**
 +     *  @private
 +     *  A global flag that can be read by any component to determine
 +     *  whether it is currently executing in the context of a design
 +     *  tool such as Flash Builder's design view.  Most components will
 +     *  never need to check this flag, but if a component needs to
 +     *  have different behavior at design time than at runtime, then it
 +     *  can check this flag.
 +     */
 +    mx_internal static var designTime:Boolean = false;
 +
 +    /**
 +     *  A global flag that can be read by any component to determine
 +     *  whether it is currently executing in the context of a design
 +     *  tool such as Flash Builder's design view.  Most components will
 +     *  never need to check this flag, but if a component needs to
 +     *  have different behavior at design time than at runtime, then it
 +     *  can check this flag.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get designMode():Boolean
 +    {
 +        return designTime;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set designMode(value:Boolean):void
 +    {
 +        designTime = value;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private static var _catchCallLaterExceptions:Boolean = false;
 +
 +    /**
 +     *  A global flag that can is used to catch unhandled exceptions
 +     *  during execution of methods executed via callLater
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get catchCallLaterExceptions():Boolean
 +    {
 +        return _catchCallLaterExceptions;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set catchCallLaterExceptions(value:Boolean):void
 +    {
 +        _catchCallLaterExceptions = value;
 +    }
 +	
 +	/**
 +	 *  Blocks the background processing of methods
 +	 *  queued by <code>callLater()</code>,
 +	 *  until <code>resumeBackgroundProcessing()</code> is called.
 +	 *
 +	 *  <p>These methods can be useful when you have time-critical code
 +	 *  which needs to execute without interruption.
 +	 *  For example, when you set the <code>suspendBackgroundProcessing</code>
 +	 *  property of an Effect to <code>true</code>,
 +	 *  <code>suspendBackgroundProcessing()</code> is automatically called
 +	 *  when it starts playing, and <code>resumeBackgroundProcessing</code>
 +	 *  is called when it stops, in order to ensure that the animation
 +	 *  is smooth.</p>
 +	 *
 +	 *  <p>Since the LayoutManager uses <code>callLater()</code>,
 +	 *  this means that <code>commitProperties()</code>,
 +	 *  <code>measure()</code>, and <code>updateDisplayList()</code>
 +	 *  is not called in between calls to
 +	 *  <code>suspendBackgroundProcessing()</code> and
 +	 *  <code>resumeBackgroundProcessing()</code>.</p>
 +	 *
 +	 *  <p>It is safe for both an outer method and an inner method
 +	 *  (i.e., one that the outer methods calls) to call
 +	 *  <code>suspendBackgroundProcessing()</code>
 +	 *  and <code>resumeBackgroundProcessing()</code>, because these
 +	 *  methods actually increment and decrement a counter
 +	 *  which determines whether background processing occurs.</p>
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public static function suspendBackgroundProcessing():void
 +	{
 +		UIComponentGlobals.callLaterSuspendCount++;
 +	}
 +	
 +	/**
 +	 *  Resumes the background processing of methods
 +	 *  queued by <code>callLater()</code>, after a call to
 +	 *  <code>suspendBackgroundProcessing()</code>.
 +	 *
 +	 *  <p>Refer to the description of
 +	 *  <code>suspendBackgroundProcessing()</code> for more information.</p>
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public static function resumeBackgroundProcessing():void
 +	{
 +		if (UIComponentGlobals.callLaterSuspendCount > 0)
 +		{
 +			UIComponentGlobals.callLaterSuspendCount--;
 +			
 +			// Once the suspend count gets back to 0, we need to
 +			// force a render event to happen
 +			if (UIComponentGlobals.callLaterSuspendCount == 0)
 +			{
 +				var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0];
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +					if (sm && sm.topOfDisplayList)
 +						sm.topOfDisplayList.invalidate();
 +				}
 +			}
 +		}
 +	}
 +
 +}
 +
 +}
 +


[18/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - swap COMPILE::AS3 for COMPILE::SWF

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedColumnChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedColumnChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedColumnChart.as
index ab9ae2d..a4c335d 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedColumnChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedColumnChart.as
@@ -45,4 +45,4 @@ package org.apache.flex.charts
 			super();
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
index 9383f14..5db25fe 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
@@ -243,4 +243,4 @@ package org.apache.flex.charts.beads
 			tickPathString = null;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
index 393f3b0..678c6b3 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
@@ -171,4 +171,4 @@ package org.apache.flex.charts.beads
 			} */
 		}		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
index f6c7562..0b32e4e 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
@@ -128,4 +128,4 @@ package org.apache.flex.charts.beads
 			IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataTipBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataTipBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataTipBead.as
index 559a7b9..c24af2e 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataTipBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/DataTipBead.as
@@ -159,4 +159,4 @@ package org.apache.flex.charts.beads
 			}
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalCategoryAxisBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalCategoryAxisBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalCategoryAxisBead.as
index 0adcb2c..9efbd72 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalCategoryAxisBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalCategoryAxisBead.as
@@ -188,4 +188,4 @@ package org.apache.flex.charts.beads
 			drawTickPath(0, 1);
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalLinearAxisBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalLinearAxisBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalLinearAxisBead.as
index a96fb2d..6e24b2c 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalLinearAxisBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/HorizontalLinearAxisBead.as
@@ -243,4 +243,4 @@ package org.apache.flex.charts.beads
 			drawTickPath(0, 1);
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalCategoryAxisBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalCategoryAxisBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalCategoryAxisBead.as
index d89819d..577bd5a 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalCategoryAxisBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalCategoryAxisBead.as
@@ -195,4 +195,4 @@ package org.apache.flex.charts.beads
 			drawTickPath(useWidth-6, 0);
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalLinearAxisBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalLinearAxisBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalLinearAxisBead.as
index 823da8d..4cd2e63 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalLinearAxisBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/VerticalLinearAxisBead.as
@@ -233,4 +233,4 @@ package org.apache.flex.charts.beads
 		}
 		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
index 076fb0a..8cfe12c 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
@@ -146,4 +146,4 @@ package org.apache.flex.charts.beads.layouts
 			IEventDispatcher(chart).dispatchEvent(new Event("layoutComplete"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
index 88dd0a4..461887b 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ChartBaseLayout.as
@@ -144,4 +144,4 @@ package org.apache.flex.charts.beads.layouts
 			// implement in subclass
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ColumnChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ColumnChartLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ColumnChartLayout.as
index 0d8c019..93cdb1c 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ColumnChartLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/ColumnChartLayout.as
@@ -137,4 +137,4 @@ package org.apache.flex.charts.beads.layouts
 			IEventDispatcher(chart).dispatchEvent(new Event("layoutComplete"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartCategoryVsLinearLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartCategoryVsLinearLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartCategoryVsLinearLayout.as
index b28ace9..d94d225 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartCategoryVsLinearLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartCategoryVsLinearLayout.as
@@ -149,4 +149,4 @@ package org.apache.flex.charts.beads.layouts
 			IEventDispatcher(chart).dispatchEvent(new Event("layoutComplete"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartLinearVsLinearLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartLinearVsLinearLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartLinearVsLinearLayout.as
index a001bfa..9a18295 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartLinearVsLinearLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/LineChartLinearVsLinearLayout.as
@@ -163,4 +163,4 @@ package org.apache.flex.charts.beads.layouts
 			IEventDispatcher(chart).dispatchEvent(new Event("layoutComplete"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/PieChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/PieChartLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/PieChartLayout.as
index 901da7f..7fb2188 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/PieChartLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/PieChartLayout.as
@@ -137,4 +137,4 @@ package org.apache.flex.charts.beads.layouts
 			IEventDispatcher(chart).dispatchEvent(new Event("layoutComplete"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedBarChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedBarChartLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedBarChartLayout.as
index c75f7bc..c170076 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedBarChartLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedBarChartLayout.as
@@ -161,4 +161,4 @@ package org.apache.flex.charts.beads.layouts
 			IEventDispatcher(chart).dispatchEvent(new Event("layoutComplete"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedColumnChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedColumnChartLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedColumnChartLayout.as
index 31c4a41..ba49ac9 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedColumnChartLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/StackedColumnChartLayout.as
@@ -158,4 +158,4 @@ package org.apache.flex.charts.beads.layouts
 			IEventDispatcher(chart).dispatchEvent(new Event("layoutComplete"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/CartesianChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/CartesianChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/CartesianChart.as
index 244f6a8..d79f851 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/CartesianChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/CartesianChart.as
@@ -82,4 +82,4 @@ package org.apache.flex.charts.core
 			_yAxis = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
index bb848f6..6fcb2fc 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ChartBase.as
@@ -74,4 +74,4 @@ package org.apache.flex.charts.core
 			dispatchEvent(new Event("seriesChanged"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisBead.as
index 06a5057..8332e31 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisBead.as
@@ -55,4 +55,4 @@ package org.apache.flex.charts.core
 		function get axisGroup():IAxisGroup;
 		function set axisGroup(value:IAxisGroup):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
index c2c8f79..2a5a2a4 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
@@ -39,4 +39,4 @@ package org.apache.flex.charts.core
 		function drawTickMarks( originX:Number, originY:Number, width:Number, height:Number, marks:String, tickStroke:IStroke ):void;
 		function drawAxisLine( originX:Number, originY:Number, width:Number, height:Number, lineStroke:IStroke ):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ICartesianChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ICartesianChartLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ICartesianChartLayout.as
index 431f9f0..6e8065f 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ICartesianChartLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/ICartesianChartLayout.as
@@ -31,4 +31,4 @@ package org.apache.flex.charts.core
 	{
 		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChart.as
index ac8d530..afd09dc 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChart.as
@@ -45,4 +45,4 @@ package org.apache.flex.charts.core
 		function get series():Array;
 		function set series(value:Array):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
index da4777e..a63f89a 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartDataGroup.as
@@ -52,4 +52,4 @@ package org.apache.flex.charts.core
 		 */
 		function getItemRendererUnderPoint(point:Point):IChartItemRenderer;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
index 16a2ec8..ec33c20 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
@@ -113,4 +113,4 @@ package org.apache.flex.charts.core
 		 */
 		function set height(value:Number):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartSeries.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartSeries.as
index 65a2cdb..4c527c5 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartSeries.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartSeries.as
@@ -66,4 +66,4 @@ package org.apache.flex.charts.core
 		function get itemRenderer():IFactory;
 		function set itemRenderer(value:IFactory):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IConnectedItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IConnectedItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IConnectedItemRenderer.as
index e982645..b4783ca 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IConnectedItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IConnectedItemRenderer.as
@@ -52,4 +52,4 @@ package org.apache.flex.charts.core
 		function get y2():Number;
 		function set y2(value:Number):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IHorizontalAxisBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IHorizontalAxisBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IHorizontalAxisBead.as
index 0845cde..0e2cf46 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IHorizontalAxisBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IHorizontalAxisBead.as
@@ -62,4 +62,4 @@ package org.apache.flex.charts.core
 		 */
 		function get minimum():Number;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IVerticalAxisBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IVerticalAxisBead.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IVerticalAxisBead.as
index be6a05f..4ce1b28 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IVerticalAxisBead.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IVerticalAxisBead.as
@@ -62,4 +62,4 @@ package org.apache.flex.charts.core
 		 */
 		function get minimum():Number;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/PolarChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/PolarChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/PolarChart.as
index 9d99b5e..a788c00 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/PolarChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/PolarChart.as
@@ -63,4 +63,4 @@ package org.apache.flex.charts.core
 			_radii = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
index 8b7055c..d390eca 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
@@ -163,4 +163,4 @@ package org.apache.flex.charts.optimized
 			}
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
index 448a542..7853919 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
@@ -139,4 +139,4 @@ package org.apache.flex.charts.optimized
 			drawPath(pathLine);
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
index 3d5ec8c..385a55b 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
@@ -189,4 +189,4 @@ package org.apache.flex.charts.optimized
 			
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
index e3bdd94..343efc1 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
@@ -202,4 +202,4 @@ package org.apache.flex.charts.optimized
 			}
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
index 03e0195..e60595f 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
@@ -278,4 +278,4 @@ package org.apache.flex.charts.optimized
 		{
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BarSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BarSeries.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BarSeries.as
index 8001b20..8cac046 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BarSeries.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BarSeries.as
@@ -100,4 +100,4 @@ package org.apache.flex.charts.supportClasses
 			_itemRenderer = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartAxisGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartAxisGroup.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartAxisGroup.as
index 939a50f..d41b32b 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartAxisGroup.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ChartAxisGroup.as
@@ -60,7 +60,7 @@ package org.apache.flex.charts.supportClasses
 		 */
 		public function removeAllElements():void
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				this.removeChildren(0);
 			}
 			
@@ -179,4 +179,4 @@ package org.apache.flex.charts.supportClasses
 			axisPath.drawPath(0, 0, pathLine);
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ColumnSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ColumnSeries.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ColumnSeries.as
index db91267..715ac8d 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ColumnSeries.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ColumnSeries.as
@@ -90,4 +90,4 @@ package org.apache.flex.charts.supportClasses
 			_itemRenderer = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ILineSegmentItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ILineSegmentItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ILineSegmentItemRenderer.as
index a42c1d8..a6f3c22 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ILineSegmentItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/ILineSegmentItemRenderer.as
@@ -54,4 +54,4 @@ package org.apache.flex.charts.supportClasses
 		function get stroke():IStroke;
 		function set stroke(value:IStroke):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
index ca3fe08..bf66140 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/IWedgeItemRenderer.as
@@ -110,4 +110,4 @@ package org.apache.flex.charts.supportClasses
 		function get stroke():IStroke;
 		function set stroke(value:IStroke):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
index bff5a80..1f3b22b 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSegmentItemRenderer.as
@@ -195,4 +195,4 @@ package org.apache.flex.charts.supportClasses
 			}
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSeries.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSeries.as
index ca2b62a..3601076 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSeries.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/LineSeries.as
@@ -111,4 +111,4 @@ package org.apache.flex.charts.supportClasses
 			_lineSegmentRenderer = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/PieSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/PieSeries.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/PieSeries.as
index f12df3b..6e376d8 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/PieSeries.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/PieSeries.as
@@ -82,4 +82,4 @@ package org.apache.flex.charts.supportClasses
 		{
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
index ca25fbd..b46a53a 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
@@ -269,4 +269,4 @@ package org.apache.flex.charts.supportClasses
 		{
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/.actionScriptProperties b/frameworks/projects/Collections/.actionScriptProperties
index f45c86f..79e70ab 100644
--- a/frameworks/projects/Collections/.actionScriptProperties
+++ b/frameworks/projects/Collections/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Collections.as" projectUUID="03015f5b-acd3-493a-a697-34c3d1e91c89" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/build.xml b/frameworks/projects/Collections/build.xml
index 8a14664..3330905 100644
--- a/frameworks/projects/Collections/build.xml
+++ b/frameworks/projects/Collections/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/FlattenedList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/FlattenedList.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/FlattenedList.as
index 3fd98be..f26fd8b 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/FlattenedList.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/FlattenedList.as
@@ -200,4 +200,4 @@ package org.apache.flex.collections
 		}
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/ICollection.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/ICollection.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/ICollection.as
index e9ae8fd..e688f95 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/ICollection.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/ICollection.as
@@ -40,4 +40,4 @@ package org.apache.flex.collections
          */
 		function getItemAt(index:int):Object
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/IStringCollection.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/IStringCollection.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/IStringCollection.as
index daf47bc..727ebb8 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/IStringCollection.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/IStringCollection.as
@@ -40,4 +40,4 @@ package org.apache.flex.collections
          */
 		function getItemAt(index:int):String
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/LazyCollection.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/LazyCollection.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/LazyCollection.as
index edf965c..3c1d513 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/LazyCollection.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/LazyCollection.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.collections
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.events.Event;            
     }
@@ -187,7 +187,7 @@ package org.apache.flex.collections
         public function set strand(value:IStrand):void
         {
             _strand = value;
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 IEventDispatcher(_strand).addEventListener(flash.events.Event.COMPLETE, completeHandler);                    
             }
@@ -218,7 +218,7 @@ package org.apache.flex.collections
          */
         protected var data:Array;
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function completeHandler(event:flash.events.Event):void
         {
             rawData = inputParser.parseItems(_strand["data"]);  
@@ -264,4 +264,4 @@ package org.apache.flex.collections
         }
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/IItemConverter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/IItemConverter.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/IItemConverter.as
index 11492ac..67aff03 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/IItemConverter.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/IItemConverter.as
@@ -46,4 +46,4 @@ package org.apache.flex.collections.converters
          */
 		function convertItem(data:String):Object
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/JSONItemConverter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/JSONItemConverter.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/JSONItemConverter.as
index 6fc5888..b803353 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/JSONItemConverter.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/converters/JSONItemConverter.as
@@ -71,4 +71,4 @@ package org.apache.flex.collections.converters
             obj[propName] = value;
         }
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/IInputParser.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/IInputParser.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/IInputParser.as
index 1cbe76a..1649b79 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/IInputParser.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/IInputParser.as
@@ -47,4 +47,4 @@ package org.apache.flex.collections.parsers
          */
 		function parseItems(s:String):Array;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/JSONInputParser.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/JSONInputParser.as b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/JSONInputParser.as
index c15c359..39e371b 100644
--- a/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/JSONInputParser.as
+++ b/frameworks/projects/Collections/src/main/flex/org/apache/flex/collections/parsers/JSONInputParser.as
@@ -51,4 +51,4 @@ package org.apache.flex.collections.parsers
             return s.split("},");
         }
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/.actionScriptProperties b/frameworks/projects/Core/.actionScriptProperties
index 3c51500..b29cfae 100644
--- a/frameworks/projects/Core/.actionScriptProperties
+++ b/frameworks/projects/Core/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Core.as" projectUUID="be5b3edf-e159-406d-a592-1f8d39993fea" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/build.xml b/frameworks/projects/Core/build.xml
index a926925..c6744c5 100644
--- a/frameworks/projects/Core/build.xml
+++ b/frameworks/projects/Core/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as b/frameworks/projects/Core/src/main/flex/CoreClasses.as
index b806f68..1e201a0 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -28,7 +28,7 @@ internal class CoreClasses
 {
     import org.apache.flex.core.BeadViewBase; BeadViewBase;
     import org.apache.flex.core.BrowserWindow; BrowserWindow;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.core.CSSShape; CSSShape;
 		import org.apache.flex.core.CSSSprite; CSSSprite;
@@ -43,7 +43,7 @@ internal class CoreClasses
     import org.apache.flex.core.IBeadLayout; IBeadLayout;
     import org.apache.flex.core.IBeadModel; IBeadModel;
     import org.apache.flex.core.IBeadView; IBeadView;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.core.IBorderModel; IBorderModel;
 	}
@@ -68,7 +68,7 @@ internal class CoreClasses
     import org.apache.flex.core.IPopUp; IPopUp;
     import org.apache.flex.core.IRangeModel; IRangeModel;
     import org.apache.flex.core.IRollOverModel; IRollOverModel;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.core.IScrollBarModel; IScrollBarModel;
 	}
@@ -83,7 +83,7 @@ internal class CoreClasses
     import org.apache.flex.core.IValueToggleButtonModel; IValueToggleButtonModel;
 	import org.apache.flex.core.IViewport; IViewport;
 	import org.apache.flex.core.IViewportModel; IViewportModel;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.core.IViewportScroller; IViewportScroller;
 	}
@@ -93,7 +93,7 @@ internal class CoreClasses
     import org.apache.flex.core.SimpleApplication; SimpleApplication;
     import org.apache.flex.core.DataBindingBase; DataBindingBase;
     import org.apache.flex.core.UIBase; UIBase;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.core.UIButtonBase; UIButtonBase;
 	}
@@ -107,18 +107,18 @@ internal class CoreClasses
     import org.apache.flex.geom.Point; Point;
     import org.apache.flex.geom.Rectangle; Rectangle;
     import org.apache.flex.utils.BinaryData; BinaryData;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.utils.CSSBorderUtils; CSSBorderUtils;
 	}
     import org.apache.flex.utils.CSSContainerUtils; CSSContainerUtils;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.utils.dbg.DOMPathUtil; DOMPathUtil;
 	}
 	import org.apache.flex.utils.EffectTimer; EffectTimer;
     import org.apache.flex.utils.MixinManager; MixinManager;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.utils.PNGEncoder; PNGEncoder;
     	import org.apache.flex.utils.SolidBorderUtil; SolidBorderUtil;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
index 97d0088..ff6e5a6 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
@@ -25,7 +25,7 @@ package org.apache.flex.core
     import org.apache.flex.utils.MXMLDataInterpreter;
 	import org.apache.flex.utils.Timer;
 
-    COMPILE::AS3 {
+    COMPILE::SWF {
         import flash.display.DisplayObject;
         import flash.display.Sprite;
         import flash.display.StageAlign;
@@ -117,7 +117,7 @@ package org.apache.flex.core
         {
             super();
 
-            COMPILE::AS3 {
+            COMPILE::SWF {
     			if (stage)
     			{
     				stage.align = StageAlign.TOP_LEFT;
@@ -130,7 +130,7 @@ package org.apache.flex.core
             }
         }
 
-        COMPILE::AS3
+        COMPILE::SWF
         private function initHandler(event:flash.events.Event):void
         {
 			if (model is IBead) addBead(model as IBead);
@@ -150,7 +150,7 @@ package org.apache.flex.core
 
         }
 
-        COMPILE::AS3
+        COMPILE::SWF
         private function enterFrameHandler(event:flash.events.Event):void
         {
             if (dispatchEvent(new org.apache.flex.events.Event("preinitialize", false, true)))
@@ -169,7 +169,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         protected function initialize():void
         {
 
@@ -249,7 +249,7 @@ package org.apache.flex.core
          *  @productversion FlexJS 0.0
          */
         [Bindable("__NoChangeEvent__")]
-        COMPILE::AS3
+        COMPILE::SWF
         public var model:Object;
 
         COMPILE::JS
@@ -344,7 +344,7 @@ package org.apache.flex.core
          */
         public var beads:Array;
 
-        COMPILE::AS3
+        COMPILE::SWF
         private var _beads:Vector.<IBead>;
 
         /**
@@ -355,7 +355,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public function addBead(bead:IBead):void
         {
             if (!_beads)
@@ -372,7 +372,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public function getBeadByType(classOrInterface:Class):IBead
         {
             for each (var bead:IBead in _beads)
@@ -391,7 +391,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public function removeBead(value:IBead):IBead
         {
             var n:int = _beads.length;
@@ -417,7 +417,7 @@ package org.apache.flex.core
          */
         public function addElement(c:Object, dispatchEvent:Boolean = true):void
         {
-            COMPILE::AS3 {
+            COMPILE::SWF {
                 if (c is IUIBase)
                 {
                     addChild(IUIBase(c).element as DisplayObject);
@@ -442,7 +442,7 @@ package org.apache.flex.core
          */
         public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
         {
-            COMPILE::AS3 {
+            COMPILE::SWF {
                 if (c is IUIBase)
                 {
                     addChildAt(IUIBase(c).element as DisplayObject, index);
@@ -475,7 +475,7 @@ package org.apache.flex.core
          */
         public function getElementAt(index:int):Object
         {
-            COMPILE::AS3 {
+            COMPILE::SWF {
                 return getChildAt(index);
             }
             COMPILE::JS {
@@ -494,7 +494,7 @@ package org.apache.flex.core
          */
         public function getElementIndex(c:Object):int
         {
-            COMPILE::AS3 {
+            COMPILE::SWF {
                 if (c is IUIBase)
                     return getChildIndex(IUIBase(c).element as DisplayObject);
 
@@ -522,7 +522,7 @@ package org.apache.flex.core
          */
         public function removeElement(c:Object, dispatchEvent:Boolean = true):void
         {
-            COMPILE::AS3 {
+            COMPILE::SWF {
                 if (c is IUIBase)
                 {
                     removeChild(IUIBase(c).element as DisplayObject);
@@ -545,7 +545,7 @@ package org.apache.flex.core
          */
         public function get numElements():int
         {
-            COMPILE::AS3 {
+            COMPILE::SWF {
                 return numChildren;
             }
             COMPILE::JS {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as
index 70d6424..60111ef 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3 {
+    COMPILE::SWF {
         import flash.display.Sprite;
         import flash.system.ApplicationDomain;
         import flash.utils.getQualifiedClassName;
@@ -33,7 +33,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class ApplicationBase extends Sprite implements IFlexInfo
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
index f88201f..8d946cd 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.events.Event;
     import flash.external.ExternalInterface;
@@ -81,7 +81,7 @@ COMPILE::AS3
         public function set strand(value:IStrand):void
         {
             app = value as Application;
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 app.stage.addEventListener("resize", resizeHandler);
                 if (ExternalInterface.available && (!isNaN(minWidth) || !isNaN(minHeight)))
@@ -111,7 +111,7 @@ COMPILE::AS3
         
         private function resizeHandler(event:Event):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var initialView:UIBase = app.initialView as UIBase;
                 if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight))
@@ -135,4 +135,4 @@ COMPILE::AS3
         }
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as
index 670f503..bda82c1 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {        
         import flash.external.ExternalInterface;
         import flash.utils.getQualifiedClassName;
@@ -66,7 +66,7 @@ package org.apache.flex.core
         
         private function viewChangedHandler(event:Event):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (ExternalInterface.available)
                 {
@@ -86,4 +86,4 @@ package org.apache.flex.core
         }
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as
index ecaf8c3..de23c8e 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.net.navigateToURL;
         import flash.net.URLRequest;            
@@ -48,7 +48,7 @@ package org.apache.flex.core
 		
         public static function open(url:String, options:String):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 navigateToURL(new URLRequest(url), options);                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as
index c601fd7..dfae721 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.Loader;
         import flash.system.LoaderContext;
@@ -71,7 +71,7 @@ package org.apache.flex.core
         public function set strand(value:IStrand):void
         {
             _strand = value;
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 IEventDispatcher(ValuesManager.valuesImpl).addEventListener("init", initHandler);
                 IEventDispatcher(_strand).addEventListener("preinitialize", preinitHandler);
@@ -82,10 +82,10 @@ package org.apache.flex.core
             }
         }
             
-        COMPILE::AS3
+        COMPILE::SWF
         private var loaders:Array;
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function initHandler(event:ValueEvent):void
         {
             var fontFaces:Array = event.value as Array;
@@ -93,7 +93,7 @@ package org.apache.flex.core
                 requestFonts(fontFaces);
         }
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function requestFonts(fontFaces:Array):void
         {
             if (!loaders)
@@ -122,20 +122,20 @@ package org.apache.flex.core
             }
         }
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function completeHandler(event:flash.events.Event):void
         {
             removeTarget(event.target);
         }
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function errorHandler(event:flash.events.Event):void
         {
             trace("error loading font from: ", event.target.name);
             removeTarget(event.target);
         }
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function removeTarget(target:Object):void
         {
             var n:int = loaders.length;
@@ -151,7 +151,7 @@ package org.apache.flex.core
             }
         }
                 
-        COMPILE::AS3
+        COMPILE::SWF
         private function preinitHandler(event:org.apache.flex.events.Event):void
         {
             event.preventDefault();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
index 2c09911..27fa182 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
@@ -35,7 +35,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class CSSShape extends Shape implements IStyleableObject, IChild
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
index 54d2638..5775a54 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
@@ -35,7 +35,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class CSSSprite extends Sprite implements IStyleableObject, IChild
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
index 99ae97e..c088847 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		import flash.text.TextField;
 		import flash.text.TextFieldAutoSize;
 		import flash.text.TextFormat;
@@ -37,7 +37,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class CSSTextField extends TextField
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as
index 64f5ea3..d3631d4 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObject;
         import flash.events.Event;
@@ -89,7 +89,7 @@ package org.apache.flex.core
          */
         public function callLater(fn:Function, args:Array = null, thisArg:Object = null):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 DisplayObject(_strand).addEventListener(Event.ENTER_FRAME, enterFrameHandler);
             }
@@ -104,7 +104,7 @@ package org.apache.flex.core
             }
         }
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function enterFrameHandler(event:Event):void
         {
             DisplayObject(_strand).removeEventListener(Event.ENTER_FRAME, enterFrameHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
index 2f7186f..5b6cc26 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
@@ -360,7 +360,7 @@ package org.apache.flex.core
 			//TODO:  Need to handle this case more gracefully
 			catch(e:Error)
 			{
-                COMPILE::AS3
+                COMPILE::SWF
                 {
                     trace(e.message);                        
                 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
index d171288..93e5c53 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
@@ -96,4 +96,4 @@ package org.apache.flex.core
 			return owner.$getElementAt(index);
 		}
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
index 2fcf8dd..962a11d 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.Shape;            
     }
@@ -48,14 +48,14 @@ package org.apache.flex.core
 		{
 			super();
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 _shape = new flash.display.Shape();
                 this.addElement(_shape);
             }
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _shape:flash.display.Shape;
 		
 		private var _fillColor:uint = 0x000000;
@@ -104,7 +104,7 @@ package org.apache.flex.core
          */
 		public function drawRect(x:Number, y:Number, width:Number, height:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 _shape.graphics.clear();
                 _shape.graphics.beginFill(_fillColor);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
index 4d4999b..57e4ce3 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.Sprite;
     }
@@ -34,7 +34,7 @@ package org.apache.flex.core
         import goog.events.EventTarget;
     }
 
-    COMPILE::AS3
+    COMPILE::SWF
     public class HTMLElementWrapper extends Sprite
     {
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as
index c746a8f..d01ad90 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as
@@ -29,7 +29,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	COMPILE::AS3
+	COMPILE::SWF
 	public interface IBorderModel extends IBead, IBeadModel
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
index 6052094..823ecf9 100755
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObjectContainer;
     }
@@ -42,7 +42,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         function get parent():DisplayObjectContainer;
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as
index ae07cb7..d61f951 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as
@@ -30,4 +30,4 @@ package org.apache.flex.core
 	public interface IContainerView extends IParent
 	{
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as
index 5ac0584..e0948da 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as
@@ -41,4 +41,4 @@ package org.apache.flex.core
 		function get columns():Array;
 		function set columns(value:Array):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as
index ff9295b..765f2ad 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     public interface IFlexJSElement
     {
         

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
index dc710ef..da0918f 100755
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObjectContainer;
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as
index f4ee2fe..3d482bc 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as
@@ -28,7 +28,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	COMPILE::AS3
+	COMPILE::SWF
 	public interface IScrollBarModel extends IRangeModel
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
index 349e24f..a7d524b 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
@@ -40,7 +40,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         function get element():IFlexJSElement;
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as
index 5b0a4cb..3f538b6 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as
@@ -28,7 +28,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public interface IViewportScroller
 	{
         

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
index 6380f2f..dbdcace 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
@@ -123,4 +123,4 @@ package org.apache.flex.core
 		}
 
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
index 3f77774..e8f2fa5 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
@@ -97,4 +97,4 @@ package org.apache.flex.core
 			return owner.$getElementAt(index);
 		}
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as
index 5d4d918..b824288 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
     import flash.display.DisplayObject;
     import flash.display.Sprite;
@@ -61,7 +61,7 @@ package org.apache.flex.core
         public function SimpleApplication()
         {
             super();
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				if (stage)
 				{
@@ -75,7 +75,7 @@ package org.apache.flex.core
 			}
         }
         
-		COMPILE::AS3
+		COMPILE::SWF
         private function initHandler(event:flash.events.Event):void
         {
 			start();
@@ -99,4 +99,4 @@ package org.apache.flex.core
 		  }
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
index e64a517..dd1f3d1 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.system.ApplicationDomain;
         import flash.utils.getDefinitionByName;
@@ -72,7 +72,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public function init(mainClass:Object):void
         {
 			var styleClassName:String;
@@ -155,7 +155,7 @@ package org.apache.flex.core
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public function generateCSSStyleDeclarations(factoryFunctions:Object, arr:Array):void
         {
 			if (factoryFunctions == null)
@@ -390,7 +390,7 @@ package org.apache.flex.core
                 }
 			}
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
     			className = getQualifiedClassName(thisObject);
             }
@@ -424,7 +424,7 @@ package org.apache.flex.core
 	                if (value !== undefined)
 	                    return value;
 	            }
-                COMPILE::AS3
+                COMPILE::SWF
                 {
                     className = getQualifiedSuperclassName(thisInstance);
                     thisInstance = getDefinitionByName(className);                        
@@ -544,7 +544,7 @@ package org.apache.flex.core
         {
             var o:Object = values["global"];
             o = o[valueName];
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var i:Class = o as Class;                    
             }
@@ -740,7 +740,7 @@ package org.apache.flex.core
 	}
 }
 
-COMPILE::AS3
+COMPILE::SWF
 class CSSClass
 {
     public static const CSSSelector:int = 0;
@@ -749,7 +749,7 @@ class CSSClass
     public static const CSSMediaQuery:int = 3;
 }
 
-COMPILE::AS3
+COMPILE::SWF
 class CSSFactory
 {
     public static const DefaultFactory:int = 0;
@@ -757,7 +757,7 @@ class CSSFactory
     public static const Override:int = 2;
 }
 
-COMPILE::AS3
+COMPILE::SWF
 class CSSDataType
 {
     public static const Native:int = 0;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as
index 1afe763..beb7f82 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as
@@ -33,7 +33,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class StageProxy implements IEventDispatcher
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
index 79e2a7d..c9d69a6 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
@@ -33,7 +33,7 @@ package org.apache.flex.core
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class StyleableCSSTextField extends CSSTextField implements IStyleableObject, IChild
 	{
         /**


[12/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - add a helloworld example

Posted by ah...@apache.org.
add a helloworld example


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8a8fc6e0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8a8fc6e0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8a8fc6e0

Branch: refs/heads/spark
Commit: 8a8fc6e06f546c8578a95e103a080a6cf9e61f42
Parents: f7afff2
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jun 10 13:26:16 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jun 10 13:26:16 2016 -0700

----------------------------------------------------------------------
 examples/flexjs/HelloWorld/build.xml           | 44 +++++++++++++++++++++
 examples/flexjs/HelloWorld/src/HelloWorld.mxml | 30 ++++++++++++++
 2 files changed, 74 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a8fc6e0/examples/flexjs/HelloWorld/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/HelloWorld/build.xml b/examples/flexjs/HelloWorld/build.xml
new file mode 100644
index 0000000..0e2d763
--- /dev/null
+++ b/examples/flexjs/HelloWorld/build.xml
@@ -0,0 +1,44 @@
+<?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="helloworld" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../.."/>
+    <property name="example" value="HelloWorld" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+    <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" />
+    </target>
+
+    
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a8fc6e0/examples/flexjs/HelloWorld/src/HelloWorld.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/HelloWorld/src/HelloWorld.mxml b/examples/flexjs/HelloWorld/src/HelloWorld.mxml
new file mode 100644
index 0000000..70d8d20
--- /dev/null
+++ b/examples/flexjs/HelloWorld/src/HelloWorld.mxml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:js="library://ns.apache.org/flexjs/basic" >
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+    <js:initialView>
+        <js:View>
+        	<js:Label text="Hello World!" />
+        </js:View>
+    </js:initialView>
+</js:Application>


[07/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - rename mobile.View to TitleView and create a core.View so we don't have to use ViewBase in examples (trying to get rid of the 'Base' in examples)

Posted by ah...@apache.org.
rename mobile.View to TitleView and create a core.View so we don't have to use ViewBase in examples (trying to get rid of the 'Base' in examples)


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

Branch: refs/heads/spark
Commit: 40187884359eedd6d495952147478d3970a3fc4e
Parents: 080c6cb
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jun 9 13:10:11 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Jun 9 13:26:27 2016 -0700

----------------------------------------------------------------------
 .../flex/binding/MXMLBeadViewBaseDataBinding.as | 342 -------------------
 .../flex/binding/MXMLBeadViewDataBinding.as     | 342 +++++++++++++++++++
 .../apache/flex/binding/ViewBaseDataBinding.as  | 338 ------------------
 .../org/apache/flex/binding/ViewDataBinding.as  | 338 ++++++++++++++++++
 .../src/main/resources/basic-manifest.xml       |   4 +-
 .../src/main/flex/org/apache/flex/core/View.as  |  34 ++
 .../main/flex/org/apache/flex/core/ViewBase.as  |   3 +-
 .../Core/src/main/resources/basic-manifest.xml  |   2 +-
 .../Flat/src/main/resources/defaults.css        |   4 +-
 .../Flat/src/main/resources/flat-manifest.xml   |   6 +-
 frameworks/projects/HTML/readpom.xml            |  26 ++
 .../projects/HTML/src/main/flex/HTMLClasses.as  |   1 -
 .../flex/org/apache/flex/html/MXMLBeadView.as   | 317 +++++++++++++++++
 .../org/apache/flex/html/MXMLBeadViewBase.as    | 317 -----------------
 .../apache/flex/html/beads/TitleBarView.mxml    |   6 +-
 .../HTML/src/main/resources/basic-manifest.xml  |   2 +-
 .../HTML/src/main/resources/defaults.css        |   4 +-
 .../Mobile/src/main/flex/MobileClasses.as       |   2 +-
 .../main/flex/org/apache/flex/mobile/IView.as   |  43 ---
 .../flex/org/apache/flex/mobile/IViewManager.as |   4 +-
 .../org/apache/flex/mobile/IViewManagerView.as  |  43 +++
 .../apache/flex/mobile/StackedViewManager.as    |  10 +-
 .../org/apache/flex/mobile/TabbedViewManager.as |   2 +-
 .../flex/org/apache/flex/mobile/TitleView.as    | 103 ++++++
 .../main/flex/org/apache/flex/mobile/View.as    | 103 ------
 .../org/apache/flex/mobile/ViewManagerBase.as   |   8 +-
 .../flex/mobile/beads/StackedViewManagerView.as |   2 +-
 .../flex/mobile/beads/TabbedViewManagerView.as  |   2 +-
 .../apache/flex/mobile/beads/ViewManagerView.as | 165 ---------
 .../flex/mobile/beads/ViewManagerViewBase.as    | 165 +++++++++
 .../src/main/resources/basic-manifest.xml       |   2 +-
 31 files changed, 1399 insertions(+), 1341 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewBaseDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewBaseDataBinding.as
deleted file mode 100644
index 803ce56..0000000
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewBaseDataBinding.as
+++ /dev/null
@@ -1,342 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.binding
-{
-    import org.apache.flex.binding.ConstantBinding;
-    import org.apache.flex.binding.GenericBinding;
-    import org.apache.flex.binding.PropertyWatcher;
-    import org.apache.flex.binding.SimpleBinding;
-    import org.apache.flex.binding.WatcherBase;
-    import org.apache.flex.core.DataBindingBase;
-    import org.apache.flex.core.IBead;
-    import org.apache.flex.core.IStrand;
-    import org.apache.flex.events.Event;
-    import org.apache.flex.events.IEventDispatcher;
-    
-    /**
-     *  The ViewBaseDataBinding class implements databinding for
-     *  ViewBase instances.  Different classes can have
-     *  different databinding implementation that optimize for
-     *  the different lifecycles.  For example, an item renderer
-     *  databinding implementation can wait to execute databindings
-     *  until the data property is set.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class MXMLBeadViewBaseDataBinding extends DataBindingBase implements IBead
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function MXMLBeadViewBaseDataBinding()
-		{
-			super();
-		}
-        
-        private var _strand:IStrand;
-        
-        /**
-         *  @copy org.apache.flex.core.IBead#strand
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function set strand(value:IStrand):void
-        {
-            _strand = value;
-            IEventDispatcher(_strand).addEventListener("initBindings", initCompleteHandler);
-        }    
-
-        private function initCompleteHandler(event:Event):void
-        {
-            var fieldWatcher:Object;
-            var sb:SimpleBinding;
-            if (!("_bindings" in _strand))
-                return;
-            var bindingData:Array = _strand["_bindings"];
-            var n:int = bindingData[0];
-            var bindings:Array = [];
-            var i:int;
-            var index:int = 1;
-            for (i = 0; i < n; i++)
-            {
-                var binding:Object = {};
-                binding.source = bindingData[index++];
-				binding.destFunc = bindingData[index++];
-                binding.destination = bindingData[index++];
-                bindings.push(binding);
-            }
-            var watchers:Object = decodeWatcher(bindingData.slice(index));
-            for (i = 0; i < n; i++)
-            {
-                    binding = bindings[i];
-                if (binding.source is Array)
-                {
-                    if (binding.source[0] in _strand)
-                    {
-                        if (binding.source.length == 2 && binding.destination.length == 2)
-                        {
-                            var destObject:Object;
-                            var destination:IStrand;
-                            // can be simplebinding or constantbinding
-                            var modelWatcher:Object = watchers.watcherMap[binding.source[0]];
-                            fieldWatcher = modelWatcher.children.watcherMap[binding.source[1]];
-                            if (fieldWatcher.eventNames is String)
-                            {
-                                sb = new SimpleBinding();
-                                sb.destinationPropertyName = binding.destination[1];
-                                sb.eventName = fieldWatcher.eventNames as String;
-                                sb.sourceID = binding.source[0];
-                                sb.sourcePropertyName = binding.source[1];
-                                sb.setDocument(_strand);
-                                destObject = _strand[binding.destination[0]];                                
-                                destination = destObject as IStrand;
-                                if (destination)
-                                    destination.addBead(sb);
-                                else
-                                {
-                                    if (destObject)
-                                    {
-                                        sb.destination = destObject;
-                                        _strand.addBead(sb);
-                                    }
-                                    else
-                                    {
-                                        deferredBindings[binding.destination[0]] = sb;
-                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                                    }
-                                }
-                            }
-                            else if (fieldWatcher.eventNames == null)
-                            {
-                                var cb:ConstantBinding = new ConstantBinding();
-                                cb.destinationPropertyName = binding.destination[1];
-                                cb.sourceID = binding.source[0];
-                                cb.sourcePropertyName = binding.source[1];
-                                cb.setDocument(_strand);
-                                destObject = _strand[binding.destination[0]];                                
-                                destination = destObject as IStrand;
-                                if (destination)
-                                    destination.addBead(cb);
-                                else
-                                {
-                                    if (destObject)
-                                    {
-                                        cb.destination = destObject;
-                                        _strand.addBead(cb);
-                                    }
-                                    else
-                                    {
-                                        deferredBindings[binding.destination[0]] = cb;
-                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                else if (binding.source is String)
-                {
-                    fieldWatcher = watchers.watcherMap[binding.source];
-                    if (fieldWatcher.eventNames is String)
-                    {
-                        sb = new SimpleBinding();
-                        sb.destinationPropertyName = binding.destination[1];
-                        sb.eventName = fieldWatcher.eventNames as String;
-                        sb.sourcePropertyName = binding.source;
-                        sb.setDocument(_strand);
-                        destObject = _strand[binding.destination[0]];                                
-                        destination = destObject as IStrand;
-                        if (destination)
-                            destination.addBead(sb);
-                        else
-                        {
-                            if (destObject)
-                            {
-                                sb.destination = destObject;
-                                _strand.addBead(sb);
-                            }
-                            else
-                            {
-                                deferredBindings[binding.destination[0]] = sb;
-                                IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    makeGenericBinding(binding, i, watchers);
-                }
-            }
-        }
-
-        private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
-        {
-            var gb:GenericBinding = new GenericBinding();
-            gb.setDocument(_strand);
-            gb.destinationData = binding.destination;
-			gb.destinationFunction = binding.destFunc;
-            gb.source = binding.source;
-            setupWatchers(gb, index, watchers.watchers, null);
-        }
-        
-        private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
-        {
-            var foundWatcher:Boolean = false;
-            
-            var n:int = watchers.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                var watcher:Object = watchers[i];
-                var isValidWatcher:Boolean = false;
-                if (typeof(watcher.bindings) == "number")
-                    isValidWatcher = (watcher.bindings == index);
-                else
-                    isValidWatcher = (watcher.bindings.indexOf(index) != -1);
-                if (isValidWatcher)
-                {
-                    var type:String = watcher.type;
-                    switch (type)
-                    {
-                        case "property":
-                        {
-                            var pw:PropertyWatcher = new PropertyWatcher(this, 
-                                        watcher.propertyName, 
-                                        watcher.eventNames,
-                                        watcher.getterFunction);
-                            watcher.watcher = pw;
-                            if (parentWatcher)
-                                pw.parentChanged(parentWatcher.value);
-                            else
-                                pw.parentChanged(_strand);
-                            if (parentWatcher)
-                                parentWatcher.addChild(pw);
-                            if (watcher.children == null)
-                                pw.addBinding(gb);
-                            foundWatcher = true;
-                            break;
-                        }
-                    }
-                    if (watcher.children)
-                    {
-                        setupWatchers(gb, index, watcher.children.watchers, watcher.watcher);
-                    }
-                }
-            }
-            if (!foundWatcher && parentWatcher == null)
-            {
-                // might be a binding to a function that doesn't have change events
-                // so just force an update
-                gb.valueChanged(null);
-            }
-        }
-        
-        private function decodeWatcher(bindingData:Array):Object
-        {
-            var watcherMap:Object = {};
-            var watchers:Array = [];
-            var n:int = bindingData.length;
-            var index:int = 0;
-            var watcherData:Object;
-            // FalconJX adds an extra null to the data so make sure
-            // we have enough data for a complete watcher otherwise
-            // say we are done
-            while (index < n - 2)
-            {
-                var watcherIndex:int = bindingData[index++];
-                var type:int = bindingData[index++];
-                switch (type)
-                {
-                    case 0:
-                    {
-                        watcherData = { type: "function" };
-                        watcherData.functionName = bindingData[index++];
-						watcherData.paramFunction = bindingData[index++];
-                        watcherData.eventNames = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        break;
-                    }
-                    case 1:
-					{
-						watcherData = { type: "static" };
-						watcherData.propertyName = bindingData[index++];
-						watcherData.eventNames = bindingData[index++];
-						watcherData.bindings = bindingData[index++];
-						watcherData.getterFunction = bindingData[index++];
-						watcherData.parentObj = bindingData[index++];
-						watcherMap[watcherData.propertyName] = watcherData;
-						break;
-					}
-                    case 2:
-                    {
-                        watcherData = { type: "property" };
-                        watcherData.propertyName = bindingData[index++];
-                        watcherData.eventNames = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        watcherData.getterFunction = bindingData[index++];
-                        watcherMap[watcherData.propertyName] = watcherData;
-                        break;
-                    }
-                    case 3:
-                    {
-                        watcherData = { type: "xml" };
-                        watcherData.propertyName = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        watcherMap[watcherData.propertyName] = watcherData;
-                        break;
-                    }
-                }
-                watcherData.children = bindingData[index++];
-                if (watcherData.children != null)
-                {
-                    watcherData.children = decodeWatcher(watcherData.children);
-                }
-                watcherData.index = watcherIndex;
-                watchers.push(watcherData);
-            }            
-            return { watchers: watchers, watcherMap: watcherMap };
-        }
-        
-        private var deferredBindings:Object = {};
-        private function deferredBindingsHandler(event:Event):void
-        {
-            for (var p:String in deferredBindings)
-            {
-                if (_strand[p] != null)
-                {
-                    var destination:IStrand = _strand[p] as IStrand;
-                    destination.addBead(deferredBindings[p]);
-                    delete deferredBindings[p];
-                }
-            }
-        }
-        
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
new file mode 100644
index 0000000..1a12462
--- /dev/null
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
@@ -0,0 +1,342 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.binding
+{
+    import org.apache.flex.binding.ConstantBinding;
+    import org.apache.flex.binding.GenericBinding;
+    import org.apache.flex.binding.PropertyWatcher;
+    import org.apache.flex.binding.SimpleBinding;
+    import org.apache.flex.binding.WatcherBase;
+    import org.apache.flex.core.DataBindingBase;
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.events.IEventDispatcher;
+    
+    /**
+     *  The MXMLBeadViewDataBinding class implements databinding for
+     *  MXMLBeadView instances.  Different classes can have
+     *  different databinding implementation that optimize for
+     *  the different lifecycles.  For example, an item renderer
+     *  databinding implementation can wait to execute databindings
+     *  until the data property is set.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class MXMLBeadViewDataBinding extends DataBindingBase implements IBead
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function MXMLBeadViewDataBinding()
+		{
+			super();
+		}
+        
+        private var _strand:IStrand;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(_strand).addEventListener("initBindings", initCompleteHandler);
+        }    
+
+        private function initCompleteHandler(event:Event):void
+        {
+            var fieldWatcher:Object;
+            var sb:SimpleBinding;
+            if (!("_bindings" in _strand))
+                return;
+            var bindingData:Array = _strand["_bindings"];
+            var n:int = bindingData[0];
+            var bindings:Array = [];
+            var i:int;
+            var index:int = 1;
+            for (i = 0; i < n; i++)
+            {
+                var binding:Object = {};
+                binding.source = bindingData[index++];
+				binding.destFunc = bindingData[index++];
+                binding.destination = bindingData[index++];
+                bindings.push(binding);
+            }
+            var watchers:Object = decodeWatcher(bindingData.slice(index));
+            for (i = 0; i < n; i++)
+            {
+                    binding = bindings[i];
+                if (binding.source is Array)
+                {
+                    if (binding.source[0] in _strand)
+                    {
+                        if (binding.source.length == 2 && binding.destination.length == 2)
+                        {
+                            var destObject:Object;
+                            var destination:IStrand;
+                            // can be simplebinding or constantbinding
+                            var modelWatcher:Object = watchers.watcherMap[binding.source[0]];
+                            fieldWatcher = modelWatcher.children.watcherMap[binding.source[1]];
+                            if (fieldWatcher.eventNames is String)
+                            {
+                                sb = new SimpleBinding();
+                                sb.destinationPropertyName = binding.destination[1];
+                                sb.eventName = fieldWatcher.eventNames as String;
+                                sb.sourceID = binding.source[0];
+                                sb.sourcePropertyName = binding.source[1];
+                                sb.setDocument(_strand);
+                                destObject = _strand[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(sb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        sb.destination = destObject;
+                                        _strand.addBead(sb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = sb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                            else if (fieldWatcher.eventNames == null)
+                            {
+                                var cb:ConstantBinding = new ConstantBinding();
+                                cb.destinationPropertyName = binding.destination[1];
+                                cb.sourceID = binding.source[0];
+                                cb.sourcePropertyName = binding.source[1];
+                                cb.setDocument(_strand);
+                                destObject = _strand[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(cb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        cb.destination = destObject;
+                                        _strand.addBead(cb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = cb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                else if (binding.source is String)
+                {
+                    fieldWatcher = watchers.watcherMap[binding.source];
+                    if (fieldWatcher.eventNames is String)
+                    {
+                        sb = new SimpleBinding();
+                        sb.destinationPropertyName = binding.destination[1];
+                        sb.eventName = fieldWatcher.eventNames as String;
+                        sb.sourcePropertyName = binding.source;
+                        sb.setDocument(_strand);
+                        destObject = _strand[binding.destination[0]];                                
+                        destination = destObject as IStrand;
+                        if (destination)
+                            destination.addBead(sb);
+                        else
+                        {
+                            if (destObject)
+                            {
+                                sb.destination = destObject;
+                                _strand.addBead(sb);
+                            }
+                            else
+                            {
+                                deferredBindings[binding.destination[0]] = sb;
+                                IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    makeGenericBinding(binding, i, watchers);
+                }
+            }
+        }
+
+        private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
+        {
+            var gb:GenericBinding = new GenericBinding();
+            gb.setDocument(_strand);
+            gb.destinationData = binding.destination;
+			gb.destinationFunction = binding.destFunc;
+            gb.source = binding.source;
+            setupWatchers(gb, index, watchers.watchers, null);
+        }
+        
+        private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
+        {
+            var foundWatcher:Boolean = false;
+            
+            var n:int = watchers.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var watcher:Object = watchers[i];
+                var isValidWatcher:Boolean = false;
+                if (typeof(watcher.bindings) == "number")
+                    isValidWatcher = (watcher.bindings == index);
+                else
+                    isValidWatcher = (watcher.bindings.indexOf(index) != -1);
+                if (isValidWatcher)
+                {
+                    var type:String = watcher.type;
+                    switch (type)
+                    {
+                        case "property":
+                        {
+                            var pw:PropertyWatcher = new PropertyWatcher(this, 
+                                        watcher.propertyName, 
+                                        watcher.eventNames,
+                                        watcher.getterFunction);
+                            watcher.watcher = pw;
+                            if (parentWatcher)
+                                pw.parentChanged(parentWatcher.value);
+                            else
+                                pw.parentChanged(_strand);
+                            if (parentWatcher)
+                                parentWatcher.addChild(pw);
+                            if (watcher.children == null)
+                                pw.addBinding(gb);
+                            foundWatcher = true;
+                            break;
+                        }
+                    }
+                    if (watcher.children)
+                    {
+                        setupWatchers(gb, index, watcher.children.watchers, watcher.watcher);
+                    }
+                }
+            }
+            if (!foundWatcher && parentWatcher == null)
+            {
+                // might be a binding to a function that doesn't have change events
+                // so just force an update
+                gb.valueChanged(null);
+            }
+        }
+        
+        private function decodeWatcher(bindingData:Array):Object
+        {
+            var watcherMap:Object = {};
+            var watchers:Array = [];
+            var n:int = bindingData.length;
+            var index:int = 0;
+            var watcherData:Object;
+            // FalconJX adds an extra null to the data so make sure
+            // we have enough data for a complete watcher otherwise
+            // say we are done
+            while (index < n - 2)
+            {
+                var watcherIndex:int = bindingData[index++];
+                var type:int = bindingData[index++];
+                switch (type)
+                {
+                    case 0:
+                    {
+                        watcherData = { type: "function" };
+                        watcherData.functionName = bindingData[index++];
+						watcherData.paramFunction = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        break;
+                    }
+                    case 1:
+					{
+						watcherData = { type: "static" };
+						watcherData.propertyName = bindingData[index++];
+						watcherData.eventNames = bindingData[index++];
+						watcherData.bindings = bindingData[index++];
+						watcherData.getterFunction = bindingData[index++];
+						watcherData.parentObj = bindingData[index++];
+						watcherMap[watcherData.propertyName] = watcherData;
+						break;
+					}
+                    case 2:
+                    {
+                        watcherData = { type: "property" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherData.getterFunction = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                    case 3:
+                    {
+                        watcherData = { type: "xml" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                }
+                watcherData.children = bindingData[index++];
+                if (watcherData.children != null)
+                {
+                    watcherData.children = decodeWatcher(watcherData.children);
+                }
+                watcherData.index = watcherIndex;
+                watchers.push(watcherData);
+            }            
+            return { watchers: watchers, watcherMap: watcherMap };
+        }
+        
+        private var deferredBindings:Object = {};
+        private function deferredBindingsHandler(event:Event):void
+        {
+            for (var p:String in deferredBindings)
+            {
+                if (_strand[p] != null)
+                {
+                    var destination:IStrand = _strand[p] as IStrand;
+                    destination.addBead(deferredBindings[p]);
+                    delete deferredBindings[p];
+                }
+            }
+        }
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewBaseDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewBaseDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewBaseDataBinding.as
deleted file mode 100644
index 6bfd5a2..0000000
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewBaseDataBinding.as
+++ /dev/null
@@ -1,338 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.binding
-{
-    import org.apache.flex.binding.ConstantBinding;
-    import org.apache.flex.binding.GenericBinding;
-    import org.apache.flex.binding.PropertyWatcher;
-    import org.apache.flex.binding.SimpleBinding;
-    import org.apache.flex.binding.WatcherBase;
-    import org.apache.flex.core.IBead;
-    import org.apache.flex.core.IStrand;
-    import org.apache.flex.events.Event;
-    import org.apache.flex.events.IEventDispatcher;
-    
-    /**
-     *  The ViewBaseDataBinding class implements databinding for
-     *  ViewBase instances.  Different classes can have
-     *  different databinding implementation that optimize for
-     *  the different lifecycles.  For example, an item renderer
-     *  databinding implementation can wait to execute databindings
-     *  until the data property is set.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class ViewBaseDataBinding implements IBead
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function ViewBaseDataBinding()
-		{
-			super();
-		}
-        
-        private var _strand:IStrand;
-        
-        /**
-         *  @copy org.apache.flex.core.IBead#strand
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function set strand(value:IStrand):void
-        {
-            _strand = value;
-            IEventDispatcher(_strand).addEventListener("initBindings", initCompleteHandler);
-        }    
-
-        private function initCompleteHandler(event:Event):void
-        {
-            var fieldWatcher:Object;
-            var sb:SimpleBinding;
-            if (!("_bindings" in _strand))
-                return;
-            var bindingData:Array = _strand["_bindings"];
-            var destObject:Object;
-            var n:int = bindingData[0];
-            var bindings:Array = [];
-            var i:int;
-            var index:int = 1;
-            for (i = 0; i < n; i++)
-            {
-                var binding:Object = {};
-                binding.source = bindingData[index++];
-				binding.destFunc = bindingData[index++];
-                binding.destination = bindingData[index++];
-                bindings.push(binding);
-            }
-            var watchers:Object = decodeWatcher(bindingData.slice(index));
-            for (i = 0; i < n; i++)
-            {
-                    binding = bindings[i];
-                if (binding.source is Array)
-                {
-                    if (binding.source[0] == "applicationModel")
-                    {
-                        if (binding.source.length == 2 && binding.destination.length == 2)
-                        {
-                            var destination:IStrand;
-                            // can be simplebinding or constantbinding
-                            var modelWatcher:Object = watchers.watcherMap["applicationModel"];
-                            fieldWatcher = modelWatcher.children.watcherMap[binding.source[1]];
-                            if (fieldWatcher.eventNames is String)
-                            {
-                                sb = new SimpleBinding();
-                                sb.destinationPropertyName = binding.destination[1];
-                                sb.eventName = fieldWatcher.eventNames as String;
-                                sb.sourceID = binding.source[0];
-                                sb.sourcePropertyName = binding.source[1];
-                                sb.setDocument(_strand);
-                                destObject = _strand[binding.destination[0]];                                
-                                destination = destObject as IStrand;
-                                if (destination)
-                                    destination.addBead(sb);
-                                else
-                                {
-                                    if (destObject)
-                                    {
-                                        sb.destination = destObject;
-                                        _strand.addBead(sb);
-                                    }
-                                    else
-                                    {
-                                        deferredBindings[binding.destination[0]] = sb;
-                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                                    }
-                                }
-                            }
-                            else if (fieldWatcher.eventNames == null)
-                            {
-                                var cb:ConstantBinding = new ConstantBinding();
-                                cb.destinationPropertyName = binding.destination[1];
-                                cb.sourceID = binding.source[0];
-                                cb.sourcePropertyName = binding.source[1];
-                                cb.setDocument(_strand);
-                                destObject = _strand[binding.destination[0]];                                
-                                destination = destObject as IStrand;
-                                if (destination)
-                                    destination.addBead(cb);
-                                else
-                                {
-                                    if (destObject)
-                                    {
-                                        sb.destination = destObject;
-                                        _strand.addBead(sb);
-                                    }
-                                    else
-                                    {
-                                        deferredBindings[binding.destination[0]] = sb;
-                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                else if (binding.source is String)
-                {
-                    fieldWatcher = watchers.watcherMap[binding.source];
-                    if (fieldWatcher.eventNames is String)
-                    {
-                        sb = new SimpleBinding();
-                        sb.destinationPropertyName = binding.destination[1];
-                        sb.eventName = fieldWatcher.eventNames as String;
-                        sb.sourcePropertyName = binding.source;
-                        sb.setDocument(_strand);
-                        destObject = _strand[binding.destination[0]];                                
-                        destination = destObject as IStrand;
-                        if (destination)
-                            destination.addBead(sb);
-                        else
-                        {
-                            if (destObject)
-                            {
-                                sb.destination = destObject;
-                                _strand.addBead(sb);
-                            }
-                            else
-                            {
-                                deferredBindings[binding.destination[0]] = sb;
-                                IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    makeGenericBinding(binding, i, watchers);
-                }
-            }
-        }
-
-        private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
-        {
-            var gb:GenericBinding = new GenericBinding();
-            gb.setDocument(_strand);
-            gb.destinationData = binding.destination;
-			gb.destinationFunction = binding.destFunc;
-            gb.source = binding.source;
-            setupWatchers(gb, index, watchers.watchers, null);
-        }
-        
-        private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
-        {
-            var foundWatcher:Boolean = false;
-            
-            var n:int = watchers.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                var watcher:Object = watchers[i];
-                var isValidWatcher:Boolean = false;
-                if (typeof(watcher.bindings) == "number")
-                    isValidWatcher = (watcher.bindings == index);
-                else
-                    isValidWatcher = (watcher.bindings.indexOf(index) != -1);
-                if (isValidWatcher)
-                {
-                    var type:String = watcher.type;
-                    switch (type)
-                    {
-                        case "property":
-                        {
-                            var pw:PropertyWatcher = new PropertyWatcher(this, 
-                                        watcher.propertyName, 
-                                        watcher.eventNames,
-                                        watcher.getterFunction);
-                            watcher.watcher = pw;
-                            if (parentWatcher)
-                                pw.parentChanged(parentWatcher.value);
-                            else
-                                pw.parentChanged(_strand);
-                            if (parentWatcher)
-                                parentWatcher.addChild(pw);
-                            if (watcher.children == null)
-                                pw.addBinding(gb);
-                            foundWatcher = true;
-                            break;
-                        }
-                    }
-                    if (watcher.children)
-                    {
-                        setupWatchers(gb, index, watcher.children.watchers, watcher.watcher);
-                    }
-                }
-            }
-            if (!foundWatcher && parentWatcher == null)
-            {
-                // might be a binding to a function that doesn't have change events
-                // so just force an update
-                gb.valueChanged(null);
-            }
-        }
-        
-        private function decodeWatcher(bindingData:Array):Object
-        {
-            var watcherMap:Object = {};
-            var watchers:Array = [];
-            var n:int = bindingData.length;
-            var index:int = 0;
-            var watcherData:Object;
-            while (index < n)
-            {
-                var watcherIndex:int = bindingData[index++];
-                var type:int = bindingData[index++];
-                switch (type)
-                {
-                    case 0:
-                    {
-                        watcherData = { type: "function" };
-                        watcherData.functionName = bindingData[index++];
-						watcherData.paramFunction = bindingData[index++];
-                        watcherData.eventNames = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        break;
-                    }
-                    case 1:
-					{
-						watcherData = { type: "static" };
-						watcherData.propertyName = bindingData[index++];
-						watcherData.eventNames = bindingData[index++];
-						watcherData.bindings = bindingData[index++];
-						watcherData.getterFunction = bindingData[index++];
-						watcherData.parentObj = bindingData[index++];
-						watcherMap[watcherData.propertyName] = watcherData;
-						break;
-					}
-                    case 2:
-                    {
-                        watcherData = { type: "property" };
-                        watcherData.propertyName = bindingData[index++];
-                        watcherData.eventNames = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        watcherData.getterFunction = bindingData[index++];
-                        watcherMap[watcherData.propertyName] = watcherData;
-                        break;
-                    }
-                    case 3:
-                    {
-                        watcherData = { type: "xml" };
-                        watcherData.propertyName = bindingData[index++];
-                        watcherData.bindings = bindingData[index++];
-                        watcherMap[watcherData.propertyName] = watcherData;
-                        break;
-                    }
-                }
-                watcherData.children = bindingData[index++];
-                if (watcherData.children != null)
-                {
-                    watcherData.children = decodeWatcher(watcherData.children);
-                }
-                watcherData.index = watcherIndex;
-                watchers.push(watcherData);
-            }            
-            return { watchers: watchers, watcherMap: watcherMap };
-        }
-        
-        private var deferredBindings:Object = {};
-        private function deferredBindingsHandler(event:Event):void
-        {
-            for (var p:String in deferredBindings)
-            {
-                if (_strand[p] != null)
-                {
-                    var destination:IStrand = _strand[p] as IStrand;
-                    destination.addBead(deferredBindings[p]);
-                    delete deferredBindings[p];
-                }
-            }
-        }
-        
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
new file mode 100644
index 0000000..0f8195e
--- /dev/null
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
@@ -0,0 +1,338 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.binding
+{
+    import org.apache.flex.binding.ConstantBinding;
+    import org.apache.flex.binding.GenericBinding;
+    import org.apache.flex.binding.PropertyWatcher;
+    import org.apache.flex.binding.SimpleBinding;
+    import org.apache.flex.binding.WatcherBase;
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.events.IEventDispatcher;
+    
+    /**
+     *  The ViewDataBinding class implements databinding for
+     *  View instances.  Different classes can have
+     *  different databinding implementation that optimize for
+     *  the different lifecycles.  For example, an item renderer
+     *  databinding implementation can wait to execute databindings
+     *  until the data property is set.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class ViewDataBinding implements IBead
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function ViewDataBinding()
+		{
+			super();
+		}
+        
+        private var _strand:IStrand;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            IEventDispatcher(_strand).addEventListener("initBindings", initCompleteHandler);
+        }    
+
+        private function initCompleteHandler(event:Event):void
+        {
+            var fieldWatcher:Object;
+            var sb:SimpleBinding;
+            if (!("_bindings" in _strand))
+                return;
+            var bindingData:Array = _strand["_bindings"];
+            var destObject:Object;
+            var n:int = bindingData[0];
+            var bindings:Array = [];
+            var i:int;
+            var index:int = 1;
+            for (i = 0; i < n; i++)
+            {
+                var binding:Object = {};
+                binding.source = bindingData[index++];
+				binding.destFunc = bindingData[index++];
+                binding.destination = bindingData[index++];
+                bindings.push(binding);
+            }
+            var watchers:Object = decodeWatcher(bindingData.slice(index));
+            for (i = 0; i < n; i++)
+            {
+                    binding = bindings[i];
+                if (binding.source is Array)
+                {
+                    if (binding.source[0] == "applicationModel")
+                    {
+                        if (binding.source.length == 2 && binding.destination.length == 2)
+                        {
+                            var destination:IStrand;
+                            // can be simplebinding or constantbinding
+                            var modelWatcher:Object = watchers.watcherMap["applicationModel"];
+                            fieldWatcher = modelWatcher.children.watcherMap[binding.source[1]];
+                            if (fieldWatcher.eventNames is String)
+                            {
+                                sb = new SimpleBinding();
+                                sb.destinationPropertyName = binding.destination[1];
+                                sb.eventName = fieldWatcher.eventNames as String;
+                                sb.sourceID = binding.source[0];
+                                sb.sourcePropertyName = binding.source[1];
+                                sb.setDocument(_strand);
+                                destObject = _strand[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(sb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        sb.destination = destObject;
+                                        _strand.addBead(sb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = sb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                            else if (fieldWatcher.eventNames == null)
+                            {
+                                var cb:ConstantBinding = new ConstantBinding();
+                                cb.destinationPropertyName = binding.destination[1];
+                                cb.sourceID = binding.source[0];
+                                cb.sourcePropertyName = binding.source[1];
+                                cb.setDocument(_strand);
+                                destObject = _strand[binding.destination[0]];                                
+                                destination = destObject as IStrand;
+                                if (destination)
+                                    destination.addBead(cb);
+                                else
+                                {
+                                    if (destObject)
+                                    {
+                                        sb.destination = destObject;
+                                        _strand.addBead(sb);
+                                    }
+                                    else
+                                    {
+                                        deferredBindings[binding.destination[0]] = sb;
+                                        IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                else if (binding.source is String)
+                {
+                    fieldWatcher = watchers.watcherMap[binding.source];
+                    if (fieldWatcher.eventNames is String)
+                    {
+                        sb = new SimpleBinding();
+                        sb.destinationPropertyName = binding.destination[1];
+                        sb.eventName = fieldWatcher.eventNames as String;
+                        sb.sourcePropertyName = binding.source;
+                        sb.setDocument(_strand);
+                        destObject = _strand[binding.destination[0]];                                
+                        destination = destObject as IStrand;
+                        if (destination)
+                            destination.addBead(sb);
+                        else
+                        {
+                            if (destObject)
+                            {
+                                sb.destination = destObject;
+                                _strand.addBead(sb);
+                            }
+                            else
+                            {
+                                deferredBindings[binding.destination[0]] = sb;
+                                IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler);
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    makeGenericBinding(binding, i, watchers);
+                }
+            }
+        }
+
+        private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
+        {
+            var gb:GenericBinding = new GenericBinding();
+            gb.setDocument(_strand);
+            gb.destinationData = binding.destination;
+			gb.destinationFunction = binding.destFunc;
+            gb.source = binding.source;
+            setupWatchers(gb, index, watchers.watchers, null);
+        }
+        
+        private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
+        {
+            var foundWatcher:Boolean = false;
+            
+            var n:int = watchers.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var watcher:Object = watchers[i];
+                var isValidWatcher:Boolean = false;
+                if (typeof(watcher.bindings) == "number")
+                    isValidWatcher = (watcher.bindings == index);
+                else
+                    isValidWatcher = (watcher.bindings.indexOf(index) != -1);
+                if (isValidWatcher)
+                {
+                    var type:String = watcher.type;
+                    switch (type)
+                    {
+                        case "property":
+                        {
+                            var pw:PropertyWatcher = new PropertyWatcher(this, 
+                                        watcher.propertyName, 
+                                        watcher.eventNames,
+                                        watcher.getterFunction);
+                            watcher.watcher = pw;
+                            if (parentWatcher)
+                                pw.parentChanged(parentWatcher.value);
+                            else
+                                pw.parentChanged(_strand);
+                            if (parentWatcher)
+                                parentWatcher.addChild(pw);
+                            if (watcher.children == null)
+                                pw.addBinding(gb);
+                            foundWatcher = true;
+                            break;
+                        }
+                    }
+                    if (watcher.children)
+                    {
+                        setupWatchers(gb, index, watcher.children.watchers, watcher.watcher);
+                    }
+                }
+            }
+            if (!foundWatcher && parentWatcher == null)
+            {
+                // might be a binding to a function that doesn't have change events
+                // so just force an update
+                gb.valueChanged(null);
+            }
+        }
+        
+        private function decodeWatcher(bindingData:Array):Object
+        {
+            var watcherMap:Object = {};
+            var watchers:Array = [];
+            var n:int = bindingData.length;
+            var index:int = 0;
+            var watcherData:Object;
+            while (index < n)
+            {
+                var watcherIndex:int = bindingData[index++];
+                var type:int = bindingData[index++];
+                switch (type)
+                {
+                    case 0:
+                    {
+                        watcherData = { type: "function" };
+                        watcherData.functionName = bindingData[index++];
+						watcherData.paramFunction = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        break;
+                    }
+                    case 1:
+					{
+						watcherData = { type: "static" };
+						watcherData.propertyName = bindingData[index++];
+						watcherData.eventNames = bindingData[index++];
+						watcherData.bindings = bindingData[index++];
+						watcherData.getterFunction = bindingData[index++];
+						watcherData.parentObj = bindingData[index++];
+						watcherMap[watcherData.propertyName] = watcherData;
+						break;
+					}
+                    case 2:
+                    {
+                        watcherData = { type: "property" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.eventNames = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherData.getterFunction = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                    case 3:
+                    {
+                        watcherData = { type: "xml" };
+                        watcherData.propertyName = bindingData[index++];
+                        watcherData.bindings = bindingData[index++];
+                        watcherMap[watcherData.propertyName] = watcherData;
+                        break;
+                    }
+                }
+                watcherData.children = bindingData[index++];
+                if (watcherData.children != null)
+                {
+                    watcherData.children = decodeWatcher(watcherData.children);
+                }
+                watcherData.index = watcherIndex;
+                watchers.push(watcherData);
+            }            
+            return { watchers: watchers, watcherMap: watcherMap };
+        }
+        
+        private var deferredBindings:Object = {};
+        private function deferredBindingsHandler(event:Event):void
+        {
+            for (var p:String in deferredBindings)
+            {
+                if (_strand[p] != null)
+                {
+                    var destination:IStrand = _strand[p] as IStrand;
+                    destination.addBead(deferredBindings[p]);
+                    delete deferredBindings[p];
+                }
+            }
+        }
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Binding/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/resources/basic-manifest.xml b/frameworks/projects/Binding/src/main/resources/basic-manifest.xml
index 5ce9333..4e7193b 100644
--- a/frameworks/projects/Binding/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Binding/src/main/resources/basic-manifest.xml
@@ -23,8 +23,8 @@
 
     <component id="ConstantBinding" class="org.apache.flex.binding.ConstantBinding"/>
     <component id="SimpleBinding" class="org.apache.flex.binding.SimpleBinding"/>
-    <component id="ViewBaseDataBinding" class="org.apache.flex.binding.ViewBaseDataBinding"/>
-    <component id="MXMLBeadViewBaseDataBinding" class="org.apache.flex.binding.MXMLBeadViewBaseDataBinding"/>
+    <component id="ViewDataBinding" class="org.apache.flex.binding.ViewDataBinding"/>
+    <component id="MXMLBeadViewDataBinding" class="org.apache.flex.binding.MXMLBeadViewDataBinding"/>
     <component id="ApplicationDataBinding" class="org.apache.flex.binding.ApplicationDataBinding"/>
     <component id="ContainerDataBinding" class="org.apache.flex.binding.ContainerDataBinding"/>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Core/src/main/flex/org/apache/flex/core/View.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/View.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/View.as
new file mode 100644
index 0000000..2d0f2c4
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/View.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 org.apache.flex.core
+{    
+    /**
+     *  The View class is the class for most views in a FlexJS
+     *  application.  It is generally used as the root tag of MXML
+     *  documents and UI controls and containers are added to it.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class View extends ViewBase
+	{
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as
index 0230e57..7e4b65e 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as
@@ -41,8 +41,7 @@ package org.apache.flex.core
     
     /**
      *  The ViewBase class is the base class for most views in a FlexJS
-     *  application.  It is generally used as the root tag of MXML
-     *  documents and UI controls and containers are added to it.
+     *  application.
      *  
      *  @langversion 3.0
      *  @playerversion Flash 10.2

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Core/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/basic-manifest.xml b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
index c1842df..a196a57 100644
--- a/frameworks/projects/Core/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
@@ -24,7 +24,7 @@
     <component id="Application" class="org.apache.flex.core.Application"/>
     <component id="SimpleCSSValuesImpl" class="org.apache.flex.core.SimpleCSSValuesImpl"/>
     <component id="CSSFontFaceBead" class="org.apache.flex.core.CSSFontFaceBead" />
-    <component id="ViewBase" class="org.apache.flex.core.ViewBase"/>
+    <component id="View" class="org.apache.flex.core.View"/>
     <component id="BrowserScroller" class="org.apache.flex.core.BrowserScroller"/>
     <component id="BrowserResizeHandler" class="org.apache.flex.core.BrowserResizeListener"/>
     <component id="SimpleValuesImpl" class="org.apache.flex.core.SimpleValuesImpl"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Flat/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/defaults.css b/frameworks/projects/Flat/src/main/resources/defaults.css
index 53a91f1..c0f0770 100644
--- a/frameworks/projects/Flat/src/main/resources/defaults.css
+++ b/frameworks/projects/Flat/src/main/resources/defaults.css
@@ -496,7 +496,7 @@ ToolTip
     background-color: #FFFFCC;
 }
 
-ViewBase
+View
 {
     IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
     IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout");
@@ -832,7 +832,7 @@ ToggleTextButton
     IBeadView:  ClassReference("org.apache.flex.html.beads.CSSTextButtonView");
 }
 
-ViewBase
+View
 {
     iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Flat/src/main/resources/flat-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/flat-manifest.xml b/frameworks/projects/Flat/src/main/resources/flat-manifest.xml
index 77f5ffc..1857f54 100644
--- a/frameworks/projects/Flat/src/main/resources/flat-manifest.xml
+++ b/frameworks/projects/Flat/src/main/resources/flat-manifest.xml
@@ -88,12 +88,12 @@
     <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout" lookupOnly="true" />
     <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout" lookupOnly="true" />
     <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout" lookupOnly="true" />
-    <component id="MXMLBeadViewBase" class="org.apache.flex.html.MXMLBeadViewBase" lookupOnly="true" />
+    <component id="MXMLBeadView" class="org.apache.flex.html.MXMLBeadView" lookupOnly="true" />
 
     <component id="Border" class="org.apache.flex.html.supportClasses.Border" lookupOnly="true" />
 
-    <component id="ViewBase" class="org.apache.flex.core.ViewBase" lookupOnly="true" />
-    <component id="ViewBaseDataBinding" class="org.apache.flex.binding.ViewBaseDataBinding" lookupOnly="true" />
+    <component id="View" class="org.apache.flex.core.View" lookupOnly="true" />
+    <component id="ViewDataBinding" class="org.apache.flex.binding.ViewDataBinding" lookupOnly="true" />
     <component id="State" class="org.apache.flex.states.State" lookupOnly="true" />
 
 </componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/HTML/readpom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/readpom.xml b/frameworks/projects/HTML/readpom.xml
new file mode 100644
index 0000000..5311d47
--- /dev/null
+++ b/frameworks/projects/HTML/readpom.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.
+
+-->
+
+
+<project name="readpom" default="main" basedir=".">
+
+     <xmlproperty file="pom.xml" collapseattributes="true"/>
+     <echoproperties />
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index 0834abb..fb0608c 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -167,7 +167,6 @@ internal class HTMLClasses
 	import org.apache.flex.html.supportClasses.DateChooserButton; DateChooserButton;
 	import org.apache.flex.html.supportClasses.GraphicsItemRenderer; GraphicsItemRenderer;
 
-    import org.apache.flex.html.MXMLBeadViewBase; MXMLBeadViewBase;
     import org.apache.flex.html.beads.TitleBarView; TitleBarView;
     import org.apache.flex.html.beads.TitleBarMeasurementBead; TitleBarMeasurementBead;
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as
new file mode 100644
index 0000000..894cf0c
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as
@@ -0,0 +1,317 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.html
+{
+	import org.apache.flex.states.State;
+	
+	import org.apache.flex.core.IBead;
+    import org.apache.flex.core.ILayoutHost;
+    import org.apache.flex.core.IParent;
+	import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IStatesImpl;
+	import org.apache.flex.core.ValuesManager;
+    import org.apache.flex.html.beads.ContainerView;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.ValueChangeEvent;
+	import org.apache.flex.utils.MXMLDataInterpreter;
+
+    [DefaultProperty("mxmlContent")]
+    
+    /**
+     *  The MXMLBeadView class extends ContainerView
+     *  and adds support for databinding and specification
+     *  of children in MXML.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class MXMLBeadView extends ContainerView implements IStrand, ILayoutHost
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function MXMLBeadView()
+		{
+			super();
+		}
+		
+        [Bindable("strandChanged")]
+        /**
+         *  An MXMLBeadView doesn't create its children until it is added to
+         *  the strand.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        override public function set strand(value:IStrand):void
+        {
+            super.strand = value;
+            // each MXML file can also have styles in fx:Style block
+            ValuesManager.valuesImpl.init(this);
+            
+            dispatchEvent(new Event("strandChanged"));  
+            
+            for each (var bead:IBead in beads)
+                addBead(bead);
+            
+            dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
+
+            MXMLDataInterpreter.generateMXMLInstances(this, IParent(value), MXMLDescriptor);
+            
+            dispatchEvent(new Event("initBindings"))
+            dispatchEvent(new Event("initComplete"))
+            dispatchEvent(new Event("childrenAdded"));
+        }
+        
+        [Bindable("__NoChangeEvent__")]
+        /**
+         *  The model object.
+         */
+        public function get model():Object
+        {
+            return _strand["model"];
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.Application#MXMLDescriptor
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get MXMLDescriptor():Array
+        {
+            return null;
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function generateMXMLAttributes(data:Array):void
+        {
+            MXMLDataInterpreter.generateMXMLProperties(this, data);
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var mxmlContent:Array;
+        
+        private var _states:Array;
+        
+        /**
+         *  The array of view states. These should
+         *  be instances of org.apache.flex.states.State.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get states():Array
+        {
+            return _states;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set states(value:Array):void
+        {
+            _states = value;
+            _currentState = _states[0].name;
+            
+            try{
+                if (getBeadByType(IStatesImpl) == null)
+                    addBead(new (ValuesManager.valuesImpl.getValue(this, "iStatesImpl")) as IBead);
+            }
+            //TODO:  Need to handle this case more gracefully
+            catch(e:Error)
+            {
+                COMPILE::AS3
+                {
+                    trace(e.message);                        
+                }
+            }
+            
+        }
+        
+        /**
+         *  <code>true</code> if the array of states
+         *  contains a state with this name.
+         * 
+         *  @param state The state namem.
+         *  @return True if state in state array
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function hasState(state:String):Boolean
+        {
+            for each (var s:State in _states)
+            {
+                if (s.name == state)
+                    return true;
+            }
+            return false;
+        }
+        
+        private var _currentState:String;
+        
+        [Bindable("currentStateChange")]
+        /**
+         *  The name of the current state.
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get currentState():String
+        {
+            return _currentState;   
+        }
+        
+        /**
+         *  @private
+         */
+        public function set currentState(value:String):void
+        {
+            var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
+            _currentState = value;
+            dispatchEvent(event);
+        }
+        
+        private var _transitions:Array;
+        
+        /**
+         *  The array of transitions.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get transitions():Array
+        {
+            return _transitions;   
+        }
+        
+        /**
+         *  @private
+         */
+        public function set transitions(value:Array):void
+        {
+            _transitions = value;   
+        }
+
+        /**
+         *  @copy org.apache.flex.core.Application#beads
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var beads:Array;
+        
+        private var _beads:Array;
+        
+        /**
+         *  @copy org.apache.flex.core.IStrand#addBead()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */        
+        public function addBead(bead:IBead):void
+        {
+            if (!_beads)
+                _beads = [];
+            _beads.push(bead);
+            bead.strand = this;            
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IStrand#getBeadByType()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function getBeadByType(classOrInterface:Class):IBead
+        {
+            for each (var bead:IBead in _beads)
+            {
+                if (bead is classOrInterface)
+                    return bead;
+            }
+            return null;
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IStrand#removeBead()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function removeBead(value:IBead):IBead	
+        {
+            var n:int = _beads.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var bead:IBead = _beads[i];
+                if (bead == value)
+                {
+                    _beads.splice(i, 1);
+                    return bead;
+                }
+            }
+            return null;
+        }
+
+    }
+}
\ No newline at end of file


[19/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - swap COMPILE::AS3 for COMPILE::SWF

Posted by ah...@apache.org.
swap COMPILE::AS3 for COMPILE::SWF


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/70dd87bb
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/70dd87bb
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/70dd87bb

Branch: refs/heads/spark
Commit: 70dd87bb54c8174d681c23773e355efb70255605
Parents: a894f96
Author: Alex Harui <ah...@apache.org>
Authored: Sat Jun 11 06:47:08 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Sat Jun 11 06:47:08 2016 -0700

----------------------------------------------------------------------
 frameworks/asdoc-config.xml                     |  2 +-
 .../projects/BindingJS/.actionScriptProperties  |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/ChartsJS/.actionScriptProperties   |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../CollectionsJS/.actionScriptProperties       |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/CoreJS/.actionScriptProperties     |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/CreateJSJS/.actionScriptProperties |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/DragDropJS/.actionScriptProperties |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/EffectsJS/.actionScriptProperties  |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/FlatJS/.actionScriptProperties     |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../FormattersJS/.actionScriptProperties        |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../GoogleMapsJS/.actionScriptProperties        |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/GraphicsJS/.actionScriptProperties |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/HTML5JS/.actionScriptProperties    |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/HTMLJS/.actionScriptProperties     |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/JQueryJS/.actionScriptProperties   |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/MobileJS/.actionScriptProperties   |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../projects/NetworkJS/.actionScriptProperties  |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../ReflectionJS/.actionScriptProperties        |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../XMLJS/src/main/config/compile-js-config.xml |  2 +-
 .../projects/Binding/.actionScriptProperties    |  2 +-
 frameworks/projects/Binding/build.xml           |  2 +-
 .../flex/binding/ApplicationDataBinding.as      |  2 +-
 .../org/apache/flex/binding/ChainBinding.as     |  2 +-
 .../org/apache/flex/binding/ConstantBinding.as  |  2 +-
 .../apache/flex/binding/ContainerDataBinding.as |  2 +-
 .../org/apache/flex/binding/GenericBinding.as   |  2 +-
 .../flex/binding/MXMLBeadViewDataBinding.as     |  2 +-
 .../org/apache/flex/binding/PropertyWatcher.as  |  2 +-
 .../org/apache/flex/binding/SimpleBinding.as    |  2 +-
 .../org/apache/flex/binding/ViewDataBinding.as  |  2 +-
 .../flex/org/apache/flex/binding/WatcherBase.as |  4 +-
 .../projects/Charts/.actionScriptProperties     |  2 +-
 frameworks/projects/Charts/build.xml            |  2 +-
 .../flex/org/apache/flex/charts/ColumnChart.as  |  2 +-
 .../flex/org/apache/flex/charts/LineChart.as    |  2 +-
 .../flex/org/apache/flex/charts/PieChart.as     |  2 +-
 .../org/apache/flex/charts/StackedBarChart.as   |  2 +-
 .../apache/flex/charts/StackedColumnChart.as    |  2 +-
 .../apache/flex/charts/beads/AxisBaseBead.as    |  2 +-
 .../org/apache/flex/charts/beads/ChartView.as   |  2 +-
 .../DataItemRendererFactoryForSeriesData.as     |  2 +-
 .../org/apache/flex/charts/beads/DataTipBead.as |  2 +-
 .../charts/beads/HorizontalCategoryAxisBead.as  |  2 +-
 .../charts/beads/HorizontalLinearAxisBead.as    |  2 +-
 .../charts/beads/VerticalCategoryAxisBead.as    |  2 +-
 .../flex/charts/beads/VerticalLinearAxisBead.as |  2 +-
 .../flex/charts/beads/layouts/BarChartLayout.as |  2 +-
 .../charts/beads/layouts/ChartBaseLayout.as     |  2 +-
 .../charts/beads/layouts/ColumnChartLayout.as   |  2 +-
 .../layouts/LineChartCategoryVsLinearLayout.as  |  2 +-
 .../layouts/LineChartLinearVsLinearLayout.as    |  2 +-
 .../flex/charts/beads/layouts/PieChartLayout.as |  2 +-
 .../beads/layouts/StackedBarChartLayout.as      |  2 +-
 .../beads/layouts/StackedColumnChartLayout.as   |  2 +-
 .../apache/flex/charts/core/CartesianChart.as   |  2 +-
 .../org/apache/flex/charts/core/ChartBase.as    |  2 +-
 .../org/apache/flex/charts/core/IAxisBead.as    |  2 +-
 .../org/apache/flex/charts/core/IAxisGroup.as   |  2 +-
 .../flex/charts/core/ICartesianChartLayout.as   |  2 +-
 .../flex/org/apache/flex/charts/core/IChart.as  |  2 +-
 .../apache/flex/charts/core/IChartDataGroup.as  |  2 +-
 .../flex/charts/core/IChartItemRenderer.as      |  2 +-
 .../org/apache/flex/charts/core/IChartSeries.as |  2 +-
 .../flex/charts/core/IConnectedItemRenderer.as  |  2 +-
 .../flex/charts/core/IHorizontalAxisBead.as     |  2 +-
 .../flex/charts/core/IVerticalAxisBead.as       |  2 +-
 .../org/apache/flex/charts/core/PolarChart.as   |  2 +-
 .../flex/charts/optimized/SVGBoxItemRenderer.as |  2 +-
 .../flex/charts/optimized/SVGChartAxisGroup.as  |  2 +-
 .../flex/charts/optimized/SVGChartDataGroup.as  |  2 +-
 .../optimized/SVGLineSegmentItemRenderer.as     |  2 +-
 .../charts/optimized/SVGWedgeItemRenderer.as    |  2 +-
 .../flex/charts/supportClasses/BarSeries.as     |  2 +-
 .../charts/supportClasses/ChartAxisGroup.as     |  4 +-
 .../flex/charts/supportClasses/ColumnSeries.as  |  2 +-
 .../supportClasses/ILineSegmentItemRenderer.as  |  2 +-
 .../charts/supportClasses/IWedgeItemRenderer.as |  2 +-
 .../supportClasses/LineSegmentItemRenderer.as   |  2 +-
 .../flex/charts/supportClasses/LineSeries.as    |  2 +-
 .../flex/charts/supportClasses/PieSeries.as     |  2 +-
 .../charts/supportClasses/WedgeItemRenderer.as  |  2 +-
 .../Collections/.actionScriptProperties         |  2 +-
 frameworks/projects/Collections/build.xml       |  2 +-
 .../apache/flex/collections/FlattenedList.as    |  2 +-
 .../org/apache/flex/collections/ICollection.as  |  2 +-
 .../flex/collections/IStringCollection.as       |  2 +-
 .../apache/flex/collections/LazyCollection.as   |  8 +--
 .../collections/converters/IItemConverter.as    |  2 +-
 .../collections/converters/JSONItemConverter.as |  2 +-
 .../flex/collections/parsers/IInputParser.as    |  2 +-
 .../flex/collections/parsers/JSONInputParser.as |  2 +-
 .../projects/Core/.actionScriptProperties       |  2 +-
 frameworks/projects/Core/build.xml              |  2 +-
 .../projects/Core/src/main/flex/CoreClasses.as  | 16 ++---
 .../flex/org/apache/flex/core/Application.as    | 32 +++++-----
 .../org/apache/flex/core/ApplicationBase.as     |  4 +-
 .../apache/flex/core/BrowserResizeListener.as   |  8 +--
 .../org/apache/flex/core/BrowserScroller.as     |  6 +-
 .../flex/org/apache/flex/core/BrowserWindow.as  |  4 +-
 .../org/apache/flex/core/CSSFontFaceBead.as     | 18 +++---
 .../main/flex/org/apache/flex/core/CSSShape.as  |  2 +-
 .../main/flex/org/apache/flex/core/CSSSprite.as |  2 +-
 .../flex/org/apache/flex/core/CSSTextField.as   |  4 +-
 .../flex/org/apache/flex/core/CallLaterBead.as  |  6 +-
 .../flex/org/apache/flex/core/ContainerBase.as  |  2 +-
 .../flex/core/ContainerBaseStrandChildren.as    |  2 +-
 .../org/apache/flex/core/FilledRectangle.as     |  8 +--
 .../org/apache/flex/core/HTMLElementWrapper.as  |  4 +-
 .../flex/org/apache/flex/core/IBorderModel.as   |  2 +-
 .../main/flex/org/apache/flex/core/IChild.as    |  4 +-
 .../flex/org/apache/flex/core/IContainerView.as |  2 +-
 .../flex/org/apache/flex/core/IDataGridModel.as |  2 +-
 .../flex/org/apache/flex/core/IFlexJSElement.as |  2 +-
 .../flex/org/apache/flex/core/ILayoutChild.as   |  2 +-
 .../org/apache/flex/core/IScrollBarModel.as     |  2 +-
 .../main/flex/org/apache/flex/core/IUIBase.as   |  2 +-
 .../org/apache/flex/core/IViewportScroller.as   |  2 +-
 .../main/flex/org/apache/flex/core/ListBase.as  |  2 +-
 .../apache/flex/core/ListBaseStrandChildren.as  |  2 +-
 .../org/apache/flex/core/SimpleApplication.as   |  8 +--
 .../org/apache/flex/core/SimpleCSSValuesImpl.as | 18 +++---
 .../flex/org/apache/flex/core/StageProxy.as     |  2 +-
 .../apache/flex/core/StyleableCSSTextField.as   |  2 +-
 .../main/flex/org/apache/flex/core/UIBase.as    | 62 ++++++++++----------
 .../flex/org/apache/flex/core/UIButtonBase.as   |  2 +-
 .../org/apache/flex/events/ElementEvents.as     |  2 +-
 .../main/flex/org/apache/flex/events/Event.as   |  4 +-
 .../org/apache/flex/events/EventDispatcher.as   |  4 +-
 .../org/apache/flex/events/IEventDispatcher.as  |  4 +-
 .../flex/org/apache/flex/events/MouseEvent.as   |  4 +-
 .../flex/events/utils/IHandlesOriginalEvent.as  |  2 +-
 .../flex/events/utils/MouseEventConverter.as    |  2 +-
 .../src/main/flex/org/apache/flex/geom/Point.as |  4 +-
 .../main/flex/org/apache/flex/geom/Rectangle.as |  4 +-
 .../src/main/flex/org/apache/flex/geom/Size.as  |  2 +-
 .../flex/org/apache/flex/utils/BinaryData.as    | 28 ++++-----
 .../org/apache/flex/utils/CSSBorderUtils.as     |  2 +-
 .../org/apache/flex/utils/CSSContainerUtils.as  |  2 +-
 .../flex/org/apache/flex/utils/EffectTimer.as   | 12 ++--
 .../flex/org/apache/flex/utils/HTMLLoader.as    |  4 +-
 .../main/flex/org/apache/flex/utils/Language.as |  2 +-
 .../apache/flex/utils/MXMLDataInterpreter.as    | 12 ++--
 .../flex/org/apache/flex/utils/MixinManager.as  |  4 +-
 .../flex/org/apache/flex/utils/PNGEncoder.as    |  2 +-
 .../flex/org/apache/flex/utils/PointUtils.as    |  6 +-
 .../main/flex/org/apache/flex/utils/Proxy.as    |  4 +-
 .../org/apache/flex/utils/SolidBorderUtil.as    |  2 +-
 .../flex/org/apache/flex/utils/StringTrimmer.as |  2 +-
 .../main/flex/org/apache/flex/utils/Timer.as    |  4 +-
 .../flex/utils/ViewSourceContextMenuOption.as   |  6 +-
 .../org/apache/flex/utils/dbg/DOMPathUtil.as    |  2 +-
 .../projects/Core/src/test/flex/build.xml       |  2 +-
 .../src/test/flex/flexUnitTests/StrandTester.as |  2 +-
 .../test/flex/flexUnitTests/StrandTesterTest.as |  2 +-
 .../projects/CreateJS/.actionScriptProperties   |  2 +-
 frameworks/projects/CreateJS/build.xml          |  2 +-
 .../org/apache/flex/createjs/Application.as     |  2 +-
 .../flex/org/apache/flex/createjs/CheckBox.as   |  4 +-
 .../flex/org/apache/flex/createjs/Container.as  |  4 +-
 .../main/flex/org/apache/flex/createjs/Label.as |  4 +-
 .../flex/org/apache/flex/createjs/TextButton.as |  4 +-
 .../apache/flex/createjs/core/CreateJSBase.as   |  4 +-
 .../org/apache/flex/createjs/core/UIBase.as     |  2 +-
 .../flex/org/apache/flex/createjs/core/View.as  |  2 +-
 .../org/apache/flex/createjs/graphics/Circle.as |  4 +-
 .../flex/createjs/graphics/GraphicShape.as      |  4 +-
 .../org/apache/flex/createjs/graphics/Rect.as   |  4 +-
 .../flex/org/apache/flex/createjs/tween/Ease.as |  8 +--
 .../org/apache/flex/createjs/tween/Tween.as     |  2 +-
 .../projects/DragDrop/.actionScriptProperties   |  2 +-
 frameworks/projects/DragDrop/build.xml          |  2 +-
 .../main/flex/org/apache/flex/core/DropType.as  |  2 +-
 .../flex/org/apache/flex/events/DragEvent.as    |  8 +--
 .../org/apache/flex/events/DragEventBase.as     |  6 +-
 .../projects/Effects/.actionScriptProperties    |  2 +-
 frameworks/projects/Effects/build.xml           |  2 +-
 .../flex/core/StatesWithTransitionsImpl.as      |  2 +-
 .../org/apache/flex/effects/PlatformWiper.as    |  6 +-
 .../projects/Flat/.actionScriptProperties       |  2 +-
 frameworks/projects/Flat/build.xml              |  2 +-
 .../projects/Flat/src/main/flex/FlatClasses.as  |  2 +-
 .../main/flex/org/apache/flex/flat/CheckBox.as  |  4 +-
 .../flex/org/apache/flex/flat/DropDownList.as   |  4 +-
 .../flex/org/apache/flex/flat/RadioButton.as    |  4 +-
 .../projects/Formatters/.actionScriptProperties |  2 +-
 frameworks/projects/Formatters/build.xml        |  2 +-
 .../src/main/flex/FormattersClasses.as          |  2 +-
 .../flex/org/apache/flex/core/FormatBase.as     |  2 +-
 .../projects/GoogleMaps/.actionScriptProperties |  2 +-
 frameworks/projects/GoogleMaps/build.xml        |  2 +-
 .../src/main/flex/GoogleStubClasses.as          |  2 +-
 .../flex/maps/google/beads/GoogleMapView.as     |  4 +-
 .../flex/maps/google/beads/MapView_original.as  |  4 +-
 .../projects/Graphics/.actionScriptProperties   |  2 +-
 frameworks/projects/Graphics/build.xml          |  2 +-
 .../org/apache/flex/core/graphics/Circle.as     |  6 +-
 .../org/apache/flex/core/graphics/Ellipse.as    |  6 +-
 .../apache/flex/core/graphics/GradientBase.as   | 12 ++--
 .../apache/flex/core/graphics/GradientEntry.as  |  6 +-
 .../apache/flex/core/graphics/GraphicShape.as   | 10 ++--
 .../flex/core/graphics/GraphicsContainer.as     | 16 ++---
 .../flex/org/apache/flex/core/graphics/IFill.as |  8 +--
 .../org/apache/flex/core/graphics/IStroke.as    |  4 +-
 .../apache/flex/core/graphics/LinearGradient.as | 10 ++--
 .../flex/org/apache/flex/core/graphics/Path.as  |  4 +-
 .../flex/org/apache/flex/core/graphics/Rect.as  |  6 +-
 .../org/apache/flex/core/graphics/SolidColor.as |  8 +--
 .../flex/core/graphics/SolidColorStroke.as      |  6 +-
 .../flex/org/apache/flex/core/graphics/Text.as  | 12 ++--
 .../core/graphics/utils/CompoundTransform.as    |  2 +-
 .../projects/HTML/.actionScriptProperties       |  2 +-
 frameworks/projects/HTML/build.xml              |  2 +-
 .../projects/HTML/src/main/flex/HTMLClasses.as  | 28 ++++-----
 .../org/apache/flex/events/ItemAddedEvent.as    |  2 +-
 .../org/apache/flex/events/ItemClickedEvent.as  |  2 +-
 .../org/apache/flex/events/ItemRemovedEvent.as  |  2 +-
 .../main/flex/org/apache/flex/html/Button.as    |  4 +-
 .../main/flex/org/apache/flex/html/CheckBox.as  |  6 +-
 .../src/main/flex/org/apache/flex/html/Label.as | 10 ++--
 .../src/main/flex/org/apache/flex/html/List.as  |  2 +-
 .../flex/org/apache/flex/html/MXMLBeadView.as   |  4 +-
 .../flex/org/apache/flex/html/RadioButton.as    |  6 +-
 .../flex/org/apache/flex/html/SimpleAlert.as    |  2 +-
 .../main/flex/org/apache/flex/html/TextArea.as  |  4 +-
 .../flex/org/apache/flex/html/TextButton.as     |  8 +--
 .../main/flex/org/apache/flex/html/TextInput.as | 10 ++--
 .../org/apache/flex/html/ToggleTextButton.as    |  4 +-
 .../flex/org/apache/flex/html/WebBrowser.as     |  4 +-
 .../accessories/NumericOnlyTextInputBead.as     | 10 ++--
 .../flex/html/accessories/PasswordInputBead.as  |  8 +--
 .../flex/html/accessories/TextPromptBead.as     |  8 +--
 .../flex/html/beads/BackgroundImageBead.as      |  2 +-
 .../org/apache/flex/html/beads/ContainerView.as |  2 +-
 .../apache/flex/html/beads/DataGridLinesBead.as |  2 +-
 .../html/beads/DataProviderChangeNotifier.as    |  2 +-
 .../org/apache/flex/html/beads/ISliderView.as   |  6 +-
 .../org/apache/flex/html/beads/ISpinnerView.as  |  6 +-
 .../flex/html/beads/ImageAndTextButtonView.as   |  2 +-
 .../apache/flex/html/beads/ImageButtonView.as   | 12 ++--
 .../org/apache/flex/html/beads/ImageView.as     | 14 ++---
 .../apache/flex/html/beads/SliderThumbView.as   | 18 +++---
 .../apache/flex/html/beads/SliderTrackView.as   | 18 +++---
 .../apache/flex/html/beads/WebBrowserView.as    |  4 +-
 .../controllers/ItemRendererMouseController.as  | 12 ++--
 .../beads/controllers/SliderMouseController.as  | 14 ++---
 .../beads/controllers/SpinnerMouseController.as |  2 +-
 .../flex/html/beads/layouts/BasicLayout.as      |  2 +-
 .../flex/html/beads/layouts/DataGridLayout.as   |  2 +-
 .../flex/html/beads/layouts/HorizontalLayout.as |  4 +-
 .../flex/html/beads/layouts/TileLayout.as       |  2 +-
 .../html/beads/layouts/VerticalColumnLayout.as  |  2 +-
 .../flex/html/beads/layouts/VerticalLayout.as   |  4 +-
 .../html/beads/models/ListPresentationModel.as  |  2 +-
 .../flex/html/beads/models/ViewportModel.as     |  2 +-
 .../html/supportClasses/ContainerContentArea.as |  2 +-
 .../html/supportClasses/DataItemRenderer.as     |  8 +--
 .../html/supportClasses/GraphicsItemRenderer.as |  2 +-
 .../html/supportClasses/ScrollingViewport.as    | 38 ++++++------
 .../html/supportClasses/StringItemRenderer.as   | 14 ++---
 .../flex/flexUnitTests/DataGridColumnTester.as  |  2 +-
 .../projects/HTML5/.actionScriptProperties      |  2 +-
 frameworks/projects/HTML5/build.xml             |  2 +-
 .../projects/JQuery/.actionScriptProperties     |  2 +-
 frameworks/projects/JQuery/build.xml            |  2 +-
 .../flex/org/apache/flex/jquery/RadioButton.as  |  2 +-
 .../projects/Mobile/.actionScriptProperties     |  2 +-
 frameworks/projects/Mobile/build.xml            |  2 +-
 .../main/flex/org/apache/cordova/Application.as |  2 +-
 .../src/main/flex/org/apache/cordova/Weinre.as  |  6 +-
 .../flex/org/apache/cordova/camera/Camera.as    | 20 +++----
 .../flex/org/apache/flex/mobile/IViewManager.as |  2 +-
 .../org/apache/flex/mobile/IViewManagerView.as  |  2 +-
 .../flex/org/apache/flex/mobile/ManagerBase.as  |  4 +-
 .../apache/flex/mobile/StackedViewManager.as    |  2 +-
 .../org/apache/flex/mobile/TabbedViewManager.as |  2 +-
 .../flex/org/apache/flex/mobile/TitleView.as    |  4 +-
 .../flex/org/apache/flex/mobile/ToggleSwitch.as |  2 +-
 .../org/apache/flex/mobile/ViewManagerBase.as   |  4 +-
 .../flex/mobile/beads/MobileWebBrowserView.as   |  4 +-
 .../flex/mobile/beads/ToggleSwitchView.as       |  2 +-
 .../controllers/ToggleSwitchMouseController.as  |  4 +-
 .../apache/flex/mobile/chrome/NavigationBar.as  |  2 +-
 .../org/apache/flex/mobile/chrome/TabBar.as     |  2 +-
 .../org/apache/flex/mobile/chrome/ToolBar.as    |  2 +-
 .../flex/mobile/models/ViewManagerModel.as      |  2 +-
 .../projects/Network/.actionScriptProperties    |  2 +-
 frameworks/projects/Network/build.xml           |  2 +-
 .../flex/org/apache/flex/net/BinaryUploader.as  | 26 ++++----
 .../main/flex/org/apache/flex/net/HTTPHeader.as |  2 +-
 .../flex/org/apache/flex/net/HTTPService.as     | 26 ++++----
 .../flex/org/apache/flex/net/HTTPServiceBase.as |  6 +-
 .../projects/Reflection/.actionScriptProperties |  2 +-
 frameworks/projects/Reflection/build.xml        |  2 +-
 .../flex/reflection/DefinitionWithMetaData.as   |  2 +-
 .../flex/reflection/MetaDataDefinition.as       |  2 +-
 .../apache/flex/reflection/TypeDefinition.as    | 12 ++--
 .../org/apache/flex/reflection/describeType.as  |  4 +-
 .../flex/reflection/getDefinitionByName.as      |  4 +-
 .../flex/reflection/getQualifiedClassName.as    |  4 +-
 .../reflection/getQualifiedSuperclassName.as    |  4 +-
 frameworks/projects/Storage/build.xml           |  2 +-
 .../apache/flex/storage/IPermanentStorage.as    |  2 +-
 .../flex/storage/events/FileErrorEvent.as       |  2 +-
 .../org/apache/flex/storage/events/FileEvent.as |  2 +-
 .../apache/flex/storage/file/DataInputStream.as | 12 ++--
 .../flex/storage/file/DataOutputStream.as       | 12 ++--
 .../org/apache/flex/storage/file/IDataInput.as  |  2 +-
 .../org/apache/flex/storage/file/IDataOutput.as |  2 +-
 .../org/apache/flex/storage/file/IDataStream.as |  2 +-
 .../org/apache/flex/storage/file/LocalFile.as   |  4 +-
 .../storage/providers/AirStorageProvider.as     | 10 ++--
 .../storage/providers/LocalStorageProvider.as   | 18 +++---
 .../Storage/src/main/resources/defaults.css     |  2 +-
 frameworks/projects/XML/build.xml               |  2 +-
 .../projects/XML/src/main/flex/XMLClasses.as    |  2 +-
 frameworks/projects/pom.xml                     |  2 +-
 334 files changed, 717 insertions(+), 717 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/asdoc-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/asdoc-config.xml b/frameworks/asdoc-config.xml
index c25e1bd..5f696b0 100644
--- a/frameworks/asdoc-config.xml
+++ b/frameworks/asdoc-config.xml
@@ -29,7 +29,7 @@
 
    <compiler>
 
-    <define><name>COMPILE::AS3</name><value>true</value></define>
+    <define><name>COMPILE::SWF</name><value>true</value></define>
     <define><name>COMPILE::JS</name><value>false</value></define>
     <define><name>CONFIG::debug</name><value>false</value></define>
     <define><name>CONFIG::release</name><value>true</value></define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/BindingJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/BindingJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/BindingJS/.actionScriptProperties
index f157414..6a92208 100644
--- a/frameworks/js/FlexJS/projects/BindingJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/BindingJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Binding.as" projectUUID="cdd94532-d7f6-40f0-b19c-de82c6e44011" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Binding/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/BindingJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/BindingJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/BindingJS/src/main/config/compile-js-config.xml
index 926202e..b636275 100644
--- a/frameworks/js/FlexJS/projects/BindingJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/BindingJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/ChartsJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/ChartsJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/ChartsJS/.actionScriptProperties
index 0b68bfe..2c079ff 100644
--- a/frameworks/js/FlexJS/projects/ChartsJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/ChartsJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Charts.as" projectUUID="e231d754-8754-4562-8230-026f11fb4e02" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Charts/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/ChartsJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/ChartsJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/ChartsJS/src/main/config/compile-js-config.xml
index 4880d97..fd97528 100644
--- a/frameworks/js/FlexJS/projects/ChartsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/ChartsJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/CollectionsJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CollectionsJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/CollectionsJS/.actionScriptProperties
index f3f7b43..0bbb4b0 100644
--- a/frameworks/js/FlexJS/projects/CollectionsJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/CollectionsJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Collections.as" projectUUID="03015f5b-acd3-493a-a697-34c3d1e91c89" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Collections/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/CollectionsJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CollectionsJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/CollectionsJS/src/main/config/compile-js-config.xml
index ba47903..b7a88ff 100644
--- a/frameworks/js/FlexJS/projects/CollectionsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/CollectionsJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/CoreJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CoreJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/CoreJS/.actionScriptProperties
index 45bd47e..f2db27a 100644
--- a/frameworks/js/FlexJS/projects/CoreJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/CoreJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Core.as" projectUUID="be5b3edf-e159-406d-a592-1f8d39993fea" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Core/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/CoreJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CoreJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/CoreJS/src/main/config/compile-js-config.xml
index 95c6bef..3b775e6 100644
--- a/frameworks/js/FlexJS/projects/CoreJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/CoreJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/CreateJSJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CreateJSJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/CreateJSJS/.actionScriptProperties
index 01f118c..66a67a0 100644
--- a/frameworks/js/FlexJS/projects/CreateJSJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/CreateJSJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="CreateJS.as" projectUUID="7d9af24d-d32d-4e14-b0ee-f799e604c2bc" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/CreateJS/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
index e4888b5..4608d7e 100644
--- a/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/DragDropJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/DragDropJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/DragDropJS/.actionScriptProperties
index b556850..7ed48e0 100644
--- a/frameworks/js/FlexJS/projects/DragDropJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/DragDropJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="DragDrop.as" projectUUID="8736dc4b-71dc-4f2c-9181-5295a09b7c7e" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/DragDrop/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/DragDropJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/DragDropJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/DragDropJS/src/main/config/compile-js-config.xml
index 60f16de..db9d87b 100644
--- a/frameworks/js/FlexJS/projects/DragDropJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/DragDropJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/EffectsJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/EffectsJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/EffectsJS/.actionScriptProperties
index e4b8be6..0c627f6 100644
--- a/frameworks/js/FlexJS/projects/EffectsJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/EffectsJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Effects.as" projectUUID="c7b22e99-ecef-48e3-90be-f80d3bc54d5f" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Effects/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
index e04a4f3..e5abe81 100644
--- a/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/FlatJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/FlatJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/FlatJS/.actionScriptProperties
index 4725648..257fced 100644
--- a/frameworks/js/FlexJS/projects/FlatJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/FlatJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Flat.as" projectUUID="ea1b31ea-3d47-4d1e-8e28-ad149f2397e1" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Flat/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/FlatJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/FlatJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/FlatJS/src/main/config/compile-js-config.xml
index b5d9555..1f67c8e 100644
--- a/frameworks/js/FlexJS/projects/FlatJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/FlatJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/FormattersJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/FormattersJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/FormattersJS/.actionScriptProperties
index 8d580cc..7ac721e 100644
--- a/frameworks/js/FlexJS/projects/FormattersJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/FormattersJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Formatters.as" projectUUID="187f4b92-5fcd-4cee-ac61-58362a56ba1b" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Formatters/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/FormattersJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/FormattersJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/FormattersJS/src/main/config/compile-js-config.xml
index 6918120..cf98e5d 100644
--- a/frameworks/js/FlexJS/projects/FormattersJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/FormattersJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/GoogleMapsJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/GoogleMapsJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/GoogleMapsJS/.actionScriptProperties
index e69d3f6..6e20b55 100644
--- a/frameworks/js/FlexJS/projects/GoogleMapsJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/GoogleMapsJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="GoogleMaps.as" projectUUID="7d907ea6-da29-4573-9741-08d2cf0f85d6" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/GoogleMaps/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/GoogleMapsJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/GoogleMapsJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/GoogleMapsJS/src/main/config/compile-js-config.xml
index 74bd69b..1525e60 100644
--- a/frameworks/js/FlexJS/projects/GoogleMapsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/GoogleMapsJS/src/main/config/compile-js-config.xml
@@ -33,7 +33,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/GraphicsJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/GraphicsJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/GraphicsJS/.actionScriptProperties
index 22b3be7..8280d21 100644
--- a/frameworks/js/FlexJS/projects/GraphicsJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/GraphicsJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Graphics.as" projectUUID="ff3e0531-b7c9-4b0c-9146-05c27a47f837" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Graphics/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/GraphicsJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/GraphicsJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/GraphicsJS/src/main/config/compile-js-config.xml
index de1aef8..d0b74b8 100644
--- a/frameworks/js/FlexJS/projects/GraphicsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/GraphicsJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/HTML5JS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/HTML5JS/.actionScriptProperties b/frameworks/js/FlexJS/projects/HTML5JS/.actionScriptProperties
index c26a32a..975fe4c 100644
--- a/frameworks/js/FlexJS/projects/HTML5JS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/HTML5JS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="HTML5.as" projectUUID="5f79f743-aaab-4427-9842-97bbd3d20850" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/HTML5/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/HTML5JS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/HTML5JS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/HTML5JS/src/main/config/compile-js-config.xml
index 5b5d258..f3fe8ac 100644
--- a/frameworks/js/FlexJS/projects/HTML5JS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/HTML5JS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/HTMLJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/HTMLJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/HTMLJS/.actionScriptProperties
index b05afcd..c523695 100644
--- a/frameworks/js/FlexJS/projects/HTMLJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/HTMLJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="HTML.as" projectUUID="10468643-4626-481f-ba6b-3f035ccbbabb" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/HTML/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
index b2e1b59..0ec549e 100644
--- a/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/JQueryJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/JQueryJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/JQueryJS/.actionScriptProperties
index 3d109d1..a4143ad 100644
--- a/frameworks/js/FlexJS/projects/JQueryJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/JQueryJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="JQuery.as" projectUUID="edaaba36-aa7e-491c-a242-f619527ec54d" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/JQuery/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
index 202c55b..8426df3 100644
--- a/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/MobileJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/MobileJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/MobileJS/.actionScriptProperties
index dbd0fe4..59927ac 100644
--- a/frameworks/js/FlexJS/projects/MobileJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/MobileJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Mobile.as" projectUUID="b4358e31-bd95-4301-a3d3-f0e67881b93b" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Mobile/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/MobileJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/MobileJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/MobileJS/src/main/config/compile-js-config.xml
index 6340b69..56a7eb4 100644
--- a/frameworks/js/FlexJS/projects/MobileJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/MobileJS/src/main/config/compile-js-config.xml
@@ -33,7 +33,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/NetworkJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/NetworkJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/NetworkJS/.actionScriptProperties
index 78bafab..8aa47c4 100644
--- a/frameworks/js/FlexJS/projects/NetworkJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/NetworkJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Network.as" projectUUID="9a67bdd4-1c63-4e33-b469-1af43c3cdf12" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Network/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/NetworkJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/NetworkJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/NetworkJS/src/main/config/compile-js-config.xml
index 58a81f2..aab754f 100644
--- a/frameworks/js/FlexJS/projects/NetworkJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/NetworkJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/ReflectionJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/ReflectionJS/.actionScriptProperties b/frameworks/js/FlexJS/projects/ReflectionJS/.actionScriptProperties
index 480ace2..62138d1 100644
--- a/frameworks/js/FlexJS/projects/ReflectionJS/.actionScriptProperties
+++ b/frameworks/js/FlexJS/projects/ReflectionJS/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Reflection.as" projectUUID="86565b55-be36-439b-a583-877632ea28b7" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,false&#10;-define=COMPILE::JS,true&#10;-load-config=../config/compile-js-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/config" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath>
       <compilerSourcePathEntry kind="1" linkType="1" path="${FLEX_ASJS}/frameworks/projects/Reflection/src/main/flex"/>
     </compilerSourcePath>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
index b790203..36acc8f 100644
--- a/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/StorageJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/StorageJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/StorageJS/src/main/config/compile-js-config.xml
index 95642b5..651ff1c 100644
--- a/frameworks/js/FlexJS/projects/StorageJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/StorageJS/src/main/config/compile-js-config.xml
@@ -33,7 +33,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/js/FlexJS/projects/XMLJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/XMLJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/XMLJS/src/main/config/compile-js-config.xml
index e1c10e7..ea37da6 100644
--- a/frameworks/js/FlexJS/projects/XMLJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/XMLJS/src/main/config/compile-js-config.xml
@@ -29,7 +29,7 @@
 		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 
         <define>
-            <name>COMPILE::AS3</name>
+            <name>COMPILE::SWF</name>
             <value>false</value>
         </define>
         <define>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/.actionScriptProperties b/frameworks/projects/Binding/.actionScriptProperties
index a4b98d1..e38b6c1 100644
--- a/frameworks/projects/Binding/.actionScriptProperties
+++ b/frameworks/projects/Binding/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Binding.as" projectUUID="cdd94532-d7f6-40f0-b19c-de82c6e44011" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/build.xml b/frameworks/projects/Binding/build.xml
index f4fe8f6..7ecb7ba 100644
--- a/frameworks/projects/Binding/build.xml
+++ b/frameworks/projects/Binding/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
index 3902ebc..1838cfd 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
@@ -344,4 +344,4 @@ package org.apache.flex.binding
         }
         
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ChainBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ChainBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ChainBinding.as
index 2ff1c54..de2812c 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ChainBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ChainBinding.as
@@ -212,4 +212,4 @@ class ChainWatcher
             event.oldValue.removeEventListener("valueChange", handler);
         callback();               
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ConstantBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ConstantBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ConstantBinding.as
index 050489a..70cb124 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ConstantBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ConstantBinding.as
@@ -192,4 +192,4 @@ package org.apache.flex.binding
 		}
 		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
index 106fe10..16eca41 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
@@ -390,4 +390,4 @@ package org.apache.flex.binding
         }
         
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/GenericBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/GenericBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/GenericBinding.as
index ef19bcc..72a2b4b 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/GenericBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/GenericBinding.as
@@ -229,4 +229,4 @@ package org.apache.flex.binding
                 valueChanged(null);
         }
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
index 1a12462..7fa00d1 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
@@ -339,4 +339,4 @@ package org.apache.flex.binding
         }
         
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
index 01d9caf..983c8a7 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
@@ -226,4 +226,4 @@ package org.apache.flex.binding
         }
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/SimpleBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/SimpleBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/SimpleBinding.as
index 4dd1da6..7aa3225 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/SimpleBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/SimpleBinding.as
@@ -203,4 +203,4 @@ package org.apache.flex.binding
             }
         }
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
index 0f8195e..d311fcd 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
@@ -335,4 +335,4 @@ package org.apache.flex.binding
         }
         
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/WatcherBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/WatcherBase.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/WatcherBase.as
index 58bee54..a09f1df 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/WatcherBase.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/WatcherBase.as
@@ -253,7 +253,7 @@ package org.apache.flex.binding
                     }
                 }
                 
-                COMPILE::AS3
+                COMPILE::SWF
                 {
                     if (allowedErrors.indexOf(error.errorID) == -1)
                         throw error;                        
@@ -281,7 +281,7 @@ package org.apache.flex.binding
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         public static var allowedErrors:Array = [
             1006, //   Error #1006: Call attempted on an object that is not a function.
             1009, //   Error #1009: null has no properties.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/.actionScriptProperties b/frameworks/projects/Charts/.actionScriptProperties
index 7c5dcff..866d477 100644
--- a/frameworks/projects/Charts/.actionScriptProperties
+++ b/frameworks/projects/Charts/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Charts.as" projectUUID="e231d754-8754-4562-8230-026f11fb4e02" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/build.xml b/frameworks/projects/Charts/build.xml
index fdc915d..d5b0e5e 100644
--- a/frameworks/projects/Charts/build.xml
+++ b/frameworks/projects/Charts/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/ColumnChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/ColumnChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/ColumnChart.as
index c9010b8..99220ef 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/ColumnChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/ColumnChart.as
@@ -45,4 +45,4 @@ package org.apache.flex.charts
 			super();
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/LineChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/LineChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/LineChart.as
index 27ba0a5..76755b5 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/LineChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/LineChart.as
@@ -45,4 +45,4 @@ package org.apache.flex.charts
 			super();
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/PieChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/PieChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/PieChart.as
index 591e2d7..a5c869a 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/PieChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/PieChart.as
@@ -44,4 +44,4 @@ package org.apache.flex.charts
 			super();
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedBarChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedBarChart.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedBarChart.as
index 415b176..dba98e3 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedBarChart.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/StackedBarChart.as
@@ -45,4 +45,4 @@ package org.apache.flex.charts
 			super();
 		}
 	}
-}
\ No newline at end of file
+}


[45/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/controls/ToolTip.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/controls/ToolTip.as
index ab63cd4,0000000..99f6dd3
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/controls/ToolTip.as
+++ b/frameworks/projects/MX/src/main/flex/mx/controls/ToolTip.as
@@@ -1,529 -1,0 +1,529 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.controls
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.text.TextFieldAutoSize;
 +	import flash.text.TextFormat;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.text.TextFormat;			
 +}
 +import mx.core.EdgeMetrics;
 +import mx.core.IFlexDisplayObject;
 +import mx.core.IFlexModuleFactory;
 +import mx.core.IFontContextComponent;
 +import mx.core.IRectangularBorder;
 +import mx.core.IToolTip;
 +import mx.core.IUITextField;
 +import mx.core.UIComponent;
 +import mx.core.UITextField;
 +import mx.core.mx_internal;
 +import mx.styles.ISimpleStyleClient;
 +
 +use namespace mx_internal;
 +
 +//--------------------------------------
 +//  Styles
 +//-------------------------------------- 
 +
 +/*
 +    Note: ToolTip is affected by the following styles:
 +
 +    backgroundColor
 +    borderColor
 +    borderStyle
 +    color
 +    fontFamily
 +    fontSize
 +    fontStyle
 +    fontWidth
 +    paddingBottom
 +    paddingLeft
 +    paddingRight
 +    paddingTop
 +    shadowColor (when borderStyle is "toolTip")
 +    textAlign
 +    textDecoration
 +*/
 +
 +include "../styles/metadata/ContainerBackgroundStyles.as"
 +include "../styles/metadata/BorderStyles.as"
 +include "../styles/metadata/LeadingStyle.as"
 +include "../styles/metadata/PaddingStyles.as"
 +include "../styles/metadata/TextStyles.as"
 +
 +/**
 + *  Radius of component corners.
 + *  
 + *  @default 2
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo, spark, mobile")]
 +
 +/**
 + *  Number of pixels between the container's bottom border and its content area.
 + *  The default value is -1, so the bottom border of the last header
 + *  overlaps the Accordion container's bottom border.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Number of pixels between the container's top border and its content area.
 + *  The default value is -1, so the top border of the first header
 + *  overlaps the Accordion container's top border.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
 +
 +/**
 + * Because this component does not define a skin for the mobile theme, Adobe
 + * recommends that you not use it in a mobile application. Alternatively, you
 + * can define your own mobile skin for the component. For more information,
 + * see <a href="http://help.adobe.com/en_US/flex/mobileapps/WS19f279b149e7481c698e85712b3011fe73-8000.html">Basics of mobile skinning</a>.
 + */
 +[DiscouragedForProfile("mobileDevice")]
 +
 +/**
 + *  The ToolTip control lets you provide helpful information to your users.
 + *  When a user moves the mouse pointer over a graphical component, the ToolTip
 + *  control pops up and displays text that provides information about the
 + *  component.
 + *  You can use ToolTips to guide users as they work with your application
 + *  or customize the ToolTip controls to provide additional functionality.
 + *
 + *  @see mx.managers.ToolTipManager
 + *  @see mx.styles.CSSStyleDeclaration
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ToolTip extends UIComponent implements IToolTip, IFontContextComponent
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    [Inspectable(category="Other")]
 +    
 +    /**
 +     *  Maximum width in pixels for new ToolTip controls.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static var maxWidth:Number = 300;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function ToolTip()
 +    {
 +        super();
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +	        // InteractiveObject variables.
 +	        // Make the ToolTip invisible to the mouse so that it doesn't
 +	        // interfere with the ToolTipManager's mouse-tracking.
 +	        mouseEnabled = false;
 +		}
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  The internal object that draws the border.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal var border:IFlexDisplayObject;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  borderMetrics
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private function get borderMetrics():EdgeMetrics
 +    {
 +        if (border is IRectangularBorder)
 +            return IRectangularBorder(border).borderMetrics;
 +
 +        return EdgeMetrics.EMPTY;
 +    }
 +
 +    //----------------------------------
 +    //  fontContext
 +    //----------------------------------
 +    
 +    /**
 +     *  @private 
 +     */
 +    public function get fontContext():IFlexModuleFactory
 +    {
 +        return moduleFactory;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set fontContext(moduleFactory:IFlexModuleFactory):void
 +    {
 +        this.moduleFactory = moduleFactory;
 +    }
 +    
 +    //----------------------------------
 +    //  text
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the text property.
 +     */
 +    private var _text:String;
 +
 +    /**
 +     *  @private
 +     */
 +    private var textChanged:Boolean;
 +
 +    /**
 +     *  The text displayed by the ToolTip.
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get text():String
 +    {
 +        return _text;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set text(value:String):void
 +    {
 +        _text = value;
 +        textChanged = true;
 +
 +        invalidateProperties();
 +        invalidateSize();
 +        invalidateDisplayList();
 +    }
 +
 +    //----------------------------------
 +    //  textField
 +    //----------------------------------
 +
 +    /**
 +     *  The internal UITextField that renders the text of this ToolTip.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected var textField:IUITextField;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function createChildren():void
 +    {
 +        super.createChildren();
 +
 +        // Create the border/background.
 +        createBorder();
 +
 +        // Create the TextField that displays the tooltip text.
 +        createTextField(-1);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function commitProperties():void
 +    {
 +        super.commitProperties();
 +
 +        // if the font changed and we already created the label, we will need to 
 +        // destory it so it can be re-created, possibly in a different swf context.
 +        if (hasFontContextChanged() && textField != null)
 +        {
 +            var index:int = getChildIndex(DisplayObject(textField));
 +            removeTextField();
 +            createTextField(index);
 +            invalidateSize();
 +            textChanged = true;
 +        }
 +
 +        if (textChanged)
 +        {
 +            // In general, we want the ToolTip style to be applied.
 +            // However, we don't want leftMargin and rightMargin
 +            // of the TextField's TextFormat to be set to the
 +            // paddingLeft and paddingRight of the ToolTip style.
 +            // We want these styles to affect the space between the
 +            // TextField and the border, but not the space within
 +            // the TextField.
 +            var textFormat:TextFormat = textField.getTextFormat();
 +            textFormat.leftMargin = 0;
 +            textFormat.rightMargin = 0;
 +            textField.defaultTextFormat = textFormat;
 +
 +            textField.text = _text;
 +            textChanged = false;
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function measure():void
 +    {
 +        super.measure();
 +
 +        var bm:EdgeMetrics = borderMetrics;
 +
 +        var leftInset:Number = bm.left + getStyle("paddingLeft");
 +        var topInset:Number = bm.top + getStyle("paddingTop");
 +        var rightInset:Number = bm.right + getStyle("paddingRight");
 +        var bottomInset:Number = bm.bottom + getStyle("paddingBottom");
 +
 +        var widthSlop:Number = leftInset + rightInset;
 +        var heightSlop:Number = topInset + bottomInset;
 +
 +        textField.wordWrap = false;
 +
 +        if (textField.textWidth + widthSlop > ToolTip.maxWidth)
 +        {
 +            textField.width = ToolTip.maxWidth - widthSlop;
 +            textField.wordWrap = true;
 +        }
 +
 +        measuredWidth = textField.width + widthSlop;
 +        measuredHeight = textField.height + heightSlop;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function updateDisplayList(unscaledWidth:Number,
 +                                                  unscaledHeight:Number):void
 +    {
 +        super.updateDisplayList(unscaledWidth, unscaledHeight);
 +
 +        var bm:EdgeMetrics = borderMetrics;
 +
 +        var leftInset:Number = bm.left + getStyle("paddingLeft");
 +        var topInset:Number = bm.top + getStyle("paddingTop");
 +        var rightInset:Number = bm.right + getStyle("paddingRight");
 +        var bottomInset:Number = bm.bottom + getStyle("paddingBottom");
 +
 +        var widthSlop:Number = leftInset + rightInset;
 +        var heightSlop:Number = topInset + bottomInset;
 +
 +        border.setActualSize(unscaledWidth, unscaledHeight);
 +
 +        textField.move(leftInset, topInset);
 +        textField.setActualSize(unscaledWidth - widthSlop, unscaledHeight - heightSlop);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function styleChanged(styleProp:String):void
 +    {
 +        // This will take care of doing invalidateSize() if styleProp
 +        // is "styleName" or a registered layout style such as "borderStyle".
 +        super.styleChanged(styleProp);
 +
 +        // However, if the borderStyle changes from "errorTipAbove" to
 +        // "errorTipBelow" or vice versa, the measured size won't change.
 +        // (The pointy part of the skin simply changes from the bottom
 +        // to the top or vice versa.) This means that the LayoutManager
 +        // won't call updateDisplayList() because the size hasn't changed.
 +        // But the TextField has to be repositioned, so we need to
 +        // invalidate the layout as well as the size.
 +        if (styleProp == "styleName" ||
 +            styleProp == "borderSkin" ||
 +            styleProp == null)
 +        {
 +            //if the border skin has changed then rebuild it.
 +            if(border)
 +            {
 +                removeChild(DisplayObject(border));
 +                border = null;
 +            }
 +            
 +            createBorder();         
 +        }
 +        else if (styleProp == "borderStyle")
 +        {
 +            invalidateDisplayList();
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Creates the text field child and adds it as a child of this component.
 +     * 
 +     *  @param childIndex The index of where to add the child.
 +     *  If -1, the text field is appended to the end of the list.
 +     */
 +    mx_internal function createTextField(childIndex:int):void
 +    {
 +        if (!textField)
 +        {
 +            textField = IUITextField(createInFontContext(UITextField));
 +
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +	            textField.autoSize = TextFieldAutoSize.LEFT;
 +	            textField.mouseEnabled = false;
 +	            textField.multiline = true;
 +	            textField.selectable = false;
 +	            textField.wordWrap = false;
 +	            textField.styleName = this;
 +			}
 +			
 +            if (childIndex == -1)
 +                addChild(DisplayObject(textField));
 +            else 
 +                addChildAt(DisplayObject(textField), childIndex);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Removes the text field from this component.
 +     */
 +    mx_internal function removeTextField():void
 +    {
 +        if (textField)
 +        {
 +            removeChild(DisplayObject(textField));
 +            textField = null;
 +        }
 +    }
 +    
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function getTextField():IUITextField
 +    {
 +        return textField;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function createBorder():void
 +    {        
 +        if (!border)
 +        {
 +            var borderClass:Class = getStyle("borderSkin");
 +            
 +            if (borderClass != null)
 +            {
 +                border = new borderClass();
 +                
 +                if (border is ISimpleStyleClient)
 +                    ISimpleStyleClient(border).styleName = this;
 +                
 +                // Add the border behind all the children.
 +                addChildAt(DisplayObject(border), 0);
 +                
 +                invalidateDisplayList();
 +            }
 +        }
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/Application.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/Application.as
index ea036f0,0000000..431e56b
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/Application.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/Application.as
@@@ -1,1905 -1,0 +1,1905 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +    import flash.display.DisplayObject;
 +    import flash.display.InteractiveObject;
 +    import flash.events.ContextMenuEvent;
 +    import flash.events.ErrorEvent;
 +    import flash.events.Event;
 +    import flash.external.ExternalInterface;
 +    import flash.net.URLRequest;
 +    import flash.net.navigateToURL;
 +    import flash.system.Capabilities;
 +    import flash.ui.ContextMenu;
 +    import flash.ui.ContextMenuItem;
 +    import flash.utils.setInterval;        
 +}
 +COMPILE::JS
 +{
 +    import flex.display.DisplayObject;
 +    import flex.display.InteractiveObject;
 +    import flex.events.Event;
 +}
 +
 +import mx.containers.utilityClasses.ApplicationLayout;
 +import mx.effects.EffectManager;
 +import mx.events.FlexEvent;
 +import mx.managers.FocusManager;
 +import mx.managers.IActiveWindowManager;
 +import mx.managers.ILayoutManager;
 +import mx.managers.ISystemManager;
 +import mx.styles.CSSStyleDeclaration;
 +import mx.styles.IStyleClient;
 +import mx.utils.LoaderUtil;
 +import mx.utils.Platform;
 +
 +use namespace mx_internal;
 +
 +//--------------------------------------
 +//  Events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched after the Application has been initialized,
 + *  processed by the LayoutManager, and attached to the display list.
 + * 
 + *  @eventType mx.events.FlexEvent.APPLICATION_COMPLETE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="applicationComplete", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when an HTTPService call fails.
 + * 
 + *  @eventType flash.events.ErrorEvent.ERROR
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="error", type="flash.events.ErrorEvent")]
 +
 +//--------------------------------------
 +//  Styles
 +//--------------------------------------
 +
 +include "../styles/metadata/ModalTransparencyStyles.as";
 +
 +/**
 + *  Specifies the alpha transparency values used for the background gradient fill of the application.
 + *  You should set this to an Array of two numbers.
 + *  Elements 0 and 1 specify the start and end values for an alpha gradient.
 + *
 + *  @default [ 1.0, 1.0 ]
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="backgroundGradientAlphas", type="Array", arrayType="Number", inherit="no", theme="halo")]
 +
 +/**
 + *  Specifies the colors used to tint the background gradient fill of the application.
 + *  You should set this to an Array of two uint values that specify RGB colors.
 + *  Elements 0 and 1 specify the start and end values for a color gradient.
 + *  For a solid-color background, set the same color value for elements 0 and 1.
 + *  A value of <code>undefined</code> means background gradient is generated
 + *  based on the <code>backgroundColor</code> property.
 + *
 + *  @default undefined 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="backgroundGradientColors", type="Array", arrayType="uint", format="Color", inherit="no", theme="halo")]
 +
 +/**
 + *  Number of pixels between the application's bottom border
 + *  and its content area.  
 + *
 + *  @default 24
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Number of pixels between the application's top border
 + *  and its content area. 
 + *
 + *  @default 24
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
 +
 +//--------------------------------------
 +//  Excluded APIs
 +//--------------------------------------
 +
 +[Exclude(name="direction", kind="property")]
 +[Exclude(name="icon", kind="property")]
 +[Exclude(name="label", kind="property")]
 +[Exclude(name="tabIndex", kind="property")]
 +[Exclude(name="toolTip", kind="property")]
 +[Exclude(name="x", kind="property")]
 +[Exclude(name="y", kind="property")]
 +
 +//--------------------------------------
 +//  Other metadata
 +//--------------------------------------
 +
 +/**
 + *  The frameworks must be initialized by SystemManager.
 + *  This factoryClass will be automatically subclassed by any
 + *  MXML applications that don't explicitly specify a different
 + *  factoryClass.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Frame(factoryClass="mx.managers.SystemManager")]
 +
 +[ResourceBundle("core")]
 +
 +[Alternative(replacement="spark.components.Application", since="4.0")]
 +
 +/**
 + *  Flex defines a default, or Application, container that lets you start
 + *  adding content to your application without explicitly defining
 + *  another container.
 + *  Flex creates this container from the <code>&lt;mx:Application&gt;</code>
 + *  tag, the first tag in an MXML application file.
 + *  While you might find it convenient to use the Application container
 + *  as the only  container in your application, in most cases you explicitly
 + *  define at least one more container before you add any controls
 + *  to your application.
 + *
 + *  <p>Applications support a predefined plain style that sets
 + *  a white background, left alignment, and removes all margins.
 + *  To use this style, do the following:</p>
 + *
 + *  <pre>
 + *    &lt;mx:Application styleName="plain" /&gt;
 + *  </pre>
 + *
 + *  <p>This is equivalent to setting the following style attributes:</p>
 + *
 + *  <pre>
 + *    backgroundColor="0xFFFFFF"
 + *    horizontalAlign="left"
 + *    paddingLeft="0"
 + *    paddingTop="0"
 + *    paddingBottom="0"
 + *    paddingRight="0"
 + *  </pre>
 + * 
 + *  @mxml
 + *
 + *  <p>The <code>&lt;mx:Application&gt;</code> tag inherits all of the tag 
 + *  attributes of its superclass and adds the following tag attributes:</p>
 + *
 + *  <pre>
 + *  &lt;mx:Application
 + *    <strong>Properties</strong>
 + *    application="<i>No default</i>"
 + *    controlBar="null"
 + *    frameRate="24"
 + *    historyManagementEnabled="true|false"
 + *    layout="vertical|horizontal|absolute"
 + *    pageTitle"<i>No default</i>"
 + *    preloader="<i>No default</i>"
 + *    resetHistory="false|true"
 + *    scriptRecursionLimit="1000"
 + *    scriptTimeLimit="60"
 + *    usePreloader="true|false"
 + *    viewSourceURL=""
 + *    xmlns:<i>No default</i>="<i>No default</i>"
 + * 
 + *    <strong>Styles</strong> 
 + *    backgroundGradientAlphas="[ 1.0, 1.0 ]"
 + *    backgroundGradientColors="undefined"
 + *    horizontalAlign="center|left|right"
 + *    horizontalGap="8"
 + *    modalTransparency="0.5"
 + *    modalTransparencyBlur="3"
 + *    modalTransparencyColor="#DDDDDD"
 + *    modalTransparencyDuration="100"
 + *    paddingBottom="24"
 + *    paddingTop="24"
 + *    verticalAlign="top|bottom|middle"
 + *    verticalGap="6"
 + *  
 + *    <strong>Events</strong>
 + *    applicationComplete="<i>No default</i>"
 + *    error="<i>No default</i>"
 + *  /&gt;
 + *  </pre>
 + *
 + *  @includeExample examples/SimpleApplicationExample.mxml
 + *  
 + *  @see mx.managers.CursorManager
 + *  @see mx.managers.LayoutManager
 + *  @see mx.managers.SystemManager
 + *  @see flash.events.EventDispatcher
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class Application extends LayoutContainer
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  @private    
 +     */
 +    mx_internal static var useProgressiveLayout:Boolean = false;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  A reference to the top-level application.
 +     *
 +     *  <p>In general, there can be a hierarchy of Application objects,
 +     *  because an Application can use a SWFLoader control to dynamically
 +     *  load another Application.
 +     *  The <code>parentApplication</code> property of a UIComponent can be
 +     *  used to access the sub-Application in which that UIComponent lives,
 +     *  and to walk up the hierarchy to the top-level Application.</p>
 +     *  
 +     *  <p>This property has been deprecated starting in Flex4. Note that this
 +     *  property will still return applications of type mx.core.Application and 
 +     *  mx.core.WindowedApplication as in previous versions. Starting in Flex 4
 +     *  it will also return applications of type spark.components.Application or 
 +     *  spark.components.WindowedApplication.</p>
 +     * 
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    /*
 +     *  Note: here are two reasons that 'application' is typed as Object
 +     *  rather than as Application. The first is for consistency with
 +     *  the 'parentApplication' property of UIComponent. That property is not
 +     *  typed as Application because it would make UIComponent dependent
 +     *  on Application, slowing down compile times not only for SWCs
 +     *  for also for MXML and AS components. Second, if it were typed
 +     *  as Application, authors would not be able to access properties
 +     *  and methods in the <Script> of their <Application> without
 +     *  casting it to their application's subclass, as in
 +     *  MyApplication(Application.application).myAppMethod().
 +     *  Therefore we decided to dispense with strict typing for
 +     *  'application'.
 +     */
 +    [Deprecated(replacement="FlexGlobals.topLevelApplication", since="4.0")]
 +    
 +    public static function get application():Object
 +    {
 +        return FlexGlobals.topLevelApplication;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function Application()
 +    {
 +        UIComponentGlobals.layoutManager = ILayoutManager(
 +            Singleton.getInstance("mx.managers::ILayoutManager"));
 +        UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
 +
 +        if (!FlexGlobals.topLevelApplication)
 +            FlexGlobals.topLevelApplication = this;
 +
 +        super();
 +
 +        layoutObject = new ApplicationLayout();
 +        layoutObject.target = this;
 +        boxLayoutClass = ApplicationLayout;
 +            
 +        showInAutomationHierarchy = true;
 +        // Flex's auto-generated init() override has set the
 +        // documentDescriptor property for the application object.
 +        // We get the id and the creationPolicy, which we want to
 +        // set very early, from that descriptor.
 +        
 +        initResizeBehavior();
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var resizeHandlerAdded:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    private var percentBoundsChanged:Boolean;
 +    
 +    /**
 +     *  @private
 +     *  Placeholder for Preloader object reference.
 +     */
 +    private var preloadObj:Object;
 +
 +    /**
 +     *  @private
 +     *  Used in progressive layout.
 +     */
 +    private var creationQueue:Array = [];
 +
 +    /**
 +     *  @private
 +     *  Used in progressive layout.
 +     */
 +    private var processingCreationQueue:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  The application's view metrics.
 +     */
 +    private var _applicationViewMetrics:EdgeMetrics;
 +    
 +    /**
 +     *  @private
 +     *  This flag indicates whether the width of the Application instance
 +     *  can change or has been explicitly set by the developer.
 +     *  When the stage is resized we use this flag to know whether the
 +     *  width of the Application should be modified.
 +     */
 +    private var resizeWidth:Boolean = true;
 +    
 +    /**
 +     *  @private
 +     *  This flag indicates whether the height of the Application instance
 +     *  can change or has been explicitly set by the developer.
 +     *  When the stage is resized we use this flag to know whether the
 +     *  height of the Application should be modified.
 +     */
 +    private var resizeHeight:Boolean = true;
 +  
 +    /**
 +     *  @private
 +     */ 
 +    private var synchronousResize:Boolean = false;
 +    
 +    /**
 +     * @private
 +     * (Possibly null) reference to the View Source context menu item,
 +     * so that we can update it for runtime localization.
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    private var viewSourceCMI:ContextMenuItem;
 +        
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Compile-time pseudo-properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    // These declarations correspond to the MXML-compile-time attributes
 +    // allowed on the <mx:Application> tag. These attributes affect the MXML
 +    // compiler, but they aren't actually used in the runtime framework.
 +    // The declarations appear here in order to provide metadata about these
 +    // attributes for Flash Builder.
 +
 +    //----------------------------------
 +    //  frameRate
 +    //----------------------------------
 +
 +    [Inspectable(defaultValue="24")]
 +
 +    /**
 +     *    Specifies the frame rate of the application.
 +     *    <p>Note: This property cannot be set by ActionScript code; it must be set in MXML code.</p>
 +     *
 +     *    @default 24
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var frameRate:Number;
 +
 +    //----------------------------------
 +    //  pageTitle
 +    //----------------------------------
 +
 +    /**
 +     *    Specifies a string that appears in the title bar of the browser.
 +     *    This property provides the same functionality as the
 +     *    HTML <code>&lt;title&gt;</code> tag.
 +     *
 +     *    <p>Note: This property cannot be set by ActionScript code; it must be set in MXML code. 
 +     *    The value set in MXML code is designed to be used by a tool to update the HTML templates 
 +     *    provided with the SDK.</p>
 +     *
 +     *    @default ""
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var pageTitle:String;
 +
 +    //----------------------------------
 +    //  preloader
 +    //----------------------------------
 +
 +    [Inspectable(defaultValue="mx.preloaders.DownloadProgressBar")]
 +
 +    /**
 +     *  The application container supports an application preloader that 
 +     *  uses a download progress bar to show the download and initialization progress 
 +     *  of an application SWF file. 
 +     *  By default, the application preloader is enabled. 
 +     *  The preloader tracks how many bytes have been downloaded and continually 
 +     *  updates the progress bar. 
 +     *
 +     *  <p>Use this property to specify the path of a component that 
 +     *  defines a custom progress indicator.
 +     *  To create a custom progress indicator, you typically create a subclass of the 
 +     *  DownloadProgressBar class, or create a subclass of 
 +     *  the flash.display.Sprite class that implements the 
 +     *  mx.preloaders.IPreloaderDisplay interface. </p>
 +     *
 +     *  <p><b>Note:</b> This property cannot be set by ActionScript code; it must be set in MXML code.</p>
 +     *
 +     *  @see mx.preloaders.DownloadProgressBar 
 +     *  @see flash.display.Sprite
 +     *  @see mx.preloaders.IPreloaderDisplay
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var preloader:Object;
 +    
 +    //----------------------------------
 +    //  preloaderChromeColor
 +    //----------------------------------
 +    
 +    [Inspectable(defaultValue="0xCCCCCC", format="Color")]
 +    
 +    /**
 +     *    Specifies the base color used by the default preloader component. This property
 +     *    has the same effect as the <code>chromeColor</code> style used by the Spark skins.
 +     *    Typically this property should be set to the same value as the <code>chromeColor</code>
 +     *    style used by the application.
 +     *    
 +     *    <p>Note: This property cannot be set by ActionScript code; it must be set in MXML code.</p>
 +     * 
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    
 +    /* This property is not directly read by the download progress bar (preloader)
 +     * component. It is here so that it gets picked up by the compiler and included 
 +     * in the info() structure for the generated system manager. The download progress bar
 +     * grabs the value directly from the info() structure. */
 +    public var preloaderChromeColor:uint;
 +
 +    //----------------------------------
 +    //  scriptRecursionLimit
 +    //----------------------------------
 +
 +    [Inspectable(defaultValue="1000")]
 +
 +    /**
 +     *    Specifies the maximum depth of Flash Player or AIR 
 +     *    call stack before the player stops.
 +     *    This is essentially the stack overflow limit.
 +     *    <p>Note: This property cannot be set by ActionScript code; it must be set in MXML code.</p>
 +     *
 +     *    @default 1000
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var scriptRecursionLimit:int;
 +
 +    //----------------------------------
 +    //  scriptTimeLimit
 +    //----------------------------------
 +
 +    [Inspectable(defaultValue="60")]
 +
 +    /**
 +     *    Specifies the maximum duration, in seconds, that an ActionScript
 +     *    event handler can execute before Flash Player or AIR assumes
 +     *    that it is hung, and aborts it.
 +     *    The maximum allowable value that you can set is 60 seconds.
 +     *
 +     *  @default 60
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var scriptTimeLimit:Number;
 +
 +    //----------------------------------
 +    //  usePreloader
 +    //----------------------------------
 +
 +    [Inspectable(defaultValue="true")]
 +
 +    /**
 +     *    If <code>true</code>, specifies to display the application preloader.
 +     *    <p>Note: This property cannot be set by ActionScript code; it must be set in MXML code.</p>
 +     *
 +     *    @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var usePreloader:Boolean;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties (to block metadata from superclasses)
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set enabled(value:Boolean):void
 +    {
 +        super.enabled = value;
 +
 +        // controlBar must be enabled/disabled when this container is.
 +        if (controlBar)
 +            controlBar.enabled = value;
 +    }
 +
 +    //----------------------------------
 +    //  icon
 +    //----------------------------------
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set icon(value:Class):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  id
 +    //----------------------------------
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function get id():String
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +        if (!super.id &&
 +            this == FlexGlobals.topLevelApplication && 
 +            ExternalInterface.available)
 +        {
 +            return ExternalInterface.objectID;
 +        }
 +        }
 +
 +        return super.id;
 +    }
 +
 +    //----------------------------------
 +    //  label
 +    //----------------------------------
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set label(value:String):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  percentHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set percentHeight(value:Number):void
 +    {
 +        if (value != super.percentHeight)
 +        {
 +            super.percentHeight = value;
 +            percentBoundsChanged = true;
 +            invalidateProperties();
 +        }
 +    }
 +    
 +    //----------------------------------
 +    //  percentWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set percentWidth(value:Number):void
 +    {
 +        if (value != super.percentWidth)
 +        {
 +            super.percentWidth = value;
 +            percentBoundsChanged = true;
 +            invalidateProperties();
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  tabIndex
 +    //----------------------------------
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set tabIndex(value:int):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  toolTip
 +    //----------------------------------
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set toolTip(value:String):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  viewMetrics
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Returns the thickness of the edges of the object, including
 +     *  the border, title bar and scroll bars, if visible.
 +     *
 +     *  @return EdgeMetrics object with left, right, top, and bottom
 +     *  properties containing the edge thickness, in pixels.
 +     */
 +    override public function get viewMetrics():EdgeMetrics
 +    {
 +        // This function needs to return an object.
 +        // Rather than allocating a new one each time,
 +        // we'll allocate one once and then hold a reference to it.
 +        if (!_applicationViewMetrics)
 +            _applicationViewMetrics = new EdgeMetrics();
 +        var vm:EdgeMetrics = _applicationViewMetrics;
 +
 +        var o:EdgeMetrics = super.viewMetrics;
 +        
 +        var thickness:Number = getStyle("borderThickness");
 +
 +        vm.left = o.left;
 +        vm.top = o.top;
 +        vm.right = o.right;
 +        vm.bottom = o.bottom;
 +
 +        if (controlBar && controlBar.includeInLayout)
 +        {
 +            vm.top -= thickness;
 +            vm.top += Math.max(controlBar.getExplicitOrMeasuredHeight(),
 +                               thickness);
 +        }
 +
 +        return vm;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  The ApplicationControlBar for this Application. 
 +     *
 +     *  @see mx.containers.ApplicationControlBar
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var controlBar:IUIComponent;
 +
 +    //----------------------------------
 +    //  historyManagementEnabled
 +    //----------------------------------
 +
 +    [Inspectable(defaultValue="true")]
 +
 +    /**
 +     *  If <code>false</code>, the history manager will be disabled.
 +     *  Setting to false is recommended when using the BrowserManager.
 +     *
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var historyManagementEnabled:Boolean = true;
 +
 +    //----------------------------------
 +    //  parameters
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the parameters property.
 +     *  This variable is set in the initialize() method of SystemManager.
 +     */
 +    mx_internal var _parameters:Object;
 +
 +    /**
 +     *  The parameters property returns an Object containing name-value
 +     *  pairs representing the parameters provided to this Application.
 +     *
 +     *  <p>You can use a for-in loop to extract all the names and values
 +     *  from the parameters Object.</p>
 +     *
 +     *  <p>There are two sources of parameters: the query string of the
 +     *  Application's URL, and the value of the FlashVars HTML parameter
 +     *  (this affects only the main Application).</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get parameters():Object
 +    {
 +        return _parameters;
 +    }
 +
 +    //----------------------------------
 +    //  resetHistory
 +    //----------------------------------
 +
 +    [Inspectable(defaultValue="true")]
 +
 +    /**
 +     *  If <code>true</code>, the application's history state is reset
 +     *  to its initial state whenever the application is reloaded.
 +     *  Applications are reloaded when any of the following occurs:
 +     *  <ul>
 +     *    <li>The user clicks the browser's Refresh button.</li>
 +     *    <li>The user navigates to another web page, and then clicks
 +     *    the browser's Back button to return to the Flex application.</li>
 +     *    <li>The user loads a Flex application from the browser's
 +     *    Favorites or Bookmarks menu.</li>
 +     *  </ul>
 +     *
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var resetHistory:Boolean = true;
 +    
 +    //----------------------------------
 +    //  unscaledHeight
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    override mx_internal function setUnscaledHeight(value:Number):void
 +    {
 +        // we invalidate so we can properly add/remove the resize 
 +        // event handler (SDK-12664)
 +        invalidateProperties();
 +        
 +        super.setUnscaledHeight(value);
 +    }
 +    
 +    //----------------------------------
 +    //  unscaledWidth
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    override mx_internal function setUnscaledWidth(value:Number):void
 +    {
 +        // we invalidate so we can properly add/remove the resize 
 +        // event handler (SDK-12664)
 +        invalidateProperties();
 +        
 +        super.setUnscaledWidth(value);
 +    }
 +
 +    //----------------------------------
 +    //  url
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the url property.
 +     *  This variable is set in the initialize() method.
 +     */
 +    mx_internal var _url:String;
 +
 +    /**
 +     *  The URL from which this Application's SWF file was loaded.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get url():String
 +    {
 +        return _url;
 +    }
 +    
 +    //----------------------------------
 +    //  usePadding
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    override mx_internal function get usePadding():Boolean
 +    {
 +        // We use padding for all layouts except absolute.
 +        return layout != ContainerLayout.ABSOLUTE;
 +    }
 +
 +    //----------------------------------
 +    //  viewSourceURL
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for viewSourceURL property.
 +     */
 +    private var _viewSourceURL:String;
 +
 +    /**
 +     *  URL where the application's source can be viewed. Setting this
 +     *  property inserts a "View Source" menu item into the application's
 +     *  default context menu.  Selecting the menu item opens the
 +     *  <code>viewSourceURL</code> in a new window.
 +     *
 +     *  <p>You must set the <code>viewSourceURL</code> property 
 +     *  using MXML, not using ActionScript, as the following example shows:</p>
 +     *
 +     *  <pre>
 +     *    &lt;mx:Application viewSourceURL="http://path/to/source"&gt;
 +     *      ...
 +     *    &lt;/mx:Application&gt;</pre>
 +     *
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get viewSourceURL():String
 +    {
 +        return _viewSourceURL;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set viewSourceURL(value:String):void
 +    {
 +        _viewSourceURL = value;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: DisplayObjectContainer
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function getChildIndex(child:DisplayObject):int
 +    {
 +        // For control bar focus management, return -1 to indicate
 +        // "before the first child".
 +        if (controlBar && child == controlBar)
 +            return -1;
 +
 +        return super.getChildIndex(child);
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: UIComponent
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private 
 +     */
 +    override protected function invalidateParentSizeAndDisplayList():void
 +    {
 +        if (!includeInLayout)
 +            return;
 +
 +        var p:IInvalidating = parent as IInvalidating;
 +        if (!p)
 +        {
 +            if (parent is ISystemManager)
 +                ISystemManager(parent).invalidateParentSizeAndDisplayList();
 +
 +            return;
 +        }
 +
 +        super.invalidateParentSizeAndDisplayList();
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function initialize():void
 +    {
 +        // trace("app initialize app");
 +
 +        var sm:ISystemManager = systemManager;
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +	        _url = LoaderUtil.normalizeURL(root.loaderInfo);
 +	        _parameters = root.loaderInfo.parameters;
 +		}
 +		COMPILE::JS
 +		{
 +			_url = LoaderUtil.normalizeURL(window.location.href);
 +			_parameters = makeParameters(window.location.search);			
 +		}
 +		
 +        initManagers(sm);
 +        _descriptor = null;
 +
 +        if (documentDescriptor)
 +        {
 +            creationPolicy = documentDescriptor.properties.creationPolicy;
 +            if (creationPolicy == null || creationPolicy.length == 0)
 +                creationPolicy = ContainerCreationPolicy.AUTO;
 +
 +            var properties:Object = documentDescriptor.properties;
 +
 +            if (properties.width != null)
 +            {
 +                width = properties.width;
 +                delete properties.width;
 +            }
 +            if (properties.height != null)
 +            {
 +                height = properties.height;
 +                delete properties.height;
 +            }
 +
 +            // Flex auto-generated code has already set up events.
 +            documentDescriptor.events = null;
 +        }
 +
 +        // Setup the default context menu here. This allows the application
 +        // developer to override it in the initialize event, if desired.
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            initContextMenu();
 +        }
 +
 +        super.initialize();
 +
 +        addEventListener(Event.ADDED, addedHandler);
 +        
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +        // Stick a timer here so that we will execute script every 1.5s
 +        // no matter what.
 +        // This is strictly for the debugger to be able to halt.
 +        // Note: isDebugger is true only with a Debugger Player.
 +        if (sm.isTopLevelRoot() && Capabilities.isDebugger == true)
 +            setInterval(debugTickler, 1500);
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    override protected function commitProperties():void
 +    {
 +        super.commitProperties();
 +
 +        resizeWidth = isNaN(explicitWidth);
 +        resizeHeight = isNaN(explicitHeight);
 +        
 +        if (resizeWidth || resizeHeight)
 +        {
 +            resizeHandler(new Event(Event.RESIZE));
 +
 +            if (!resizeHandlerAdded)
 +            {
 +                // weak reference
 +				COMPILE::LATER
 +				{
 +                systemManager.addEventListener(Event.RESIZE, resizeHandler, false, 0, true);
 +				}
 +				systemManager.addEventListener(Event.RESIZE, resizeHandler);
 +				
 +                resizeHandlerAdded = true;
 +            }
 +        }
 +        else
 +        {
 +            if (resizeHandlerAdded)
 +            {
 +                systemManager.removeEventListener(Event.RESIZE, resizeHandler);
 +                resizeHandlerAdded = false;
 +            }
 +        }
 +        
 +        if (percentBoundsChanged)
 +        {
 +            updateBounds();
 +            percentBoundsChanged = false;
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Calculates the preferred, mininum and maximum sizes of the
 +     *  Application. See the <code>UIComponent.measure()</code> method for more
 +     *  information.
 +     *  <p>
 +     *  The <code>measure()</code> method first calls
 +     *  <code>Box.measure()</code> method, then makes sure the
 +     *  <code>measuredWidth</code> and <code>measuredMinWidth</code>
 +     *  are wide enough to display the application's control bar.
 +     */
 +    override protected function measure():void
 +    {
 +        super.measure();
 +
 +        var bm:EdgeMetrics = borderMetrics;
 +
 +        if (controlBar && controlBar.includeInLayout)
 +        {
 +            var controlWidth:Number = controlBar.getExplicitOrMeasuredWidth() +
 +                                      bm.left + bm.right;
 +
 +            measuredWidth = Math.max(measuredWidth, controlWidth);
 +            measuredMinWidth = Math.max(measuredMinWidth, controlWidth);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function updateDisplayList(unscaledWidth:Number,
 +                                                  unscaledHeight:Number):void
 +    {
 +        super.updateDisplayList(unscaledWidth, unscaledHeight);
 +
 +        // Wait to layout the border after all the children
 +        // have been positioned.
 +        createBorder();
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function styleChanged(styleProp:String):void
 +    {
 +        super.styleChanged(styleProp);
 +        
 +        if (styleProp == "backgroundColor" &&
 +            getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))
 +        {
 +            clearStyle("backgroundImage");
 +        }
 +    }   
 +
 +    /**
 +     *  @private
 +     *  Prepare the Object for printing.
 +     *
 +     *  @see mx.printing.FlexPrintJob
 +     */
 +    override public function prepareToPrint(target:IFlexDisplayObject):Object
 +    {
 +        var objData:Object = {};
 +
 +        if (target == this)
 +        {
 +            objData.width = width;
 +            objData.height = height;
 +
 +			COMPILE::LATER
 +			{
 +            objData.verticalScrollPosition = verticalScrollPosition;
 +            objData.horizontalScrollPosition = horizontalScrollPosition;
 +
 +            objData.horizontalScrollBarVisible = (horizontalScrollBar != null);
 +            objData.verticalScrollBarVisible = (verticalScrollBar != null);
 +            
 +            objData.whiteBoxVisible = (whiteBox != null);
 +            
 +            setActualSize(measuredWidth, measuredHeight);
 +
 +            horizontalScrollPosition = 0;
 +            verticalScrollPosition = 0;
 +            
 +            if (horizontalScrollBar)
 +                horizontalScrollBar.visible = false;
 +
 +            if (verticalScrollBar)
 +                verticalScrollBar.visible = false;
 +			}
 +            if (whiteBox)
 +                whiteBox.visible = false;
 +
 +            updateDisplayList(unscaledWidth, unscaledHeight);
 +        }
 +
 +        objData.scrollRect = super.prepareToPrint(target);
 +
 +        return objData;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Should be called after printing is done for post-processing and clean up.
 +     *
 +     *  @see mx.printing.FlexPrintJob
 +     */
 +    override public function finishPrint(obj:Object, target:IFlexDisplayObject):void
 +    {
 +        if (target == this)
 +        {
 +            setActualSize(obj.width, obj.height);
 +
 +			COMPILE::LATER
 +			{
 +            if (horizontalScrollBar)
 +                horizontalScrollBar.visible = obj.horizontalScrollBarVisible;
 +            if (verticalScrollBar)
 +                verticalScrollBar.visible = obj.verticalScrollBarVisible;
 +
 +            if (whiteBox)
 +                whiteBox.visible = obj.whiteBoxVisible;
 +
 +            horizontalScrollPosition = obj.horizontalScrollPosition;
 +            verticalScrollPosition = obj.verticalScrollPosition;
 +			}
 +            updateDisplayList(unscaledWidth, unscaledHeight);
 +        }
 +
 +        // obj is the Object created in prepare to print above, 
 +        // it just stores the scrollRect Rectangle object sent from Container
 +        // obj doesnt have to be DisplayObject
 +        super.finishPrint(obj.scrollRect, target);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Application also handles themeColor defined
 +     *  on the global selector.
 +     */
 +    override mx_internal function initThemeColor():Boolean
 +    {
 +        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
 +            return true;
 +        
 +        var result:Boolean = super.initThemeColor();
 +        
 +        if (!result)
 +        {
 +            var tc:Object;  // Can be number or string
 +            var rc:Number;
 +            var sc:Number;
 +            var globalSelector:CSSStyleDeclaration = 
 +                styleManager.getMergedStyleDeclaration("global");
 +            
 +            if (globalSelector)
 +            {
 +                tc = globalSelector.getStyle("themeColor");
 +                rc = globalSelector.getStyle("rollOverColor");
 +                sc = globalSelector.getStyle("selectionColor");
 +            }
 +            
 +            if (tc && isNaN(rc) && isNaN(sc))
 +            {
 +                setThemeColor(tc);
 +            }
 +            result = true;
 +        }
 +        
 +        return result;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    override protected function resourcesChanged():void
 +    {
 +        super.resourcesChanged();
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        // "View Source" on the context menu
 +        if (viewSourceCMI)
 +        {
 +            viewSourceCMI.caption = resourceManager.getString("core", "viewSource");
 +        }
 +		}
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: Container
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function layoutChrome(unscaledWidth:Number,
 +                                             unscaledHeight:Number):void
 +    {
 +        super.layoutChrome(unscaledWidth, unscaledHeight);
 +
 +        // When Container.autoLayout is false, updateDisplayList()
 +        // is not called, but layoutChrome() is still called.
 +        // In that case, we still need to position the border.
 +        if (!doingLayout)
 +            createBorder();
 +
 +        // Remove the borderThickness from the border metrics,
 +        // since the header and control bar overlap any solid border.
 +        var bm:EdgeMetrics = borderMetrics;
 +        var thickness:Number = getStyle("borderThickness");
 +
 +        var em:EdgeMetrics = new EdgeMetrics();
 +
 +        em.left = bm.left - thickness;
 +        em.top = bm.top - thickness;
 +        em.right = bm.right - thickness;
 +        em.bottom = bm.bottom - thickness;
 +
 +        if (controlBar && controlBar.includeInLayout)
 +        {
 +            if (controlBar is IInvalidating)
 +                IInvalidating(controlBar).invalidateDisplayList();
 +            controlBar.setActualSize(width - (em.left + em.right),
 +                    controlBar.getExplicitOrMeasuredHeight());
 +            controlBar.move(em.left, em.top);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  
 +     *  Container implements addChild in terms of addChildAt. 
 +     */
 +    override public function addChildAt(child:DisplayObject,
 +                                        index:int):DisplayObject
 +    {
 +        super.addChildAt(child, index);
 +        if (child == controlBar && 
 +            "dock" in child && child["dock"] &&
 +            "resetDock" in controlBar)
 +        {
 +            controlBar["resetDock"](true);
 +        }
 +        
 +        return child;
 +    }
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  Container implements removeChildAt in terms of removeChild.
 +     */
 +    override public function removeChild(child:DisplayObject):DisplayObject
 +    {
 +        if (child == controlBar && 
 +            "dock" in child && child["dock"])
 +        {
 +            dockControlBar(IUIComponent(child), false);
 +        }
 +        
 +        return super.removeChild(child);
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  This is here so we get the this pointer set to Application.
 +     */
 +    private function debugTickler():void
 +    {
 +        // We need some bytes of code in order to have a place to break.
 +        var i:int = 0;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function initManagers(sm:ISystemManager):void
 +    {
 +        if (sm.isTopLevel())
 +        {
 +            focusManager = new FocusManager(this);
 +            var awm:IActiveWindowManager = 
 +                IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
 +            if (awm)
 +                awm.activate(this);
 +            else
 +                focusManager.activate();
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Disable all the built-in items except "Print...".
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    private function initContextMenu():void
 +    {
 +        // context menu already set
 +        // nothing to init
 +        if (flexContextMenu != null)
 +        {
 +            // make sure we set it back on systemManager b/c it may have been overridden by now
 +            if (systemManager is InteractiveObject)
 +                InteractiveObject(systemManager).contextMenu = contextMenu;
 +            return;
 +        }
 +        
 +        var defaultMenu:ContextMenu = new ContextMenu();
 +        defaultMenu.hideBuiltInItems();
 +        defaultMenu.builtInItems.print = true;
 +
 +        if (_viewSourceURL)
 +        {
 +            // don't worry! this gets updated in resourcesChanged()
 +            const caption:String = resourceManager.getString("core", "viewSource");
 +            
 +            viewSourceCMI = new ContextMenuItem(caption, true);
 +            viewSourceCMI.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);
 +            
 +            // Append custom option, validating customItems first as in the 
 +            // mobile context this is null.
 +            if (defaultMenu.customItems)
 +                defaultMenu.customItems.push(viewSourceCMI);
 +        }
 +
 +        contextMenu = defaultMenu;
 +        
 +        if (systemManager is InteractiveObject)
 +            InteractiveObject(systemManager).contextMenu = defaultMenu;
 +    }
 +
 +    /**
 +     *  Add a container to the Application's creation queue.
 +     *
 +     *  <p>Use this mechanism to instantiate and draw the contents
 +     *  of a container in an ordered manner.
 +     *  The container should have the <code>creationPolicy</code> property
 +     *  set to <code>"none"</code> prior to calling this function.</p>
 +     *
 +     *  @param id The id of the container to add to the queue or a 
 +     *  pointer to the container itself
 +     *
 +     *  @param preferredIndex (optional) A positive integer that determines
 +     *  the container's position in the queue relative to the other
 +     *  containers presently in the queue.
 +     *
 +     *  @param callbackFunc This parameter is ignored.
 +     *
 +     *  @param parent This parameter is ignored.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function addToCreationQueue(id:Object, preferredIndex:int = -1,
 +                                       callbackFunc:Function = null,
 +                                       parent:IFlexDisplayObject = null):void
 +    {
 +        //trace("App.addToCreationQueue id",id,"index",preferredIndex,"parent",parent);
 +
 +        var queueLength:int = creationQueue.length;
 +        var queueObj:Object = {};
 +        var insertedItem:Boolean = false;
 +
 +        queueObj.id = id;
 +        queueObj.parent = parent;
 +        queueObj.callbackFunc = callbackFunc;
 +        queueObj.index = preferredIndex;
 +
 +        //trace("addToCreationQueue id",id,"index",queueObj.index,"parent",queueObj.parent,"nestLevel",queueObj.parent.nestLevel,"initialized",initialized);
 +
 +        var insertIndex:int;
 +        var pointerIndex:int;
 +        var pointerLevel:int;
 +
 +        // Find out where to place this item
 +        for (var i:int = 0; i < queueLength; i++)
 +        {
 +            pointerIndex = creationQueue[i].index;
 +            pointerLevel = creationQueue[i].parent ? creationQueue[i].parent.nestLevel : 0;
 +
 +            /*
 +            trace("addToCreationQueue queueItem",queueItemPointer.id,"queueItem.level",pointerLevel,"obj.level",queueObj.parent.nestLevel,
 +                    "queueItem.index",pointerIndex,"obj.index",queueObj.index);
 +            */
 +            // If our new item has a preferredIndex
 +            if (queueObj.index != -1)
 +            {
 +                // Place at index i if the queued index is -1 or if the new item's index is before the queued index
 +                if (pointerIndex == -1 || queueObj.index < pointerIndex)
 +                {
 +                    insertIndex = i;
 +                    insertedItem = true;
 +                    break;
 +                }
 +            }
 +            else
 +            {
 +                // Place at index i if queued index is -1 and the new item is deeper in the component tree
 +                // than the queued item. (Inner-most components should reveal first)
 +                var parentLevel:int = queueObj.parent ? queueObj.parent.nestLevel : 0;
 +                if (pointerIndex == -1 && pointerLevel < parentLevel)
 +                {
 +                    insertIndex = i;
 +                    insertedItem = true;
 +                    break;
 +                }
 +            }
 +        }
 +
 +        if (!insertedItem)
 +        {
 +            creationQueue.push(queueObj); // Just add it to the end of the queue
 +            insertedItem = true;
 +        }
 +        else
 +        {
 +            creationQueue.splice(insertIndex, 0, queueObj); // Insert into a specific place in the queue
 +        }
 +
 +        //printCreationQueue();
 +
 +        // Check if we need to trigger queue processing
 +        if (initialized && !processingCreationQueue)
 +        {
 +            //trace("App.addToCreationQueue KICKING the queue processer");
 +            doNextQueueItem();
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function doNextQueueItem(event:FlexEvent = null):void
 +    {
 +        processingCreationQueue = true;
 +
 +        Application.useProgressiveLayout = true;
 +
 +        // The doNextQueueItem function is usually called
 +        // when a creationComplete event is dispatched.
 +        // Wait for other creationComplete listeners to fire
 +        // before we start processing the next item,
 +        // in case one of those listeners plays an effect.
 +        callLater(processNextQueueItem);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function processNextQueueItem():void
 +    {
 +        if (EffectManager.effectsPlaying.length > 0)
 +        {
 +            // Wait for effects to finish playing before processing the
 +            // next item in the queue.
 +            callLater(processNextQueueItem);
 +        }
 +        else if (creationQueue.length > 0)
 +        {
 +            //trace("processNextQueueItem START length", creationQueue.length);
 +            //printCreationQueue();
 +
 +            var queueItem:Object = creationQueue.shift();
 +            try
 +            {
 +                var nextChild:IUIComponent = (queueItem.id is String
 +                                              ? document[queueItem.id]
 +                                              : queueItem.id);
 +                if (nextChild is Container)
 +                    Container(nextChild).createComponentsFromDescriptors(true);
 +                if (nextChild is Container && 
 +                        Container(nextChild).creationPolicy == ContainerCreationPolicy.QUEUED)
 +                    doNextQueueItem();
 +                else
 +                    nextChild.addEventListener("childrenCreationComplete", doNextQueueItem);
 +            }
 +            catch(e:Error)
 +            {
 +                //trace("Exception in processNextQueue",e);
 +                // Can't find the id in the document. Just move on to the next item.
 +                processNextQueueItem();
 +            }
 +
 +            //trace("processNextQueueItem id", queueItem. id, "index", queueItem. index);
 +        }
 +        else
 +        {
 +            processingCreationQueue = false;
 +            Application.useProgressiveLayout = false;
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function printCreationQueue():void
 +    {
 +        var msg:String = "";
 +
 +        var n:Number = creationQueue.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var child:Object = creationQueue[i];
 +            msg += " [" + i + "] " + child.id + " " + child.index;
 +        }
 +
 +        //trace("creationQueue =>" + msg);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function setControlBar(newControlBar:IUIComponent):void
 +    {
 +        if (newControlBar == controlBar)
 +            return;
 +
 +        if (controlBar && controlBar is IStyleClient)
 +        {
 +            IStyleClient(controlBar).clearStyle("cornerRadius");
 +            IStyleClient(controlBar).clearStyle("docked");
 +        }
 +
 +        controlBar = newControlBar;
 +        if (controlBar && controlBar is IStyleClient)
 +        {
 +            IStyleClient(controlBar).setStyle("cornerRadius", 0);
 +            IStyleClient(controlBar).setStyle("docked", true);
 +        }
 +
 +        invalidateSize();
 +        invalidateDisplayList();
 +        invalidateViewMetricsAndPadding();
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function dockControlBar(controlBar:IUIComponent,
 +            dock:Boolean):void
 +    {
 +        if (dock)
 +        {
 +            try
 +            {
 +                removeChild(DisplayObject(controlBar));
 +            }
 +            catch(e:Error)
 +            {
 +                return;
 +            }
 +
 +            rawChildren.addChildAt(DisplayObject(controlBar), firstChildIndex);
 +            setControlBar(controlBar);
 +        }
 +        else // undock
 +        {
 +            try
 +            {
 +                rawChildren.removeChild(DisplayObject(controlBar));
 +            }
 +            catch(e:Error)
 +            {
 +                return;
 +            }
 +
 +            setControlBar(null);
 +            addChildAt(DisplayObject(controlBar), 0);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Check to see if we're able to synchronize our size with the stage
 +     *  immediately rather than deferring (dependent on WATSON 2200950).
 +     */
 +    private function initResizeBehavior():void
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +        var version:Array = Capabilities.version.split(' ')[1].split(',');
 +        
 +		synchronousResize = (parseFloat(version[0]) > 10 ||
 +			(parseFloat(version[0]) == 10 && parseFloat(version[1]) >= 1)) && !Platform.isAir;
 +        }
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *   Called after all children are drawn.
 +     */
 +    private function addedHandler(event:Event):void
 +    {
 +        //trace("creationComplete +++++++++ check if queue has any items", creationQueue.length, "initialized", initialized);
 +        if (event.target == this && creationQueue.length > 0)
 +            doNextQueueItem();
 +    }
 +
 +    /**
 +     *  @private 
 +     *  Triggered by a resize event of the stage.
 +     *  Sets the new width and height.
 +     *  After the SystemManager performs its function,
 +     *  it is only necessary to notify the children of the change.
 +     */
 +    private function resizeHandler(event:Event):void
 +    {
 +        // If we're already due to update our bounds on the next
 +        // commitProperties pass, avoid the redundancy.
 +        if (!percentBoundsChanged)
 +        {
 +            updateBounds();
 +            
 +            // Update immediately when stage resizes so that we may appear 
 +            // in synch with the stage rather than visually "catching up".
 +            if (synchronousResize) 
 +                UIComponentGlobals.layoutManager.validateNow();
 +        }
 +    }   
 +
 +    /**
 +     *  @private
 +     *  Called when the "View Source" item in the application's context menu is
 +     *  selected.
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    protected function menuItemSelectHandler(event:Event):void
 +    {
 +        navigateToURL(new URLRequest(_viewSourceURL), "_blank");
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Sets the new width and height after the Stage has resized
 +     *  or when percentHeight or percentWidth has changed.
 +     */
 +    private function updateBounds():void
 +    {
 +        // When user has not specified any width/height,
 +        // application assumes the size of the stage.
 +        // If developer has specified width/height,
 +        // the application will not resize.
 +        // If developer has specified percent width/height,
 +        // application will resize to the required value
 +        // based on the current SystemManager's width/height.
 +        // If developer has specified min/max values,
 +        // then application will not resize beyond those values.
 +        
 +        var w:Number;
 +        var h:Number
 +        
 +        if (resizeWidth)
 +        {
 +            if (isNaN(percentWidth))
 +            {
 +                w = DisplayObject(systemManager).width;
 +            }
 +            else 
 +            {
 +                super.percentWidth = Math.max(percentWidth, 0);
 +                super.percentWidth = Math.min(percentWidth, 100);
 +                
 +                if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
 +                    w = percentWidth * DisplayObject(systemManager).width/100;
 +                else
 +                    w = percentWidth * screen.width/100;
 +            }
 +            
 +            if (!isNaN(explicitMaxWidth))
 +                w = Math.min(w, explicitMaxWidth);
 +            
 +            if (!isNaN(explicitMinWidth))
 +                w = Math.max(w, explicitMinWidth);
 +        }
 +        else
 +        {
 +            w = width;
 +        }
 +        
 +        if (resizeHeight)
 +        {
 +            if (isNaN(percentHeight))
 +            {
 +                h = DisplayObject(systemManager).height;
 +            }
 +            else
 +            {
 +                super.percentHeight = Math.max(percentHeight, 0);
 +                super.percentHeight = Math.min(percentHeight, 100);
 +                
 +                if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
 +                    h = percentHeight * DisplayObject(systemManager).height/100;
 +                else
 +                    h = percentHeight * screen.height/100;
 +            }
 +            
 +            if (!isNaN(explicitMaxHeight))
 +                h = Math.min(h, explicitMaxHeight);
 +            
 +            if (!isNaN(explicitMinHeight))
 +                h = Math.max(h, explicitMinHeight);
 +        }
 +        else
 +        {
 +            h = height;
 +        }
 +        
 +        if (w != width || h != height)
 +        {
 +            invalidateProperties();
 +            invalidateSize();
 +        }
 +        
 +        setActualSize(w, h);
 +        
 +        invalidateDisplayList();      
 +    }
 +	
 +	COMPILE::JS
 +	private function makeParameters(url:String):Object
 +	{
 +		if (url == null || url.length == 0)
 +			return {};
 +		
 +		url = url.substring(1); // remove leading ?
 +		var parts:Array = url.split("&");
 +		var parms:Object = {};
 +		for each (var part:String in parts)
 +		{
 +			var subParts:Array = part.split("=");
 +			parms[subParts[0]] = subParts[1];
 +		}
 +		return parms;
 +	}
 +}
 +
 +}


[22/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - tune the launch scripts

Posted by ah...@apache.org.
tune the launch scripts


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

Branch: refs/heads/spark
Commit: e1f008094279996310f8ab5d358ffa251e92d8a3
Parents: b86f09bd
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jun 14 11:37:27 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jun 14 11:37:38 2016 -0700

----------------------------------------------------------------------
 .../Convert New Flex Project to FlexJS MVC Project.launch      | 4 +++-
 .../Convert New Flex Project to FlexJS Project.launch          | 6 ++++--
 ide/flashbuilder/FlexJS (Cordova Build).launch                 | 5 +++--
 ide/flashbuilder/FlexJS (Cordova Run).launch                   | 5 +++--
 4 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e1f00809/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch b/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch
index 98b6498..8f682af 100644
--- a/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch	
+++ b/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch	
@@ -1,7 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
+<listAttribute key='org.eclipse.debug.ui.favoriteGroups'>
+<listEntry value='org.eclipse.ui.externaltools.launchGroup'/>
+</listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
 <mapAttribute key="org.eclipse.debug.core.environmentVariables">
 <mapEntry key="ANT_HOME" value="/Applications/Adobe Flash Builder 4.7/eclipse/plugins/org.apache.ant_1.8.2.v20110505-1300"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e1f00809/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch b/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch
index 0224b51..6d52970 100644
--- a/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch	
+++ b/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch	
@@ -1,7 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
+<listAttribute key='org.eclipse.debug.ui.favoriteGroups'>
+<listEntry value='org.eclipse.ui.externaltools.launchGroup'/>
+</listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
 <mapAttribute key="org.eclipse.debug.core.environmentVariables">
 <mapEntry key="PATH" value="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"/>
@@ -12,6 +14,6 @@
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_HIDE_INTERNAL_TARGETS" value="true"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$FLEXJS_HOME/ide/flashbuilder/antscripts.xml"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DprojectDir="&quot;{project_loc}&quot;"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DprojectDir=&quot;{project_loc}&quot;"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e1f00809/ide/flashbuilder/FlexJS (Cordova Build).launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/FlexJS (Cordova Build).launch b/ide/flashbuilder/FlexJS (Cordova Build).launch
index f7223d1..c7e64af 100644
--- a/ide/flashbuilder/FlexJS (Cordova Build).launch	
+++ b/ide/flashbuilder/FlexJS (Cordova Build).launch	
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
+<listAttribute key='org.eclipse.debug.ui.favoriteGroups'>
+<listEntry value='org.eclipse.ui.externaltools.launchGroup'/>
+</listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
 <mapAttribute key="org.eclipse.debug.core.environmentVariables">
 <mapEntry key="PATH" value="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"/>
 </mapAttribute>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 8 (MacOS X Default)"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e1f00809/ide/flashbuilder/FlexJS (Cordova Run).launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/FlexJS (Cordova Run).launch b/ide/flashbuilder/FlexJS (Cordova Run).launch
index a71cdee..e87f8f3 100644
--- a/ide/flashbuilder/FlexJS (Cordova Run).launch	
+++ b/ide/flashbuilder/FlexJS (Cordova Run).launch	
@@ -1,14 +1,15 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
+<listAttribute key='org.eclipse.debug.ui.favoriteGroups'>
+<listEntry value='org.eclipse.ui.externaltools.launchGroup'/>
+</listAttribute><listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
 <mapAttribute key="org.eclipse.debug.core.environmentVariables">
 <mapEntry key="ANT_HOME" value="/Applications/Adobe Flash Builder 4.7/eclipse/plugins/org.apache.ant_1.8.2.v20110505-1300"/>
 <mapEntry key="PATH" value="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"/>
 </mapAttribute>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 8 (MacOS X Default)"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>


[46/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintRow.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintRow.as
index 4dc7773,0000000..a89c385
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintRow.as
+++ b/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintRow.as
@@@ -1,521 -1,0 +1,521 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.containers.utilityClasses
 +{	
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.events.Event;
 +	import flash.events.EventDispatcher;
 +}
 +COMPILE::JS
 +{
 +	import org.apache.flex.events.Event;
 +	import org.apache.flex.events.EventDispatcher;
 +}
 +import mx.core.IInvalidating;
 +import mx.core.mx_internal;
 +import mx.core.IMXMLObject;
 +
 +use namespace mx_internal;
 +
 +//--------------------------------------
 +//  Excluded APIs
 +//--------------------------------------
 +[Exclude(name="container", kind="property")]
 +	
 +/**
 + *  ConstraintRow class partitions an absolutely
 + *  positioned container in the horizontal plane. 
 + * 
 + *  ConstraintRow instances have 3 sizing options: fixed, percentage,  
 + *  and content. These options dictate the position of the constraint row, 
 + *  the amount of space the constraint row takes in the container, and 
 + *  how the constraint row deals with a change in the size of the container. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ConstraintRow extends EventDispatcher implements IMXMLObject
 +{
 +	include "../../core/Version.as";
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  Constructor.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function ConstraintRow()
 +	{
 +		super();
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Variables
 +	//
 +	//--------------------------------------------------------------------------
 +	mx_internal var contentSize:Boolean = false;
 +	
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +    //----------------------------------
 +    //  baseline
 +    //----------------------------------
 +        
 +    /**
 +     *  @private
 +     *  Storage for the baseline property.
 +     */
 +    private var _baseline:Object = "maxAscent:0";
 +    [Bindable("baselineChanged")]
 +    [Inspectable(category="General")]
 +    
 +    /**
 +     *  Number that specifies the baseline of the ConstraintRow instance, in pixels,
 +     *  either relative to the top edge of the row or to the max ascent of the 
 +     *  elements contained in this row.
 +     * 
 +     *  @default "maxAscent:0"
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get baseline():Object
 +    {
 +        return _baseline;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set baseline(value:Object):void
 +    {
 +        if (_baseline != value)
 +        {
 +            _baseline = value;
 +            
 +            if (container)
 +            {
 +                container.invalidateSize();
 +                container.invalidateDisplayList();
 +            }
 +            dispatchEvent(new Event("baselineChanged"));
 +        }
 +    }
 +    
 +	//----------------------------------
 +    //  container
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _container:IInvalidating;
 +
 +    /**
 +     *  The container being partitioned by this ConstraintRow instance.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get container():IInvalidating
 +    {
 +        return _container;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set container(value:IInvalidating):void
 +    {
 +        _container = value;
 +    }
 +	
 +	//----------------------------------
 +    //  height
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the height property.
 +     */
 +    mx_internal var _height:Number;
 +	[Bindable("heightChanged")]
 +    [Inspectable(category="General")]
 +    [PercentProxy("percentHeight")]
 +
 +    /**
 +     *  Number that specifies the height of the ConstraintRow instance, in pixels,
 +     *  in the parent's coordinates.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get height():Number
 +    {
 +        return _height;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set height(value:Number):void
 +    {
 +		if (explicitHeight != value)
 +    	{
 +    		explicitHeight = value;
 +    		if (_height != value)
 +    		{
 +    			_height = value;
 +                if (!isNaN(_height))
 +                    contentSize = false;
 +    			if (container)
 +    			{
 +    				container.invalidateSize();
 +    				container.invalidateDisplayList();
 +    			}
 +    			dispatchEvent(new Event("heightChanged"));
 +    		}
 +    	}
 +    }
 +	
 +	//----------------------------------
 +    //  explicitHeight
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the explicitHeight property.
 +     */
 +    
 +    private var _explicitHeight:Number;
 +    [Inspectable(environment="none")]
 +    [Bindable("explicitHeightChanged")]
 +    
 +    /**
 +     *  Number that specifies the explicit height of the 
 +     *  ConstraintRow instance, in pixels, in the ConstraintRow 
 +     *  instance's coordinates.
 +     *
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get explicitHeight():Number
 +    {
 +    	return _explicitHeight;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set explicitHeight(value:Number):void
 +    {
 +    	if (_explicitHeight == value)
 +            return;
 +
 +        // height can be pixel or percent not both
 +        if (!isNaN(value))
 +            _percentHeight = NaN;
 +
 +        _explicitHeight = value;
 +        
 +        if (container)
 +        {
 +        	container.invalidateSize();
 +        	container.invalidateDisplayList();
 +        }
 +        
 +        dispatchEvent(new Event("explicitHeightChanged"));
 +    }
 +	
 +	//----------------------------------
 +    //  id
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _id:String;
 +
 +    /**
 +     *  ID of the ConstraintRow instance. This value becomes the instance name 
 +     *  of the constraint row and should not contain white space or special 
 +     *  characters. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get id():String
 +    {
 +        return _id;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set id(value:String):void
 +    {
 +        _id = value;
 +    }
 +    
 +    //----------------------------------
 +    //  maxHeight
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the maxHeight property.
 +     */
 +    private var _explicitMaxHeight:Number;
 +	[Bindable("maxHeightChanged")]
 +    [Inspectable(category="Size", defaultValue="10000")]
 +
 +    /**
 +     *  Number that specifies the maximum height of the ConstraintRow instance,
 +     *  in pixels, in the ConstraintRow instance's coordinates.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get maxHeight():Number
 +    {
 +        // Since ConstraintRow doesn't have a measuredMaxHeight, we explictly return
 +        // the default value of 10000 when no maxHeight is set.
 +        return (!isNaN(_explicitMaxHeight)) ? _explicitMaxHeight : 10000;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set maxHeight(value:Number):void
 +    {
 +    	if (_explicitMaxHeight != value)
 +    	{
 +            _explicitMaxHeight = value;
 +			if (container)
 +			{
 +            	container.invalidateSize();
 +   				container.invalidateDisplayList();
 +   			}
 +   			dispatchEvent(new Event("maxHeightChanged"));
 +    	}
 +    }
 +    
 +    //----------------------------------
 +    //  minHeight
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the minHeight property.
 +     */
 +    private var _explicitMinHeight:Number;
 +	[Bindable("minHeightChanged")]
 +    [Inspectable(category="Size", defaultValue="0")]
 +    
 +    /**
 +     *  Number that specifies the minimum height of the ConstraintRow instance,
 +     *  in pixels, in the ConstraintRow instance's coordinates.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get minHeight():Number
 +    {
 +        // Since ConstraintRow doesn't have a measuredMinHeight, we explictly return
 +        // the default value of 0 when no minHeight is set.
 +        return (!isNaN(_explicitMinHeight)) ? _explicitMinHeight : 0;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set minHeight(value:Number):void
 +    {
 +    	if (_explicitMinHeight != value)
 +    	{
 +            _explicitMinHeight = value;
 +         	if (container)
 +			{
 +            	container.invalidateSize();
 +   				container.invalidateDisplayList();
 +   			}   
 +			dispatchEvent(new Event("minHeightChanged"));
 +    	}
 +    }
 +    
 +    //----------------------------------
 +    //  percentHeight
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the percentHeight property.
 +     */
 +    private var _percentHeight:Number;
 +    [Bindable("percentHeightChanged")]
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  Number that specifies the height of a component as a percentage
 +     *  of its parent's size. Allowed values are 0-100. The default value is NaN.
 +     *  Setting the <code>width</code> property resets this property to NaN.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get percentHeight():Number
 +    {
 +        return _percentHeight;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set percentHeight(value:Number):void
 +    {
 +        if (_percentHeight == value)
 +            return;
 +
 +        if (!isNaN(value))
 +            _explicitHeight = NaN;
 +
 +        _percentHeight = value;
 +        if (!isNaN(_percentHeight))
 +            contentSize = false;
 +        
 +        if (container)
 +        {
 +        	container.invalidateSize();
 +        	container.invalidateDisplayList();
 +        }   
 +    }
 +    
 +    //----------------------------------
 +    //  y
 +    //----------------------------------
 +	private var _y:Number;
 +	[Bindable("yChanged")]
 +	
 +    /**
 +	 *  @private
 +     */
 +    public function get y():Number
 +    {
 +        return _y;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set y(value:Number):void
 +    {
 +        if (value != _y)
 +        {
 +        	_y = value;
 +        	dispatchEvent(new Event("yChanged"));
 +        }
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods: IMXMLObject
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +      *  Called automatically by the MXML compiler when the ConstraintRow
 +      *  instance is created using an MXML tag.  
 +      *  If you create the constraint row through ActionScript, you 
 +      *  must call this method passing in the MXML document and 
 +      *  <code>null</code> for the <code>id</code>.
 +      *
 +      *  @param document The MXML document containing this ConstraintRow.
 +      *
 +      *  @param id Ignored.
 +      *  
 +      *  @langversion 3.0
 +      *  @playerversion Flash 9
 +      *  @playerversion AIR 1.1
 +      *  @productversion Flex 3
 +      */
 +    public function initialized(document:Object, id:String):void
 +    {
 +		this.id = id;
 +		if (!this.height && !this.percentHeight)
 +			contentSize = true;
 +    }
 +    
 +    /**
 +     *  Sizes the ConstraintRow
 +     *
 +     *  @param height Height of constaint row computed during parent container
 +     *  processing.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setActualHeight(h:Number):void
 +    {
 +        if (_height != h)
 +        {
 +            _height = h;
 +            dispatchEvent(new Event("heightChanged"));
 +        }
 +    }
 +    
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/controls/IFlexContextMenu.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/controls/IFlexContextMenu.as
index bb6a8d4,0000000..dc0b872
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/controls/IFlexContextMenu.as
+++ b/frameworks/projects/MX/src/main/flex/mx/controls/IFlexContextMenu.as
@@@ -1,75 -1,0 +1,75 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.controls
 +{
 +
 +/**
 + *  The IFlexContextMenu interface defines the interface for a 
 + *  Flex context menus.  
 + *
 + *  @see mx.core.UIComponent#flexContextMenu
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IFlexContextMenu
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.InteractiveObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.InteractiveObject;		
 +}
 +
 +    /**
 +     *  Sets the context menu of an InteractiveObject.  This will do 
 +     *  all the necessary steps to add the InteractiveObject as the context 
 +     *  menu for this InteractiveObject, such as adding listeners, etc..
 +     * 
 +     *  @param component InteractiveObject to set context menu on
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */ 
 +    function setContextMenu(component:InteractiveObject):void;
 +    
 +    /**
 +     *  Unsets the context menu of a InteractiveObject.  This will do 
 +     *  all the necessary steps to remove the InteractiveObject as the context 
 +     *  menu for this InteractiveObject, such as removing listeners, etc..
 +     * 
 +     *  @param component InteractiveObject to unset context menu on
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */ 
 +    function unsetContextMenu(component:InteractiveObject):void;
 +
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/controls/Label.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/controls/Label.as
index d07b9f8,0000000..f8b46f6
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/controls/Label.as
+++ b/frameworks/projects/MX/src/main/flex/mx/controls/Label.as
@@@ -1,1713 -1,0 +1,1713 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.controls
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +    import flash.display.DisplayObject;
 +    import flash.display.Graphics;
 +    import flash.events.Event;
 +    import flash.geom.Rectangle;
 +    import flash.text.StyleSheet;
 +    import flash.text.TextFormat;
 +    import flash.text.TextLineMetrics;
 +}
 +COMPILE::JS
 +{
 +    import flex.display.DisplayObject;
 +    import flex.display.Graphics;
 +    import flex.events.Event;
 +    import org.apache.flex.geom.Rectangle;
 +    import flex.text.TextFormat;
 +    import flex.text.TextLineMetrics;    
 +}
 +import mx.controls.listClasses.BaseListData;
 +import mx.controls.listClasses.IDropInListItemRenderer;
 +import mx.controls.listClasses.IListItemRenderer;
 +import mx.core.IDataRenderer;
 +import mx.core.IFlexModuleFactory;
 +import mx.core.IFontContextComponent;
 +import mx.core.IUITextField;
 +import mx.core.UIComponent;
 +import mx.core.UITextField;
 +import mx.core.mx_internal;
 +import mx.events.FlexEvent;
 +
 +use namespace mx_internal;
 +
 +//--------------------------------------
 +//  Events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched when the <code>data</code> property changes.
 + *
 + *  <p>When you use a component as an item renderer,
 + *  the <code>data</code> property contains the data to display.
 + *  You can listen for this event and update the component
 + *  when the <code>data</code> property changes.</p>
 + * 
 + *  @eventType mx.events.FlexEvent.DATA_CHANGE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dataChange", type="mx.events.FlexEvent")]
 +
 +/** 
 + *  Dispatched when a user clicks a hyperlink in an 
 + *  HTML-enabled text field, where the URL begins with <code>"event:"</code>. 
 + *  The remainder of the URL after 
 + *  <code>"event:"</code> is placed in the text property of the <code>link</code> event object.
 + *
 + *  <p>When you handle the <code>link</code> event, the hyperlink is not automatically executed; 
 + *  you need to execute the hyperlink from within your event handler. 
 + *  You typically use the <code>navigateToURL()</code> method to execute the hyperlink.
 + *  This allows you to modify the hyperlink, or even prohibit it from occurring, 
 + *  in your application. </p>
 + *
 + *  <p>The Label control must have the <code>selectable</code> property set 
 + *  to <code>true</code> to generate the <code>link</code> event.</p>
 + *
 + *  @eventType flash.events.TextEvent.LINK
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="link", type="flash.events.TextEvent")]
 +
 +//--------------------------------------
 +//  Styles
 +//--------------------------------------
 +
 +include "../styles/metadata/TextStyles.as"
 +
 +/**
 + *  Number of pixels between the left of the Label and 
 + *  the left of the text. 
 + *  
 + *  @default 0
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingLeft", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Number of pixels between the right of the Label and 
 + *  the right of the text. 
 + *  
 + *  @default 0
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingRight", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Number of pixels between the bottom of the Label and 
 + *  the bottom of the text. 
 + *  
 + *  The default value for the Halo theme is <code>2</code>.
 + *  The default value for the Spark theme is <code>-1</code>.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Number of pixels between the top of the Label and 
 + *  the top of the text. 
 + *  
 + *  The default value for the Halo theme is <code>2</code>.
 + *  The default value for the Spark theme is <code>-1</code>.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Color of the Label object's opaque background.
 + *  The default value is <code>undefined</code>,
 + *  which means that the background is transparent.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +//[Style(name="backgroundColor", type="uint", format="Color", inherit="no")]
 +
 +//--------------------------------------
 +//  Excluded APIs
 +//--------------------------------------
 +
 +[Exclude(name="focusEnabled", kind="property")]
 +[Exclude(name="focusPane", kind="property")]
 +[Exclude(name="mouseFocusEnabled", kind="property")]
 +[Exclude(name="tabEnabled", kind="property")]
 +[Exclude(name="chromeColor", kind="style")]
 +[Exclude(name="focusBlendMode", kind="style")]
 +[Exclude(name="focusSkin", kind="style")]
 +[Exclude(name="focusThickness", kind="style")]
 +[Exclude(name="themeColor", kind="style")]
 +[Exclude(name="setFocus", kind="method")]
 +
 +//--------------------------------------
 +//  Other metadata
 +//--------------------------------------
 +
 +[AccessibilityClass(implementation="mx.accessibility.LabelAccImpl")]
 +
 +[DefaultBindingProperty(destination="text")]
 +
 +[IconFile("Label.png")]
 +
 +[Alternative(replacement="spark.components.Label", since="4.0")]
 +
 +/**
 + *  The Label control displays a single line of noneditable text.
 + *  Use the Text control to create blocks of multiline
 + *  noneditable text.
 + *
 + *  <p>You can format Label text by using HTML tags,
 + *  which are applied after the Label control's CSS styles are applied.
 + *  You can also put padding around the four sides of the text.
 + *  The text of a Label is nonselectable by default,
 + *  but you can make it selectable.</p>
 + *
 + *  <p>If a Label is sized to be smaller than its text,
 + *  you can control whether the text is simply clipped or whether
 + *  it is truncated with a localizable string such as "...".
 + *  (Note: Plain text can be truncated, but HTML text cannot.)
 + *  If the entire text of the Label, either plain or HTML, 
 + *  is not completely visible, and you haven't assigned a tooltip
 + *  to the Label, an automatic "truncation tip" 
 + *  displays the complete plain text when a user holds the mouse over the Label control.</p>
 + *
 + *  <p>Label controls do not have backgrounds or borders
 + *  and cannot take focus.</p>
 + *
 + *  <p>The Label control has the following default sizing characteristics:</p>
 + *     <table class="innertable">
 + *        <tr>
 + *           <th>Characteristic</th>
 + *           <th>Description</th>
 + *        </tr>
 + *        <tr>
 + *           <td>Default size</td>
 + *           <td>Width and height large enough for the text</td>
 + *        </tr>
 + *        <tr>
 + *           <td>Minimum size</td>
 + *           <td>0 pixels</td>
 + *        </tr>
 + *        <tr>
 + *           <td>Maximum size</td>
 + *           <td>10000 by 10000 pixels</td>
 + *        </tr>
 + *     </table>
 + *
 + *  @mxml
 + *
 + *  <p>The <code>&lt;mx:Label&gt;</code> tag inherits all of the tag attributes
 + *  of its superclass, and adds the following tag attributes:</p>
 + *
 + *  <pre>
 + *  &lt;mx:Label
 + *    <b>Properties</b>
 + *    condenseWhite="true|false"
 + *    data="null"
 + *    htmlText=""
 + *    listData="null"
 + *    selectable="true|false"
 + *    text=""
 + *    truncateToFit="true|false"
 + *    &nbsp;
 + *    <b>Styles</b>
 + *    color="0x0B333C"
 + *    disabledColor="0xAAB3B3"
 + *    fontAntiAliasType="advanced|normal"
 + *    fontFamily="Verdana"
 + *    fontGridFitType="pixel|none|subpixel"
 + *    fontSharpness="0"
 + *    fontSize="10"
 + *    fontStyle="normal|italic"
 + *    fontThickness="0"
 + *    fontWeight="normal|bold"
 + *    paddingLeft="0"
 + *    paddingRight="0"
 + *    paddingTop="0"
 + *    paddingBottom="0"
 + *    styleSheet="null"
 + *    textAlign="left|right|center"
 + *    textDecoration="none|underline"
 + *    textIndent="0"
 + *    &nbsp;
 + *    <b>Events</b>
 + *    dataChange="<i>No default</i>"
 + *  /&gt;
 + *  </pre>
 + *
 + *  @includeExample examples/LabelExample.mxml
 + *
 + *  @see mx.controls.Text
 + *  @see mx.controls.TextInput
 + *  @see mx.controls.TextArea
 + *  @see mx.controls.RichTextEditor
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class Label extends UIComponent
 +                   implements IDataRenderer, IDropInListItemRenderer,
 +                   IListItemRenderer, IFontContextComponent
 +                   
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Implementation notes
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /*
 +        A Label has a single internal child, a UITextField which displays
 +        the Label's text or htmlText (whichever was last set).
 +
 +        See the implementation notes for UITextField to understand
 +        more about how a Flash TextField works.
 +
 +        The 'text' and 'htmlText' properties of Label work somewhat
 +        differently from those of a native TextField.
 +
 +        Because Flex uses invalidation, setting either 'text' or 'htmlText'
 +        does very little work; the setter only sets a storage var and some
 +        flags and dispatches an event to trigger bindings to update.
 +
 +        In fact, the setters are so fast that calling them in a loop
 +        does not create a performance problem.
 +        For example, if you have a Text component (which is a subclass of
 +        Label intended for displaying multiple lines of text) you can
 +        write code like myTextComponent.text += moreStuff[i] inside a
 +        loop. 
 +
 +        However, the Flex invalidation approach means that the 'text' and
 +        'htmlText' properties are not coupled as immediately as with
 +        a TextField.
 +
 +        If you set the 'text' of a Label, you can immediately get it back,
 +        but if you immediately get the 'htmlText' it will be null,
 +        indicating that it is invalid and will be calculated
 +        the next time the LayoutManager runs.
 +        Similarly, if you set the 'htmlText' of a Label, you can immediately
 +        get back exactly what you set, but the 'text' will be null,
 +        again an indication that it is invalid and will be calculated
 +        the next time the LayoutManager runs.
 +
 +        Later, when the LayoutManager runs to re-validate the Label,
 +        either the 'text' or the 'htmlText' that you set -- whichever one
 +        was set last -- will be pushed down into the TextField.
 +        After that happens, the Label's 'text' and 'htmlText' properties
 +        will be the same as those of the TextFields; the 'text' and the
 +        'htmlText' will be in sync with each other, but they will no
 +        longer necessarily be what you set.
 +
 +        If you need to force the LayoutManager to run immediately,
 +        you can call validateNow() on the Label.
 +
 +        Here are some examples of how these interactions work:
 +
 +        myLabel.htmlText = "This is <b>bold</b>."
 +        trace(myLabel.htmlText);
 +            This is <b>bold</b>.
 +        trace(myLabel.text);
 +            null
 +        myLabel.validateNow();
 +        trace(myLabel.htmlText);
 +            <TEXTFORMAT LEADING="2">
 +            <P ALIGN="LEFT">
 +            <FONT FACE="Verdana" SIZE="10" COLOR="#0B333C"
 +                  LETTERSPACING="0" KERNING="0">
 +            This is <B>bold</B>.
 +            </FONT>
 +            </P>
 +            </TEXTFORMAT>
 +        trace(myLabel.text);
 +            This is bold.
 +    */
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class mixins
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Placeholder for mixin by LabelAccImpl.
 +     */
 +    mx_internal static var createAccessibilityImplementation:Function;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function Label()
 +    {
 +        super();
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Flag that will block default data/listData behavior.
 +     */
 +    private var textSet:Boolean;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  baselinePosition
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  The baselinePosition of a Label is calculated for its textField.
 +     */
 +    override public function get baselinePosition():Number
 +    {
 +        if (!validateBaselinePosition())
 +            return NaN;
 +        
 +        return textField.y + textField.baselinePosition;
 +    }
 +
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var enabledChanged:Boolean = false;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set enabled(value:Boolean):void
 +    {
 +        if (value == enabled)
 +            return;
 +
 +        super.enabled = value;
 +        enabledChanged = true;
 +
 +        invalidateProperties();
 +    }
 +
 +    //----------------------------------
 +    //  textField
 +    //----------------------------------
 +
 +    /**
 +     *  The internal UITextField that renders the text of this Label.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected var textField:IUITextField;
 +
 +    //----------------------------------
 +    //  toolTip
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var toolTipSet:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set toolTip(value:String):void
 +    {
 +        super.toolTip = value;
 +
 +        toolTipSet = value != null;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  condenseWhite
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the condenseWhite property.
 +     */
 +    private var _condenseWhite:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    private var condenseWhiteChanged:Boolean = false;
 +
 +    [Bindable("condenseWhiteChanged")]
 +    [Inspectable(category="General", defaultValue="false")]
 +    
 +    /**
 +     *  Specifies whether extra white space (spaces, line breaks,
 +     *  and so on) should be removed in a Label control with HTML text.
 +     *
 +     *  <p>The <code>condenseWhite</code> property affects only text set with
 +     *  the <code>htmlText</code> property, not the <code>text</code> property.
 +     *  If you set text with the <code>text</code> property,
 +     *  <code>condenseWhite</code> is ignored.</p>
 +     *
 +     *  <p>If you set the <code>condenseWhite</code> property to <code>true</code>,
 +     *  you must use standard HTML commands, such as <code>&lt;br&gt;</code>
 +     *  and <code>&lt;p&gt;</code>, to place line breaks in the text field.</p>
 +     *
 +     *  @default false;
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get condenseWhite():Boolean
 +    {
 +        return _condenseWhite;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set condenseWhite(value:Boolean):void
 +    {
 +        if (value == _condenseWhite)
 +            return;
 +
 +        _condenseWhite = value;
 +        condenseWhiteChanged = true;
 +        
 +        // Changing the condenseWhite property needs to trigger
 +        // the same response as changing the htmlText property
 +        // if this Label is displaying HTML.
 +        if (isHTML)
 +            htmlTextChanged = true;
 +
 +        invalidateProperties();
 +        invalidateSize();
 +        invalidateDisplayList();
 +
 +        dispatchEvent(new Event("condenseWhiteChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  data
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the data property.
 +     */
 +    private var _data:Object;
 +
 +    [Bindable("dataChange")]
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  Lets you pass a value to the component
 +     *  when you use it in an item renderer or item editor.
 +     *  You typically use data binding to bind a field of the <code>data</code>
 +     *  property to a property of this component.
 +     *
 +     *  <p>When you use the control as a drop-in item renderer or drop-in
 +     *  item editor, Flex automatically writes the current value of the item
 +     *  to the <code>text</code> property of this control.</p>
 +     *
 +     *  <p>You do not set this property in MXML.</p>
 +     *
 +     *  @default null
 +     *  @see mx.core.IDataRenderer
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get data():Object
 +    {
 +        return _data;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set data(value:Object):void
 +    {
 +        var newText:*;
 +
 +        _data = value;
 +
 +        if (_listData)
 +        {
 +            newText = _listData.label;
 +        }
 +        else if (_data != null)
 +        {
 +            if (_data is String)
 +                newText = String(_data);
 +            else
 +                newText = _data.toString();
 +        }
 +
 +        if (newText !== undefined && !textSet)
 +        {
 +            text = newText;
 +            textSet = false;
 +        }
 +
 +        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
 +    }
 +
 +    //----------------------------------
 +    //  fontContext
 +    //----------------------------------
 +    
 +    /**
 +     *  @inheritDoc 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get fontContext():IFlexModuleFactory
 +    {
 +        return moduleFactory;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set fontContext(moduleFactory:IFlexModuleFactory):void
 +    {
 +        this.moduleFactory = moduleFactory;
 +    }
 +    
 +    //----------------------------------
 +    //  htmlText
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the htmlText property.
 +     *  In addition to being set in the htmlText setter,
 +     *  it is automatically updated at two other times.
 +     *  1. When the 'text' or 'htmlText' is pushed down into
 +     *  the textField in commitProperties(), this causes
 +     *  the textField to update its own 'htmlText'.
 +     *  Therefore in commitProperties() we reset this storage var
 +     *  to be in sync with the textField.
 +     *  2. When the TextFormat of the textField changes
 +     *  because a CSS style has changed (see validateNow()
 +     *  in UITextField), the textField also updates its own 'htmlText'.
 +     *  Therefore in textField_textFieldStyleChangeHandler()
 +     */
 +    private var _htmlText:String = "";
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var htmlTextChanged:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     *  The last value of htmlText that was set.
 +     *  We have to keep track of this because when you set the htmlText
 +     *  of a TextField and read it back, you don't get what you set.
 +     *  In general it will have additional HTML markup corresponding
 +     *  to the defaultTextFormat set from the CSS styles.
 +     *  If this var is null, it means that 'text' rather than 'htmlText'
 +     *  was last set.
 +     */
 +    private var explicitHTMLText:String = null; 
 +
 +    [Bindable("htmlTextChanged")]
 +    [CollapseWhiteSpace]
 +    [Inspectable(category="General", defaultValue="")]
 +
 +    /**
 +     *  Specifies the text displayed by the Label control, including HTML markup that
 +     *  expresses the styles of that text. 
 +     *  When you specify HTML text in this property, you can use the subset of HTML 
 +     *  tags that is supported by the Flash TextField control.
 +     * 
 +     *  <p>When you set this property, the HTML markup is applied
 +     *  after the CSS styles for the Label instance are applied.
 +     *  When you get this property, the HTML markup includes
 +     *  the CSS styles.</p>
 +     *  
 +     *  <p>For example, if you set this to be a string such as,
 +     *  <code>"This is an example of &lt;b&gt;bold&lt;/b&gt; markup"</code>,
 +     *  the text "This is an example of <b>bold</b> markup" appears
 +     *  in the Label with whatever CSS styles normally apply.
 +     *  Also, the word "bold" appears in boldface font because of the
 +     *  <code>&lt;b&gt;</code> markup.</p>
 +     *
 +     *  <p>HTML markup uses characters such as &lt; and &gt;,
 +     *  which have special meaning in XML (and therefore in MXML). So,  
 +     *  code such as the following does not compile:</p>
 +     *  
 +     *  <pre>
 +     *  &lt;mx:Label htmlText="This is an example of &lt;b&gt;bold&lt;/b&gt; markup"/&gt;
 +     *  </pre>
 +     *  
 +     *  <p>There are three ways around this problem.</p>
 +     *  
 +     *  <ul>
 +     *  
 +     *  <li>
 +     *  
 +     *  <p>Set the <code>htmlText</code> property in an ActionScript method called as 
 +     *  an <code>initialize</code> handler:</p>
 +     *  
 +     *  <pre>
 +     *  &lt;mx:Label id="myLabel" initialize="myLabel_initialize()"/&gt;
 +     *  </pre>
 +     *  
 +     *  <p>where the <code>myLabel_initialize</code> method is in a script CDATA section:</p>
 +     *  
 +     *  <pre>
 +     *  &lt;fx:Script&gt;
 +     *  &lt;![CDATA[
 +     *  private function myLabel_initialize():void {
 +     *      myLabel.htmlText = "This is an example of &lt;b&gt;bold&lt;/b&gt; markup";
 +     *  }
 +     *  ]]&gt;
 +     *  &lt;/fx:Script&gt;
 +     *  
 +     *  </pre>
 +     *  
 +     *  <p>This is the simplest approach because the HTML markup
 +     *  remains easily readable.
 +     *  Notice that you must assign an <code>id</code> to the label
 +     *  so you can refer to it in the <code>initialize</code>
 +     *  handler.</p>
 +     *  
 +     *  </li>
 +     *  
 +     *  <li>
 +     *  
 +     *  <p>Specify the <code>htmlText</code> property by using a child tag
 +     *  with a CDATA section. A CDATA section in XML contains character data
 +     *  where characters like &lt; and &gt; aren't given a special meaning.</p>
 +     *  
 +     *  <pre>
 +     *  &lt;mx:Label&gt;
 +     *      &lt;mx:htmlText&gt;&lt;![CDATA[This is an example of &lt;b&gt;bold&lt;/b&gt; markup]]&gt;&lt;/mx:htmlText&gt;
 +     *  &lt;mx:Label/&gt;
 +     *  </pre>
 +     *  
 +     *  <p>You must write the <code>htmlText</code> property as a child tag
 +     *  rather than as an attribute on the <code>&lt;mx:Label&gt;</code> tag
 +     *  because XML doesn't allow CDATA for the value of an attribute.
 +     *  Notice that the markup is readable, but the CDATA section makes 
 +     *  this approach more complicated.</p>
 +     *  
 +     *  </li>
 +     *  
 +     *  <li>
 +     *  
 +     *  <p>Use an <code>hmtlText</code> attribute where any occurences
 +     *  of the HTML markup characters &lt; and &gt; in the attribute value
 +     *  are written instead as the XML "entities" <code>&amp;lt;</code>
 +     *  and <code>&amp;gt;</code>:</p>
 +     *  
 +     *  <pre>
 +     *  &lt;mx:Label htmlText="This is an example of &amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt; markup"/&amp;gt;
 +     *  </pre>
 +     *  
 +     *  Adobe does not recommend this approach because the HTML markup becomes
 +     *  nearly impossible to read.
 +     *  
 +     *  </li>
 +     *  
 +     *  </ul>
 +     *  
 +     *  <p>If the <code>condenseWhite</code> property is <code>true</code> 
 +     *  when you set the <code>htmlText</code> property, multiple
 +     *  white-space characters are condensed, as in HTML-based browsers;
 +     *  for example, three consecutive spaces are displayed
 +     *  as a single space.
 +     *  The default value for <code>condenseWhite</code> is
 +     *  <code>false</code>, so you must set <code>condenseWhite</code>
 +     *  to <code>true</code> to collapse the white space.</p>
 +     *  
 +     *  <p>If you read back the <code>htmlText</code> property quickly
 +     *  after setting it, you get the same string that you set.
 +     *  However, after the LayoutManager runs, the value changes
 +     *  to include additional markup that includes the CSS styles.</p>
 +     *  
 +     *  <p>Setting the <code>htmlText</code> property affects the <code>text</code>
 +     *  property in several ways. 
 +     *  If you read the <code>text</code> property quickly after setting
 +     *  the <code>htmlText</code> property, you get <code>null</code>,
 +     *  which indicates that the <code>text</code> corresponding to the new
 +     *  <code>htmlText</code> has not yet been determined.
 +     *  However, after the LayoutManager runs, the <code>text</code> property 
 +     *  value changes to the <code>htmlText</code> string with all the 
 +     *  HTML markup removed; that is,
 +     *  the value is the characters that the Label actually displays.</p>
 +     *   
 +     *  <p>Conversely, if you set the <code>text</code> property,
 +     *  any previously set <code>htmlText</code> is irrelevant.
 +     *  If you read the <code>htmlText</code> property quickly after setting
 +     *  the <code>text</code> property, you get <code>null</code>,
 +     *  which indicates that the <code>htmlText</code> that corresponds to the new
 +     *  <code>text</code> has not yet been determined.
 +     *  However, after the LayoutManager runs, the <code>htmlText</code> property 
 +     *  value changes to the new text plus the HTML markup for the CSS styles.</p>
 +     *
 +     *  <p>To make the LayoutManager run immediately, you can call the
 +     *  <code>validateNow()</code> method on the Label.
 +     *  For example, you could set some <code>htmlText</code>,
 +     *  call the <code>validateNow()</code> method, and immediately
 +     *  obtain the corresponding <code>text</code> that doesn't have
 +     *  the HTML markup.</p>
 +     *  
 +     *  <p>If you set both <code>text</code> and <code>htmlText</code> properties 
 +     *  in ActionScript, whichever is set last takes effect.
 +     *  Do not set both in MXML, because MXML does not guarantee that
 +     *  the properties of an instance get set in any particular order.</p>
 +     *  
 +     *  <p>Setting either <code>text</code> or <code>htmlText</code> property
 +     *  inside a loop is a fast operation, because the underlying TextField
 +     *  that actually renders the text is not updated until
 +     *  the LayoutManager runs.</p>
 +     *
 +     *  <p>If you try to set this property to <code>null</code>,
 +     *  it is set, instead, to the empty string.
 +     *  If the property temporarily has the value <code>null</code>,
 +     *  it indicates that the <code>text</code> has been recently set
 +     *  and the corresponding <code>htmlText</code>
 +     *  has not yet been determined.</p>
 +     *  
 +     *  @default ""
 +     * 
 +     *  @see flash.text.TextField#htmlText
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get htmlText():String
 +    {
 +        return _htmlText;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set htmlText(value:String):void
 +    {
 +        textSet = true;
 +
 +        // The htmlText property can't be set to null,
 +        // only to the empty string, because if you set the htmlText
 +        // of a TextField to null it throws an RTE.
 +        // If the getter returns null, it means that 'text' was just set
 +        // and the value of 'htmlText' isn't yet known, because the 'text'
 +        // hasn't been committed into the textField and the 'htmlText'
 +        // hasn't yet been read back out of the textField.
 +        if (!value)
 +            value = "";
 +
 +        if (isHTML && value == explicitHTMLText)
 +            return;
 +
 +        _htmlText = value;
 +        htmlTextChanged = true;
 +
 +        // The text property is unknown until commitProperties(),
 +        // when we push the htmlText into the TextField and it
 +        // calculates the text.
 +        // But you can call validateNow() to make this happen right away.
 +        _text = null;
 +        
 +        explicitHTMLText = value;
 +
 +        invalidateProperties();
 +        invalidateSize();
 +        invalidateDisplayList();
 +
 +        // Trigger bindings to htmlText.
 +        dispatchEvent(new Event("htmlTextChanged"));
 +
 +        // commitProperties() will dispatch a "valueCommit" event
 +        // after the TextField determines the 'text' based on the
 +        // 'htmlText'; this event will trigger any bindings to 'text'.
 +    }
 +
 +    //----------------------------------
 +    //  isHTML
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private function get isHTML():Boolean
 +    {
 +        return explicitHTMLText != null;
 +    }
 +
 +    //----------------------------------
 +    //  listData
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the listData property.
 +     */
 +    private var _listData:BaseListData;
 +
 +    [Bindable("dataChange")]
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  When a component is used as a drop-in item renderer or drop-in
 +     *  item editor, Flex initializes the <code>listData</code> property
 +     *  of the component with the appropriate data from the List control.
 +     *  The component can then use the <code>listData</code> property
 +     *  to initialize the <code>data</code> property of the drop-in
 +     *  item renderer or drop-in item editor.
 +     *
 +     *  <p>You do not set this property in MXML or ActionScript;
 +     *  Flex sets it when the component is used as a drop-in item renderer
 +     *  or drop-in item editor.</p>
 +     *
 +     *  @default null
 +     *  @see mx.controls.listClasses.IDropInListItemRenderer
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get listData():BaseListData
 +    {
 +        return _listData;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set listData(value:BaseListData):void
 +    {
 +        _listData = value;
 +    }
 +
 +    //----------------------------------
 +    //  selectable
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for selectable property.
 +     */
 +    private var _selectable:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  Change flag for selectable property.
 +     */
 +    private var selectableChanged:Boolean;
 +
 +    [Inspectable(category="General", defaultValue="true")]
 +
 +    /**
 +     *  Specifies whether the text can be selected. 
 +     *  Making the text selectable lets you copy text from the control.
 +     *
 +     *  <p>When a <code>link</code> event is specified in the Label control, the <code>selectable</code> property must be set 
 +     *  to <code>true</code> to execute the <code>link</code> event.</p>
 +     *
 +     *  @default false;
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get selectable():Boolean
 +    {
 +        return _selectable;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set selectable(value:Boolean):void
 +    {
 +        if (value == selectable)
 +            return;
 +
 +        _selectable = value;
 +        selectableChanged = true;
 +
 +        invalidateProperties();
 +    }
 +
 +    //----------------------------------
 +    //  styleSheet
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Change flag for the styleSheet property
 +     */
 +    private var styleSheetChanged:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  Storage for the styleSheet property.
 +     */
 +    private var _styleSheet:StyleSheet;   
 +
 +   /**
 +    *  A flash.text.StyleSheet object that can perform rendering
 +    *  on the Label control's text.
 +    *  Use this property for detailed control of HTML styles for the text.
 +    *  For more information, see the flash.text.StyleSheet
 +    *  class documentation.
 +    * 
 +    *  @see flash.text.StyleSheet
 +    *
 +    *  @default null
 +    *  
 +    *  @langversion 3.0
 +    *  @playerversion Flash 9
 +    *  @playerversion AIR 1.1
 +    *  @productversion Flex 3
 +    */
 +    public function get styleSheet():StyleSheet
 +    {
 +        return _styleSheet;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set styleSheet(value:StyleSheet):void
 +    {
 +        _styleSheet = value;
 +        styleSheetChanged = true;
 +        htmlTextChanged = true;
 +
 +        invalidateProperties();
 +    }
 +
 +    //----------------------------------
 +    //  tabIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the tabIndex property.
 +     */
 +    private var _tabIndex:int = -1;
 +
 +    /**
 +     *  @private
 +     *  Although Label/Text do not receive stage focus 
 +     *  since they are not tabEnabled or 
 +     *  implement IFocusManagerComponent,
 +     *  for accessible applications, developers may set their
 +     *  tabIndex to specify reading order 
 +     *  of Screen Reader's virtual cursor.
 +     *  The default value is <code>-1</code>.
 +     *
 +     *  @tiptext tabIndex of the component
 +     *  @helpid 3198
 +     */
 +    override public function get tabIndex():int
 +    {
 +        return _tabIndex;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set tabIndex(value:int):void
 +    {
 +        _tabIndex = value;
 +
 +        invalidateProperties();
 +    }
 +
 +    //----------------------------------
 +    //  text
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the text property.
 +     *  In addition to being set in the 'text' setter,
 +     *  it is automatically updated at another time:
 +     *  When the 'text' or 'htmlText' is pushed down into
 +     *  the textField in commitProperties(), this causes
 +     *  the textField to update its own 'text'.
 +     *  Therefore in commitProperties() we reset this storage var
 +     *  to be in sync with the textField.
 +     */
 +    private var _text:String = "";
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var textChanged:Boolean = false;
 +
 +    [Bindable("valueCommit")]
 +    [CollapseWhiteSpace]
 +    [Inspectable(category="General", defaultValue="")]
 +
 +    /**
 +     *  Specifies the plain text displayed by this control.
 +     *  Its appearance is determined by the CSS styles of this Label control.
 +     *
 +     *  <p>When you set this property, any characters that might
 +     *  look like HTML markup in the string have no special meaning
 +     *  and appear as entered.</p>
 +     *
 +     *  <p>To display text formatted by using HTML tags,
 +     *  use the <code>htmlText</code> property instead.
 +     *  If you set the <code>htmlText</code> property,
 +     *  the HTML replaces any text that you set using this property, and the
 +     *  <code>text</code> property returns a plain-text version of the
 +     *  HTML text, with all HTML tags stripped out.</p>
 +     *
 +     *  <p>To include the special characters left angle  bracket (&lt;),
 +     *  right angle bracket (&gt;), or ampersand (&amp;) in the text,
 +     *  wrap the text string in the CDATA tag.
 +     *  Alternatively, you can use HTML character entities for the
 +     *  special characters, for example, <code>&amp;lt;</code>.</p>
 +     *
 +     *  <p>If the text is wider than the Label control,
 +     *  the text is truncated and terminated by an ellipsis (...).
 +     *  The full text displays as a tooltip when
 +     *  you move the mouse over the Label control.
 +     *  If you also set a tooltip by using the <code>tooltip</code>
 +     *  property, the tooltip is displayed rather than the text.</p>
 +     *
 +     *  <p>If you try to set this property to <code>null</code>,
 +     *  it is set, instead, to the empty string.
 +     *  The <code>text</code> property can temporarily have the value <code>null</code>,
 +     *  which indicates that the <code>htmlText</code> has been recently set
 +     *  and the corresponding <code>text</code> value
 +     *  has not yet been determined.</p>
 +     *
 +     *  @default ""
 +     *  @tiptext Gets or sets the Label content
 +     *  @helpid 3907
 +    *  
 +    *  @langversion 3.0
 +    *  @playerversion Flash 9
 +    *  @playerversion AIR 1.1
 +    *  @productversion Flex 3
 +    */
 +    public function get text():String
 +    {
 +        return _text;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set text(value:String):void
 +    {
 +        textSet = true;
 +
 +        // The text property can't be set to null, only to the empty string.
 +        // If the getter returns null, it means that 'htmlText' was just set
 +        // and the value of 'text' isn't yet known, because the 'htmlText'
 +        // hasn't been committed into the textField and the 'text'
 +        // hasn't yet been read back out of the textField.
 +        if (!value)
 +            value = "";
 +
 +        if (!isHTML && value == _text)
 +            return;
 +        
 +        _text = value;
 +        textChanged = true;
 +
 +        // The htmlText property is unknown until commitProperties(),
 +        // when we push the text into the TextField and it
 +        // calculates the htmlText.
 +        // But you can call validateNow() to make this happen right away.
 +        _htmlText = null;
 +        
 +        explicitHTMLText = null;
 +
 +        invalidateProperties();
 +        invalidateSize();
 +        invalidateDisplayList();
 +
 +        // Trigger bindings to 'text'.
 +        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
 +
 +        // commitProperties() will dispatch an "htmlTextChanged" event
 +        // after the TextField determines the 'htmlText' based on the
 +        // 'text'; this event will trigger any bindings to 'htmlText'.
 +    }
 +
 +    //----------------------------------
 +    //  textHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the textHeight property.
 +     */
 +    private var _textHeight:Number;
 +
 +    /**
 +     *  The height of the text.
 +     *
 +     *  <p>The value of the <code>textHeight</code> property is correct only
 +     *  after the component has been validated.
 +     *  If you set <code>text</code> and then immediately ask for the
 +     *  <code>textHeight</code>, you might receive an incorrect value.
 +     *  You should wait for the component to validate
 +     *  or call the <code>validateNow()</code> method before you get the value.
 +     *  This behavior differs from that of the flash.text.TextField control,
 +     *  which updates the value immediately.</p>
 +     *
 +     *  @see flash.text.TextField
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get textHeight():Number
 +    {
 +        return _textHeight;
 +    }
 +
 +    //----------------------------------
 +    //  textWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the textWidth property.
 +     */
 +    private var _textWidth:Number;
 +
 +    /**
 +     *  The width of the text.
 +     *
 +     *  <p>The value of the <code>textWidth</code> property is correct only
 +     *  after the component has been validated.
 +     *  If you set <code>text</code> and then immediately ask for the
 +     *  <code>textWidth</code>, you might receive an incorrect value.
 +     *  You should wait for the component to validate
 +     *  or call the <code>validateNow()</code> method before you get the value.
 +     *  This behavior differs from that of the flash.text.TextField control,
 +     *  which updates the value immediately.</p>
 +     *
 +     *  @see flash.text.TextField
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get textWidth():Number
 +    {
 +        return _textWidth;
 +    }
 +
 +    //----------------------------------
 +    //  truncateToFit
 +    //----------------------------------
 +
 +    /**
 +     *  If this propery is <code>true</code>, and the Label control size is
 +     *  smaller than its text, the text of the 
 +     *  Label control is truncated using 
 +     *  a localizable string, such as <code>"..."</code>.
 +     *  If this property is <code>false</code>, text that does not fit is clipped.
 +     * 
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var truncateToFit:Boolean = true;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: UIComponent
 +    //
 +    //--------------------------------------------------------------------------
 +
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function initializeAccessibility():void
 +    {
 +        if (Label.createAccessibilityImplementation != null)
 +            Label.createAccessibilityImplementation(this);
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    override protected function createChildren():void
 +    {
 +        super.createChildren();
 +
 +         if (!textField)
 +            createTextField(-1);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function commitProperties():void
 +    {
 +        super.commitProperties();
 +        
 +        // if the font changed and we already created the textfield, we will need to 
 +        // destory it so it can be re-created, possibly in a different swf context.
 +        
 +        if (hasFontContextChanged() && textField != null)
 +        {
 +            removeTextField();
 +            
 +            condenseWhiteChanged = true;
 +            enabledChanged = true;
 +            selectableChanged = true;
 +            textChanged = true;
 +        }
 +
 +        if (!textField)
 +            createTextField(-1);
 +        
 +        if (condenseWhiteChanged)
 +        {
 +            textField.condenseWhite = _condenseWhite;
 +            
 +            condenseWhiteChanged = false;
 +        }
 +
 +        textField.tabIndex = tabIndex;
 +
 +        if (enabledChanged)
 +        {
 +            textField.enabled = enabled;
 +           
 +            enabledChanged = false;
 +        }
 +
 +        if (selectableChanged)
 +        {
 +            textField.selectable = _selectable;
 +            
 +            selectableChanged = false;
 +        }
 +
 +        if (styleSheetChanged)
 +        {
 +            textField.styleSheet = _styleSheet;
 +
 +            styleSheetChanged = false;
 +        }
 +
 +        if (textChanged || htmlTextChanged)
 +        {
 +            // If the 'text' and 'htmlText' properties have both changed,
 +            // the last one set wins.
 +            if (isHTML)
 +                textField.htmlText = explicitHTMLText;
 +            else
 +                textField.text = _text;
 +            
 +            textFieldChanged(false)
 +                        
 +            textChanged = false;
 +            htmlTextChanged = false;
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Measure min/max/preferred sizes.
 +     */
 +    override protected function measure():void
 +    {
 +        super.measure();
 +
 +        var t:String = isHTML ? explicitHTMLText : text; 
 +        
 +        t = getMinimumText(t);
 +
 +        // Determine how large the textField would need to be
 +        // to display the entire text.
 +        var textFieldBounds:Rectangle = measureTextFieldBounds(t);
 +
 +        // Add in the padding.
 +        measuredMinWidth = measuredWidth = textFieldBounds.width +
 +            getStyle("paddingLeft") + getStyle("paddingRight");
 +        measuredMinHeight = measuredHeight = textFieldBounds.height +
 +            getStyle("paddingTop") + getStyle("paddingBottom");
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override protected function updateDisplayList(unscaledWidth:Number,
 +                                                  unscaledHeight:Number):void
 +    {
 +        super.updateDisplayList(unscaledWidth, unscaledHeight);
 +                
 +        /*
 +        var g:Graphics = graphics;
 +        g.clear();
 +        var backgroundColor:* = getStyle("backgroundColor");
 +        if (StyleManager.isValidStyleValue(backgroundColor))
 +        {
 +            g.beginFill(getStyle("backgroundColor"));
 +            g.drawRect(0, 0, unscaledWidth, unscaledHeight);
 +            g.endFill();
 +        }
 +        */
 +                
 +        // The textField occupies the entire Label bounds minus the padding.
 +
 +        var paddingLeft:Number = getStyle("paddingLeft");
 +        var paddingTop:Number = getStyle("paddingTop");
 +        var paddingRight:Number = getStyle("paddingRight");
 +        var paddingBottom:Number = getStyle("paddingBottom");
 +
 +        
 +        textField.setActualSize(unscaledWidth - paddingLeft - paddingRight,
 +                                unscaledHeight - paddingTop - paddingBottom);
 +
 +        textField.x = paddingLeft;
 +        textField.y = paddingTop;
 +
 +        // Now handle truncation if the text doesn't fit.
 +
 +        var t:String = isHTML ? explicitHTMLText : text; 
 +
 +        // Determine how large the textField would need to be
 +        // to display the entire text.
 +        var textFieldBounds:Rectangle = measureTextFieldBounds(t);
 +        
 +        // Plain text gets truncated with a "...".
 +        // HTML text simply gets clipped, because it is difficult
 +        // to skip over the markup and truncate only the non-markup.
 +        // But both plain text and HTML text gets an automatic tooltip
 +        // if the full text isn't visible.
 +        if (truncateToFit)
 +        {
 +            var truncated:Boolean;
 +            if (isHTML)
 +            {
 +                truncated = textFieldBounds.width > textField.width;
 +            }
 +            else
 +            {
 +                // Reset the text in case it was previously
 +                // truncated with a "...".
 +                textField.text = _text;
 +                
 +                // Determine whether the full text needs to be truncated
 +                // based on the actual size of the TextField.
 +                // Note that the actual size doesn't change;
 +                // the text changes to fit within the actual size.
 +                truncated = textField.truncateToFit();
 +            }
 +
 +            // If no explicit tooltip has been set,
 +            // implicitly set or clear a "truncation tip".
 +            if (!toolTipSet)
 +                super.toolTip = truncated ? text : null;
 +        }
 +        
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Creates the text field child and adds it as a child of this component.
 +     * 
 +     *  @param childIndex The index of where to add the child.
 +     *  If -1, the text field is appended to the end of the list.
 +     */
 +    mx_internal function createTextField(childIndex:int):void
 +    {   
 +        if (!textField)
 +        {
 +            textField = IUITextField(createInFontContext(UITextField));
 +            textField.enabled = enabled;
 +            textField.ignorePadding = true;
 +            textField.selectable = selectable;
 +            textField.styleName = this;
 +            textField.addEventListener("textFieldStyleChange",
 +                                       textField_textFieldStyleChangeHandler);
 +            textField.addEventListener("textInsert",
 +                                       textField_textModifiedHandler);                                       
 +            textField.addEventListener("textReplace",
 +                                       textField_textModifiedHandler);
 +            textField.addEventListener("textFieldWidthChange",
 +                                       textField_textFieldWidthChangeHandler);
 +                                       
 +            if (childIndex == -1)
 +                addChild(DisplayObject(textField));
 +            else
 +                addChildAt(DisplayObject(textField), childIndex);
 +        }
 +    }
 +
 +
 +   /**
 +    *  @private
 +    *  Removes the text field from this component.
 +    */
 +    mx_internal function removeTextField():void
 +    {
 +        if (textField)
 +        {
 +            textField.removeEventListener("textFieldStyleChange",
 +                                          textField_textFieldStyleChangeHandler);
 +            textField.removeEventListener("textInsert",
 +                                          textField_textModifiedHandler);                                       
 +            textField.removeEventListener("textReplace",
 +                                          textField_textModifiedHandler);                                       
 +            textField.removeEventListener("textFieldWidthChange",
 +                                          textField_textFieldWidthChangeHandler);
 +            removeChild(DisplayObject(textField));
 +            textField = null;
 +        }
 +    }
 +
 +    /**
 +     *  Returns a TextLineMetrics object with information about the text 
 +     *  position and measurements for a line of text in the control.
 +     *  The component must be validated to get a correct number.
 +     *  If you set <code>text</code> and then immediately call
 +     *  <code>getLineMetrics()</code> you may receive an incorrect value.
 +     *  You should either wait for the component to validate
 +     *  or call <code>validateNow()</code>.
 +     *  This is behavior differs from that of the flash.text.TextField class,
 +     *  which updates the value immediately.
 +     * 
 +     *  @param lineIndex The zero-based index of the line for which to get the metrics. 
 +     *  For the Label control, which has only a single line, must be 0.
 +     * 
 +     *  @return The TextLineMetrics object that contains information about the text.
 +     *
 +     *  @see flash.text.TextField
 +     *  @see flash.text.TextLineMetrics
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getLineMetrics(lineIndex:int):TextLineMetrics
 +    {
 +        return textField ? textField.getLineMetrics(lineIndex) : null;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Setting the 'htmlText' of textField changes its 'text',
 +     *  and vice versa, so afterwards doing so we call this method
 +     *  to update the storage vars for various properties.
 +     *  Afterwards, the Label's 'text', 'htmlText', 'textWidth',
 +     *  and 'textHeight' are all in sync with each other
 +     *  and are identical to the TextField's.
 +     */
 +    private function textFieldChanged(styleChangeOnly:Boolean):void
 +    {
 +        var changed1:Boolean;
 +        var changed2:Boolean;
 +
 +        if (!styleChangeOnly)
 +        {
 +            changed1 = _text != textField.text;
 +            _text = textField.text;
 +        }
 +
 +        changed2 = _htmlText != textField.htmlText;
 +        _htmlText = textField.htmlText;
 +
 +        // If the 'text' property changes, dispatch a valueCommit
 +        // event, which will trigger bindings to 'text'.
 +        if (changed1)
 +            dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
 +        // If the 'htmlText' property changes, trigger bindings to it.
 +        if (changed2)
 +            dispatchEvent(new Event("htmlTextChanged"));
 +
 +        _textWidth = textField.textWidth;
 +        _textHeight = textField.textHeight;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function measureTextFieldBounds(s:String):Rectangle
 +    {
 +        // Measure the text we need to display.
 +        var lineMetrics:TextLineMetrics = isHTML ?
 +                                          measureHTMLText(s) :
 +                                          measureText(s);
 +        
 +        // In order to display this text completely,
 +        // a TextField must be 4-5 pixels larger.
 +        return new Rectangle(0, 0,
 +                             lineMetrics.width + UITextField.TEXT_WIDTH_PADDING,
 +                             lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Some other components which use a Label as an internal
 +     *  subcomponent need access to its UITextField, but can't access the
 +     *  textField var because it is protected and therefore available
 +     *  only to subclasses.
 +     */
 +    mx_internal function getTextField():IUITextField
 +    {
 +        return textField;
 +    }
 +    
 +    /**
 +     *  @private 
 +     */
 +    mx_internal function getMinimumText(t:String):String
 +    {
 +         // If the text is null, empty, or a single character,
 +        // make the measured size big enough to hold
 +        // a capital and decending character using the current font.
 +        if (!t || t.length < 2)
 +            t = "Wj";
 +            
 +        return t;   
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private function textField_textFieldStyleChangeHandler(event:Event):void
 +    {
 +        textFieldChanged(true);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function textField_textModifiedHandler(event:Event):void
 +    {
 +        textFieldChanged(false);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Changing the width of the text field can cause the text to reflow.
 +     *  Make sure our local _textWidth and _textHeight are in sync with text field.
 +     */
 +    private function textField_textFieldWidthChangeHandler(event:Event):void
 +    {
 +        textFieldChanged(true);
 +    }   
 +}
 +
 +}


[14/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - launch scripts to convert a new Flex project to a FlexJS project in FB

Posted by ah...@apache.org.
launch scripts to convert a new Flex project to a FlexJS project in FB


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

Branch: refs/heads/spark
Commit: a894f963e1e1fdb73e39c2a38239d8a15c2607af
Parents: f9ddca5
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jun 10 22:12:53 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jun 10 22:12:53 2016 -0700

----------------------------------------------------------------------
 ...ew Flex Project to FlexJS MVC Project.launch | 19 ++++++
 ...rt New Flex Project to FlexJS Project.launch | 17 ++++++
 ide/flashbuilder/FlexJS (Cordova Build).launch  |  2 +-
 ide/flashbuilder/FlexJS (Cordova Run).launch    |  2 +-
 ide/flashbuilder/antscripts.xml                 | 61 ++++++++++++++++++++
 installer.xml                                   | 20 +++++++
 6 files changed, 119 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a894f963/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch b/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch
new file mode 100644
index 0000000..98b6498
--- /dev/null
+++ b/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch	
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="ANT_HOME" value="/Applications/Adobe Flash Builder 4.7/eclipse/plugins/org.apache.ant_1.8.2.v20110505-1300"/>
+<mapEntry key="PATH" value="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="convert_project_mvc,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_HIDE_INTERNAL_TARGETS" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$FLEXJS_HOME/ide/flashbuilder/antscripts.xml"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DprojectDir=&quot;${project_loc}&quot;"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a894f963/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch b/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch
new file mode 100644
index 0000000..0224b51
--- /dev/null
+++ b/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch	
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="PATH" value="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_HIDE_INTERNAL_TARGETS" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$FLEXJS_HOME/ide/flashbuilder/antscripts.xml"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DprojectDir="&quot;{project_loc}&quot;"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a894f963/ide/flashbuilder/FlexJS (Cordova Build).launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/FlexJS (Cordova Build).launch b/ide/flashbuilder/FlexJS (Cordova Build).launch
index 4d9dc2d..f7223d1 100644
--- a/ide/flashbuilder/FlexJS (Cordova Build).launch	
+++ b/ide/flashbuilder/FlexJS (Cordova Build).launch	
@@ -12,7 +12,7 @@
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_HIDE_INTERNAL_TARGETS" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/Users/pent/dev/flex-asjs/cordova-build.xml"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$FLEXJS_HOME/cordova-build.xml"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dprojectdir=${project_loc}"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a894f963/ide/flashbuilder/FlexJS (Cordova Run).launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/FlexJS (Cordova Run).launch b/ide/flashbuilder/FlexJS (Cordova Run).launch
index 354e9cf..a71cdee 100644
--- a/ide/flashbuilder/FlexJS (Cordova Run).launch	
+++ b/ide/flashbuilder/FlexJS (Cordova Run).launch	
@@ -14,7 +14,7 @@
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="run,"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_HIDE_INTERNAL_TARGETS" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/Users/pent/dev/flex-asjs/cordova-build.xml"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$FLEXJS_HOME/cordova-build.xml"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dprojectdir=${project_loc}"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a894f963/ide/flashbuilder/antscripts.xml
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/antscripts.xml b/ide/flashbuilder/antscripts.xml
new file mode 100644
index 0000000..fe51e8f
--- /dev/null
+++ b/ide/flashbuilder/antscripts.xml
@@ -0,0 +1,61 @@
+<?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="flashbuilder_antscripts" default="convert_project" basedir=".">
+
+	<property environment="env"/>
+    
+    <condition property="isWindows" value="windows">
+        <os family="windows" />
+    </condition>
+
+    <target name="check_params" >
+        <fail unless="projectDir"
+            message="projectDir parameter not set" />
+        <fail message="projectDir ${projectDir} does not exist">
+            <condition>
+                <not>
+                    <available file="${projectDir}" />
+                </not>
+            </condition>
+        </fail>
+    </target>
+    
+    <target name="convert_project" depends="check_params, cutpath"  description="Replaces the files in a new Flex project folder with a basic FlexJS project">
+        <copy file="${basedir}/../../examples/flexjs/HelloWorld/src/HelloWorld.mxml" tofile="${projectDir}/src/${projectName}.mxml" overwrite="true" />
+    </target>
+
+    <target name="convert_project_mvc" depends="check_params, cutpath"  description="Replaces the files in a new Flex project folder with a basic FlexJS MVC project">
+        <copy file="${basedir}/../../examples/flexjs/DataBindingExample/src/DataBindingExample.mxml" tofile="${projectDir}/src/${projectName}.mxml" overwrite="true" />
+        <copy file="${basedir}/../../examples/flexjs/DataBindingExample/src/MyInitialView.mxml" tofile="${projectDir}/src/MyInitialView.mxml" overwrite="true" />
+        <mkdir dir="${projectDir}/src/models" />
+        <mkdir dir="${projectDir}/src/controllers" />
+        <copy file="${basedir}/../../examples/flexjs/DataBindingExample/src/StockDataJSONItemConverter.as" tofile="${projectDir}/src/StockDataJSONItemConverter.as" overwrite="true" />
+        <copy file="${basedir}/../../examples/flexjs/DataBindingExample/src/models/MyModel.as" tofile="${projectDir}/src/models/MyModel.as" overwrite="true" />
+        <copy file="${basedir}/../../examples/flexjs/DataBindingExample/src/controllers/MyController.as" tofile="${projectDir}/src/controllers/MyController.as" overwrite="true" />
+        <replace file="${projectDir}/src/controllers/MyController.as" token="DataBindingExample" value="${projectName}" />
+    </target>
+
+    <target name="cutpath" >
+        <basename file="${projectDir}" property="projectName" />
+        <echo>projectDir: ${projectDir}</echo>
+        <echo>projectName: ${projectName}</echo>
+    </target>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a894f963/installer.xml
----------------------------------------------------------------------
diff --git a/installer.xml b/installer.xml
index 75814cf..20808bf 100644
--- a/installer.xml
+++ b/installer.xml
@@ -954,6 +954,26 @@ tofile="${FLEXJS_HOME}/frameworks/themes/Halo/Halo.swc" />
             token="$FLEXJS_HOME"
             value="${FLEXJS_HOME}"/>
         </replace>
+        <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Build).launch">
+            <replacefilter
+            token="$FLEXJS_HOME"
+            value="${FLEXJS_HOME}"/>
+        </replace>
+        <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run).launch">
+            <replacefilter
+            token="$FLEXJS_HOME"
+            value="${FLEXJS_HOME}"/>
+        </replace>
+        <replace file="${FLEXJS_HOME}/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch">
+            <replacefilter
+            token="$FLEXJS_HOME"
+            value="${FLEXJS_HOME}"/>
+        </replace>
+        <replace file="${FLEXJS_HOME}/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch">
+            <replacefilter
+            token="$FLEXJS_HOME"
+            value="${FLEXJS_HOME}"/>
+        </replace>
         <replace file="${FLEXJS_HOME}/js/bin/mxmlc.bat">
             <replacefilter
             token="@java"


[29/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
index 62e360c,0000000..e1b3609
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
@@@ -1,1171 -1,0 +1,1171 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.styles
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;		
 +}
 +import org.apache.flex.events.EventDispatcher;
 +
 +import mx.core.Singleton;
 +import mx.core.mx_internal;
 +import mx.managers.ISystemManager;
 +import mx.managers.SystemManagerGlobals;
 +import mx.utils.ObjectUtil;
 +
 +use namespace mx_internal;
 +
 +/**
 + *  The CSSStyleDeclaration class represents a set of CSS style rules.
 + *  The MXML compiler automatically generates one CSSStyleDeclaration object
 + *  for each selector in the CSS files associated with a Flex application.
 + *  
 + *  <p>A CSS rule such as
 + *  <pre>
 + *      Button { color: #FF0000 }
 + *  </pre>
 + *  affects every instance of the Button class;
 + *  a selector like <code>Button</code> is called a type selector
 + *  and must not start with a dot.</p>
 + *
 + *  <p>A CSS rule such as
 + *  <pre>
 + *      .redButton { color: #FF0000 }
 + *  </pre>
 + *  affects only components whose <code>styleName</code> property
 + *  is set to <code>"redButton"</code>;
 + *  a selector like <code>.redButton</code> is called a class selector
 + *  and must start with a dot.</p>
 + *
 + *  <p>You can access the autogenerated CSSStyleDeclaration objects
 + *  using the <code>StyleManager.getStyleDeclaration()</code> method,
 + *  passing it either a type selector
 + *  <pre>
 + *  var buttonDeclaration:CSSStyleDeclaration =
 + *      StyleManager.getStyleDeclaration("Button");
 + *  </pre>
 + *  or a class selector
 + *  <pre>
 + *  var redButtonStyleDeclaration:CSSStyleDeclaration =
 + *      StyleManager.getStyleDeclaration(".redButton");
 + *  </pre>
 + *  </p>
 + *
 + *  <p>You can use the <code>getStyle()</code>, <code>setStyle()</code>,
 + *  and <code>clearStyle()</code> methods to get, set, and clear 
 + *  style properties on a CSSStyleDeclaration.</p>
 + *
 + *  <p>You can also create and install a CSSStyleDeclaration at run time
 + *  using the <code>StyleManager.setStyleDeclaration()</code> method:
 + *  <pre>
 + *  var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration(".bigMargins");
 + *  newStyleDeclaration.defaultFactory = function():void
 + *  {
 + *      leftMargin = 50;
 + *      rightMargin = 50;
 + *  }
 + *  StyleManager.setStyleDeclaration(".bigMargins", newStyleDeclaration, true);
 + *  </pre>
 + *  </p>
 + *
 + *  @see mx.core.UIComponent
 + *  @see mx.styles.StyleManager
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class CSSStyleDeclaration extends EventDispatcher
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private static const NOT_A_COLOR:uint = 0xFFFFFFFF;
 +
 +    /**
 +     *  @private
 +     */
 +    private static const FILTERMAP_PROP:String = "__reserved__filterMap";
 +    
 +    /**
 +     *  @private
 +     */
 +    private static var emptyObjectFactory:Function = function():void {};
 +        
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @param selector - If the selector is a CSSSelector then advanced
 +     *  CSS selectors are supported. If a String is used for the selector then
 +     *  only simple CSS selectors are supported. If the String starts with a
 +     *  dot it is interpreted as a universal class selector, otherwise it must
 +     *  represent a simple type selector. If not null, this CSSStyleDeclaration
 +     *  will be registered with StyleManager. 
 +     *  
 +     *  @param styleManager - The style manager to set this declaration into. If the
 +     *  styleManager is null the top-level style manager will be used.
 +     * 
 +     *  @param autoRegisterWithStyleManager - If true set the selector in the styleManager. The selector
 +     *  will only be set if both <code>selector</code> and <code>styleManager</code> are
 +     *  both non-null.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function CSSStyleDeclaration(selector:Object=null, styleManager:IStyleManager2=null, autoRegisterWithStyleManager:Boolean = true)
 +    {
 +        super();
 +
 +        // Do not reference StyleManager directly because this is a bootstrap class
 +        if (!styleManager)
 +            styleManager = Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2;
 +
 +        this.styleManager = styleManager;
 +
 +        if (selector)
 +        {
 +            if (selector is CSSSelector)
 +            {
 +                this.selector = selector as CSSSelector;
 +            }
 +            else
 +            {
 +                // Otherwise, a legacy Flex 3 String selector was provided
 +                selectorString = selector.toString();
 +            }
 +
 +            if (autoRegisterWithStyleManager)
 +                styleManager.setStyleDeclaration(selectorString, this, false);            
 +        }
 +
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  This Dictionary keeps track of all the style name/value objects
 +     *  produced from this CSSStyleDeclaration and already inserted into
 +     *  prototype chains. Whenever this CSSStyleDeclaration's overrides object
 +     *  is updated by setStyle(), these clone objects must also be updated.
 +     */
 +    private var clones:CloneManager = new CloneManager();
 +
 +    /**
 +     *  @private
 +     *  The number of CSS selectors pointing to this CSSStyleDeclaration.
 +     *  It will be greater than 0 if this CSSStyleDeclaration has been
 +     *  installed in the StyleManager.styles table by
 +     *  StyleManager.setStyleDeclaration().
 +     */
 +    mx_internal var selectorRefCount:int = 0;
 +    
 +    /**
 +     *  The order this CSSStyleDeclaration was added to its StyleManager.  
 +     *  MatchStyleDeclarations has to return the declarations in the order 
 +     *  they were declared
 +     */ 
 +    public var selectorIndex:int = 0;
 +    
 +    /**
 +     *  @private
 +     *  Array that specifies the names of the events declared
 +     *  by this CSS style declaration.
 +     *  This Array is used by the <code>StyleProtoChain.initObject()</code>
 +     *  method to register the effect events with the Effect manager.
 +     */
 +    mx_internal var effects:Array;
 +
 +    /**
 +     *  @private
 +     *  reference to StyleManager
 +     */
 +    private var styleManager:IStyleManager2;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    //----------------------------------
 +    //  defaultFactory
 +    //----------------------------------
 +
 +    private var _defaultFactory:Function;
 +    
 +    [Inspectable(environment="none")]
 +    
 +    /**
 +     *  This function, if it isn't <code>null</code>,
 +     *  is usually autogenerated by the MXML compiler.
 +     *  It produce copies of a plain Object, such as
 +     *  <code>{ leftMargin: 10, rightMargin: 10 }</code>,
 +     *  containing name/value pairs for style properties; the object is used
 +     *  to build a node of the prototype chain for looking up style properties.
 +     *
 +     *  <p>If this CSSStyleDeclaration is owned by a UIComponent
 +     *  written in MXML, this function encodes the style attributes
 +     *  that were specified on the root tag of the component definition.</p>
 +     *
 +     *  <p>If the UIComponent was written in ActionScript,
 +     *  this property is <code>null</code>.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get defaultFactory():Function
 +    {
 +        return _defaultFactory;
 +    }
 +    
 +    /**
 +     *  @private
 +     */ 
 +    public function set defaultFactory(f:Function):void
 +    {
 +        _defaultFactory = f;
 +    }
 +    
 +    //----------------------------------
 +    //  factory
 +    //----------------------------------
 +
 +    private var _factory:Function;
 +
 +    [Inspectable(environment="none")]
 +    
 +    /**
 +     *  This function, if it isn't <code>null</code>,
 +     *  is usually autogenerated by the MXML compiler.
 +     *  It produce copies of a plain Object, such as
 +     *  <code>{ leftMargin: 10, rightMargin: 10 }</code>,
 +     *  containing name/value pairs for style properties; the object is used
 +     *  to build a node of the prototype chain for looking up style properties.
 +     *
 +     *  <p>If this CSSStyleDeclaration is owned by a UIComponent,
 +     *  this function encodes the style attributes that were specified in MXML
 +     *  for an instance of that component.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get factory():Function
 +    {
 +        return _factory;
 +    }
 +    
 +    /**
 +     *  @private
 +     */ 
 +    public function set factory(f:Function):void
 +    {
 +        _factory = f;
 +    }
 +
 +    //----------------------------------
 +    //  overrides
 +    //----------------------------------
 +
 +    private var _overrides:Object;
 +
 +    /**
 +     *  If the <code>setStyle()</code> method is called on a UIComponent or CSSStyleDeclaration
 +     *  at run time, this object stores the name/value pairs that were set;
 +     *  they override the name/value pairs in the objects produced by
 +     *  the  methods specified by the <code>defaultFactory</code> and 
 +     *  <code>factory</code> properties.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get overrides():Object
 +    {
 +        return _overrides;
 +    }
 +    
 +    /**
 +     *  @private
 +     */ 
 +    public function set overrides(o:Object):void
 +    {
 +        _overrides = o;
 +    }
 +    
 +    //----------------------------------
 +    //  selector
 +    //----------------------------------
 +
 +    private var _selector:CSSSelector;
 +
 +    /**
 +     *  This property is the base selector of a potential chain of selectors
 +     *  and conditions that are used to match CSS style declarations to
 +     *  components.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get selector():CSSSelector
 +    {
 +        return _selector; 
 +    }
 +
 +    public function set selector(value:CSSSelector):void
 +    {
 +        _selector = value;
 +        _selectorString = null;
 +    }
 +
 +    //----------------------------------
 +    //  selectorString
 +    //----------------------------------
 +
 +    private var _selectorString:String;
 +
 +    /**
 +     *  Legacy support for setting a Flex 3 styled selector string after 
 +     *  the construction of a style declaration. Only universal class selectors
 +     *  or simple type selectors are supported. Note that this style declaration
 +     *  is not automatically registered with the StyleManager when using this
 +     *  API.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    mx_internal function get selectorString():String
 +    {
 +        if (_selectorString == null && _selector != null)
 +            _selectorString = _selector.toString();
 +
 +        return _selectorString; 
 +    }
 +
 +    mx_internal function set selectorString(value:String):void
 +    {
 +        // For the legacy API, the first argument is either a simple
 +        // type selector or a universal class selector
 +        if (value.charAt(0) == ".")
 +        {
 +            var condition:CSSCondition = new CSSCondition(CSSConditionKind.CLASS, value.substr(1));
 +            _selector = new CSSSelector("", [condition]);
 +        }
 +        else
 +        {
 +            _selector = new CSSSelector(value);
 +        }
 +
 +        _selectorString = value;
 +    }
 +
 +    //----------------------------------
 +    //  specificity
 +    //----------------------------------
 +
 +    /**
 +     *  Determines the order of precedence when applying multiple style
 +     *  declarations to a component. If style declarations are of equal
 +     *  precedence, the last one wins. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get specificity():int
 +    {
 +        return _selector ? _selector.specificity : 0; 
 +    }
 +    
 +    //----------------------------------
 +    //  subject
 +    //----------------------------------
 +
 +    /**
 +     *  The subject describes the name of a component that may be a potential
 +     *  match for this style declaration. The subject is determined as right
 +     *  most simple type selector in a potential chain of selectors.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get subject():String
 +    {
 +        if (_selector != null)
 +        {
 +            // Check for an implicit universal selector which omits *
 +            // for the subject but includes conditions.
 +            if (_selector.subject == "" && _selector.conditions)
 +                return "*";
 +            else
 +                return _selector.subject;
 +        }
 +
 +        return null;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Determines whether the selector chain for this style declaration makes
 +     *  use of a pseudo condition.
 +     */  
 +    mx_internal function getPseudoCondition():String
 +    {
 +        return (selector != null) ? selector.getPseudoCondition() : null;
 +    }
 +
 +    /**
 +     * @private
 +     * Determines whether this style declaration has an advanced selector.
 +     */  
 +    mx_internal function isAdvanced():Boolean
 +    {
 +        if (selector != null)
 +        {
 +            if (selector.ancestor)
 +            {
 +                return true;
 +            }
 +            else if (selector.conditions)
 +            {
 +                if (subject != "*" && subject != "global")
 +                {
 +                    return true;
 +                }
 +
 +                for each (var condition:CSSCondition in selector.conditions)
 +                {
 +                    if (condition.kind != CSSConditionKind.CLASS)
 +                    {
 +                        return true;
 +                    }
 +                }
 +            }
 +        }
 +
 +        return false;
 +    }
 +
 +    /**
 +     *  Determines whether this style declaration applies to the given component
 +     *  based on a match of the selector chain.
 +     * 
 +     *  @param object The component to match the style declaration against.     
 +     * 
 +     *  @return true if this style declaration applies to the component, 
 +     *  otherwise false. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function matchesStyleClient(object:IAdvancedStyleClient):Boolean
 +    {
 +        return (selector != null) ? selector.matchesStyleClient(object) : false;
 +    }
 +
 +    /**
 +     *  Determine if the properties of this style declaration are the same as the the properties of a specified
 +     *  style declaration.
 +     * 
 +     *  @param styleDeclaration the style declaration to compare.
 +     * 
 +     *  @return true if the styleDeclaration is considered equal to this declaration. 
 +     */ 
 +    mx_internal function equals(styleDeclaration:CSSStyleDeclaration):Boolean
 +    {
 +        if (styleDeclaration == null)
 +            return false;
 +        
 +        // test in order of most likey to be different.
 +        
 +        var obj:Object; // loop variable
 +        
 +        // overrides
 +        if (ObjectUtil.compare(overrides, styleDeclaration.overrides) != 0)
 +            return false;
 +
 +        // factory
 +        if ((factory == null && styleDeclaration.factory != null) ||
 +            (factory != null && styleDeclaration.factory == null))
 +            return false;
 +
 +        if (factory != null)
 +        {
 +            if (ObjectUtil.compare(new factory(), new styleDeclaration.factory()) != 0)
 +                return false;
 +        }
 +        
 +        // defaultFactory
 +        if ((defaultFactory == null && styleDeclaration.defaultFactory != null) ||
 +            (defaultFactory != null && styleDeclaration.defaultFactory == null))
 +            return false;
 +        
 +        if (defaultFactory != null)
 +        {
 +            if (ObjectUtil.compare(new defaultFactory(), 
 +                                   new styleDeclaration.defaultFactory()) != 0)
 +                return false;
 +        }
 +        
 +        // effects
 +        if (ObjectUtil.compare(effects, styleDeclaration.mx_internal::effects))
 +            return false;
 +                
 +        return true;
 +    }
 +    
 +
 +    /**
 +     *  Gets the value for a specified style property,
 +     *  as determined solely by this CSSStyleDeclaration.
 +     *
 +     *  <p>The returned value may be of any type.</p>
 +     *
 +     *  <p>The values <code>null</code>, <code>""</code>, <code>false</code>,
 +     *  <code>NaN</code>, and <code>0</code> are all valid style values,
 +     *  but the value <code>undefined</code> is not; it indicates that
 +     *  the specified style is not set on this CSSStyleDeclaration.
 +     *  You can use the method <code>StyleManager.isValidStyleValue()</code>
 +     *  to test the value that is returned.</p>
 +     *
 +     *  @param styleProp The name of the style property.
 +     *
 +     *  @return The value of the specified style property if set,
 +     *  or <code>undefined</code> if not.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getStyle(styleProp:String):*
 +    {
 +        var o:*;
 +        var v:*;
 +
 +        // First look in the overrides, in case setStyle()
 +        // has been called on this CSSStyleDeclaration.
 +        if (overrides)
 +        {
 +            // If the property exists in our overrides, but 
 +            // has 'undefined' as its value, it has been 
 +            // cleared from this stylesheet so return
 +            // undefined.
 +            if (styleProp in overrides &&
 +                overrides[styleProp] === undefined)
 +                return undefined;
 +                
 +            v = overrides[styleProp];
 +            if (v !== undefined) // must use !==
 +                return v;
 +        }
 +
 +        // Next look in the style object that this CSSStyleDeclaration's
 +        // factory function produces; it contains styles that
 +        // were specified in an instance tag of an MXML component
 +        // (if this CSSStyleDeclaration is attached to a UIComponent).
 +        if (factory != null)
 +        {
 +            factory.prototype = {};
 +            o = new factory();
 +            v = o[styleProp];
 +            if (v !== undefined) // must use !==
 +                return v;
 +        }
 +
 +        // Next look in the style object that this CSSStyleDeclaration's
 +        // defaultFactory function produces; it contains styles that
 +        // were specified on the root tag of an MXML component.
 +        if (defaultFactory != null)
 +        {
 +            defaultFactory.prototype = {};
 +            o = new defaultFactory();
 +            v = o[styleProp];
 +            if (v !== undefined) // must use !==
 +                return v;
 +        }
 +
 +        // Return undefined if the style isn't specified
 +        // in any of these three places.
 +        return undefined;
 +    }
 +
 +    /**
 +     *  Sets a style property on this CSSStyleDeclaration.
 +     *
 +     *  @param styleProp The name of the style property.
 +     *
 +     *  @param newValue The value of the style property.
 +     *  The value may be of any type.
 +     *  The values <code>null</code>, <code>""</code>, <code>false</code>,
 +     *  <code>NaN</code>, and <code>0</code> are all valid style values,
 +     *  but the value <code>undefined</code> is not.
 +     *  Setting a style property to the value <code>undefined</code>
 +     *  is the same as calling the <code>clearStyle()</code> method.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setStyle(styleProp:String, newValue:*):void
 +    {
 +        var oldValue:Object = getStyle(styleProp);
 +        var regenerate:Boolean = false;
 +
 +        // If this CSSStyleDeclaration didn't previously have a factory,
 +        // defaultFactory, or overrides object, then this CSSStyleDeclaration
 +        // hasn't been added to anyone's proto chain.  In that case, we
 +        // need to regenerate everyone's proto chain.
 +        if (selectorRefCount > 0 &&
 +            factory == null &&
 +            defaultFactory == null &&
 +            !overrides && 
 +            (oldValue !== newValue)) // must be !==
 +        {
 +            regenerate = true;
 +        }
 +        
 +        if (newValue !== undefined) // must be !==
 +        {
 +            setLocalStyle(styleProp, newValue);
 +        }
 +        else
 +        {
 +            if (newValue == oldValue)
 +                return;
 +            setLocalStyle(styleProp, newValue);
 +        }
 +
 +        var sms:Array = SystemManagerGlobals.topLevelSystemManagers;
 +        var n:int = sms.length;
 +        var i:int;
 +
 +        // Type as Object to avoid dependency on SystemManager.
 +        var sm:ISystemManager;
 +        var cm:Object;
 +
 +        if (regenerate)
 +        {
 +            // Regenerate all the proto chains
 +            // for all objects in the application.
 +            for (i = 0; i < n; i++)
 +            {
 +                sm = sms[i];
 +                cm = sm.getImplementation("mx.managers::ISystemManagerChildManager");
 +                cm.regenerateStyleCache(true);
 +            }
 +        }
 +
 +        for (i = 0; i < n; i++)
 +        {
 +            sm = sms[i];
 +            cm = sm.getImplementation("mx.managers::ISystemManagerChildManager");
 +            cm.notifyStyleChangeInChildren(styleProp, true);
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Sets a style property on this CSSStyleDeclaration.
 +     *
 +     *  @param styleProp The name of the style property.
 +     *
 +     *  @param newValue The value of the style property.
 +     *  The value may be of any type.
 +     *  The values <code>null</code>, <code>""</code>, <code>false</code>,
 +     *  <code>NaN</code>, and <code>0</code> are all valid style values,
 +     *  but the value <code>undefined</code> is not.
 +     *  Setting a style property to the value <code>undefined</code>
 +     *  is the same as calling <code>clearStyle()</code>.
 +     */
 +    mx_internal function setLocalStyle(styleProp:String, value:*):void
 +    {
 +        var oldValue:Object = getStyle(styleProp);
 +
 +        // If setting to undefined, clear the style attribute.
 +        if (value === undefined) // must use ===
 +        {
 +            clearStyleAttr(styleProp);
 +            return;
 +        }
 +
 +        var o:Object;
 +
 +        // If the value is a String of the form "#FFFFFF" or "red",
 +        // then convert it to a RGB color uint (e.g.: 0xFFFFFF).
 +        if (value is String)
 +        {
 +            if (!styleManager)
 +                styleManager = Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2;
 +            var colorNumber:Number = styleManager.getColorName(value);
 +            if (colorNumber != NOT_A_COLOR)
 +                value = colorNumber;
 +        }
 +
 +        // If the new value for styleProp is different from the one returned
 +        // from the defaultFactory function, then store the new value on the
 +        // overrides object. That way, future clones will get the new value.
 +        if (defaultFactory != null)
 +        {
 +            o = new defaultFactory();
 +            if (o[styleProp] !== value) // must use !==
 +            {
 +                if (!overrides)
 +                    overrides = {};
 +                overrides[styleProp] = value;
 +            }
 +            else if (overrides)
 +            {
 +                delete overrides[styleProp];
 +            }
 +        }
 +
 +        // If the new value for styleProp is different from the one returned
 +        // from the factory function, then store the new value on the
 +        // overrides object. That way, future clones will get the new value.
 +        if (factory != null)
 +        {
 +            o = new factory();
 +            if (o[styleProp] !== value) // must use !==
 +            {
 +                if (!overrides)
 +                    overrides = {};
 +                overrides[styleProp] = value;
 +            }
 +            else if (overrides)
 +            {
 +                delete overrides[styleProp];
 +            }
 +        }
 +
 +        if (defaultFactory == null && factory == null)
 +        {
 +            if (!overrides)
 +                overrides = {};
 +            overrides[styleProp] = value;
 +        }
 +
 +        // Update all clones of this style sheet.
 +        updateClones(styleProp, value);
 +        
 +    }
 +    
 +    /**
 +     *  Clears a style property on this CSSStyleDeclaration.
 +     *
 +     *  This is the same as setting the style value to <code>undefined</code>.
 +     *
 +     *  @param styleProp The name of the style property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function clearStyle(styleProp:String):void
 +    {
 +        setStyle(styleProp, undefined);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function createProtoChainRoot():Object
 +    {
 +        var root:Object = {};
 +
 +        // If there's a defaultFactory for this style sheet,
 +        // then add the object it produces to the root.
 +        if (defaultFactory != null)
 +        {
 +            defaultFactory.prototype = root;
 +            root = new defaultFactory();
 +        }
 +
 +        // If there's a factory for this style sheet,
 +        // then add the object it produces to the root.
 +        if (factory != null)
 +        {
 +            factory.prototype = root;
 +            root = new factory();
 +        }
 +
 +        clones.put(root);
 +        
 +        return root;
 +    }
 +
 +    /**
 +     *  @private
 +     * 
 +     *  The order of nodes in the prototype chain:
 +     * 
 +     *  1. parent style default factories
 +     *  2. this default factory
 +     *  3. parent style factories
 +     *  4. parent style overrides
 +     *  5. this factory
 +     *  6. this overrides
 +     * 
 +     *  Where a parent style is a style with the same selector as this
 +     *  style but in a parent style manager. 
 +     * 
 +     */
 +    mx_internal function addStyleToProtoChain(chain:Object,
 +                                         target:DisplayObject,
 +                                         filterMap:Object = null):Object
 +    {
 +        var nodeAddedToChain:Boolean = false;
 +        var originalChain:Object = chain;
 +        
 +        // Get a list of  parent style declarations for this selector.
 +        var parentStyleDeclarations:Vector.<CSSStyleDeclaration> = new Vector.<CSSStyleDeclaration>();
 +        var styleParent:IStyleManager2 = styleManager.parent;
 +        while (styleParent)
 +        {
 +            var parentStyle:CSSStyleDeclaration = styleParent.getStyleDeclaration(selectorString);
 +            if (parentStyle)
 +                parentStyleDeclarations.unshift(parentStyle);
 +
 +            styleParent = styleParent.parent;
 +        }
 +
 +        // #1. Add parent's default styles. Topmost parent is added to the chain first.
 +        for each (var style:CSSStyleDeclaration in parentStyleDeclarations)
 +        {
 +            // If there's a defaultFactory for this style sheet,
 +            // then add the object it produces to the chain.
 +            if (style.defaultFactory != null)
 +                chain = style.addDefaultStyleToProtoChain(chain, target, filterMap);
 +        }
 +        
 +        // #2. Add this style's defaultFactory to the proto chain.
 +        if (defaultFactory != null)
 +            chain = addDefaultStyleToProtoChain(chain, target, filterMap);
 +
 +        // #3 and #4. Add parent's factory styles and overrides.
 +        var addedParentStyleToProtoChain:Boolean = false;
 +        for each (style in parentStyleDeclarations)
 +        {
 +            if (style.factory != null || style.overrides != null)
 +            {
 +                chain = style.addFactoryAndOverrideStylesToProtoChain(chain, target, filterMap);
 +                addedParentStyleToProtoChain = true;
 +            }
 +        }
 +        
 +        // #5 and #6. Add this factory style and overrides.
 +        var inChain:Object = chain;
 +        if (factory != null || overrides != null)
 +        {
 +            chain = addFactoryAndOverrideStylesToProtoChain(chain, target, filterMap);
 +            if (inChain != chain)
 +                nodeAddedToChain = true;
 +        }
 +        
 +        // Here we check if we need to add an empty node to the chain for clone
 +        // purposes. If there are parent nodes between this defaultFactory and 
 +        // this factory, then we can't use the defaultFactory node as the clone 
 +        // since overrides could get blocked by parent styles.
 +        // First we check if we have a defaultFactory and we didn't add a factory
 +        // or override node to the chain. If we have a factory or override node
 +        // then we will just use that.
 +        if (defaultFactory != null && !nodeAddedToChain)
 +        {
 +            // Now we know we have a default factory node and no factory or override
 +            // nodes. We can use the default factory as a clone on the chain if there
 +            // are no parent styles below it on the proto chain.
 +            // Otherwise create an empty node so overrides and be added later.
 +            if (addedParentStyleToProtoChain)
 +            {
 +                // There are parent styles so create an empty node.
 +                emptyObjectFactory.prototype = chain;
 +                chain = new emptyObjectFactory();
 +                emptyObjectFactory.prototype = null;
 +            }
 +            
 +            nodeAddedToChain = true;
 +        }
 +        
 +        if (nodeAddedToChain)
 +            clones.put(chain);
 +
 +        return chain;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function addDefaultStyleToProtoChain(chain:Object,
 +                                            target:DisplayObject,
 +                                            filterMap:Object = null):Object
 +    {
 +        // If there's a defaultFactory for this style sheet,
 +        // then add the object it produces to the chain.
 +        if (defaultFactory != null)
 +        {
 +            var originalChain:Object = chain;
 +            if (filterMap)
 +            {
 +                chain = {};
 +            }
 +            
 +            defaultFactory.prototype = chain;
 +            chain = new defaultFactory();
 +            defaultFactory.prototype = null;
 +
 +            if (filterMap)
 +                chain = applyFilter(originalChain, chain, filterMap);
 +        }
 +        
 +        return chain;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal function addFactoryAndOverrideStylesToProtoChain(chain:Object,
 +                                                target:DisplayObject,
 +                                                filterMap:Object = null):Object
 +    {
 +        var originalChain:Object = chain;
 +        if (filterMap)
 +        {
 +            chain = {};
 +        }
 +        
 +        // If there's a factory for this style sheet,
 +        // then add the object it produces to the chain.
 +        if (factory != null)
 +        {
 +            factory.prototype = chain;
 +            chain = new factory();
 +            factory.prototype = null;
 +        }
 +        
 +        // If someone has called setStyle() on this CSSStyleDeclaration,
 +        // then some of the values returned from the factory are
 +        // out-of-date. Overwrite them with the up-to-date values.
 +        if (overrides)
 +        {
 +            // Before we add our overrides to the object at the head of
 +            // the chain, make sure that we added an object at the head
 +            // of the chain.
 +            if (factory == null)
 +            {
 +                emptyObjectFactory.prototype = chain;
 +                chain = new emptyObjectFactory();
 +                emptyObjectFactory.prototype = null;
 +            }
 +            
 +            for (var p:String in overrides)
 +            {
 +                if (overrides[p] === undefined)
 +                    delete chain[p];
 +                else
 +                    chain[p] = overrides[p];
 +            }
 +        }
 +
 +        if (filterMap)
 +        {
 +            if (factory != null || overrides)
 +                chain = applyFilter(originalChain, chain, filterMap);
 +            else
 +                chain = originalChain;
 +        }
 +        
 +        if (factory != null || overrides)
 +            clones.put(chain);    
 +        
 +        return chain;
 +    }
 +
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal function applyFilter(originalChain:Object, chain:Object, filterMap:Object):Object
 +    {
 +        var filteredChain:Object = {};
 +        // Create an object on the head of the chain using the original chain       
 +        emptyObjectFactory.prototype = originalChain;
 +        filteredChain = new emptyObjectFactory();
 +        emptyObjectFactory.prototype = null;
 +        
 +        for (var i:String in chain)
 +        {
 +            if (filterMap[i] != null)
 +            {
 +                filteredChain[filterMap[i]] = chain[i];
 +            }
 +        } 
 +        
 +        chain = filteredChain;
 +        chain[FILTERMAP_PROP] = filterMap;
 +
 +        return chain;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal function clearOverride(styleProp:String):void
 +    {
 +        if (overrides && overrides[styleProp] !== undefined)
 +            delete overrides[styleProp];
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function clearStyleAttr(styleProp:String):void
 +    {
 +        // Put "undefined" into our overrides Array
 +        if (!overrides)
 +            overrides = {};
 +        overrides[styleProp] = undefined;
 +        
 +        // Remove the property from all our clones
 +        for (var clone:* in clones.iterator)
 +        {
 +            delete clone[styleProp];
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal function updateClones(styleProp:String, value:*):void
 +    {
 +        // Update all clones of this style sheet.
 +        for (var clone:* in clones.iterator)
 +        {
 +            var cloneFilter:Object = clone[FILTERMAP_PROP];
 +            if (cloneFilter)
 +            {
 +                if (cloneFilter[styleProp] != null)
 +                {
 +                    clone[cloneFilter[styleProp]] = value;      
 +                }
 +            }
 +            else
 +            {
 +                clone[styleProp] = value;
 +            }
 +        }
 +    }
 +    
 +}
 +
 +}
- COMPILE::AS3
++COMPILE::SWF
 +{
 +    import flash.utils.Dictionary;
 +}
 +
 +class CloneManager
 +{
-     COMPILE::AS3
++    COMPILE::SWF
 +    private var clones:Dictionary = new Dictionary(true);
 +    
 +    COMPILE::JS
 +    private var array:Array = [];
 +    
 +    public function CloneManager()
 +    {
 +        
 +    }
 +    
 +    public function put(o:Object):void
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            clones[o] = 1;                
 +        }
 +        COMPILE::JS
 +        {
 +            // leaks memory.  
 +            // Need to track references 
 +            // so we can clean up
 +            array.push(o);
 +        }
 +    }
 +    
 +    public function get iterator():Object
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            return clones;
 +        }
 +        COMPILE::JS
 +        {
 +            return array;
 +        }
 +    }
- }
++}


[16/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - swap COMPILE::AS3 for COMPILE::SWF

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as
index a806b56..9f067f1 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.geom.Point;
         import flash.geom.Rectangle;            
@@ -53,7 +53,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawCircle(cx:Number, cy:Number, radius:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 graphics.clear();
                 applyStroke();
@@ -93,4 +93,4 @@ package org.apache.flex.core.graphics
 		}
 		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as
index 3b796bb..f3c6c90 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.geom.Point;
         import flash.geom.Rectangle;            
@@ -47,7 +47,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawEllipse(xp:Number, yp:Number, width:Number, height:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 graphics.clear();
                 applyStroke();
@@ -86,4 +86,4 @@ package org.apache.flex.core.graphics
 		}
 		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as
index 58d417a..0fb521c 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as
@@ -33,7 +33,7 @@ package org.apache.flex.core.graphics
 		 *  @playerversion Flash 9
 		 *  @playerversion AIR 1.1
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		protected var compoundTransform:CompoundTransform;
 		
 		/**
@@ -80,7 +80,7 @@ package org.apache.flex.core.graphics
 		public function set entries(value:Array):void
 		{
 			_entries = value;
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 processEntries();                    
             }
@@ -150,12 +150,12 @@ package org.apache.flex.core.graphics
 			_y = value;                
 		}
 
-		COMPILE::AS3
+		COMPILE::SWF
 		protected function toRad(a:Number):Number {
 			return a*Math.PI/180;
 		}
 		
-		COMPILE::AS3
+		COMPILE::SWF
 		protected function get rotationInRadians():Number
 		{
 			return rotation / 180 * Math.PI;
@@ -167,7 +167,7 @@ package org.apache.flex.core.graphics
 		 *  Array into the internal <code>colors</code>, <code>ratios</code>,
 		 *  and <code>alphas</code> arrays.
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function processEntries():void
 		{
 			colors = [];
@@ -226,4 +226,4 @@ package org.apache.flex.core.graphics
 		}
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as
index cbcdb3f..68ce012 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as
@@ -112,7 +112,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function begin(s:GraphicShape):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 s.graphics.beginFill(color,alpha);                    
             }
@@ -123,11 +123,11 @@ package org.apache.flex.core.graphics
 		 */
 		public function end(s:GraphicShape):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
     			s.graphics.endFill();
             }
 		}
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as
index 7e0391e..6bbe486 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-	COMPILE::AS3
+	COMPILE::SWF
     {
         import flash.geom.Point;
         import flash.geom.Rectangle;
@@ -85,7 +85,7 @@ package org.apache.flex.core.graphics
             }
         }
 
-        COMPILE::AS3
+        COMPILE::SWF
 		protected function applyStroke():void
 		{
 			if(stroke)
@@ -94,7 +94,7 @@ package org.apache.flex.core.graphics
 			}
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		protected function beginFill(targetBounds:Rectangle,targetOrigin:Point):void
 		{
 			if(fill)
@@ -103,7 +103,7 @@ package org.apache.flex.core.graphics
 			}
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		protected function endFill():void
 		{
 			if(fill)
@@ -122,7 +122,7 @@ package org.apache.flex.core.graphics
 
 		override public function addedToParent():void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 super.addedToParent();
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
index 4927eb9..5ac4e54 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.GraphicsPath;
         import flash.display.Shape;
@@ -51,7 +51,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function removeAllElements():void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 graphics.clear();
             }
@@ -79,7 +79,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawRect(x:Number, y:Number, width:Number, height:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 applyStroke();
                 beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
@@ -102,7 +102,7 @@ package org.apache.flex.core.graphics
             }
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		public function createRect(x:Number, y:Number, width:Number, height:Number):void
 		{
 			var color:uint = (fill as SolidColor).color;
@@ -132,7 +132,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawEllipse(x:Number, y:Number, width:Number, height:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 applyStroke();
                 beginFill(new Rectangle(x,y,width,height), new Point(x,y));
@@ -169,7 +169,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawCircle(x:Number, y:Number, radius:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 applyStroke();
                 beginFill(new Rectangle(x,y,radius*2, radius*2),new Point(x-radius,y-radius));
@@ -211,7 +211,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawPath(data:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 applyStroke();
                 var bounds:Rectangle = PathHelper.getBounds(data);
@@ -259,7 +259,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawText(value:String, x:Number, y:Number):Object
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var textField:CSSTextField = new CSSTextField();
                 addChild(textField);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as
index f0101ab..4dd69a0 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.geom.Point;
         import flash.geom.Rectangle;            
@@ -22,11 +22,11 @@ package org.apache.flex.core.graphics
 
 	public interface IFill
 	{
-        COMPILE::AS3
+        COMPILE::SWF
 		function begin(s:GraphicShape,targetBounds:Rectangle, targetOrigin:Point):void;
-        COMPILE::AS3
+        COMPILE::SWF
 		function end(s:GraphicShape):void;
         COMPILE::JS
         function addFillAttrib(s:GraphicShape):String;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as
index be3f022..7dcfd6c 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as
@@ -16,7 +16,7 @@ package org.apache.flex.core.graphics
 {
 	public interface IStroke
 	{
-        COMPILE::AS3
+        COMPILE::SWF
 		function apply(s:GraphicShape):void;
         
         COMPILE::JS
@@ -26,4 +26,4 @@ package org.apache.flex.core.graphics
         function addStrokeAttrib(s:GraphicShape):String;
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as
index c36a37b..c4cf5db 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.GradientType;
         import flash.display.InterpolationMethod;
@@ -26,7 +26,7 @@ package org.apache.flex.core.graphics
 	
 	public class LinearGradient extends GradientBase implements IFill
 	{
-		COMPILE::AS3
+		COMPILE::SWF
 		private static var commonMatrix:Matrix = new Matrix();
         
 		private var _scaleX:Number;
@@ -44,7 +44,7 @@ package org.apache.flex.core.graphics
 			_scaleX = value;
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		public function begin(s:GraphicShape,targetBounds:Rectangle, targetOrigin:Point):void
 		{
 			commonMatrix.identity();
@@ -55,7 +55,7 @@ package org.apache.flex.core.graphics
 			
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		public function end(s:GraphicShape):void
 		{
 			s.graphics.endFill();
@@ -120,4 +120,4 @@ package org.apache.flex.core.graphics
         }
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as
index 7cef8bb..0a152bb 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.GraphicsPath;
         import flash.geom.Point;
@@ -60,7 +60,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawPath(xp:Number,yp:Number,data:String):void
 		{
-			COMPILE::AS3
+			COMPILE::SWF
             {
                 graphics.clear();
                 applyStroke();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as
index 5f402ec..3556459 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.CapsStyle;
         import flash.display.JointStyle;
@@ -44,7 +44,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawRect(xp:Number, yp:Number, width:Number, height:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 graphics.clear();
                 applyStroke();
@@ -82,4 +82,4 @@ package org.apache.flex.core.graphics
 		}
 		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as
index 73e99b0..81f9534 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.geom.Point;
         import flash.geom.Rectangle;            
@@ -81,13 +81,13 @@ package org.apache.flex.core.graphics
 			}
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		public function begin(s:GraphicShape,targetBounds:Rectangle,targetOrigin:Point):void
 		{
 			s.graphics.beginFill(color,alpha);
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		public function end(s:GraphicShape):void
 		{
 			s.graphics.endFill();
@@ -109,4 +109,4 @@ package org.apache.flex.core.graphics
             return 'fill:#' + String(color) + ';fill-opacity:' + String(alpha);
         }
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as
index 9535cdc..1d05507 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as
@@ -14,7 +14,7 @@
 
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.CapsStyle;
         import flash.display.JointStyle;            
@@ -103,7 +103,7 @@ package org.apache.flex.core.graphics
 			_weight = value;
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		public function apply(s:GraphicShape):void
 		{
 			s.graphics.lineStyle(weight,color,alpha,false,"normal",CapsStyle.SQUARE,JointStyle.MITER);
@@ -127,4 +127,4 @@ package org.apache.flex.core.graphics
         };
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as
index bc429ed..b493488 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core.graphics
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.text.TextFieldType;        
         import org.apache.flex.core.CSSTextField;            
@@ -53,7 +53,7 @@ package org.apache.flex.core.graphics
 		{
 			super();
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 _textField = new CSSTextField();
                 addChild(_textField);                    
@@ -61,7 +61,7 @@ package org.apache.flex.core.graphics
 		}
 		
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _textField:CSSTextField;
 		
 		/**
@@ -72,7 +72,7 @@ package org.apache.flex.core.graphics
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function get textField() : CSSTextField
 		{
 			return _textField;
@@ -95,7 +95,7 @@ package org.apache.flex.core.graphics
 		 */
 		public function drawText(value:String, xt:Number, yt:Number):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 textField.selectable = false;
                 textField.type = TextFieldType.DYNAMIC;
@@ -136,4 +136,4 @@ package org.apache.flex.core.graphics
         }
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as
index 7b1916b..4dc546e 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as
@@ -774,4 +774,4 @@ package org.apache.flex.core.graphics.utils
 		}
 		
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/.actionScriptProperties b/frameworks/projects/HTML/.actionScriptProperties
index d326dd7..dac63a4 100644
--- a/frameworks/projects/HTML/.actionScriptProperties
+++ b/frameworks/projects/HTML/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="HTML.as" projectUUID="10468643-4626-481f-ba6b-3f035ccbbabb" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/build.xml b/frameworks/projects/HTML/build.xml
index 8f206e3..5fb4679 100644
--- a/frameworks/projects/HTML/build.xml
+++ b/frameworks/projects/HTML/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index fb0608c..86a7e1f 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -33,18 +33,18 @@ internal class HTMLClasses
 	import org.apache.flex.html.accessories.PasswordInputBead; PasswordInputBead;
 	import org.apache.flex.html.accessories.TextPromptBead; TextPromptBead;
     import org.apache.flex.html.beads.AlertView; AlertView;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.BackgroundImageBead; BackgroundImageBead;
 	}
 	import org.apache.flex.html.beads.ButtonBarView; ButtonBarView;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.CheckBoxView; CheckBoxView;
 	    import org.apache.flex.html.beads.ComboBoxView; ComboBoxView;
 	}
     import org.apache.flex.html.beads.ContainerView; ContainerView;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.html.beads.ControlBarMeasurementBead; ControlBarMeasurementBead;
 	    import org.apache.flex.html.beads.CSSButtonView; CSSButtonView;
@@ -58,12 +58,12 @@ internal class HTMLClasses
 	}
 	import org.apache.flex.html.beads.ImageButtonView; ImageButtonView;
 	import org.apache.flex.html.beads.ListView; ListView;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.html.beads.NumericStepperView; NumericStepperView;
 	}
     import org.apache.flex.html.beads.PanelView; PanelView;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.html.beads.PanelWithControlBarView; PanelWithControlBarView;
 		import org.apache.flex.html.beads.RadioButtonView; RadioButtonView;
@@ -76,7 +76,7 @@ internal class HTMLClasses
 	}
 	import org.apache.flex.html.beads.SliderThumbView; SliderThumbView;
 	import org.apache.flex.html.beads.SliderTrackView; SliderTrackView;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.SolidBackgroundBead; SolidBackgroundBead;
 	    import org.apache.flex.html.beads.SpinnerView; SpinnerView;
@@ -92,29 +92,29 @@ internal class HTMLClasses
 	import org.apache.flex.html.beads.models.ArraySelectionModel; ArraySelectionModel;
     import org.apache.flex.html.beads.models.RangeModel; RangeModel;
     import org.apache.flex.html.beads.models.RangeModelExtended; RangeModelExtended;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.html.beads.models.ComboBoxModel; ComboBoxModel;
 	}
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.models.ImageModel; ImageModel;
 	    import org.apache.flex.html.beads.models.ImageAndTextModel; ImageAndTextModel;
 	}
 	import org.apache.flex.html.beads.models.PanelModel; PanelModel;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.html.beads.models.SingleLineBorderModel; SingleLineBorderModel;
 	}
 	import org.apache.flex.html.beads.models.TextModel; TextModel;
     import org.apache.flex.html.beads.models.TitleBarModel; TitleBarModel;
 	import org.apache.flex.html.beads.models.ToggleButtonModel; ToggleButtonModel;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.models.ValueToggleButtonModel; ValueToggleButtonModel;
 	}
 	import org.apache.flex.html.beads.models.ViewportModel; ViewportModel;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 	    import org.apache.flex.html.beads.controllers.AlertController; AlertController;
 		import org.apache.flex.html.beads.controllers.ComboBoxController; ComboBoxController;
@@ -124,7 +124,7 @@ internal class HTMLClasses
     import org.apache.flex.html.beads.controllers.ItemRendererMouseController; ItemRendererMouseController;
     import org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController; ListSingleSelectionMouseController;
 	import org.apache.flex.html.beads.controllers.TreeSingleSelectionMouseController; TreeSingleSelectionMouseController;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.controllers.SliderMouseController; SliderMouseController;
 		import org.apache.flex.html.beads.controllers.SpinnerMouseController; SpinnerMouseController;
@@ -135,7 +135,7 @@ internal class HTMLClasses
     import org.apache.flex.html.beads.layouts.VerticalLayout; VerticalLayout;
 	import org.apache.flex.html.beads.layouts.HorizontalLayout; HorizontalLayout;
     import org.apache.flex.html.beads.layouts.BasicLayout; BasicLayout;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.layouts.HScrollBarLayout; HScrollBarLayout;
     	import org.apache.flex.html.beads.layouts.VScrollBarLayout; VScrollBarLayout;
@@ -173,7 +173,7 @@ internal class HTMLClasses
 	import org.apache.flex.html.beads.WebBrowserView; WebBrowserView;
 	import org.apache.flex.html.beads.models.WebBrowserModel; WebBrowserModel;
 
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.HRuleView; HRuleView;
 		import org.apache.flex.html.beads.VRuleView; VRuleView;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as
index 24707c0..a6ae756 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as
@@ -52,7 +52,7 @@ package org.apache.flex.events
 		 */
 		public function ItemAddedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 super(type, bubbles, cancelable);                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as
index ac943b0..febc798 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as
@@ -53,7 +53,7 @@ package org.apache.flex.events
 		 */
 		public function ItemClickedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 super(type, bubbles, cancelable);                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as
index d638084..313f3f9 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as
@@ -52,7 +52,7 @@ package org.apache.flex.events
 		 */
 		public function ItemRemovedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 super(type, bubbles, cancelable);                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Button.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Button.as
index dbee62b..f6d13ea 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Button.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Button.as
@@ -20,7 +20,7 @@ package org.apache.flex.html
 {
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
-    COMPILE::AS3
+    COMPILE::SWF
     {
     	import org.apache.flex.core.UIButtonBase;
     }
@@ -66,7 +66,7 @@ package org.apache.flex.html
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class Button extends UIButtonBase implements IStrand, IEventDispatcher, IUIBase
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
index 7dff6da..bb1f6bd 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.events.MouseEvent;            
     }
@@ -26,7 +26,7 @@ package org.apache.flex.html
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IToggleButtonModel;
 	import org.apache.flex.core.IUIBase;
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.core.UIButtonBase;            
     }
@@ -61,7 +61,7 @@ package org.apache.flex.html
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class CheckBox extends UIButtonBase implements IStrand
 	{
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
index 2512a31..9365099 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
@@ -71,7 +71,7 @@ package org.apache.flex.html
          */
 		public function get text():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {                    
                 return ITextModel(model).text;
             }
@@ -86,7 +86,7 @@ package org.apache.flex.html
          */
 		public function set text(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 ITextModel(model).text = value;                    
             }
@@ -109,7 +109,7 @@ package org.apache.flex.html
          */
 		public function get html():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return ITextModel(model).html;                    
             }
@@ -124,7 +124,7 @@ package org.apache.flex.html
          */
 		public function set html(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 ITextModel(model).html = value;                    
             }
@@ -139,7 +139,7 @@ package org.apache.flex.html
         /**
          *  @private
          */
-        COMPILE::AS3
+        COMPILE::SWF
         override public function addedToParent():void
         {
             super.addedToParent();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/List.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/List.as
index 63bcf02..17c8b3f 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/List.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/List.as
@@ -248,7 +248,7 @@ package org.apache.flex.html
 		{
 			var result:Boolean = false;
 			
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				result = _itemRenderer != null;
 			}
 			

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as
index 894cf0c..1807381 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadView.as
@@ -165,7 +165,7 @@ package org.apache.flex.html
             //TODO:  Need to handle this case more gracefully
             catch(e:Error)
             {
-                COMPILE::AS3
+                COMPILE::SWF
                 {
                     trace(e.message);                        
                 }
@@ -314,4 +314,4 @@ package org.apache.flex.html
         }
 
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
index 8630ab1..66f4e42 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObject;
         import flash.events.MouseEvent;
@@ -27,7 +27,7 @@ package org.apache.flex.html
 	
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IValueToggleButtonModel;
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.core.UIButtonBase;            
     }
@@ -55,7 +55,7 @@ package org.apache.flex.html
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class RadioButton extends UIButtonBase implements IStrand
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SimpleAlert.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SimpleAlert.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SimpleAlert.as
index 676d9e7..76160c0 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SimpleAlert.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/SimpleAlert.as
@@ -121,7 +121,7 @@ package org.apache.flex.html
 		 */
 		static public function show(message:String, parent:Object):SimpleAlert
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var alert:SimpleAlert = new SimpleAlert();
                 alert.message = message;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as
index 57bc3c3..10b7555 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as
@@ -60,7 +60,7 @@ package org.apache.flex.html
          */
 		public function get text():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return ITextModel(model).text;                    
             }
@@ -76,7 +76,7 @@ package org.apache.flex.html
          */
 		public function set text(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 ITextModel(model).text = value;                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
index ca1bbcd..7d90ed1 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
@@ -54,7 +54,7 @@ package org.apache.flex.html
          */
 		public function get text():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {                    
                 return ITextModel(model).text;
             }
@@ -69,7 +69,7 @@ package org.apache.flex.html
          */
 		public function set text(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 ITextModel(model).text = value;                    
             }
@@ -90,7 +90,7 @@ package org.apache.flex.html
          */
 		public function get html():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return ITextModel(model).html;                    
             }
@@ -105,7 +105,7 @@ package org.apache.flex.html
          */
 		public function set html(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 ITextModel(model).html = value;                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as
index 1861405..70ad9a2 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as
@@ -59,7 +59,7 @@ package org.apache.flex.html
 		{
 			super();
 
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 model.addEventListener("textChange", textChangeHandler);                    
             }
@@ -76,7 +76,7 @@ package org.apache.flex.html
          */
 		public function get text():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return ITextModel(model).text;                    
             }
@@ -92,7 +92,7 @@ package org.apache.flex.html
          */
 		public function set text(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 inSetter = true;
                 ITextModel(model).text = value;
@@ -116,7 +116,7 @@ package org.apache.flex.html
          */
 		public function get html():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return ITextModel(model).html;                    
             }
@@ -132,7 +132,7 @@ package org.apache.flex.html
          */
 		public function set html(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 ITextModel(model).html = value;                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
index e6ca726..be86d41 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
@@ -87,7 +87,7 @@ package org.apache.flex.html
          */
         public function get selected():Boolean
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return IToggleButtonModel(model).selected;
             }
@@ -102,7 +102,7 @@ package org.apache.flex.html
          */
         public function set selected(value:Boolean):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 IToggleButtonModel(model).selected = value;
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/WebBrowser.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/WebBrowser.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/WebBrowser.as
index 009a508..7027359 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/WebBrowser.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/WebBrowser.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html
 {
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		import flash.events.Event;
 		import flash.html.HTMLLoader;
 		import flash.net.URLRequest;
@@ -53,7 +53,7 @@ package org.apache.flex.html
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class WebBrowser extends UIBase implements IHandlesOriginalEvent
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
index 8790830..3b23f5b 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
@@ -22,7 +22,7 @@ package org.apache.flex.html.accessories
 	{
 		import goog.events.BrowserEvent;
 	}
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import flash.events.TextEvent;
 		
@@ -32,7 +32,7 @@ package org.apache.flex.html.accessories
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.ITextFieldView;			
 	}
@@ -75,7 +75,7 @@ package org.apache.flex.html.accessories
 		{
 			_strand = value;
 			
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				IEventDispatcher(value).addEventListener("viewChanged",viewChangeHandler);					
 			}
@@ -130,7 +130,7 @@ package org.apache.flex.html.accessories
         /**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function viewChangeHandler(event:Event):void
 		{			
 			// get the ITextFieldView bead, which is required for this bead to work
@@ -151,7 +151,7 @@ package org.apache.flex.html.accessories
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function handleTextInput(event:TextEvent):void
 		{
 			var insert:String = event.text;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
index 191339b..e73822b 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.accessories
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.core.CSSTextField;			
 	}
@@ -27,7 +27,7 @@ package org.apache.flex.html.accessories
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.ITextFieldView;
 	}
@@ -70,7 +70,7 @@ package org.apache.flex.html.accessories
 		{
 			_strand = value;
 			
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				IEventDispatcher(value).addEventListener("viewChanged",viewChangeHandler);					
 			}
@@ -85,7 +85,7 @@ package org.apache.flex.html.accessories
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function viewChangeHandler(event:Event):void
 		{			
 			// get the ITextFieldView bead, which is required for this bead to work

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
index 5447da6..99e2866 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.accessories
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import flash.text.TextFieldType;			
 		
@@ -90,7 +90,7 @@ package org.apache.flex.html.accessories
 		{
 			_strand = value;
 			
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				// listen for changes in text to hide or show the prompt
 				var model:Object = UIBase(_strand).model;
@@ -120,14 +120,14 @@ package org.apache.flex.html.accessories
 			}
 		}
 		
-		COMPILE::AS3
+		COMPILE::SWF
 		private var promptField:CSSTextField;
 		private var promptAdded:Boolean;
 		
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function handleTextChange( event:Event ):void
 		{	
 			// see what the model currently has to determine if the prompt should be

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
index bee07e9..8cedc9a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
@@ -109,4 +109,4 @@ package org.apache.flex.html.beads
 			}
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ContainerView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ContainerView.as
index 26e78be..0c6696a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ContainerView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ContainerView.as
@@ -550,4 +550,4 @@ package org.apache.flex.html.beads
 			}
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
index b4e5b1d..92a3b99 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
@@ -196,4 +196,4 @@ package org.apache.flex.html.beads
 			}
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
index 8905fb9..c639b90 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
@@ -151,4 +151,4 @@ package org.apache.flex.html.beads
 			selectionModel.dispatchEvent(new Event("dataProviderChanged"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISliderView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISliderView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISliderView.as
index 3ad1743..14a51c4 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISliderView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISliderView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObject;            
     }
@@ -43,7 +43,7 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		function get track():DisplayObject;
 		
 		/**
@@ -54,7 +54,7 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		function get thumb():DisplayObject;
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISpinnerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISpinnerView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISpinnerView.as
index eb6adaa..b6b148a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISpinnerView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ISpinnerView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.DisplayObject;            
     }
@@ -44,7 +44,7 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		function get increment():DisplayObject;
 		
 		/**
@@ -55,7 +55,7 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		function get decrement():DisplayObject;
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageAndTextButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageAndTextButtonView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageAndTextButtonView.as
index b0ee998..3083465 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageAndTextButtonView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageAndTextButtonView.as
@@ -273,4 +273,4 @@ package org.apache.flex.html.beads
 			
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageButtonView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageButtonView.as
index 7e81263..21f34ca 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageButtonView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageButtonView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-COMPILE::AS3 {
+COMPILE::SWF {
 	import flash.display.Loader;
 	import flash.display.Shape;
 	import flash.display.SimpleButton;
@@ -60,7 +60,7 @@ COMPILE::AS3 {
 		 */
 		public function ImageButtonView()
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				upSprite = new Sprite();
 				downSprite = new Sprite();
 				overSprite = new Sprite();
@@ -79,7 +79,7 @@ COMPILE::AS3 {
 		{
 			super.strand = value;
 
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				shape = new Shape();
 				shape.graphics.beginFill(0xCCCCCC);
 				shape.graphics.drawRect(0, 0, 10, 10);
@@ -95,7 +95,7 @@ COMPILE::AS3 {
 			}
 		}
 
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			private var upSprite:Sprite;
 			private var downSprite:Sprite;
 			private var overSprite:Sprite;
@@ -105,7 +105,7 @@ COMPILE::AS3 {
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function setupBackground(sprite:Sprite, state:String = null):void
 		{
 			var backgroundImage:Object = ValuesManager.valuesImpl.getValue(_strand, "background-image", state);
@@ -146,7 +146,7 @@ COMPILE::AS3 {
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function updateHitArea():void
 		{
 			shape.graphics.clear();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
index 9c4875c..652392a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ImageView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.Bitmap;
         import flash.display.Loader;
@@ -62,9 +62,9 @@ package org.apache.flex.html.beads
 		{
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var bitmap:Bitmap;
-        COMPILE::AS3
+        COMPILE::SWF
 		private var loader:Loader;
 		
 		private var _model:IImageModel;
@@ -81,7 +81,7 @@ package org.apache.flex.html.beads
 		{
 			super.strand = value;
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 IEventDispatcher(_strand).addEventListener("widthChanged",handleSizeChange);
                 IEventDispatcher(_strand).addEventListener("heightChanged",handleSizeChange);                    
@@ -98,7 +98,7 @@ package org.apache.flex.html.beads
 		 */
 		private function handleUrlChange(event:Event):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (_model.source) {
                     loader = new Loader();
@@ -126,7 +126,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function onComplete(event:Object):void
 		{
             var host:UIBase = UIBase(_strand);
@@ -161,7 +161,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function handleSizeChange(event:Object):void
 		{
             var host:UIBase = UIBase(_strand);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderThumbView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderThumbView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderThumbView.as
index c20c781..2e99eef 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderThumbView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderThumbView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
     	import flash.display.Graphics;
     	import flash.display.Shape;
@@ -55,7 +55,7 @@ package org.apache.flex.html.beads
 		 */
 		public function SliderThumbView()
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 hitArea = new Shape();
                 upView = new Shape();
@@ -67,7 +67,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function drawView(g:Graphics, bgColor:uint):void
 		{
 			g.clear();
@@ -77,7 +77,7 @@ package org.apache.flex.html.beads
 			g.endFill();
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var hitArea:Shape;
 		
 		/**
@@ -94,7 +94,7 @@ package org.apache.flex.html.beads
 		{
 			super.strand = value;
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 drawView(hitArea.graphics, 0xDD0000);
                 drawView(upView.graphics, 0xFFFFFF);
@@ -131,11 +131,11 @@ package org.apache.flex.html.beads
             }
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var upView:Shape;
-        COMPILE::AS3
+        COMPILE::SWF
 		private var downView:Shape;
-        COMPILE::AS3
+        COMPILE::SWF
 		private var overView:Shape;
 		
         COMPILE::JS
@@ -144,7 +144,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function sizeChangeHandler( event:Event ) : void
 		{
 			drawView(hitArea.graphics, 0xDD0000);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderTrackView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderTrackView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderTrackView.as
index 6752347..4290ac7 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderTrackView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SliderTrackView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import flash.display.Graphics;
 		import flash.display.Shape;
@@ -57,7 +57,7 @@ package org.apache.flex.html.beads
 		 */
 		public function SliderTrackView()
 		{
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				hitArea = new Shape();
 				upView = new Shape();
@@ -69,7 +69,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function drawView(g:Graphics, bgColor:uint):void
 		{
 			g.clear();
@@ -79,7 +79,7 @@ package org.apache.flex.html.beads
 			g.endFill();
 		}
 		
-		COMPILE::AS3
+		COMPILE::SWF
 		private var hitArea:Shape;
 		
 		/**
@@ -94,7 +94,7 @@ package org.apache.flex.html.beads
 		{
 			super.strand = value;
 			
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				drawView(hitArea.graphics, 0xDD0000);
 				drawView(upView.graphics, 0xCCCCCC);
@@ -131,17 +131,17 @@ package org.apache.flex.html.beads
 		COMPILE::JS
 		public var element:WrappedHTMLElement;
 		
-		COMPILE::AS3
+		COMPILE::SWF
 		private var upView:Shape;
-		COMPILE::AS3
+		COMPILE::SWF
 		private var downView:Shape;
-		COMPILE::AS3
+		COMPILE::SWF
 		private var overView:Shape;
 		
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function sizeChangeHandler( event:Event ) : void
 		{
 			drawView(hitArea.graphics, 0xDD0000);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/WebBrowserView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/WebBrowserView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/WebBrowserView.as
index 46c9484..63d04e2 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/WebBrowserView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/WebBrowserView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.beads
 {
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		import flash.events.Event;
 		import flash.html.HTMLLoader;
 		import flash.net.URLRequest;
@@ -41,7 +41,7 @@ package org.apache.flex.html.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class WebBrowserView implements IBeadView
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ItemRendererMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ItemRendererMouseController.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ItemRendererMouseController.as
index 9e1073e..cf2f8cd 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ItemRendererMouseController.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ItemRendererMouseController.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.beads.controllers
 	import org.apache.flex.core.IBeadController;
 	import org.apache.flex.core.ISelectableItemRenderer;
 	import org.apache.flex.core.IStrand;
-COMPILE::AS3 {
+COMPILE::SWF {
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.MouseEvent;
 }
@@ -76,7 +76,7 @@ COMPILE::JS {
 			_strand = value;
             renderer = value as ISelectableItemRenderer;
 			
-			COMPILE::AS3 {
+			COMPILE::SWF {
 	            renderer.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
 	            renderer.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
 				renderer.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
@@ -96,7 +96,7 @@ COMPILE::JS {
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		protected function rollOverHandler(event:MouseEvent):void
 		{
 			var target:ISelectableItemRenderer = event.target as ISelectableItemRenderer;
@@ -118,7 +118,7 @@ COMPILE::JS {
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		protected function rollOutHandler(event:MouseEvent):void
 		{
 			var target:ISelectableItemRenderer = event.target as ISelectableItemRenderer;
@@ -141,7 +141,7 @@ COMPILE::JS {
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		protected function mouseDownHandler(event:MouseEvent):void
 		{
 			var target:ISelectableItemRenderer = event.currentTarget as ISelectableItemRenderer;
@@ -169,7 +169,7 @@ COMPILE::JS {
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		protected function mouseUpHandler(event:MouseEvent):void
 		{
 			var target:ISelectableItemRenderer = event.currentTarget as ISelectableItemRenderer;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SliderMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SliderMouseController.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SliderMouseController.as
index 6469fd0..487b365 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SliderMouseController.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SliderMouseController.as
@@ -83,7 +83,7 @@ package org.apache.flex.html.beads.controllers
 			
 			rangeModel = UIBase(value).model as IRangeModel;
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var sliderView:ISliderView = value.getBeadByType(ISliderView) as ISliderView;
                 sliderView.thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbDownHandler);
@@ -117,7 +117,7 @@ package org.apache.flex.html.beads.controllers
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function thumbDownHandler( event:MouseEvent ) : void
 		{
 			UIBase(_strand).topMostEventDispatcher.addEventListener(MouseEvent.MOUSE_MOVE, thumbMoveHandler);
@@ -132,7 +132,7 @@ package org.apache.flex.html.beads.controllers
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function thumbUpHandler( event:MouseEvent ) : void
 		{
 			UIBase(_strand).topMostEventDispatcher.removeEventListener(MouseEvent.MOUSE_MOVE, thumbMoveHandler);
@@ -141,15 +141,15 @@ package org.apache.flex.html.beads.controllers
 			IEventDispatcher(_strand).dispatchEvent(new Event("valueChange"));
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var origin:Point;
-        COMPILE::AS3
+        COMPILE::SWF
 		private var thumb:Point;
 		
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function thumbMoveHandler( event:MouseEvent ) : void
 		{
 			var sliderView:ISliderView = _strand.getBeadByType(ISliderView) as ISliderView;
@@ -169,7 +169,7 @@ package org.apache.flex.html.beads.controllers
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		private function trackClickHandler( event:MouseEvent ) : void
 		{
 			event.stopImmediatePropagation();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SpinnerMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SpinnerMouseController.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SpinnerMouseController.as
index 53309df..8303e12 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SpinnerMouseController.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/SpinnerMouseController.as
@@ -77,7 +77,7 @@ package org.apache.flex.html.beads.controllers
 			
 			rangeModel = UIBase(value).model as IRangeModel;
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var spinnerBead:ISpinnerView = value.getBeadByType(ISpinnerView) as ISpinnerView;
                 spinnerBead.decrement.addEventListener(MouseEvent.CLICK, decrementClickHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as
index 8a8c0d7..b566354 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as
@@ -82,7 +82,7 @@ package org.apache.flex.html.beads.layouts
          */
 		public function layout():Boolean
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 //trace(DOMPathUtil.getPath(host), event ? event.type : "fixed size");
                 var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
index 33399c3..1cfba0b 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
@@ -153,4 +153,4 @@ package org.apache.flex.html.beads.layouts
 			return true;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalLayout.as
index 13c8c8b..225e0ac 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalLayout.as
@@ -90,7 +90,7 @@ package org.apache.flex.html.beads.layouts
          */
 		public function layout():Boolean
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 //trace(DOMPathUtil.getPath(host), event ? event.type : "fixed size");
                 var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
@@ -250,7 +250,7 @@ package org.apache.flex.html.beads.layouts
             }
 		}
         
-        COMPILE::AS3
+        COMPILE::SWF
         private function setPositionAndHeight(child:IUIBase, top:Number, mt:Number, pt:Number,
                                              bottom:Number, mb:Number, pb:Number, h:Number,
                                              valign:*):void

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/TileLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/TileLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/TileLayout.as
index 39e70ef..848a769 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/TileLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/TileLayout.as
@@ -131,7 +131,7 @@ package org.apache.flex.html.beads.layouts
          */
 		public function layout():Boolean
 		{
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				// this is where the layout is calculated
 				var host:UIBase = _strand as UIBase;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
index d32777d..6eaa30a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
@@ -196,4 +196,4 @@ package org.apache.flex.html.beads.layouts
 			return true;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
index fe43af4..dd02989 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
@@ -90,7 +90,7 @@ package org.apache.flex.html.beads.layouts
 		 */
 		public function layout():Boolean
 		{
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				var layoutParent:ILayoutHost = host.getBeadByType(ILayoutHost) as ILayoutHost;
 				var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
@@ -305,7 +305,7 @@ package org.apache.flex.html.beads.layouts
 			}
 		}
 		
-		COMPILE::AS3
+		COMPILE::SWF
 		private function setPositionAndWidth(child:IUIBase, left:Number, ml:Number, pl:Number,
 											 right:Number, mr:Number, pr:Number, w:Number):void
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ListPresentationModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ListPresentationModel.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ListPresentationModel.as
index 897d8d6..8a372ac 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ListPresentationModel.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ListPresentationModel.as
@@ -104,4 +104,4 @@ package org.apache.flex.html.beads.models
 			_strand = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ViewportModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ViewportModel.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ViewportModel.as
index c15c5d8..26752ac 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ViewportModel.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/models/ViewportModel.as
@@ -69,4 +69,4 @@ package org.apache.flex.html.beads.models
 			_strand = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ContainerContentArea.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ContainerContentArea.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ContainerContentArea.as
index bd0c016..46426cd 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ContainerContentArea.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ContainerContentArea.as
@@ -64,7 +64,7 @@ package org.apache.flex.html.supportClasses
 		 */
 		public function removeAllElements():void
 		{
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				removeChildren(0);					
 			}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
index ac15dcf..f3b2527 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.supportClasses
 {
-	COMPILE::AS3
+	COMPILE::SWF
 	{
 		import flash.display.Sprite;
 	}
@@ -110,7 +110,7 @@ package org.apache.flex.html.supportClasses
 			_dataField = value;
 		}
 
-		COMPILE::AS3
+		COMPILE::SWF
 		private var background:Sprite;
 
 		COMPILE::JS
@@ -119,7 +119,7 @@ package org.apache.flex.html.supportClasses
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		override public function addedToParent():void
 		{
 			super.addedToParent();
@@ -133,7 +133,7 @@ package org.apache.flex.html.supportClasses
 		 */
 		override public function updateRenderer():void
 		{
-			COMPILE::AS3
+			COMPILE::SWF
 			{
 				super.updateRenderer();
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
index ec096ae..2a343fa 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
@@ -313,4 +313,4 @@ package org.apache.flex.html.supportClasses
 			// handle in subclass
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
index 395fea0..d7c8d71 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.supportClasses
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.geom.Rectangle;
     }
@@ -30,7 +30,7 @@ package org.apache.flex.html.supportClasses
 	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.IViewport;
 	import org.apache.flex.core.IViewportModel;
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.core.IViewportScroller;
     }
@@ -65,30 +65,30 @@ package org.apache.flex.html.supportClasses
 		{
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _verticalScroller:ScrollBar;
 
-        COMPILE::AS3
+        COMPILE::SWF
 		public function get verticalScroller():IViewportScroller
 		{
 			return _verticalScroller;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _horizontalScroller:ScrollBar
 
-        COMPILE::AS3
+        COMPILE::SWF
 		public function get horizontalScroller():IViewportScroller
 		{
 			return _horizontalScroller;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
         private var _verticalScrollPosition:Number = 0;
 
         public function get verticalScrollPosition():Number
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return _verticalScrollPosition;
             }
@@ -99,7 +99,7 @@ package org.apache.flex.html.supportClasses
         }
         public function set verticalScrollPosition(value:Number):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 _verticalScrollPosition = value;
                 handleVerticalScrollChange();
@@ -110,12 +110,12 @@ package org.apache.flex.html.supportClasses
             }
         }
 
-        COMPILE::AS3
+        COMPILE::SWF
         private var _horizontalScrollPosition:Number = 0;
 
         public function get horizontalScrollPosition():Number
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return _horizontalScrollPosition;
             }
@@ -126,7 +126,7 @@ package org.apache.flex.html.supportClasses
         }
         public function set horizontalScrollPosition(value:Number):void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 _horizontalScrollPosition = value;
                 handleHorizontalScrollChange();
@@ -162,7 +162,7 @@ package org.apache.flex.html.supportClasses
          */
 		override public function layoutViewportAfterContentLayout():Size
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var hadV:Boolean = _verticalScroller != null && _verticalScroller.visible;
                 var hadH:Boolean = _horizontalScroller != null && _horizontalScroller.visible;
@@ -272,7 +272,7 @@ package org.apache.flex.html.supportClasses
 
 		}
 
-		COMPILE::AS3
+		COMPILE::SWF
 		private function createVerticalScrollBar():ScrollBar
 		{
 			var vsbm:ScrollBarModel = new ScrollBarModel();
@@ -290,7 +290,7 @@ package org.apache.flex.html.supportClasses
 			return vsb;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private function createHorizontalScrollBar():ScrollBar
 		{
 			var hsbm:ScrollBarModel = new ScrollBarModel();
@@ -308,7 +308,7 @@ package org.apache.flex.html.supportClasses
 			return hsb;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private function handleVerticalScroll(event:Event):void
 		{
 			var host:UIBase = UIBase(_strand);
@@ -320,7 +320,7 @@ package org.apache.flex.html.supportClasses
 			_verticalScrollPosition = vpos;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private function handleHorizontalScroll(event:Event):void
 		{
 			var host:UIBase = UIBase(_strand);
@@ -332,7 +332,7 @@ package org.apache.flex.html.supportClasses
 			_horizontalScrollPosition = hpos;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private function handleVerticalScrollChange():void
 		{
 			if (_verticalScroller) {
@@ -340,7 +340,7 @@ package org.apache.flex.html.supportClasses
 			}
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private function handleHorizontalScrollChange():void
 		{
 			if (_horizontalScroller) {


[33/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/SystemRawChildrenList.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/SystemRawChildrenList.as
index e810815,0000000..5410b35
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/SystemRawChildrenList.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/SystemRawChildrenList.as
@@@ -1,240 -1,0 +1,240 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.geom.Point;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import org.apache.flex.geom.Point;		
 +}
 +import mx.core.IChildList;
 +import mx.core.mx_internal;
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  A SystemManager has various types of children,
 + *  such as the Application, popups, 
 + *  tooltips, and custom cursors.
 + *  You can access the just the custom cursors through
 + *  the <code>cursors</code> property,
 + *  the tooltips via <code>toolTips</code>, and
 + *  the popups via <code>popUpChildren</code>.  Each one returns
 + *  a SystemChildrenList which implements IChildList.  The SystemManager's
 + *  IChildList methods return the set of children that aren't popups, tooltips
 + *  or cursors.  To get the list of all children regardless of type, you
 + *  use the rawChildrenList property which returns this SystemRawChildrenList.
 + */
 +public class SystemRawChildrenList implements IChildList
 +{
 +    include "../core/Version.as";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  Constructor.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function SystemRawChildrenList(owner:SystemManager)
 +	{
 +		super();
 +
 +		this.owner = owner;
 +	}
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	private var owner:SystemManager;
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @copy mx.core.IChildList#numChildren
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function get numChildren():int
 +	{
 +		return owner.$numChildren;
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#getChildAt
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	public function getChildAt(index:int):DisplayObject
 +  	{
 +		return owner.rawChildren_getChildAt(index);
 +  	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#addChild
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function addChild(child:DisplayObject):DisplayObject
 +  	{
 +		return owner.rawChildren_addChild(child);
 +  	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#addChildAt
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function addChildAt(child:DisplayObject, index:int):DisplayObject
 +  	{
 +		return owner.rawChildren_addChildAt(child,index);
 +  	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#removeChild
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function removeChild(child:DisplayObject):DisplayObject
 +  	{
 +		return owner.rawChildren_removeChild(child);
 +  	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#removeChildAt
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function removeChildAt(index:int):DisplayObject
 +  	{
 +		return owner.rawChildren_removeChildAt(index);
 +  	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#getChildByName
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	public function getChildByName(name:String):DisplayObject
 +  	{
 +		return owner.rawChildren_getChildByName(name);
 +	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#getChildIndex
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	public function getChildIndex(child:DisplayObject):int
 +  	{
 +		return owner.rawChildren_getChildIndex(child);
 +  	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#setChildIndex
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function setChildIndex(child:DisplayObject, newIndex:int):void
 +  	{
 +		owner.rawChildren_setChildIndex(child, newIndex);
 +  	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#getObjectsUnderPoint
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function getObjectsUnderPoint(point:Point):Array
 +	{
 +		return owner.rawChildren_getObjectsUnderPoint(point);
 +	}
 +	
 +	/**
 +	 *  @copy mx.core.IChildList#contains
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function contains(child:DisplayObject):Boolean
 +	{
 +		return owner.rawChildren_contains(child);
 +	}
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManager.as
index 95a55ff,0000000..c105158
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManager.as
@@@ -1,526 -1,0 +1,526 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +}
 +import org.apache.flex.events.EventDispatcher;
 +import mx.core.IToolTip;
 +import mx.core.IUIComponent;
 +import mx.core.Singleton;
 +import mx.core.mx_internal;
 +import mx.effects.IAbstractEffect;
 +
 +/**
 + *  The ToolTipManager lets you set basic ToolTip and error tip functionality,
 + *  such as display delay and the disabling of ToolTips.
 + *
 + *  @see mx.controls.ToolTip
 + *  @see mx.validators.Validator
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ToolTipManager extends EventDispatcher
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Linker dependency on implementation class.
 +     */
 +    private static var implClassDependency:ToolTipManagerImpl;
 +
 +    /**
 +     *  @private
 +     *  Storage for the impl getter.
 +     *  This gets initialized on first access,
 +     *  not at static initialization time, in order to ensure
 +     *  that the Singleton registry has already been initialized.
 +     */
 +    private static var _impl:IToolTipManager2;
 +
 +    /**
 +     *  @private
 +     *  The singleton instance of ToolTipManagerImpl which was
 +     *  registered as implementing the IToolTipManager2 interface.
 +     */
 +    private static function get impl():IToolTipManager2
 +    {
 +        if (!_impl)
 +        {
 +            _impl = IToolTipManager2(
 +                Singleton.getInstance("mx.managers::IToolTipManager2"));
 +        }
 +        
 +        return _impl;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  currentTarget
 +    //----------------------------------
 +
 +    /**
 +     *  The UIComponent that is currently displaying a ToolTip,
 +     *  or <code>null</code> if none is.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get currentTarget():DisplayObject
 +    {
 +        return impl.currentTarget;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public static function set currentTarget(value:DisplayObject):void
 +    {
 +        impl.currentTarget = value;
 +    }
 +    
 +    //----------------------------------
 +    //  currentToolTip
 +    //----------------------------------
 +
 +    /**
 +     *  The ToolTip object that is currently visible,
 +     *  or <code>null</code> if none is shown.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get currentToolTip():IToolTip
 +    {
 +        return impl.currentToolTip;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set currentToolTip(value:IToolTip):void
 +    {
 +        impl.currentToolTip = value;
 +    }
 +
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +    /**
 +     *  If <code>true</code>, the ToolTipManager will automatically show
 +     *  ToolTips when the user moves the mouse pointer over components.
 +     *  If <code>false</code>, no ToolTips will be shown.
 +     *
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get enabled():Boolean
 +    {
 +        return impl.enabled;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set enabled(value:Boolean):void
 +    {
 +        impl.enabled = value;
 +    }
 +
 +    //----------------------------------
 +    //  hideDelay
 +    //----------------------------------
 +
 +    /**
 +     *  The amount of time, in milliseconds, that Flex waits
 +     *  to hide the ToolTip after it appears.
 +     *  Once Flex hides a ToolTip, the user must move the mouse
 +     *  off the component and then back onto it to see the ToolTip again.
 +     *  If you set <code>hideDelay</code> to <code>Infinity</code>,
 +     *  Flex does not hide the ToolTip until the user triggers an event,
 +     *  such as moving the mouse off of the component.
 +     *
 +     *  @default 10000
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get hideDelay():Number
 +    {
 +        return impl.hideDelay;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public static function set hideDelay(value:Number):void
 +    {
 +        impl.hideDelay = value;
 +    }
 +
 +    //----------------------------------
 +    //  hideEffect
 +    //----------------------------------
 +
 +    /**
 +     *  The effect that plays when a ToolTip is hidden,
 +     *  or <code>null</code> if the ToolTip should disappear with no effect.
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get hideEffect():IAbstractEffect
 +    {
 +        return impl.hideEffect;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set hideEffect(value:IAbstractEffect):void
 +    {
 +        impl.hideEffect = value;
 +    }
 +
 +    //----------------------------------
 +    //  scrubDelay
 +    //----------------------------------
 +
 +    /**
 +     *  The amount of time, in milliseconds, that a user can take
 +     *  when moving the mouse between controls before Flex again waits
 +     *  for the duration of <code>showDelay</code> to display a ToolTip.
 +     *
 +     *  <p>This setting is useful if the user moves quickly from one control
 +     *  to another; after displaying the first ToolTip, Flex will display
 +     *  the others immediately rather than waiting.
 +     *  The shorter the setting for <code>scrubDelay</code>, the more
 +     *  likely that the user must wait for an amount of time specified
 +     *  by <code>showDelay</code> in order to see the next ToolTip.
 +     *  A good use of this property is if you have several buttons on a
 +     *  toolbar, and the user will quickly scan across them to see brief
 +     *  descriptions of their functionality.</p>
 +     *
 +     *  @default 100
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get scrubDelay():Number
 +    {
 +        return impl.scrubDelay;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set scrubDelay(value:Number):void
 +    {
 +        impl.scrubDelay = value;
 +    }
 +
 +    //----------------------------------
 +    //  showDelay
 +    //----------------------------------
 +
 +    /**
 +     *  The amount of time, in milliseconds, that Flex waits
 +     *  before displaying the ToolTip box once a user
 +     *  moves the mouse over a component that has a ToolTip.
 +     *  To make the ToolTip appear instantly, set <code>showDelay</code> to 0.
 +     *
 +     *  @default 500
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get showDelay():Number
 +    {
 +        return impl.showDelay;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set showDelay(value:Number):void
 +    {
 +        impl.showDelay = value;
 +    }
 +
 +    //----------------------------------
 +    //  showEffect
 +    //----------------------------------
 +
 +    /**
 +     *  The effect that plays when a ToolTip is shown,
 +     *  or <code>null</code> if the ToolTip should appear with no effect.
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get showEffect():IAbstractEffect
 +    {
 +        return impl.showEffect;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set showEffect(value:IAbstractEffect):void
 +    {
 +        impl.showEffect = value;
 +    }
 +
 +    //----------------------------------
 +    //  toolTipClass
 +    //----------------------------------
 +
 +    /**
 +     *  The class to use for creating ToolTips.
 +     *  
 +     *  @default mx.controls.ToolTip
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function get toolTipClass():Class
 +    {
 +        return impl.toolTipClass;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function set toolTipClass(value:Class):void
 +    {
 +        impl.toolTipClass = value;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Registers a target UIComponent or UITextField, and the text
 +     *  for its ToolTip, with the ToolTipManager.
 +     *  This causes the ToolTipManager to display a ToolTip
 +     *  when the mouse hovers over the target.
 +     *
 +     *  <p>This method is called by the setter
 +     *  for the toolTip property in UIComponent and UITextField.</p>
 +     *
 +     *  @param target The UIComponent or UITextField that owns the ToolTip.
 +     *
 +     *  @param toolTip The text to display in the ToolTip.
 +     *  If null, no ToolTip will be displayed when the mouse hovers
 +     *  over the target.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal static function registerToolTip(target:DisplayObject,
 +                                                oldToolTip:String,
 +                                                newToolTip:String):void
 +    {
 +        impl.registerToolTip(target, oldToolTip, newToolTip);
 +    }
 +
 +    /**
 +     *  Registers a target UIComponent, and the text
 +     *  for its error tip, with the ToolTipManager.
 +     *  This causes the ToolTipManager to display an error tip
 +     *  when the mouse hovers over the target.
 +     *
 +     *  <p>This method is called by the setter
 +     *  for the errorString property in UIComponent.</p>
 +     *
 +     *  @param target The UIComponent or UITextField that owns the ToolTip.
 +     *
 +     *  @param toolTip The text to display in the ToolTip.
 +     *  If null, no ToolTip will be displayed when the mouse hovers
 +     *  over the target.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal static function registerErrorString(target:DisplayObject,
 +                                                    oldErrorString:String,
 +                                                    newErrorString:String):void
 +    {
 +        impl.registerErrorString(target, oldErrorString, newErrorString);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Objects added to the SystemManager's ToolTip layer don't get
 +     *  automatically measured or sized, so ToolTipManager has to
 +     *  measure it and set its size.
 +     */
 +    mx_internal static function sizeTip(toolTip:IToolTip):void
 +    {
 +        impl.sizeTip(toolTip);
 +    }
 +
 +    /**
 +     *  Creates an instance of the ToolTip class with the specified text
 +     *  and displays it at the specified location in stage coordinates.
 +     *
 +     *  <p>ToolTips appear in their own layer, on top of everything
 +     *  except cursors.</p>
 +     *
 +     *  <p>The standard way of using ToolTips is to let the ToolTipManager
 +     *  automatically show and hide them as the user moves the mouse over
 +     *  the objects that have the <code>toolTip</code> property set.
 +     *  You can turn off this automatic ToolTip management by setting
 +     *  the ToolTipManager's <code>enabled</code> property to
 +     *  <code>false</code>.</p>
 +     *
 +     *  <p>By contrast, this method&#x2014;along with <code>destroyToolTip()</code>&#x2014;gives 
 +     *  you programmatic control over ToolTips.
 +     *  You can show them when and where you choose,
 +     *  and you can even show more than one at once if you need to.
 +     *  (The ToolTipManager never does this, because it is generally
 +     *  confusing to the user).</p>
 +     *
 +     *  <p>This method first creates a new instance of ToolTip and calls the 
 +     *  <code>addChild()</code> method to put it into the SystemManager's
 +     *  toolTips layer.
 +     *  If you are showing an error tip, it sets the appropriate styles.
 +     *  Then it sets the text for the ToolTip, sizes the ToolTip based on
 +     *  its text, and positions it where you specified.</p>
 +     *
 +     *  <p>You must save the reference to the ToolTip that this method
 +     *  returns so that you can pass it to the <code>destroyToolTip()</code> method.</p>
 +     *
 +     *  @param text The text to display in the ToolTip instance.
 +     *
 +     *  @param x The horizontal coordinate of the ToolTip in stage coordinates.
 +     *  In case of multiple stages, the relevant stage is determined
 +     *  from the <code>context</code> argument.
 +     *
 +     *  @param y The vertical coordinate of the ToolTip in stage coordinates.
 +     *  In case of multiple stages, the relevant stage is determined
 +     *  from the <code>context</code> argument.
 +     *
 +     *  @param errorTipBorderStyle The border style of an error tip. This method 
 +     *  argument can be null, "errorTipRight", "errorTipAbove", or "errorTipBelow". 
 +     *  If it is null, then the <code>createToolTip()</code> method creates a normal ToolTip. If it is 
 +     *  "errorTipRight", "errorTipAbove", or "errorTipBelow", then the <code>createToolTip()</code> 
 +     *  method creates an error tip, and this parameter determines where the arrow 
 +     *  of the error tip points to (the error's target). For example, if you pass "errorTipRight", Flex 
 +     *  positions the error tip (via the x and y arguments) to the 
 +     *  right of the error target; the arrow is on the left edge of the error tip.
 +     *
 +     *  @param context Determines which StyleManager is used. Typically, you pass the object on 
 +     *  which the ToolTip appears, so that the ToolTip's StyleManager is the same one that is used by that object. 
 +     *
 +     *  @return The newly created ToolTip.
 +     *
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function createToolTip(text:String, x:Number, y:Number,
 +                                         errorTipBorderStyle:String = null,
 +                                         context:IUIComponent = null):IToolTip
 +    {
 +        return impl.createToolTip(text, x, y, errorTipBorderStyle, context);
 +    }
 +
 +    /**
 +     *  Destroys a specified ToolTip that was created by the <code>createToolTip()</code> method.
 +     *
 +     *  <p>This method calls the <code>removeChild()</code> method to remove the specified
 +     *  ToolTip from the SystemManager's ToolTips layer.
 +     *  It will then be garbage-collected unless you keep a
 +     *  reference to it.</p>
 +     *
 +     *  <p>You should not call this method on the ToolTipManager's
 +     *  <code>currentToolTip</code>.</p>
 +     *
 +     *  @param toolTip The ToolTip instance to destroy.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function destroyToolTip(toolTip:IToolTip):void
 +    {
 +        return impl.destroyToolTip(toolTip);
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManagerImpl.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManagerImpl.as
index a1c6f2f,0000000..0cb6c02
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/ToolTipManagerImpl.as
@@@ -1,1760 -1,0 +1,1760 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +	import flash.events.TimerEvent;
 +}
 +COMPILE::JS
 +{
 +	import mx.managers.SystemManagerGlobals;
 +	
 +	import flex.display.DisplayObject;
 +	import flex.events.TimerEvent;
 +}
 +import org.apache.flex.events.Event;
 +import org.apache.flex.events.EventDispatcher;
 +import org.apache.flex.events.MouseEvent;
 +import org.apache.flex.geom.Point;
 +import org.apache.flex.geom.Rectangle;
 +import org.apache.flex.utils.PointUtils;
 +import org.apache.flex.utils.Timer;
 +
 +import mx.controls.ToolTip;
 +import mx.core.FlexGlobals;
 +import mx.core.FlexVersion;
 +import mx.core.IFlexDisplayObject;
 +import mx.core.IFlexModule;
 +import mx.core.IInvalidating;
 +import mx.core.ILayoutDirectionElement;
 +import mx.core.IToolTip;
 +import mx.core.IUIComponent;
 +import mx.core.IVisualElement;
 +import mx.core.LayoutDirection;
 +import mx.core.mx_internal;
 +import mx.effects.EffectManager;
 +import mx.effects.IAbstractEffect;
 +import mx.events.DynamicEvent;
 +import mx.events.EffectEvent;
 +import mx.events.ToolTipEvent;
 +import mx.styles.IStyleClient;
 +import mx.validators.IValidatorListener;
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  The ToolTipManager lets you set basic ToolTip and error tip functionality,
 + *  such as display delay and the disabling of ToolTips.
 + *
 + *  @see mx.controls.ToolTip
 + *  @see mx.validators.Validator
 + */
 +public class ToolTipManagerImpl extends EventDispatcher
 +             implements IToolTipManager2
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private static var instance:IToolTipManager2;
 +
 +	/**
 +	 * @private
 +	 * 
 +	 * Place to hook in additional classes
 +	 */
 +	public static var mixins:Array;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    public static function getInstance():IToolTipManager2
 +    {
 +        if (!instance)
 +            instance = new ToolTipManagerImpl();
 +
 +        return instance;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public function ToolTipManagerImpl()
 +    {
 +        super();
 +        
 +        if (instance)
 +            throw new Error("Instance already exists.");
 +
 +		if (mixins)
 +		{
 +			var n:int = mixins.length;
 +			for (var i:int = 0; i < n; i++)
 +			{
 +				new mixins[i](this);
 +			}
 +		}
 +
 +        if (hasEventListener("initialize"))
 +    		dispatchEvent(new Event("initialize"));
 +
 +		COMPILE::JS
 +		{
 +			SystemManagerGlobals.topLevelSystemManagers[0].addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);		
 +		}
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  A flag that keeps track of whether this class's initialize()
 +     *  method has been executed.
 +     */
 +    mx_internal var initialized:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  This timer is used to delay the appearance of a normal ToolTip
 +     *  after the mouse moves over a target; an error tip has no such delay.
 +     *
 +     *  <p>This timer, which is lazily created, is started when the mouse
 +     *  moves over an object with a ToolTip, with a duration specified
 +     *  by showDelay.
 +     *  If the mouse moves out of this object before the timer fires,
 +     *  the ToolTip is never created.
 +     *  If the mouse stays over the object until the timer fires,
 +     *  the ToolTip is created and its showEffect is started.
 +     */
 +    mx_internal var showTimer:Timer;
 +
 +    /**
 +     *  @private
 +     *  This timer is used to make the tooltip "time out" and hide itself
 +     *  if the mouse stays over a target.
 +     *
 +     *  <p>This timer, which is lazily created, is started
 +     *  when the showEffect ends.
 +     *  When it fires, the hideEffect is started.</p>
 +     */
 +    mx_internal var hideTimer:Timer;
 +
 +    /**
 +     *  @private
 +     *  This timer is used to implement mousing quickly over multiple targets
 +     *  with ToolTip...
 +     *
 +     *  <p>This timer, which is lazily created, is started
 +     *  when ...</p>
 +     */
 +    mx_internal var scrubTimer:Timer;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var currentText:String;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var isError:Boolean;
 +
 +    /**
 +     *  The UIComponent with the ToolTip assigned to it
 +     *  that was most recently under the mouse.
 +     *  During much of the tool tip life cycle this property
 +     *  has the same value as the <code>currentTarget</code> property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal var previousTarget:DisplayObject;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  currentTarget
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _currentTarget:DisplayObject;
 +
 +    /**
 +     *  The UIComponent that is currently displaying a ToolTip,
 +     *  or <code>null</code> if none is.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get currentTarget():DisplayObject
 +    {
 +        return _currentTarget;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set currentTarget(value:DisplayObject):void
 +    {
 +        _currentTarget = value;
 +    }
 +
 +    //----------------------------------
 +    //  currentToolTip
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var _currentToolTip:DisplayObject;
 +
 +    /**
 +     *  The ToolTip object that is currently visible,
 +     *  or <code>null</code> if none is shown.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get currentToolTip():IToolTip
 +    {
 +        return _currentToolTip as IToolTip;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set currentToolTip(value:IToolTip):void
 +    {
 +        _currentToolTip = value as DisplayObject;
 +
 +        if (hasEventListener("currentToolTip"))
 +    		dispatchEvent(new Event("currentToolTip"));
 +    }
 +
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _enabled:Boolean = true;
 +
 +    /**
 +     *  If <code>true</code>, the ToolTipManager will automatically show
 +     *  ToolTips when the user moves the mouse pointer over components.
 +     *  If <code>false</code>, no ToolTips will be shown.
 +     *
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get enabled():Boolean 
 +    {
 +        return _enabled;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set enabled(value:Boolean):void
 +    {
 +        _enabled = value;
 +    }
 +
 +    //----------------------------------
 +    //  hideDelay
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _hideDelay:Number = 10000; // milliseconds
 +
 +    /**
 +     *  The amount of time, in milliseconds, that Flex waits
 +     *  to hide the ToolTip after it appears.
 +     *  Once Flex hides a ToolTip, the user must move the mouse
 +     *  off the component and then back onto it to see the ToolTip again.
 +     *  If you set <code>hideDelay</code> to <code>Infinity</code>,
 +     *  Flex does not hide the ToolTip until the user triggers an event,
 +     *  such as moving the mouse off of the component.
 +     *
 +     *  @default 10000
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get hideDelay():Number 
 +    {
 +        return _hideDelay;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set hideDelay(value:Number):void
 +    {
 +        _hideDelay = value;
 +    }
 +
 +    //----------------------------------
 +    //  hideEffect
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _hideEffect:IAbstractEffect;
 +
 +    /**
 +     *  The effect that plays when a ToolTip is hidden,
 +     *  or <code>null</code> if the ToolTip should disappear with no effect.
 +	 *
 +	 *  <p>Effects are not marshaled across applicationDomains in a sandbox
 +	 *  as they may not be supportable in different versions</p>
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get hideEffect():IAbstractEffect
 +    {
 +        return _hideEffect;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set hideEffect(value:IAbstractEffect):void
 +    {
 +        _hideEffect = value as IAbstractEffect;
 +    }
 +
 +    //----------------------------------
 +    //  scrubDelay
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _scrubDelay:Number = 100; // milliseconds
 +
 +    /**
 +     *  The amount of time, in milliseconds, that a user can take
 +     *  when moving the mouse between controls before Flex again waits
 +     *  for the duration of <code>showDelay</code> to display a ToolTip.
 +     *
 +     *  <p>This setting is useful if the user moves quickly from one control
 +     *  to another; after displaying the first ToolTip, Flex will display
 +     *  the others immediately rather than waiting.
 +     *  The shorter the setting for <code>scrubDelay</code>, the more
 +     *  likely that the user must wait for an amount of time specified
 +     *  by <code>showDelay</code> in order to see the next ToolTip.
 +     *  A good use of this property is if you have several buttons on a
 +     *  toolbar, and the user will quickly scan across them to see brief
 +     *  descriptions of their functionality.</p>
 +     *
 +     *  @default 100
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get scrubDelay():Number 
 +    {
 +        return _scrubDelay;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set scrubDelay(value:Number):void
 +    {
 +        _scrubDelay = value;
 +    }
 +
 +    //----------------------------------
 +    //  showDelay
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _showDelay:Number = 500; // milliseconds
 +
 +    /**
 +     *  The amount of time, in milliseconds, that Flex waits
 +     *  before displaying the ToolTip box once a user
 +     *  moves the mouse over a component that has a ToolTip.
 +     *  To make the ToolTip appear instantly, set <code>showDelay</code> to 0.
 +     *
 +     *  @default 500
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get showDelay():Number 
 +    {
 +        return _showDelay;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set showDelay(value:Number):void
 +    {
 +        _showDelay = value;
 +    }
 +
 +    //----------------------------------
 +    //  showEffect
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _showEffect:IAbstractEffect;
 +
 +    /**
 +     *  The effect that plays when a ToolTip is shown,
 +     *  or <code>null</code> if the ToolTip should appear with no effect.
 +	 *
 +	 *  <p>Effects are not marshaled across applicationDomains in a sandbox
 +	 *  as they may not be supportable in different versions</p>
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get showEffect():IAbstractEffect
 +    {
 +        return _showEffect;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set showEffect(value:IAbstractEffect):void
 +    {
 +        _showEffect = value as IAbstractEffect;
 +    }
 +
 +    //----------------------------------
 +    //  toolTipClass
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _toolTipClass:Class = ToolTip;
 +
 +    /**
 +     *  The class to use for creating ToolTips.
 +     *  
 +	 *  <p>The ToolTipClass is not marshaled across applicationDomains in a sandbox
 +	 *  as they may not be supportable in different versions.  Child
 +	 *  applications should only be interested in setting the tooltip
 +	 *  for objects within themselves</p>
 +     *
 +     *  @default mx.controls.ToolTip
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get toolTipClass():Class 
 +    {
 +        return _toolTipClass;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set toolTipClass(value:Class):void
 +    {
 +        _toolTipClass = value;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Initializes the class.
 +     *
 +     *  <p>This method sets up three Timer objects that ToolTipManager
 +     *  starts and stops while tracking the mouse.
 +     *  The repeatCount is set to 1 so that they fire only once.
 +     *  Their duration is set later, just before they are started.
 +     *  The timers are never destroyed once they are created here.</p>
 +     *
 +     *  <p>This method is called by targetChanged(); Flex waits to initialize
 +     *  the class until mouse-tracking happens in order to optimize
 +     *  startup time.</p>
 +     */
 +    mx_internal function initialize():void
 +    {
 +        if (!showTimer)
 +        {
 +            showTimer = new Timer(0, 1);
 +            showTimer.addEventListener(TimerEvent.TIMER,
 +                                       showTimer_timerHandler);
 +        }
 +
 +        if (!hideTimer)
 +        {
 +            hideTimer = new Timer(0, 1);
 +            hideTimer.addEventListener(TimerEvent.TIMER,
 +                                       hideTimer_timerHandler);
 +        }
 +
 +        if (!scrubTimer)
 +            scrubTimer = new Timer(0, 1);
 +
 +        initialized = true;
 +    }
 +
 +    /**
 +     *  Registers a target UIComponent or UITextField, and the text
 +     *  for its ToolTip, with the ToolTipManager.
 +     *  This causes the ToolTipManager to display a ToolTip
 +     *  when the mouse hovers over the target.
 +     *
 +     *  <p>This method is called by the setter
 +     *  for the toolTip property in UIComponent and UITextField.</p>
 +     *
 +     *  @param target The UIComponent or UITextField that owns the ToolTip.
 +     *
 +     *  @param oldToolTip The old text that was displayed
 +     *  in the ToolTip.
 +     * 
 +     *  @param newToolTip The new text to display in the ToolTip.
 +     *  If null, no ToolTip will be displayed when the mouse hovers
 +     *  over the target.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function registerToolTip(target:DisplayObject,
 +                                    oldToolTip:String,
 +									newToolTip:String):void
 +    {
 +        if (!oldToolTip && newToolTip)
 +        {
 +            target.addEventListener(MouseEvent.MOUSE_OVER,
 +                                    toolTipMouseOverHandler);
 +            target.addEventListener(MouseEvent.MOUSE_OUT,
 +                                    toolTipMouseOutHandler);
 +                                    
 +            // If the mouse is already over the object
 +            // that's getting a toolTip, show the tip.
 +            if (mouseIsOver(target))
 +            	showImmediately(target);
 +        }
 +        else if (oldToolTip && !newToolTip)
 +        {
 +            target.removeEventListener(MouseEvent.MOUSE_OVER,
 +                                       toolTipMouseOverHandler);
 +            target.removeEventListener(MouseEvent.MOUSE_OUT,
 +                                       toolTipMouseOutHandler);
 +            
 +            // If the mouse is over the object whose toolTip
 +            // is being removed, hide the tip.
 +            if (mouseIsOver(target))
 +            	hideImmediately();
 +        }
 +    }
 +
 +    /**
 +     *  Registers a target UIComponent, and the text
 +     *  for its error tip, with the ToolTipManager.
 +     *  This causes the ToolTipManager to display an error tip
 +     *  when the mouse hovers over the target.
 +     *
 +     *  <p>This method is called by the setter
 +     *  for the errorString property in UIComponent.</p>
 +     *
 +     *  @param target The UIComponent or UITextField that owns the ToolTip.
 +     * 
 +     *  @param oldErrorString The old text that was displayed
 +     *  in the error tip.
 +     *
 +     *  @param newErrorString The new text to display in the error tip.
 +     *  If null, no error tip will be displayed when the mouse hovers
 +     *  over the target.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function registerErrorString(target:DisplayObject,
 +                                        oldErrorString:String,
 +										newErrorString:String):void
 +    {
 +        if (!oldErrorString && newErrorString)
 +        {
 +            target.addEventListener(MouseEvent.MOUSE_OVER,
 +                                    errorTipMouseOverHandler);
 +            target.addEventListener(MouseEvent.MOUSE_OUT,
 +                                    errorTipMouseOutHandler);
 +                                    
 +            // If the mouse is already over the object
 +            // that's getting an errorTip, show the tip.
 +            if (mouseIsOver(target))
 +            	showImmediately(target);
 +        }
 +        else if (oldErrorString && !newErrorString)
 +        {
 +            target.removeEventListener(MouseEvent.MOUSE_OVER,
 +                                       errorTipMouseOverHandler);
 +            target.removeEventListener(MouseEvent.MOUSE_OUT,
 +                                       errorTipMouseOutHandler);
 +            
 +            // If the mouse is over the object whose toolTip
 +            // is being removed, hide the tip.
 +            if (mouseIsOver(target))
 +            	hideImmediately();
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Returns true if the mouse is over the specified target.
 +     */
 +    private function mouseIsOver(target:DisplayObject):Boolean
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			if (!target || !target.stage)
 +				return false;
 +			
 +			//SDK:13465 - If we pass through the above if block, then
 +			//we have a target component and its been added to the 
 +			//display list. If the mouse coordinates are (0,0), there 
 +			//is a chance the component has not been positioned yet 
 +			//and we'll end up mistakenly showing tooltips since the 
 +			//target hitTest will return true. 
 +			if ((target.stage.mouseX == 0)	 && (target.stage.mouseY == 0))
 +				return false;
 +			
 +			if (target is ILayoutManagerClient && !ILayoutManagerClient(target).initialized)
 +				return false;
 +			
 +			if (target is IVisualElement && !IVisualElement(target).visible)
 +				return false;
 +			
 +			if (target is IFlexDisplayObject && !IFlexDisplayObject(target).visible)
 +				return false;
 +			
 +			if (!isVisibleParentsIncluded(target))
 +				return false;
 +			
 +			return target.hitTestPoint(target.stage.mouseX,
 +				target.stage.mouseY, true);				
 +		}
 +		COMPILE::JS
 +		{
 +			var screenPos:Point = new Point(target.x, target.y);
 +			screenPos = PointUtils.localToGlobal(screenPos, target);
 +			var screenX:Number = lastMouseEvent.screenX;
 +			var screenY:Number = lastMouseEvent.screenY;
 +			return ((screenPos.x <= screenX && screenX <= screenPos.x + target.width) &&
 +					(screenPos.y <= screenY && screenY <= screenPos.y + target.height));
 +		}
 +    }
 +    
 +    /**
 +     * @private
 +     * <p>Determines if the UIComponent and the parents in the hierarchy
 +     * are visible, if yes return true, otherwise returns false.</p>
 +     *
 +     * @param target DisplayObject
 +     * @return Boolean true is all parents are visible, false if one of them is invisible
 +     */
 +    private static function isVisibleParentsIncluded(target:DisplayObject):Boolean
 +    {
 +        if (target == null) return false;
 +        return isTopLevelApplication(target) ? target.visible :
 +                    target.visible && isVisibleParentsIncluded(target.parent);
 +    }
 +    
 +    /**
 +     * @private
 +     *
 +     * <p>Determines if the target is topLevelApplication and
 +     * returns true if yes, otherwise false
 +     *
 +     * @param target UIComponent
 +     * @return Boolean true is is topLevelApplication, otherwise false
 +     */
 +    private static function isTopLevelApplication(target:DisplayObject):Boolean
 +    {
 +        return target == FlexGlobals.topLevelApplication;
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Shows the tip immediately when the toolTip or errorTip property 
 +     *  becomes non-null and the mouse is over the target.
 +     */
 +    private function showImmediately(target:DisplayObject):void
 +    {
 +    	var oldShowDelay:Number = ToolTipManager.showDelay;
 +    	ToolTipManager.showDelay = 0;
 +    	checkIfTargetChanged(target);
 +    	ToolTipManager.showDelay = oldShowDelay;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Hides the tip immediately when the toolTip or errorTip property 
 +     *  becomes null and the mouse is over the target.
 +     */
 +    private function hideImmediately():void
 +    {
 +    	checkIfTargetChanged(null);
 +    }
 +
 +    /**
 +     *  Replaces the ToolTip, if necessary.
 +     *
 +     *  <p>Determines whether the UIComponent or UITextField object
 +     *  with the ToolTip assigned to it that is currently under the mouse
 +     *  pointer is the most recent such object.
 +     *  If not, it removes the old ToolTip and displays the new one.</p>
 +     *
 +     *  @param displayObject The UIComponent or UITextField that is currently under the mouse.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function checkIfTargetChanged(displayObject:DisplayObject):void
 +    {
 +        if (!enabled)
 +            return;
 +
 +        findTarget(displayObject);
 +		
 +        if (currentTarget != previousTarget)
 +        {
 +            targetChanged();
 +            previousTarget = currentTarget;
 +        }
 +    }
 +
 +    /**
 +     *  Searches from the <code>displayObject</code> object up the chain
 +     *  of parent objects until it finds a UIComponent or UITextField object
 +     *  with a <code>toolTip</code> or <code>errorString</code> property.
 +     *  Treats an empty string as a valid <code>toolTip</code> property.
 +     *  Sets the <code>currentTarget</code> property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function findTarget(displayObject:DisplayObject):void
 +    {
 +        // Walk up the DisplayObject parent chain looking for a UIComponent
 +        // with a toolTip or errorString property. Note that we stop
 +        // even if we find a tooltip which is an empty string. Although
 +        // we don't display empty tooltips, we have to track when we
 +        // are over a movieclip with an empty tooltip so that we can
 +        // hide any previous tooltip. This allows a child to set
 +        // toolTip="" to "cancel" its parent's toolTip.
 +        while (displayObject)
 +        {
 +            if (displayObject is IValidatorListener)
 +            {
 +                currentText = IValidatorListener(displayObject).errorString;
 +                var showErrorTip:Boolean;
 +                if (displayObject is IStyleClient)
 +                    showErrorTip = FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0 ||
 +                                   IStyleClient(displayObject).getStyle("showErrorTip");
 +                if (currentText != null && currentText != "" && showErrorTip)
 +                {
 +                    currentTarget = displayObject;
 +                    isError = true;
 +                    return;
 +                }
 +            }
 +
 +            if (displayObject is IToolTipManagerClient)
 +            {
 +                currentText = IToolTipManagerClient(displayObject).toolTip;
 +                if (currentText != null)
 +                {
 +                    currentTarget = displayObject;
 +                    isError = false;
 +                    return;
 +                }
 +            }
 +
 +            displayObject = displayObject.parent;
 +        }
 +
 +        currentText = null;
 +        currentTarget = null;
 +    }
 +
 +    /**
 +     *  Removes any ToolTip that is currently displayed and displays
 +     *  the ToolTip for the UIComponent that is currently under the mouse
 +     *  pointer, as determined by the <code>currentTarget</code> property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function targetChanged():void
 +    {
 +        // Do lazy creation of the Timer objects this class uses.
 +        if (!initialized)
 +            initialize();
 +
 +        var event:ToolTipEvent;
 +        
 +        if (previousTarget && currentToolTip)
 +        {
 +			if (currentToolTip is IToolTip)
 +			{
 +				event = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
 +				event.toolTip = currentToolTip;
 +				previousTarget.dispatchEvent(event);
 +			}
 +			else
 +			{
 +                if (hasEventListener(ToolTipEvent.TOOL_TIP_HIDE))
 +		    		dispatchEvent(new Event(ToolTipEvent.TOOL_TIP_HIDE));
 +			}
 +        }   
 +            
 +        reset();
 +
 +        if (currentTarget)
 +        {
 +            // Don't display empty tooltips.
 +            if (currentText == "")
 +                return;
 +
 +            // Dispatch a "startToolTip" event
 +            // from the object displaying the tooltip.
 +            event = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START);
 +            currentTarget.dispatchEvent(event);
 +
 +            if (showDelay == 0 || scrubTimer.running)
 +            {
 +                // Create the tooltip and start its showEffect.
 +                createTip();
 +                initializeTip();
 +                positionTip();
 +                showTip();
 +            }
 +            else
 +            {
 +                showTimer.delay = showDelay;
 +                showTimer.start();
 +                // After the delay, showTimer_timerHandler()
 +                // will create the tooltip and start its showEffect.
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  Creates an invisible new ToolTip.
 +     *
 +     *  <p>If the ToolTipManager's <code>enabled</code> property is
 +     *  <code>true</code> this method is automatically called
 +     *  when the user moves the mouse over an object that has
 +     *  the <code>toolTip</code> property set,
 +     *  The ToolTipManager makes subsequent calls to
 +     *  <code>initializeTip()</code>, <code>positionTip()</code>,
 +     *  and <code>showTip()</code> to complete the display
 +     *  of the ToolTip.</p>
 +     *
 +     *  <p>The type of ToolTip that is created is determined by the
 +     *  <code>toolTipClass</code> property.
 +     *  By default, this is the ToolTip class.
 +     *  This class can be styled to appear as either a normal ToolTip
 +     *  (which has a yellow background by default) or as an error tip
 +     *  for validation errors (which is red by default).</p>
 +     *
 +     *  <p>After creating the ToolTip with the <code>new</code>
 +     *  operator, this method stores a reference to it in the
 +     *  <code>currentToolTip</code> property.
 +     *  It then uses addChild() to add this ToolTip to the
 +     *  SystemManager's toolTips layer.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function createTip():void
 +    {
 +        // Dispatch a "createToolTip" event
 +        // from the object displaying the tooltip.
 +        var event:ToolTipEvent =
 +            new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE);
 +        currentTarget.dispatchEvent(event);
 +
 +        if (event.toolTip)
 +            currentToolTip = event.toolTip;
 +        else
 +            currentToolTip = new toolTipClass();
 +
 +        currentToolTip.visible = false;
 +
 +        // Set the tooltip to be in the same module factory as the target to the
 +        // correct style manager is used. Don't overwrite an existing module factory.
 +        if (currentToolTip is IFlexModule && IFlexModule(currentToolTip).moduleFactory == null && 
 +            currentTarget is IFlexModule)
 +            IFlexModule(currentToolTip).moduleFactory = IFlexModule(currentTarget).moduleFactory;
 +        
 +		COMPILE::LATER
 +		{
 +        if (hasEventListener("createTip"))
 +    		if (!dispatchEvent(new Event("createTip", false, true)))
 +	    		return;
 +		}
 +
 +        var sm:ISystemManager = getSystemManager(currentTarget) as ISystemManager;
 +       	sm.topLevelSystemManager.toolTipChildren.addChild(currentToolTip as DisplayObject);
 +    }
 +
 +    /**
 +     *  Initializes a newly created ToolTip with the appropriate text,
 +     *  based on the object under the mouse.
 +     *
 +     *  <p>If the ToolTipManager's <code>enabled</code> property is
 +     *  <code>true</code> this method is automatically called
 +     *  when the user moves the mouse over an object that has
 +     *  the <code>toolTip</code> property set.
 +     *  The ToolTipManager calls <code>createTip()</code> before
 +     *  this method, and <code>positionTip()</code> and
 +     *  <code>showTip()</code> after.</p>
 +     *
 +     *  <p>If a normal ToolTip is being displayed, this method
 +     *  sets its text as specified by the <code>toolTip</code>
 +     *  property of the object under the mouse.
 +     *  If an error tip is being displayed, the text is as
 +     *  specified by the <code>errorString</code> property
 +     *  of the object under the mouse.</p>
 +     *
 +     *  <p>This method also makes the ToolTip the appropriate
 +     *  size for the text that it needs to display.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function initializeTip():void
 +    {
 +        // Set the text of the tooltip.
 +        if (currentToolTip is IToolTip)
 +            IToolTip(currentToolTip).text = currentText;
 +
 +        if (isError && currentToolTip is IStyleClient)
 +            IStyleClient(currentToolTip).setStyle("styleName", "errorTip");
 +        
 +        sizeTip(currentToolTip);
 +
 +        if (currentToolTip is IStyleClient)
 +        {
 +            // Set up its "show" and "hide" effects.
 +            if (showEffect)
 +                IStyleClient(currentToolTip).setStyle("showEffect", showEffect);
 +            if (hideEffect)
 +                IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect);
 +        }
 +
 +        if (showEffect || hideEffect)
 +        {
 +            currentToolTip.addEventListener(EffectEvent.EFFECT_END,
 +                                            effectEndHandler);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Objects added to the SystemManager's ToolTip layer don't get
 +     *  automatically measured or sized, so ToolTipManager has to
 +     *  measure it and set its size.
 +     */
 +    public function sizeTip(toolTip:IToolTip):void
 +    {
 +        // Force measure() to be called on the tooltip.
 +        // Otherwise, its measured size will be 0.
 +        if (toolTip is IInvalidating)
 +            IInvalidating(toolTip).validateNow();
 +        
 +        toolTip.setActualSize(
 +            toolTip.getExplicitOrMeasuredWidth(),
 +            toolTip.getExplicitOrMeasuredHeight());
 +    }
 +
 +    /**
 +     *  Positions a newly created and initialized ToolTip on the stage.
 +     *
 +     *  <p>If the ToolTipManager's <code>enabled</code> property is
 +     *  <code>true</code> this method is automatically called
 +     *  when the user moves the mouse over an object that has
 +     *  the <code>toolTip</code> property set.
 +     *  The ToolTipManager calls <code>createTip()</code> and
 +     *  <code>initializeTip()</code> before this method,
 +     *  and <code>showTip()</code> after.</p>
 +     *
 +     *  <p>If a normal ToolTip is being displayed, this method positions
 +     *  its upper-left (upper-right) corner near the lower-right (lower-left)
 +     *  of the arrow cursor.  This method ensures that the ToolTip is 
 +     *  completely in view.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function positionTip():void
 +    {
 +        // Determine layoutDirection of the target component.
 +        var layoutDirection:String;
 +        if (currentTarget is ILayoutDirectionElement)
 +            layoutDirection = ILayoutDirectionElement(currentTarget).layoutDirection;
 +        else
 +            layoutDirection = LayoutDirection.LTR;
 +        
 +        const mirror:Boolean = (layoutDirection == LayoutDirection.RTL);
 +        
 +        var x:Number;
 +        var y:Number;
 +        
 +        var screenWidth:Number = currentToolTip.screen.width;
 +        var screenHeight:Number = currentToolTip.screen.height;
 +        
 +        if (isError)
 +        {
 +            // Tooltips are laid out in the same direction as the target 
 +            // component.
 +            var tipElt:ILayoutDirectionElement = 
 +                currentToolTip as ILayoutDirectionElement;
 +                        
 +            if (tipElt && 
 +                tipElt.layoutDirection != layoutDirection)
 +            {
 +                tipElt.layoutDirection = layoutDirection;
 +                // sizeTip below will call validateNow()
 +                tipElt.invalidateLayoutDirection();
 +            }
 +            
 +            var targetGlobalBounds:Rectangle = 
 +                getGlobalBounds(currentTarget, currentToolTip.root, mirror);
 +            
 +            x = mirror ?
 +                    targetGlobalBounds.left - 4 :
 +                    targetGlobalBounds.right + 4;
 +            y = targetGlobalBounds.top - 1;
 +            
 +            // If there's no room to the right (left) of the control, put it 
 +            // above or below, with the left (right) edge of the error tip 
 +            // aligned with the left (right) edge of the target.
 +            var noRoom:Boolean = mirror ?
 +                                 x < currentToolTip.width :    
 +                                 x + currentToolTip.width > screenWidth;            
 +            if (noRoom)
 +            {
 +                var newWidth:Number = NaN;
 +                var oldWidth:Number = NaN;
 +                
 +                x = mirror ?
 +                        targetGlobalBounds.right + 2 - currentToolTip.width :
 +                        targetGlobalBounds.left - 2;
 +                
 +                // If the error tip would be too wide for the stage,
 +                // reduce the maximum width to fit onstage. Note that
 +                // we have to reassign the text in order to get the tip
 +                // to relayout after changing the border style and maxWidth.
 +                if (mirror)
 +                {
 +                    if (x < currentToolTip.width + 4) 
 +                    {
 +                        // -4 on the left, +2 on the right = -2
 +                        x = 4;
 +                        newWidth = targetGlobalBounds.right - 2;                        
 +                    }
 +                }
 +                else
 +                {
 +                    if (x + currentToolTip.width + 4 > screenWidth)
 +                        newWidth = screenWidth - x - 4;                            
 +                }
 +                
 +                if (!isNaN(newWidth))
 +                {
 +                    oldWidth = Object(toolTipClass).maxWidth;
 +                    Object(toolTipClass).maxWidth = newWidth;
 +                    if (currentToolTip is IStyleClient)
 +                        IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
 +                    currentToolTip["text"] = currentToolTip["text"];
 +                } 
 +
 +                    // Even if the error tip will fit onstage, we still need to
 +                    // change the border style and get the error tip to relayout.
 +                else
 +                {
 +                    if (currentToolTip is IStyleClient)
 +                        IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
 +                    currentToolTip["text"] = currentToolTip["text"];
 +                }
 +                
 +                if (currentToolTip.height + 2 < targetGlobalBounds.top)
 +                {
 +                    // There's room to put it above the control.
 +                    y = targetGlobalBounds.top - (currentToolTip.height + 2);
 +                }
 +                else
 +                {
 +                    // No room above, put it below the control.
 +                    y = targetGlobalBounds.bottom + 2;
 +                    
 +                    if (!isNaN(newWidth))
 +                        Object(toolTipClass).maxWidth = newWidth;
 +                    if (currentToolTip is IStyleClient)
 +                        IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
 +                    currentToolTip["text"] = currentToolTip["text"];
 +                }
 +            }
 +            
 +            // Since the border style of the error tip may have changed,
 +            // we have to force a remeasurement and change its size.
 +            // This is because objects in the toolTips layer
 +            // don't undergo normal measurement and layout.
 +            sizeTip(currentToolTip);
 +            
 +            // If we changed the tooltip max size, we change it back.
 +            // Otherwise, if RTL, and x wasn't set for maxWidth, reposition 
 +            // because the width may have changed during the remeasure.
 +            if (!isNaN(oldWidth))
 +                Object(toolTipClass).maxWidth = oldWidth;
 +            else if (mirror)
 +                x = targetGlobalBounds.right + 2 - currentToolTip.width;
 +        }
 +        else
 +        {
 +            var sm:ISystemManager = getSystemManager(currentTarget);
 +            // Position the upper-left (upper-right) of the tooltip
 +            // at the lower-right (lower-left) of the arrow cursor.
 +            x = DisplayObject(sm).mouseX + 11; 
 +            if (mirror)
 +                x -= currentToolTip.width;
 +            y = DisplayObject(sm).mouseY + 22;
 +            
 +            // If the tooltip is too wide to fit onstage, move it left (right).
 +            var toolTipWidth:Number = currentToolTip.width;
 +            if (mirror)
 +            {
 +                if (x < 2)
 +                    x = 2;
 +            }
 +            else if (x + toolTipWidth > screenWidth)
 +            {
 +                x = screenWidth - toolTipWidth;
 +            }
 +            
 +            // If the tooltip is too tall to fit onstage, move it up.
 +            var toolTipHeight:Number = currentToolTip.height;
 +            if (y + toolTipHeight > screenHeight)
 +                y = screenHeight - toolTipHeight;
 +            
 +            var pos:Point = new Point(x, y);
 +            pos = PointUtils.localToGlobal(pos, sm);
 +			COMPILE::LATER
 +			{
 +	            pos = PointUtils.globalToLocal(pos, sm.getSandboxRoot());
 +			}
 +            x = pos.x;
 +            y = pos.y;
 +        }
 +     
 +        currentToolTip.move(x, y);
 +    }
 +
 +    /**
 +     *  Shows a newly created, initialized, and positioned ToolTip.
 +     *
 +     *  <p>If the ToolTipManager's <code>enabled</code> property is
 +     *  <code>true</code> this method is automatically called
 +     *  when the user moves the mouse over an object that has
 +     *  the <code>toolTip</code> property set.
 +     *  The ToolTipManager calls <code>createTip()</code>,
 +     *  <code>initializeTip()</code>, and <code>positionTip()</code>
 +     *  before this method.</p>
 +     *
 +     *  <p>This method first dispatches a <code>"showToolTip"</code>
 +     *  event from the object under the mouse.
 +     *  This gives you a chance to do special processing on a
 +     *  particular object's ToolTip just before it becomes visible.
 +     *  It then makes the ToolTip visible, which triggers
 +     *  the ToolTipManager's <code>showEffect</code> if one is specified.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function showTip():void
 +    {
 +        // Dispatch a "showToolTip" event
 +        // from the object displaying the tooltip.
 +        var event:ToolTipEvent =
 +            new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW);
 +        event.toolTip = currentToolTip;
 +        currentTarget.dispatchEvent(event);
 +
 +        if (isError)
 +        {
 +            // Listen for a change event so we know when to hide the tip
 +            currentTarget.addEventListener(Event.CHANGE, changeHandler);
 +        }
 +        else
 +        {
 +            var sm:ISystemManager = getSystemManager(currentTarget);
 +            sm.addEventListener(MouseEvent.MOUSE_DOWN,
 +                                systemManager_mouseDownHandler);
 +        }
 +
 +        // Make the tooltip visible.
 +        // If showEffect exists, this effect will play.
 +        // When the effect ends, effectEndHandler()
 +        // will start the hideTimer.
 +        currentToolTip.visible = true;
 +
 +        if (!showEffect)
 +            showEffectEnded();
 +    }
 +
 +    /**
 +     *  Hides the current ToolTip.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function hideTip():void
 +    {
 +        // Dispatch a "hideToolTip" event
 +        // from the object that was displaying the tooltip.
 +        if (previousTarget)
 +        {
 +            var event:ToolTipEvent =
 +                new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
 +            event.toolTip = currentToolTip;
 +            previousTarget.dispatchEvent(event);
 +        }
 +
 +        // Make the tooltip invisible.
 +        // If hideEffect exists, this effect will play.
 +        // When the effect ends, effectEndHandler()
 +        // will reset the ToolTipManager to a no-tip state.
 +        if (currentToolTip)
 +            currentToolTip.visible = false;
 +
 +        // When to do this?
 +        if (isError)
 +        {
 +            if (currentTarget)
 +                currentTarget.removeEventListener(Event.CHANGE, changeHandler);
 +        }
 +        else
 +        {
 +            if (previousTarget)
 +            {
 +                var sm:ISystemManager = getSystemManager(previousTarget);
 +                sm.removeEventListener(MouseEvent.MOUSE_DOWN,
 +                                       systemManager_mouseDownHandler);
 +            }
 +        }
 +
 +        if (!hideEffect)
 +            hideEffectEnded();
 +    }
 +
 +    /**
 +     *  Removes any currently visible ToolTip.
 +     *  If the ToolTip is starting to show or hide, this method
 +     *  removes the ToolTip immediately without completing the effect.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function reset():void
 +    {
 +        // Reset the three timers, in case any are running.
 +        showTimer.reset();
 +        hideTimer.reset();
 +
 +        // If there is a current tooltip...
 +        if (currentToolTip)
 +        {
 +            // Remove the event handlers for the effectEnd of the showEffect
 +            // and hideEffect, so that calling endEffectsForTarget() doesn't
 +            // trigger effectEndHandler().
 +            if (showEffect || hideEffect)
 +            {
 +                currentToolTip.removeEventListener(EffectEvent.EFFECT_END,
 +                                                   effectEndHandler);
 +            }
 +
 +            // End any show or hide effects that might be playing on it.
 +            EffectManager.endEffectsForTarget(currentToolTip);
 +
 +            var e:DynamicEvent;
 +            if (hasEventListener("removeChild"))
 +            {
 +                e = new DynamicEvent("removeChild", false, true);
 +                e.sm = currentToolTip.systemManager;
 +                e.toolTip = currentToolTip;
 +            }
 +			if (!e || dispatchEvent(e))
 +			{
 +				// Remove it.
 +				var sm:ISystemManager = currentToolTip.systemManager as ISystemManager;
 +           		sm.topLevelSystemManager.toolTipChildren.removeChild(currentToolTip as DisplayObject);
 +			}
 +            currentToolTip = null;
 +
 +            scrubTimer.delay = scrubDelay;
 +            scrubTimer.reset();
 +            if (scrubDelay > 0)
 +			{
 +                scrubTimer.delay = scrubDelay;
 +                scrubTimer.start();
 +			}
 +        }
 +    }
 +
 +    /**
 +     *  Creates an instance of the ToolTip class with the specified text
 +     *  and displays it at the specified location in stage coordinates.
 +     *
 +     *  <p>ToolTips appear in their own layer, on top of everything
 +     *  except cursors.</p>
 +     *
 +     *  <p>The standard way of using ToolTips is to let the ToolTipManager
 +     *  automatically show and hide them as the user moves the mouse over
 +     *  the objects that have the <code>toolTip</code> property set.
 +     *  You can turn off this automatic ToolTip management by setting
 +     *  the ToolTipManager's <code>enabled</code> property to
 +     *  <code>false</code>.</p>
 +     *
 +     *  <p>By contrast, this method&#x2014;along with <code>hideToolTip()</code>&#x2014;gives 
 +     *  you programmatic control over ToolTips.
 +     *  You can show them when and where you choose,
 +     *  and you can even show more than one at once if you need to.
 +     *  (The ToolTipManager never does this, because it is generally
 +     *  confusing to the user).</p>
 +     *
 +     *  <p>This method first creates a new instance of ToolTip and calls the 
 +     *  <code>addChild()</code> method to put it into the SystemManager's
 +     *  toolTips layer.
 +     *  If you are showing an error tip, it sets the appropriate styles.
 +     *  Then it sets the text for the ToolTip, sizes the ToolTip based on
 +     *  its text, and positions it where you specified.</p>
 +     *
 +     *  <p>You must save the reference to the ToolTip that this method
 +     *  returns so that you can pass it to the <code>hideToolTip()</code> method.</p>
 +     *
 +     *  @param text The text to display in the ToolTip instance.
 +     *
 +     *  @param x The horizontal coordinate of the ToolTip in stage coordinates.
 +     *  In case of multiple stages, the relevant stage is determined
 +     *  from the <code>context</code> argument.
 +     *
 +     *  @param y The vertical coordinate of the ToolTip in stage coordinates.
 +     *  In case of multiple stages, the relevant stage is determined
 +     *  from the <code>context</code> argument.
 +     *
 +     *  @param errorTipBorderStyle The border style of an error tip. This method 
 +     *  argument can be null, "errorTipRight", "errorTipAbove", or "errorTipBelow". 
 +     *  If it is null, then the <code>createToolTip()</code> method creates a normal ToolTip. If it is 
 +     *  "errorTipRight", "errorTipAbove", or "errorTipBelow", then the <code>createToolTip()</code> 
 +     *  method creates an error tip, and this parameter determines where the arrow 
 +     *  of the error tip points to (the error's target). For example, if you pass "errorTipRight", Flex 
 +     *  positions the error tip (via the x and y arguments) to the 
 +     *  right of the error target; the arrow is on the left edge of the error tip.
 +     *
 +     *  @param context This property is not currently used.
 +     *
 +     *  @return The newly created ToolTip.
 +     *
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function createToolTip(text:String, x:Number, y:Number,
 +                                         errorTipBorderStyle:String = null,
 +                                         context:IUIComponent = null):IToolTip
 +    {
 +        var toolTip:ToolTip = new ToolTip();
 +
 +        var sm:ISystemManager = context ?
 +                                          context.systemManager as ISystemManager:
 +                                          FlexGlobals.topLevelApplication.systemManager as ISystemManager;
 +
 +        if (context is IFlexModule)
 +            toolTip.moduleFactory = IFlexModule(context).moduleFactory;
 +        else
 +            toolTip.moduleFactory = sm;
 +        
 +        var e:DynamicEvent;
 +        if (hasEventListener("addChild"))
 +        {
 +            e = new DynamicEvent("addChild", false, true);
 +            e.sm = sm;
 +            e.toolTip = toolTip;
 +        }
 +		if (!e || dispatchEvent(e))
 +		{
 +		    sm.topLevelSystemManager.toolTipChildren.addChild(toolTip as DisplayObject);
 +		}
 +
 +        if (errorTipBorderStyle)
 +        {
 +            toolTip.setStyle("styleName", "errorTip");
 +            toolTip.setStyle("borderStyle", errorTipBorderStyle);
 +        }
 +
 +        toolTip.text = text;
 +
 +        sizeTip(toolTip);
 +
 +        toolTip.move(x, y);
 +        // Ensure that tip is on screen?
 +        // Should x and y for error tip be tip of pointy border?
 +
 +        // show effect?
 +
 +        return toolTip as IToolTip;
 +    }
 +
 +    /**
 +     *  Destroys a specified ToolTip that was created by the <code>createToolTip()</code> method.
 +     *
 +     *  <p>This method calls the <code>removeChild()</code> method to remove the specified
 +     *  ToolTip from the SystemManager's ToolTips layer.
 +     *  It will then be garbage-collected unless you keep a
 +     *  reference to it.</p>
 +     *
 +     *  <p>You should not call this method on the ToolTipManager's
 +     *  <code>currentToolTip</code>.</p>
 +     *
 +     *  @param toolTip The ToolTip instance to destroy.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function destroyToolTip(toolTip:IToolTip):void
 +    {
 +        var e:DynamicEvent;
 +        if (hasEventListener("removeChild"))
 +        {
 +            e = new DynamicEvent("removeChild", false, true);
 +            e.sm = toolTip.systemManager;
 +            e.toolTip = toolTip;
 +        }
 +		if (!e || dispatchEvent(e))
 +		{
 +			// Remove it.
 +			var sm:ISystemManager = toolTip.systemManager as ISystemManager;
 +           	sm.topLevelSystemManager.toolTipChildren.removeChild(toolTip as DisplayObject);
 +		}
 +
 +        // hide effect?
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function showEffectEnded():void
 +    {
 +        if (hideDelay == 0)
 +        {
 +            hideTip();
 +        }
 +        else if (hideDelay < Infinity)
 +        {
 +            hideTimer.delay = hideDelay;
 +            hideTimer.start();
 +        }
 +        if (currentTarget)
 +        {
 +            // Dispatch a "toolTipShown" event
 +            // from the object displaying the tooltip.
 +            var event:ToolTipEvent =
 +                new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN);
 +            event.toolTip = currentToolTip;
 +            currentTarget.dispatchEvent(event);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function hideEffectEnded():void
 +    {
 +        reset();
 +        // Dispatch a "toolTipEnd" event
 +        // from the object that was displaying the tooltip.
 +        if (previousTarget)
 +        {
 +            var event:ToolTipEvent =
 +                new ToolTipEvent(ToolTipEvent.TOOL_TIP_END);
 +            event.toolTip = currentToolTip;
 +            previousTarget.dispatchEvent(event);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +     mx_internal function getSystemManager(
 +                                    target:DisplayObject):ISystemManager
 +     {
 +        return target is IUIComponent ?
 +               IUIComponent(target).systemManager :
 +               null;
 +     }
 +
 +    /**
 +     *  @private
 +     */
 +    private static function getGlobalBounds(obj:DisplayObject,
 +                                     parent:DisplayObject, 
 +                                     mirror:Boolean):Rectangle
 +    {
 +        var upperLeft:Point = new Point(0, 0);
 +        
 +        upperLeft = PointUtils.localToGlobal(upperLeft, obj);
 +        
 +        // If the layout has been mirrored, then the 0,0 is the uppper
 +        // right corner; compensate here.
 +        if (mirror)
 +            upperLeft.x -= obj.width;
 +
 +        upperLeft = PointUtils.globalToLocal(upperLeft, obj);
 +        
 +        return new Rectangle(upperLeft.x, upperLeft.y, obj.width, obj.height);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the mouse moves over an object
 +     *  with a toolTip.
 +     */
 +    mx_internal function toolTipMouseOverHandler(event:MouseEvent):void
 +    {
 +        checkIfTargetChanged(DisplayObject(event.target));
 +    }
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the mouse moves out of an object
 +     *  with a toolTip.
 +	 *  @flexjsignorecoercion flex.display.DisplayObject
 +     */
 +    mx_internal function toolTipMouseOutHandler(event:MouseEvent):void
 +    {
 +        checkIfTargetChanged(event.relatedObject as DisplayObject);
 +    }
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the mouse moves over an object
 +     *  with an errorString.
 +     */
 +    mx_internal function errorTipMouseOverHandler(event:MouseEvent):void
 +    {
 +        checkIfTargetChanged(DisplayObject(event.target));
 +    }
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the mouse moves out of an object
 +     *  with an errorString.
 +	 *  @flexjsignorecoercion flex.display.DisplayObject
 +     */
 +    mx_internal function errorTipMouseOutHandler(event:MouseEvent):void
 +    {
 +        checkIfTargetChanged(event.relatedObject as DisplayObject);
 +    }
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the showTimer fires.
 +     *  It creates the tooltip and starts its showEffect.
 +     */
 +    mx_internal function showTimer_timerHandler(event:TimerEvent):void
 +    {
 +        // Make sure we still have a currentTarget when the timer fires.
 +        if (currentTarget)
 +        {
 +            createTip();
 +            initializeTip();
 +            positionTip();
 +            showTip();
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the hideTimer fires.
 +     *  It starts the hideEffect.
 +     */
 +    mx_internal function hideTimer_timerHandler(event:TimerEvent):void
 +    {
 +        hideTip();
 +    }
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the showEffect or hideEffect ends.
 +     *  When the showEffect ends, it starts the hideTimer,
 +     *  which will automatically start hiding the tooltip when it fires,
 +     *  even if the mouse is still over the target.
 +     *  When the hideEffect ends, the tooltip is removed.
 +     */
 +    mx_internal function effectEndHandler(event:EffectEvent):void
 +    {
 +        if (event.effectInstance.effect == showEffect)
 +            showEffectEnded();
 +        else if (event.effectInstance.effect == hideEffect)
 +            hideEffectEnded();
 +    }
 +
 +    /**
 +     *  @private
 +     *  This handler is called when the user clicks the mouse
 +     *  while a normal tooltip is displayed.
 +     *  It immediately hides the tooltip.
 +     */
 +    mx_internal function systemManager_mouseDownHandler(event:MouseEvent):void
 +    {
 +        reset();
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function changeHandler(event:Event):void
 +    {
 +        reset();
 +    }
 +	
 +	COMPILE::JS
 +	private var lastMouseEvent:MouseEvent;
 +	
 +	COMPILE::JS
 +	private function mouseMoveHandler(event:MouseEvent):void
 +	{
 +		lastMouseEvent = event;
 +	}
 +
 +}
 +
 +}


[38/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as
index bcc7c48,0000000..320718c
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as
@@@ -1,660 -1,0 +1,660 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.text.TextFormat;
 +	import flash.text.TextLineMetrics;		
 +}
 +COMPILE::JS
 +{
 +	import flex.text.TextFormat;
 +	import flex.text.TextLineMetrics;		
 +}
 +
 +import mx.managers.ISystemManager;
 +
 +/**
 + *  The UITextFormat class represents character formatting information
 + *  for the UITextField class.
 + *  The UITextField class defines the component used by many Flex composite
 + *  components to display text.
 + *
 + *  <p>The UITextFormat class extends the flash.text.TextFormat class
 + *  to add the text measurement methods <code>measureText()</code>
 + *  and <code>measureHTMLText()</code> and to add properties for
 + *  controlling the advanced anti-aliasing of fonts.</p>
 + *
 + *  @see mx.core.UITextField
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class UITextFormat extends TextFormat
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  embeddedFontRegistry
 +    //----------------------------------
 +
 +    private static var noEmbeddedFonts:Boolean;
 +
 +    /**
 +     *  @private
 +     *  Storage for the embeddedFontRegistry property.
 +     *  This gets initialized on first access,
 +     *  not at static initialization time, in order to ensure
 +     *  that the Singleton registry has been initialized.
 +     */
 +    private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
 +
 +    /**
 +     *  @private
 +     *  A reference to the embedded font registry.
 +     *  Single registry in the system.
 +     *  Used to look up the moduleFactory of a font.
 +     */
 +    private static function get embeddedFontRegistry():IEmbeddedFontRegistry
 +    {
 +        if (!_embeddedFontRegistry && !noEmbeddedFonts)
 +        {
 +            try
 +            {
 +                _embeddedFontRegistry = IEmbeddedFontRegistry(
 +                    Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
 +            }
 +            catch (e:Error)
 +            {
 +                noEmbeddedFonts = true;
 +            }
 +        }
 +
 +        return _embeddedFontRegistry;
 +    }
 +
 +    //----------------------------------
 +    //  textFieldFactory
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the textFieldFactory property.
 +     *  This gets initialized on first access,
 +     *  not at static initialization time, in order to ensure
 +     *  that the Singleton registry has already been initialized.
 +     */
 +    private static var _textFieldFactory:ITextFieldFactory;
 +
 +    /**
 +     *  @private
 +     *  Factory for text fields used to measure text.
 +     *  Created in the context of module factories
 +     *  so the text field has access to an embedded font, if needed.
 +     */
 +    private static function get textFieldFactory():ITextFieldFactory
 +    {
 +        if (!_textFieldFactory)
 +        {
 +            _textFieldFactory = ITextFieldFactory(
 +                Singleton.getInstance("mx.core::ITextFieldFactory"));
 +        }
 +
 +        return _textFieldFactory;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @param systemManager A SystemManager object.
 +     *  The SystemManager keeps track of which fonts are embedded.
 +     *  Typically this is the SystemManager obtained from the
 +     *  <code>systemManager</code> property of UIComponent.
 +     *
 +     *  @param font A String specifying the name of a font,
 +     *  or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param size A Number specifying a font size in pixels,
 +     *  or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param color An unsigned integer specifying the RGB color of the text,
 +     *  such as 0xFF0000 for red, or <code>null</code> to indicate
 +     *  that is UITextFormat doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param bold A Boolean flag specifying whether the text is bold,
 +     *  or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param italic A Boolean flag specifying whether the text is italic,
 +     *  or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param italic A Boolean flag specifying whether the text is underlined,
 +     *  or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param urlString A String specifying the URL to which the text is
 +     *  hyperlinked, or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param target A String specifying the target window
 +     *  where the hyperlinked URL is displayed. 
 +     *  If the target window is <code>null</code> or an empty string,
 +     *  the hyperlinked page is displayed in the same browser window.
 +     *  If the <code>urlString</code> parameter is <code>null</code>
 +     *  or an empty string, this property has no effect.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param align A String specifying the alignment of the paragraph,
 +     *  as a flash.text.TextFormatAlign value, or <code>null</code> to indicate
 +     *  that this UITextFormat doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param leftMargin A Number specifying the left margin of the paragraph,
 +     *  in pixels, or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param rightMargin A Number specifying the right margin of the paragraph,
 +     *  in pixels, or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param indent A Number specifying the indentation from the left
 +     *  margin to the first character in the paragraph, in pixels,
 +     *  or <code>null</code> to indicate that this UITextFormat
 +     *  doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @param leading A Number specifying the amount of additional vertical
 +     *  space between lines, or <code>null</code> to indicate
 +     *  that this UITextFormat doesn't specify this property.
 +     *  This parameter is optional, with a default value of <code>null</code>.
 +     *
 +     *  @see flash.text.TextFormatAlign
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function UITextFormat(systemManager:ISystemManager,
 +                                 font:String = null,
 +                                 size:Object = null,
 +                                 color:Object = null,
 +                                 bold:Object = null,
 +                                 italic:Object = null,
 +                                 underline:Object = null,
 +                                 url:String = null,
 +                                 target:String = null,
 +                                 align:String = null,
 +                                 leftMargin:Object = null,
 +                                 rightMargin:Object = null,
 +                                 indent:Object = null,
 +                                 leading:Object = null)
 +    {
 +        this.systemManager = systemManager;
 +
 +        super(font, size, color, bold, italic, underline, url, target,
 +              align, leftMargin, rightMargin, indent, leading);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var systemManager:ISystemManager;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  antiAliasType
 +    //----------------------------------
 +
 +    /**
 +     *  Defines the anti-aliasing setting for the UITextField class.
 +     *  The possible values are <code>"normal"</code> 
 +     *  (<code>flash.text.AntiAliasType.NORMAL</code>) 
 +     *  and <code>"advanced"</code> 
 +     *  (<code>flash.text.AntiAliasType.ADVANCED</code>). 
 +     *  
 +     *  <p>The default value is <code>"advanced"</code>, 
 +     *  which enables advanced anti-aliasing 
 +     *  for the embedded font. 
 +     *  Set this property to <code>"normal"</code>
 +     *  to disable the advanced anti-aliasing.</p>
 +     *  
 +     *  <p>This property has no effect for system fonts.</p>
 +     *  
 +     *  <p>This property applies to all the text in a UITextField object; 
 +     *  you cannot apply it to some characters and not others.</p>
 +     * 
 +     *  @default "advanced"
 +     *
 +     *  @see flash.text.AntiAliasType
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var antiAliasType:String;
 +    
 +    //----------------------------------
 +    //  direction
 +    //----------------------------------
 +
 +    /**
 +     *  The directionality of the text.
 +     *
 +     *  <p>The allowed values are <code>"ltr"</code> for left-to-right text,
 +     *  as in Latin-style scripts,
 +     *  and <code>"rtl"</code> for right-to-left text,
 +     *  as in Arabic and Hebrew.</p>
 +     *
 +     *  <p>FTE and TLF use this value in their bidirectional text layout algorithm,
 +     *  which maps Unicode character order to glyph order.</p>
 +     * 
 +     *  <p>Note: This style only applies when this UITextFormat
 +     *  is used with a UIFTETextField rather than a UITextField.</p>
 +     *
 +     *  @default null
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var direction:String;
 +    
 +    //----------------------------------
 +    //  gridFitType
 +    //----------------------------------
 +
 +    /**
 +     *  Defines the grid-fitting setting for the UITextField class.
 +     *  The possible values are <code>"none"</code> 
 +     *  (<code>flash.text.GridFitType.NONE</code>), 
 +     *  <code>"pixel"</code> 
 +     *  (<code>flash.text.GridFitType.PIXEL</code>),
 +     *  and <code>"subpixel"</code> 
 +     *  (<code>flash.text.GridFitType.SUBPIXEL</code>). 
 +     *  
 +     *  <p>This property only applies when you are using an
 +     *  embedded font and the <code>fontAntiAliasType</code>
 +     *  property is set to <code>"advanced"</code>.</p>
 +     *  
 +     *  <p>This property has no effect for system fonts.</p>
 +     * 
 +     *  <p>This property applies to all the text in a UITextField object; 
 +     *  you cannot apply it to some characters and not others.</p>
 +     * 
 +     *  @default "pixel"
 +     *
 +     *  @see flash.text.GridFitType
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var gridFitType:String;
 +    
 +    //----------------------------------
 +    //  locale
 +    //----------------------------------
 +
 +    /**
 +     *  The locale of the text.
 +     * 
 +     *  <p>FTE and TLF use this locale to map Unicode characters
 +     *  to font glyphs and to find fallback fonts.</p>
 +     *
 +     *  <p>Note: This style only applies when this UITextFormat
 +     *  is used with a UIFTETextField rather than a UITextField.</p>
 +     *
 +     *  @default null
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var locale:String;
 +    
 +    //----------------------------------
 +    //  moduleFactory
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the moduleFactory property.
 +     */
 +    private var _moduleFactory:IFlexModuleFactory;
 +
 +    /**
 +     *  The moduleFactory used to create TextFields for embedded fonts.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get moduleFactory():IFlexModuleFactory
 +    {
 +        return _moduleFactory;
 +    }
 +     
 +    /**
 +     *  @private
 +     */  
 +    public function set moduleFactory(value:IFlexModuleFactory):void
 +    {
 +        _moduleFactory = value;
 +    }
 +    
 +    //----------------------------------
 +    //  sharpness
 +    //----------------------------------
 +
 +    /**
 +     *  Defines the sharpness setting for the UITextField class.
 +     *  This property specifies the sharpness of the glyph edges. 
 +     *  The possible values are Numbers from -400 through 400. 
 +     *  
 +     *  <p>This property only applies when you are using an 
 +     *  embedded font and the <code>fontAntiAliasType</code>
 +     *  property is set to <code>"advanced"</code>.</p>
 +     *  
 +     *  <p>This property has no effect for system fonts.</p>
 +     * 
 +     *  <p>This property applies to all the text in a UITextField object; 
 +     *  you cannot apply it to some characters and not others.</p>
 +     *  
 +     *  @default 0
 +     *  @see flash.text.TextField
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var sharpness:Number;
 +    
 +    //----------------------------------
 +    //  thickness
 +    //----------------------------------
 +
 +    /**
 +     *  Defines the thickness setting for the UITextField class.
 +     *  This property specifies the thickness of the glyph edges.
 +     *  The possible values are Numbers from -200 to 200. 
 +     *  
 +     *  <p>This property only applies when you are using an 
 +     *  embedded font and the <code>fontAntiAliasType</code>
 +     *  property is set to <code>"advanced"</code>.</p>
 +     *  
 +     *  <p>This property has no effect for system fonts.</p>
 +     * 
 +     *  <p>This property applies to all the text in a UITextField object; 
 +     *  you cannot apply it to some characters and not others.</p>
 +     *  
 +     *  @default 0
 +     *  @see flash.text.TextField
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var thickness:Number;
 +    
 +    //----------------------------------
 +    //  useFTE
 +    //----------------------------------
 +    
 +    /**
 +     *  Determines how the <code>measureText()</code>
 +     *  and <code>measureHTMLText()</code> methods do text measurement.
 +     * 
 +     *  <p>If <code>true</code>, they use an offscreen instance
 +     *  of the FTETextField class in the Text Layout Framework.
 +     *  If <code>false</code>, they use an offscreen instance
 +     *  of the TextField class in the Flash Player.</p>
 +     * 
 +     *  @default false
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var useFTE:Boolean = false;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Returns measurement information for the specified text, 
 +     *  assuming that it is displayed in a single-line UITextField component, 
 +     *  and using this UITextFormat object to define the text format. 
 +     *
 +     *  @param text A String specifying the text to measure.
 +     *  
 +     *  @param roundUp A Boolean flag specifying whether to round up the
 +     *  the measured width and height to the nearest integer.
 +     *  Rounding up is appropriate in most circumstances.
 +     *  
 +     *  @return A TextLineMetrics object containing the text measurements.
 +     *
 +     *  @see flash.text.TextLineMetrics
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function measureText(text:String, roundUp:Boolean = true):TextLineMetrics
 +    {
 +        return measure(text, false, roundUp);
 +    }
 +
 +    /**
 +     *  Returns measurement information for the specified HTML text, 
 +     *  which may contain HTML tags such as <code>&lt;font&gt;</code>
 +     *  and <code>&lt;b&gt;</code>, assuming that it is displayed
 +     *  in a single-line UITextField, and using this UITextFormat object
 +     *  to define the text format.
 +     *
 +     *  @param text A String specifying the HTML text to measure.
 +     *  
 +     *  @param roundUp A Boolean flag specifying whether to round up the
 +     *  the measured width and height to the nearest integer.
 +     *  Rounding up is appropriate in most circumstances.
 +     * 
 +     *  @return A TextLineMetrics object containing the text measurements.
 +     *
 +     *  @see flash.text.TextLineMetrics
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function measureHTMLText(htmlText:String, roundUp:Boolean = true):TextLineMetrics
 +    {
 +        return measure(htmlText, true, roundUp);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function measure(s:String, html:Boolean, roundUp:Boolean):TextLineMetrics
 +    {
 +        // The text of a TextField can't be set to null.
 +        if (!s)
 +            s = "";
 +        
 +        // Create a persistent, off-display-list TextField
 +        // to be used for text measurement. The text field factory keeps
 +        // the text fields to one per moduleFactory.
 +        var embeddedFont:Boolean = false;
 +        var fontModuleFactory:IFlexModuleFactory = (noEmbeddedFonts || !embeddedFontRegistry) ? 
 +            null : 
 +            embeddedFontRegistry.getAssociatedModuleFactory(
 +                font, bold, italic, this, moduleFactory, systemManager, useFTE);
 +
 +        embeddedFont = (fontModuleFactory != null);
 +        if (fontModuleFactory == null)
 +        {
 +            // try to use the systemManager as a backup for the case
 +            // where embedded fonts have no info().
 +            fontModuleFactory = systemManager;
 +        }
 +        
 +        var measurementTextField:Object /* either TextField or FTETextField */ =
 +            useFTE ?
 +            textFieldFactory.createFTETextField(fontModuleFactory) :
 +            textFieldFactory.createTextField(fontModuleFactory);
 +        
 +        // Clear any old text from the TextField.
 +        // Otherwise, new text will get the old TextFormat. 
 +        if (html)
 +            measurementTextField.htmlText = "";
 +        else
 +            measurementTextField.text = "";
 +
 +        // Make the measurement TextField use this TextFormat.
 +        measurementTextField.defaultTextFormat = this;
 +        measurementTextField.embedFonts = embeddedFont;
 +        
 +        // Set other properties based on CSS styles.
 +        if (!useFTE)
 +        {
 +            // These properties do not have meaning in FTETextField,
 +            // and have been implemented to return either null or NaN,
 +            // so don't try to set them on a FTETextField.
 +            measurementTextField.antiAliasType = antiAliasType;
 +            measurementTextField.gridFitType = gridFitType;
 +            measurementTextField.sharpness = sharpness;
 +            measurementTextField.thickness = thickness;
 +        }
 +        else
 +        {
 +            // The properties have meaning only on a FTETextField.
 +            measurementTextField.direction = direction;
 +            measurementTextField.locale = locale;
 +        }
 +        
 +        // Set the text to be measured into the TextField.
 +        if (html)
 +            measurementTextField.htmlText = s;
 +        else
 +            measurementTextField.text = s;
 +        
 +        // Measure it.
 +        var lineMetrics:TextLineMetrics =
 +            measurementTextField.getLineMetrics(0);
 +
 +        // Account for any indenting of the text.
 +        if (indent != null)
 +            lineMetrics.width += indent;
 + 
 +        if (roundUp)
 +        {                               
 +            // Round up because embedded fonts can produce fractional values;
 +            // if a parent container rounds a component's actual width or height
 +            // down, the component may not be wide enough to display the text.
 +            lineMetrics.width = Math.ceil(lineMetrics.width);
 +            lineMetrics.height = Math.ceil(lineMetrics.height);
 +        }
 +        
 +        return lineMetrics;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function copyFrom(source:TextFormat):void
 +    {
 +        font = source.font;
 +        size = source.size;
 +        color = source.color;
 +        bold = source.bold;
 +        italic = source.italic;
 +        underline = source.underline;
 +        url = source.url;
 +        target = source.target;
 +        align = source.align;
 +        leftMargin = source.leftMargin;
 +        rightMargin = source.rightMargin;
 +        indent = source.indent;
 +        leading = source.leading;
 +        letterSpacing = source.letterSpacing;
 +        blockIndent = source.blockIndent;
 +        bullet = source.bullet;
 +		COMPILE::LATER
 +		{
 +        display = source.display;
 +		}
 +        indent = source.indent;
 +        kerning = source.kerning;
 +        tabStops = source.tabStops;
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
index e322d82,0000000..2c9e421
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
@@@ -1,1004 -1,0 +1,1004 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.effects
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;		
 +}
 +import org.apache.flex.core.UIBase;
 +import org.apache.flex.events.Event;
 +import org.apache.flex.events.EventDispatcher;
 +import mx.events.FocusEvent;
 +COMPILE::LATER
 +{
 +	import flex.system.DefinitionManager;
 +	import flash.utils.Dictionary;		
 +	import mx.core.EventPriority;
 +	import mx.core.UIComponentCachePolicy;
 +}
 +
 +import mx.core.FlexGlobals;
 +import mx.core.IDeferredInstantiationUIComponent;
 +import mx.core.IFlexDisplayObject;
 +import mx.core.IUIComponent;
 +import mx.core.UIComponent;
 +import mx.core.UIComponentGlobals;
 +import mx.core.mx_internal;
 +import mx.events.EffectEvent;
 +import mx.events.FlexEvent;
 +import mx.events.MoveEvent;
 +import mx.events.ResizeEvent;
 +import mx.resources.IResourceManager;
 +import mx.resources.ResourceManager;
 +import mx.core.IVisualElementContainer;
 +import org.apache.flex.core.IVisualElement;
 +
 +use namespace mx_internal;
 +
 +[ResourceBundle("effects")]
 +
 +/**
 + *  The EffectManager class listens for events, such as the <code>show</code>
 + *  and <code>move</code> events, dispatched by objects in a Flex application.
 + *  For each event, corresponding to an event trigger, it determines if 
 + *  there is an effect assigned to the object. 
 + *  If an effect is defined, it plays the effect. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + *  @flexjsignoreimport mx.core.UIComponent
 + */
 +public class EffectManager extends EventDispatcher
 +{
 +    include "../core/Version.as";
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Keeps track of all the triggered effects that are currently playing.
 +     */
 +    mx_internal static var effectsPlaying:Array /* of EffectNode */ = [];
 +    
 +    /**
 +     *  @private
 +     *  Map with event type as key and effectTrigger as value.
 +     */
 +    private static var effectTriggersForEvent:Object = {};
 +    
 +    /**
 +     *  @private
 +     *  Map with effectTrigger as key and event type as value.
 +     */
 +    private static var eventsForEffectTriggers:Object = {};
 +    
 +    /**
 +     *  @private
 +     *  Array containing miscellaneous info about effect targets.
 +     *  An element in the array is an Object with three fields:
 +     *  target - reference to the target
 +     *  bitmapEffectsCount - number of bitmap effects
 +     *                       currently playing on the target
 +     *  vectorEffectsCount - number of vector effects
 +     *                       currently playing on the target
 +     */
 +    private static var targetsInfo:Array /* of Object */ = [];
 +    
 +    /**
 +     *  @private
 +     *  Remember when suspendEventHandling() has been called
 +     *  without a matching resumeEventHandling().
 +     */
 +    private static var eventHandlingSuspendCount:Number = 0;
 +
 +    /**
 +     *  @private
 +     *  Weak backing storage for the lastEffectCreated instance.  
 +     */
 +	COMPILE::LATER
 +    private static var weakKeys:Dictionary;
 + 
 +    /**
 +     *  @private
 +     *  This internal property is currently only used by the ViewStack 
 +     *  component in order to coordinate the hideEffect completion with
 +     *  ViewStack change logic.  It would be best to find a better way 
 +     *  to do this (localized to ViewStack) in the future however.
 +     */
 +	COMPILE::LATER
 +    mx_internal static function set lastEffectCreated(effect:IEffect):void
 +    {
 +        // We just regenerate our dictionary instead of finding and deleting 
 +        // the previous key.  Faster.
 +        weakKeys = new Dictionary(true);
 +        weakKeys[effect] = true;
 +    }
 +       
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    mx_internal static function get lastEffectCreated():IEffect
 +    {
 +        for (var item:* in weakKeys) 
 +            return item;
 +            
 +        return null;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Storage for the resourceManager getter.
 +     *  This gets initialized on first access,
 +     *  not at static initialization time, in order to ensure
 +     *  that the Singleton registry has already been initialized.
 +     */
 +    private static var _resourceManager:IResourceManager;
 +    
 +    /**
 +     *  @private
 +     *  A reference to the object which manages
 +     *  all of the application's localized resources.
 +     *  This is a singleton instance which implements
 +     *  the IResourceManager interface.
 +     */
 +    private static function get resourceManager():IResourceManager
 +    {
 +        if (!_resourceManager)
 +            _resourceManager = ResourceManager.getInstance();
 +
 +        return _resourceManager;
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  After this method is called, the EffectManager class ignores
 +     *  all events, and no effects are triggered, until a call to
 +     *  <code>resumeEventHandling()</code>.  
 +     *  Used internally so that an effect that is updating the screen
 +     *  does not cause another effect to be triggered.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function suspendEventHandling():void
 +    {
 +        eventHandlingSuspendCount++;
 +    }
 +    
 +    /**
 +     *  Allows the EffectManager class to resume processing events
 +     *  after a call to the <code>suspendEventHandling()</code> method.
 +     *  Used internally in conjunction with the
 +     *  <code>suspendEventHandling()</code> method 
 +     *  so that an effect that is updating the screen
 +     *  does not cause another effect to be triggered.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function resumeEventHandling():void
 +    {
 +        eventHandlingSuspendCount--;    
 +    }
 +    
 +    /**
 +     *  Immediately ends any effects currently playing on a target.
 +     *
 +     *  @param target The target component on which to end all effects.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function endEffectsForTarget(target:IUIComponent):void
 +    {
 +        // Iterate through the array backward, because calling end()
 +        // may cause the element to be removed from the array.
 +        var n:int = effectsPlaying.length;
 +        for (var i:int = n - 1; i >= 0; i--)
 +        {
 +            var otherInst:IEffectInstance =
 +                effectsPlaying[i].instance;
 +            if (otherInst.target == target)
 +                otherInst.end();
 +        }       
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    mx_internal static function setStyle(styleProp:String, target:*):void
 +    {
 +        // Anytime that any UIComponent's style is changed,
 +        // check to see if the styleProp that's changing
 +        // is an effect trigger (e.g., showEffect).
 +        
 +        var eventName:String = eventsForEffectTriggers[styleProp];
 +        if (eventName != null && eventName != "")
 +        {
 +            target.addEventListener(eventName,
 +                                    EffectManager.eventHandler,
 +                                    false, EventPriority.EFFECT);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Internal function used to instantiate an effect
 +     */
 +    mx_internal static function createEffectForType(target:Object,
 +                                               type:String):IEffect
 +    {
 +        var trigger:String = effectTriggersForEvent[type];
 +        
 +        if (trigger == "")
 +            trigger = type + "Effect"; // For backwards compatibility
 +        
 +        var value:Object = target.getStyle(trigger);
 +                
 +        if (!value)
 +            return null;
 +
 +        if (value is Class)
 +        {
 +            var cls:Class = Class(value);
 +            return new cls(target);
 +        }
 +        
 +        // If we don't find the ID on the parent document, then just move on.
 +        try
 +        {
 +            var effectObj:IEffect;
 +            if (value is String)
 +            {
 +                var doc:Object = target.parentDocument;
 +                // The main Application doesn't have a parentDocument.
 +                if (!doc)
 +                    doc = FlexGlobals.topLevelApplication;
 +                effectObj = doc[value];
 +            }
 +            else if (value is IEffect)
 +            {
 +                effectObj = IEffect(value);
 +            }
 +                        
 +            if (effectObj)
 +            {
 +                effectObj.target = target;
 +                return effectObj;
 +            }   
 +        }
 +        catch(e:Error)
 +        {
 +        }
 +        
 +        var effectClass:Class;      
 +        if (target is IUIComponent && target.moduleFactory)
 +        {
 +			COMPILE::LATER
 +			{
 +				// only UIComponents have moduleFactories
 +				var appDomain:DefinitionManager = new DefinitionManager(
 +					target.moduleFactory.info()["currentDomain"]);
 +				if (appDomain.hasDefinition("mx.effects." + value))
 +					effectClass = Class(appDomain.getDefinition("mx.effects." + value));					
 +			}
 +        }
 +        if (!effectClass)
 +            effectClass = Class(target.systemManager.getDefinitionByName(
 +                "mx.effects." + value));
 +
 +        if (effectClass)
 +            return new effectClass(target);
 +        
 +        return null;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Internal function used while playing effects
 +     */
 +    private static function animateSameProperty(a:IEffect, b:IEffect,
 +                                                c:IEffectInstance):Boolean
 +    {
 +        // This function returns true if "a" and "b" animate
 +        // the same property of the same object. 
 +
 +        if (a.target == c.target)
 +        {
 +            var aProps:Array = a.getAffectedProperties();
 +            var bProps:Array = b.getAffectedProperties();
 +
 +            var n:int = aProps.length;
 +            var m:int = bProps.length;
 +
 +            for (var i:int = 0; i < n; i++)
 +            {
 +                for (var j:int = 0; j < m; j++)
 +                {
 +                    if (aProps[i] == bProps[j])
 +                        return true;
 +                }
 +            }
 +        }
 +
 +        return false;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Should be called by an effect instance before it starts playing,
 +     *  to suggest bitmap caching on the target.
 +     *  E.g. Fade calls this function in its play().
 +     */
 +    mx_internal static function startBitmapEffect(target:IUIComponent):void
 +    {
 +        cacheOrUncacheTargetAsBitmap(target, true, true);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Should be called by an effect instance after it has finished playing,
 +     *  to suggest that the cached bitmap for the target can be freed.
 +     *  E.g. Fade calls this function in its onTweenEnd().
 +     */
 +    mx_internal static function endBitmapEffect(target:IUIComponent):void
 +    {
 +        cacheOrUncacheTargetAsBitmap(target, false, true);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Should be called by an effect instance before it starts playing, to
 +     *  suggest that bitmap caching should be turned off on the target.
 +     *  E.g. Resize calls this function in its play().
 +     */
 +    mx_internal static function startVectorEffect(target:IUIComponent):void
 +    {
 +        cacheOrUncacheTargetAsBitmap(target, true, false);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Should be called by an effect instance after it has finished playing,
 +     *  to suggest that bitmap caching may be turned back on on the target.
 +     *  E.g. Resize calls this function in its onTweenEnd().
 +     */
 +    mx_internal static function endVectorEffect(target:IUIComponent):void
 +    {
 +        cacheOrUncacheTargetAsBitmap(target, false, false);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Cache or uncache the target as a bitmap depending on which effects are
 +     *  currently playing on the target.
 +     *
 +     *  @param target The effect target.
 +     *
 +     *  @param effectStart Whether this is the starting of the effect.
 +     *  false means it's the ending of the effect.
 +     *
 +     *  @param bitmapEffect Whether this is a bitmap effect.
 +     *  false means it's a vector effect (like resize, zoom, etc.)
 +     *  that wants the target object to be uncached.
 +     */
 +    private static function cacheOrUncacheTargetAsBitmap(
 +                                target:IUIComponent,
 +                                effectStart:Boolean = true,
 +                                bitmapEffect:Boolean = true):void
 +    {
 +        var n:int;
 +        var i:int;
 +
 +        // Object containing information about the target.
 +        var info:Object = null;
 +
 +        n = targetsInfo.length;
 +        for (i = 0; i < n; i++)
 +        {
 +            if (targetsInfo[i].target == target)
 +            {
 +                info = targetsInfo[i];
 +                break;
 +            }
 +        }
 +
 +        // If no info object is available, create an object and push it
 +        // into the array.
 +        if (!info)
 +        {
 +            info =
 +            {
 +                target: target,
 +                bitmapEffectsCount: 0,
 +                vectorEffectsCount: 0
 +            };
 +
 +            targetsInfo.push(info);
 +        }
 +
 +        if (effectStart)
 +        {
 +            if (bitmapEffect)
 +            {
 +                info.bitmapEffectsCount++;
 +
 +                // If no vector effects are currently playing,
 +                // cache the target.
 +                if (info.vectorEffectsCount == 0 &&
 +                    target is IDeferredInstantiationUIComponent)
 +                {
 +					COMPILE::LATER
 +					{
 +	                    IDeferredInstantiationUIComponent(target).cacheHeuristic = true;
 +					}
 +                }
 +            }
 +            else
 +            {
 +				COMPILE::LATER
 +				{
 +	                // If a vector effect started playing, forcibly uncache
 +	                // the target regardless of anything else.
 +	                if (info.vectorEffectsCount++ == 0 &&
 +	                    target is IDeferredInstantiationUIComponent &&
 +	                    IDeferredInstantiationUIComponent(target).cachePolicy == UIComponentCachePolicy.AUTO)
 +	                {
 +	                    target.cacheAsBitmap = false;
 +	                }
 +	            }
 +				// If a vector effect started playing, forcibly uncache
 +				// the target regardless of anything else.
 +				if (info.vectorEffectsCount++ == 0 &&
 +					target is IDeferredInstantiationUIComponent)
 +				{
 +					COMPILE::LATER
 +					{
 +					target.cacheAsBitmap = false;
 +					}
 +				}
 +			}
 +        }
 +        else // effect end
 +        {
 +            if (bitmapEffect)
 +            {
 +                if (info.bitmapEffectsCount != 0)
 +                    info.bitmapEffectsCount--;
 +
 +				COMPILE::LATER
 +				{
 +                if (target is IDeferredInstantiationUIComponent)
 +                    IDeferredInstantiationUIComponent(target).cacheHeuristic = false;
 +				}
 +            }
 +            else
 +            {
 +                if (info.vectorEffectsCount != 0)
 +                {
 +                    // If no more vector effects are playing but bitmap
 +                    // effects are still playing, cache the target.
 +                    if (--info.vectorEffectsCount == 0 &&
 +                        info.bitmapEffectsCount != 0)
 +                    {
 +                        // Crank up the counter.
 +                        n = info.bitmapEffectsCount;
 +						COMPILE::LATER
 +						{
 +                        for (i = 0; i < n; i++)
 +                        {
 +                            if (target is IDeferredInstantiationUIComponent)
 +                            IDeferredInstantiationUIComponent(target).cacheHeuristic = true;
 +                        }
 +						}
 +                    }
 +                }
 +            }
 +
 +            if (info.bitmapEffectsCount == 0 && info.vectorEffectsCount == 0)
 +            {
 +                // No more effects are playing on this target, so discard the
 +                // info object (should speed up lookups).
 +                n = targetsInfo.length;
 +                for (i = 0; i < n; i++)
 +                {
 +                    if (targetsInfo[i].target == target)
 +                    {
 +                        targetsInfo.splice(i, 1);
 +                        break;
 +                    }
 +                }
 +            }
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Called in code generated by MXML compiler.
 +     */
 +    mx_internal static function registerEffectTrigger(name:String,
 +                                                 event:String):void
 +    {
 +        if (name != "")
 +        {
 +            if (event == "")
 +            {
 +                // For backwards compatibility.
 +                var strLen:Number = name.length;
 +                if (strLen > 6 && name.substring(strLen - 6) == "Effect")
 +                    event = name.substring(0, strLen - 6);
 +            }
 +                        
 +            if (event != "")
 +            {
 +                effectTriggersForEvent[event] = name;
 +                eventsForEffectTriggers[name] = event;
 +            }
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal static function getEventForEffectTrigger(effectTrigger:String):String
 +    {
 +        if (eventsForEffectTriggers)
 +        {
 +            try 
 +            {
 +                return eventsForEffectTriggers[effectTrigger];
 +            }
 +            catch(e:Error) {}
 +        }
 +        
 +        return "";
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +	 *  @flexjsignorecoercion mx.core.UIComponent
 +     */
 +    mx_internal static function eventHandler(eventObj:Event):void
 +    {   
 +        // If this event fired because an effect is currently playing
 +        // (in other words, if an effect was the source of this event),
 +        // then don't listen to the effect.
 +        if (!(eventObj.currentTarget is IFlexDisplayObject))
 +            return;
 +        
 +        if (eventHandlingSuspendCount > 0)
 +            return;
 +        
 +        if (eventObj is FocusEvent &&
 +            (eventObj.type == FocusEvent.FOCUS_OUT ||
 +             eventObj.type == FocusEvent.FOCUS_IN))
 +        {
 +            var focusEventObj:FocusEvent = FocusEvent(eventObj);
 +            if (focusEventObj.relatedObject && 
 +                (focusEventObj.currentTarget.contains(focusEventObj.relatedObject) ||
 +                 focusEventObj.currentTarget == focusEventObj.relatedObject))
 +            {
 +                return;
 +            }
 +        }
 +        
 +        // Only trigger the event for added and removed if the current target is the same as the target. 
 +        if ((eventObj.type == UIBase.CHILD_ADDED || eventObj.type == UIBase.CHILD_REMOVED) && eventObj.target != eventObj.currentTarget)
 +            return;
 +            
 +        if (eventObj.type == UIBase.CHILD_REMOVED)
 +        {
 +			var uic:UIComponent = eventObj.target as UIComponent;
 +            if (uic)
 +            {
 +                if (uic.initialized == false)
 +                {
 +                    return;
 +                }
 +                else if (uic.isEffectStarted)
 +                {
 +                    for (var i:int = 0; i < uic._effectsStarted.length; i++)
 +                    {
 +                        // Don't allow removedEffect to trigger more than one effect at a time
 +                        if (uic._effectsStarted[i].triggerEvent.type == UIBase.CHILD_REMOVED)
 +                            return;
 +                    }
 +                }
 +            }
 +            
 +            var targ:DisplayObject = eventObj.target as DisplayObject;
 +            
 +            if (targ != null)
 +            {           
 +                var parent:DisplayObjectContainer = targ.parent as DisplayObjectContainer;
 +                
 +                if (parent != null)
 +                {
 +                    var index:int = parent.getChildIndex(targ);
 +                    if (index >= 0)
 +                    {
 +                        if (uic)    
 +                        {
 +                            // Since we get the "removed" event before the child is actually removed, 
 +                            // we need to delay adding back the child. We must exit the current 
 +                            // script block must exit before the child can be removed.
 +                            uic.callLater(removedEffectHandler, [targ, parent, index, eventObj]);
 +                        }
 +                    }
 +                }
 +            }
 +        }
 +        else
 +        {
 +            createAndPlayEffect(eventObj, eventObj.currentTarget);  
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +	 *  @flexjsignorecoercion mx.core.UIComponent
 +     */ 
 +    private static function createAndPlayEffect(eventObj:Event, target:Object):void
 +    {
 +                
 +        var effectInst:IEffect = createEffectForType(target, eventObj.type);
 +        if (!effectInst)
 +            return;
 +        
 +		COMPILE::LATER
 +		{
 +        if (effectInst is Zoom && eventObj.type == MoveEvent.MOVE)
 +        {
 +            var message:String = resourceManager.getString(
 +                "effects", "incorrectTrigger");
 +            throw new Error(message);
 +        }
 +		}
 +            
 +        // If this is a "move" or "resize" event that was caused by 
 +        // the layout manager doing an initial layout, then don't
 +        // play any effects.
 +        // Ditto for "show" or "hide" effects triggered by ViewStack.doLayout.
 +        if (target.initialized == false)
 +        {
 +            var type:String = eventObj.type;
 +            if (type == MoveEvent.MOVE ||
 +                type == ResizeEvent.RESIZE ||
 +                type == FlexEvent.SHOW ||
 +                type == FlexEvent.HIDE ||
 +                type == Event.CHANGE)
 +            {
 +                effectInst = null;
 +                return;
 +            }
 +        }
 +
 +        var n:int;
 +        var i:int;
 +        var m:int;
 +        var j:int;
 +
 +        // Some components contain built-in tweens, which are not managed by
 +        // the EffectManager.  If one of those tweens is currently playing,
 +        // and if it's animating a conflicting property, then don't play this
 +        // tween.
 +        if (effectInst.target is IUIComponent)
 +        {
 +            var tweeningProperties:Array =
 +                IUIComponent(effectInst.target).tweeningProperties;
 +            if (tweeningProperties && tweeningProperties.length > 0)
 +            {
 +                var effectProperties:Array = effectInst.getAffectedProperties();
 +
 +                n = tweeningProperties.length;
 +                m = effectProperties.length;
 +                
 +                for (i = 0; i < n; i++)
 +                {
 +                    for (j = 0; j < m; j++)
 +                    {
 +                        if (tweeningProperties[i] == effectProperties[j])
 +                        {
 +                            effectInst = null;
 +                            return;
 +                        }
 +                    }
 +                }
 +            }
 +        }
 +        
 +        // At any given time, only one effect may be animating a given
 +        // property of a given target object.  If some other effect was
 +        // previously animating the same properties of my target object,
 +        // then finish the other effect before starting this new one.
 +        //
 +		var uic:UIComponent = effectInst.target as UIComponent;
 +        if (uic &&
 +            uic.isEffectStarted)
 +        {
 +            var affectedProps:Array = effectInst.getAffectedProperties();
 +            for (i = 0; i < affectedProps.length; i++)
 +            {
 +                var runningInstances:Array =
 +                    effectInst.target.getEffectsForProperty(affectedProps[i]);
 +                if (runningInstances.length > 0) 
 +                {
 +                    if (eventObj.type == ResizeEvent.RESIZE)
 +                        return;
 +
 +                    for (j = 0; j < runningInstances.length; j++)
 +                    {
 +                        var otherInst:IEffectInstance = runningInstances[j];
 +                        if (eventObj.type == FlexEvent.SHOW && otherInst.hideOnEffectEnd)
 +                        {
 +                            otherInst.target.removeEventListener(
 +                                FlexEvent.SHOW, otherInst.eventHandler);
 +                            otherInst.hideOnEffectEnd = false;
 +                            
 +                        }
 +
 +                        /*
 +                        if (eventObj.type == MoveEvent.MOVE && 
 +                            ((affectedProps[i] == "width") ||
 +                             (affectedProps[i] == "height") ||
 +                             (affectedProps[i] == "x") ||
 +                             (affectedProps[i] == "y")) &&
 +                             effectInst.target.getStyle("moveEffect") != undefined)
 +                        {
 +                            trace("EM Got Move and ignoring");
 +                            return;
 +                        }
 +                        
 +                        if (eventObj.type == ResizeEvent.RESIZE &&
 +                            ((affectedProps[i] == "width") ||
 +                             (affectedProps[i] == "height")) &&
 +                             effectInst.target.getStyle("resizeEffect") != undefined)
 +                        {
 +                            return;
 +                        }
 +                        */
 +
 +                        otherInst.end();
 +                    }
 +                }
 +            }
 +        }
 +                
 +        // Pass in event data for effect initialization
 +        effectInst.triggerEvent = eventObj;
 +    
 +        // Tell the effectInst that I'm the listener, so that my "onEffectEnd"
 +        // method is called when the effect finishes playing.  The
 +        // onEffectEnd handler will remove this effect from the effectsPlaying
 +        // array.
 +        effectInst.addEventListener(EffectEvent.EFFECT_END,
 +                                    EffectManager.effectEndHandler);
 +    
 +		COMPILE::LATER
 +		{
 +			lastEffectCreated = effectInst;				
 +		}
 +
 +        var instances:Array = effectInst.play();
 +        n = instances.length;
 +        for (i = 0; i < n; i++)
 +        {
 +            effectsPlaying.push(
 +                new EffectNode(effectInst, instances[i]));
 +        }
 +        
 +        // Block all layout, responses from web services, and other background
 +        // processing until the effect finishes executing.
 +        if (effectInst.suspendBackgroundProcessing)
 +            UIComponentGlobals.suspendBackgroundProcessing();
 +    }
 +
 +    /**
 +     *  @private
 +     *  Delayed function call when effect is triggered by "removed" event
 +     */
 +    private static function removedEffectHandler(target:DisplayObject, parent:DisplayObjectContainer, index:int, eventObj:Event):void
 +    {
 +        suspendEventHandling();
 +        // Add the child back to the parent so the effect can play upon it
 +        if (parent is IVisualElementContainer && target is IVisualElement)
 +            (IVisualElementContainer(parent).addElementAt(target as IVisualElement, index));
 +        else
 +            parent.addChildAt(target, index);
 +        resumeEventHandling();
 +        // Use target because the player assigns the Stage to the currentTarget when we leave the scope of the event handler function
 +        createAndPlayEffect(eventObj, target); 
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Internal function used while playing effects
 +     */
 +    mx_internal static function effectEndHandler(event:EffectEvent):void
 +    {
 +        var effectInst:IEffectInstance = event.effectInstance;
 +        // This function is called when an effect, which was started
 +        // earlier by this effect manager, finishes playing.  Remove
 +        // this effect from the "effectPlaying" list
 +        var n:int = effectsPlaying.length;
 +        for (var i:int = n - 1; i >= 0; i--)
 +        {
 +            if (effectsPlaying[i].instance == effectInst)
 +            {
 +                effectsPlaying.splice(i, 1);
 +                break;
 +            }
 +        }
 +
 +        // If the event that caused this effect was "hide", then the
 +        // eventHandler() method set the object's visiblity to true.
 +        // Now that the effect is finished playing, set visiblity to false.
 +        if (Object(effectInst).hideOnEffectEnd == true)
 +        {
 +            effectInst.target.removeEventListener(
 +                FlexEvent.SHOW, Object(effectInst).eventHandler);
 +            effectInst.target.setVisible(false, true);          
 +        }
 +        
 +        if (effectInst.triggerEvent && effectInst.triggerEvent.type == UIBase.CHILD_REMOVED)
 +        {
 +            var targ:DisplayObject = effectInst.target as DisplayObject;
 +            
 +            if (targ != null)
 +            {           
 +                var parent:DisplayObjectContainer = targ.parent as DisplayObjectContainer;
 +                
 +                if (parent != null)
 +                {
 +                    // Since we added the child back to the parent when the effect began,
 +                    // we need to remove it once the effect has finished.
 +                    suspendEventHandling();
 +                    if (parent is IVisualElementContainer && targ is IVisualElement)
 +                        (IVisualElementContainer(parent).removeElement(targ as IVisualElement));
 +                    else
 +                        parent.removeChild(targ);
 +                    resumeEventHandling();
 +                }
 +            }
 +        }
 +
 +        // Resume the background processing that was suspended earlier
 +        if (effectInst.suspendBackgroundProcessing)
 +            UIComponentGlobals.resumeBackgroundProcessing();       
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Diagnostics
 +    //
 +    //--------------------------------------------------------------------------
 +	COMPILE::LATER
 +    private static var effects:Dictionary = new Dictionary(true);
 +
 +	COMPILE::LATER
 +    mx_internal static function effectStarted(effect:IEffectInstance):void
 +    {
 +        effects[effect] = 1;
 +    }
 +
 +	COMPILE::LATER
 +    mx_internal static function effectFinished(effect:IEffectInstance):void
 +    {
 +        delete effects[effect];
 +    }
 +
 +	COMPILE::LATER
 +    mx_internal static function effectsInEffect():Boolean
 +    {
 +        for (var i:* in effects)
 +        {
 +            return true;
 +        }
 +        return false;
 +    }
 +}
 +
 +}
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: EffectNode
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +import mx.effects.IEffect;
 +import mx.effects.IEffectInstance;
 +
 +/**
 + *  @private
 + */
 +class EffectNode
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function EffectNode(factory:IEffect, instance:IEffectInstance)
 +    {
 +        super();
 +
 +        this.factory = factory;
 +        this.instance = instance;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var factory:IEffect;
 +
 +    /**
 +     *  @private
 +     */
 +    public var instance:IEffectInstance;
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/effects/IAbstractEffect.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/effects/IAbstractEffect.as
index 4bae636,0000000..e2d1ad7
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/effects/IAbstractEffect.as
+++ b/frameworks/projects/MX/src/main/flex/mx/effects/IAbstractEffect.as
@@@ -1,52 -1,0 +1,52 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.effects
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.events.IEventDispatcher;		
 +}
 +COMPILE::JS
 +{
 +	import org.apache.flex.events.IEventDispatcher;		
 +}
 +
 +/**
 + *  The IAbstractEffect interface is used to denote
 + *  that a property or parameter must be of type Effect,
 + *  but does not actually implement any of the APIs of the 
 + *  IEffect interface.
 + *  The UIComponent class recognizes when property that 
 + *  implements the AbstractEffect interface changes, and passes it to 
 + *  the EffectManager class for processing.
 + *
 + *  @see mx.effects.IEffect
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IAbstractEffect extends IEventDispatcher
 +{
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/effects/IEffectTargetHost.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/effects/IEffectTargetHost.as
index 754bc1d,0000000..ed55ddc
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/effects/IEffectTargetHost.as
+++ b/frameworks/projects/MX/src/main/flex/mx/effects/IEffectTargetHost.as
@@@ -1,123 -1,0 +1,123 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.effects
 +{
 +
 +/**
 + *  The IEffectTargetHost interface defines the interface that lets you access the 
 + *  target list-based control of a data effect. 
 + *  All list-based controls implement this interface.
 + *  This interface enables an instance of an effect class to communicate with the 
 + *  list-based control on which the effect is playing. 
 + *  This interface is also used for determining whether to play an effect based on if a data item is 
 + *  added, removed, or replaced in the target control. 
 + *
 + *  @see mx.controls.listClasses.ListBase
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IEffectTargetHost
 +{
 +
 +    /**
 +     *  Called by an <code>UnconstrainItemAction</code> effect
 +     *  as part of a data change effect if the item renderers corresponding
 +     *  to certain data items need to move outside the normal positions
 +     *  of item renderers in the control. 
 +     *  The control does not attempt to position the item render for the 
 +     *  duration of the effect.
 +     * 
 +     *  @param item The item renderer that is a target of the effect.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function unconstrainRenderer(item:Object):void;
 +
 +    /**
 +     *  Removes an item renderer if a data change effect is running.
 +     *  The item renderer must correspond to data that has already
 +     *  been removed from the data provider collection.
 +     * 
 +     *  This function will be called by a <code>RemoveItemAction</code>
 +     *  effect as part of a data change effect to specify the point
 +     *  at which a data item ceases to displayed by the control using
 +     *  an item renderer.
 +     * 
 +     *  @param item The item renderer to remove from the control's layout.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function removeDataEffectItem(target:Object):void;
 +
 +    /**
 +     *  Adds an item renderer if a data change effect is running.
 +     *  The item renderer should correspond to a recently added
 +     *  data item in the data provider's collection that isn't
 +     *  yet being displayed.
 +     * 
 +     *  <p>This function will be called by an <code>AddItemAction</code>
 +     *  effect as part of a data change effect to specify the point
 +     *  at which a data item added to a collection begins to be displayed
 +     *  by the control using an item renderer.</p>
 +     * 
 +     *  @param item The item renderer to add to the control's layout.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function addDataEffectItem(target:Object):void;
 +
 +    /**
 +     *  Returns <code>true</code> or <code>false</code> 
 +     *  to indicates whether the effect should play on the target.
 +     *  The EffectTargetFilter class calls this method when you set 
 +     *  the <code>filter</code> property on a data effect. 
 +     *  For example, you set <code>filter</code> property 
 +     *  to <code>addItem</code> or <code>removeItem</code>.
 +     *
 +     *  @param target An item renderer
 +     * 
 +     *  @param semanticProperty The semantic property of the renderer
 +     *  whose value will be returned.
 +     *  
 +     *  @return <code>true</code> or <code>false</code> 
 +     *  to indicates whether the effect should play on the target. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getRendererSemanticValue(target:Object,semanticProperty:String):Object;
 +
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/events/ChildExistenceChangedEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/events/ChildExistenceChangedEvent.as
index 488cab4,0000000..3517408
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/events/ChildExistenceChangedEvent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/events/ChildExistenceChangedEvent.as
@@@ -1,213 -1,0 +1,213 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.events
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;		
 +}
 +import org.apache.flex.events.Event;
 +
 +/**
 + *  Represents events that are dispatched when a the child of a control
 + *  is created or destroyed. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ChildExistenceChangedEvent extends Event
 +{
 +    include "../core/Version.as";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Class constants
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  The <code>ChildExistenceChangedEvent.CHILD_ADD</code> constant 
 +	 *  defines the value of the <code>type</code> property of the event 
 +	 *  object for a <code>childAdd</code> event.
 +	 *
 +     *	<p>The properties of the event object have the following values:</p>
 +	 *  <table class="innertable">
 +	 *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the 
 +     *       event listener that handles the event. For example, if you use 
 +     *       <code>myButton.addEventListener()</code> to register an event listener, 
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +	 *     <tr><td><code>relatedObject</code></td><td>Contains a reference
 +     *         to the child object that was created.</td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event; 
 +     *       it is not always the Object listening for the event. 
 +     *       Use the <code>currentTarget</code> property to always access the 
 +     *       Object listening for the event.</td></tr>
 +	 *  </table>
 +	 *
 +     *  @eventType childAdd
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public static const CHILD_ADD:String = "childAdd";
 +
 +	/**
 +	 *  The <code>ChildExistenceChangedEvent.CHILD_REMOVE</code> constant 
 +	 *  defines the value of the <code>type</code> property of the event 
 +	 *  object for a <code>childRemove</code> event.
 +	 *
 +     *	<p>The properties of the event object have the following values:</p>
 +	 *  <table class="innertable">
 +	 *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the 
 +     *       event listener that handles the event. For example, if you use 
 +     *       <code>myButton.addEventListener()</code> to register an event listener, 
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +	 *     <tr><td><code>relatedObject</code></td><td>Contains a reference
 +     *        to the child object that is about to be removed.</td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event; 
 +     *       it is not always the Object listening for the event. 
 +     *       Use the <code>currentTarget</code> property to always access the 
 +     *       Object listening for the event.</td></tr>
 +	 *  </table>
 +	 *
 +     *  @eventType childRemove
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public static const CHILD_REMOVE:String = "childRemove";
 +	
 +	/**
 +	 *  The <code>ChildExistenceChangedEvent.OVERLAY_CREATED</code> constant 
 +	 *  defines the value of the <code>type</code> property of the event object 
 +	 *  for a <code>overlayCreated</code> event.
 +	 *
 +     *	<p>The properties of the event object have the following values:</p>
 +	 *  <table class="innertable">
 +	 *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the 
 +     *       event listener that handles the event. For example, if you use 
 +     *       <code>myButton.addEventListener()</code> to register an event listener, 
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +	 *     <tr><td><code>relatedObject</code></td><td>Contains a reference
 +     *        to the child object whose overlay was created.</td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event; 
 +     *       it is not always the Object listening for the event. 
 +     *       Use the <code>currentTarget</code> property to always access the 
 +     *       Object listening for the event.</td></tr>
 +	 *  </table>
 +	 *
 +     *  @eventType overlayCreated
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public static const OVERLAY_CREATED:String = "overlayCreated";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  Constructor.
 +	 *
 +	 *  @param type The event type; indicates the action that caused the event.
 +	 *
 +	 *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
 +	 *
 +	 *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
 +	 *
 +	 *  @param relatedObject Reference to the child object that was created or destroyed.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function ChildExistenceChangedEvent(
 +								type:String, bubbles:Boolean = false,
 +								cancelable:Boolean = false,
 +								relatedObject:DisplayObject = null)
 +	{
 +		super(type, bubbles, cancelable);
 +
 +		this.relatedObject = relatedObject;
 +	}
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	//----------------------------------
 +	//  relatedObject
 +	//----------------------------------
 +
 +	/**
 +	 *  Reference to the child object that was created or destroyed.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public var relatedObject:DisplayObject;
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Overridden methods: Event
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	override public function cloneEvent():Event
 +	{
 +		return new ChildExistenceChangedEvent(type, bubbles, cancelable,
 +											  relatedObject);
 +	}
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/events/FlexChangeEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/events/FlexChangeEvent.as
index ba77342,0000000..1efed46
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/events/FlexChangeEvent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/events/FlexChangeEvent.as
@@@ -1,187 -1,0 +1,187 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.events
 +{
 +import org.apache.flex.events.Event;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  The FlexChangeEvent class represents the event object passed to
 + *  an event listener for Flex events that have data associated with
 + *  some change in Flex. The <code>data</code> property provides 
 + *  additional information about the event.
 + *  
 + */
 +public class FlexChangeEvent extends Event
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  The <code>FlexChangeEvent.ADD_CHILD_BRIDGE</code> constant defines the value of the
 +     *  <code>type</code> property of the event object for an <code>addChildBridge</code> event.
 +     *
 +     *  This event is dispatch by a SystemManager after a child SWFBridge has been added. This 
 +     *  event's <code>data</code> property is a reference to the added SWFBridge.
 +     * 
 +     *  added to the SystemManager.
 +     * 
 +     *  <p>The properties of the event object have the following values:</p>
 +     *  <table class="innertable">
 +     *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the
 +     *       event listener that handles the event. For example, if you use
 +     *       <code>myButton.addEventListener()</code> to register an event listener,
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event;
 +     *       it is not always the Object listening for the event.
 +     *       Use the <code>currentTarget</code> property to always access the
 +     *       Object listening for the event.</td></tr>
 +     *  </table>
 +     *
 +     *  @eventType addChildBridge
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const ADD_CHILD_BRIDGE:String = "addChildBridge";
 +
 +    /**
 +     *  The <code>FlexChangeEvent.REMOVE_CHILD_BRIDGE</code> constant defines the value of the
 +     *  <code>type</code> property of the event object for an <code>removeChildBridge</code> event.
 +     *
 +     *  This event is dispatch by a SystemManager just before a child SWFBridge is removed. This 
 +     *  event's <code>data</code> property is a reference to the removed SWFBridge.
 +     * 
 +     *  <p>The properties of the event object have the following values:</p>
 +     *  <table class="innertable">
 +     *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the
 +     *       event listener that handles the event. For example, if you use
 +     *       <code>myButton.addEventListener()</code> to register an event listener,
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event;
 +     *       it is not always the Object listening for the event.
 +     *       Use the <code>currentTarget</code> property to always access the
 +     *       Object listening for the event.</td></tr>
 +     *  </table>
 +     *
 +     *  @eventType removeChildBridge
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const REMOVE_CHILD_BRIDGE:String = "removeChildBridge";
 +
 +    /**
 +     *  @private
 +     * 
 +     *  Dispatched by a StyleManager when a style property is changed.
 +     * 
 +     *  The data parameter is an object that describes what changed:
 +     *  
 +     *  "property" - This property describes what kind of style manager
 +     *  property changed. 
 +     *  If the "property" property is "inheritingStyles" then the 
 +     *  StyleManager's inheritingStyles property was updated. 
 +     *  
 +     */
 +    public static const STYLE_MANAGER_CHANGE:String = "styleManagerChange";
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @param type The event type; indicates the action that caused the event.
 +     *
 +     *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
 +     *
 +     *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
 +     *
 +     *  @param data Data related to the event.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */ 
 +    public function FlexChangeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, data:Object = null)
 +    {
 +        super(type, bubbles, cancelable);
 +        
 +        this.data = data;
 +    }
 +        
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  data
 +    //----------------------------------
 +
 +    /**
 +     *  Data related to the event. For more information on this object, see each event type.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var data:Object;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: Event
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function cloneEvent():Event
 +    {
 +        return new FlexChangeEvent(type, bubbles, cancelable, data);
 +    }
 +
 +}
- }
++}


[43/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/ContainerGlobals.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/ContainerGlobals.as
index 5c76b97,0000000..56833ba
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/ContainerGlobals.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/ContainerGlobals.as
@@@ -1,114 -1,0 +1,114 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.InteractiveObject;	
 +}
 +COMPILE::JS
 +{
 +	import flex.display.InteractiveObject;	
 +}
 +import mx.managers.IFocusManager;
 +import mx.managers.IFocusManagerContainer;
 +
 +/**
 +*  @private
 +*/
 +public class ContainerGlobals
 +{
 +    /**
 +     *  @private
 +     *  Internal variable that keeps track of the container
 +     *  that currently has focus.
 +     */
 +    public static var focusedContainer:InteractiveObject;
 +
 +    /**
 +     *  @private
 +     *  Support for defaultButton.
 +     */
 +    public static function checkFocus(oldObj:InteractiveObject,
 +                                           newObj:InteractiveObject):void
 +    {
 +        var objParent:InteractiveObject = newObj;
 +        var currObj:InteractiveObject = newObj;
 +        var lastUIComp:IUIComponent = null;
 +
 +        if (newObj != null && oldObj == newObj)
 +            return;
 +        
 +        // Find the Container parent with a defaultButton defined.
 +        while (currObj)
 +        {
 +            if (currObj.parent)
 +            {
 +                objParent = currObj.parent;
 +            }
 +            else
 +            {
 +                objParent = null;
 +            }
 +
 +            if (currObj is IUIComponent)
 +                lastUIComp = IUIComponent(currObj);
 +
 +            currObj = objParent;
 +
 +            if (currObj &&
 +                currObj is IFocusManagerContainer && IFocusManagerContainer(currObj).defaultButton)
 +            {
 +                break;
 +            }
 +        }
 +
 +        if (ContainerGlobals.focusedContainer != currObj || 
 +            (ContainerGlobals.focusedContainer == null && currObj == null))
 +        {
 +            if (!currObj)
 +                currObj = InteractiveObject(lastUIComp);
 +
 +            if (currObj && currObj is IFocusManagerContainer)
 +            {
 +                var fm:IFocusManager = IFocusManagerContainer(currObj).focusManager;
 +                if (!fm)
 +                    return;
 +                var defButton:IButton = IFocusManagerContainer(currObj).defaultButton as IButton;
 +                if (defButton)
 +                {
 +                    ContainerGlobals.focusedContainer = InteractiveObject(currObj);
 +                    fm.defaultButton = defButton as IButton;
 +                }
 +                else
 +                {
 +                    ContainerGlobals.focusedContainer = InteractiveObject(currObj);
 +                    fm.defaultButton = null;
 +                }
 +            }
 +        }
 +    }
 +
 +
 +}
 +
 +}
 +

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/ContainerRawChildrenList.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/ContainerRawChildrenList.as
index 299eb35,0000000..32f923f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/ContainerRawChildrenList.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/ContainerRawChildrenList.as
@@@ -1,235 -1,0 +1,235 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.display.DisplayObject;
 +import flash.geom.Point;
 +}
 +COMPILE::JS
 +{
 +import flex.display.DisplayObject;
 +import org.apache.flex.geom.Point;
 +}
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  Helper class for the rawChildren property of the Container class.
 + *  For descriptions of the properties and methods,
 + *  see the IChildList interface.
 + *
 + *  @see mx.core.Container
 + */
 +public class ContainerRawChildrenList implements IChildList
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Notes
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /*
 +
 +        Although at the level of a Flash DisplayObjectContainer, all
 +        children are equal, in a Flex Container some children are "more
 +        equal than others". (George Orwell, "Animal Farm")
 +        
 +        In particular, Flex distinguishes between content children and
 +        non-content (or "chrome") children. Content children are the kind
 +        that can be specified in MXML. If you put several controls
 +        into a VBox, those are its content children. Non-content children
 +        are the other ones that you get automatically, such as a
 +        background/border, scrollbars, the titlebar of a Panel,
 +        AccordionHeaders, etc.
 +
 +        Most application developers are uninterested in non-content children,
 +        so Container overrides APIs such as numChildren and getChildAt()
 +        to deal only with content children. For example, Container, keeps
 +        its own _numChildren counter.
 +
 +        However, developers of custom containers need to be able to deal
 +        with both content and non-content children, so they require similar
 +        APIs that operate on all children.
 +
 +        For the public API, it would be ugly to have double APIs on Container
 +        such as getChildAt() and all_getChildAt(). Instead, Container has
 +        a public rawChildren property which lets you access APIs which
 +        operate on all the children, in the same way that the
 +        DisplayObjectContainer APIs do. For example, getChildAt(0) returns
 +        the first content child, while rawChildren.getChildAt(0) returns
 +        the first child (either content or non-content).
 +
 +        This ContainerRawChildrenList class implements the rawChildren
 +        property. Note that it simply calls a second set of parallel
 +        mx_internal APIs in Container. (They're named, for example,
 +        _getChildAt() instead of all_getChildAt()).
 +
 +        Many of the all-children APIs in Container such as _getChildAt()
 +        simply call super.getChildAt() in order to get the implementation
 +        in DisplayObjectContainer. It would be nice if we could eliminate
 +        _getChildAt() in Container and simply implement the all-children
 +        version in this class by calling the DisplayObjectContainer method.
 +        But once Container overrides getChildAt(), there is no way
 +        to call the supermethod through an instance.
 +
 +    */
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Constructor.
 +     */
 +    public function ContainerRawChildrenList(owner:Container)
 +    {
 +        super();
 +
 +        this.owner = owner;
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var owner:Container;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  numChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public function get numChildren():int
 +    {
 +        return owner.$numChildren;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public function addChild(child:DisplayObject):DisplayObject
 +    {
 +        return owner.rawChildren_addChild(child);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function addChildAt(child:DisplayObject, index:int):DisplayObject
 +    {
 +        return owner.rawChildren_addChildAt(child, index);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function removeChild(child:DisplayObject):DisplayObject
 +    {
 +        return owner.rawChildren_removeChild(child);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function removeChildAt(index:int):DisplayObject
 +    {
 +        return owner.rawChildren_removeChildAt(index);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function getChildAt(index:int):DisplayObject
 +    {
 +        return owner.rawChildren_getChildAt(index);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function getChildByName(name:String):DisplayObject
 +    {
 +        return owner.rawChildren_getChildByName(name);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function getChildIndex(child:DisplayObject):int
 +    {
 +        return owner.rawChildren_getChildIndex(child);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function setChildIndex(child:DisplayObject, newIndex:int):void
 +    {       
 +        owner.rawChildren_setChildIndex(child, newIndex);
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function getObjectsUnderPoint(point:Point):Array
 +    {
 +        return owner.rawChildren_getObjectsUnderPoint(point);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function contains(child:DisplayObject):Boolean
 +    {
 +        return owner.rawChildren_contains(child);
 +    }   
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/DPIClassification.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/DPIClassification.as
index acd4a2d,0000000..c6e3c56
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/DPIClassification.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/DPIClassification.as
@@@ -1,98 -1,0 +1,98 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
 +/**
 + *  An enum of the device screen density classess.  
 + *
 + *  When working with DPI, Flex collapses similar DPI values into DPI classes.
 + *
 + *  @see spark.components.Application#applicationDPI
 + *  @see spark.components.Application#runtimeDPI
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +public final class DPIClassification
 +{
 +	/**
 +	 *  Density value for extra-low-density devices.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.5
 +	 *  @productversion ApacheFlex 4.11
 +	 */
 +	public static const DPI_120:Number = 120;
 +	
 +    /**
 +     *  Density value for low-density devices.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 2.5
 +     *  @productversion Flex 4.5
 +     */
 +    public static const DPI_160:Number = 160;
 +
 +    /**
 +     *  Density value for medium-density devices.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 2.5
 +     *  @productversion Flex 4.5
 +     */
 +    public static const DPI_240:Number = 240;
 +
 +	/**
 +	 *  Density value for high-density devices.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.5
 +	 *  @productversion Flex 4.5
 +	 */
 +	public static const DPI_320:Number = 320;
 +	
 +	/**
 +	 *  Density value for extra-high-density devices.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.5
 +	 *  @productversion ApacheFlex 4.10
 +	 */
 +	public static const DPI_480:Number = 480;
 +	
 +	/**
 +	 *  Density value for extra-extra-high-density devices.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.5
 +	 *  @productversion ApacheFlex 4.11
 +	 */
 +	public static const DPI_640:Number = 640;
 +}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IChildList.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IChildList.as
index 680fb31,0000000..7556e92
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IChildList.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IChildList.as
@@@ -1,314 -1,0 +1,314 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +	import flash.geom.Point;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;		
 +	import org.apache.flex.geom.Point;
 +}
 +
 +/**
 + *  The IChildList interface defines the properties and methods
 + *  for accessing and manipulating child lists, which are subsets
 + *  of a DisplayObjectContainer's children.
 + *
 + *  <p>As an example, consider the Container class.
 + *  It overrides DisplayObjectContainer APIs such as the 
 + *  <code>numChildren</code> and <code>getChildAt()</code> methods
 + *  to access only "content" children, which are the controls
 + *  and other containers that you put inside it.
 + *  But a Container can also have additional children
 + *  created automatically by the framework, such as a background or border
 + *  skin and scrollbars.
 + *  So Container exposes a property called <code>rawChildren</code> 
 + *  of type IChildList, which lets you access all its children,
 + *  not just the content children.</p>
 + *
 + *  <p>As another example, the SystemManager class is a DisplayObjectContainer
 + *  whose children are partitioned into various layers:
 + *  normal children like the Application are on the bottom,
 + *  popups above them, tooltips above them, and cursors on the top.
 + *  The SystemManager class has properties named <code>popUpChildren</code>,
 + *  <code>toolTipChildren</code>, and <code>cursorChildren</code>
 + *  which let you access these layers, and the type of each of these
 + *  properties is IChildList.
 + *  Therefore, you can count the number of popups using the 
 + *  <code>systemManager.popUpChildren.numChildren</code> property,
 + *  insert another DisplayObject into the tooltip layer using the 
 + *  <code>systemManager.toolTipChildren.addChild()</code> method, and so on.</p>
 + *
 + *  @see mx.core.Container#rawChildren
 + *  @see mx.managers.SystemManager#rawChildren
 + *  @see mx.managers.SystemManager#popUpChildren
 + *  @see mx.managers.SystemManager#toolTipChildren
 + *  @see mx.managers.SystemManager#cursorChildren
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IChildList
 +{
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	//----------------------------------
 +	//  numChildren
 +	//----------------------------------
 +
 +	/**
 +	 *  The number of children in this child list.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get numChildren():int;
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    /**
 +     *  Adds a child DisplayObject after the end of this child list.
 +     *
 +	 *  <p>Calling <code>childList.addChild(child)</code> is the same as calling
 +	 *  <code>childList.addChild(child, childList.numChildren)</code>
 +	 *  After it has been added, its index of the new child
 +	 *  will be <code>(child.numChildren - 1)</code></p>
 +     *
 +     *  @param child The DisplayObject to add as a child.
 +     *
 +     *  @return The child that was added; this is the same
 +	 *  as the argument passed in.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	function addChild(child:DisplayObject):DisplayObject;
 +	
 +    /**
 +     *  Adds a child DisplayObject to this child list at the index specified.
 +	 *  An index of 0 represents the beginning of the DisplayList,
 +	 *  and an index of <code>numChildren</code> represents the end.
 +	 *
 +	 *  <p>Adding a child anywhere except at the end of a child list
 +	 *  will increment the indexes of children that were previously
 +	 *  at that index or at higher indices.</p>
 +     *
 +     *  @param child The DisplayObject to add as a child.
 +	 *
 +     *  @param index The index to add the child at.
 +     *
 +     *  @return The child that was added; this is the same
 +	 *  as the <code>child</code> argument passed in.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	function addChildAt(child:DisplayObject, index:int):DisplayObject;
 +	
 +    /**
 +     *  Removes the specified child DisplayObject from this child list.
 +	 *
 +	 *  <p>Removing a child anywhere except from the end of a child list
 +	 *  will decrement the indexes of children that were at higher indices.</p>
 +     *
 +	 *  <p>The removed child will have its parent set to null and will be
 +	 *  garbage collected if no other references to it exist.</p>
 +     *
 +     *  @param child The DisplayObject to remove.
 +     *
 +     *  @return The child that was removed; this is the same
 +	 *  as the argument passed in.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	function removeChild(child:DisplayObject):DisplayObject;
 +	
 +    /**
 +     *  Removes the child DisplayObject at the specified index
 +	 *  from this child list.
 +	 *
 +	 *  <p>Removing a child anywhere except from the end of a child list
 +	 *  will decrement the indexes of children that were at higher indices.</p>
 +     *
 +     *  <p>The removed child will have its parent set to null and will be
 +	 *  garbage collected if no other references to it exist.</p>
 +     *
 +     *  @param index The child index of the DisplayObject to remove.
 +     *
 +     *  @return The child that was removed.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */	     
 +	function removeChildAt(index:int):DisplayObject;
 +	
 +	/**
 +	 *  Gets the child DisplayObject at the specified index in this child list.
 +	 *
 +	 *  @param index An integer from 0 to <code>(numChildren - 1)</code>
 +	 *  that specifies the index of a child in this child list.
 +	 *
 +	 *  @return The child at the specified index.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	function getChildAt(index:int):DisplayObject;
 +	
 +    /**
 +     *  Gets the child DisplayObject with the specified name
 +	 *  in this child list.
 +     *
 +     *  @param name The name of the child to return.
 +	 *
 +     *  @return The child with the specified name.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +  	function getChildByName(name:String):DisplayObject;
 +  	
 +	/**
 +	 *  Gets the index of a specific child in this child list.
 +	 *
 +	 *  <p>The first child in the child list has an index of 0,
 +	 *  the second child has an index of 1, and the last child
 +	 *  has an index of <code>(numChildren - 1)</code>.</p>
 +	 *
 +	 *  <p>If <code>getChildIndex(myChild)</code> returns 5,
 +	 *  then <code>myView.getChildAt(5)</code> returns
 +	 *  <code>myChild</code>.</p>
 +	 *
 +	 *  <p>If you add a child by calling the <code>addChild()</code> method,
 +	 *  the new child's index is equal to the largest index among the
 +	 *  existing children plus one.</p>
 +	 *
 +	 *  <p>You can insert a child at a specified index by using the
 +	 *  <code>addChildAt()</code> method
 +	 *  In that case the children previously at that index and higher
 +	 *  indices have their index increased by 1 so that all
 +	 *  children are indexed from 0 to <code>(numChildren - 1)</code>.</p>
 +	 *
 +	 *  <p>If you remove a child by calling the <code>removeChild()</code>
 +	 *  or <code>removeChildAt()</code> method, then the children
 +	 *  at higher indices have their index decreased by 1 so that
 +	 *  all children are indexed from 0 to <code>(numChildren - 1)</code>.</p>
 +	 *
 +	 *  <p>If you change a child's index by calling the
 +	 *  <code>setChildIndex()</code> method, then the children between
 +	 *  the old index and the new index, inclusive, have their indexes
 +	 *  adjusted so that all children are indexed from
 +	 *  0 to <code>(numChildren - 1)</code>.</p>
 +	 *
 +	 *  @param child The child whose index to get.
 +	 *
 +	 *  @return The index of the child, which is an integer
 +	 *  between 0 and <code>(numChildren - 1)</code>.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	function getChildIndex(child:DisplayObject):int;
 +  	
 +	/**
 +	 *  Changes the index of a particular child in this child list.
 +	 *  See the <code>getChildIndex()</code> method for a
 +	 *  description of the child's index.
 +	 * 
 +	 *  @param child The child whose index to set.
 +	 *
 +	 *  @param newIndex The new index for the specified child.
 +	 *  This must be an integer between zero and <code>(numChildren - 1)</code>.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function setChildIndex(child:DisplayObject, newIndex:int):void;
 +	
 +    /**
 +     *  Returns an array of DisplayObjects that lie under the specified point
 +	 *  and are in this child list.
 +     *
 +     *  @param point The point under which to look.
 +	 *
 +     *  @return An array of object that lie under the specified point
 +	 *  that are children of this Container.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +	function getObjectsUnderPoint(point:Point):Array;
 +
 +	/**
 +	 *  Determines if a DisplayObject is in this child list,
 +	 *  or is a descendant of an child in this child list.
 +	 *
 +	 *  @param child The DisplayObject to test.
 +	 *
 +	 *  @return <code>true</code> if the DisplayObject is in this child list
 +	 *  or is a descendant of an child in this child list;
 +	 *  <code>false</code> otherwise.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function contains(child:DisplayObject):Boolean;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IConstraintClient.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IConstraintClient.as
index ea9728f,0000000..d437d66
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IConstraintClient.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IConstraintClient.as
@@@ -1,96 -1,0 +1,96 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
 +/**
 + *  The IConstraintClient interface defines the interface for components that
 + *  support layout constraints. This interface is only used by implementations
 + *  of constraint-based layout. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +
 +public interface IConstraintClient
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  getConstraintValue
 +    //----------------------------------
 +
 +    /**
 +     *  Returns the specified constraint value.
 +     *
 +     *  @param constraintName name of the constraint value. Constraint parameters are
 +     *  "<code>baseline</code>", "<code>bottom</code>", "<code>horizontalCenter</code>", 
 +     *  "<code>left</code>", "<code>right</code>", "<code>top</code>", and 
 +     *  "<code>verticalCenter</code>".
 +     *
 +     *  <p>For more information about these parameters, see the Canvas and Panel containers and 
 +     *  Styles Metadata AnchorStyles.</p>
 +     *
 +     *  @return The constraint value, or null if it is not defined.
 +     *
 +     *  @see mx.containers.Canvas
 +     *  @see mx.containers.Panel
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getConstraintValue(constraintName:String):*;
 +
 +    //----------------------------------
 +    //  setConstraintValue
 +    //----------------------------------
 +
 +    /**
 +     *  Sets the specified constraint value.
 +     *
 +     *  @param constraintName name of the constraint value. Constraint parameters are
 +     *  "<code>baseline</code>", "<code>bottom</code>", "<code>horizontalCenter</code>", 
 +     *  "<code>left</code>", "<code>right</code>", "<code>top</code>", and 
 +     *  "<code>verticalCenter</code>".
 +     *
 +     *  <p>For more information about these parameters, see the Canvas and Panel containers and 
 +     *  Styles Metadata AnchorStyles.</p>
 +     *
 +     *  @param value The new value for the constraint.
 +     *
 +     *  @see mx.containers.Canvas
 +     *  @see mx.containers.Panel
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function setConstraintValue(constraintName:String, value:*):void;
 +}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IContainer.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IContainer.as
index 8151a41,0000000..7a2ddda
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IContainer.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IContainer.as
@@@ -1,138 -1,0 +1,138 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
 +import mx.managers.IFocusManager;
 +
 +/**
 + *  IContainer is a interface that indicates a component
 + *  extends or mimics mx.core.Container
 + *
 + *  @see mx.core.Container
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IContainer extends IUIComponent
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;
 +	import flash.display.Sprite;		
 +	import flash.geom.Point;
 +	import flash.geom.Rectangle;
 +	import flash.display.Graphics;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;
 +	import flex.display.Sprite;		
 +	import org.apache.flex.geom.Point;
 +	import org.apache.flex.geom.Rectangle;
 +	import flex.display.Graphics;
 +}
 +COMPILE::LATER
 +{
 +	import flash.media.SoundTransform;
 +}
 +
 +include "ISpriteInterface.as"
 +include "IDisplayObjectContainerInterface.as"
- COMPILE::AS3
++COMPILE::SWF
 +{
 +include "IInteractiveObjectInterface.as"
 +}
 +
 +    /**
 +     *  @copy mx.core.Container#defaultButton
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get defaultButton():IFlexDisplayObject;
 +    function set defaultButton(value:IFlexDisplayObject):void;
 +
 +    /**
 +     *  @copy mx.core.Container#creatingContentPane
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get creatingContentPane():Boolean;
 +    function set creatingContentPane(value:Boolean):void;
 +
 +    /**
 +     *  @copy mx.core.Container#viewMetrics
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get viewMetrics():EdgeMetrics;
 +
 +    /**
 +     *  @copy mx.core.Container#horizontalScrollPosition
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get horizontalScrollPosition():Number;
 +	COMPILE::LATER
 +    function set horizontalScrollPosition(value:Number):void;
 +
 +    /**
 +     *  @copy mx.core.Container#verticalScrollPosition
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get verticalScrollPosition():Number;
 +	COMPILE::LATER
 +    function set verticalScrollPosition(value:Number):void;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#focusManager
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get focusManager():IFocusManager;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IDeferredContentOwner.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IDeferredContentOwner.as
index 7dba39b,0000000..1714b48
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IDeferredContentOwner.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IDeferredContentOwner.as
@@@ -1,104 -1,0 +1,104 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
 +/**
 + *  Dispatched after the content for this component has been created. With deferred 
 + *  instantiation, the content for a component can be created long after the 
 + *  component is created.
 + *
 + *  @eventType mx.events.FlexEvent.CONTENT_CREATION_COMPLETE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +[Event(name="contentCreationComplete", type="mx.events.FlexEvent")]
 +
 +/**
 + *  The IDeferredContentOwner interface defines the properties and methods
 + *  for deferred instantiation.
 + * 
 + *  @see spark.components.SkinnableContainer
 + *  @see mx.core.Container
 + *  @see mx.core.INavigatorContent
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +public interface IDeferredContentOwner extends IUIComponent
 +{
 +    [Inspectable(enumeration="auto, all, none", defaultValue="auto")]
 +
 +    /**
 +     *  Content creation policy for this component.
 +     *
 +     *  <p>Possible values are:
 +     *    <ul>
 +     *      <li><code>auto</code> - Automatically create the content immediately before it is needed.</li>
 +     *      <li><code>all</code> - Create the content as soon as the parent component is created. This
 +     *          option should only be used as a last resort because it increases startup time and memory usage.</li>
 +     *      <li><code>none</code> - Content must be created manually by calling 
 +     *          the <code>createDeferredContent()</code> method.</li>
 +     *    </ul>
 +     *  </p>
 +     *  
 +     *  <p>If no <code>creationPolicy</code> is specified for a container, that container inherits the value of 
 +     *  its parent's <code>creationPolicy</code> property.</p>
 +     *
 +     *  @default "auto"
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get creationPolicy():String;
 +    function set creationPolicy(value:String):void;
 +
 +    /**
 +     *  Create the content for this component. If the value of the <code>creationPolicy</code> property
 +     *  is <code>auto</code> or <code>all</code>, this the Flex framework calls this method. If the value of the 
 +     *  <code>creationPolicy</code> property is <code>none</code>, you must explicitly call this method
 +     *  to create the content for the component.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function createDeferredContent():void;
 +
 +    /**
 +     *  A flag that indicates whether the deferred content has been created.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get deferredContentCreated():Boolean;
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
index 4fd04f3,0000000..0c70b19
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
@@@ -1,246 -1,0 +1,246 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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.
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/*
 + *  The IDisplayObjectContainerInterface defines the basic set of APIs
 + *  for web version of flash.display.DisplayObjectContainer
 + *  
 + */
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObjectContainer;		
 +}
 +COMPILE::LATER
 +{
 +import flash.text.TextSnapshot;
 +import flash.geom.Point;
 +}
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#addChild()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function addChild(child:flash.display.DisplayObject):flash.display.DisplayObject;
 +	COMPILE::JS
 +	function addChild(child:DisplayObject):DisplayObject;
 +   
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#addChildAt()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +	function addChildAt(child:flash.display.DisplayObject, index:int):flash.display.DisplayObject;
 +	COMPILE::JS
 +    function addChildAt(child:DisplayObject, index:int):DisplayObject;
 +    
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#removeChild()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function removeChild(child:flash.display.DisplayObject):flash.display.DisplayObject;
 +	COMPILE::JS
 +	function removeChild(child:DisplayObject):DisplayObject;
 +    
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#removeChildAt()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function removeChildAt(index:int):flash.display.DisplayObject;
 +	COMPILE::JS
 +	function removeChildAt(index:int):DisplayObject;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#getChildIndex()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function getChildIndex(child:flash.display.DisplayObject):int;
 +	COMPILE::JS
 +	function getChildIndex(child:DisplayObject):int;
 +    
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#setChildIndex()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function setChildIndex(child:flash.display.DisplayObject, index:int):void;
 +	COMPILE::JS
 +	function setChildIndex(child:DisplayObject, index:int):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#getChildAt()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function getChildAt(index:int):flash.display.DisplayObject;
 +	COMPILE::JS
 +	function getChildAt(index:int):DisplayObject;
 +    
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#getChildByName()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function getChildByName(name:String):flash.display.DisplayObject;
 +	COMPILE::JS
 +	function getChildByName(name:String):DisplayObject;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#numChildren
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get numChildren():int;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#textSnapshot
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get textSnapshot():TextSnapshot;
 +    
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#getObjectsUnderPoint()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function getObjectsUnderPoint(point:Point):Array;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#areInaccessibleObjectsUnderPoint()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function areInaccessibleObjectsUnderPoint(point:Point):Boolean;
 +
 +    /**
 +     *  Determines whether the children of the object are tab enabled. 
 +     *  
 +     *  <p><b>Note:</b> Do not use this property with Flex.
 +     *  Instead, use the <code>UIComponent.hasFocusableChildren</code> property.</p>
 +     *
 +     *  @see mx.core.UIComponent#hasFocusableChildren
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get tabChildren():Boolean;
 +	COMPILE::LATER
 +    function set tabChildren(enable:Boolean):void;
 +    
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#mouseChildren
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get mouseChildren():Boolean;
 +	COMPILE::LATER
 +    function set mouseChildren(enable:Boolean):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#contains()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function contains(child:flash.display.DisplayObject):Boolean;
 +	COMPILE::JS
 +	function contains(child:DisplayObject):Boolean;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#swapChildrenAt()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function swapChildrenAt(index1:int, index2:int):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObjectContainer#swapChildren()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function swapChildren(child1:DisplayObject, child2:DisplayObject):void;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectInterface.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectInterface.as
index f84242d,0000000..794bdbc
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectInterface.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectInterface.as
@@@ -1,416 -1,0 +1,416 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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.
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/*
 + *  The methods here would normally just be in IDisplayObject,
 + *  but for backward compatibility, they have to be included
 + *  directly into IFlexDisplayObject, so they are kept in 
 + *  this separate include file.
 + */
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#root
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function get root():flash.display.DisplayObject;
 +	COMPILE::JS
 +	function get root():DisplayObject;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#stage
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get stage():Stage;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#name
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get name():String;
 +    function set name(value:String):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#parent
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    function get parent():flash.display.DisplayObjectContainer;
 +	COMPILE::JS
 +	function get parent():DisplayObjectContainer;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#mask
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get mask():DisplayObject;
 +	COMPILE::LATER
 +    function set mask(value:DisplayObject):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#visible
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +    function get visible():Boolean;
 +    function set visible(value:Boolean):void;
 +	 * already in IUIBase
 +     */
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#x
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +    function get x():Number;
 +    function set x(value:Number):void;
 +	* already in IUIBase
 +	*/
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#y
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +    function get y():Number;
 +    function set y(value:Number):void;
 +	 * already in IUIBase
 +     */
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#scaleX
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get scaleX():Number;
 +	COMPILE::LATER
 +    function set scaleX(value:Number):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#scaleY
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get scaleY():Number;
 +	COMPILE::LATER
 +    function set scaleY(value:Number):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#mouseX
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get mouseX():Number; // note: no setter
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#mouseY
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get mouseY():Number; // note: no setter
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#rotation
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get rotation():Number;
 +	COMPILE::LATER
 +    function set rotation(value:Number):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#alpha
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +    function get alpha():Number;
 +    function set alpha(value:Number):void;
 +	 * already in IUIBase
 +     */
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#width
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +    function get width():Number;
 +    function set width(value:Number):void;
 +	 * already in IUIBase
 +     */
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#height
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +    function get height():Number;
 +    function set height(value:Number):void;
 +	 * already in IUIBase
 +     */
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#cacheAsBitmap
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get cacheAsBitmap():Boolean;
 +	COMPILE::LATER
 +    function set cacheAsBitmap(value:Boolean):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#opaqueBackground
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get opaqueBackground():Object;
 +	COMPILE::LATER
 +    function set opaqueBackground(value:Object):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#scrollRect
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get scrollRect():Rectangle;
 +	COMPILE::LATER
 +    function set scrollRect(value:Rectangle):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#filters
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get filters():Array;
 +	COMPILE::LATER
 +    function set filters(value:Array):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#blendMode
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get blendMode():String;
 +	COMPILE::LATER
 +    function set blendMode(value:String):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#transform
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get transform():Transform;
 +	COMPILE::LATER
 +    function set transform(value:Transform):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#scale9Grid
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get scale9Grid():Rectangle;
 +	COMPILE::LATER
 +    function set scale9Grid(innerRectangle:Rectangle):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#globalToLocal()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function globalToLocal(point:Point):Point;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#localToGlobal()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function localToGlobal(point:Point):Point;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#getBounds()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function getBounds(targetCoordinateSpace:DisplayObject):Rectangle;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#getRect()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function getRect(targetCoordinateSpace:DisplayObject):Rectangle;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#loaderInfo
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get loaderInfo() : LoaderInfo;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#hitTestObject()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function hitTestObject(obj:DisplayObject):Boolean;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#hitTestPoint()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function hitTestPoint(x:Number, y:Number, shapeFlag:Boolean=false):Boolean;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#accessibilityProperties
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get accessibilityProperties() : AccessibilityProperties;
 +	COMPILE::LATER
 +    function set accessibilityProperties( value : AccessibilityProperties ) : void;
 +    

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IFlexDisplayObject.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IFlexDisplayObject.as
index ecb8dd5,0000000..cb6743f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IFlexDisplayObject.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IFlexDisplayObject.as
@@@ -1,153 -1,0 +1,153 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
 +//import flash.display.IBitmapDrawable;
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;
 +	import flash.geom.Rectangle;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;	
 +	import org.apache.flex.geom.Rectangle;
 +}
 +import org.apache.flex.events.IEventDispatcher;
 +import flex.display.TopOfDisplayList;
 +
 +/**
 + *  The IFlexDisplayObject interface defines the interface for skin elements.
 + *  At a minimum, a skin must be a DisplayObject and implement this interface.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IFlexDisplayObject extends /*IBitmapDrawable, */IEventDispatcher, flex.display.DisplayObject
 +{
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +
 +	//----------------------------------
 +	//  measuredHeight
 +	//----------------------------------
 +
 +	/**
 +	 *  The measured height of this object.
 +	 *
 +	 *  <p>This is typically hard-coded for graphical skins
 +	 *  because this number is simply the number of pixels in the graphic.
 +	 *  For code skins, it can also be hard-coded
 +	 *  if you expect to be drawn at a certain size.
 +	 *  If your size can change based on properties, you may want
 +	 *  to also be an ILayoutManagerClient so a <code>measure()</code>
 +	 *  method will be called at an appropriate time,
 +	 *  giving you an opportunity to compute a <code>measuredHeight</code>.</p>
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get measuredHeight():Number;
 +
 +	//----------------------------------
 +	//  measuredWidth
 +	//----------------------------------
 +
 +	/**
 +	 *  The measured width of this object.
 +	 *
 +	 *  <p>This is typically hard-coded for graphical skins
 +	 *  because this number is simply the number of pixels in the graphic.
 +	 *  For code skins, it can also be hard-coded
 +	 *  if you expect to be drawn at a certain size.
 +	 *  If your size can change based on properties, you may want
 +	 *  to also be an ILayoutManagerClient so a <code>measure()</code>
 +	 *  method will be called at an appropriate time,
 +	 *  giving you an opportunity to compute a <code>measuredHeight</code>.</p>
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get measuredWidth():Number;
 +
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  Moves this object to the specified x and y coordinates.
 +	 * 
 +	 *  @param x The new x-position for this object.
 +	 * 
 +	 *  @param y The new y-position for this object.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function move(x:Number, y:Number):void;
 +
 +	/**
 +	 *  Sets the actual size of this object.
 +	 *
 +	 *  <p>This method is mainly for use in implementing the
 +	 *  <code>updateDisplayList()</code> method, which is where
 +	 *  you compute this object's actual size based on
 +	 *  its explicit size, parent-relative (percent) size,
 +	 *  and measured size.
 +	 *  You then apply this actual size to the object
 +	 *  by calling <code>setActualSize()</code>.</p>
 +	 *
 +	 *  <p>In other situations, you should be setting properties
 +	 *  such as <code>width</code>, <code>height</code>,
 +	 *  <code>percentWidth</code>, or <code>percentHeight</code>
 +	 *  rather than calling this method.</p>
 +	 * 
 +	 *  @param newWidth The new width for this object.
 +	 * 
 +	 *  @param newHeight The new height for this object.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function setActualSize(newWidth:Number, newHeight:Number):void;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/INavigatorContent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/INavigatorContent.as
index 27afaa4,0000000..a1fa6aa
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/INavigatorContent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/INavigatorContent.as
@@@ -1,67 -1,0 +1,67 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +import mx.managers.IToolTipManagerClient;
 +
 +/**
 + *  The INavigatorContent interface defines the interface that a container must 
 + *  implement to be used as the child of a navigator container, 
 + *  such as the ViewStack, TabNavigator, and Accordion navigator containers.
 + *
 + *  @see mx.containers.Accordion
 + *  @see mx.containers.TabNavigator
 + *  @see mx.containers.ViewStack
 + *
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +public interface INavigatorContent extends IDeferredContentOwner, IToolTipManagerClient
 +{
 +    [Bindable("labelChanged")]
 +    /**
 +     *  The text displayed by the navigator container for this container.
 +     *  For example, the text appears in the button area of an Accordion container
 +     *  and in the tab area of the TabNavigator container.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get label():String;
 +
 +    [Bindable("iconChanged")]
 +    /**
 +     *  The icon displayed by the navigator container for this container.
 +     *  The icon appears in the button area of an Accordion container
 +     *  and in the tab area of the TabNavigator container.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get icon():Class;
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IProgrammaticSkin.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IProgrammaticSkin.as
index d1902d0,0000000..31e4cc5
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IProgrammaticSkin.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IProgrammaticSkin.as
@@@ -1,55 -1,0 +1,55 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
 +/**
 + *  The IProgrammaticSkin interface defines the interface that skin classes must implement 
 + *  if they use the <code>name</code> property skin interface. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IProgrammaticSkin
 +{
 +    /**
 +     *  @copy mx.skins.ProgrammaticSkin#validateNow()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function validateNow():void;
 +
 +    /**
 +     *  @copy mx.skins.ProgrammaticSkin#validateDisplayList()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function validateDisplayList():void;
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/ISpriteInterface.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/ISpriteInterface.as
index 0c86380,0000000..57ca61c
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/ISpriteInterface.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/ISpriteInterface.as
@@@ -1,121 -1,0 +1,121 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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.
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/*
 + *  The ISprite interface defines the basic set of APIs
 + *  for web version of flash.display.Sprite
 + */
 +
 +    /**
 +     *  @copy flash.display.Sprite#graphics
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get graphics():Graphics;
 +
 +    /**
 +     *  @copy flash.display.Sprite#buttonMode
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    function get buttonMode():Boolean;
-     COMPILE::AS3
++    COMPILE::SWF
 +    function set buttonMode(value:Boolean):void;
 +
 +    /**
 +     *  @copy flash.display.Sprite#startDrag()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    function startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void;
 +
 +    /**
 +     *  @copy flash.display.Sprite#stopDrag()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    function stopDrag():void;
 +
 +    /**
 +     *  @copy flash.display.Sprite#dropTarget
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    function get dropTarget():DisplayObject;
 +
 +    /**
 +     *  @copy flash.display.Sprite#hitArea
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    function get hitArea():Sprite;
-     COMPILE::AS3
++    COMPILE::SWF
 +    function set hitArea(value:Sprite):void;
 +
 +
 +    /**
 +     *  @copy flash.display.Sprite#useHandCursor
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    function get useHandCursor():Boolean;
-     COMPILE::AS3
++    COMPILE::SWF
 +    function set useHandCursor(value:Boolean):void;
 +
 +
 +    /**
 +     *  @copy flash.display.Sprite#soundTransform
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function get soundTransform():SoundTransform;
 +	COMPILE::LATER
 +    function set soundTransform(sndTransform:SoundTransform):void;
 +

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IStateClient2.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IStateClient2.as
index b7cfa08,0000000..1b0fc06
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IStateClient2.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IStateClient2.as
@@@ -1,103 -1,0 +1,103 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +    
 +import org.apache.flex.events.IEventDispatcher;
 +
 +/**
 + *  The IStateClient2 interface defines the interface that 
 + *  components must implement to support Flex 4 view state
 + *  semantics.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IStateClient2 extends IEventDispatcher, IStateClient 
 +{   
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    //----------------------------------
 +    //  states
 +    //----------------------------------
 +
 +    [ArrayElementType("mx.states.State")]
 +
 +    /**
 +     *  The set of view state objects.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get states():Array;
 +
 +    /**
 +     *  @private
 +     */
 +    function set states(value:Array):void;
 +    
 +    
 +    //----------------------------------
 +    //  transitions
 +    //----------------------------------
 +    
 +    [ArrayElementType("mx.states.Transition")]
 +    
 +    /**
 +     *  The set of view state transitions.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get transitions():Array;
 +
 +    /**
 +     *  @private
 +     */
 +    function set transitions(value:Array):void;
 +    
 +    /**
 +     *  Determines whether the specified state has been defined on this
 +     *  UIComponent. 
 +     *
 +     *  @param stateName The name of the state being checked. 
 +     *
 +     *  @return Whether or not the specified state has been defined 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function hasState(stateName:String):Boolean
 +    
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/ITextFieldFactory.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/ITextFieldFactory.as
index c14101b,0000000..8ec036f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/ITextFieldFactory.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/ITextFieldFactory.as
@@@ -1,78 -1,0 +1,78 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Licensed to the Apache Software Foundation (ASF) under one or more
 +//  contributor license agreements.  See the NOTICE file distributed with
 +//  this work for additional information regarding copyright ownership.
 +//  The ASF licenses this file to You under the Apache License, Version 2.0
 +//  (the "License"); you may not use this file except in compliance with
 +//  the License.  You may obtain a copy of the License at
 +//
 +//      http://www.apache.org/licenses/LICENSE-2.0
 +//
 +//  Unless required by applicable law or agreed to in writing, software
 +//  distributed under the License is distributed on an "AS IS" BASIS,
 +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +//  See the License for the specific language governing permissions and
 +//  limitations under the License.
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +package mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.text.TextField;		
 +}
 +COMPILE::JS
 +{
 +	import flex.text.TextField;	
 +}
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  Interface to create instances of TextField and FTETextField.
 + *  These are re-used so that there are no more than one of each
 + *  per module factory.
 + */
 +public interface ITextFieldFactory
 +{
 +	/**
 +	 *  Creates an instance of TextField
 +	 *  in the context of the specified IFlexModuleFactory.
 +	 *
 +	 *  @param moduleFactory The IFlexModuleFactory requesting the TextField.
 +	 *
 +	 *	@return A FTETextField created in the context
 +	 *  of <code>moduleFactory</code>.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function createTextField(moduleFactory:IFlexModuleFactory):TextField;
 +	
 +	/**
 +	 *  Creates an instance of FTETextField
 +	 *  in the context of the specified module factory.
 +	 * 
 +	 *  @param moduleFactory The IFlexModuleFactory requesting the TextField.
 +	 *  May not be <code>null</code>.
 +	 *
 +	 *	@return A FTETextField created in the context
 +	 *  of <code>moduleFactory</code>.
 +	 *  The return value is loosely typed as Object
 +	 *  to avoid linking in FTETextField (and therefore much of TLF).
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 4
 +	 */
 +	function createFTETextField(moduleFactory:IFlexModuleFactory):Object;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/ITransientDeferredInstance.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/ITransientDeferredInstance.as
index 65f31d1,0000000..c1952ba
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/ITransientDeferredInstance.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/ITransientDeferredInstance.as
@@@ -1,65 -1,0 +1,65 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
 +/**
 + *  The ITransientDeferredInstance interface extends IDeferredInstance and adds 
 + *  the ability for the user to reset the deferred instance factory to its
 + *  initial state (usually this implies releasing any known references to the
 + *  component, such as the setting the owning document property that refers to
 + *  the instance to null).
 + *
 + *  This additional capability is leveraged by the AddItems states override when
 + *  the desired behavior is to destroy a state-specific element when a state
 + *  no longer applies.
 + * 
 + *  The Flex compiler uses the same automatic coercion rules as with
 + *  IDeferredInstance.
 + * 
 + *  @see mx.states.AddItems
 + *  @see mx.core.IDeferredInstance
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +public interface ITransientDeferredInstance extends IDeferredInstance
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Resets the state of our factory to its initial state, clearing any
 +     *  references to the cached instance.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function reset():void;
 +}
 +
- }
++}


[44/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/Container.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/Container.as
index 248e6ba,0000000..1216189
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/Container.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/Container.as
@@@ -1,6131 -1,0 +1,6131 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +    import flash.display.DisplayObject;
 +    import flash.display.DisplayObjectContainer;
 +    import flash.display.Graphics;
 +    import flash.display.InteractiveObject;
 +    import flash.display.Loader;
 +    import flash.display.Shape;
 +    import flash.events.Event;
 +    import flash.events.MouseEvent;
 +    import flash.text.TextField;
 +    import flash.text.TextLineMetrics;
 +    import flash.ui.Keyboard;        
 +}
 +COMPILE::JS
 +{
 +    import flex.display.DisplayObject;
 +    import flex.display.DisplayObjectContainer;
 +    import flex.display.Graphics;
 +    import flex.display.InteractiveObject;
 +    import flex.display.Loader;
 +    import flex.display.Shape;
 +    import flex.events.Event;
 +    import org.apache.flex.events.MouseEvent;
 +    import flex.text.TextField;
 +    import flex.text.TextLineMetrics;
 +    import flex.ui.Keyboard;            
 +}
 +import flex.display.Sprite;
 +import org.apache.flex.geom.Point;
 +import org.apache.flex.geom.Rectangle;
 +import org.apache.flex.utils.PointUtils;
 +import mx.events.KeyboardEvent;
 +
 +import flex.system.DefinitionManager;
 +import org.apache.flex.reflection.getDefinitionByName;
 +import org.apache.flex.core.IVisualElement;
 +
 +import mx.binding.BindingManager;
 +COMPILE::LATER
 +{
 +import mx.containers.utilityClasses.PostScaleAdapter;
 +import mx.controls.HScrollBar;
 +import mx.controls.VScrollBar;
 +import mx.controls.scrollClasses.ScrollBar;
 +import mx.events.ScrollEvent;
 +import mx.events.ScrollEventDetail;
 +import mx.events.ScrollEventDirection;
 +}
 +import mx.controls.listClasses.IListItemRenderer;
 +import mx.core.IUITextField;
 +import mx.events.ChildExistenceChangedEvent;
 +import mx.events.FlexEvent;
 +import mx.events.IndexChangedEvent;
 +import mx.geom.RoundedRectangle;
 +import mx.managers.IFocusManager;
 +import mx.managers.IFocusManagerContainer;
 +import mx.managers.ILayoutManagerClient;
 +import mx.managers.ISystemManager;
 +import mx.styles.CSSStyleDeclaration;
 +import mx.styles.ISimpleStyleClient;
 +import mx.styles.IStyleClient;
 +import mx.styles.StyleProtoChain;
 +
 +use namespace mx_internal;
 +
 +//--------------------------------------
 +//  Events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched after a child has been added to a container.
 + *
 + *  <p>The childAdd event is dispatched when the <code>addChild()</code>
 + *  or <code>addChildAt()</code> method is called.
 + *  When a container is first created, the <code>addChild()</code>
 + *  method is automatically called for each child component declared
 + *  in the MXML file.
 + *  The <code>addChildAt()</code> method is automatically called
 + *  whenever a Repeater object adds or removes child objects.
 + *  The application developer may also manually call these
 + *  methods to add new children.</p>
 + *
 + *  <p>At the time when this event is sent, the child object has been
 + *  initialized, but its width and height have not yet been calculated,
 + *  and the child has not been drawn on the screen.
 + *  If you want to be notified when the child has been fully initialized
 + *  and rendered, then register as a listener for the child's
 + *  <code>creationComplete</code> event.</p>
 + *
 + *  @eventType mx.events.ChildExistenceChangedEvent.CHILD_ADD
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="childAdd", type="mx.events.ChildExistenceChangedEvent")]
 +
 +/**
 + *  Dispatched after the index (among the container children) 
 + *  of a container child changes.
 + *  This event is only dispatched for the child specified as the argument to 
 + *  the <code>setChildIndex()</code> method; it is not dispatched 
 + *  for any other child whose index changes as a side effect of the call 
 + *  to the <code>setChildIndex()</code> method.
 + *
 + *  <p>The child's index is changed when the
 + *  <code>setChildIndex()</code> method is called.</p>
 + *
 + *  @eventType mx.events.IndexChangedEvent.CHILD_INDEX_CHANGE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="childIndexChange", type="mx.events.IndexChangedEvent")]
 +
 +/**
 + *  Dispatched before a child of a container is removed.
 + *
 + *  <p>This event is delivered when any of the following methods is called:
 + *  <code>removeChild()</code>, <code>removeChildAt()</code>,
 + *  or <code>removeAllChildren()</code>.</p>
 + *
 + *  @eventType mx.events.ChildExistenceChangedEvent.CHILD_REMOVE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="childRemove", type="mx.events.ChildExistenceChangedEvent")]
 +
 +/**
 + *  Dispatched when the <code>data</code> property changes.
 + *
 + *  <p>When a container is used as a renderer in a List or other components,
 + *  the <code>data</code> property is used pass to the container 
 + *  the data to display.</p>
 + *
 + *  @eventType mx.events.FlexEvent.DATA_CHANGE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dataChange", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when the user manually scrolls the container.
 + *
 + *  <p>The event is dispatched when the scroll position is changed using
 + *  either the mouse (e.g. clicking on the scrollbar's "down" button)
 + *  or the keyboard (e.g., clicking on the down-arrow key).
 + *  However, this event is not dispatched if the scroll position
 + *  is changed programatically (e.g., setting the value of the
 + *  <code>horizontalScrollPosition</code> property).
 + *  The <code>viewChanged</code> event is delivered whenever the
 + *  scroll position is changed, either manually or programatically.</p>
 + *
 + *  <p>At the time when this event is dispatched, the scrollbar has
 + *  been updated to the new position, but the container's child objects
 + *  have not been shifted to reflect the new scroll position.</p>
 + *
 + *  @eventType mx.events.ScrollEvent.SCROLL
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="scroll", type="mx.events.ScrollEvent")]
 +
 +//--------------------------------------
 +//  Styles
 +//--------------------------------------
 +
 +include "../styles/metadata/BarColorStyle.as"
 +include "../styles/metadata/BorderStyles.as"
 +include "../styles/metadata/ContainerBackgroundStyles.as"
 +include "../styles/metadata/PaddingStyles.as"
 +include "../styles/metadata/TextStyles.as"
 +
 +/**
 + *  Accent color used by component skins. The default button skin uses this color
 + *  to tint the background. Slider track highlighting uses this color. 
 + * 
 + *  @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")]
 +
 +/**
 + *  If a background image is specified, this style specifies
 + *  whether it is fixed with regard to the viewport (<code>"fixed"</code>)
 + *  or scrolls along with the content (<code>"scroll"</code>).
 + *
 + *  @default "scroll"
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="backgroundAttachment", type="String", inherit="no")]
 +
 +/**
 + *  The alpha of the content background for this component.
 + * 
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +[Style(name="contentBackgroundAlpha", type="Number", inherit="yes", theme="spark")]
 +
 +/**
 + *  Color of the content area of the component.
 + *   
 + *  @default 0xFFFFFF
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */ 
 +[Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark")]
 +
 +/**
 + *  Radius of component corners.
 + *  The default value depends on the component class;
 + *  if not overridden for the class, the default value
 + *  is 0.
 + *  The default value for ApplicationControlBar is 5.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo, spark")]
 +
 +/**
 + *  The alpha value for the overlay that is placed on top of the
 + *  container when it is disabled.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="disabledOverlayAlpha", type="Number", inherit="no")]
 +
 +/**
 + *  Color of focus ring when the component is in focus
 + *   
 + *  @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")]
 +
 +/**
 + *  The name of the horizontal scrollbar style.
 + *
 + *  @default undefined
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="horizontalScrollBarStyleName", type="String", inherit="no")]
 +
 +/**
 + *  The name of the vertical scrollbar style.
 + *
 + *  @default undefined
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="verticalScrollBarStyleName", type="String", inherit="no")]
 +
 +/**
 + *  Number of pixels between the container's bottom border
 + *  and the bottom of its content area.
 + *
 + *  @default 0
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Number of pixels between the container's top border
 + *  and the top of its content area.
 + *
 + *  @default 0
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
 +
 +/**
 + *  Color of any symbol of a component. Examples include the check mark of a CheckBox or
 + *  the arrow of a ScrollBar button.
 + *   
 + *  @default 0x000000
 + * 
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */ 
 +[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
 +
 +[ResourceBundle("core")]
 +
 +/**
 + *  The Container class is an abstract base class for components that
 + *  controls the layout characteristics of child components.
 + *  You do not create an instance of Container in an application.
 + *  Instead, you create an instance of one of Container's subclasses,
 + *  such as Canvas or HBox.
 + *
 + *  <p>The Container class contains the logic for scrolling, clipping,
 + *  and dynamic instantiation. 
 + *  It contains methods for adding and removing children.
 + *  It also contains the <code>getChildAt()</code> method, and the logic
 + *  for drawing the background and borders of containers.</p>
 + *
 + *  @mxml
 + *
 + *  Flex Framework containers inherit the following attributes from the Container
 + *  class:</p>
 + *
 + *  <pre>
 + *  &lt;mx:<i>tagname</i>
 + *    <strong>Properties</strong>
 + *    autoLayout="true|false"
 + *    clipContent="true|false"
 + *    creationIndex="undefined"
 + *    creationPolicy="auto|all|queued|none"
 + *    defaultButton="<i>No default</i>"
 + *    horizontalLineScrollSize="5"
 + *    horizontalPageScrollSize="0"
 + *    horizontalScrollBar="null"
 + *    horizontalScrollPolicy="auto|on|off"
 + *    horizontalScrollPosition="0"
 + *    icon="undefined"
 + *    label=""
 + *    verticalLineScrollSize="5"
 + *    verticalPageScrollSize="0"
 + *    verticalScrollBar="null"
 + *    verticalScrollPolicy="auto|on|off"
 + *    verticalScrollPosition="0"
 + * 
 + *    <strong>Styles</strong>
 + *    backgroundAlpha="1.0"
 + *    backgroundAttachment="scroll"
 + *    backgroundColor="undefined"
 + *    backgroundDisabledColor="undefined"
 + *    backgroundImage="undefined"
 + *    backgroundSize="auto" 
 + *    <i>    For the Application container only,</i> backgroundSize="100%"
 + *    barColor="undefined"
 + *    borderColor="0xAAB3B3"
 + *    borderSides="left top right bottom"
 + *    borderSkin="mx.skins.halo.HaloBorder"
 + *    borderStyle="inset"
 + *    borderThickness="1"
 + *    color="0x0B333C"
 + *    cornerRadius="0"
 + *    disabledColor="0xAAB3B3"
 + *    disbledOverlayAlpha="undefined"
 + *    dropShadowColor="0x000000"
 + *    dropShadowEnabled="false"
 + *    fontAntiAliasType="advanced"
 + *    fontfamily="Verdana"
 + *    fontGridFitType="pixel"
 + *    fontSharpness="0""
 + *    fontSize="10"
 + *    fontStyle="normal"
 + *    fontThickness="0"
 + *    fontWeight="normal"
 + *    horizontalScrollBarStyleName="undefined"
 + *    paddingBottom="0"
 + *    paddingLeft="0"
 + *    paddingRight="0"
 + *    paddingTop="0"
 + *    shadowDirection="center"
 + *    shadowDistance="2"
 + *    textAlign="left"
 + *    textDecoration="none|underline"
 + *    textIndent="0"
 + *    verticalScrollBarStyleName="undefined"
 + * 
 + *    <strong>Events</strong>
 + *    childAdd="<i>No default</i>"
 + *    childIndexChange="<i>No default</i>"
 + *    childRemove="<i>No default</i>"
 + *    dataChange="<i>No default</i>"
 + *    scroll="<i>No default</i>"
 + *    &gt;
 + *      ...
 + *      <i>child tags</i>
 + *      ...
 + *  &lt;/mx:<i>tagname</i>&gt;
 + *  </pre>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class Container extends UIComponent
 +                       implements IContainer, IDataRenderer, 
 +                       IFocusManagerContainer, IListItemRenderer,
 +                       IRawChildrenContainer, IChildList, IVisualElementContainer,
 +                       INavigatorContent
 +
 +{
 +    include "../core/Version.as"
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Notes: Child management
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /*
 +
 +        Although at the level of a Flash DisplayObjectContainer, all
 +        children are equal, in a Flex Container some children are "more
 +        equal than others". (George Orwell, "Animal Farm")
 +
 +        In particular, Flex distinguishes between content children and
 +        non-content (or "chrome") children. Content children are the kind
 +        that can be specified in MXML. If you put several controls
 +        into a VBox, those are its content children. Non-content children
 +        are the other ones that you get automatically, such as a
 +        background/border, scrollbars, the titlebar of a Panel,
 +        AccordionHeaders, etc.
 +
 +        Most application developers are uninterested in non-content children,
 +        so Container overrides APIs such as numChildren and getChildAt()
 +        to deal only with content children. For example, Container, keeps
 +        its own _numChildren counter.
 +
 +        Container assumes that content children are contiguous, and that
 +        non-content children come before or after the content children.
 +        In order words, Container partitions DisplayObjectContainer's
 +        index range into three parts:
 +
 +        A B C D E F G H I
 +        0 1 2 3 4 5 6 7 8    <- index for all children
 +              0 1 2 3        <- index for content children
 +
 +        The content partition contains the content children D E F G.
 +        The pre-content partition contains the non-content children
 +        A B C that always stay before the content children.
 +        The post-content partition contains the non-content children
 +        H I that always stay after the content children.
 +
 +        Container maintains two state variables, _firstChildIndex
 +        and _numChildren, which keep track of the partitioning.
 +        In this example, _firstChildIndex would be 3 and _numChildren
 +        would be 4.
 +
 +    */
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  See changedStyles, below
 +     */
 +    private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    mx_internal function getLayoutChildAt(index:int):IUIComponent
 +    {
 +		COMPILE::LATER
 +		{
 +        return PostScaleAdapter.getCompatibleIUIComponent(getChildAt(index));
 +		}
 +		return getChildAt(index) as IUIComponent;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function Container()
 +    {
 +        super();
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        tabEnabled = false;
 +		}
 +        tabFocusEnabled = false;
 +        
 +        showInAutomationHierarchy = false;
 +
 +        // If available, get soft-link to the RichEditableText class
 +        // to use in keyDownHandler().
 +        var dm:DefinitionManager = new DefinitionManager();
 +        if (dm.hasDefinition(
 +                "spark.components.RichEditableText"))
 +        {
 +            richEditableTextClass =
 +                Class(dm.getDefinition(
 +                    "spark.components.RichEditableText"));
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  Child creation vars
 +    //----------------------------------
 +
 +    /**
 +     *  The creation policy of this container. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected var actualCreationPolicy:String;
 +
 +    /**
 +     *  @private
 +     */
 +    private var numChildrenBefore:int;
 +
 +    /**
 +     *  @private
 +     */
 +    private var recursionFlag:Boolean = true;
 +
 +    //----------------------------------
 +    //  Layout vars
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Remember when a child has been added or removed.
 +     *  When that occurs, we want to run the LayoutManager
 +     *  (even if autoLayout is false).
 +     */
 +    private var forceLayout:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var doingLayout:Boolean = false;
 +
 +    //----------------------------------
 +    //  Style vars
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  If this value is non-null, then we need to recursively notify children
 +     *  that a style property has changed.  If one style property has changed,
 +     *  this field holds the name of the style that changed.  If multiple style
 +     *  properties have changed, then the value of this field is
 +     *  Container.MULTIPLE_PROPERTIES.
 +     */
 +    private var changedStyles:String = null;
 +
 +    //----------------------------------
 +    //  Scrolling vars
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _creatingContentPane:Boolean = false;
 +
 +    /**
 +     *  Containers use an internal content pane to control scrolling. 
 +     *  The <code>creatingContentPane</code> is <code>true</code> while the container is creating 
 +     *  the content pane so that some events can be ignored or blocked.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get creatingContentPane():Boolean
 +    {
 +        return _creatingContentPane;
 +    }
 +    public function set creatingContentPane(value:Boolean):void
 +    {
 +        _creatingContentPane = value;
 +    }
 +
 +    /**
 +     *  @private
 +     *  A box that takes up space in the lower right corner,
 +     *  between the horizontal and vertical scrollbars.
 +     */
 +    protected var whiteBox:Shape;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var contentPane:Sprite = null;
 +
 +    /**
 +     *  @private
 +     *  Flags that remember what work to do during the next updateDisplayList().
 +     */
 +    private var scrollPropertiesChanged:Boolean = false;
 +    private var scrollPositionChanged:Boolean = true;
 +    private var horizontalScrollPositionPending:Number;
 +    private var verticalScrollPositionPending:Number;
 +
 +    /**
 +     *  @private
 +     *  Cached values describing the total size of the content being scrolled
 +     *  and the size of the area in which the scrolled content is displayed.
 +     */
 +    private var scrollableWidth:Number = 0;
 +    private var scrollableHeight:Number = 0;
 +    private var viewableWidth:Number = 0;
 +    private var viewableHeight:Number = 0;
 +
 +    //----------------------------------
 +    //  Other vars
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  The border/background object.
 +     */
 +    mx_internal var border:IFlexDisplayObject;
 +
 +    /**
 +     *  @private
 +     *  Sprite used to block user input when the container is disabled.
 +     */
 +    mx_internal var blocker:Sprite;
 +
 +    /**
 +     *  @private
 +     *  Keeps track of the number of mouse events we are listening for
 +     */
 +    private var mouseEventReferenceCount:int = 0;
 +    
 +    /**
 +     *  @private
 +     *  Soft-link to RichEditableText class object, if available.
 +     */
 +    private var richEditableTextClass:Class;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  baselinePosition
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  The baselinePosition of a Container is calculated
 +     *  as if there was a UITextField using the Container's styles
 +     *  whose top is at viewMetrics.top.
 +     */
 +    override public function get baselinePosition():Number
 +    {
 +        if (!validateBaselinePosition())
 +            return NaN;
 +
 +        // Unless the height is very small, the baselinePosition
 +        // of a generic Container is calculated as if there was
 +        // a UITextField using the Container's styles
 +        // whose top is at viewMetrics.top.
 +        // If the height is small, the baselinePosition is calculated
 +        // as if there were text within whose ascent the Container
 +        // is vertically centered.
 +        // At the crossover height, these two calculations
 +        // produce the same result.
 +
 +        var lineMetrics:TextLineMetrics = measureText("Wj");
 +
 +        if (height < 2 * viewMetrics.top + 4 + lineMetrics.ascent)
 +            return int(height + (lineMetrics.ascent - height) / 2);
 +        
 +        return viewMetrics.top + 2 + lineMetrics.ascent;
 +    }
 +
 +    //----------------------------------
 +    //  contentMouseX
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#contentMouseX
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get contentMouseX():Number
 +    {
 +        if (contentPane)
 +            return contentPane.mouseX;
 +        
 +        return super.contentMouseX;
 +    }
 +    
 +    //----------------------------------
 +    //  contentMouseY
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#contentMouseY
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get contentMouseY():Number
 +    {
 +        if (contentPane)
 +            return contentPane.mouseY;
 +        
 +        return super.contentMouseY;
 +    }
 +
 +    //----------------------------------
 +    //  doubleClickEnabled
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Propagate to children.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override public function set doubleClickEnabled(value:Boolean):void
 +    {
 +        super.doubleClickEnabled = value;
 +
 +        if (contentPane)
 +        {
 +            var n:int = contentPane.numChildren;
 +            for (var i:int = 0; i < n; i++)
 +            {
 +                var child:InteractiveObject =
 +                    contentPane.getChildAt(i) as InteractiveObject;
 +                if (child)
 +                    child.doubleClickEnabled = value;
 +            }
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set enabled(value:Boolean):void
 +    {
 +        super.enabled = value;
 +
 +		COMPILE::LATER
 +		{
 +        // Scrollbars must be enabled/disabled when this container is.
 +        if (horizontalScrollBar)
 +            horizontalScrollBar.enabled = value;
 +        if (verticalScrollBar)
 +            verticalScrollBar.enabled = value;
 +		}
 +		
 +        invalidateProperties();
 +        
 +        if (border && border is IInvalidating)
 +            IInvalidating(border).invalidateDisplayList();
 +    }
 +
 +    //----------------------------------
 +    //  focusPane
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the focusPane property.
 +     */
 +    private var _focusPane:Sprite;
 +
 +    /**
 +     *  @private
 +     *  Focus pane associated with this object.
 +     *  An object has a focus pane when one of its children has got focus.
 +     */
 +    override public function get focusPane():Sprite
 +    {
 +        return _focusPane;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set focusPane(o:Sprite):void
 +    {
 +        // The addition or removal of the focus sprite should not trigger
 +        // a measurement/layout pass.  Temporarily set the invalidation flags,
 +        // so that calls to invalidateSize() and invalidateDisplayList() have
 +        // no effect.
 +        var oldInvalidateSizeFlag:Boolean = invalidateSizeFlag;
 +        var oldInvalidateDisplayListFlag:Boolean = invalidateDisplayListFlag;
 +        invalidateSizeFlag = true;
 +        invalidateDisplayListFlag = true;
 +
 +        if (o)
 +        {
 +            rawChildren.addChild(o);
 +
 +            o.x = 0;
 +            o.y = 0;
 +			COMPILE::LATER
 +			{
 +            o.scrollRect = null;
 +			}
 +
 +            _focusPane = o;
 +        }
 +        else
 +        {
 +            rawChildren.removeChild(_focusPane);
 +
 +            _focusPane = null;
 +        }
 +
 +        if (o && contentPane)
 +        {
 +            o.x = contentPane.x;
 +            o.y = contentPane.y;
 +			COMPILE::LATER
 +			{
 +            o.scrollRect = contentPane.scrollRect;
 +			}
 +        }
 +
 +        invalidateSizeFlag = oldInvalidateSizeFlag;
 +        invalidateDisplayListFlag = oldInvalidateDisplayListFlag;
 +    }
 +    
 +    //----------------------------------
 +    //  moduleFactory
 +    //----------------------------------
 +    /**
 +     *  @private
 +     */
 +    override public function set moduleFactory(moduleFactory:IFlexModuleFactory):void
 +    {
 +        super.moduleFactory = moduleFactory;
 +        
 +        // Register the _creationPolicy style as inheriting. See the creationPolicy
 +        // getter for details on usage of this style.
 +        styleManager.registerInheritingStyle("_creationPolicy");
 +    }
 +
 +    //----------------------------------
 +    //  $numChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  This property allows access to the Player's native implementation
 +     *  of the numChildren property, which can be useful since components
 +     *  can override numChildren and thereby hide the native implementation.
 +     *  Note that this "base property" is final and cannot be overridden,
 +     *  so you can count on it to reflect what is happening at the player level.
 +     */
 +    mx_internal final function get $numChildren():int
 +    {
 +        return super.numChildren;
 +    }
 +
 +    //----------------------------------
 +    //  numChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the numChildren property.
 +     */
 +    mx_internal var _numChildren:int = 0;
 +
 +    /**
 +     *  Number of child components in this container.
 +     *
 +     *  <p>The number of children is initially equal
 +     *  to the number of children declared in MXML.
 +     *  At runtime, new children may be added by calling
 +     *  <code>addChild()</code> or <code>addChildAt()</code>,
 +     *  and existing children may be removed by calling
 +     *  <code>removeChild()</code>, <code>removeChildAt()</code>,
 +     *  or <code>removeAllChildren()</code>.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get numChildren():int
 +    {
 +        return contentPane ? contentPane.numChildren : _numChildren;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  autoLayout
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the autoLayout property.
 +     */
 +    private var _autoLayout:Boolean = true;
 +
 +    [Inspectable(defaultValue="true")]
 +
 +    /**
 +     *  If <code>true</code>, measurement and layout are done
 +     *  when the position or size of a child is changed.
 +     *  If <code>false</code>, measurement and layout are done only once,
 +     *  when children are added to or removed from the container.
 +     *
 +     *  <p>When using the Move effect, the layout around the component that
 +     *  is moving does not readjust to fit that the Move effect animates.
 +     *  Setting a container's <code>autoLayout</code> property to
 +     *  <code>true</code> has no effect on this behavior.</p>
 +     *
 +     *  <p>The Zoom effect does not work when the <code>autoLayout</code> 
 +     *  property is <code>false</code>.</p>
 +     *
 +     *  <p>The <code>autoLayout</code> property does not apply to
 +     *  Accordion or ViewStack containers.</p>
 +     * 
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get autoLayout():Boolean
 +    {
 +        return _autoLayout;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set autoLayout(value:Boolean):void
 +    {
 +        _autoLayout = value;
 +
 +        // If layout is being turned back on, trigger a layout to occur now.
 +        if (value)
 +        {
 +            invalidateSize();
 +            invalidateDisplayList();
 +
 +            var p:IInvalidating = parent as IInvalidating;
 +            if (p)
 +            {
 +                p.invalidateSize();
 +                p.invalidateDisplayList();
 +            }
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  borderMetrics
 +    //----------------------------------
 +
 +    /**
 +     *  Returns an EdgeMetrics object that has four properties:
 +     *  <code>left</code>, <code>top</code>, <code>right</code>,
 +     *  and <code>bottom</code>.
 +     *  The value of each property is equal to the thickness of one side
 +     *  of the border, expressed in pixels.
 +     *
 +     *  <p>Unlike <code>viewMetrics</code>, this property is not
 +     *  overridden by subclasses of Container.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get borderMetrics():EdgeMetrics
 +    {
 +        return border && border is IRectangularBorder ?
 +               IRectangularBorder(border).borderMetrics :
 +               EdgeMetrics.EMPTY;
 +    }
 +
 +    //----------------------------------
 +    //  childDescriptors
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the childDescriptors property.
 +     *  This variable is initialized in the construct() method
 +     *  using the childDescriptors in the initObj, which is autogenerated.
 +     *  If this Container was not created by createComponentFromDescriptor(),
 +     *  its childDescriptors property is null.
 +     */
 +    private var _childDescriptors:Array /* of UIComponentDescriptor */;
 +
 +    /**
 +     *  Array of UIComponentDescriptor objects produced by the MXML compiler.
 +     *
 +     *  <p>Each UIComponentDescriptor object contains the information 
 +     *  specified in one child MXML tag of the container's MXML tag.
 +     *  The order of the UIComponentDescriptor objects in the Array
 +     *  is the same as the order of the child tags.
 +     *  During initialization, the child descriptors are used to create
 +     *  the container's child UIComponent objects and its Repeater objects, 
 +     *  and to give them the initial property values, event handlers, effects, 
 +     *  and so on, that were specified in MXML.</p>
 +     *
 +     *  @see mx.core.UIComponentDescriptor
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get childDescriptors():Array /* of UIComponentDescriptor */
 +    {
 +        return _childDescriptors;
 +    }
 +
 +    //----------------------------------
 +    //  childRepeaters
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the childRepeaters property.
 +     */
 +    private var _childRepeaters:Array;
 +
 +    /**
 +     *  @private
 +     *  An array of the Repeater objects found within this container.
 +     */
 +    mx_internal function get childRepeaters():Array
 +    {
 +        return _childRepeaters;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set childRepeaters(value:Array):void
 +    {
 +        _childRepeaters = value;
 +    }
 +
 +    //----------------------------------
 +    //  clipContent
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the clipContent property.
 +     */
 +    private var _clipContent:Boolean = true;
 +
 +    [Inspectable(defaultValue="true")]
 +
 +    /**
 +     *  Whether to apply a clip mask if the positions and/or sizes
 +     *  of this container's children extend outside the borders of
 +     *  this container.
 +     *  If <code>false</code>, the children of this container
 +     *  remain visible when they are moved or sized outside the
 +     *  borders of this container.
 +     *  If <code>true</code>, the children of this container are clipped.
 +     *
 +     *  <p>If <code>clipContent</code> is <code>false</code>, then scrolling
 +     *  is disabled for this container and scrollbars will not appear.
 +     *  If <code>clipContent</code> is true, then scrollbars will usually
 +     *  appear when the container's children extend outside the border of
 +     *  the container.
 +     *  For additional control over the appearance of scrollbars,
 +     *  see <code>horizontalScrollPolicy</code> and <code>verticalScrollPolicy</code>.</p>
 +     * 
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get clipContent():Boolean
 +    {
 +        return _clipContent;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set clipContent(value:Boolean):void
 +    {
 +        if (_clipContent != value)
 +        {
 +            _clipContent = value;
 +
 +            invalidateDisplayList();
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  createdComponents
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Internal variable used to keep track of the components created
 +     *  by this Container.  This is different than the list maintained
 +     *  by DisplayObjectContainer, because it includes Repeaters.
 +     */
 +    private var _createdComponents:Array;
 +
 +    /**
 +     *  @private
 +     *  An array of all components created by this container including
 +     *  Repeater components.
 +     */
 +    mx_internal function get createdComponents():Array
 +    {
 +        return _createdComponents;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set createdComponents(value:Array):void
 +    {
 +        _createdComponents = value;
 +    }
 +
 +    //----------------------------------
 +    //  creationIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the creationIndex property.
 +     */
 +    private var _creationIndex:int = -1;
 +
 +    [Inspectable(defaultValue="undefined")]
 +
 +    /**
 +     *  Specifies the order to instantiate and draw the children
 +     *  of the container.
 +     *
 +     *  <p>This property can only be used when the <code>creationPolicy</code>
 +     *  property is set to <code>ContainerCreationPolicy.QUEUED</code>.
 +     *  Otherwise, it is ignored.</p>
 +     *
 +     *  @default -1
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    [Deprecated]
 +    public function get creationIndex():int
 +    {
 +        return _creationIndex;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set creationIndex(value:int):void
 +    {
 +        _creationIndex = value;
 +    }
 +
 +    //----------------------------------
 +    //  creationPolicy
 +    //----------------------------------
 +
 +    // Internal flag used when creationPolicy="none".
 +    // When set, the value of the backing store _creationPolicy
 +    // style is "auto" so descendants inherit the correct value.
 +    private var creationPolicyNone:Boolean = false;
 +    
 +    [Inspectable(enumeration="all,auto,none")]
 +    
 +    /**
 +     *  The child creation policy for this MX Container.
 +     *  ActionScript values can be <code>ContainerCreationPolicy.AUTO</code>, 
 +     *  <code>ContainerCreationPolicy.ALL</code>,
 +     *  or <code>ContainerCreationPolicy.NONE</code>.
 +     *  MXML values can be <code>auto</code>, <code>all</code>, 
 +     *  or <code>none</code>.
 +     *
 +     *  <p>If no <code>creationPolicy</code> is specified for a container,
 +     *  that container inherits its parent's <code>creationPolicy</code>.
 +     *  If no <code>creationPolicy</code> is specified for the Application,
 +     *  it defaults to <code>ContainerCreationPolicy.AUTO</code>.</p>
 +     *
 +     *  <p>A <code>creationPolicy</code> of <code>ContainerCreationPolicy.AUTO</code> means
 +     *  that the container delays creating some or all descendants
 +     *  until they are needed, a process which is known as <i>deferred
 +     *  instantiation</i>.
 +     *  This policy produces the best startup time because fewer
 +     *  UIComponents are created initially.
 +     *  However, this introduces navigation delays when a user navigates
 +     *  to other parts of the application for the first time.
 +     *  Navigator containers such as Accordion, TabNavigator, and ViewStack
 +     *  implement the <code>ContainerCreationPolicy.AUTO</code> policy by creating all their
 +     *  children immediately, but wait to create the deeper descendants
 +     *  of a child until it becomes the selected child of the navigator
 +     *  container.</p>
 +     *
 +     *  <p>A <code>creationPolicy</code> of <code>ContainerCreationPolicy.ALL</code> means
 +     *  that the navigator containers immediately create deeper descendants
 +     *  for each child, rather than waiting until that child is
 +     *  selected. For single-view containers such as a VBox container,
 +     *  there is no difference  between the <code>ContainerCreationPolicy.AUTO</code> and
 +     *  <code>ContainerCreationPolicy.ALL</code> policies.</p>
 +     *
 +     *  <p>A <code>creationPolicy</code> of <code>ContainerCreationPolicy.NONE</code> means
 +     *  that the container creates none of its children.
 +     *  In that case, it is the responsibility of the MXML author
 +     *  to create the children by calling the
 +     *  <code>createComponentsFromDescriptors()</code> method.</p>
 +     *  
 +     *  @default ContainerCreationPolicy.AUTO
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get creationPolicy():String
 +    {
 +        // Use an inheriting style as the backing storage for this property.
 +        // This allows the property to be inherited by either mx or spark
 +        // containers, and also to correctly cascade through containers that
 +        // don't have this property (ie Group).
 +        // This style is an implementation detail and should be considered
 +        // private. Do not set it from CSS.
 +        if (creationPolicyNone)
 +            return ContainerCreationPolicy.NONE;
 +        return getStyle("_creationPolicy");
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set creationPolicy(value:String):void
 +    {
 +        var styleValue:String = value;
 +        
 +        if (value == ContainerCreationPolicy.NONE)
 +        {
 +            // creationPolicy of none is not inherited by descendants.
 +            // In this case, set the style to "auto" and set a local
 +            // flag for subsequent access to the creationPolicy property.
 +            creationPolicyNone = true;
 +            styleValue = ContainerCreationPolicy.AUTO;
 +        }
 +        else
 +        {
 +            creationPolicyNone = false;
 +        }
 +        
 +        setStyle("_creationPolicy", styleValue);
 +
 +        setActualCreationPolicies(value);
 +    }
 +
 +    //----------------------------------
 +    //  defaultButton
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the defaultButton property.
 +     */
 +    private var _defaultButton:IFlexDisplayObject;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The Button control designated as the default button
 +     *  for the container.
 +     *  When controls in the container have focus, pressing the
 +     *  Enter key is the same as clicking this Button control.
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get defaultButton():IFlexDisplayObject
 +    {
 +        return _defaultButton;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set defaultButton(value:IFlexDisplayObject):void
 +    {
 +        _defaultButton = value;
 +        ContainerGlobals.focusedContainer = null;
 +    }
 +
 +    //----------------------------------
 +    //  deferredContentCreated
 +    //----------------------------------
 +
 +    /**
 +     *  IDeferredContentOwner equivalent of processedDescriptors
 +     * 
 +     *  @see UIComponent#processedDescriptors
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get deferredContentCreated():Boolean
 +    {
 +        return processedDescriptors;
 +    }
 +
 +    //----------------------------------
 +    //  data
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the data property.
 +     */
 +    private var _data:Object;
 +
 +    [Bindable("dataChange")]
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  The <code>data</code> property lets you pass a value
 +     *  to the component when you use it in an item renderer or item editor.
 +     *  You typically use data binding to bind a field of the <code>data</code>
 +     *  property to a property of this component.
 +     *
 +     *  <p>You do not set this property in MXML.</p>
 +     *
 +     *  @default null
 +     *  @see mx.core.IDataRenderer
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get data():Object
 +    {
 +        return _data;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set data(value:Object):void
 +    {
 +        _data = value;
 +
 +        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
 +
 +        invalidateDisplayList();
 +    }
 +
 +    //----------------------------------
 +    //  firstChildIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the firstChildIndex property.
 +     */
 +    private var _firstChildIndex:int = 0;
 +
 +    /**
 +     *  @private
 +     *  The index of the first content child,
 +     *  when dealing with both content and non-content children.
 +     */
 +    mx_internal function get firstChildIndex():int
 +    {
 +        return _firstChildIndex;
 +    }
 +
 +    //----------------------------------
 +    //  horizontalLineScrollSize
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the horizontalLineScrollSize property.
 +     */
 +    private var _horizontalLineScrollSize:Number = 5;
 +
 +    [Bindable("horizontalLineScrollSizeChanged")]
 +    [Inspectable(defaultValue="5")]
 +
 +    /**
 +     *  Number of pixels to move when the left- or right-arrow
 +     *  button in the horizontal scroll bar is pressed.
 +     *  
 +     *  @default 5
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get horizontalLineScrollSize():Number
 +    {
 +        return _horizontalLineScrollSize;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set horizontalLineScrollSize(value:Number):void
 +    {
 +        scrollPropertiesChanged = true;
 +
 +        _horizontalLineScrollSize = value;
 +
 +        invalidateDisplayList();
 +
 +        dispatchEvent(new Event("horizontalLineScrollSizeChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  horizontalPageScrollSize
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the horizontalPageScrollSize property.
 +     */
 +    private var _horizontalPageScrollSize:Number = 0;
 +
 +    [Bindable("horizontalPageScrollSizeChanged")]
 +    [Inspectable(defaultValue="0")]
 +
 +    /**
 +     *  Number of pixels to move when the track in the
 +     *  horizontal scroll bar is pressed.
 +     *  A value of 0 means that the page size
 +     *  will be calculated to be a full screen.
 +     * 
 +     *  @default 0
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get horizontalPageScrollSize():Number
 +    {
 +        return _horizontalPageScrollSize;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set horizontalPageScrollSize(value:Number):void
 +    {
 +        scrollPropertiesChanged = true;
 +
 +        _horizontalPageScrollSize = value;
 +
 +        invalidateDisplayList();
 +
 +        dispatchEvent(new Event("horizontalPageScrollSizeChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  horizontalScrollBar
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  The horizontal scrollbar (null if not present).
 +     */
 +	COMPILE::LATER
 +    private var _horizontalScrollBar:ScrollBar;
 +
 +    /**
 +     *  The horizontal scrollbar used in this container.
 +     *  This property is null if no horizontal scroll bar
 +     *  is currently displayed.
 +     *  In general you do not access this property directly.
 +     *  Manipulation of the <code>horizontalScrollPolicy</code> 
 +     *  and <code>horizontalScrollPosition</code>
 +     *  properties should provide sufficient control over the scroll bar.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get horizontalScrollBar():ScrollBar
 +    {
 +        return _horizontalScrollBar;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function set horizontalScrollBar(value:ScrollBar):void
 +    {
 +        _horizontalScrollBar = value;
 +    }
 +
 +    //----------------------------------
 +    //  horizontalScrollPosition
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the horizontalScrollPosition property.
 +     */
 +	COMPILE::LATER
 +    private var _horizontalScrollPosition:Number = 0;
 +
 +    [Bindable("scroll")]
 +    [Bindable("viewChanged")]
 +    [Inspectable(defaultValue="0")]
 +
 +    /**
 +     *  The current position of the horizontal scroll bar.
 +     *  This is equal to the distance in pixels between the left edge
 +     *  of the scrollable surface and the leftmost piece of the surface
 +     *  that is currently visible.
 +     *  
 +     *  @default 0
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get horizontalScrollPosition():Number
 +    {
 +        if (!isNaN(horizontalScrollPositionPending))
 +            return horizontalScrollPositionPending;
 +        return _horizontalScrollPosition;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function set horizontalScrollPosition(value:Number):void
 +    {
 +        if (_horizontalScrollPosition == value)
 +            return;
 +
 +        // Note: We can't use maxHorizontalScrollPosition to clamp the value here.
 +        // The horizontalScrollBar may not exist yet,
 +        // or its maxPos might change during layout.
 +        // (For example, you could set the horizontalScrollPosition of a childless container,
 +        // then add a child which causes it to have a scrollbar.)
 +        // The horizontalScrollPosition gets clamped to the range 0 through maxHorizontalScrollPosition
 +        // late, in the updateDisplayList() method, just before the scrollPosition
 +        // of the horizontalScrollBar is set.
 +
 +        _horizontalScrollPosition = value;
 +        scrollPositionChanged = true;
 +        if (!initialized)
 +            horizontalScrollPositionPending = value;
 +
 +        invalidateDisplayList();
 +
 +        dispatchEvent(new Event("viewChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  horizontalScrollPolicy
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the horizontalScrollPolicy property.
 +     */
 +	COMPILE::LATER
 +    mx_internal var _horizontalScrollPolicy:String = ScrollPolicy.AUTO;
 +
 +    [Bindable("horizontalScrollPolicyChanged")]
 +    [Inspectable(category="General", enumeration="off,on,auto", defaultValue="auto")]
 +
 +    /**
 +     *  Specifies whether the horizontal scroll bar is always present,
 +     *  always absent, or automatically added when needed.
 +     *  ActionScript values can be <code>ScrollPolicy.ON</code>, <code>ScrollPolicy.OFF</code>,
 +     *  and <code>ScrollPolicy.AUTO</code>. 
 +     *  MXML values can be <code>"on"</code>, <code>"off"</code>,
 +     *  and <code>"auto"</code>.
 +     *
 +     *  <p>Setting this property to <code>ScrollPolicy.OFF</code> also prevents the
 +     *  <code>horizontalScrollPosition</code> property from having an effect.</p>
 +     *
 +     *  <p>Note: This property does not apply to the ControlBar container.</p>
 +     *
 +     *  <p>If the <code>horizontalScrollPolicy</code> is <code>ScrollPolicy.AUTO</code>,
 +     *  the horizontal scroll bar appears when all of the following
 +     *  are true:</p>
 +     *  <ul>
 +     *    <li>One of the container's children extends beyond the left
 +     *      edge or right edge of the container.</li>
 +     *    <li>The <code>clipContent</code> property is <code>true</code>.</li>
 +     *    <li>The width and height of the container are large enough to
 +     *      reasonably accommodate a scroll bar.</li>
 +     *  </ul>
 +     *
 +     *  @default ScrollPolicy.AUTO
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get horizontalScrollPolicy():String
 +    {
 +        return _horizontalScrollPolicy;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function set horizontalScrollPolicy(value:String):void
 +    {
 +        if (_horizontalScrollPolicy != value)
 +        {
 +            _horizontalScrollPolicy = value;
 +
 +            invalidateDisplayList();
 +
 +            dispatchEvent(new Event("horizontalScrollPolicyChanged"));
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  icon
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the icon property.
 +     */
 +    private var _icon:Class = null;
 +
 +    [Bindable("iconChanged")]
 +    [Inspectable(category="General", defaultValue="", format="EmbeddedFile")]
 +
 +    /**
 +     *  The Class of the icon displayed by some navigator
 +     *  containers to represent this Container.
 +     *
 +     *  <p>For example, if this Container is a child of a TabNavigator,
 +     *  this icon appears in the corresponding tab.
 +     *  If this Container is a child of an Accordion,
 +     *  this icon appears in the corresponding header.</p>
 +     *
 +     *  <p>To embed the icon in the SWF file, use the &#64;Embed()
 +     *  MXML compiler directive:</p>
 +     *
 +     *  <pre>
 +     *    icon="&#64;Embed('filepath')"
 +     *  </pre>
 +     *
 +     *  <p>The image can be a JPEG, GIF, PNG, SVG, or SWF file.</p>
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get icon():Class
 +    {
 +        return _icon;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set icon(value:Class):void
 +    {
 +        _icon = value;
 +
 +        dispatchEvent(new Event("iconChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  label
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the label property.
 +     */
 +    private var _label:String = "";
 +
 +    [Bindable("labelChanged")]
 +    [Inspectable(category="General", defaultValue="")]
 +
 +    /**
 +     *  The text displayed by some navigator containers to represent
 +     *  this Container.
 +     *
 +     *  <p>For example, if this Container is a child of a TabNavigator,
 +     *  this string appears in the corresponding tab.
 +     *  If this Container is a child of an Accordion,
 +     *  this string appears in the corresponding header.</p>
 +     *
 +     *  @default ""
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get label():String
 +    {
 +        return _label;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set label(value:String):void
 +    {
 +        _label = value;
 +
 +        dispatchEvent(new Event("labelChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  maxHorizontalScrollPosition
 +    //----------------------------------
 +
 +    /**
 +     *  The largest possible value for the
 +     *  <code>horizontalScrollPosition</code> property.
 +     *  Defaults to 0 if the horizontal scrollbar is not present.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get maxHorizontalScrollPosition():Number
 +    {
 +        return horizontalScrollBar ?
 +               horizontalScrollBar.maxScrollPosition :
 +               Math.max(scrollableWidth - viewableWidth, 0);
 +    }
 +
 +    //----------------------------------
 +    //  maxVerticalScrollPosition
 +    //----------------------------------
 +
 +    /**
 +     *  The largest possible value for the
 +     *  <code>verticalScrollPosition</code> property.
 +     *  Defaults to 0 if the vertical scrollbar is not present.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get maxVerticalScrollPosition():Number
 +    {
 +        return verticalScrollBar ?
 +               verticalScrollBar.maxScrollPosition :
 +               Math.max(scrollableHeight - viewableHeight, 0);
 +    }
 +
 +    //----------------------------------
 +    //  numChildrenCreated
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _numChildrenCreated:int = -1;
 +
 +    /**
 +     *  @private
 +     *  The number of children created inside this container.
 +     *  The default value is 0.
 +     */
 +    mx_internal function get numChildrenCreated():int
 +    {
 +        return _numChildrenCreated;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set numChildrenCreated(value:int):void
 +    {
 +        _numChildrenCreated = value;
 +    }
 +
 +    //----------------------------------
 +    //  numRepeaters
 +    //----------------------------------
 +
 +    /**
 +     *  @private 
 +     *  The number of Repeaters in this Container.
 +     *
 +     *  <p>This number includes Repeaters that are immediate children of this
 +     *  container and Repeaters that are nested inside other Repeaters.
 +     *  Consider the following example:</p>
 +     *
 +     *  <pre>
 +     *  &lt;mx:HBox&gt;
 +     *    &lt;mx:Repeater dataProvider="[1, 2]"&gt;
 +     *      &lt;mx:Repeater dataProvider="..."&gt;
 +     *        &lt;mx:Button/&gt;
 +     *      &lt;/mx:Repeater&gt;
 +     *    &lt;/mx:Repeater&gt;
 +     *  &lt;mx:HBox&gt;
 +     *  </pre>
 +     *
 +     *  <p>In this example, the <code>numRepeaters</code> property
 +     *  for the HBox would be set equal to 3 -- one outer Repeater
 +     *  and two inner repeaters.</p>
 +     *
 +     *  <p>The <code>numRepeaters</code> property does not include Repeaters
 +     *  that are nested inside other containers.
 +     *  Consider this example:</p>
 +     *
 +     *  <pre>
 +     *  &lt;mx:HBox&gt;
 +     *    &lt;mx:Repeater dataProvider="[1, 2]"&gt;
 +     *      &lt;mx:VBox&gt;
 +     *        &lt;mx:Repeater dataProvider="..."&gt;
 +     *          &lt;mx:Button/&gt;
 +     *        &lt;/mx:Repeater&gt;
 +     *      &lt;/mx:VBox&gt;
 +     *    &lt;/mx:Repeater&gt;
 +     *  &lt;mx:HBox&gt;
 +     *  </pre>
 +     *
 +     *  <p>In this example, the <code>numRepeaters</code> property
 +     *  for the outer HBox would be set equal to 1 -- just the outer repeater.
 +     *  The two inner VBox containers would also have a
 +     *  <code>numRepeaters</code> property equal to 1 -- one Repeater
 +     *  per VBox.</p>
 +     */
 +    mx_internal function get numRepeaters():int
 +    {
 +        return childRepeaters ? childRepeaters.length : 0;
 +    }
 +
 +    //----------------------------------
 +    //  rawChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  The single IChildList object that's always returned
 +     *  from the rawChildren property, below.
 +     */
 +    private var _rawChildren:ContainerRawChildrenList;
 +
 +    /**
 +     *  A container typically contains child components, which can be enumerated
 +     *  using the <code>Container.getChildAt()</code> method and 
 +     *  <code>Container.numChildren</code> property.  In addition, the container
 +     *  may contain style elements and skins, such as the border and background.
 +     *  Flash Player and AIR do not draw any distinction between child components
 +     *  and skins.  They are all accessible using the player's 
 +     *  <code>getChildAt()</code> method  and
 +     *  <code>numChildren</code> property.  
 +     *  However, the Container class overrides the <code>getChildAt()</code> method 
 +     *  and <code>numChildren</code> property (and several other methods) 
 +     *  to create the illusion that
 +     *  the container's children are the only child components.
 +     *
 +     *  <p>If you need to access all of the children of the container (both the
 +     *  content children and the skins), then use the methods and properties
 +     *  on the <code>rawChildren</code> property instead of the regular Container methods. 
 +     *  For example, use the <code>Container.rawChildren.getChildAt())</code> method.
 +     *  However, if a container creates a ContentPane Sprite object for its children,
 +     *  the <code>rawChildren</code> property value only counts the ContentPane, not the
 +     *  container's children.
 +     *  It is not always possible to determine when a container will have a ContentPane.</p>
 +     * 
 +     *  <p><b>Note:</b>If you call the <code>addChild</code> or 
 +     *  <code>addChildAt</code> method of the <code>rawChildren</code> object,
 +     *  set <code>tabFocusEnabled = false</code> on the component that you have added.
 +     *  Doing so prevents users from tabbing to the visual-only component
 +     *  that you have added.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get rawChildren():IChildList
 +    {
 +        if (!_rawChildren)
 +            _rawChildren = new ContainerRawChildrenList(this);
 +
 +        return _rawChildren;
 +    }
 +
 +    //----------------------------------
 +    //  usePadding
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function get usePadding():Boolean
 +    {
 +        // Containers, by default, always use padding.
 +        return true;
 +    }
 +
 +    //----------------------------------
 +    //  verticalLineScrollSize
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the verticalLineScrollSize property.
 +     */
 +    private var _verticalLineScrollSize:Number = 5;
 +
 +    [Bindable("verticalLineScrollSizeChanged")]
 +    [Inspectable(defaultValue="5")]
 +
 +    /**
 +     *  Number of pixels to scroll when the up- or down-arrow
 +     *  button in the vertical scroll bar is pressed,
 +     *  or when you scroll by using the mouse wheel.
 +     *  
 +     *  @default 5
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get verticalLineScrollSize():Number
 +    {
 +        return _verticalLineScrollSize;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set verticalLineScrollSize(value:Number):void
 +    {
 +        scrollPropertiesChanged = true;
 +
 +        _verticalLineScrollSize = value;
 +
 +        invalidateDisplayList();
 +
 +        dispatchEvent(new Event("verticalLineScrollSizeChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  verticalPageScrollSize
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the verticalPageScrollSize property.
 +     */
 +    private var _verticalPageScrollSize:Number = 0;
 +
 +    [Bindable("verticalPageScrollSizeChanged")]
 +    [Inspectable(defaultValue="0")]
 +
 +    /**
 +     *  Number of pixels to scroll when the track
 +     *  in the vertical scroll bar is pressed.
 +     *  A value of 0 means that the page size
 +     *  will be calculated to be a full screen.
 +     * 
 +     *  @default 0   
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get verticalPageScrollSize():Number
 +    {
 +        return _verticalPageScrollSize;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set verticalPageScrollSize(value:Number):void
 +    {
 +        scrollPropertiesChanged = true;
 +
 +        _verticalPageScrollSize = value;
 +
 +        invalidateDisplayList();
 +
 +        dispatchEvent(new Event("verticalPageScrollSizeChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  verticalScrollBar
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  The vertical scrollbar (null if not present).
 +     */
 +	COMPILE::LATER
 +    private var _verticalScrollBar:ScrollBar;
 +
 +    /**
 +     *  The vertical scrollbar used in this container.
 +     *  This property is null if no vertical scroll bar
 +     *  is currently displayed.
 +     *  In general you do not access this property directly.
 +     *  Manipulation of the <code>verticalScrollPolicy</code> 
 +     *  and <code>verticalScrollPosition</code>
 +     *  properties should provide sufficient control over the scroll bar.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get verticalScrollBar():ScrollBar
 +    {
 +        return _verticalScrollBar;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function set verticalScrollBar(value:ScrollBar):void
 +    {
 +        _verticalScrollBar = value;
 +    }
 +
 +    //----------------------------------
 +    //  verticalScrollPosition
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the verticalScrollPosition property.
 +     */
 +	COMPILE::LATER
 +    private var _verticalScrollPosition:Number = 0;
 +
 +    [Bindable("scroll")]
 +    [Bindable("viewChanged")]
 +    [Inspectable(defaultValue="0")]
 +
 +    /**
 +     *  The current position of the vertical scroll bar.
 +     *  This is equal to the distance in pixels between the top edge
 +     *  of the scrollable surface and the topmost piece of the surface
 +     *  that is currently visible.
 +     *
 +     *  @default 0
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get verticalScrollPosition():Number
 +    {
 +        if (!isNaN(verticalScrollPositionPending))
 +            return verticalScrollPositionPending;
 +
 +        return _verticalScrollPosition;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function set verticalScrollPosition(value:Number):void
 +    {
 +        if (_verticalScrollPosition == value)
 +            return;
 +
 +        // Note: We can't use maxVerticalScrollPosition to clamp the value here.
 +        // The verticalScrollBar may not exist yet,
 +        // or its maxPos might change during layout.
 +        // (For example, you could set the verticalScrollPosition of a childless container,
 +        // then add a child which causes it to have a scrollbar.)
 +        // The verticalScrollPosition gets clamped to the range 0 through maxVerticalScrollPosition
 +        // late, in the updateDisplayList() method, just before the scrollPosition
 +        // of the verticalScrollBar is set.
 +
 +        _verticalScrollPosition = value;
 +        scrollPositionChanged = true;
 +        if (!initialized)
 +            verticalScrollPositionPending = value;
 +
 +        invalidateDisplayList();
 +
 +        dispatchEvent(new Event("viewChanged"));
 +    }
 +
 +    //----------------------------------
 +    //  verticalScrollPolicy
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the verticalScrollPolicy property.
 +     */
 +	COMPILE::LATER
 +    mx_internal var _verticalScrollPolicy:String = ScrollPolicy.AUTO;
 +
 +    [Bindable("verticalScrollPolicyChanged")]
 +    [Inspectable(category="General", enumeration="off,on,auto", defaultValue="auto")]
 +
 +    /**
 +     *  Specifies whether the vertical scroll bar is always present,
 +     *  always absent, or automatically added when needed.
 +     *  Possible values are <code>ScrollPolicy.ON</code>, <code>ScrollPolicy.OFF</code>,
 +     *  and <code>ScrollPolicy.AUTO</code>.
 +     *  MXML values can be <code>"on"</code>, <code>"off"</code>,
 +     *  and <code>"auto"</code>.
 +     *
 +     *  <p>Setting this property to <code>ScrollPolicy.OFF</code> also prevents the
 +     *  <code>verticalScrollPosition</code> property from having an effect.</p>
 +     *
 +     *  <p>Note: This property does not apply to the ControlBar container.</p>
 +     *
 +     *  <p>If the <code>verticalScrollPolicy</code> is <code>ScrollPolicy.AUTO</code>,
 +     *  the vertical scroll bar appears when all of the following
 +     *  are true:</p>
 +     *  <ul>
 +     *    <li>One of the container's children extends beyond the top
 +     *      edge or bottom edge of the container.</li>
 +     *    <li>The <code>clipContent</code> property is <code>true</code>.</li>
 +     *    <li>The width and height of the container are large enough to
 +     *      reasonably accommodate a scroll bar.</li>
 +     *  </ul>
 +     *
 +     *  @default ScrollPolicy.AUTO
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get verticalScrollPolicy():String
 +    {
 +        return _verticalScrollPolicy;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function set verticalScrollPolicy(value:String):void
 +    {
 +        if (_verticalScrollPolicy != value)
 +        {
 +            _verticalScrollPolicy = value;
 +
 +            invalidateDisplayList();
 +
 +            dispatchEvent(new Event("verticalScrollPolicyChanged"));
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  viewMetrics
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Offsets including borders and scrollbars
 +     */
 +    private var _viewMetrics:EdgeMetrics;
 +
 +    /**
 +     *  Returns an object that has four properties: <code>left</code>,
 +     *  <code>top</code>, <code>right</code>, and <code>bottom</code>.
 +     *  The value of each property equals the thickness of the chrome
 +     *  (visual elements) around the edge of the container. 
 +     *
 +     *  <p>The chrome includes the border thickness.
 +     *  If the <code>horizontalScrollPolicy</code> or <code>verticalScrollPolicy</code> 
 +     *  property value is <code>ScrollPolicy.ON</code>, the
 +     *  chrome also includes the thickness of the corresponding
 +     *  scroll bar. If a scroll policy is <code>ScrollPolicy.AUTO</code>,
 +     *  the chrome measurement does not include the scroll bar thickness, 
 +     *  even if a scroll bar is displayed.</p>
 +     *
 +     *  <p>Subclasses of Container should override this method, so that
 +     *  they include other chrome to be taken into account when positioning
 +     *  the Container's children.
 +     *  For example, the <code>viewMetrics</code> property for the
 +     *  Panel class should return an object whose <code>top</code> property
 +     *  includes the thickness of the Panel container's title bar.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get viewMetrics():EdgeMetrics
 +    {
 +        var bm:EdgeMetrics = borderMetrics;
 +
 +        // If scrollPolicy is ScrollPolicy.ON, then the scrollbars are accounted for
 +        // during both measurement and layout.
 +        //
 +        // If scrollPolicy is ScrollPolicy.AUTO, then scrollbars are ignored during
 +        // measurement.  Otherwise, the entire layout of the app could change
 +        // everytime that the scrollbars turn on or off.
 +        //
 +        // However, we do take the width of scrollbars into account when laying
 +        // out our children.  That way, children that have a percentage width or
 +        // percentage height will only expand to consume space that's left over
 +        // after leaving room for the scrollbars.
 +		COMPILE::LATER
 +		{
 +        var verticalScrollBarIncluded:Boolean =
 +            verticalScrollBar != null &&
 +            (doingLayout || verticalScrollPolicy == ScrollPolicy.ON);
 +        var horizontalScrollBarIncluded:Boolean =
 +            horizontalScrollBar != null &&
 +            (doingLayout || horizontalScrollPolicy == ScrollPolicy.ON);
 +        if (!verticalScrollBarIncluded && !horizontalScrollBarIncluded)
 +            return bm;
 +		}
 +        // The viewMetrics property needs to return its own object.
 +        // Rather than allocating a new one each time, we'll allocate one once
 +        // and then hold a reference to it.
 +        if (!_viewMetrics)
 +        {
 +            _viewMetrics = bm.clone();
 +        }
 +        else
 +        {
 +            _viewMetrics.left = bm.left;
 +            _viewMetrics.right = bm.right;
 +            _viewMetrics.top = bm.top;
 +            _viewMetrics.bottom = bm.bottom;
 +        }
 +
 +		COMPILE::LATER
 +		{
 +        if (verticalScrollBarIncluded)
 +            _viewMetrics.right += verticalScrollBar.minWidth;
 +        if (horizontalScrollBarIncluded)
 +            _viewMetrics.bottom += horizontalScrollBar.minHeight;
 +		}
 +        return _viewMetrics;
 +    }
 +
 +    //----------------------------------
 +    //  viewMetricsAndPadding
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Cached value containing the view metrics plus the object's margins.
 +     */
 +    private var _viewMetricsAndPadding:EdgeMetrics;
 +
 +    /**
 +     *  Returns an object that has four properties: <code>left</code>,
 +     *  <code>top</code>, <code>right</code>, and <code>bottom</code>.
 +     *  The value of each property is equal to the thickness of the chrome
 +     *  (visual elements)
 +     *  around the edge of the container plus the thickness of the object's margins.
 +     *
 +     *  <p>The chrome includes the border thickness.
 +     *  If the <code>horizontalScrollPolicy</code> or <code>verticalScrollPolicy</code> 
 +     *  property value is <code>ScrollPolicy.ON</code>, the
 +     *  chrome also includes the thickness of the corresponding
 +     *  scroll bar. If a scroll policy is <code>ScrollPolicy.AUTO</code>,
 +     *  the chrome measurement does not include the scroll bar thickness, 
 +     *  even if a scroll bar is displayed.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get viewMetricsAndPadding():EdgeMetrics
 +    {
 +        // If this object has scrollbars, and if the verticalScrollPolicy
 +        // is not ScrollPolicy.ON, then the view metrics change
 +        // depending on whether we're doing layout or not.
 +        // In that case, we can't use a cached value.
 +        // In all other cases, use the cached value if it exists.
 +		COMPILE::LATER
 +		{
 +        if (_viewMetricsAndPadding &&
 +            (!horizontalScrollBar ||
 +             horizontalScrollPolicy == ScrollPolicy.ON) &&
 +            (!verticalScrollBar ||
 +             verticalScrollPolicy == ScrollPolicy.ON))
 +        {
 +            return _viewMetricsAndPadding;
 +        }
 +		}
 +		
 +        if (!_viewMetricsAndPadding)
 +            _viewMetricsAndPadding = new EdgeMetrics();
 +
 +        var o:EdgeMetrics = _viewMetricsAndPadding;
 +        var vm:EdgeMetrics = viewMetrics;
 +
 +        o.left = vm.left + getStyle("paddingLeft");
 +        o.right = vm.right + getStyle("paddingRight");
 +        o.top = vm.top + getStyle("paddingTop");
 +        o.bottom = vm.bottom + getStyle("paddingBottom");
 +
 +        return o;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: EventDispatcher
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  If we add a mouse event, then we need to add a mouse shield
 +     *  to us and to all our children
 +     *  The mouseShield style is a non-inheriting style
 +     *  that is used by the view.
 +     *  The mouseShieldChildren style is an inherting style
 +     *  that is used by the children views.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override public function addEventListener(
 +                                    type:String, listener:Function,
 +                                    useCapture:Boolean = false,
 +                                    priority:int = 0,
 +                                    useWeakReference:Boolean = false):void
 +    {
 +        super.addEventListener(type, listener, useCapture,
 +                               priority, useWeakReference);
 +
 +        // If we are a mouse event, then create a mouse shield.
 +        if (type == MouseEvent.CLICK ||
 +            type == MouseEvent.DOUBLE_CLICK ||
 +            type == MouseEvent.MOUSE_DOWN ||
 +            type == MouseEvent.MOUSE_MOVE ||
 +            type == MouseEvent.MOUSE_OVER ||
 +            type == MouseEvent.MOUSE_OUT ||
 +            type == MouseEvent.MOUSE_UP ||
 +            type == MouseEvent.MOUSE_WHEEL)
 +        {
 +            if (mouseEventReferenceCount < 0x7FFFFFFF /* int_max */ &&
 +                mouseEventReferenceCount++ == 0)
 +            {
 +                setStyle("mouseShield", true);
 +                setStyle("mouseShieldChildren", true);
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  We're doing special behavior on addEventListener to make sure that 
 +     *  we successfully capture mouse events, even when there's no background.
 +     *  However, this means adding an event listener changes the behavior 
 +     *  a little, and this can be troublesome for overlapping components
 +     *  that now don't get any mouse events.  This is acceptable normally; 
 +     *  however, automation adds certain events to the Container, and 
 +     *  it'd be better if automation support didn't modify the behavior of 
 +     *  the component.  For this reason, especially, we have an mx_internal 
 +     *  $addEventListener to add event listeners without affecting the behavior 
 +     *  of the component.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    mx_internal function $addEventListener(
 +                            type:String, listener:Function,
 +                            useCapture:Boolean = false,
 +                            priority:int = 0,
 +                            useWeakReference:Boolean = false):void
 +    {
 +        super.addEventListener(type, listener, useCapture,
 +                               priority, useWeakReference);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Remove the mouse shield if we no longer listen to any mouse events
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    override public function removeEventListener(
 +                                    type:String, listener:Function,
 +                                    useCapture:Boolean = false):void
 +    {
 +        super.removeEventListener(type, listener, useCapture);
 +
 +        // If we are a mouse event,
 +        // then decrement the mouse shield reference count.
 +        if (type == MouseEvent.CLICK ||
 +            type == MouseEvent.DOUBLE_CLICK ||
 +            type == MouseEvent.MOUSE_DOWN ||
 +            type == MouseEvent.MOUSE_MOVE ||
 +            type == MouseEvent.MOUSE_OVER ||
 +            type == MouseEvent.MOUSE_OUT ||
 +            type == MouseEvent.MOUSE_UP ||
 +            type == MouseEvent.MOUSE_WHEEL)
 +        {
 +            if (mouseEventReferenceCount > 0 &&
 +                --mouseEventReferenceCount == 0)
 +            {
 +                setStyle("mouseShield", false);
 +                setStyle("mouseShieldChildren", false);
 +            }
 +        }
 +    }
 +    
 +     /**
 +     *  @private
 +     *  We're doing special behavior on removeEventListener to make sure that 
 +     *  we successfully capture mouse events, even when there's no background.
 +     *  However, this means removing an event listener changes the behavior 
 +     *  a little, and this can be troublesome for overlapping components
 +     *  that now don't get any mouse events.  This is acceptable normally; 
 +     *  however, automation adds certain events to the Container, and 
 +     *  it'd be better if automation support didn't modify the behavior of 
 +     *  the component.  For this reason, especially, we have an mx_internal 
 +     *  $removeEventListener to remove event listeners without affecting the behavior 
 +     *  of the component.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    mx_internal function $removeEventListener(
 +                              type:String, listener:Function,
 +                              useCapture:Boolean = false):void
 +    {
 +        super.removeEventListener(type, listener, useCapture);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: DisplayObjectContainer
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Adds a child DisplayObject to this Container.
 +     *  The child is added after other existing children,
 +     *  so that the first child added has index 0,
 +     *  the next has index 1, an so on.
 +     *
 +     *  <p><b>Note: </b>While the <code>child</code> argument to the method
 +     *  is specified as of type DisplayObject, the argument must implement
 +     *  the IUIComponent interface to be added as a child of a container.
 +     *  All Flex components implement this interface.</p>
 +     *
 +     *  <p>Children are layered from back to front.
 +     *  In other words, if children overlap, the one with index 0
 +     *  is farthest to the back, and the one with index
 +     *  <code>numChildren - 1</code> is frontmost.
 +     *  This means the newly added children are layered
 +     *  in front of existing children.</p>
 +     *
 +     *  @param child The DisplayObject to add as a child of this Container.
 +     *  It must implement the IUIComponent interface.
 +     *
 +     *  @return The added child as an object of type DisplayObject. 
 +     *  You typically cast the return value to UIComponent, 
 +     *  or to the type of the added component.
 +     *
 +     *  @see mx.core.IUIComponent
 +     *
 +     *  @tiptext Adds a child object to this container.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function addChild(child:DisplayObject):DisplayObject
 +    {
 +        return addChildAt(child, numChildren);
 +
 +        /* Application and Panel are depending on addChild calling addChildAt */
 +        
 +        /*
 +        addingChild(child);
 +
 +        if (contentPane)
 +            contentPane.addChild(child);
 +        else
 +            $addChild(child);
 +
 +        childAdded(child);
 +
 +        return child;
 +        */
 +    }
 +
 +    /**
 +     *  Adds a child DisplayObject to this Container.
 +     *  The child is added at the index specified.
 +     *
 +     *  <p><b>Note: </b>While the <code>child</code> argument to the method
 +     *  is specified as of type DisplayObject, the argument must implement
 +     *  the IUIComponent interface to be added as a child of a container.
 +     *  All Flex components implement this interface.</p>
 +     *
 +     *  <p>Children are layered from back to front.
 +     *  In other words, if children overlap, the one with index 0
 +     *  is farthest to the back, and the one with index
 +     *  <code>numChildren - 1</code> is frontmost.
 +     *  This means the newly added children are layered
 +     *  in front of existing children.</p>
 +     *
 +     *  <p>When you add a new child at an index that is already occupied
 +     *  by an old child, it doesn't replace the old child; instead the
 +     *  old child and the ones after it "slide over" and have their index
 +     *  incremented by one.
 +     *  For example, suppose a Container contains the children
 +     *  (A, B, C) and you add D at index 1.
 +     *  Then the container will contain (A, D, B, C).
 +     *  If you want to replace an old child, you must first remove it
 +     *  before adding the new one.</p>
 +     *
 +     *  @param child The DisplayObject to add as a child of this Container.
 +     *  It must implement the IUIComponent interface.
 +     *
 +     *  @param index The index to add the child at.
 +     *
 +     *  @return The added child as an object of type DisplayObject. 
 +     *  You typi

<TRUNCATED>

[47/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/CanvasLayout.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/CanvasLayout.as
index 16f9b7f,0000000..2538b11
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/CanvasLayout.as
+++ b/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/CanvasLayout.as
@@@ -1,1938 -1,0 +1,1938 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.containers.utilityClasses
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.display.DisplayObject;
 +import flash.geom.Rectangle;
 +}
 +COMPILE::JS
 +{
 +import flex.display.DisplayObject;
 +import org.apache.flex.geom.Rectangle;	
 +}
 +COMPILE::LATER
 +{
 +import mx.containers.Canvas;
 +}
 +import mx.containers.errors.ConstraintError;
 +import mx.core.Container;
 +import mx.core.EdgeMetrics;
 +import mx.core.IConstraintClient;
 +import mx.core.IUIComponent;
 +import mx.core.mx_internal;
 +import mx.events.ChildExistenceChangedEvent;
 +import mx.events.MoveEvent;
 +import mx.resources.IResourceManager;
 +import mx.resources.ResourceManager;
 +COMPILE::LATER
 +{
 +import flash.utils.Dictionary;
 +}
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +[ResourceBundle("containers")]
 +
 +/**
 + *  @private
 + *  The CanvasLayout class is for internal use only.
 + */
 +public class CanvasLayout extends Layout
 +{
 +    include "../../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private static var r:Rectangle = new Rectangle();
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Restrict a number to a particular min and max.
 +     */
 +    private function bound(a:Number, min:Number, max:Number):Number
 +    {
 +        if (a < min)
 +            a = min;
 +        else if (a > max)
 +            a = max;
 +        else
 +            a = Math.floor(a);
 +
 +        return a;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    private var _contentArea:Rectangle;
 +    
 +    //Arrays that keep track of children spanning
 +    //content size columns or rows. 
 +    private var colSpanChildren:Array = [];
 +    private var rowSpanChildren:Array = [];
 +    
 +	COMPILE::LATER
 +	{
 +    private var constraintCache:Dictionary = new Dictionary(true);
 +	}
 +    
 +    private var constraintRegionsInUse:Boolean = false;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function CanvasLayout()
 +    {
 +        super();
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  target
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set target(value:Container):void
 +    {
 +        var target:Container = super.target;
 +        if (value != target)
 +        {
 +            var i:int;
 +            var n:int;
 +
 +            if (target)
 +            {
 +                // Start listening for child existence events.
 +                // We want to track the movement of children
 +                // so we can update our size every time a
 +                // child moves.
 +
 +                target.removeEventListener(
 +                        ChildExistenceChangedEvent.CHILD_ADD,
 +                        target_childAddHandler);
 +                target.removeEventListener(
 +                        ChildExistenceChangedEvent.CHILD_REMOVE,
 +                        target_childRemoveHandler);
 +
 +                n = target.numChildren;
 +                for (i = 0; i < n; i++)
 +                {
 +                    DisplayObject(target.getChildAt(i)).removeEventListener(
 +                        MoveEvent.MOVE, child_moveHandler);
 +                }
 +            }
 +
 +            if (value)
 +            {
 +                value.addEventListener(
 +                        ChildExistenceChangedEvent.CHILD_ADD,
 +                        target_childAddHandler);
 +                value.addEventListener(
 +                        ChildExistenceChangedEvent.CHILD_REMOVE,
 +                        target_childRemoveHandler);
 +
 +                n = value.numChildren;
 +                for (i = 0; i < n; i++)
 +                {
 +                    DisplayObject(value.getChildAt(i)).addEventListener(
 +                        MoveEvent.MOVE, child_moveHandler);
 +                }
 +            }
 +
 +            super.target = value;
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Measure container as per Canvas layout rules.
 +     */
 +    override public function measure():void
 +    {
 +        var target:Container = super.target;
 +        var w:Number = 0;
 +        var h:Number = 0;
 +        var i:Number = 0;
 +        
 +        var vm:EdgeMetrics = target.viewMetrics;
 +        
 +        for (i = 0; i < target.numChildren; i++)
 +        {
 +            var child:IUIComponent = target.getLayoutChildAt(i);
 +            parseConstraints(child);
 +        }
 +        
 +        //We need to NaN out content-sized columns and rows width/height values
 +        //so that new values are calculated correctly and we avoid stale values
 +        for (i = 0; i < IConstraintLayout(target).constraintColumns.length; i++)
 +        {
 +            var col:ConstraintColumn = IConstraintLayout(target).constraintColumns[i];
 +			if (col.contentSize)
 +				col._width = NaN;
 +        }
 +        for (i = 0; i < IConstraintLayout(target).constraintRows.length; i++)
 +        {
 +            var row:ConstraintRow = IConstraintLayout(target).constraintRows[i];
 +			if (row.contentSize)
 +				row._height = NaN;
 +        }
 +        
 +        measureColumnsAndRows();
 +        
 +        _contentArea = null;
 +        var contentArea:Rectangle = measureContentArea();
 +        
 +        // Only add viewMetrics padding
 +        // if children are bigger than existing size.
 +        target.measuredWidth = contentArea.width + vm.left + vm.right;
 +        target.measuredHeight = contentArea.height + vm.top + vm.bottom;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Lay out children as per Canvas layout rules.
 +     */
 +    override public function updateDisplayList(unscaledWidth:Number,
 +                                               unscaledHeight:Number):void
 +    {
 +        var i:int;
 +        var child:IUIComponent;
 +        var target:Container = super.target;    
 +        var n:int = target.numChildren;
 +        // viewMetrics include scrollbars during updateDisplayList, but not
 +        // during measure. In order to avoid a race condition when the 
 +        // scrollable area is within a scrollbar's width of the view metrics,
 +        // we use the non-update viewMetrics, which don't include scrollbars.
 +		target.doingLayout = false;
 +        var vm:EdgeMetrics = target.viewMetrics;
 +		target.doingLayout = true;
 +        
 +        var viewableWidth:Number = unscaledWidth - vm.left - vm.right;
 +        var viewableHeight:Number = unscaledHeight - vm.top - vm.bottom;
 +        
 +        if (IConstraintLayout(target).constraintColumns.length > 0 ||
 +            IConstraintLayout(target).constraintRows.length > 0)
 +                constraintRegionsInUse = true;
 +        if (constraintRegionsInUse)
 +        {
 +            for (i = 0; i < n; i++)
 +            {
 +                child = target.getLayoutChildAt(i);
 +                parseConstraints(child);
 +            }
 +            
 +            //We need to NaN out content-sized columns and rows width/height values
 +            //so that new values are calculated correctly and we avoid stale values
 +            for (i = 0; i < IConstraintLayout(target).constraintColumns.length; i++)
 +            {
 +                var col:ConstraintColumn = IConstraintLayout(target).constraintColumns[i];
 +				if (col.contentSize)
 +					col._width = NaN;
 +            }
 +            for (i = 0; i < IConstraintLayout(target).constraintRows.length; i++)
 +            {
 +                var row:ConstraintRow = IConstraintLayout(target).constraintRows[i];
 +				if (row.contentSize)
 +					row._height = NaN;
 +            }
 +            
 +            measureColumnsAndRows();
 +        }
 +        
 +        // Apply the CSS styles left, top, right, bottom,
 +        // horizontalCenter, and verticalCenter;
 +        // these override x, y, width, and height if specified.
 +        for (i = 0; i < n; i++)
 +        {
 +            child = target.getLayoutChildAt(i);
 +            applyAnchorStylesDuringUpdateDisplayList(viewableWidth, viewableHeight, child);
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Figure out the content area based on whether there are 
 +     *  ConstraintColumn instances or ConstraintRow instances 
 +     *  specified and the constraint style values. 
 +     */
 +    private function applyAnchorStylesDuringMeasure(child:IUIComponent,
 +                                                    r:Rectangle):void
 +    {
 +        var constraintChild:IConstraintClient = child as IConstraintClient;
 +        if (!constraintChild)
 +            return;
 +        //Calculate constraint boundaries if it has not been calculated
 +        //already 
 +		COMPILE::LATER
 +		{
 +        var childInfo:ChildConstraintInfo = constraintCache[constraintChild];
 +		}
 +		var childInfo:ChildConstraintInfo;
 +        if (!childInfo)
 +            childInfo = parseConstraints(child);
 +        var left:Number = childInfo.left;
 +        var right:Number = childInfo.right;
 +        var horizontalCenter:Number = childInfo.hc;
 +        var top:Number = childInfo.top;
 +        var bottom:Number = childInfo.bottom;
 +        var verticalCenter:Number = childInfo.vc;
 +        
 +        var cols:Array = IConstraintLayout(target).constraintColumns;
 +        var rows:Array = IConstraintLayout(target).constraintRows;
 +        
 +        var i:int;
 +        var holder:Number = 0;
 +        
 +        if (!cols.length > 0)
 +        {
 +            if (!isNaN(horizontalCenter))
 +            {
 +                r.x = Math.round((target.width - child.width) / 2 + horizontalCenter);
 +            }
 +            else if (!isNaN(left) && !isNaN(right))
 +            {
 +                r.x = left;
 +                r.width += right;
 +            }
 +            else if (!isNaN(left))
 +            {
 +                r.x = left;
 +            }
 +            else if (!isNaN(right))
 +            {
 +                r.x = 0;
 +                r.width += right;
 +            }
 +        }
 +        else //sum up the column widths
 +        {
 +            r.x = 0;
 +            for (i = 0; i < cols.length; i++)
 +            {
 +                holder += ConstraintColumn(cols[i]).width;
 +            }
 +            r.width = holder;
 +        }
 +        
 +        if (!rows.length > 0)
 +        {
 +            if (!isNaN(verticalCenter))
 +            {
 +                r.y = Math.round((target.height - child.height) / 2 + verticalCenter);
 +            }
 +            else if (!isNaN(top) && !isNaN(bottom))
 +            {
 +                r.y = top;
 +                r.height += bottom;
 +            }
 +            else if (!isNaN(top))
 +            {
 +                r.y = top;
 +            }
 +            else if (!isNaN(bottom))
 +            {
 +                r.y = 0;
 +                r.height += bottom;
 +            }
 +        }
 +        else //sum up the row heights
 +        {
 +            holder = 0;
 +            r.y = 0;
 +            for (i = 0; i < rows.length; i++)
 +            {
 +                holder += ConstraintRow(rows[i]).height;
 +            }
 +            r.height = holder;
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Here is a description of the layout algorithm.
 +     *  It is described in terms of horizontal coordinates,
 +     *  but the vertical ones are similar.
 +     *
 +     *  1. First the actual width for the child is determined.
 +     *
 +     *  1a. If both left and right anchors are specified,
 +     *  the actual width is determined by them.
 +     *  However, the actual width is subject to the child's
 +     *  minWidth.
 +     *
 +     *  1b. Otherwise, if a percentWidth was specified,
 +     *  this percentage is applied to the 
 +     *  ConstraintColumn/Parent's content width
 +     *  (the widest specified point of content, or the width of
 +     *  the parent/column, whichever is greater).
 +     *  The actual width is subject to the child's
 +     *  minWidth and maxWidth.
 +     *
 +     *  1c. Otherwise, if an explicitWidth was specified,
 +     *  this is used as the actual width.
 +     *
 +     *  1d. Otherwise, the measuredWidth is used is used as the
 +     *  actual width.
 +     *
 +     *  2. Then the x coordinate of the child is determined.
 +     *
 +     *  Note:If a baseline constraint is specified, the center
 +     *  of the child (y position) is placed relative to the 
 +     *  ConstraintRow specified. 
 +     * 
 +     *  2a. If a horizonalCenter anchor is specified,
 +     *  the center of the child is placed relative to the center
 +     *  of the parent/column. 
 +     *
 +     *  2b. Otherwise, if a left anchor is specified,
 +     *  the left edge of the child is placed there.
 +     *
 +     *  2c. Otherwise, if a right anchor is specified,
 +     *  the right edge of the child is placed there.
 +     *
 +     *  2d. Otherwise, the child is left at its previously set
 +     *  x coordinate.
 +     *
 +     *  3. If the width is a percentage, try to make sure it
 +     *  doesn't overflow the content width (while still honoring
 +     *  minWidth). We need to wait
 +     *  until after the x coordinate is set to test this.
 +     */
 +    private function applyAnchorStylesDuringUpdateDisplayList(
 +                            availableWidth:Number,
 +                            availableHeight:Number,
 +                            child:IUIComponent = null):void
 +    {   
 +        var constraintChild:IConstraintClient = child as IConstraintClient;
 +        if (!constraintChild)
 +            return;
 +        var childInfo:ChildConstraintInfo = parseConstraints(child);
 +        // Variables to track the offsets
 +        var left:Number = childInfo.left;
 +        var right:Number = childInfo.right;
 +        var horizontalCenter:Number = childInfo.hc;
 +        var top:Number = childInfo.top;
 +        var bottom:Number = childInfo.bottom;
 +        var verticalCenter:Number = childInfo.vc;
 +        var baseline:Number = childInfo.baseline;
 +
 +        // Variables to track the boundaries from which
 +        // the offsets are calculated from. If null, the 
 +        // boundary is the parent container edge. 
 +        var leftBoundary:String = childInfo.leftBoundary;
 +        var rightBoundary:String = childInfo.rightBoundary;
 +        var hcBoundary:String = childInfo.hcBoundary;
 +        var topBoundary:String = childInfo.topBoundary;
 +        var bottomBoundary:String = childInfo.bottomBoundary;
 +        var vcBoundary:String = childInfo.vcBoundary;
 +        var baselineBoundary:String = childInfo.baselineBoundary;
 +
 +        var i:int;
 +        var w:Number;
 +        var h:Number;
 +        
 +        var x:Number;
 +        var y:Number;
 +        var message:String;
 +        var checkWidth:Boolean = false;
 +        var checkHeight:Boolean = false;
 +    
 +        // If we are to evaluate the left, right, and horizontalCenter
 +        // styles relative to the parent boundaries, parentBoundariesLR will
 +        // be true
 +        var parentBoundariesLR:Boolean = (!hcBoundary && !leftBoundary && !rightBoundary);
 +        // If we are to evaluate the top, bottom, verticalCenter and baseline
 +        // styles relative to the parent boundaries, parentBoundariesTB will
 +        // be true
 +        var parentBoundariesTB:Boolean = (!vcBoundary && !topBoundary && !bottomBoundary && !baselineBoundary);
 +    
 +        var leftHolder:Number = 0;
 +        var rightHolder:Number = availableWidth;
 +        var topHolder:Number = 0;
 +        var bottomHolder:Number = availableHeight;
 +        var vcHolder:Number;
 +        var hcHolder:Number;
 +        var vcY:Number;
 +        var hcX:Number;
 +        var baselineY:Number;
 +        // If we are not evaluating left, right, and horizontalCenter
 +        // relative to the parent container edges, we need to match
 +        // the column specified in the constraint expression with the
 +        // actual ConstraintColumn instance so later we can determine how
 +        // much space the control has to live in. 
 +		var length:int = IConstraintLayout(target).constraintColumns.length;
 +		
 +		if (!parentBoundariesLR && length > 0)
 +        {
 +            var matchLeft:Boolean = leftBoundary ? true : false;
 +            var matchRight:Boolean = rightBoundary ? true : false;
 +            var matchHC:Boolean = hcBoundary ? true : false;
 +			
 +            for (i = 0; i < length; i++)
 +            {       
 +                var col:ConstraintColumn = ConstraintColumn(IConstraintLayout(target).constraintColumns[i]);
 +                if (matchLeft)
 +                {
 +                    if (leftBoundary == col.id)
 +                    {
 +                        leftHolder = col.x;
 +                        matchLeft = false;
 +                    }
 +                }   
 +                if (matchRight)
 +                {
 +                    if (rightBoundary == col.id)
 +                    {
 +                        rightHolder = col.x + col.width;
 +                        matchRight = false;
 +                    }
 +                }   
 +                if (matchHC)
 +                {
 +                    if (hcBoundary == col.id)
 +                    {
 +                        hcHolder = col.width;
 +                        hcX = col.x;
 +                        matchHC = false;
 +                    }
 +                }   
 +            }
 +            // Error throwing - we could not match one of the boundaries to the
 +            // declared constraintColumns 
 +            if (matchLeft)
 +            {
 +                message = resourceManager.getString(
 +                    "containers", "columnNotFound", [ leftBoundary ]);
 +                throw new ConstraintError(message);
 +            }   
 +            if (matchRight)
 +            {
 +                message = resourceManager.getString(
 +                    "containers", "columnNotFound", [ rightBoundary ]);
 +                throw new ConstraintError(message);
 +            }
 +            if (matchHC)
 +            {
 +                message = resourceManager.getString(
 +                    "containers", "columnNotFound", [ hcBoundary ]);
 +                throw new ConstraintError(message);
 +            }
 +        }
 +		else if (!parentBoundariesLR && length == 0)
 +		{
 +            // The left, right or horizontalCenter style has been set to
 +            // a non-parent region, but no columns were declared 
 +            message = resourceManager.getString(
 +                "containers", "noColumnsFound");
 +            throw new ConstraintError(message);
 +        }
 +        
 +        // The width of the region which
 +        // the control will live in. 
 +        availableWidth = Math.round(rightHolder - leftHolder);
 +
 +        // If a percentage size is specified for a child,
 +        // it specifies a percentage of the parent's content size
 +        // minus any specified left, top, right, or bottom
 +        // anchors for this child.
 +        // Also, respect the child's minimum and maximum sizes.
 +        if (!isNaN(left) && !isNaN(right))
 +        {
 +            w = availableWidth - left - right;
 +            if (w < child.minWidth)
 +                w = child.minWidth;
 +        }
 +        else if (!isNaN(child.percentWidth))
 +        {
 +            w = child.percentWidth / 100 * availableWidth;
 +            w = bound(w, child.minWidth, child.maxWidth);
 +            
 +            checkWidth = true;
 +        }
 +        else
 +        {
 +            w = child.getExplicitOrMeasuredWidth();
 +        }
 +
 +        // If we are not evaluating top, bottom, and verticalCenter
 +        // relative to the parent container edges, we need to match
 +        // the row specified in the constraint expression with the
 +        // actual ConstraintRow instance so later we can determine how
 +        // much space the control has to live in. 
 +		length = IConstraintLayout(target).constraintRows.length;
 +        if (!parentBoundariesTB && length > 0)
 +        {
 +            var matchTop:Boolean = topBoundary ? true : false;
 +            var matchBottom:Boolean = bottomBoundary ? true : false;
 +            var matchVC:Boolean = vcBoundary ? true : false;
 +            var matchBaseline:Boolean = baselineBoundary ? true : false;
 +            length = IConstraintLayout(target).constraintRows.length;
 +            for (i = 0; i < length; i++)
 +            {       
 +                var row:ConstraintRow = ConstraintRow(IConstraintLayout(target).constraintRows[i]);
 +                if (matchTop)
 +                {
 +                    if (topBoundary == row.id)
 +                    {
 +                        topHolder = row.y;
 +                        matchTop = false;
 +                    }
 +                }   
 +                if (matchBottom)
 +                {
 +                    if (bottomBoundary == row.id)
 +                    {
 +                        bottomHolder = row.y + row.height;
 +                        matchBottom = false;
 +                    }
 +                }   
 +                if (matchVC)
 +                {
 +                    if (vcBoundary == row.id)
 +                    {
 +                        vcHolder = row.height;
 +                        vcY = row.y;
 +                        matchVC = false;
 +                    }
 +                }
 +                if (matchBaseline)
 +                {
 +                    if (baselineBoundary == row.id)
 +                    {
 +                        baselineY = row.y;
 +                        matchBaseline = false;
 +                    }
 +                }   
 +            }
 +            // Error throwing - we could not match one of the boundaries to the
 +            // declared constraintRows 
 +            if (matchTop)
 +            {
 +                message = resourceManager.getString(
 +                    "containers", "rowNotFound", [ topBoundary ]);
 +                throw new ConstraintError(message);
 +            }
 +            if (matchBottom)
 +            {
 +                message = resourceManager.getString(
 +                    "containers", "rowNotFound", [ bottomBoundary ]);
 +                throw new ConstraintError(message);
 +            }
 +            if (matchVC)
 +            {
 +                message = resourceManager.getString(
 +                    "containers", "rowNotFound", [ vcBoundary ]);
 +                throw new ConstraintError(message);
 +            }
 +            if (matchBaseline)
 +            {
 +                message = resourceManager.getString(
 +                    "containers", "rowNotFound", [ baselineBoundary ]);
 +                throw new ConstraintError(message);
 +            }
 +        }
 +        else if (!parentBoundariesTB && length == 0)
 +        {
 +            // The top, bottom or verticalCenter style has been set to
 +            // a non-parent region, but no rows were declared 
 +            message = resourceManager.getString(
 +                "containers", "noRowsFound");
 +            throw new ConstraintError(message);
 +        }
 +        
 +        // The height of the region which
 +        // the control will live in. 
 +        availableHeight = Math.round(bottomHolder - topHolder);
 +        if (!isNaN(top) && !isNaN(bottom))
 +        {
 +            h = availableHeight - top - bottom;
 +            if (h < child.minHeight)
 +                h = child.minHeight;
 +        }
 +        else if (!isNaN(child.percentHeight))
 +        {
 +            h = child.percentHeight / 100 * availableHeight;
 +            h = bound(h, child.minHeight, child.maxHeight);
 +            
 +            checkHeight = true;
 +        }
 +        else
 +        {
 +            h = child.getExplicitOrMeasuredHeight();
 +        }
 +        
 +        // The left, right, and horizontalCenter styles 
 +        // affect the child's x and/or its actual width.
 +        if (!isNaN(horizontalCenter))
 +        {
 +            if (hcBoundary)
 +                x = Math.round((hcHolder - w) / 2 + horizontalCenter + hcX);
 +            else
 +                x = Math.round((availableWidth - w) / 2 + horizontalCenter);
 +        }
 +        else if (!isNaN(left))
 +        {
 +            if (leftBoundary)
 +                x = leftHolder + left;
 +            else 
 +                x = left;
 +        }
 +        else if (!isNaN(right))
 +        {
 +            if (rightBoundary)
 +                x = rightHolder - right - w;
 +            else 
 +                x = availableWidth - right - w;
 +        }
 +
 +        // The top, bottom, verticalCenter and baseline styles
 +        // affect the child's y and/or its actual height.
 +        if (!isNaN(baseline))
 +        {
 +            if (baselineBoundary)
 +            {
 +                //trace(child.name, child.baselinePosition);
 +                y = (baselineY - child.baselinePosition) + baseline;
 +            }
 +            else 
 +                y = baseline;
 +        }
 +        if (!isNaN(verticalCenter))
 +        {
 +            if (vcBoundary)
 +            {
 +                y = Math.round((vcHolder - h) / 2 + verticalCenter + vcY);
 +            }
 +            else 
 +                y = Math.round((availableHeight - h) / 2 + verticalCenter);
 +        }
 +        else if (!isNaN(top))
 +        {
 +            if (topBoundary)
 +                y = topHolder + top;
 +            else
 +                y = top;
 +        }
 +        else if (!isNaN(bottom))
 +        {
 +            if (bottomBoundary)
 +                y = bottomHolder - bottom - h;
 +            else 
 +                y = availableHeight - bottom - h;
 +        }
 +        
 +        x = isNaN(x) ? child.x : x;
 +        y = isNaN(y) ? child.y : y;
 +        
 +        child.move(x, y);
 +        
 +        // One last test here. If the width/height is a percentage,
 +        // limit the width/height to the available content width/height, 
 +        // but honor the minWidth/minHeight.
 +        if (checkWidth)
 +        {
 +            if (x + w > availableWidth)
 +                w = Math.max(availableWidth - x, child.minWidth);
 +        }
 +        
 +        if (checkHeight)
 +        {
 +            if (y + h > availableHeight)
 +                h = Math.max(availableHeight - y, child.minHeight);
 +        }
 +        
 +        if (!isNaN(w) && !isNaN(h))
 +            child.setActualSize(w, h);
 +    }
 +    
 +    /** 
 +     *  @private
 +     *  This function measures the bounds of the content area.
 +     *  It looks at each child included in the layout, and determines
 +     *  right and bottom edge.
 +     *
 +     *  When we are laying out the children, we use the larger of the
 +     *  content area and viewable area to determine percentages and 
 +     *  the edges for constraints.
 +     *  
 +     *  If the child has a percentageWidth or both left and right values
 +     *  set, the minWidth is used for determining its area. Otherwise
 +     *  the explicit or measured width is used. The same rules apply in 
 +     *  the vertical direction.
 +     */
 +    private function measureContentArea():Rectangle
 +    {
 +        if (_contentArea)
 +            return _contentArea;
 +        var i:int;
 +        _contentArea = new Rectangle();
 +        var n:int = target.numChildren;
 +        
 +        //Special case where there are no children but there
 +        //are columns or rows
 +        if (n == 0 && constraintRegionsInUse)
 +        {
 +            var cols:Array = IConstraintLayout(target).constraintColumns;
 +            var rows:Array = IConstraintLayout(target).constraintRows;
 +            //The right of the contentArea rectangle is the x position of the last
 +            //column plus its width. If there are no columns, its 0.
 +            if (cols.length > 0)
 +                _contentArea.right = cols[cols.length-1].x + cols[cols.length-1].width;
 +            else 
 +                _contentArea.right = 0;
 +            //The bottom of the contentArea rectangle is the y position of the last row
 +            //plus its height. If there are no rows, its 0;
 +            if (rows.length > 0)
 +                _contentArea.bottom = rows[rows.length-1].y + rows[rows.length-1].height;
 +            else _contentArea.bottom = 0;
 +        }
 +        
 +        for (i = 0; i < n; i++)
 +        {
 +            var child:IUIComponent = target.getLayoutChildAt(i);
 +            var childConstraints:LayoutConstraints = getLayoutConstraints(child);
 +        
 +            if (!child.includeInLayout)
 +                continue;
 +                
 +            var cx:Number = child.x;
 +            var cy:Number = child.y;
 +            var pw:Number = child.getExplicitOrMeasuredWidth();
 +            var ph:Number = child.getExplicitOrMeasuredHeight();
 +            
 +            if (!isNaN(child.percentWidth) ||
 +                (childConstraints && 
 +                    !isNaN(childConstraints.left) && 
 +                    !isNaN(childConstraints.right) &&
 +                    isNaN(child.explicitWidth)))
 +            {
 +                pw = child.minWidth;
 +            }
 +        
 +            if (!isNaN(child.percentHeight) ||
 +                    (childConstraints && 
 +                        !isNaN(childConstraints.top) && 
 +                        !isNaN(childConstraints.bottom) &&
 +                        isNaN(child.explicitHeight)))
 +            {
 +                ph = child.minHeight;
 +            }
 +            
 +            r.x = cx
 +            r.y = cy
 +            r.width = pw;
 +            r.height = ph;
 +            applyAnchorStylesDuringMeasure(child, r);
 +            cx = r.x;
 +            cy = r.y;
 +            pw = r.width;
 +            ph = r.height;
 +
 +            if (isNaN(cx))
 +                cx = child.x;
 +            if (isNaN(cy))
 +                cy = child.y;
 +
 +            var rightEdge:Number = cx;
 +            var bottomEdge:Number = cy;
 +
 +            if (isNaN(pw))
 +                pw = child.width;
 +
 +            if (isNaN(ph))
 +                ph = child.height;
 +
 +            rightEdge += pw;
 +            bottomEdge += ph;
 +
 +            _contentArea.right = Math.max(_contentArea.right, rightEdge);
 +            _contentArea.bottom = Math.max(_contentArea.bottom, bottomEdge);
 +        }
 +        return _contentArea;
 +    }
 +    
 +    /** 
 +     *  @private
 +     */
 +    private function parseConstraints(child:IUIComponent = null):ChildConstraintInfo
 +    {
 +        var constraints:LayoutConstraints = getLayoutConstraints(child);
 +        if (!constraints)
 +            return null;
 +        //Variables to track the offsets
 +        var left:Number;
 +        var right:Number;
 +        var horizontalCenter:Number;
 +        var top:Number;
 +        var bottom:Number;
 +        var verticalCenter:Number;
 +        var baseline:Number;
 +
 +        //Variables to track the boundaries from which
 +        //the offsets are calculated from. If null, the 
 +        //boundary is the parent container edge. 
 +        var leftBoundary:String;
 +        var rightBoundary:String;
 +        var hcBoundary:String;      
 +        var topBoundary:String;
 +        var bottomBoundary:String;
 +        var vcBoundary:String;
 +        var baselineBoundary:String;
 +        
 +        //Evaluate the constraint expression and store the offsets
 +        //and boundaries.
 +        var temp:Array; 
 +        while (true)
 +        {
 +            temp = parseConstraintExp(constraints.left);
 +            if (!temp)
 +                left = NaN;
 +            else if (temp.length == 1)
 +                left = Number(temp[0]);
 +            else
 +            {
 +                leftBoundary = temp[0];
 +                left = temp[1];
 +            }
 +    
 +            temp = parseConstraintExp(constraints.right);
 +            if (!temp)
 +                right = NaN;
 +            else if (temp.length == 1)
 +                right = Number(temp[0]);
 +            else
 +            {
 +                rightBoundary = temp[0];
 +                right = temp[1];
 +            }
 +                
 +            temp = parseConstraintExp(constraints.horizontalCenter);
 +            if (!temp)
 +                horizontalCenter = NaN;
 +            else if (temp.length == 1)
 +                horizontalCenter = Number(temp[0]);
 +            else
 +            {
 +                hcBoundary = temp[0];
 +                horizontalCenter = temp[1];
 +            }
 +                
 +            temp = parseConstraintExp(constraints.top);
 +            if (!temp)
 +                top = NaN;
 +            else if (temp.length == 1)
 +                top = Number(temp[0]);
 +            else
 +            {
 +                topBoundary = temp[0];
 +                top = temp[1];
 +            }
 +                
 +            temp = parseConstraintExp(constraints.bottom);
 +            if (!temp)
 +                bottom = NaN;
 +            else if (temp.length == 1)
 +                bottom = Number(temp[0]);
 +            else
 +            {
 +                bottomBoundary = temp[0];
 +                bottom = temp[1];
 +            }
 +                
 +            temp = parseConstraintExp(constraints.verticalCenter);
 +            if (!temp)
 +                verticalCenter = NaN;
 +            else if (temp.length == 1)
 +                verticalCenter = Number(temp[0]);
 +            else
 +            {
 +                vcBoundary = temp[0];
 +                verticalCenter = temp[1];
 +            }
 +            temp = parseConstraintExp(constraints.baseline);
 +            if (!temp)
 +                baseline = NaN;
 +            else if (temp.length == 1)
 +                baseline = Number(temp[0]);
 +            else
 +            {
 +                baselineBoundary = temp[0];
 +                baseline = temp[1];
 +            }
 + 
 +            break;
 +        }
 +        
 +        //Store entries for the children who span columns/rows in
 +        //the colSpanChildren and rowSpanChildren arrays.
 +        var i:int;
 +        var colEntry:ContentColumnChild = new ContentColumnChild();
 +        var pushEntry:Boolean = false;
 +        var leftIndex:Number = 0;
 +        var rightIndex:Number = 0;
 +        var hcIndex:Number = 0;
 +        
 +        for (i = 0; i < IConstraintLayout(target).constraintColumns.length; i++)
 +        {
 +            var col:ConstraintColumn = IConstraintLayout(target).constraintColumns[i];
 + 			if (col.contentSize)
 +            {
 +                if (col.id == leftBoundary)
 +                {
 +                    colEntry.leftCol = col;
 +                    colEntry.leftOffset = left;
 +                    colEntry.left = leftIndex = i;
 +                    pushEntry = true;
 +                }
 +                if (col.id == rightBoundary)
 +                {
 +                    colEntry.rightCol = col;
 +                    colEntry.rightOffset = right;
 +                    colEntry.right = rightIndex = i + 1;
 +                    pushEntry = true;
 +                }
 +                if (col.id == hcBoundary)
 +                {
 +                    colEntry.hcCol = col;
 +                    colEntry.hcOffset = horizontalCenter;
 +                    colEntry.hc = hcIndex = i + 1;
 +                    pushEntry = true;
 +                }
 +            }
 +        }
 +        
 +        //Figure out the bounding columns, 
 +        //span value and the child spanning and push that 
 +        //information onto colSpanChildren for evaluation
 +        //when measuring content sized columns
 +        if (pushEntry)
 +        {
 +            colEntry.child = child;
 +            if (colEntry.leftCol && !colEntry.rightCol || 
 +                colEntry.rightCol && !colEntry.leftCol ||
 +                colEntry.hcCol)
 +                {
 +                    colEntry.span = 1;
 +                }
 +            else
 +                colEntry.span = rightIndex - leftIndex;
 +            
 +            //push the entry if it's not there already 
 +            var found:Boolean = false;
 +            for (i = 0; i < colSpanChildren.length; i++)
 +            {
 +                if (colEntry.child == colSpanChildren[i].child)
 +                {
 +                    found = true;
 +                    break;
 +                }       
 +            }
 +            
 +            if (!found)
 +                colSpanChildren.push(colEntry);
 +        }
 +        pushEntry = false;
 +        
 +        var rowEntry:ContentRowChild = new ContentRowChild();
 +        var topIndex:Number = 0;
 +        var bottomIndex:Number = 0;
 +        var vcIndex:Number = 0;
 +        var baselineIndex:Number = 0;
 +        for (i = 0; i < IConstraintLayout(target).constraintRows.length; i++)
 +        {
 +            var row:ConstraintRow = IConstraintLayout(target).constraintRows[i];
 +			if (row.contentSize)
 +            {
 +                if (row.id == topBoundary)
 +                {
 +                    rowEntry.topRow = row;
 +                    rowEntry.topOffset = top;
 +                    rowEntry.top = topIndex = i;
 +                    pushEntry = true;
 +                }
 +                if (row.id == bottomBoundary)
 +                {
 +                    rowEntry.bottomRow = row;
 +                    rowEntry.bottomOffset = bottom;
 +                    rowEntry.bottom = bottomIndex = i + 1;
 +                    pushEntry = true;
 +                }
 +                if (row.id == vcBoundary)
 +                {
 +                    rowEntry.vcRow = row;
 +                    rowEntry.vcOffset = verticalCenter;
 +                    rowEntry.vc = vcIndex = i + 1;
 +                    pushEntry = true;
 +                }
 +                if (row.id == baselineBoundary)
 +                {
 +                    rowEntry.baselineRow = row;
 +                    rowEntry.baselineOffset = baseline;
 +                    rowEntry.baseline = baselineIndex = i + 1;
 +                    pushEntry = true;
 +                }
 +            }
 +        }
 +        //Figure out the bounding rows, 
 +        //span value and the child spanning and push that 
 +        //information onto rowSpanChildren for evaluation
 +        //when measuring content sized rows
 +        if (pushEntry)
 +        {
 +            rowEntry.child = child;
 +            if (rowEntry.topRow && !rowEntry.bottomRow || 
 +                rowEntry.bottomRow && !rowEntry.topRow ||
 +                rowEntry.vcRow || rowEntry.baselineRow)
 +                {
 +                    rowEntry.span = 1;
 +                }
 +            else
 +                rowEntry.span = bottomIndex - topIndex;
 +                
 +            //push the entry if it's not there already 
 +            found = false;
 +            for (i = 0; i < rowSpanChildren.length; i++)
 +            {
 +                if (rowEntry.child == rowSpanChildren[i].child)
 +                {
 +                    found = true;
 +                    break;
 +                }
 +            }
 +            
 +            if (!found)
 +                rowSpanChildren.push(rowEntry);
 +        }
 +        //Cache constraint styles for future lookup
 +        var info:ChildConstraintInfo = new ChildConstraintInfo(left, right, horizontalCenter,
 +                                                top, bottom, verticalCenter, baseline, leftBoundary, 
 +                                                rightBoundary, hcBoundary, topBoundary, bottomBoundary, 
 +                                                vcBoundary, baselineBoundary); 
 +		COMPILE::LATER
 +		{
 +        constraintCache[child] = info;    
 +		}
 +        return info;
 +    }
 +
 +    /** 
 +     *  @private
 +     *  This function measures the ConstraintColumns and 
 +     *  and ConstraintRows partitioning a Canvas and sets
 +     *  up their x/y positions. 
 +     * 
 +     *  The algorithm works like this (in the horizontal 
 +     *  direction):
 +     *  1. Fixed columns honor their pixel values.
 +     * 
 +     *  2. Content sized columns whose children span
 +     *  only that column assume the width of the widest child. 
 +     * 
 +     *  3. Those Content sized columns that span multiple 
 +     *  columns do the following:
 +     *    a. Sort the children by order of how many columns they
 +     *    are spanning.
 +     *    b. For children spanning a single column, make each 
 +     *    column as wide as the preferred size of the child.
 +     *    c. For subsequent children, divide the remainder space
 +     *    equally between shared columns. 
 +     * 
 +     *  4. Remaining space is shared between the percentage size
 +     *  columns. 
 +     * 
 +     *  5. x positions are set based on the column widths
 +     * 
 +     */
 +    private function measureColumnsAndRows():void
 +    {
 +        var cols:Array = IConstraintLayout(target).constraintColumns;
 +        var rows:Array = IConstraintLayout(target).constraintRows;
 +        if (!rows.length > 0 && !cols.length > 0)
 +        {
 +            constraintRegionsInUse = false;
 +            return;
 +        }
 +        else
 +            constraintRegionsInUse = true;
 +        var i:int;
 +        var k:int;
 +        var canvasX:Number = 0;
 +        var canvasY:Number = 0;
 +        var vm:EdgeMetrics = Container(target).viewMetrics;
 +        var availableWidth:Number = Container(target).width - vm.left - vm.right;
 +        var availableHeight:Number = Container(target).height - vm.top - vm.bottom;
 +        var fixedSize:Array = [];
 +        var percentageSize:Array = [];
 +        var contentSize:Array = [];
 +        var cc:ConstraintColumn;
 +        var cr:ConstraintRow;
 +        var spaceToDistribute:Number;
 +        var w:Number;
 +        var h:Number;
 +        var remainingSpace:Number;
 +
 +        if (cols.length > 0)
 +        {
 +            for (i = 0; i < cols.length; i++)
 +            {
 +                cc = cols[i];
 +                if (!isNaN(cc.percentWidth))
 +                    percentageSize.push(cc);
 +				else if (!isNaN(cc.width) && !cc.contentSize)
 +                    fixedSize.push(cc);
 +                else 
 +                {
 +                    contentSize.push(cc);
 +					cc.contentSize = true;
 +                }
 +            }
 +            //fixed size columns 
 +            for (i = 0; i < fixedSize.length; i++)
 +            {
 +                cc = ConstraintColumn(fixedSize[i]);
 +                availableWidth = availableWidth - cc.width;
 +            }
 +            //content size columns
 +            if (contentSize.length > 0)
 +            {
 +                //first we figure allocate space to those columns
 +                //with children spanning them
 +                if (colSpanChildren.length > 0)
 +                {
 +                    colSpanChildren.sortOn("span");
 +                    for (k = 0; k < colSpanChildren.length; k++)
 +                    {
 +                        var colEntry:ContentColumnChild = colSpanChildren[k];
 +                        //For those children that span 1 column, give that column
 +                        //the max preferred width of the child;
 +                        if (colEntry.span == 1)
 +                        {   
 +                            //Match the columns
 +                            if (colEntry.hcCol)
 +                                cc = ConstraintColumn(cols[cols.indexOf(colEntry.hcCol)]);
 +                            else if (colEntry.leftCol)
 +                                cc = ConstraintColumn(cols[cols.indexOf(colEntry.leftCol)]);
 +                            else if (colEntry.rightCol)
 +                                cc = ConstraintColumn(cols[cols.indexOf(colEntry.rightCol)]);           
 +                            //Use preferred size if left and right are specified
 +                            w = colEntry.child.getExplicitOrMeasuredWidth();
 +                            //Now we add in offsets
 +                            if (colEntry.hcOffset)
 +                                w += colEntry.hcOffset;
 +                            else 
 +                            {
 +                                if (colEntry.leftOffset)
 +                                    w += colEntry.leftOffset;
 +                                if (colEntry.rightOffset)
 +                                    w += colEntry.rightOffset;
 +                            }
 +                            //width may have been set by a previous pass - so we want to take the max 
 +                            if (!isNaN(cc.width))
 +                                w = Math.max(cc.width, w);
 +                            w = bound(w, cc.minWidth, cc.maxWidth);
 +                            cc.setActualWidth(w);
 +                            availableWidth -= cc.width;
 +                        }
 +                        //otherwise we share space amongst the spanned columns
 +                        else
 +                        {
 +                            availableWidth = shareColumnSpace(colEntry, availableWidth);
 +                        }
 +                    }
 +                    //reset
 +                    colSpanChildren = [];
 +                }
 +                //now for those content size columns that don't have widths
 +                //give them their minWidth or 0. 
 +                for (i = 0; i < contentSize.length; i++)
 +                {
 +                    cc = contentSize[i];
 +                    if (!cc.width)
 +                    {
 +                        w = bound(0, cc.minWidth, 0);
 +                        cc.setActualWidth(w);
 +                    }
 +                }
 +            }
 +            //percentage size columns 
 +            remainingSpace = availableWidth;
 +            for (i = 0; i < percentageSize.length; i++)
 +            {
 +                cc = ConstraintColumn(percentageSize[i]);
 +                if (remainingSpace <= 0)
 +                    w = 0;
 +                else 
 +                    w = Math.round((remainingSpace * cc.percentWidth)/100);
 +                w = bound(w, cc.minWidth, cc.maxWidth);
 +                cc.setActualWidth(w);
 +                availableWidth -= w;
 +            }
 +
 +            //In the order they were declared, set up the x positions
 +            for (i = 0; i < cols.length; i++)
 +            {
 +                cc = ConstraintColumn(cols[i]);
 +                cc.x = canvasX;
 +                canvasX += cc.width;
 +            }
 +        }
 +        
 +        fixedSize = [];
 +        percentageSize = [];
 +        contentSize = [];
 +        if (rows.length > 0)
 +        {
 +            for (i = 0; i < rows.length; i++)
 +            {
 +                cr = rows[i];
 +                if (!isNaN(cr.percentHeight))
 +                {
 +                    percentageSize.push(cr);
 +                }
 +				else if (!isNaN(cr.height) && !cr.contentSize)
 +                    fixedSize.push(cr);
 +                else
 +                {
 +                    contentSize.push(cr);
 +					cr.contentSize = true;
 +                }
 +            }
 +            //fixed size rows 
 +            for (i = 0; i < fixedSize.length; i++)
 +            {
 +                cr = ConstraintRow(fixedSize[i]);
 +                availableHeight = availableHeight - cr.height;
 +            }
 +            //content size rows
 +            if (contentSize.length > 0)
 +            {
 +                //first we figure allocate space to those rows
 +                //with children spanning them
 +                if (rowSpanChildren.length > 0)
 +                {
 +                    rowSpanChildren.sortOn("span");
 +                    for (k = 0; k < rowSpanChildren.length; k++)
 +                    {
 +                        var rowEntry:ContentRowChild = rowSpanChildren[k];
 +                        //For those children that span 1 row, give that row
 +                        //the max preferred height of the child;
 +                        if (rowEntry.span == 1)
 +                        {
 +                            //Match the rows
 +                            if (rowEntry.vcRow)
 +                                cr = ConstraintRow(rows[rows.indexOf(rowEntry.vcRow)]);
 +                            else if (rowEntry.baselineRow)
 +                                cr = ConstraintRow(rows[rows.indexOf(rowEntry.baselineRow)]);
 +                            else if (rowEntry.topRow)
 +                                cr = ConstraintRow(rows[rows.indexOf(rowEntry.topRow)]);
 +                            else if (rowEntry.bottomRow)
 +                                cr = ConstraintRow(rows[rows.indexOf(rowEntry.bottomRow)]);
 +                            //Use preferred size if both top and bottom are specified
 +                            h = rowEntry.child.getExplicitOrMeasuredHeight();
 +                            //Now we add in offsets
 +                            if (rowEntry.baselineOffset)
 +                                h += rowEntry.baselineOffset;
 +                            else if (rowEntry.vcOffset)
 +                                h += rowEntry.vcOffset;
 +                            else 
 +                            {
 +                                if (rowEntry.topOffset)
 +                                    h += rowEntry.topOffset;
 +                                if (rowEntry.bottomOffset)
 +                                    h += rowEntry.bottomOffset;
 +                            }
 +                            //height may have been set by a previous pass - so we want to take the max 
 +                            if (!isNaN(cr.height))
 +                                h = Math.max(cr.height, h);
 +                            h = bound(h, cr.minHeight, cr.maxHeight);
 +                            cr.setActualHeight(h);
 +                            availableHeight -= cr.height;
 +                        }
 +                        //otherwise we share space amongst the spanned rows
 +                        else
 +                        {
 +                            availableHeight = shareRowSpace(rowEntry, availableHeight);
 +                        }
 +                    }
 +                    //reset
 +                    rowSpanChildren = [];
 +                }
 +                //now for those content size rows that don't have heights
 +                //give them their minHeight or 0. 
 +                for (i = 0; i < contentSize.length; i++)
 +                {
 +                    cr = ConstraintRow(contentSize[i]);
 +                    if (!cr.height)
 +                    {
 +                        h = bound(0, cr.minHeight, 0);
 +                        cr.setActualHeight(h);
 +                    }
 +                }
 +            }
 +            //percentage size rows 
 +            remainingSpace = availableHeight;
 +            for (i = 0; i < percentageSize.length; i++)
 +            {
 +                cr = ConstraintRow(percentageSize[i]);
 +                if (remainingSpace <= 0)
 +                    h = 0;
 +                else 
 +                    h = Math.round((remainingSpace * cr.percentHeight)/100);
 +                h = bound(h, cr.minHeight, cr.maxHeight);
 +                cr.setActualHeight(h);
 +                availableHeight -= h;
 +            }
 +            //In the order they were declared, set up the y positions
 +            for (i = 0; i < rows.length; i++)
 +            {
 +                cr = rows[i];
 +                cr.y = canvasY;
 +                canvasY += cr.height;
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Shares available space between content-size columns that have content
 +     *  spanning them.
 +     */
 +    private function shareColumnSpace(entry:ContentColumnChild, availableWidth:Number):Number
 +    {
 +        var leftCol:ConstraintColumn = entry.leftCol;
 +        var rightCol:ConstraintColumn = entry.rightCol;
 +        var child:IUIComponent = entry.child;
 +        var leftWidth:Number = 0;
 +        var rightWidth:Number = 0;
 +        var right:Number = entry.rightOffset ? entry.rightOffset : 0;
 +        var left:Number = entry.leftOffset ? entry.leftOffset : 0;
 +        
 +        if (leftCol && leftCol.width)
 +            leftWidth += leftCol.width;
 +        else if (rightCol && !leftCol)
 +        {
 +            leftCol = IConstraintLayout(target).constraintColumns[entry.right - 2];
 +            if (leftCol && leftCol.width)
 +                leftWidth += leftCol.width;
 +        }
 +        if (rightCol && rightCol.width)
 +            rightWidth += rightCol.width;
 +        else if (leftCol && !rightCol)
 +        {
 +            rightCol = IConstraintLayout(target).constraintColumns[entry.left + 1];
 +            if (rightCol && rightCol.width)
 +                rightWidth += rightCol.width;
 +        }
 +
 +        if (leftCol && isNaN(leftCol.width))
 +        {
 +            leftCol.setActualWidth(Math.max(0, leftCol.maxWidth));
 +        }
 +        if (rightCol && isNaN(rightCol.width))
 +        {
 +            rightCol.setActualWidth(Math.max(0, rightCol.maxWidth));
 +        }   
 +
 +        var childWidth:Number = child.getExplicitOrMeasuredWidth();
 +        if (childWidth)
 +        {
 +            var tempLeftWidth:Number;
 +            var tempRightWidth:Number;
 +            if (!entry.leftCol)
 +            {
 +                if (childWidth > leftWidth)
 +                    tempRightWidth = childWidth - leftWidth + right;
 +                else
 +                    tempRightWidth = childWidth + right;
 +            }
 +            if (!entry.rightCol)
 +            {
 +                if (childWidth > rightWidth)
 +                    tempLeftWidth = childWidth - rightWidth + left;
 +                else
 +                    tempLeftWidth = childWidth + left;
 +            }
 +            if (entry.leftCol && entry.rightCol)
 +            {
 +                var share:Number = childWidth/Number(entry.span);
 +                if ((share + left) < leftWidth)
 +                {
 +                    tempLeftWidth = leftWidth;
 +                    tempRightWidth = (childWidth - (leftWidth - left)) + right;
 +                }
 +                else 
 +                    tempLeftWidth = share + left;
 +                if ((share + right) < rightWidth)
 +                {
 +                    tempRightWidth = rightWidth;
 +                    tempLeftWidth = (childWidth - (rightWidth - right)) + left;
 +                }
 +                else
 +                    tempRightWidth = share + right;
 +            }   
 +            //set the left
 +            tempLeftWidth = bound(tempLeftWidth, leftCol.minWidth, leftCol.maxWidth);
 +            leftCol.setActualWidth(tempLeftWidth);
 +            availableWidth -= tempLeftWidth;
 +            //set the right
 +            tempRightWidth = bound(tempRightWidth, rightCol.minWidth, rightCol.maxWidth);
 +            rightCol.setActualWidth(tempRightWidth);
 +            availableWidth -= tempRightWidth;
 +        }
 +        return availableWidth;
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Shares available space between content-size rows that have content
 +     *  spanning them.
 +     */
 +    private function shareRowSpace(entry:ContentRowChild, availableHeight:Number):Number
 +    {
 +        var topRow:ConstraintRow = entry.topRow;
 +        var bottomRow:ConstraintRow = entry.bottomRow;
 +        var child:IUIComponent = entry.child;
 +        var topHeight:Number = 0;
 +        var bottomHeight:Number = 0;
 +        var top:Number = entry.topOffset ? entry.topOffset : 0;
 +        var bottom:Number = entry.bottomOffset ? entry.bottomOffset : 0;
 +        
 +        if (topRow && topRow.height)
 +            topHeight += topRow.height;
 +        else if (bottomRow && !topRow)
 +        {
 +            topRow = IConstraintLayout(target).constraintRows[entry.bottom - 2];
 +            if (topRow && topRow.height)
 +                topHeight += topRow.height;
 +        }
 +        if (bottomRow && bottomRow.height)
 +            bottomHeight += bottomRow.height;
 +        else if (topRow && !bottomRow)
 +        {
 +            bottomRow = IConstraintLayout(target).constraintRows[entry.top + 1];
 +            if (bottomRow && bottomRow.height)
 +                bottomHeight += bottomRow.height;
 +        }
 +        if (topRow && isNaN(topRow.height))
 +        {
 +            topRow.setActualHeight(Math.max(0, topRow.maxHeight));
 +        }
 +        if (bottomRow && isNaN(bottomRow.height))
 +        {
 +            bottomRow.setActualHeight(Math.max(0, bottomRow.height));   
 +        }
 +
 +        var childHeight:Number = child.getExplicitOrMeasuredHeight();
 +        if (childHeight)
 +        {
 +            var tempTopHeight:Number;
 +            var tempBtmHeight:Number;
 +            if (!entry.topRow)
 +            {
 +                if (childHeight > topHeight)
 +                    tempBtmHeight = childHeight - topHeight + bottom;
 +                else
 +                    tempBtmHeight = childHeight + bottom;
 +            }
 +            if (!entry.bottomRow)
 +            {
 +                if (childHeight > bottomHeight)
 +                    tempTopHeight = childHeight - bottomHeight + top;
 +                else
 +                    tempTopHeight = childHeight + top;
 +            }
 +            if (entry.topRow && entry.bottomRow)
 +            {
 +                var share:Number = childHeight/Number(entry.span);
 +                if ((share + top) < topHeight)
 +                {
 +                    tempTopHeight = topHeight;
 +                    tempBtmHeight = (childHeight - (topHeight - top)) + bottom;
 +                }
 +                else 
 +                    tempTopHeight = share + top;
 +                if ((share + bottom) < bottomHeight)
 +                {
 +                    tempBtmHeight = bottomHeight;
 +                    tempTopHeight = (childHeight - (bottomHeight - bottom)) + top;
 +                }
 +                else 
 +                    tempBtmHeight = share + bottom;
 +            }   
 +            //set the bottom
 +            tempBtmHeight = bound(tempBtmHeight, bottomRow.minHeight, bottomRow.maxHeight);
 +            bottomRow.setActualHeight(tempBtmHeight);
 +            availableHeight -= tempBtmHeight;
 +            //set the top 
 +            tempTopHeight = bound(tempTopHeight, topRow.minHeight, topRow.maxHeight);
 +            topRow.setActualHeight(tempTopHeight);
 +            availableHeight -= tempTopHeight;
 +        }
 +        return availableHeight;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Collect all the layout constraints for this child and package
 +     *  into a LayoutConstraints object.
 +     *  Returns null if the child is not an IConstraintClient.
 +     */
 +    private function getLayoutConstraints(child:IUIComponent):LayoutConstraints
 +    {
 +        var constraintChild:IConstraintClient = child as IConstraintClient;
 +        
 +        if (!constraintChild)
 +            return null;
 +            
 +        var constraints:LayoutConstraints = new LayoutConstraints();
 +        
 +        constraints.baseline = constraintChild.getConstraintValue("baseline");
 +        constraints.bottom = constraintChild.getConstraintValue("bottom");
 +        constraints.horizontalCenter = constraintChild.getConstraintValue("horizontalCenter");
 +        constraints.left = constraintChild.getConstraintValue("left");
 +        constraints.right = constraintChild.getConstraintValue("right");
 +        constraints.top = constraintChild.getConstraintValue("top");
 +        constraints.verticalCenter = constraintChild.getConstraintValue("verticalCenter");
 +        
 +        return constraints;
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Parses a constraint expression, like left="col1:10" 
 +     *  so that an array is returned where the first value is
 +     *  the boundary (ie: "col1") and the second value is 
 +     *  the offset (ie: 10)
 +     */
 +    private function parseConstraintExp(val:String):Array
 +    {
 +        if (!val)
 +            return null;
 +        // Replace colons with spaces
 +        var temp:String = val.replace(/:/g, " ");
 +        
 +        // Split the string into an array 
 +        var args:Array = temp.split(/\s+/);
 +        return args;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  If a child has been added, listen for its move event.
 +     */
 +    private function target_childAddHandler(
 +                                event:ChildExistenceChangedEvent):void
 +    {
 +        DisplayObject(event.relatedObject).addEventListener(
 +            MoveEvent.MOVE, child_moveHandler);
 +    }
 +
 +    /**
 +     *  @private
 +     *  If a child has been removed, stop listening for its move event.
 +     */
 +    private function target_childRemoveHandler(
 +                                event:ChildExistenceChangedEvent):void
 +    {
 +        DisplayObject(event.relatedObject).removeEventListener(
 +            MoveEvent.MOVE, child_moveHandler);
 +            
 +		COMPILE::LATER
 +		{
 +        //delete this child from the constraint cache if it exists
 +        delete constraintCache[event.relatedObject]; 
 +		}
 +    }
 +
 +    /**
 +     *  @private
 +     *  If a child's position has changed, then the measured preferred
 +     *  size of this canvas may have changed.
 +     */
 +    private function child_moveHandler(event:MoveEvent):void
 +    {
 +        if (event.target is IUIComponent)
 +            if (!(IUIComponent(event.target).includeInLayout))
 +                return;
 +
 +        var target:Container = super.target;
 +        if (target)
 +        {
 +            target.invalidateSize();
 +            target.invalidateDisplayList();
 +            _contentArea = null;
 +        }
 +    }
 +}
 +}
 +
 +import mx.containers.utilityClasses.ConstraintColumn;
 +import mx.core.IUIComponent;
 +import mx.containers.utilityClasses.ConstraintRow;
 +    
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: ChildConstraintInfo
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +class ChildConstraintInfo
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    public function ChildConstraintInfo(
 +        left:Number, right:Number, hc:Number,
 +        top:Number, bottom:Number, vc:Number,
 +        baseline:Number, leftBoundary:String = null,
 +        rightBoundary:String = null, hcBoundary:String = null,
 +        topBoundary:String = null, bottomBoundary:String = null,
 +        vcBoundary:String = null, baselineBoundary:String = null):void
 +    {
 +        super();
 +        
 +        // offsets
 +        this.left = left;
 +        this.right = right;
 +        this.hc = hc;
 +        this.top = top;
 +        this.bottom = bottom;
 +        this.vc = vc;
 +        this.baseline = baseline;
 +        
 +        // boundaries (ie: parent, column or row edge)
 +        this.leftBoundary = leftBoundary;
 +        this.rightBoundary = rightBoundary;
 +        this.hcBoundary = hcBoundary;
 +        this.topBoundary = topBoundary;
 +        this.bottomBoundary = bottomBoundary;
 +        this.vcBoundary = vcBoundary;
 +        this.baselineBoundary = baselineBoundary;
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    public var left:Number;
 +    public var right:Number;
 +    public var hc:Number;
 +    public var top:Number;
 +    public var bottom:Number;
 +    public var vc:Number;
 +    public var baseline:Number;
 +    public var leftBoundary:String;
 +    public var rightBoundary:String;
 +    public var hcBoundary:String;
 +    public var topBoundary:String;
 +    public var bottomBoundary:String;
 +    public var vcBoundary:String;
 +    public var baselineBoundary:String;
 +    
 +}
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: ContentColumnChild
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +class ContentColumnChild
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    public function ContentColumnChild():void
 +    {
 +        super();
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    public var leftCol:ConstraintColumn;
 +    public var leftOffset:Number;
 +    public var left:Number;
 +    public var rightCol:ConstraintColumn;
 +    public var rightOffset:Number;
 +    public var right:Number;
 +    public var hcCol:ConstraintColumn;
 +    public var hcOffset:Number;
 +    public var hc:Number;
 +    public var child:IUIComponent;
 +    public var span:Number;
 +}
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: ContentRowChild
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +class ContentRowChild
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    public function ContentRowChild():void
 +    {
 +        super();
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    public var topRow:ConstraintRow;
 +    public var topOffset:Number;
 +    public var top:Number;
 +    public var bottomRow:ConstraintRow;
 +    public var bottomOffset:Number;
 +    public var bottom:Number;
 +    public var vcRow:ConstraintRow;
 +    public var vcOffset:Number;
 +    public var vc:Number;
 +    public var baselineRow:ConstraintRow;
 +    public var baselineOffset:Number;
 +    public var baseline:Number;
 +    public var child:IUIComponent;
 +    public var span:Number;
 +    
 +}
 +
 +    
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: LayoutConstraints
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +class LayoutConstraints
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    public function LayoutConstraints():void
 +    {
 +        super();
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    public var baseline:*;
 +    public var bottom:*;
 +    public var horizontalCenter:*;
 +    public var left:*;
 +    public var right:*;
 +    public var top:*;
 +    public var verticalCenter:*;
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintColumn.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintColumn.as
index 0ffaf26,0000000..b0229b4
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintColumn.as
+++ b/frameworks/projects/MX/src/main/flex/mx/containers/utilityClasses/ConstraintColumn.as
@@@ -1,471 -1,0 +1,471 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.containers.utilityClasses
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.events.Event;
 +import flash.events.EventDispatcher;
 +}
 +COMPILE::JS
 +{
 +import org.apache.flex.events.Event;
 +import org.apache.flex.events.EventDispatcher;
 +}
 +import mx.core.IInvalidating;
 +import mx.core.mx_internal;
 +import mx.core.IMXMLObject;
 +
 +use namespace mx_internal;
 +
 +//--------------------------------------
 +//  Excluded APIs
 +//--------------------------------------
 +[Exclude(name="container", kind="property")]
 +
 +/**
 + *  The ConstraintColumn class partitions an absolutely
 + *  positioned container in the vertical plane. 
 + * 
 + *  ConstraintColumn instances have 3 sizing options: fixed, percentage, and 
 + *  content. These options dictate the position of the 
 + *  constraint column, the amount of space the constraint column 
 + *  takes in the container, and how the constraint column deals with 
 + *  changes in the size of the container. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ConstraintColumn extends EventDispatcher implements IMXMLObject
 +{
 +	include "../../core/Version.as";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +  
 +	/**
 +	 *  Constructor.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function ConstraintColumn()
 +	{
 +		super();
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Variables
 +	//
 +	//--------------------------------------------------------------------------
 +	mx_internal var contentSize:Boolean = false;
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +    
 +    //----------------------------------
 +    //  container
 +    //----------------------------------
 +    /**
 +     *  @private
 +     */
 +    private var _container:IInvalidating;
 +
 +    /**
 +     *  The container which this ConstraintColumn instance is 
 +     *  partitioning. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get container():IInvalidating
 +    {
 +        return _container;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set container(value:IInvalidating):void
 +    {
 +        _container = value;
 +    }
 +    
 +    //----------------------------------
 +    //  id
 +    //----------------------------------
 +    /**
 +     *  @private
 +     */
 +    private var _id:String;
 +
 +    /**
 +     *  ID of the ConstraintColumn instance. This value becomes the instance name of the
 +     *  ConstraintColumn instance and should not contain white space or special characters. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get id():String
 +    {
 +        return _id;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set id(value:String):void
 +    {
 +        _id = value;
 +    }
 +    
 +    //----------------------------------
 +    //  maxWidth
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the maxWidth property.
 +     */
 +    private var _explicitMaxWidth:Number;
 +	[Bindable("maxWidthChanged")]
 +    [Inspectable(category="Size", defaultValue="10000")]
 +
 +    /**
 +     *  Number that specifies the maximum width of the ConstraintColumn 
 +     *  instance, in pixels, in the ConstraintColumn instance's coordinates.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get maxWidth():Number
 +    {
 +        // Since ConstraintColumn doesn't have a measuredMaxWidth, we explictly return
 +        // the default value of 10000 when no maxWidth is set.
 +        return (!isNaN(_explicitMaxWidth)) ? _explicitMaxWidth : 10000;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set maxWidth(value:Number):void
 +    {
 +    	if (_explicitMaxWidth != value)
 +    	{
 +            _explicitMaxWidth = value;
 +			if (container)
 +			{
 +				container.invalidateSize();
 +				container.invalidateDisplayList();
 +			}
 +			dispatchEvent(new Event("maxWidthChanged"));
 +    	}
 +    }
 +    
 +    //----------------------------------
 +    //  minWidth
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the minWidth property.
 +     */
 +    private var _explicitMinWidth:Number;
 +	[Bindable("minWidthChanged")]
 +    [Inspectable(category="Size", defaultValue="0")]
 +    
 +    /**
 +     *  Number that specifies the minimum width of the ConstraintColumn instance,
 +     *  in pixels, in the ConstraintColumn instance's coordinates.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get minWidth():Number
 +    {
 +        // Since ConstraintColumn doesn't have a measuredMinWidth, we explictly return
 +        // the default value of 0 when no minWidth is set.
 +        return (!isNaN(_explicitMinWidth)) ? _explicitMinWidth : 0;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set minWidth(value:Number):void
 +    {
 +    	if (_explicitMinWidth != value)
 +    	{
 +            _explicitMinWidth = value;
 +			if (container)
 +    		{
 +    			container.invalidateSize();
 +   				container.invalidateDisplayList();
 +   			}
 +        	dispatchEvent(new Event("minWidthChanged"));
 +     	}
 +    }
 +    
 +    //----------------------------------
 +    //  width
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the width property.
 +     */
 +	mx_internal var _width:Number;
 +	[Bindable("widthChanged")]
 +    [Inspectable(category="General")]
 +    [PercentProxy("percentWidth")]
 +
 +    /**
 +     *  Number that specifies the width of the ConstraintColumn instance, in pixels,
 +     *  in the parent container's coordinates.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get width():Number
 +    {
 +        return _width;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set width(value:Number):void
 +    {
 +    	if (explicitWidth != value)
 +    	{
 +    		explicitWidth = value;
 +    		if (_width != value)
 +    		{
 +    			_width = value;
 +                if (!isNaN(_width))
 +                    contentSize = false;
 +    			if (container)
 +    			{
 +    				container.invalidateSize();
 +    				container.invalidateDisplayList();
 +    			}
 +    			dispatchEvent(new Event("widthChanged"));
 +    		}
 +    	}
 +    }
 +    
 +    //----------------------------------
 +    //  explicitWidth
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the explicitWidth property.
 +     */
 +    
 +    private var _explicitWidth:Number;
 +    [Inspectable(environment="none")]
 +    [Bindable("explicitWidthChanged")]
 +    
 +    /**
 +     *  Number that specifies the explicit width of the ConstraintColumn instance, 
 +     *  in pixels, in the ConstraintColumn instance's coordinates.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get explicitWidth():Number
 +    {
 +    	return _explicitWidth;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set explicitWidth(value:Number):void
 +    {
 +    	if (_explicitWidth == value)
 +            return;
 +
 +        // width can be pixel or percent not both
 +        if (!isNaN(value))
 +            _percentWidth = NaN;
 +
 +        _explicitWidth = value;
 +        
 +        if (container)
 +        {
 +        	container.invalidateSize();
 +        	container.invalidateDisplayList();
 +        }
 +        
 +        dispatchEvent(new Event("explicitWidthChanged"));
 +    }
 +    
 +    //----------------------------------
 +    //  percentWidth
 +    //----------------------------------
 +    /**
 +     *  @private
 +     *  Storage for the percentWidth property.
 +     */
 +    private var _percentWidth:Number;
 +    [Bindable("percentWidthChanged")]
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  Number that specifies the width of a component as a percentage of its 
 +     *  parent container's size. Allowed values are 0-100. The default value is NaN.
 +     *  Setting the <code>width</code> property resets this property to NaN.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get percentWidth():Number
 +    {
 +        return _percentWidth;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set percentWidth(value:Number):void
 +    {
 +		if (_percentWidth == value)
 +            return;
 +
 +        if (!isNaN(value))
 +            _explicitWidth = NaN;
 +
 +        _percentWidth = value;
 +        if (!isNaN(_percentWidth))
 +            contentSize = false;
 +        
 +        if (container)
 +        {
 +        	container.invalidateSize();
 +        	container.invalidateDisplayList();
 +        }   
 +        
 +        dispatchEvent(new Event("percentWidthChanged"));
 +    }
 +    
 +    //----------------------------------
 +    //  x
 +    //----------------------------------
 +	private var _x:Number;
 +	[Bindable("xChanged")]
 +
 +	/**
 +	 *  @private
 +     */
 +    public function get x():Number
 +    {
 +        return _x;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set x(value:Number):void
 +    {
 +        if (value != _x)
 +        {
 +        	_x = value;
 +        	dispatchEvent(new Event("xChanged"));
 +        }
 +    }
 + 
 + 	//--------------------------------------------------------------------------
 +    //
 +    //  Methods: IMXMLObject
 +    //
 +    //--------------------------------------------------------------------------
 + 
 + 	/**
 +      *  Called automatically by the MXML compiler when the ConstraintColumn
 +      *  instance is created using an MXML tag.  
 +      *  If you create the ConstraintColumn instance through ActionScript, you 
 +      *  must call this method passing in the MXML document and 
 +      *  <code>null</code> for the <code>id</code>.
 +      *
 +      *  @param document The MXML document containing this ConstraintColumn.
 +      *
 +      *  @param id Ignored.
 +      *  
 +      *  @langversion 3.0
 +      *  @playerversion Flash 9
 +      *  @playerversion AIR 1.1
 +      *  @productversion Flex 3
 +      */
 +	public function initialized(document:Object, id:String):void
 +    {
 +		this.id = id;
 +		if (!this.width && !this.percentWidth)
 +			contentSize = true;
 +    }
 +    
 +	/**
 +	 *  Sizes the constraint column.
 +	 *
 +	 *  @param width Width of constaint column computed during parent container
 +	 *  processing.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +    public function setActualWidth(w:Number):void
 +    {
 +        if (_width != w)
 +        {
 +            _width = w;
 +            dispatchEvent(new Event("widthChanged"));
 +        }
 +    }
 +    
 +}
 +
 +}


[48/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/text/TextField.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/text/TextField.as
index 92f27c8,0000000..80f88ff
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/text/TextField.as
+++ b/frameworks/projects/MX/src/main/flex/flex/text/TextField.as
@@@ -1,621 -1,0 +1,621 @@@
 +package flex.text
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.text.TextField;		
 +}
 +COMPILE::JS
 +{
 +	import mx.core.IFlexModuleFactory;
 +	import mx.core.IUITextField;
 +	import mx.core.UITextFormat;
 +	import mx.managers.ISystemManager;
 +	
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;
 +	import flex.display.Sprite;
 +	import flex.display.TopOfDisplayList;
 +	
 +	import org.apache.flex.geom.Rectangle;
 +	import org.apache.flex.html.Label;
 +}
 +
- COMPILE::AS3
++COMPILE::SWF
 +public class TextField extends flash.text.TextField
 +{
 +	public function TextField()
 +	{
 +		super();
 +	}
 +}
 +
 +COMPILE::JS
 +public class TextField extends Label
 +{
 +
 +	private var _alwaysShowSelection:Boolean;
 +	public function get alwaysShowSelection():Boolean
 +	{
 +		return _alwaysShowSelection;
 +	}
 +	public function set alwaysShowSelection(value:Boolean):void
 +	{
 +		_alwaysShowSelection = value;
 +		trace("TextField.alwaysShowSelection not implemented");
 +	}
 +	
 +	private var _antiAliasType:String;
 +	public function get antiAliasType():String
 +	{
 +		trace("TextField.antiAliasType not implemented");
 +		return _antiAliasType;
 +	}
 +	public function set antiAliasType(value:String):void
 +	{
 +		_antiAliasType = value;
 +		trace("TextField.antiAliasType not implemented");
 +	}
 +
 +	private var _autoSize:String;
 +	public function get autoSize():String
 +	{
 +		trace("TextField.autoSize not implemented");
 +		return _autoSize;
 +	}
 +	public function set autoSize(value:String):void
 +	{
 +		_autoSize = value;
 +		trace("TextField.autoSize not implemented");
 +	}
 +
 +	private var _background:Boolean;
 +	public function get background():Boolean
 +	{
 +		return _background;
 +	}
 +	public function set background(value:Boolean):void
 +	{
 +		_background = value;
 +		if (!value)
 +			element.style.backgroundColor = undefined;
 +		else
 +			element.style.backgroundColor = "#" + _backgroundColor.toString(16);
 +	}
 +	
 +	private var _backgroundColor:uint;
 +	public function get backgroundColor():uint
 +	{
 +		return _backgroundColor;
 +	}
 +	public function set backgroundColor(value:uint):void
 +	{
 +		_backgroundColor = value;
 +		if (_background)
 +			element.style.backgroundColor = "#" + _backgroundColor.toString(16);
 +	}
 +
 +	private var _border:Boolean;
 +	public function get border():Boolean
 +	{
 +		return _border;
 +	}
 +	public function set border(value:Boolean):void
 +	{
 +		_border = value;
 +		if (!value)
 +			element.style.border = "1px none";
 +		else
 +			element.style.border = "1px solid";
 +	}
 +	
 +	private var _borderColor:uint;
 +	public function get borderColor():uint
 +	{
 +		return _borderColor;
 +	}
 +	public function set borderColor(value:uint):void
 +	{
 +		_borderColor = value;
 +		if (_border)
 +			element.style.borderColor = "#" + _borderColor.toString(16);
 +	}
 +	
 +	public function get bottomScrollV():int
 +	{
 +		trace("TextField.bottomScrollV not implemented");
 +		return 0;
 +	}
 +	
 +	public function get caretIndex():int
 +	{
 +		trace("TextField.caretIndex not implemented");
 +		return 0;
 +	}
 +	
 +	private var _condenseWhite:Boolean;
 +	public function get condenseWhite():Boolean
 +	{
 +		trace("TextField.condenseWhite not implemented");
 +		return _condenseWhite;
 +	}
 +	public function set condenseWhite(value:Boolean):void
 +	{
 +		_condenseWhite = value;
 +		trace("TextField.condenseWhite not implemented");
 +	}
 +
 +	private var _defaultTextFormat:TextFormat;
 +	public function get defaultTextFormat():TextFormat
 +	{
 +		trace("TextField.defaultTextFormat not implemented");
 +		return _defaultTextFormat;
 +	}
 +	public function set defaultTextFormat(value:TextFormat):void
 +	{
 +		_defaultTextFormat = value;
 +		trace("TextField.defaultTextFormat not implemented");
 +	}
 +	
 +	private var _displayAsPassword:Boolean;
 +	public function get displayAsPassword():Boolean
 +	{
 +		return _displayAsPassword;
 +	}
 +	/**
 +	 * @flexjsignorecoercion HTMLInputElement
 +	 */
 +	public function set displayAsPassword(value:Boolean):void
 +	{
 +		_displayAsPassword = value;
 +		if (value)
 +			(element as HTMLInputElement).type = "password";
 +		else
 +			(element as HTMLInputElement).type = "input";
 +	}
 +
 +	private var _doubleClickEnabled:Boolean;
 +	public function get doubleClickEnabled():Boolean
 +	{
 +		trace("TextField.doubleClickEnabled not implemented");
 +		return _doubleClickEnabled;
 +	}
 +	public function set doubleClickEnabled(value:Boolean):void
 +	{
 +		_doubleClickEnabled = value;
 +		trace("TextField.doubleClickEnabled not implemented");
 +	}
 +	
 +	private var _embedFonts:Boolean;
 +	public function get embedFonts():Boolean
 +	{
 +		trace("TextField.embedFonts not implemented");
 +		return _embedFonts;
 +	}
 +	public function set embedFonts(value:Boolean):void
 +	{
 +		_embedFonts = value;
 +		trace("TextField.embedFonts not implemented");
 +	}
 +	
 +	private var _focusRect:Object;
 +	public function get focusRect():Object
 +	{
 +		trace("TextField.focusRect not implemented");
 +		return _focusRect;
 +	}
 +	public function set focusRect(value:Object):void
 +	{
 +		_focusRect = value;
 +		trace("TextField.focusRect not implemented");
 +	}
 +
 +	private var _gridFitType:String;
 +	public function get gridFitType():String
 +	{
 +		trace("TextField.gridFitType not implemented");
 +		return _gridFitType;
 +	}
 +	public function set gridFitType(value:String):void
 +	{
 +		_gridFitType = value;
 +		trace("TextField.gridFitType not implemented");
 +	}
 +	
 +	private var _htmlText:String;
 +	public function get htmlText():String
 +	{
 +		return _htmlText;
 +	}
 +	public function set htmlText(value:String):void
 +	{
 +		element.innerHTML = _htmlText = value;
 +	}
 +	
 +	public function get length():int
 +	{
 +		return element.innerText.length;
 +	}
 +	
 +	private var _maxChars:int;
 +	public function get maxChars():int
 +	{
 +		return _maxChars;
 +	}
 +	public function set maxChars(value:int):void
 +	{
 +		_maxChars = value;
 +		(element as HTMLInputElement).maxLength = value;
 +	}
 +	
 +	public function get maxScrollH():int
 +	{
 +		trace("TextField.maxScrollH not implemented");
 +		return 0;
 +	}
 +	
 +	public function get maxScrollV():int
 +	{
 +		trace("TextField.maxScrollV not implemented");
 +		return 0;
 +	}
 +	
 +	private var _mouseEnabled:Boolean;
 +	public function get mouseEnabled():Boolean
 +	{
 +		trace("TextField.mouseEnabled not implemented");
 +		return _mouseEnabled;
 +	}
 +	public function set mouseEnabled(value:Boolean):void
 +	{
 +		_mouseEnabled = value;
 +		trace("TextField.mouseEnabled not implemented");
 +	}
 +		
 +	private var _mouseWheelEnabled:Boolean;
 +	public function get mouseWheelEnabled():Boolean
 +	{
 +		trace("TextField.mouseWheelEnabled not implemented");
 +		return _mouseWheelEnabled;
 +	}
 +	public function set mouseWheelEnabled(value:Boolean):void
 +	{
 +		_mouseWheelEnabled = value;
 +		trace("TextField.mouseWheelEnabled not implemented");
 +	}
 +	
 +	public function get mouseX():Number
 +	{
 +		trace("TextField.mouseX not implemented");
 +		return 0;
 +	}
 +	
 +	public function get mouseY():Number
 +	{
 +		trace("TextField.mouseY not implemented");
 +		return 0;
 +	}
 +	
 +	private var _multiline:Boolean;
 +	public function get multiline():Boolean
 +	{
 +		trace("TextField.multiline not implemented");
 +		return _multiline;
 +	}
 +	public function set multiline(value:Boolean):void
 +	{
 +		_multiline = value;
 +		trace("TextField.multiline not implemented");
 +	}
 +	
 +	private var _name:String;
 +	public function get name():String
 +	{
 +		return _name;
 +	}
 +	public function set name(value:String):void
 +	{
 +		_name = value;
 +		element.id = name;
 +	}
 +	
 +	public function get numLines():int
 +	{
 +		trace("TextField.numLines not implemented");
 +		return -1;
 +	}
 +	
 +	private var _restrict:String;
 +	public function get restrict():String
 +	{
 +		trace("TextField.restrict not implemented");
 +		return _restrict;
 +	}
 +	public function set restrict(value:String):void
 +	{
 +		_restrict = value;
 +		trace("TextField.restrict not implemented");
 +	}
 +	
 +	private var _scrollH:int;
 +	public function get scrollH():int
 +	{
 +		trace("TextField.scrollH not implemented");
 +		return _scrollH;
 +	}
 +	public function set scrollH(value:int):void
 +	{
 +		_scrollH = value;
 +		trace("TextField.scrollH not implemented");
 +	}
 +	
 +	private var _scrollV:int;
 +	public function get scrollV():int
 +	{
 +		trace("TextField.scrollV not implemented");
 +		return _scrollV;
 +	}
 +	public function set scrollV(value:int):void
 +	{
 +		_scrollV = value;
 +		trace("TextField.scrollV not implemented");
 +	}
 +	
 +	public function get root():DisplayObject
 +	{
 +		trace("TextField.root not implemented");
 +		return null;
 +	}
 +	
 +	private var _selectable:Boolean;
 +	public function get selectable():Boolean
 +	{
 +		trace("TextField.selectable not implemented");
 +		return _selectable;
 +	}
 +	public function set selectable(value:Boolean):void
 +	{
 +		_selectable = value;
 +		trace("TextField.selectable not implemented");
 +	}
 +	
 +	public function get selectionBeginIndex():int
 +	{
 +		trace("TextField.selectionBeginIndex not implemented");
 +		return 0;
 +	}
 +	
 +	public function get selectionEndIndex():int
 +	{
 +		trace("TextField.selectionEndIndex not implemented");
 +		return 0;
 +	}
 +
 +	private var _sharpness:Number;
 +	public function get sharpness():Number
 +	{
 +		trace("TextField.sharpness not implemented");
 +		return _sharpness;
 +	}
 +	public function set sharpness(value:Number):void
 +	{
 +		_sharpness = value;
 +		trace("TextField.sharpness not implemented");
 +	}
 +	
 +	private var _styleSheet:StyleSheet;
 +	public function get styleSheet():StyleSheet
 +	{
 +		trace("TextField.styleSheet not implemented");
 +		return _styleSheet;
 +	}
 +	public function set styleSheet(value:StyleSheet):void
 +	{
 +		_styleSheet = value;
 +		trace("TextField.styleSheet not implemented");
 +	}
 +		
 +	private var _tabEnabled:Boolean;
 +	public function get tabEnabled():Boolean
 +	{
 +		trace("TextField.tabEnabled not implemented");
 +		return _tabEnabled;
 +	}
 +	public function set tabEnabled(value:Boolean):void
 +	{
 +		_tabEnabled = value;
 +		trace("TextField.tabEnabled not implemented");
 +	}
 +		
 +	private var _textColor:uint;
 +	public function get textColor():uint
 +	{
 +		return _textColor;
 +	}
 +	public function set textColor(value:uint):void
 +	{
 +		_textColor = value;
 +		element.style.color = "#" + value.toString(16);
 +	}
 +	
 +	public function get textHeight():Number
 +	{
 +		return element.offsetHeight;
 +	}
 +	
 +	public function get textWidth():Number
 +	{
 +		return element.offsetWidth;
 +	}
 +	
 +	private var _thickness:Number;
 +	public function get thickness():Number
 +	{
 +		trace("TextField.thickness not implemented");
 +		return _thickness;
 +	}
 +	public function set thickness(value:Number):void
 +	{
 +		_thickness = value;
 +		trace("TextField.thickness not implemented");
 +	}
 +	
 +	public function get topOfDisplayList():TopOfDisplayList
 +	{
 +		trace("TextField.topOfDisplayList not implemented");
 +		return null;
 +	}
 +	
 +	private var _type:String;
 +	public function get type():String
 +	{
 +		trace("TextField.type not implemented");
 +		return _type;
 +	}
 +	public function set type(value:String):void
 +	{
 +		_type = value;
 +		trace("TextField.type not implemented");
 +	}
 +	
 +	private var _useRichTextClipboard:Boolean;
 +	public function get useRichTextClipboard():Boolean
 +	{
 +		trace("TextField.useRichTextClipboard not implemented");
 +		return _useRichTextClipboard;
 +	}
 +	public function set useRichTextClipboard(value:Boolean):void
 +	{
 +		_useRichTextClipboard = value;
 +		trace("TextField.useRichTextClipboard not implemented");
 +	}
 +	
 +	private var _wordWrap:Boolean;
 +	public function get wordWrap():Boolean
 +	{
 +		trace("TextField.wordWrap not implemented");
 +		return _wordWrap;
 +	}
 +	public function set wordWrap(value:Boolean):void
 +	{
 +		_wordWrap = value;
 +		trace("TextField.wordWrap not implemented");
 +	}
 +	
 +	public function appendText(value:String):void
 +	{
 +		element.innerText += value;
 +	}
 +	
 +	public function getCharBoundaries(charIndex:int):Rectangle
 +	{
 +		trace("TextField.getCharBoundaries not implemented");
 +		return null;
 +	}
 +
 +	public function getCharIndexAtPoint(x:Number, y:Number):int
 +	{
 +		trace("TextField.getCharIndexAtPoint not implemented");
 +		return 0;
 +	}
 +	
 +	public function getFirstCharInParagraph(index:int):int
 +	{
 +		trace("TextField.getFirstCharInParagraph not implemented");
 +		return 0;
 +	}
 +	
 +	public function getImageReference(id:String):DisplayObject
 +	{
 +		trace("TextField.getImageReference not implemented");
 +		return null;
 +	}
 +	
 +	public function getLineIndexAtPoint(x:Number, y:Number):int
 +	{
 +		trace("TextField.getLineIndexAtPoint not implemented");
 +		return 0;
 +	}
 +	
 +	public function getLineIndexOfChar(index:int):int
 +	{
 +		trace("TextField.getLineIndexOfChar not implemented");
 +		return 0;
 +	}
 +	
 +	public function getLineLength(index:int):int
 +	{
 +		trace("TextField.getLineLength not implemented");
 +		return 0;
 +	}
 +	
 +	public function getLineMetrics(index:int):TextLineMetrics
 +	{
 +		trace("TextField.getLineMetrics not implemented");
 +		return null;
 +	}
 +	
 +	public function getLineOffset(index:int):int
 +	{
 +		trace("TextField.getLineOffset not implemented");
 +		return 0;
 +	}
 +	
 +	public function getLineText(index:int):String
 +	{
 +		trace("TextField.getLineText not implemented");
 +		return null;
 +	}
 +	
 +	public function getParagraphLength(index:int):int
 +	{
 +		trace("TextField.getParagraphLength not implemented");
 +		return 0;
 +	}
 +	
 +	public function getTextFormat(beginIndex:int = -1, endIndex:int = -1):TextFormat
 +	{
 +		trace("TextField.getTextFormat not implemented");
 +		return null;
 +	}
 +	
 +	public function replaceSelectedText(text:String):void
 +	{
 +		trace("TextField.replaceSelectedText not implemented");
 +	}
 +	
 +	public function replaceText(begin:int, end:int, text:String):void
 +	{
 +		trace("TextField.replaceText not implemented");
 +	}
 +	
 +	public function setColor(color:uint):void
 +	{
 +		element.style.color = "#" + color.toString(16);
 +	}
 +
 +	public function setFocus():void
 +	{
 +		element.focus();
 +	}
 +	
 +	public function setSelection(begin:int, end:int):void
 +	{
 +		trace("TextField.setSelection not implemented");
 +	}
 +	
 +	public function setTextFormat(format:TextFormat, begin:int = -1, end:int = -1):void
 +	{
 +		trace("TextField.setTextFormat not implemented");
 +	}
 +	
 +	/**
 +	 * @flexjsignorecoercion flex.display.DisplayObjectContainer
 +	 */
 +	override public function get parent():DisplayObjectContainer
 +	{
 +		return super.parent as DisplayObjectContainer;
 +	}
 +
 +}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/text/TextFieldType.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/text/TextFieldType.as
index 39df8a0,0000000..8cc24a8
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/text/TextFieldType.as
+++ b/frameworks/projects/MX/src/main/flex/flex/text/TextFieldType.as
@@@ -1,12 -1,0 +1,12 @@@
 +package flex.text
 +{
 +	public class TextFieldType
 +	{
 +		public function TextFieldType()
 +		{
 +		}
 +		
 +		public static const INPUT:String = "input";
 +		public static const DYNAMIC:String = "dynamic";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/text/TextFormat.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/text/TextFormat.as
index 105fc22,0000000..321e72d
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/text/TextFormat.as
+++ b/frameworks/projects/MX/src/main/flex/flex/text/TextFormat.as
@@@ -1,45 -1,0 +1,45 @@@
 +package flex.text
 +{
 +	public class TextFormat
 +	{
 +		public function TextFormat(font:String = null, size:Object = null, color:Object = null, 
 +			bold:Object = null, italic:Object = null, underline:Object = null, 
 +			url:String = null, target:String = null, align:String = null, 
 +			leftMargin:Object = null, rightMargin:Object = null, 
 +			indent:Object = null, leading:Object = null)		
 +		{
 +			this.font = font;
 +			this.size = size;
 +			this.color = color;
 +			this.bold = bold;
 +			this.italic = italic;
 +			this.underline = underline;
 +			this.url = url;
 +			this.target = target;
 +			this.align = align;
 +			this.leftMargin = leftMargin;
 +			this.rightMargin = rightMargin;
 +			this.indent = indent;
 +			this.leading = leading;
 +		}
 +		
 +		public var align:String;
 +		public var blockIndent:Object;
 +		public var bold:Object;
 +		public var bullet:Object;
 +		public var color:Object;
 +		public var font:String;
 +		public var indent:Object;
 +		public var italic:Object;
 +		public var kerning:Object;
 +		public var leading:Object;
 +		public var leftMargin:Object;
 +		public var letterSpacing:Object;
 +		public var rightMargin:Object;
 +		public var size:Object;
 +		public var tabStops:Array;
 +		public var target:Object;
 +		public var underline:Object;
 +		public var url:Object;
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/text/TextFormatAlign.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/text/TextFormatAlign.as
index 6305621,0000000..a1e8521
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/text/TextFormatAlign.as
+++ b/frameworks/projects/MX/src/main/flex/flex/text/TextFormatAlign.as
@@@ -1,16 -1,0 +1,16 @@@
 +package flex.text
 +{
 +	public class TextFormatAlign
 +	{
 +		public function TextFormatAlign()
 +		{
 +		}
 +		
 +		public static const CENTER:String = "center";
 +		public static const END:String = "end";
 +		public static const JUSTIFY:String = "justify";
 +		public static const LEFT:String = "left";
 +		public static const RIGHT:String = "right";
 +		public static const START:String = "start";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
index 165f87e,0000000..5c2a347
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
+++ b/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
@@@ -1,42 -1,0 +1,42 @@@
 +package flex.text
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.text.TextLineMetrics;		
 +}
 +
- COMPILE::AS3
++COMPILE::SWF
 +public class TextLineMetrics extends flash.text.TextLineMetrics
 +{
 +	public function TextLineMetrics(x:Number, width:Number, height:Number, ascent:Number, descent:Number, leading:Number)
 +	{
 +		super(x, width, height, ascent, descent, leading);
 +	}
 +	
 +	public static function convert(tlm:flash.text.TextLineMetrics):flex.text.TextLineMetrics
 +	{
 +		return new flex.text.TextLineMetrics(tlm.x, tlm.width, tlm.height, tlm.ascent, tlm.descent, tlm.leading);
 +	}
 +}
 +
 +COMPILE::JS
 +public class TextLineMetrics
 +{
 +	public function TextLineMetrics(x:Number, width:Number, height:Number, ascent:Number, descent:Number, leading:Number)
 +	{
 +		this.x = x;
 +		this.width = width;
 +		this.height = height;
 +		this.ascent = ascent;
 +		this.descent = descent;
 +		this.leading = leading;
 +	}
 +	
 +	public var x:Number;
 +	public var width:Number;
 +	public var height:Number;
 +	public var ascent:Number;
 +	public var descent:Number;
 +	public var leading:Number;
 +}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
index 002adde,0000000..bc04644
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
+++ b/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
@@@ -1,40 -1,0 +1,40 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.ui
 +{
 +	public class Keyboard
 +	{
 +		public function Keyboard()
 +		{
 +		}
 +				
 +		public static const TAB:int = 0x09;
 +		public static const LEFT:int = 0x25;
 +		public static const UP:int = 0x26;
 +		public static const RIGHT:int = 0x27;
 +		public static const DOWN:int = 0x28;
 +		public static const PAGE_UP:int = 0x21;
 +		public static const PAGE_DOWN:int = 0x22;
 +		public static const HOME:int = 0x24;
 +		public static const END:int = 0x23;
 +		public static const ENTER:int = 0x0D;
 +		
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
index bbda041,0000000..bab9df9
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
+++ b/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
@@@ -1,53 -1,0 +1,53 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.ui
 +{
 +	public class Mouse
 +	{
 +		public function Mouse()
 +		{
 +		}
 +		
 +		COMPILE::JS
 +		private static var styleElement:HTMLStyleElement;
 +		
 +		/**
 +		 * @flexjsignorecoercion HTMLStyleElement
 +		 */
 +		COMPILE::JS
 +		public static function hide():void
 +		{
 +			if (!styleElement)
 +				styleElement = document.createElement("STYLE") as HTMLStyleElement;
 +			var css:CSSStyleSheet = styleElement.sheet as CSSStyleSheet;
 +			css.insertRule("* { cursor: none; }", 0);
 +		}
 +		
 +		COMPILE::JS
 +		public static function show():void
 +		{
 +			if (!styleElement)
 +				return;
 +			var css:CSSStyleSheet = styleElement.sheet as CSSStyleSheet;
 +			css.deleteRule(0);
 +		}
 +		
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/utils/IExternalizable.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/utils/IExternalizable.as
index a75a480,0000000..d8ce817
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/utils/IExternalizable.as
+++ b/frameworks/projects/MX/src/main/flex/flex/utils/IExternalizable.as
@@@ -1,26 -1,0 +1,26 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.utils
 +{
 +	public interface IExternalizable
 +	{
 +		
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/automation/IAutomationObject.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/automation/IAutomationObject.as
index 61882a8,0000000..18dbeba
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/automation/IAutomationObject.as
+++ b/frameworks/projects/MX/src/main/flex/mx/automation/IAutomationObject.as
@@@ -1,324 -1,0 +1,324 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.automation
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObjectContainer;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObjectContainer;		
 +}
 +import flex.events.Event;
 +
 +/**
 + * The IAutomationObject interface defines the interface 
 + * for a delegate object that implements automation
 + * for a component.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IAutomationObject 
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  automationDelegate
 +    //----------------------------------
 +
 +    /**
 +     *  The delegate object that is handling the automation-related functionality.
 +     *  Automation sets this when it creates the delegate object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get automationDelegate():Object;
 +
 +    /**
 +     *  @private
 +     */
 +    function set automationDelegate(delegate:Object):void;
 +
 +    //----------------------------------
 +    //  automationName
 +    //----------------------------------
 +
 +    /**
 +     *  Name that can be used as an identifier for this object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get automationName():String;
 +
 +    /**
 +     *  @private
 +     */
 +    function set automationName(name:String):void;
 +
 +    //----------------------------------
 +    //  automationValue
 +    //----------------------------------
 +
 +    /**
 +     *  This value generally corresponds to the rendered appearance of the 
 +     *  object and should be usable for correlating the identifier with
 +     *  the object as it appears visually within the application.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get automationValue():Array;
 +    
 +    /**
 +     *  The number of automation children this container has.
 +     *  This sum should not include any composite children, though
 +     *  it does include those children not significant within the
 +     *  automation hierarchy.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get numAutomationChildren():int;
 +
 +    /** 
 +     *  A flag that determines if an automation object
 +     *  shows in the automation hierarchy.
 +     *  Children of containers that are not visible in the hierarchy
 +     *  appear as children of the next highest visible parent.
 +     *  Typically containers used for layout, such as boxes and Canvas,
 +     *  do not appear in the hierarchy.
 +     *
 +     *  <p>Some controls force their children to appear
 +     *  in the hierarchy when appropriate.
 +     *  For example a List will always force item renderers,
 +     *  including boxes, to appear in the hierarchy.
 +     *  Implementers must support setting this property
 +     *  to <code>true</code>.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get showInAutomationHierarchy():Boolean;
 +
 +    /**
 +     *  @private
 +     */
 +    function set showInAutomationHierarchy(value:Boolean):void;
 +   
 +    /**
 +     *  An implementation of the <code>IAutomationTabularData</code> interface, which 
 +     *  can be used to retrieve the data.
 +     * 
 +     *  @return An implementation of the <code>IAutomationTabularData</code> interface.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get automationTabularData():Object;
 +    
 +    /**
 +     *  The owner of this component for automation purposes.
 +     * 
 +     *  @see mx.core.IVisualElement#owner
 +     * 
 +     *  @return The owner of this component
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    function get automationOwner():DisplayObjectContainer;
 +    
 +    /**
 +     *  The parent of this component for automation purposes.
 +     * 
 +     *  @see mx.core.IVisualElement#parent
 +     * 
 +     *  @return The parent of this component
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    function get automationParent():DisplayObjectContainer;
 +    
 +    /**
 +     *  True if this component is enabled for automation, false
 +     *  otherwise.
 +     * 
 +     *  @see mx.core.IUIComponent#enabled
 +     * 
 +     *  @return <code>true</code> if this component is enabled for automation,
 +     *          <code>false</code> otherwise.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    function get automationEnabled():Boolean;
 +    
 +    /**
 +     *  True if this component is visible for automation, false
 +     *  otherwise.
 +     * 
 +     *  @see flash.display.DisplayObject#visible
 +     * 
 +     *  @return <code>true</code> if this component is visible for automation,
 +     *          <code>false</code> otherwise.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    function get automationVisible():Boolean;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 + 
 +    /**
 +     *  Returns a set of properties that identify the child within 
 +     *  this container.  These values should not change during the
 +     *  lifespan of the application.
 +     *  
 +     *  @param child Child for which to provide the id.
 +     * 
 +     *  @return Sets of properties describing the child which can
 +     *          later be used to resolve the component.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function createAutomationIDPart(child:IAutomationObject):Object;
 +    
 +    /**
 +     *  Returns a set of properties as automation IDs that identify the child within
 +     *  this container.  These values should not change during the
 +     *  lifespan of the application
 +     * 
 +     *  @param child Child for which to provide the id.
 +     * 
 +     *  @param properties which needs to be considered for forming the Id.
 +     *
 +     *  @return Sets of properties describing the child which can
 +     *          later be used to resolve the component.
 +     * 
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object;
 +
 +    /**
 +     *  Resolves a child by using the id provided. The id is a set 
 +     *  of properties as provided by the <code>createAutomationIDPart()</code> method.
 +     *
 +     *  @param criteria Set of properties describing the child.
 +     *         The criteria can contain regular expression values
 +     *         resulting in multiple children being matched.
 +     *  @return Array of children that matched the criteria
 +     *          or <code>null</code> if no children could not be resolved.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function resolveAutomationIDPart(criteria:Object):Array;
 +
 +    /** 
 +     *  Provides the automation object at the specified index.  This list
 +     *  should not include any children that are composites.
 +     *
 +     *  @param index The index of the child to return
 +     * 
 +     *  @return The child at the specified index.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getAutomationChildAt(index:int):IAutomationObject;
 +    
 +    /**
 +     *  Provides the automation object list .  This list
 +     *  does not include any children that are composites.
 +     *
 +     *  @return the automation children.
 +     * 
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function getAutomationChildren():Array;
 +
 +    /**
 +     *  Replays the specified event.  A component author should probably call 
 +     *  super.replayAutomatableEvent in case default replay behavior has been defined 
 +     *  in a superclass.
 +     *
 +     *  @param event The event to replay.
 +     *
 +     *  @return <code>true</code> if a replay was successful.  
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function replayAutomatableEvent(event:Event):Boolean;
 +    
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
index 40a12e8,0000000..c19cced
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
+++ b/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
@@@ -1,592 -1,0 +1,592 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.binding
 +{
 +
 +import mx.collections.errors.ItemPendingError;
 +import mx.core.mx_internal;
 +COMPILE::LATER
 +{
 +import flash.utils.Dictionary;
 +}
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + */
 +public class Binding
 +{
 +    include "../core/Version.as";
 +
 +    // Certain errors are normal during binding execution, so we swallow them.
 +    // 1507 - invalid null argument 
 +    // 2005 - argument error (null gets converted to 0) 
 +    mx_internal static var allowedErrors:Object = generateAllowedErrors();
 +    mx_internal static function generateAllowedErrors():Object
 +    {
 +        var o:Object = {};
 +        o[1507] = 1;
 +        o[2005] = 1;
 +        return o;
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    /**
 +     *  Create a Binding object
 +	 *
 +     *  @param document The document that is the target of all of this work.
 +	 *
 +     *  @param srcFunc The function that returns us the value
 +	 *  to use in this Binding.
 +	 *
 +     *  @param destFunc The function that will take a value
 +	 *  and assign it to the destination.
 +	 *
 +     *  @param destString The destination represented as a String.
 +	 *  We can then tell the ValidationManager to validate this field.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function Binding(document:Object, srcFunc:Function,
 +						    destFunc:Function, destString:String,
 +							srcString:String = null)
 +    {
 +		super();
 +
 +        this.document = document;
 +        this.srcFunc = srcFunc;
 +        this.destFunc = destFunc;
 +        this.destString = destString;
 +        this.srcString = srcString;
 +        this.destFuncFailed = false;
 +
 +        if (this.srcFunc == null)
 +        {
 +            this.srcFunc = defaultSrcFunc;
 +        }
 +
 +        if (this.destFunc == null)
 +        {
 +            this.destFunc = defaultDestFunc;
 +        }
 +
 +        _isEnabled = true;
 +        isExecuting = false;
 +        isHandlingEvent = false;
 +        hasHadValue = false;
 +        uiComponentWatcher = -1;
 +
 +        BindingManager.addBinding(document, destString, this);
 +    }
 +
 + 	//--------------------------------------------------------------------------
 +	//
 +	//  Variables
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Internal storage for isEnabled property.
 +     */
 +    mx_internal var _isEnabled:Boolean;
 +
 +    /**
 +     *  @private
 +     *  Indicates that a Binding is enabled.
 +     *  Used to disable bindings.
 +     */
 +    mx_internal function get isEnabled():Boolean
 +    {
 +        return _isEnabled;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set isEnabled(value:Boolean):void
 +    {
 +        _isEnabled = value;
 +        
 +        if (value)
 +        {
 +            processDisabledRequests();
 +        }
 +    }
 +    
 +	/**
 + 	 *  @private
 +     *  Indicates that a Binding is executing.
 +	 *  Used to prevent circular bindings from causing infinite loops.
 +     */
 +    mx_internal var isExecuting:Boolean;
 +
 +	/**
 + 	 *  @private
 +     *  Indicates that the binding is currently handling an event.
 +     *  Used to prevent us from infinitely causing an event
 +	 *  that re-executes the the binding.
 +     */
 +    mx_internal var isHandlingEvent:Boolean;
 +    
 +    /**
 +     *  @private
 +     *  Queue of watchers that fired while we were disabled.
 +     *  We will resynch with our binding if isEnabled is set to true
 +     *  and one or more of our watchers fired while we were disabled.
 +     */
 +    mx_internal var disabledRequests:Array;
 +
 +	/**
 + 	 *  @private
 +     *  True as soon as a non-null or non-empty-string value has been used.
 +     *  We don't auto-validate until this is true
 +     */
 +    private var hasHadValue:Boolean;
 +
 +	/**
 + 	 *  @private
 +     *  This is no longer used in Flex 3.0, but it is required to load
 +     *  Flex 2.0.0 and Flex 2.0.1 modules.
 +     */
 +    public var uiComponentWatcher:int;
 +
 +	/**
 + 	 *  @private
 +     *  It's possible that there is a two-way binding set up, in which case
 +     *  we'll do a rudimentary optimization by not executing ourselves
 +     *  if our counterpart is already executing.
 +     */
 +    public var twoWayCounterpart:Binding;
 +
 +    /**
 +     *  @private
 +     *  If there is a twoWayCounterpart, hasHadValue is false, and
 +     *  isTwoWayPrimary is true, then the twoWayCounterpart will be
 +     *  executed first.
 +     */
 +    public var isTwoWayPrimary:Boolean;
 +
 +    /**
 +     *  @private 
 +     *  True if a wrapped function call does not throw an error.  This is used by
 +     *  innerExecute() to tell if the srcFunc completed successfully.
 +     */
 +    private var wrappedFunctionSuccessful:Boolean;
 +
 + 	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    /**
 +     *  All Bindings hang off of a document for now,
 +	 *  but really it's just the root of where these functions live.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal var document:Object;
 +
 +	/**
 +     *  The function that will return us the value.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal var srcFunc:Function;
 +
 +	/**
 +     *  The function that takes the value and assigns it.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal var destFunc:Function;
 +    
 +    /**
 +     * @private 
 +     */
 +    mx_internal var destFuncFailed:Boolean;
 +
 +	/**
 +     *  The destination represented as a String.
 +	 *  This will be used so we can signal validation on a field.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal var destString:String;
 +
 +	/**
 +     *  The source represented as a String.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    mx_internal var srcString:String;
 +
 +	/**
 +	 * 	@private
 +	 *  Used to suppress calls to destFunc when incoming value is either
 +	 *	a) an XML node identical to the previously assigned XML node, or
 +	 *  b) an XMLList containing the identical node sequence as the previously assigned XMLList
 +	 */
 +	private var lastValue:Object;
 +
 +
 + 	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    private function defaultDestFunc(value:Object):void
 +    {
 +        var chain:Array = destString.split(".");
 +        var element:Object = document;
 +        var i:uint = 0;
 +
 +        if (chain[0] == "this")
 +        {
 +            i++;
 +        }
 +
 +        while (i < (chain.length - 1))
 +        {
 +            element = element[chain[i++]];
 +            //if the element does not exist : avoid exception as it's heavy on memory allocations
 +            if (element == null) {
 +                destFuncFailed = true;
 +                if (BindingManager.debugDestinationStrings[destString])
 +                {
 +                    trace("Binding: destString = " + destString + ", error = 1009");
 +                }
 +                return;
 +            }
 +        }
 +
 +        element[chain[i]] = value;
 +    }
 +
 +    private function defaultSrcFunc():Object
 +    {
 +        return document[srcString];
 +    }
 +
 +    /**
 +     *  Execute the binding.
 +	 *  Call the source function and get the value we'll use.
 +	 *  Then call the destination function passing the value as an argument.
 +	 *  Finally try to validate the destination.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function execute(o:Object = null):void
 +    {
 +        if (!isEnabled)
 +        {
 +            if (o != null)
 +            {
 +                registerDisabledExecute(o);
 +            }
 +            return;
 +        }
 +
 +        if (twoWayCounterpart && !twoWayCounterpart.hasHadValue && twoWayCounterpart.isTwoWayPrimary)
 +        {
 +            twoWayCounterpart.execute();
 +            hasHadValue = true;
 +            return;
 +        }
 +
 +        if (isExecuting || (twoWayCounterpart && twoWayCounterpart.isExecuting))
 +        {
 +            // If there is a twoWayCounterpart already executing, that means that it is
 +            // assigning something of value so even though we won't execute we should be
 +            // sure to mark ourselves as having had a value so that future executions will
 +            // be correct.  If isExecuting is true but we re-entered, that means we
 +            // clearly had a value so setting hasHadValue is safe.
 +            hasHadValue = true;
 +            return;
 +        }
 +
 +        try
 +        {
 +            isExecuting = true;
 +            wrapFunctionCall(this, innerExecute, o);
 +        }
 +        catch(error:Error)
 +        {
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				if (allowedErrors[error.errorID] == null)
 +					throw error;					
 +			}
 +			COMPILE::JS
 +			{
 +				if (allowedErrors[error.name] == null)
 +					throw error;					
 +			}
 +        }
 +        finally
 +        {
 +            isExecuting = false;
 +        }
 +    }
 +
 +    /**
 +     * @private 
 +     * Take note of any execute request that occur when we are disabled. 
 +     */
 +    private function registerDisabledExecute(o:Object):void
 +    {
 +        if (o != null)
 +        {
 +            disabledRequests = (disabledRequests != null) ? disabledRequests : 
 +				[];
 +            
 +            disabledRequests.push(o);
 +        }
 +    }  
 +    
 +    /**
 +     * @private 
 +     * Resynch with any watchers that may have updated while we were disabled.
 +     */
 +    private function processDisabledRequests():void
 +    {
 +        if (disabledRequests != null)
 +        {
 +            for each (var key:Object in disabledRequests) 
 +            {
 +                execute(key);
 +            }
 +
 +            disabledRequests = null;
 +        }
 +    }  
 +    
 +    
 +    /**
 +	 *  @private
 +	 *  Note: use of this wrapper needs to be reexamined. Currently there's at least one situation where a
 +	 *	wrapped function invokes another wrapped function, which is unnecessary (i.e., only the inner function
 +	 *  will throw), and also risks future errors due to the 'wrappedFunctionSuccessful' member variable
 +	 *  being stepped on. Leaving alone for now to minimize pre-GMC volatility, but should be revisited for
 +	 *  an early dot release.
 +	 *  Also note that the set of suppressed error codes below is repeated verbatim in Watcher.wrapUpdate.
 +	 *  These need to be consolidated and the motivations for each need to be documented.
 +     */
 +    protected function wrapFunctionCall(thisArg:Object, wrappedFunction:Function, object:Object = null, ...args):Object
 +    {
 +        wrappedFunctionSuccessful = false;
 +
 +        try
 +        {
 +            var result:Object = wrappedFunction.apply(thisArg, args);
 +            if(destFuncFailed == true) {
 +                destFuncFailed = false;
 +                return null;
 +            }
 +            wrappedFunctionSuccessful = true;
 +            return result;
 +        }
 +        catch(error:Error)
 +        {
 +			if (error is ItemPendingError) {
 +	            (error as ItemPendingError).addResponder(new EvalBindingResponder(this, object));
 +	            if (BindingManager.debugDestinationStrings[destString])
 +	            {
 +	                trace("Binding: destString = " + destString + ", error = " + error);
 +	            }
 +			} else if (error is RangeError) {
 +	            if (BindingManager.debugDestinationStrings[destString])
 +	            {
 +	                trace("Binding: destString = " + destString + ", error = " + error);
 +	            }
 +			} else {
 +	            // Certain errors are normal when executing a srcFunc or destFunc,
 +	            // so we swallow them:
 +	            //   Error #1006: Call attempted on an object that is not a function.
 +	            //   Error #1009: null has no properties.
 +	            //   Error #1010: undefined has no properties.
 +	            //   Error #1055: - has no properties.
 +	            //   Error #1069: Property - not found on - and there is no default value
 +	            // We allow any other errors to be thrown.
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +					if ((error.errorID != 1006) &&
 +						(error.errorID != 1009) &&
 +						(error.errorID != 1010) &&
 +						(error.errorID != 1055) &&
 +						(error.errorID != 1069))
 +					{
 +						throw error;
 +					}
 +					else
 +					{
 +						if (BindingManager.debugDestinationStrings[destString])
 +						{
 +							trace("Binding: destString = " + destString + ", error = " + error);
 +						}
 +					}						
 +				}
 +				COMPILE::JS
 +				{
 +					/*
 +					if ((error.name != 1006) &&
 +						(error.name != 1009) &&
 +						(error.name != 1010) &&
 +						(error.name != 1055) &&
 +						(error.name != 1069))
 +					{
 +						throw error;
 +					}
 +					else
 +					{*/
 +						if (BindingManager.debugDestinationStrings[destString])
 +						{
 +							trace("Binding: destString = " + destString + ", error = " + error);
 +						}
 +					/*}*/
 +				}
 +			}
 +        }
 +
 +        return null;
 +    }
 +
 +	/**
 +	 *	@private
 +	 *  true if XMLLists x and y contain the same node sequence.
 +	 */
 +	COMPILE::LATER
 +	private static function nodeSeqEqual(x:XMLList, y:XMLList):Boolean
 +	{
 +		var n:uint = x.length();
 +		if (n == y.length())
 +		{
 +			for (var i:uint = 0; i < n && x[i] === y[i]; i++)
 +			{
 +			}
 +			return i == n;
 +		}
 +		else
 +		{
 +			return false;
 +		}
 +	}
 +
 +    /**
 +	 *  @private
 +     */
 +    private function innerExecute():void
 +    {
 +        destFuncFailed = false;
 +        var value:Object = wrapFunctionCall(document, srcFunc);
 +
 +        if (BindingManager.debugDestinationStrings[destString])
 +        {
 +            trace("Binding: destString = " + destString + ", srcFunc result = " + value);
 +        }
 +
 +        if (hasHadValue || wrappedFunctionSuccessful)
 +        {
 +        	//	Suppress binding assignments on non-simple XML: identical single nodes, or
 +        	//	lists over identical node sequences.
 +			//	Note: outer tests are inline for efficiency
 +			COMPILE::LATER
 +			{
 +	        	if (!(lastValue is XML && lastValue.hasComplexContent() && lastValue === value) &&
 +	        		!(lastValue is XMLList && lastValue.hasComplexContent() && value is XMLList &&
 +	        			nodeSeqEqual(lastValue as XMLList, value as XMLList)))
 +	        	{
 +		            destFunc.call(document, value);
 +	
 +	                if(destFuncFailed == false) {
 +	                    //	Note: state is not updated if destFunc throws
 +	                    lastValue = value;
 +	                    hasHadValue = true;
 +		            }
 +		        }
 +			}
 +			destFunc.call(document, value);
 +			
 +			if(destFuncFailed == false) {
 +				//	Note: state is not updated if destFunc throws
 +				lastValue = value;
 +				hasHadValue = true;
 +			}
 +        }
 +    }
 +
 +    /**
 +	 *  This function is called when one of this binding's watchers
 +	 *  detects a property change.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +    public function watcherFired(commitEvent:Boolean, cloneIndex:int):void
 +    {
 +        if (isHandlingEvent)
 +            return;
 +
 +        try
 +        {
 +	        isHandlingEvent = true;
 +			execute(cloneIndex);
 +		}
 +		finally
 +		{
 +        	isHandlingEvent = false;
 +        }
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/binding/Watcher.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/binding/Watcher.as
index c5855e1,0000000..bdfe149
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/binding/Watcher.as
+++ b/frameworks/projects/MX/src/main/flex/mx/binding/Watcher.as
@@@ -1,326 -1,0 +1,326 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.binding
 +{
 +
 +import mx.collections.errors.ItemPendingError;
 +import mx.core.mx_internal;
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + */
 +public class Watcher
 +{
 +    include "../core/Version.as";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  Constructor.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +    public function Watcher(listeners:Array = null)
 +    {
 +		super();
 +
 +        this.listeners = listeners;
 +    }
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Variables
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  The binding objects that are listening to this Watcher.
 +     *  The standard event mechanism isn't used because it's too heavyweight.
 +     */
 +    protected var listeners:Array;
 +
 +    /**
 +     *  @private
 +     *  Children of this watcher are watching sub values.
 +     */
 +    protected var children:Array;
 +
 +    /**
 +     *  @private
 +     *  The value itself.
 +     */
 +    public var value:Object;
 +
 +    /**
 +     *  @private
 +     *  Keep track of cloning when used in Repeaters.
 +     */
 +    protected var cloneIndex:int;
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  This is an abstract method that subclasses implement.
 +     */
 +    public function updateParent(parent:Object):void
 +	{
 +	}
 +
 +    /**
 +     *  @private
 +     *  Add a child to this watcher, meaning that the child
 +	 *  is watching a sub value of ours.
 +     */
 +    public function addChild(child:Watcher):void
 +    {
 +        if (!children)
 +            children = [ child ];
 +        else
 +            children.push(child);
 +
 +        child.updateParent(this);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Remove all children beginning at a starting index.
 +     *  If the index is not specified, it is assumed to be 0.
 +     *  This capability is used by Repeater, which must remove
 +     *  cloned RepeaterItemWatchers (and their descendant watchers).
 +     */
 +    public function removeChildren(startingIndex:int):void
 +    {
 +        children.splice(startingIndex);
 +    }
 +
 +    /**
 +     *  We have probably changed, so go through
 +	 *  and make sure our children are updated.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function updateChildren():void
 +    {
 +        if (children)
 +        {
 +            var n:int = children.length;
 +			for (var i:int = 0; i < n; ++i)
 +            {
 +                children[i].updateParent(this);
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function valueChanged(oldval:Object):Boolean
 +    {
 +        if (oldval == null && value == null)
 +            return false;
 +
 +        var valType:String = typeof(value);
 +        
 +		// The first check is meant to catch the delayed instantiation case
 +		// where a control comes into existence but its value is still
 +		// the equivalent of not having been filled in.
 +        // Otherwise we simply return whether the value has changed.
 +        
 +		if (valType == "string")
 +        {
 +            if (oldval == null && value == "")
 +                return false;
 +            else
 +                return oldval != value;
 +        }
 +        
 +		if (valType == "number")
 +        {
 +            if (oldval == null && value == 0)
 +                return false;
 +            else
 +                return oldval != value;
 +        }
 +        
 +		if (valType == "boolean")
 +        {
 +            if (oldval == null && value == false)
 +                return false;
 +            else
 +                return oldval != value;
 +        }
 +
 +        return true;
 +    }
 +
 +    /**
 +	 *  @private
 +     */
 +    protected function wrapUpdate(wrappedFunction:Function):void
 +    {
 +        try
 +        {
 +            wrappedFunction.apply(this);
 +        }
 +        catch(error:Error)
 +        {
 +			if (error is ItemPendingError) {
 +	            // The parent's value is not yet available.  This is being ignored for now -
 +	            // updateParent() will be called when the parent has a value.
 +	            value = null;
 +			} else if (error is RangeError) {
 +	            // The parent's value is not yet available.  This is being ignored for now -
 +	            // updateParent() will be called when the parent has a value.
 +	            value = null;
 +			} else {
 +	            // Certain errors are normal when executing an update, so we swallow them:
 +	            //   Error #1006: Call attempted on an object that is not a function.
 +	            //   Error #1009: null has no properties.
 +	            //   Error #1010: undefined has no properties.
 +	            //   Error #1055: - has no properties.
 +	            //   Error #1069: Property - not found on - and there is no default value
 +	            //   Error #1507: - invalid null argument.
 +	            // We allow any other errors to be thrown.
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +	            if ((error.errorID != 1006) &&
 +	                (error.errorID != 1009) &&
 +	                (error.errorID != 1010) &&
 +	                (error.errorID != 1055) &&
 +	                (error.errorID != 1069) &&
 +	                (error.errorID != 1507))
 +	            {
 +	                throw error;
 +	            }
 +				}
 +			}
 +        }
 +    }
 +
 +    /**
 +	 *  @private
 +     *  Clone this Watcher and all its descendants.
 +     *  Each clone triggers the same Bindings as the original;
 +     *  in other words, the Bindings do not get cloned.
 +     *
 +     *  This cloning capability is used by Repeater in order
 +     *  to watch the subproperties of multiple dataProvider items.
 +     *  For example, suppose a repeated LinkButton's label is
 +     *    {r.currentItem.firstName} {r.currentItem.lastName}
 +     *  where r is a Repeater whose dataProvider is
 +     *    [ { firstName: "Matt",   lastName: "Chotin" },
 +     *      { firstName: "Gordon", lastName: "Smith"  } ]
 +     *  The MXML compiler emits a watcher tree (one item of _watchers[])
 +     *  that looks like this:
 +     *    PropertyWatcher for "r"
 +     *      PropertyWatcher for "dataProvider"
 +     *        RepeaterItemWatcher
 +     *          PropertyWatcher for "firstName"
 +     *          PropertyWatcher for "lastName"
 +     *  At runtime the RepeaterItemWatcher serves as a template
 +     *  which gets cloned for each dataProvider item:
 +     *    PropertyWatcher for "r"
 +     *      PropertyWatcher for "dataProvider"
 +     *        RepeaterItemWatcher               (index: null)
 +     *          PropertyWatcher for "firstName" (value: null)
 +     *          PropertyWatcher for "lastName"  (value: null)
 +     *        RepeaterItemWatcher               (index: 0)
 +     *          PropertyWatcher for "firstName" (value: "Matt")
 +     *          PropertyWatcher for "lastName"  (value: "Chotin")
 +     *        RepeaterItemWatcher               (index: 1)
 +     *          PropertyWatcher for "firstName" (value: "Gordon")
 +     *          PropertyWatcher for "lastName"  (value: "Smith")
 +     */
 +    protected function deepClone(index:int):Watcher
 +    {
 +        // Clone this watcher object itself.
 +        var w:Watcher = shallowClone();
 +        w.cloneIndex = index;
 +
 +        // Clone its listener queue.
 +        if (listeners)
 +        {
 +            w.listeners = listeners.concat();
 +        }
 +
 +        // Recursively clone its children.
 +        if (children)
 +        {
 +            var n:int = children.length;
 +            for (var i:int = 0; i < n; i++)
 +            {
 +                var clonedChild:Watcher = children[i].deepClone(index);
 +                w.addChild(clonedChild);
 +            }
 +        }
 +        
 +        // Return the cloned tree of watchers.
 +        return w;
 +    }
 +
 +    /**
 +	 *  @private
 +     *  Clone this watcher object itself, without cloning its children.
 +     *  The clone is not connec
 +     *  Subclasses must override this method to copy their properties.
 +     */
 +    protected function shallowClone():Watcher
 +    {
 +        return new Watcher();
 +    }
 +
 +    /**
 +	 *  @private
 +     */
 +    public function notifyListeners(commitEvent:Boolean):void
 +    {
 +        if (listeners)
 +        {
 +            var n:int = listeners.length;
 +
 +            for (var i:int = 0; i < n; i++)
 +            {
 +                listeners[i].watcherFired(commitEvent, cloneIndex);
 +            }
 +        }
 +    }
 +}
 +
 +}


[49/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
index 97423f9,823ecf9..647bea0
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
@@@ -42,18 -42,18 +42,18 @@@ package org.apache.flex.cor
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
           */
- 		COMPILE::AS3
+         COMPILE::SWF
          function get parent():DisplayObjectContainer;
          
 -        /**
 -         *  The parent.
 -         * 
 -         *  @langversion 3.0
 -         *  @playerversion Flash 10.2
 -         *  @playerversion AIR 2.6
 -         *  @productversion FlexJS 0.0
 -         */
 -        COMPILE::JS
 -        function get parent():IUIBase;
 +		/**
 +		 *  The parent.
 +		 * 
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 */
 +		COMPILE::JS
 +		function get parent():IUIBase;
  	}
  }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
index 32b1d71,ff25bd0..dcbac3a
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
@@@ -1112,11 -1082,10 +1112,11 @@@ package org.apache.flex.cor
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -		public function addElement(c:Object, dispatchEvent:Boolean = true):void
 +		public function addElement(c:IVisualElement):IVisualElement
  		{
-             COMPILE::AS3
+             COMPILE::SWF
              {
                  if (c is IUIBase)
                  {
@@@ -1142,11 -1109,10 +1142,11 @@@
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -        public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
 +        public function addElementAt(c:IVisualElement, index:int):IVisualElement
          {
-             COMPILE::AS3
+             COMPILE::SWF
              {
                  if (c is IUIBase)
                  {
@@@ -1180,11 -1144,11 +1180,11 @@@
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
           */
 -        public function getElementAt(index:int):Object
 +        public function getElementAt(index:int):IVisualElement
          {
-             COMPILE::AS3
+             COMPILE::SWF
              {
 -                return getChildAt(index);
 +                return getChildAt(index) as IVisualElement;
              }
              COMPILE::JS
              {
@@@ -1200,11 -1164,10 +1200,11 @@@
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -        public function getElementIndex(c:Object):int
 +        public function getElementIndex(c:IVisualElement):int
          {
-             COMPILE::AS3
+             COMPILE::SWF
              {
                  if (c is IUIBase)
                      return getChildIndex(IUIBase(c).element as DisplayObject);
@@@ -1232,11 -1194,10 +1232,11 @@@
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -        public function removeElement(c:Object, dispatchEvent:Boolean = true):void
 +        public function removeElement(c:IVisualElement):IVisualElement
          {
-             COMPILE::AS3
+             COMPILE::SWF
              {
                  if (c is IUIBase)
                      removeChild(IUIBase(c).element as DisplayObject);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as
index 9603c3d,0000000..132b797
mode 100644,000000..100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as
@@@ -1,71 -1,0 +1,71 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 org.apache.flex.utils
 +{
- 	COMPILE::AS3
++	COMPILE::SWF
 +	{
 +		import flash.system.Capabilities;
 +	}
 +	
 +	public class Display
 +	{
 +		public function Display()
 +		{
 +		}
 +		
 +		public static function get dpi():int
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return Capabilities.screenDPI;	
 +			}
 +			COMPILE::JS
 +			{
 +				// TODO (aharui)
 +				return 96;
 +			}
 +		}
 +
 +		public static function get width():int
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return Capabilities.screenResolutionX;	
 +			}
 +			COMPILE::JS
 +			{
 +				return screen.width;
 +			}
 +		}
 +
 +		public static function get height():int
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return Capabilities.screenResolutionY;	
 +			}
 +			COMPILE::JS
 +			{
 +				return screen.height;
 +			}
 +		}
 +	}
 +	
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
index d444c93,f280a04..5ee9209
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
@@@ -295,13 -293,16 +295,13 @@@ public class MXMLDataInterprete
          {
              comp.setMXMLDescriptor(document, children);                
          }
- 		if (parent && comp is IVisualElement)
- 		{
- 			if (parent is IContainer)
- 				(parent as IContainer).addElementNoChangeEvent(comp as IVisualElement);
- 			else
- 				parent.addElement(comp as IVisualElement);
- 		}
 -        COMPILE::SWF
 -        {
 -            if (parent && comp is DisplayObject)
 -                parent.addElement(comp, !(parent is IContainer));
 -        }
 -        COMPILE::JS
++        if (parent && comp is IVisualElement)
+         {
 -            if (parent && comp is IUIBase)
 -                parent.addElement(comp, !(parent is IContainer));
++            if (parent is IContainer)
++                (parent as IContainer).addElementNoChangeEvent(comp as IVisualElement);
++            else
++                parent.addElement(comp as IVisualElement);
+         }
          
          if (children)
          {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as
index dfce50e,0000000..35725cf
mode 100644,000000..100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as
@@@ -1,145 -1,0 +1,145 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 org.apache.flex.utils
 +{
- 	COMPILE::AS3
++	COMPILE::SWF
 +	{
 +		import flash.system.Capabilities;
 +	}
 +	
 +	public class Platform
 +	{
 +		public function Platform()
 +		{
 +		}
 +		
 +		public static const ANDROID:String = "Android";
 +		public static const BLACKBERRY:String = "Blackberry";
 +		public static const IOS:String = "IOS";
 +		public static const MAC:String = "Mac";
 +		public static const LINUX:String = "Linux";
 +		public static const WINDOWS:String = "windows";
 +
 +		
 +		private static var _isMobile:Boolean;
 +		public static function get isMobile():Boolean
 +		{
 +			return _isMobile;
 +		}
 +	
 +		private static var _isIPad:Boolean;
 +		public static function get isIPad():Boolean
 +		{
 +			return _isIPad;
 +		}
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		private static var _isAir:Boolean;
 +		
 +		public static function get isAir():Boolean
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return _isAir;					
 +			}
 +			COMPILE::JS
 +			{
 +				return false;
 +			}
 +		}
 +		
 +		private static var _isBrowser:Boolean;
 +		public static function get isBrowser():Boolean
 +		{
 +			return _isBrowser;
 +		}
 +		
 +		public static function get isFlash():Boolean
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return true;
 +			}
 +			COMPILE::JS
 +			{
 +				return false;
 +			}
 +		}
 +		
 +		private static var _platform:String;
 +		
 +		public static function get platform():String
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				if (!platform)
 +				{
 +					var cap: Class = Capabilities;
 +					var version:  String = Capabilities.version;
 +					var os: String = Capabilities.os;
 +					var playerType: String = Capabilities.playerType;
 +					
 +					if (version.indexOf("AND") > -1)
 +						_platform = ANDROID;
 +					else if (version.indexOf('IOS') > -1)
 +						_platform = IOS;
 +					else if (version.indexOf('QNX') > -1)
 +						_platform = BLACKBERRY;
 +					else if (os.indexOf("Mac OS") != -1)
 +						_platform = MAC;
 +					else if (os.indexOf("Windows") != -1)
 +						_platform = WINDOWS;
 +					else if (os.indexOf("Linux") != -1) // note that Android is also Linux
 +						_platform = LINUX;
 +
 +					
 +					_isIPad = os.indexOf('iPad') > -1;
 +					
 +					_isMobile = (_platform == ANDROID || _platform == IOS || _platform == BLACKBERRY);
 +						
 +						
 +					_isAir = playerType == "Desktop";
 +					_isBrowser = (playerType == "PlugIn" || playerType == "ActiveX");
 +					
 +				}
 +			}
 +			COMPILE::JS
 +			{
 +				if (navigator.userAgent.indexOf("iOS") != -1)
 +					_platform = IOS;
 +				else if (navigator.userAgent.indexOf("Android") != -1)
 +					_platform = ANDROID;
 +				else if (navigator.appVersion.indexOf("Win")!=-1)
 +					_platform = WINDOWS;
 +				else if (navigator.appVersion.indexOf("Mac")!=-1)
 +					_platform = MAC;
 +				else if (navigator.appVersion.indexOf("Linux")!=-1)
 +					_platform = LINUX;
 +				
 +				_isIPad = navigator.userAgent.indexOf('iPad') > -1;
 +				
 +				_isMobile = (_platform == ANDROID || _platform == IOS || _platform == BLACKBERRY);					
 +			}
 +			return _platform;
 +		}
 +
 +	}
 +	
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
index d9e9c23,be960a9..c661ad3
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
@@@ -58,32 -58,33 +58,32 @@@ package org.apache.flex.util
  		 *  @productversion FlexJS 0.0
           *  @flexjsignorecoercion HTMLElement
  		 */
- 		COMPILE::AS3
 -		public static function globalToLocal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
++		COMPILE::SWF
 +		public static function globalToLocal( pt:flash.geom.Point, local:Object ):org.apache.flex.geom.Point
  		{
 -            COMPILE::SWF
 -            {
 -                var fpt:flash.geom.Point = DisplayObject(local).globalToLocal(pt);
 -                return new org.apache.flex.geom.Point(fpt.x, fpt.y);
 -            }
 -            COMPILE::JS
 -            {
 -                var x:Number = pt.x;
 -                var y:Number = pt.y;
 -                var element:HTMLElement = local.element as HTMLElement;
 -                
 -                do {
 -                    x -= element.offsetLeft;
 -                    y -= element.offsetTop;
 -                    if (local.hasOwnProperty('parent')) {
 -                        local = local.parent;
 -                        element = local.element as HTMLElement;
 -                    } else {
 -                        element = null;
 -                    }
 -                }
 -                while (element);
 -                return new org.apache.flex.geom.Point(x, y);
 +            var fpt:flash.geom.Point = DisplayObject(local).globalToLocal(pt);
 +            return new org.apache.flex.geom.Point(fpt.x, fpt.y);
 +        }
  
 +		COMPILE::JS
 +		public static function globalToLocal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
 +        {
 +            var x:Number = pt.x;
 +            var y:Number = pt.y;
 +            var element:HTMLElement = local.element as HTMLElement;
 +            
 +            do {
 +                x -= element.offsetLeft;
 +                y -= element.offsetTop;
 +                if (local.hasOwnProperty('parent')) {
 +                    local = local.parent;
 +                    element = local.element as HTMLElement;
 +                } else {
 +                    element = null;
 +                }
              }
 +            while (element);
 +            return new org.apache.flex.geom.Point(x, y);
  		}
  		
          /**
@@@ -98,27 -99,27 +98,27 @@@
           *  @productversion FlexJS 0.0
           *  @flexjsignorecoercion HTMLElement
           */
- 		COMPILE::AS3
++		COMPILE::SWF
 +        public static function localToGlobal( pt:flash.geom.Point, local:Object ):org.apache.flex.geom.Point
 +        {
 +            var fpt:flash.geom.Point = DisplayObject(local).localToGlobal(pt);
 +            return new org.apache.flex.geom.Point(fpt.x, fpt.y);
 +        }
- 		
++               
 +        COMPILE::JS
- 		public static function localToGlobal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
+         public static function localToGlobal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
          {
 -            COMPILE::SWF
 -            {
 -                var fpt:flash.geom.Point = DisplayObject(local).localToGlobal(pt);
 -                return new org.apache.flex.geom.Point(fpt.x, fpt.y);
 -            }
 -            COMPILE::JS
 -            {
 -                var x:Number = pt.x;
 -                var y:Number = pt.y;
 -                var element:HTMLElement = local.element as HTMLElement;
 -                
 -                do {
 -                    x += element.offsetLeft;
 -                    y += element.offsetTop;
 -                    element = element.offsetParent as HTMLElement;
 -                }
 -                while (element);
 -                return new org.apache.flex.geom.Point(x, y);
 +            var x:Number = pt.x;
 +            var y:Number = pt.y;
 +            var element:HTMLElement = local.element as HTMLElement;
 +            
 +            do {
 +                x += element.offsetLeft;
 +                y += element.offsetTop;
 +                element = element.offsetParent as HTMLElement;
              }
 +            while (element);
 +            return new org.apache.flex.geom.Point(x, y);
          }
  	}
  }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
index 7621e98,d1cec4a..8c2d1a2
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Proxy.as
@@@ -42,10 -42,10 +42,10 @@@ COMPILE::J
   *  @playerversion AIR 2.6
   *  @productversion FlexJS 0.0
   */
- COMPILE::AS3
+ COMPILE::SWF
  public dynamic class Proxy extends flash.utils.Proxy
  {
 -	private var valueMap:Object = {};
 +	protected var valueMap:Object = {};
  	
  	override flash_proxy function getProperty(propName:*):*
  	{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Container.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/View.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
index 1fe7283,5ac4e54..ddfa1df
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
@@@ -102,49 -102,7 +102,49 @@@ package org.apache.flex.core.graphic
              }
  		}
  
- 		/**
- 		 *  Draw the rectangle.
- 		 *  @param x The x position of the top-left corner of the rectangle.
- 		 *  @param y The y position of the top-left corner.
- 		 *  @param width The width of the rectangle.
- 		 *  @param height The height of the rectangle.
- 		 *  @param rx The width of the ellipse that draws the rounded corners.
- 		 *  @param ry The height of the ellipse that draws the rounded corners.
- 		 *
- 		 *  @langversion 3.0
- 		 *  @playerversion Flash 10.2
- 		 *  @playerversion AIR 2.6
- 		 *  @productversion FlexJS 0.0.3
- 		 *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- 		 */
- 		public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, rx:Number, ry:Number):void
- 		{
- 			COMPILE::AS3
- 			{
- 				applyStroke();
- 				beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
- 				graphics.drawRoundRect(x, y, width, height, rx, ry);
- 				endFill();
- 			}
- 			COMPILE::JS
- 			{
- 				var style:String = getStyleStr();
- 				var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
- 				rect.flexjs_wrapper = this;
- 				rect.style.left = x;
- 				rect.style.top = y;
- 				rect.setAttribute('style', style);
- 				rect.setAttribute('x', String(x) + 'px');
- 				rect.setAttribute('y', String(y) + 'px');
- 				rect.setAttribute('width', String(width) + 'px');
- 				rect.setAttribute('height', String(height) + 'px');
- 				rect.setAttribute('rx', String(rx) + 'px');
- 				rect.setAttribute('ry', String(ry) + 'px');
- 				element.appendChild(rect);
- 			}
- 		}
- 		
-         COMPILE::AS3
++        /**
++         *  Draw the rectangle.
++         *  @param x The x position of the top-left corner of the rectangle.
++         *  @param y The y position of the top-left corner.
++         *  @param width The width of the rectangle.
++         *  @param height The height of the rectangle.
++         *  @param rx The width of the ellipse that draws the rounded corners.
++         *  @param ry The height of the ellipse that draws the rounded corners.
++         *
++         *  @langversion 3.0
++         *  @playerversion Flash 10.2
++         *  @playerversion AIR 2.6
++         *  @productversion FlexJS 0.0.3
++         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
++         */
++        public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, rx:Number, ry:Number):void
++        {
++            COMPILE::SWF
++            {
++                applyStroke();
++                beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
++                graphics.drawRoundRect(x, y, width, height, rx, ry);
++                endFill();
++            }
++            COMPILE::JS
++            {
++                var style:String = getStyleStr();
++                var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
++                rect.flexjs_wrapper = this;
++                rect.style.left = x;
++                rect.style.top = y;
++                rect.setAttribute('style', style);
++                rect.setAttribute('x', String(x) + 'px');
++                rect.setAttribute('y', String(y) + 'px');
++                rect.setAttribute('width', String(width) + 'px');
++                rect.setAttribute('height', String(height) + 'px');
++                rect.setAttribute('rx', String(rx) + 'px');
++                rect.setAttribute('ry', String(ry) + 'px');
++                element.appendChild(rect);
++            }
++        }
++
+         COMPILE::SWF
  		public function createRect(x:Number, y:Number, width:Number, height:Number):void
  		{
  			var color:uint = (fill as SolidColor).color;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as
index 730da0d,0000000..ee5150e
mode 100644,000000..100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as
@@@ -1,130 -1,0 +1,130 @@@
 +/**
 + * Licensed 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 org.apache.flex.core.graphics
 +{
-     COMPILE::AS3
++    COMPILE::SWF
 +    {
 +        import flash.display.CapsStyle;
 +        import flash.display.JointStyle;
 +        import flash.geom.Point;
 +        import flash.geom.Rectangle;            
 +    }
 +    COMPILE::JS
 +    {
 +        import org.apache.flex.core.WrappedHTMLElement;
 +    }
 +
 +	public class RoundRect extends GraphicShape
 +	{
 +		
 +		/**
 +		 *  Draw the rectangle.
 +		 *  @param x The x position of the top-left corner of the rectangle.
 +		 *  @param y The y position of the top-left corner.
 +		 *  @param width The width of the rectangle.
 +		 *  @param height The height of the rectangle.
 +		 *  @param rx The width of the ellipse that draws the rounded corners.
 +		 *  @param ry The height of the ellipse that draws the rounded corners.
 +		 *
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
 +		 */
 +		public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, rx:Number, ry:Number):void
 +		{
-             COMPILE::AS3
++            COMPILE::SWF
 +            {
 +                graphics.clear();
 +                applyStroke();
 +                beginFill(new Rectangle(x, y, width, height), new Point(x,y));
 +                graphics.drawRoundRect(x, y, width, height, rx, ry);
 +                endFill();                    
 +            }
 +            COMPILE::JS
 +            {
 +                var style:String = this.getStyleStr();
 +                var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
 +                rect.flexjs_wrapper = this;
 +                rect.setAttribute('style', style);
 +                if (stroke)
 +                {
 +                    rect.setAttribute('x', String(stroke.weight / 2) + 'px');
 +                    rect.setAttribute('y', String(stroke.weight / 2) + 'px');
 +                    setPosition(x, y, stroke.weight, stroke.weight);
 +                }
 +                else
 +                {
 +                    rect.setAttribute('x', '0' + 'px');
 +                    rect.setAttribute('y', '0' + 'px');
 +                    setPosition(x, y, 0, 0);
 +                }
 +                rect.setAttribute('width', String(width) + 'px');
 +                rect.setAttribute('height', String(height) + 'px');
 +				rect.setAttribute('rx', String(rx) + 'px');
 +				rect.setAttribute('ry', String(ry) + 'px');
 +                element.appendChild(rect);
 +                
 +                resize(x, y, rect['getBBox']());
 +            }
 +		}
 +		
 +		override protected function draw():void
 +		{
 +			drawRoundRect(0,0,width,height, rx, ry);
 +		}
 +		
 +		private var _rx:Number;
 +		private var _ry:Number;
 +		
 +		public function get rx():Number
 +		{
 +			return _rx;
 +		}
 +		
 +		/**
 +		 *  The width of the ellipse used to draw the rounded corners.
 +		 *
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 9
 +		 *  @playerversion AIR 1.1
 +		 *  @productversion FlexJS 0.0
 +		 */
 +		public function set rx(value:Number):void
 +		{
 +			_rx = value;
 +		}
 +		
 +		public function get ry():Number
 +		{
 +			return _ry;
 +		}
 +		/**
 +		 *  The height of the ellipse used to draw the rounded corners.
 +		 *
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 9
 +		 *  @playerversion AIR 1.1
 +		 *  @productversion FlexJS 0.0
 +		 */
 +		public function set ry(value:Number):void
 +		{
 +			_ry = value;
 +		}
 +		
 +
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/HTML/.actionScriptProperties
----------------------------------------------------------------------
diff --cc frameworks/projects/HTML/.actionScriptProperties
index 5178ac2,dac63a4..a7c1c92
--- a/frameworks/projects/HTML/.actionScriptProperties
+++ b/frameworks/projects/HTML/.actionScriptProperties
@@@ -1,6 -1,24 +1,6 @@@
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<!--
 -
 -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.
 -
 --->
  <actionScriptProperties analytics="false" mainApplicationPath="HTML.as" projectUUID="10468643-4626-481f-ba6b-3f035ccbbabb" version="11">
-   <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+   <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
      <compilerSourcePath/>
      <libraryPath defaultLinkType="0">
        <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/WebBrowserView.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/config/compile-as-config.xml
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/config/compile-as-config.xml
index c8d699d,0000000..55b8403
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/config/compile-as-config.xml
+++ b/frameworks/projects/MX/src/main/config/compile-as-config.xml
@@@ -1,99 -1,0 +1,99 @@@
 +<!--
 +
 +  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.
 +
 +-->
 +<flex-config>
 +
 +    <compiler>
 +        <accessible>false</accessible>
 +        
 +        <external-library-path>
 +            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
 +            <path-element>../../../../../libs/Binding.swc</path-element>
 +            <path-element>../../../../../libs/Core.swc</path-element>
 +            <path-element>../../../../../libs/Graphics.swc</path-element>
 +            <path-element>../../../../../libs/Collections.swc</path-element>
 +            <path-element>../../../../../libs/Reflection.swc</path-element>
 +        </external-library-path>
 +        
 +        <!-- Conditional compilation for the framework performance instrumentation code. -->
 +        <define>
 +            <name>CONFIG::performanceInstrumentation</name>
 +            <value>false</value>
 +        </define>
 +        <define>
-             <name>COMPILE::AS3</name>
++            <name>COMPILE::SWF</name>
 +            <value>true</value>
 +        </define>
 +        <define>
 +            <name>COMPILE::JS</name>
 +            <value>false</value>
 +        </define>
 +        <define>
 +            <name>COMPILE::LATER</name>
 +            <value>false</value>
 +        </define>
 +        
 +		<mxml>
 +			<children-as-data>true</children-as-data>
 +		</mxml>
 +		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
 +		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
 +		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
 +
 +        <keep-as3-metadata>
 +          <name>Bindable</name>
 +          <name>Managed</name>
 +          <name>ChangeEvent</name>
 +          <name>NonCommittingChangeEvent</name>
 +          <name>Transient</name>
 +        </keep-as3-metadata>
 +	  
 +        <locale/>
 +        
 +        <namespaces>
 +            <namespace>
 +                <uri>library://ns.apache.org/flexjs/mx</uri>
 +                <manifest>../resources/mx-manifest.xml</manifest>
 +            </namespace>
 +        </namespaces>
 +        
 +        <source-path>
 +            <path-element>../flex</path-element>
 +        </source-path>
 +        
 +        <warn-no-constructor>false</warn-no-constructor>
 +    </compiler>
 +    
 +    <include-file>
 +    </include-file>
 +
 +    <include-sources>
 +    </include-sources>
 +    
 +    <include-classes>
 +        <class>MXClasses</class>
 +    </include-classes>
 +    
 +    <include-namespaces>
 +        <uri>library://ns.apache.org/flexjs/mx</uri>
 +    </include-namespaces>
 +        
 +    <target-player>${playerglobal.version}</target-player>
 +	
 +
 +</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/DisplayObject.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/DisplayObject.as
index bf0598b,0000000..a0ddc3a
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/DisplayObject.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/DisplayObject.as
@@@ -1,39 -1,0 +1,39 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +	import flash.display.DisplayObjectContainer;		
 +}
 +import flex.display.TopOfDisplayList;
 +
 +import org.apache.flex.core.IUIBase;
 +import org.apache.flex.events.IEventDispatcher;
 +import org.apache.flex.geom.Point;
 +import org.apache.flex.geom.Rectangle;
 +
 +public interface DisplayObject extends IEventDispatcher, IUIBase
 +{
 +	include "../../mx/core/IDisplayObjectInterface.as"    
 +	
 +	function get topOfDisplayList():TopOfDisplayList;
 +}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/DisplayObjectContainer.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/DisplayObjectContainer.as
index a6b7053,0000000..b992d46
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/DisplayObjectContainer.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/DisplayObjectContainer.as
@@@ -1,29 -1,0 +1,29 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
 +	import org.apache.flex.core.IUIBase;
 +	import org.apache.flex.geom.Point;
 +
 +	public interface DisplayObjectContainer extends InteractiveObject, IUIBase
 +	{
 +		include "../../mx/core/IDisplayObjectContainerInterface.as"    
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
index 55ab4bb,0000000..bee750c
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
@@@ -1,89 -1,0 +1,89 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
 +	import org.apache.flex.core.graphics.GraphicsContainer;
 +	import org.apache.flex.core.graphics.SolidColor;
 +	
 +	public class Graphics
 +	{
 +		private var host:GraphicsContainer;
 +		
 +		public function Graphics(host:GraphicsContainer)
 +		{
 +			this.host = host;
 +		}
 +		
 +		public function beginFill(color:uint, alpha:Number = 1.0):void
 +		{
 +			var sc:SolidColor = new SolidColor();
 +			sc.color = color;
 +			host.fill = sc;
 +		}
 +		
 +		public function drawRect(x:Number, y:Number, width:Number, height:Number):void
 +		{
 +			host.drawRect(x, y, width, height);	
 +		}
 +		
 +		public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, rx:Number, ry:Number):void
 +		{
 +			host.drawRoundRect(x, y, width, height, rx, ry);	
 +		}
 +		
 +		public function clear():void
 +		{
 +			host.removeAllElements();
 +		}
 +		
 +		private var lastX:Number = 0;
 +		private var lastY:Number = 0;
 +		
 +		public function moveTo(x:Number, y:Number):void
 +		{
 +			lastX = x;
 +			lastY = y;
 +		}
 +		
 +		public function lineTo(x:Number, y:Number):void
 +		{
 +			var path:String = "M " + lastX.toString() + " " + lastY.toString();
 +			path += "L " + x.toString() + " " + y.toString();
 +			host.drawPath(path);
 +			lastX = x;
 +			lastY = y;
 +		}
 +		
 +		public function curveTo(mx:Number, my:Number, x:Number, y:Number):void
 +		{
 +			var path:String = "M " + lastX.toString() + " " + lastY.toString();
 +			path += "Q " + mx.toString() + " " + my.toString() + " "
 +						+ x.toString() + " " + y.toString();
 +			host.drawPath(path);
 +			lastX = x;
 +			lastY = y;
 +		}
 +		
 +		public function endFill():void
 +		{
 +			// really, we should queue up the drawing commands and execute them here.
 +		}
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/InteractiveObject.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/InteractiveObject.as
index b2e542c,0000000..e62ebc4
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/InteractiveObject.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/InteractiveObject.as
@@@ -1,35 -1,0 +1,35 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
 +	public interface InteractiveObject extends DisplayObject
 +	{
 +		/** 
 +		 *  @copy flash.display.InteractiveObject#tabIndex
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 9
 +		 *  @playerversion AIR 1.1
 +		 *  @productversion Flex 3
 +		 */
 +		function get tabIndex():int;
 +		function set tabIndex(index:int):void;		
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/Loader.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/Loader.as
index 78bec64,0000000..285b82a
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Loader.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Loader.as
@@@ -1,27 -1,0 +1,27 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
 +	// keeps UIComponent happy when compiling
 +	public interface Loader extends DisplayObjectContainer
 +	{
 +		
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
index 5faeebb,0000000..2ce5c93
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
@@@ -1,75 -1,0 +1,75 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
- 	COMPILE::AS3
++	COMPILE::SWF
 +	{
 +		import flash.display.LoaderInfo;		
 +	}
 +
 +	public class ModuleInfo
 +	{
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		private var loaderInfo:LoaderInfo;
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		public function ModuleInfo(loaderInfo:LoaderInfo)
 +		{
 +			this.loaderInfo = loaderInfo;
 +		}
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		public function get height():Number
 +		{
 +			return loaderInfo.height;			
 +		}
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		public function get width():Number
 +		{
 +			return loaderInfo.width;
 +		}
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		public function get url():String
 +		{
 +			return loaderInfo.url;
 +		}
 +		
 +		COMPILE::JS
 +		public function get height():Number
 +		{
 +			return document.height;			
 +		}
 +		
 +		COMPILE::JS
 +		public function get width():Number
 +		{
 +			return document.width;
 +		}
 +		
 +		COMPILE::JS
 +		public function get url():String
 +		{
 +			return document.URL;
 +		}
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/MovieClip.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/MovieClip.as
index 8add311,0000000..b537568
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/MovieClip.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/MovieClip.as
@@@ -1,223 -1,0 +1,223 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
 +	import org.apache.flex.core.IBead;
 +	import org.apache.flex.core.IBeadModel;
 +	import org.apache.flex.core.IBeadView;
 +	import org.apache.flex.core.IFlexJSElement;
 +	import org.apache.flex.core.ValuesManager;
 +	import org.apache.flex.events.Event;
 +	import org.apache.flex.events.IEventDispatcher;
 +
- 	COMPILE::AS3
++	COMPILE::SWF
 +	{
 +		import flash.display.MovieClip;
 +	}
 +	COMPILE::JS
 +	{
 +		import flex.display.DisplayObjectContainer;
 +	}
 +	
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public class MovieClip extends flash.display.MovieClip
 +	{
- 		COMPILE::AS3
++		COMPILE::SWF
 +		private var _model:IBeadModel;
 +		
 +		/**
 +		 *  An IBeadModel that serves as the data model for the component.
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 */
- 		COMPILE::AS3
++		COMPILE::SWF
 +		public function get model():Object
 +		{
 +			if (_model == null)
 +			{
 +				// addbead will set _model
 +				addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
 +			}
 +			return _model;
 +		}
 +		
 +		/**
 +		 *  @private
 +		 */
- 		COMPILE::AS3
++		COMPILE::SWF
 +		public function set model(value:Object):void
 +		{
 +			if (_model != value)
 +			{
 +				addBead(value as IBead);
 +				dispatchEvent(new Event("modelChanged"));
 +			}
 +		}
 +		
 +		private var _view:IBeadView;
 +		
 +		/**
 +		 *  An IBeadView that serves as the view for the component.
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion Class
 +		 */
 +		public function get view():IBeadView
 +		{
 +			if (_view == null)
 +			{
 +				var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
 +				if (c)
 +				{
 +					if (c)
 +					{
 +						_view = (new c()) as IBeadView;
 +						addBead(_view);
 +					}
 +				}
 +			}
 +			return _view;
 +		}
 +		
 +		/**
 +		 *  @private
 +		 */
 +		public function set view(value:IBeadView):void
 +		{
 +			if (_view != value)
 +			{
 +				addBead(value as IBead);
 +				dispatchEvent(new Event("viewChanged"));
 +			}
 +		}
 +		
 +		/**
 +		 *  @copy org.apache.flex.core.IUIBase#element
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 */
 +		public function get element():IFlexJSElement
 +		{
 +			return this;
 +		}
 +		
 +		/**
 +		 *  @copy org.apache.flex.core.Application#beads
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 */
 +		public var beads:Array;
 +		
 +		private var _beads:Vector.<IBead>;
 +		
 +		/**
 +		 *  @copy org.apache.flex.core.IStrand#addBead()
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 */        
 +		override public function addBead(bead:IBead):void
 +		{
 +			if (!_beads)
 +				_beads = new Vector.<IBead>;
 +			_beads.push(bead);
 +			if (bead is IBeadModel)
 +				_model = bead as IBeadModel;
 +			else if (bead is IBeadView)
 +				_view = bead as IBeadView;
 +			bead.strand = this;
 +			
 +			if (bead is IBeadView) {
 +				IEventDispatcher(this).dispatchEvent(new Event("viewChanged"));
 +			}
 +		}
 +		
 +		/**
 +		 *  @copy org.apache.flex.core.IStrand#getBeadByType()
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 */
 +		public function getBeadByType(classOrInterface:Class):IBead
 +		{
 +			for each (var bead:IBead in _beads)
 +			{
 +				if (bead is classOrInterface)
 +					return bead;
 +			}
 +			return null;
 +		}
 +		
 +		/**
 +		 *  @copy org.apache.flex.core.IStrand#removeBead()
 +		 *  
 +		 *  @langversion 3.0
 +		 *  @playerversion Flash 10.2
 +		 *  @playerversion AIR 2.6
 +		 *  @productversion FlexJS 0.0
 +		 */
 +		public function removeBead(value:IBead):IBead	
 +		{
 +			var n:int = _beads.length;
 +			for (var i:int = 0; i < n; i++)
 +			{
 +				var bead:IBead = _beads[i];
 +				if (bead == value)
 +				{
 +					_beads.splice(i, 1);
 +					return bead;
 +				}
 +			}
 +			return null;
 +		}
 +		
 +		
 +	}
 +	
 +	COMPILE::JS
 +	public class MovieClip extends Sprite
 +	{
 +		public function get totalFrames():int
 +		{
 +			return 1;
 +		}
 +		public function get framesLoaded():int
 +		{
 +			return 1;
 +		}
 +		
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/Shape.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/Shape.as
index 2593600,0000000..bfcd184
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Shape.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Shape.as
@@@ -1,114 -1,0 +1,114 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{	
 +	import org.apache.flex.core.graphics.GraphicsContainer;
 +	import org.apache.flex.geom.Point;
 +	import org.apache.flex.utils.PointUtils;
 +	import mx.managers.SystemManagerGlobals;
 +	
 +	public class Shape extends GraphicsContainer
 +	{
 +		COMPILE::JS
 +		private var _name:String;
 +		COMPILE::JS
 +		public function get name():String
 +		{
 +			return _name;
 +		}
 +		COMPILE::JS
 +		public function set name(value:String):void
 +		{
 +			_name = value;
 +		}
 +		
 +		/**
 +		 *  @flexjsignorecoercion flex.display.TopOfDisplayList
 +		 */
 +		public function get topOfDisplayList():TopOfDisplayList
 +		{
 +			return topMostEventDispatcher as TopOfDisplayList;
 +		}
 +
 +		COMPILE::JS
 +		/**
 +		 *  @flexjsignorecoercion flex.display.DisplayObject
 +		 */
 +		public function get root():DisplayObject
 +		{
 +			return topMostEventDispatcher as DisplayObject;
 +		}
 +		
 +		COMPILE::JS
 +		/**
 +		 *  @flexjsignorecoercion flex.display.DisplayObject
 +		 */
 +		public function contains(child:DisplayObject):Boolean
 +		{
 +			while (child)
 +			{
 +				if (child.parent == this)
 +					return true;
 +				child = child.parent as DisplayObject;
 +			}
 +			return topMostEventDispatcher as DisplayObject;
 +		}
 +		
 +		COMPILE::JS
 +		private var _graphics:Graphics;
 +		
 +		COMPILE::JS
 +		/**
 +		 *  @flexjsignorecoercion flex.display.DisplayObject
 +		 */
 +		public function get graphics():Graphics
 +		{
 +			if (!_graphics)
 +				_graphics = new Graphics(this);
 +			return _graphics
 +		}
 +
 +		COMPILE::JS
 +		public function get mouseX():Number
 +		{
 +			var pt:Point = new Point(SystemManagerGlobals.lastMouseEvent.screenX,
 +									 SystemManagerGlobals.lastMouseEvent.screenY);
 +			pt = PointUtils.globalToLocal(pt, this);
 +			return pt.x;
 +		}
 +		
 +		COMPILE::JS
 +		public function get mouseY():Number
 +		{
 +			var pt:Point = new Point(SystemManagerGlobals.lastMouseEvent.screenX,
 +				SystemManagerGlobals.lastMouseEvent.screenY);
 +			pt = PointUtils.globalToLocal(pt, this);
 +			return pt.x;
 +		}
 +		
 +		COMPILE::JS
 +		override public function get parent():DisplayObjectContainer
 +		{
 +			return super.parent as DisplayObjectContainer;
 +		}
 +
 +	}
 +	
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
index 045039e,0000000..6b6d668
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
@@@ -1,179 -1,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 flex.display
 +{	
 +	import org.apache.flex.core.graphics.GraphicsContainer;
 +	import org.apache.flex.geom.Point;
 +	import org.apache.flex.utils.PointUtils;
 +	import mx.managers.SystemManagerGlobals;
 +	
 +	public class Sprite extends GraphicsContainer implements DisplayObjectContainer
 +	{
 +		COMPILE::JS
 +		private var _name:String;
 +		COMPILE::JS
 +		public function get name():String
 +		{
 +			return _name;
 +		}
 +		COMPILE::JS
 +		public function set name(value:String):void
 +		{
 +			_name = value;
 +		}
 +		
 +		COMPILE::JS
 +		public function get numChildren():int
 +		{
 +			return numElements;
 +		}
 +		
 +		COMPILE::JS
 +		public function getChildAt(index:int):DisplayObject
 +		{
 +			return getElementAt(index) as DisplayObject;
 +		}
 +		
 +		COMPILE::JS
 +		public function getChildByName(name:String):DisplayObject
 +		{
 +			for (var i:int = 0; i < numChildren; i++)
 +			{
 +				if (getChildAt(i).name == name)
 +					return getChildAt(i);
 +			}
 +			return null;
 +		}
 +		
 +		COMPILE::JS
 +		public function getChildIndex(child:DisplayObject):int
 +		{
 +			return getElementIndex(child);
 +		}
 +		
 +		COMPILE::JS
 +		public function setChildIndex(child:DisplayObject, index:int):void
 +		{
 +			removeElement(child);
 +			addElementAt(child, index);
 +		}
 +		
 +		COMPILE::JS
 +		public function addChild(child:DisplayObject):DisplayObject
 +		{
 +			addElement(child);
 +			return child;
 +		}
 +		
 +		COMPILE::JS
 +		public function addChildAt(child:DisplayObject, index:int):DisplayObject
 +		{
 +			addElementAt(child, index);
 +			return child;
 +		}
 +		
 +		COMPILE::JS
 +		public function removeChild(child:DisplayObject):DisplayObject
 +		{
 +			removeElement(child);
 +			return child;
 +		}
 +		
 +		COMPILE::JS
 +		public function removeChildAt(index:int):DisplayObject
 +		{
 +			var child:DisplayObject = getChildAt(index);
 +			removeElement(child);
 +			return child;
 +		}
 +		
 +		/**
 +		 *  @flexjsignorecoercion flex.display.TopOfDisplayList
 +		 */
 +		public function get topOfDisplayList():TopOfDisplayList
 +		{
 +			return topMostEventDispatcher as TopOfDisplayList;
 +		}
 +
 +		COMPILE::JS
 +		/**
 +		 *  @flexjsignorecoercion flex.display.DisplayObject
 +		 */
 +		public function get root():DisplayObject
 +		{
 +			return topMostEventDispatcher as DisplayObject;
 +		}
 +		
 +		COMPILE::JS
 +		/**
 +		 *  @flexjsignorecoercion flex.display.DisplayObject
 +		 */
 +		public function contains(child:DisplayObject):Boolean
 +		{
 +			while (child)
 +			{
 +				if (child.parent == this)
 +					return true;
 +				child = child.parent as DisplayObject;
 +			}
 +			return topMostEventDispatcher as DisplayObject;
 +		}
 +		
 +		COMPILE::JS
 +		private var _graphics:Graphics;
 +		
 +		COMPILE::JS
 +		/**
 +		 *  @flexjsignorecoercion flex.display.DisplayObject
 +		 */
 +		public function get graphics():Graphics
 +		{
 +			if (!_graphics)
 +				_graphics = new Graphics(this);
 +			return _graphics
 +		}
 +
 +		COMPILE::JS
 +		public function get mouseX():Number
 +		{
 +			var pt:Point = new Point(SystemManagerGlobals.lastMouseEvent.screenX,
 +									 SystemManagerGlobals.lastMouseEvent.screenY);
 +			pt = PointUtils.globalToLocal(pt, this);
 +			return pt.x;
 +		}
 +		
 +		COMPILE::JS
 +		public function get mouseY():Number
 +		{
 +			var pt:Point = new Point(SystemManagerGlobals.lastMouseEvent.screenX,
 +				SystemManagerGlobals.lastMouseEvent.screenY);
 +			pt = PointUtils.globalToLocal(pt, this);
 +			return pt.x;
 +		}
 +		
 +		COMPILE::JS
 +		override public function get parent():DisplayObjectContainer
 +		{
 +			return super.parent as DisplayObjectContainer;
 +		}
 +
 +	}
 +	
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/display/TopOfDisplayList.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/display/TopOfDisplayList.as
index e5ef3e4,0000000..b56732f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/TopOfDisplayList.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/TopOfDisplayList.as
@@@ -1,82 -1,0 +1,82 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.display
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.Stage;
 +}
 +COMPILE::JS
 +{
 +	import org.apache.flex.core.UIBase;
 +	import org.apache.flex.core.HTMLElementWrapper;
 +	import org.apache.flex.core.WrappedHTMLElement;
 +}
 +
- COMPILE::AS3
++COMPILE::SWF
 +public class TopOfDisplayList extends Stage
 +{
 +	public function TopOfDisplayList(stage:Stage)
 +	{
 +		super();
 +		_stage = stage;
 +	}
 +	
 +	override public function get width():Number
 +	{
 +		return _stage.stageWidth;
 +	}
 +	
 +	override public function get height():Number
 +	{
 +		return _stage.stageHeight;
 +	}
 +	
 +	private var _stage:Stage;
 +	
 +}
 +
 +COMPILE::JS
 +public class TopOfDisplayList extends Sprite
 +{
 +	public function TopOfDisplayList()
 +	{
 +		super();
 +	}
 +	
 +	/**
 +	 * @flexjsignorecoercion flex.display.InteractiveObject
 +	 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
 +	 */
 +	public function get focus():InteractiveObject
 +	{
 +		return (document.activeElement as WrappedHTMLElement).flexjs_wrapper as InteractiveObject;
 +	}
 +	
 +	/**
 +	 * @flexjsignorecoercion org.apache.flex.core.HTMLElementWrapper
 +	 */
 +	public function set focus(value:InteractiveObject):void
 +	{
 +		document.activeElement = (value as HTMLElementWrapper).element;
 +	}
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/ContextMenuEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/ContextMenuEvent.as
index caad1be,0000000..1bede01
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/ContextMenuEvent.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/ContextMenuEvent.as
@@@ -1,12 -1,0 +1,12 @@@
 +package flex.events
 +{	
 +	public class ContextMenuEvent extends Event
 +	{
 +		public function ContextMenuEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 +		{
 +			super(type, bubbles, cancelable);
 +		}
 +		
 +		public static const MENU_SELECT:String = "menuSelect";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/Event.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/Event.as
index db77ff6,0000000..fa60732
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/Event.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/Event.as
@@@ -1,23 -1,0 +1,23 @@@
 +package flex.events
 +{
 +	import org.apache.flex.events.Event;
 +	
 +	public class Event extends org.apache.flex.events.Event
 +	{
 +		public function Event(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 +		{
 +			super(type, bubbles, cancelable);
 +		}
 +		
 +		protected var bubbles:Boolean;
 +		protected var cancelable:Boolean;
 +		
 +		public static const ADDED:String = "added";
 +		public static const CHANGE:String = "change";
 +		public static const COMPLETE:String = "change";
 +		public static const ENTER_FRAME:String = "enterFrame";
 +		public static const REMOVED:String = "removed";
 +		public static const REMOVED_FROM_STAGE:String = "removedFromStage";
 +		public static const RESIZE:String = "resize";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/EventPhase.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/EventPhase.as
index 8f9db3b,0000000..33bdd5d
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/EventPhase.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/EventPhase.as
@@@ -1,13 -1,0 +1,13 @@@
 +package flex.events
 +{
 +	public class EventPhase
 +	{
 +		public function EventPhase()
 +		{
 +		}
 +		
 +		public static const AT_TARGET:int = 2;
 +		public static const BUBBLING_PHASE:int = 3;
 +		public static const CAPTURING_PHASE:int = 1;
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/FocusEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/FocusEvent.as
index e529f15,0000000..c7fe636
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/FocusEvent.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/FocusEvent.as
@@@ -1,39 -1,0 +1,39 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.events
 +{	
 +    import flex.display.InteractiveObject;
 +	
 +	public class FocusEvent extends Event
 +	{
 +		public function FocusEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, relatedObject:InteractiveObject = null,
 +			shiftKey:Boolean = false, keyCode:uint = 0, direction:String = "none")
 +		{
 +			super(type, bubbles, cancelable);
 +			this.relatedObject = relatedObject;
 +		}
 +		
 +		public var relatedObject:InteractiveObject;
 +		public var keyCode:uint;
 +		public var shiftKey:Boolean;
 +		
 +		public static const FOCUS_IN:String = "focusIn";
 +		public static const FOCUS_OUT:String = "focusOut";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/IEventDispatcher.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/IEventDispatcher.as
index e1017e4,0000000..c65a9aa
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/IEventDispatcher.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/IEventDispatcher.as
@@@ -1,10 -1,0 +1,10 @@@
 +package flex.events
 +{
 +	import org.apache.flex.events.IEventDispatcher;
 +	
 +	public interface IEventDispatcher extends org.apache.flex.events.IEventDispatcher
 +	{
 +		function get bindingEventDispatcher():org.apache.flex.events.IEventDispatcher;
 +		function get effectEventDispatcher():org.apache.flex.events.IEventDispatcher;
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/IOErrorEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/IOErrorEvent.as
index bfda542,0000000..ba1acfe
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/IOErrorEvent.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/IOErrorEvent.as
@@@ -1,12 -1,0 +1,12 @@@
 +package flex.events
 +{	
 +	public class IOErrorEvent extends Event
 +	{
 +		public function IOErrorEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 +		{
 +			super(type, bubbles, cancelable);
 +		}
 +		
 +		public static const IO_ERROR:String = "ioError";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
index 012b376,0000000..5a65b6f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
@@@ -1,17 -1,0 +1,17 @@@
 +package flex.events
 +{	
 +	public class ProgressEvent extends Event
 +	{
 +		public function ProgressEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
 +									bytesLoaded:int = 0, bytesTotal:int = 0)
 +		{
 +			super(type, bubbles, cancelable);
 +			this.bytesLoaded = bytesLoaded;
 +			this.bytesTotal = bytesTotal;
 +		}
 +		
 +		public var bytesLoaded:int;
 +		public var bytesTotal:int;
 +		public static const PROGRESS:String = "progress";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/events/TimerEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/events/TimerEvent.as
index cd41889,0000000..46ee9eb
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/TimerEvent.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/TimerEvent.as
@@@ -1,30 -1,0 +1,30 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.events
 +{	
 +	public class TimerEvent extends Event
 +	{
 +		public function TimerEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
 +		{
 +			super(type, bubbles, cancelable);
 +		}
 +		
 +		public static const TIMER:String = "timer";
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/system/DefinitionManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/system/DefinitionManager.as
index 1730181,0000000..6f3acbe
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/system/DefinitionManager.as
+++ b/frameworks/projects/MX/src/main/flex/flex/system/DefinitionManager.as
@@@ -1,81 -1,0 +1,81 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 flex.system
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.system.ApplicationDomain;		
 +}
 +
 +	public class DefinitionManager
 +	{
- 		COMPILE::AS3
++		COMPILE::SWF
 +		public function DefinitionManager(appdom:ApplicationDomain = null)
 +		{
 +			if (appdom)
 +				this.appdom = appdom;
 +			else
 +				this.appdom = ApplicationDomain.currentDomain;
 +		}
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		private var appdom:ApplicationDomain;
 +		
 +		public function hasDefinition(name:String):Boolean
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return appdom.hasDefinition(name);
 +			}
 +			COMPILE::JS
 +			{
 +				var parts:Array = name.split(".");
 +				var obj:* = window;
 +				for each (var part:String in parts)
 +				{
 +					obj = obj[part];
 +					if (obj === undefined)
 +						return false;
 +				}
 +				return true;
 +			}
 +		}
 +		
 +		public function getDefinition(name:String):Object
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return appdom.getDefinition(name);
 +			}
 +			COMPILE::JS
 +			{
 +				var parts:Array = name.split(".");
 +				var obj:* = window;
 +				for each (var part:String in parts)
 +				{
 +					obj = obj[part];
 +					if (obj === undefined)
 +						throw new Error("definition not found");
 +				}
 +				return obj;				
 +			}
 +		}
 +	}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/flex/system/I18NManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/flex/system/I18NManager.as
index 68e6cf4,0000000..d95d349
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/flex/system/I18NManager.as
+++ b/frameworks/projects/MX/src/main/flex/flex/system/I18NManager.as
@@@ -1,31 -1,0 +1,31 @@@
 +package flex.system
 +{
- 	COMPILE::AS3
++	COMPILE::SWF
 +	{
 +	import flash.system.Capabilities;
 +	}
 +	
 +	public class I18NManager
 +	{
 +		public function I18NManager()
 +		{
 +		}
 +		
 +		public static function get languages():Array
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				// Capabilities.languages was added in AIR 1.1,
 +				// so this API may not exist.
 +				if (Capabilities["languages"])
 +					return Capabilities["languages"];
 +				else
 +					return [ Capabilities.language ];
 +			}
 +			COMPILE::JS
 +			{
 +				return [ navigator.language ];
 +			}
 +		}
 +	}
- }
++}


[26/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/LoaderUtil.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/LoaderUtil.as
index 26f2e4e,0000000..94166ac
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/LoaderUtil.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/LoaderUtil.as
@@@ -1,679 -1,0 +1,679 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.display.DisplayObject;
 +import flash.display.Loader;
 +import flash.display.LoaderInfo;
 +import flash.events.IEventDispatcher;
 +import flash.system.Capabilities;
 +import flash.utils.Dictionary;
 +}
 +COMPILE::JS
 +{
 +}
 +COMPILE::LATER
 +{
 +import mx.core.ApplicationDomainTarget;
 +import mx.core.RSLData;
 +}
 +import mx.core.IFlexModuleFactory;
 +import mx.core.mx_internal;
 +import mx.events.Request;
 +import mx.managers.SystemManagerGlobals;
 +import mx.utils.Platform;
 +
 +use namespace mx_internal;
 +
 +  /**
 +   *  The LoaderUtil class defines utility methods for use with Flex RSLs and
 +   *  generic Loader instances.
 +   *  
 +   *  @langversion 3.0
 +   *  @playerversion Flash 9
 +   *  @playerversion AIR 1.1
 +   *  @productversion Flex 3
 +   */
 +    public class LoaderUtil
 +    {
 +        
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *   @private
 +     * 
 +     *   An array of search strings and filters. These are used in the normalizeURL
 +     *   method. normalizeURL is used to remove special Flash Player markup from 
 +     *   urls, but the array could be appended to by the user to modify urls in other
 +     *   ways.
 +     *  
 +     *   Each object in the array has two fields:
 +     * 
 +     *   1. searchString - the string to search the url
 +     *   2. filterFunction - a function that accepts an url and an index to the first
 +     *   occurrence of the search string in the url. The function may modify the url
 +     *   and return a new url. A filterFunction is only called once, for the first
 +     *   occurrence of where the searchString was found. If there
 +     *   are multiple strings in the url that need to be processed the filterFunction
 +     *   should handle all of them on the call. A filter function should 
 +     *   be defined as follows:
 +     * 
 +     *   @param url the url to process.
 +     *   @param index the index of the first occurrence of the seachString in the url.
 +     *   @return the new url.
 +     * 
 +     *   function filterFunction(url:String, index:int):String
 +     * 
 +     */
 +    mx_internal static var urlFilters:Array = 
 +            [
 +                { searchString: "/[[DYNAMIC]]/", filterFunction: dynamicURLFilter}, 
 +                { searchString: "/[[IMPORT]]/",  filterFunction: importURLFilter}
 +            ];
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +        
 +    /**
 +     *  The root URL of a cross-domain RSL contains special text 
 +     *  appended to the end of the URL. 
 +     *  This method normalizes the URL specified in the specified LoaderInfo instance 
 +     *  to remove the appended text, if present. 
 +     *  Classes accessing <code>LoaderInfo.url</code> should call this method 
 +     *  to normalize the URL before using it.
 +     *  This method also encodes the url by calling the encodeURI() method
 +     *  on it. If you want the unencoded url, you must call unencodeURI() on
 +     *  the results.
 +     *
 +     *  @param loaderInfo A LoaderInfo instance or url string.
 +     *
 +     *  @return A normalized <code>LoaderInfo.url</code> property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function normalizeURL(loaderInfo:Object):String
 +    {
 +        var url:String;
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			if (loaderInfo is LoaderInfo)
 +			  url = loaderInfo.url;
 +			else
 +			  url = loaderInfo.toString();
 +		}
 +		COMPILE::JS
 +		{
 +			url = loaderInfo.toString();
 +		}
 +        var index:int;
 +        var searchString:String;
 +        var urlFilter:Function;
 +        var n:uint = LoaderUtil.urlFilters.length;
 +        
 +        for (var i:uint = 0; i < n; i++)
 +        {
 +            searchString = LoaderUtil.urlFilters[i].searchString;
 +            if ((index = url.indexOf(searchString)) != -1)
 +            {
 +                urlFilter = LoaderUtil.urlFilters[i].filterFunction;
 +                url = urlFilter(url, index);
 +            }
 +        }
 +        
 +        // On the mac, the player doesn't like filenames with high-ascii
 +        // characters. Calling encodeURI fixes this problem. We restrict
 +        // this call to mac-only since it causes problems on Windows.
 +        if (Platform.isMac)
 +            return encodeURI(url);
 +        
 +        return url;
 +    }
 +
 +    /**
 +     *  @private 
 +     * 
 +     *  Use this method when you want to load resources with relative URLs.
 +     * 
 +     *  Combine a root url with a possibly relative url to get a absolute url.
 +     *  Use this method to convert a relative url to an absolute URL that is 
 +     *  relative to a root URL.
 +     * 
 +     *  @param rootURL An url that will form the root of the absolute url.
 +     *  If the <code>rootURL</code> does not specify a file name it must be 
 +     *  terminated with a slash. For example, "http://a.com" is incorrect, it
 +     *  should be terminated with a slash, "http://a.com/". If the rootURL is
 +     *  taken from loaderInfo, it must be passed thru <code>normalizeURL</code>
 +     *  before being passed to this function.
 +     * 
 +     *  When loading resources relative to an application, the rootURL is 
 +     *  typically the loaderInfo.url of the application.
 +     * 
 +     *  @param url The url of the resource to load (may be relative).
 +     * 
 +     *  @return If <code>url</code> is already an absolute URL, then it is 
 +     *  returned as is. If <code>url</code> is relative, then an absolute URL is
 +     *  returned where <code>url</code> is relative to <code>rootURL</code>. 
 +     */ 
 +    public static function createAbsoluteURL(rootURL:String, url:String):String
 +    {
 +        var absoluteURL:String = url;
 +
 +        // make relative paths relative to the SWF loading it, not the top-level SWF
 +        if (rootURL &&
 +            !(url.indexOf(":") > -1 || url.indexOf("/") == 0 || url.indexOf("\\") == 0))
 +        {
 +            // First strip off the search string and then any url fragments.
 +            var index:int;
 +            
 +            if ((index = rootURL.indexOf("?")) != -1 )
 +                rootURL = rootURL.substring(0, index);
 +
 +            if ((index = rootURL.indexOf("#")) != -1 )
 +                rootURL = rootURL.substring(0, index);
 +            
 +            // If the url starts from the current directory, then just skip
 +            // over the "./".
 +            // If the url start from the parent directory, the we need to
 +            // modify the rootURL.
 +            var lastIndex:int = Math.max(rootURL.lastIndexOf("\\"), rootURL.lastIndexOf("/"));
 +            if (url.indexOf("./") == 0)
 +            {
 +                url = url.substring(2);
 +            }
 +            else
 +            {
 +                while (url.indexOf("../") == 0)
 +                {
 +                    url = url.substring(3);
 +                    lastIndex = Math.max(rootURL.lastIndexOf("\\", lastIndex - 1), 
 +                                                   rootURL.lastIndexOf("/", lastIndex - 1));
 +                }
 +            }
 +                                        
 +            if (lastIndex != -1)
 +                absoluteURL = rootURL.substr(0, lastIndex + 1) + url;
 +        }
 +
 +        return absoluteURL;
 +    }
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  Takes a list of required rsls and determines:
 +     *       - which RSLs have not been loaded
 +     *       - the application domain and IModuleFactory where the
 +     *         RSL should be loaded
 +     * 
 +     *  @param moduleFactory The module factory of the application or module 
 +     *  to get load information for. If the moduleFactory has not loaded the 
 +     *  module, then its parent is asked for load information. Each successive
 +     *  parent is asked until the load information is found or there are no
 +     *  more parents to ask. Only parents in parent ApplicationDomains are 
 +     *  searched. Applications in different security domains or sibling
 +     *  ApplicationDomains do not share RSLs.
 +     *  
 +     *  @param rsls An array of RSLs that are required for 
 +     *  <code>moduleFactory</code>. Each RSL is in an array of RSLData where
 +     *  the first element is the primary RSL and the remaining elements are 
 +     *  failover RSLs.
 +     *  @return Array of RSLData that represents the RSLs to load. RSLs that are
 +     *  already loaded are not in the listed. 
 +     */
 +	COMPILE::LATER
 +    mx_internal static function processRequiredRSLs(moduleFactory:IFlexModuleFactory, 
 +                                                    rsls:Array):Array
 +    {
 +        var rslsToLoad:Array = [];  // of Array, where each element is an array 
 +                                    // of RSLData (primary and failover), return value
 +        var topLevelModuleFactory:IFlexModuleFactory = SystemManagerGlobals.topLevelSystemManagers[0];
 +        var currentModuleFactory:IFlexModuleFactory = topLevelModuleFactory;
 +        var parentModuleFactory:IFlexModuleFactory = null;
 +        var loaded:Dictionary = new Dictionary();   // contains rsls that are loaded
 +        var loadedLength:int = 0;
 +        var resolved:Dictionary = new Dictionary(); // contains rsls that have the app domain resolved
 +        var resolvedLength:int = 0;
 +        var moduleFactories:Array = null;
 +        
 +        // Start at the top level module factory and work our way down the 
 +        // module factory chain checking if the any of the rsls are loaded 
 +        // and resolving application domain targets.
 +        // We start at the top level module factory because the default rsls
 +        // will all be loaded here and we won't often have to check other 
 +        // module factories.
 +        while (currentModuleFactory != moduleFactory)
 +        {
 +            // Need to loop over all the rsls, to see which one are loaded
 +            // and resolve application domains.
 +            var n:int = rsls.length;
 +            for (var i:int = 0; i < n; i++)
 +            {
 +                var rsl:Array = rsls[i];
 +
 +                // Check if the RSL has already been loaded.
 +                if (!loaded[rsl])
 +                {
 +                    if (isRSLLoaded(currentModuleFactory, rsl[0].digest))
 +                    {
 +                        loaded[rsl] = 1;
 +                        loadedLength++;
 +                        
 +                        // We may find an rsl loaded in a module factory as we work
 +                        // our way down the module factory list. If we find one then 
 +                        // remove it.
 +                        if (currentModuleFactory != topLevelModuleFactory)
 +                        {
 +                            var index:int = rslsToLoad.indexOf(rsl); 
 +                            if (index != -1)
 +                                rslsToLoad.splice(index, 1);                        
 +                        }
 +                    }
 +                    else if (rslsToLoad.indexOf(rsl) == -1)
 +                    {
 +                        rslsToLoad.push(rsl);   // assume we have to load it
 +                    }
 +                } 
 +
 +                // If the rsl is already loaded or already resolved then
 +                // skip resolving it.
 +                if (!loaded[rsl] && resolved[rsl] == null)
 +                {
 +                    // Get the parent module factory if we are going to need to 
 +                    // resolve the application domain target.
 +                    if (!parentModuleFactory && 
 +                        RSLData(rsl[0]).applicationDomainTarget == ApplicationDomainTarget.PARENT)
 +                    {
 +                        parentModuleFactory = getParentModuleFactory(moduleFactory);           
 +                    }
 +                    
 +                    // Resolve the application domain target.
 +                    if (resolveApplicationDomainTarget(rsl,
 +                            moduleFactory,
 +                            currentModuleFactory,
 +                            parentModuleFactory,
 +                            topLevelModuleFactory))
 +                    {
 +                        resolved[rsl] = 1;
 +                        resolvedLength++;                        
 +                    }
 +                }
 +            }
 +            
 +            // If process all rsls then get out.
 +            if (loadedLength + resolvedLength >= rsls.length)
 +                break;
 +                
 +             // If we didn't find everything in the top level module factory then work
 +            // down towards the rsl's owning module factory. 
 +            // Build up the module factory parent chain so we can traverse it.
 +            if (!moduleFactories)
 +            {
 +                moduleFactories = [moduleFactory];
 +                currentModuleFactory = moduleFactory;
 +                while (currentModuleFactory != topLevelModuleFactory)
 +                {
 +
 +                    currentModuleFactory = getParentModuleFactory(currentModuleFactory);
 +                    
 +                    // If we couldn't get the parent module factory, then we 
 +                    // will have to load into the highest application domain
 +                    // that is available. We won't be able to get a parent 
 +                    // if a module was loaded without specifying a parent 
 +                    // module factory.
 +                    if (!currentModuleFactory)
 +                        break;
 +                    
 +                    if (currentModuleFactory != topLevelModuleFactory)
 +                        moduleFactories.push(currentModuleFactory);
 +                    
 +                    if (!parentModuleFactory)
 +                        parentModuleFactory = currentModuleFactory;
 +                }
 +            }
 +
 +            currentModuleFactory = moduleFactories.pop();
 +        }
 +        
 +        return rslsToLoad;
 +    }
 +    
 +    /**
 +     * @private
 +     * Test whether a url is on the local filesystem. We can only
 +     * really tell this with URLs that begin with "file:" or a
 +     * Windows-style drive notation such as "C:". This fails some
 +     * cases like the "/" notation on Mac/Unix.
 +     * 
 +     * @param url
 +     * the url to check against
 +     * 
 +     * @return
 +     * true if url is local, false if not or unable to determine
 +     **/
 +    mx_internal static function isLocal(url:String):Boolean 
 +    {
 +        return (url.indexOf("file:") == 0 || url.indexOf(":") == 1);
 +    }
 +    
 +    /**
 +     * @private
 +     * Currently (FP 10.x) the ActiveX player (Explorer on Windows) does not
 +     * handle encoded URIs containing UTF-8 on the local filesystem, but
 +     * it does handle those same URIs unencoded. The plug-in requires
 +     * encoded URIs.
 +     * 
 +     * @param url
 +     * url to properly encode, may be fully or partially encoded with encodeURI
 +     * 
 +     * @param local
 +     * true indicates the url is on the local filesystem
 +     * 
 +     * @return
 +     * encoded url that may be loaded with a URLRequest
 +     **/
- 	COMPILE::AS3
++	COMPILE::SWF
 +    mx_internal static function OSToPlayerURI(url:String, local:Boolean):String 
 +    {
 +        
 +        // First strip off the search string and any url fragments so
 +        // they will not be decoded/encoded.
 +        // Next decode the url.
 +        // Before returning the decoded or encoded string add the search
 +        // string and url fragment back.
 +        var searchStringIndex:int;
 +        var fragmentUrlIndex:int;
 +        var decoded:String = url;
 +        
 +        if ((searchStringIndex = decoded.indexOf("?")) != -1 )
 +        {
 +            decoded = decoded.substring(0, searchStringIndex);
 +        }
 +        
 +        if ((fragmentUrlIndex = decoded.indexOf("#")) != -1 )
 +            decoded = decoded.substring(0, fragmentUrlIndex);
 +        
 +        try
 +        {
 +            // decode the url
 +            decoded = decodeURI(decoded);
 +        }
 +        catch (e:Error)
 +        {
 +            // malformed url, but some are legal on the file system
 +        }
 +        
 +        // create the string to hold the the search string url fragments.
 +        var extraString:String = null;
 +        if (searchStringIndex != -1 || fragmentUrlIndex != -1)
 +        {
 +            var index:int = searchStringIndex;
 +            
 +            if (searchStringIndex == -1 || 
 +                (fragmentUrlIndex != -1 && fragmentUrlIndex < searchStringIndex))
 +            {
 +                index = fragmentUrlIndex;
 +            }
 +            
 +            extraString = url.substr(index);
 +        }
 +        
 +        if (local && flash.system.Capabilities.playerType == "ActiveX")
 +        {
 +            if (extraString)
 +                return decoded + extraString;
 +            else 
 +                return decoded;
 +        }
 +        
 +        if (extraString)
 +            return encodeURI(decoded) + extraString;
 +        else
 +            return encodeURI(decoded);            
 +    }
 +
 +    /**
 +     *  @private
 +     *  Get the parent module factory. 
 +     * 
 +     *  @param moduleFactory The module factory to get the parent of.
 +     * 
 +     *  @return the parent module factory if available, null otherwise. 
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private static function getParentModuleFactory(moduleFactory:IFlexModuleFactory):IFlexModuleFactory    
 +    {
 +        var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
 +        DisplayObject(moduleFactory).dispatchEvent(request); 
 +        return request.value as IFlexModuleFactory;
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Resolve the application domain target. 
 +     * 
 +     *  @param rsl to resolve.
 +     *  @param moduleFactory The module factory loading the RSLs.
 +     *  @param currentModuleFactory The module factory to search for placeholders.
 +     *  @param parentModuleFactory The rsl's parent module factory.
 +     *  @param topLevelModuleFactory The top-level module factory.
 +     * 
 +     *  @return true if the application domain target was resolved, 
 +     *  false otherwise.
 +     */
 +	COMPILE::LATER
 +    private static function resolveApplicationDomainTarget(rsl:Array, 
 +                                    moduleFactory:IFlexModuleFactory, 
 +                                    currentModuleFactory:IFlexModuleFactory, 
 +                                    parentModuleFactory:IFlexModuleFactory, 
 +                                    topLevelModuleFactory:IFlexModuleFactory):Boolean 
 +    {
 +        var resolvedRSL:Boolean = false;
 +        var targetModuleFactory:IFlexModuleFactory = null;
 +        
 +        var applicationDomainTarget:String = rsl[0].applicationDomainTarget;
 +        if (isLoadedIntoTopLevelApplicationDomain(moduleFactory))
 +        {
 +            targetModuleFactory = topLevelModuleFactory;
 +        }
 +        else if (applicationDomainTarget == ApplicationDomainTarget.DEFAULT)
 +        {
 +            if (hasPlaceholderRSL(currentModuleFactory, rsl[0].digest))
 +            {
 +                targetModuleFactory = currentModuleFactory;
 +            }
 +        }
 +        else if (applicationDomainTarget == ApplicationDomainTarget.TOP_LEVEL)
 +        {
 +            targetModuleFactory = topLevelModuleFactory;
 +        }
 +        else if (applicationDomainTarget == ApplicationDomainTarget.CURRENT)
 +        {
 +            resolvedRSL = true;
 +        }
 +        else if (applicationDomainTarget == ApplicationDomainTarget.PARENT)
 +        {
 +            // If there is no parent, ignore the target and load into the current
 +            // app domain. 
 +            targetModuleFactory = parentModuleFactory;
 +        }
 +        else
 +        {
 +            resolvedRSL = true; // bogus target, load into current application domain
 +        }
 +        
 +        if (resolvedRSL || targetModuleFactory)
 +        {
 +            if (targetModuleFactory)
 +                updateRSLModuleFactory(rsl, targetModuleFactory);
 +            return true;
 +        }
 +        
 +        return false;
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Determine if the moduleFactory has loaded an rsl that matches the 
 +     *  specified digest.
 +     * 
 +     *  @param moduleFactory The module factory to search.
 +     *  @param digest The digest to search for.
 +     *  @return true if a loaded rsl matching the digest was found.
 +     */
 +	COMPILE::LATER
 +    private static function isRSLLoaded(moduleFactory:IFlexModuleFactory, digest:String):Boolean
 +    {
 +        var preloadedRSLs:Dictionary = moduleFactory.preloadedRSLs;
 +        
 +        if (preloadedRSLs)
 +        {
 +            // loop over the rsls to find a matching digest
 +            for each (var rsl:Vector.<RSLData> in preloadedRSLs)
 +            {
 +                var n:int = rsl.length;
 +                for (var i:int = 0; i < n; i++)
 +                {
 +                    if (rsl[i].digest == digest)
 +                    {
 +                        return true;
 +                    }
 +                }
 +            }
 +        }
 +        
 +        return false;
 +    }
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  Determine if the moduleFactory has a placeholder rsl that matches the 
 +     *  specified digest.
 +     * 
 +     *  @param moduleFactory The module factory to search.
 +     *  @param digest The digest to search for.
 +     *  @return true if a placeholder rsl matching the digest was found.
 +     */
 +    private static function hasPlaceholderRSL(moduleFactory:IFlexModuleFactory, digest:String):Boolean
 +    {
 +        var phRSLs:Array = moduleFactory.info()["placeholderRsls"];
 +        
 +        if (phRSLs)
 +        {
 +            // loop over the rsls to find a matching digest
 +            var n:int = phRSLs.length;
 +            for (var i:int = 0; i < n; i++)
 +            {
 +                var rsl:Object = phRSLs[i];
 +                var m:int = rsl.length;
 +                for (var j:int = 0; j < m; j++)
 +                {
 +                    if (rsl[j].digest == digest)
 +                    {
 +                        return true;
 +                    }
 +                }
 +            }
 +        }
 +        
 +        return false;
 +    }
 + 
 +    /**
 +     *  @private
 +     *  Test if a module factory has been loaded into the top-level application domain.
 +     * 
 +     *  @return true if loaded into the top-level application domain, false otherwise.
 +     */ 
 +	COMPILE::LATER
 +    private static function isLoadedIntoTopLevelApplicationDomain(moduleFactory:IFlexModuleFactory):Boolean
 +    {
 +        if (moduleFactory is DisplayObject)
 +        {
 +            var displayObject:DisplayObject = DisplayObject(moduleFactory);
 +            var loaderInfo:LoaderInfo = displayObject.loaderInfo;
 +            if (loaderInfo && loaderInfo.applicationDomain &&
 +                loaderInfo.applicationDomain.parentDomain == null)
 +            {
 +                return true;
 +            }
 +        }
 +        
 +        return false;        
 +    }
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  Update the module factory of an rsl, both the primary rsl and all 
 +     *  failover rsls.
 +     * 
 +     *  @param rsl One RSL represented by an array of RSLData. The 
 +     *  first element in the array is the primary rsl, the others are failovers.
 +     *  @param moduleFactory  The moduleFactory to set in the primary and 
 +     *  failover rsls.
 +     */
 +	COMPILE::LATER
 +    private static function updateRSLModuleFactory(rsl:Array, moduleFactory:IFlexModuleFactory):void
 +    {
 +        var n:int = rsl.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            rsl[i].moduleFactory = moduleFactory;
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  Strip off the DYNAMIC string(s) appended to the url.
 +     */
 +    private static function dynamicURLFilter(url:String, index:int):String
 +    {
 +        return url.substring(0, index);
 +    }
 +
 +    /**
 +     *  @private
 +     * 
 +     *  Add together the protocol plus everything after "/[[IMPORT]]/".
 +     */
 +    private static function importURLFilter(url:String, index:int):String
 +    {
 +        var protocolIndex:int = url.indexOf("://");
 +        return url.substring(0,protocolIndex + 3) + url.substring(index + 12);
 +    }
 +    
 +    }
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/NameUtil.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/NameUtil.as
index 4f8f53d,0000000..7782458
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/NameUtil.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/NameUtil.as
@@@ -1,195 -1,0 +1,195 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
 +import org.apache.flex.reflection.getQualifiedClassName;
 +
 +import mx.core.IRepeaterClient;
 +import mx.core.IUIComponent;
 +
 +/**
 + *  The NameUtil utility class defines static methods for
 + *  creating names for Flex objects.
 + *  You do not create instances of NameUtil;
 + *  instead you call static methods of the class, such as 
 + *  the <code>NameUtil.createName()</code> method.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class NameUtil
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private static var counter:int = 0;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Creates a unique name for any Object instance, such as "Button12", by
 +     *  combining the unqualified class name with an incrementing counter.
 +     *
 +     *  @param object Object requiring a name.
 +     *
 +     *  @return String containing the unique name.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function createUniqueName(object:Object):String
 +    {
 +        if (!object)
 +            return null;
 +
 +        var name:String = getQualifiedClassName(object);
 +        
 +        // If there is a package name, strip it off.
 +        var index:int = name.indexOf("::");
 +        if (index != -1)
 +            name = name.substr(index + 2);
 +                        
 +        // If the class name ends with a digit (which some autogenerated
 +        // classes do), then append an underscore before appending
 +        // the counter.
 +        var charCode:int = name.charCodeAt(name.length - 1);
 +        if (charCode >= 48 && charCode <= 57)
 +            name += "_";
 +        
 +        return name + counter++;
 +    }
 +
 +    /**
 +     *  Returns a string, such as
 +     *  "MyApplication0.addressForm.lastName.TextField17",
 +     *  for a DisplayObject object that indicates its position in the
 +     *  hierarchy of DisplayObject objects in an application.
 +     *
 +     *  @param displayObject A DisplayObject object whose hierarchy in the application
 +     *  is desired. 
 +     *
 +     *  @return String containing the position of <code>displayObject</code> 
 +     *  in the hierarchy of DisplayObject objects in an application.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +	 * 
 +	 *  @flexjsignorecoercion mx.core.IUIComponent
 +     */
 +    public static function displayObjectToString(
 +                                displayObject:IUIComponent):String
 +    {
 +        var result:String;
 +
 +        // Start at the specified object and walk up the parent chain
 +        // to build up the string to return.
 +        try
 +        {
 +            for (var o:IUIComponent = displayObject;
 +                 o != null;
 +                 o = o.parent as IUIComponent)
 +            {
 +                // If this object is in the display tree,
 +                // stop after we've prepended the topmost Application instance.
 +                if (o.parent && o.topOfDisplayList && o.parent == o.topOfDisplayList)
 +                    break;
 +    
 +                // Prefer id over name if specified.
 +                var s:String = "id" in o && o["id"] ? o["id"] : o.name;
 +                
 +                if (o is IRepeaterClient)
 +                {
 +                    var indices:Array = IRepeaterClient(o).instanceIndices;
 +                    if (indices)
 +                        s += "[" + indices.join("][") + "]";
 +                }
 +    
 +                result = result == null ? s : s + "." + result;
 +            }
 +        }
 +        catch (e:Error)
 +        {
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				if (!(e is SecurityError))
 +					throw e;
 +			}
 +            // Ignore error and continue with what we have. 
 +            // We may not have access to our parent if we are loaded into a sandbox.
 +        }
 +        
 +        return result;
 +    }
 +
 +    /**
 +     *  Returns the name of the specified object's class,
 +     *  such as <code>"Button"</code>
 +     *
 +     *  <p>This string does not include the package name.
 +     *  If you need the package name as well, call the
 +     *  <code>getQualifiedClassName()</code> method in the flash.utils package.
 +     *  It will return a string such as <code>"mx.controls::Button"</code>.</p>
 +     *
 +     *  @param object The object.
 +     *
 +     *  @return The name of the specified object's class.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function getUnqualifiedClassName(object:Object):String
 +    {
 +        var name:String;
 +        if (object is String)
 +            name = object as String;
 +        else
 +            name = getQualifiedClassName(object);
 +
 +        // If there is a package name, strip it off.
 +        var index:int = name.indexOf("::");
 +        if (index != -1)
 +            name = name.substr(index + 2);
 +
 +        return name;
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/ObjectProxy.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/ObjectProxy.as
index a6f1591,0000000..2d0e0ee
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/ObjectProxy.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/ObjectProxy.as
@@@ -1,946 -1,0 +1,946 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
 +import org.apache.flex.events.EventDispatcher;
 +import org.apache.flex.reflection.getQualifiedClassName;
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.events.Event;
 +import flash.utils.IDataInput;
 +import flash.utils.IDataOutput;
 +import flash.utils.IExternalizable;
 +import flash.utils.flash_proxy;
 +}
 +COMPILE::JS
 +{
 +	import org.apache.flex.events.Event;	
 +	import flex.utils.IExternalizable;
 +}
 +import org.apache.flex.utils.Proxy;
 +import mx.core.IPropertyChangeNotifier;
 +import mx.events.PropertyChangeEvent;
 +import mx.events.PropertyChangeEventKind;
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +use namespace flash_proxy;
 +use namespace object_proxy;
 +}
 +
 +[Bindable("propertyChange")]
 +[RemoteClass(alias="flex.messaging.io.ObjectProxy")]
 +
 +/**
 + *  This class provides the ability to track changes to an item
 + *  managed by this proxy.
 + *  Any number of objects can "listen" for changes on this
 + *  object, by using the <code>addEventListener()</code> method.
 + *
 + *  @example
 + *  <pre>
 + *  import mx.events.PropertyChangeEvent;
 + *  import mx.utils.ObjectUtil;
 + *  import mx.utils.ObjectProxy;
 + *  import mx.utils.StringUtil;
 + *
 + *  var a:Object = { name: "Tyler", age: 5, ssnum: "555-55-5555" };
 + *  var p:ObjectProxy = new ObjectProxy(a);
 + *  p.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, updateHandler);
 + *  p.name = "Jacey";
 + *  p.age = 2;
 + *  delete p.ssnum;
 + *
 + *  // handler function
 + *  function updateHandler(event:ChangeEvent):void
 + *  {
 + *      trace(StringUtil.substitute("updateHandler('{0}', {1}, {2}, {3}, '{4}')",
 + *                                     event.kind,
 + *                                     event.property,
 + *                                     event.oldValue,
 + *                                     event.newValue,
 + *                                     event.target.object_proxy::UUID));
 + *  }
 + * 
 + *  // The trace output appears as:
 + *  // updateHandler('opUpdate', name, Tyler, Jacey, '698AF8CB-B3D9-21A3-1AFFDGHT89075CD2')
 + *  // updateHandler('opUpdate', age, 5, 2, '698AF8CB-B3D9-21A3-1AFFDGHT89075CD2')
 + *  // updateHandler('opDelete', ssnum, 555-55-5555, null, '698AF8CB-B3D9-21A3-1AFFDGHT89075CD2')
 + *  </pre>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public dynamic class ObjectProxy extends Proxy
 +                                 implements IExternalizable,
 +                                 IPropertyChangeNotifier
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Initializes this proxy with the specified object, id and proxy depth.
 +     * 
 +     *  @param item Object to proxy.
 +     *  If no item is specified, an anonymous object will be constructed
 +     *  and assigned.
 +     *
 +     *  @param uid String containing the unique id
 +     *  for this object instance.
 +     *  Required for IPropertyChangeNotifier compliance as every object must 
 +     *  provide a unique way of identifying it.
 +     *  If no value is specified, a random id will be assigned.
 +     *
 +     *  @param proxyDepth An integer indicating how many levels in a complex
 +     *  object graph should have a proxy created during property access.
 +     *  The default is -1, meaning "proxy to infinite depth".
 +     *  
 +     *  @example
 +     *
 +     *  <pre>
 +     *  import mx.events.PropertyChangeEvent;
 +     *  import mx.utils.ObjectUtil;
 +     *  import mx.utils.ObjectProxy;
 +     *  import mx.utils.StringUtil;
 +     *
 +     *  var a:Object = { name: "Tyler", age: 5, ssnum: "555-55-5555" };
 +     *  var p:ObjectProxy = new ObjectProxy(a);
 +     *  p.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, updateHandler);
 +     *  p.name = "Jacey";
 +     *  p.age = 2;
 +     *  delete p.ssnum;
 +     *
 +     *  // handler function
 +     *  function updateHandler(event:PropertyChangeEvent):void
 +     *  {
 +     *      trace(StringUtil.substitute("updateHandler('{0}', {1}, {2}, {3}, '{4}')",
 +     *                                     event.kind,
 +     *                                     event.property,
 +     *                                     event.oldValue,
 +     *                                     event.newValue,
 +     *                                     event.target.uid));
 +     *  }
 +     *
 +     *  // trace output
 +     *  updateHandler('opUpdate', name, Jacey, '698AF8CB-B3D9-21A3-1AFFDGHT89075CD2')
 +     *  updateHandler('opUpdate', age, 2, '698AF8CB-B3D9-21A3-1AFFDGHT89075CD2')
 +     *  updateHandler('opDelete', ssnum, null, '698AF8CB-B3D9-21A3-1AFFDGHT89075CD2')
 +     *  </pre>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function ObjectProxy(item:Object = null, uid:String = null,
 +                                proxyDepth:int = -1)
 +    {
 +        super();
 +
 +        if (!item)
 +            item = {};
 +        _item = item;
 +
 +        _proxyLevel = proxyDepth;
 +       
 +        notifiers = {};
 +
 +        dispatcher = new EventDispatcher(this);
 +
 +        // If we got an id, use it.  Otherwise the UID is lazily
 +        // created in the getter for UID.
 +        if (uid)
 +            _id = uid;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  A reference to the EventDispatcher for this proxy.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected var dispatcher:EventDispatcher;
 +
 +    /**
 +     *  A hashmap of property change notifiers that this proxy is 
 +     *  listening for changes from; the key of the map is the property name.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected var notifiers:Object;
 +    
 +    /**
 +     *  Indicates what kind of proxy to create
 +     *  when proxying complex properties.
 +     *  Subclasses should assign this value appropriately.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected var proxyClass:Class = ObjectProxy;
 +    
 +    /**
 +     *  Contains a list of all of the property names for the proxied object.
 +     *  Descendants need to fill this list by overriding the
 +     *  <code>setupPropertyList()</code> method.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected var propertyList:Array;
 +    
 +    /**
 +     *  Indicates how deep proxying should be performed.
 +     *  If -1 (default), always proxy; 
 +     *  if this value is zero, no proxying will be performed.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    private var _proxyLevel:int;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  object
 +    //----------------------------------
 +
 +    /**
 +     *  Storage for the object property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    private var _item:Object;
 +
 +    /**
 +     *  The object being proxied.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    object_proxy function get object():Object
 +    {
 +        return _item;
 +    }
 +
 +    //----------------------------------
 +    //  type
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the qualified type name.
 +     */
 +	COMPILE::LATER
 +    private var _type:QName;
 +
 +    /**
 +     *  The qualified type name associated with this object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    object_proxy function get type():QName
 +    {
 +        return _type;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    object_proxy function set type(value:QName):void
 +    {
 +        _type = value;
 +    }
 +
 +    //----------------------------------
 +    //  uid
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the uid property.
 +     */
 +    private var _id:String;
 +
 +    /**
 +     *  The unique identifier for this object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get uid():String
 +    {
 +        if (_id === null)
 +            _id = UIDUtil.createUID();
 +            
 +        return _id;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set uid(value:String):void
 +    {
 +        _id = value;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Returns the specified property value of the proxied object.
 +     *
 +     *  @param name Typically a string containing the name of the property,
 +     *  or possibly a QName where the property name is found by 
 +     *  inspecting the <code>localName</code> property.
 +     *
 +     *  @return The value of the property.
 +     *  In some instances this value may be an instance of 
 +     *  <code>ObjectProxy</code>.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function getProperty(name:*):*
 +    {
 +        // if we have a data proxy for this then
 +        var result:*;
 +
 +        if (notifiers[name.toString()])
 +            return notifiers[name];
 +
 +        result = _item[name];
 +
 +        if (result)
 +        {
 +            if (_proxyLevel == 0 || ObjectUtil.isSimple(result))
 +            {
 +                return result;
 +            }
 +            else
 +            {
 +                result = object_proxy::getComplexProperty(name, result);
 +            } // if we are proxying
 +        }
 +
 +        return result;
 +    }
 +	COMPILE::JS
 +	override public function getProperty(name:String):*
 +	{
 +		// if we have a data proxy for this then
 +		var result:*;
 +		
 +		if (notifiers[name.toString()])
 +			return notifiers[name];
 +		
 +		result = _item[name];
 +		
 +		if (result)
 +		{
 +			if (_proxyLevel == 0 || ObjectUtil.isSimple(result))
 +			{
 +				return result;
 +			}
 +			else
 +			{
 +				result = object_proxy::getComplexProperty(name, result);
 +			} // if we are proxying
 +		}
 +		
 +		return result;
 +	}
 +
 +    /**
 +     *  Returns the value of the proxied object's method with the specified name.
 +     *
 +     *  @param name The name of the method being invoked.
 +     *
 +     *  @param rest An array specifying the arguments to the
 +     *  called method.
 +     *
 +     *  @return The return value of the called method.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function callProperty(name:*, ... rest):*
 +    {
 +        return _item[name].apply(_item, rest)
 +    }
 +
 +    /**
 +     *  Deletes the specified property on the proxied object and
 +     *  sends notification of the delete to the handler.
 +     * 
 +     *  @param name Typically a string containing the name of the property,
 +     *  or possibly a QName where the property name is found by 
 +     *  inspecting the <code>localName</code> property.
 +     *
 +     *  @return A Boolean indicating if the property was deleted.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function deleteProperty(name:*):Boolean
 +    {
 +        var notifier:IPropertyChangeNotifier = IPropertyChangeNotifier(notifiers[name]);
 +        if (notifier)
 +        {
 +            notifier.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
 +                                         propertyChangeHandler);
 +            delete notifiers[name];
 +        }
 +
 +        var oldVal:* = _item[name];
 +        var deleted:Boolean = delete _item[name]; 
 +
 +        if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE))
 +        {
 +            var event:PropertyChangeEvent = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
 +            event.kind = PropertyChangeEventKind.DELETE;
 +            event.property = name;
 +            event.oldValue = oldVal;
 +            event.source = this;
 +            dispatcher.dispatchEvent(event);
 +        }
 +
 +        return deleted;
 +    }
 +	COMPILE::JS
 +	override public function deleteProperty(name:String):Boolean
 +	{
 +		var notifier:IPropertyChangeNotifier = IPropertyChangeNotifier(notifiers[name]);
 +		if (notifier)
 +		{
 +			notifier.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
 +				propertyChangeHandler);
 +			delete notifiers[name];
 +		}
 +		
 +		var oldVal:* = _item[name];
 +		var deleted:Boolean = delete _item[name]; 
 +		
 +		if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE))
 +		{
 +			var event:PropertyChangeEvent = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
 +			event.kind = PropertyChangeEventKind.DELETE;
 +			event.property = name;
 +			event.oldValue = oldVal;
 +			event.source = this;
 +			dispatcher.dispatchEvent(event);
 +		}
 +		
 +		return deleted;
 +	}
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function hasProperty(name:*):Boolean
 +    {
 +        return(name in _item);
 +    }
 +	COMPILE::JS
 +	override public function hasProperty(name:String):Boolean
 +	{
 +		return(name in _item);
 +	}
 +    
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function nextName(index:int):String
 +    {
 +        return propertyList[index -1];
 +    }
 +    
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function nextNameIndex(index:int):int
 +    {
 +        if (index == 0)
 +        {
 +            setupPropertyList();
 +        }
 +        
 +        if (index < propertyList.length)
 +        {
 +            return index + 1;
 +        }
 +        else
 +        {
 +            return 0;
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function nextValue(index:int):*
 +    {
 +        return _item[propertyList[index -1]];
 +    }
 +
 +    /**
 +     *  Updates the specified property on the proxied object
 +     *  and sends notification of the update to the handler.
 +     *
 +     *  @param name Object containing the name of the property that
 +     *  should be updated on the proxied object.
 +     *
 +     *  @param value Value that should be set on the proxied object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function setProperty(name:*, value:*):void
 +    {
 +        var oldVal:* = _item[name];
 +        if (oldVal !== value)
 +        {
 +            // Update item.
 +            _item[name] = value;
 +
 +            // Stop listening for events on old item if we currently are.
 +            var notifier:IPropertyChangeNotifier =
 +                IPropertyChangeNotifier(notifiers[name]);
 +            if (notifier)
 +            {
 +                notifier.removeEventListener(
 +                    PropertyChangeEvent.PROPERTY_CHANGE,
 +                    propertyChangeHandler);
 +                delete notifiers[name];
 +            }
 +
 +            // Notify anyone interested.
 +            if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE))
 +            {
 +                if (name is QName)
 +                    name = QName(name).localName;
 +                var event:PropertyChangeEvent =
 +                    PropertyChangeEvent.createUpdateEvent(
 +                        this, name.toString(), oldVal, value);
 +                dispatcher.dispatchEvent(event);
 +            } 
 +        }
 +    }
 +	COMPILE::JS
 +	override public function setProperty(name:String, value:*):void
 +	{
 +		var oldVal:* = _item[name];
 +		if (oldVal !== value)
 +		{
 +			// Update item.
 +			_item[name] = value;
 +			
 +			// Stop listening for events on old item if we currently are.
 +			var notifier:IPropertyChangeNotifier =
 +				IPropertyChangeNotifier(notifiers[name]);
 +			if (notifier)
 +			{
 +				notifier.removeEventListener(
 +					PropertyChangeEvent.PROPERTY_CHANGE,
 +					propertyChangeHandler);
 +				delete notifiers[name];
 +			}
 +			
 +			// Notify anyone interested.
 +			if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE))
 +			{
 +				COMPILE::LATER
 +				{
 +				if (name is QName)
 +					name = QName(name).localName;
 +				}
 +				var event:PropertyChangeEvent =
 +					PropertyChangeEvent.createUpdateEvent(
 +						this, name.toString(), oldVal, value);
 +				dispatcher.dispatchEvent(event);
 +			} 
 +		}
 +	}
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  object_proxy methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Provides a place for subclasses to override how a complex property that
 +     *  needs to be either proxied or daisy chained for event bubbling is managed.
 +     * 
 +     *  @param name Typically a string containing the name of the property,
 +     *  or possibly a QName where the property name is found by 
 +     *  inspecting the <code>localName</code> property.
 +     *
 +     *  @param value The property value.
 +     *
 +     *  @return The property value or an instance of <code>ObjectProxy</code>.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */  
 +    object_proxy function getComplexProperty(name:*, value:*):*
 +    {
 +        if (value is IPropertyChangeNotifier)
 +        {
 +            value.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
 +                                   propertyChangeHandler);
 +            notifiers[name] = value;
 +            return value;
 +        }
 +        
 +        if (getQualifiedClassName(value) == "Object")
 +        {
 +            value = new proxyClass(_item[name], null,
 +                _proxyLevel > 0 ? _proxyLevel - 1 : _proxyLevel);
 +            value.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
 +                                   propertyChangeHandler);
 +            notifiers[name] = value;
 +            return value;
 +        }
 +
 +        return value;
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  IExternalizable Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Since Flex only uses ObjectProxy to wrap anonymous objects,
 +     *  the server flex.messaging.io.ObjectProxy instance serializes itself
 +     *  as a Map that will be returned as a plain ActionScript object. 
 +     *  You can then set the object_proxy object property to this value.
 +     *
 +     *  @param input The source object from which the ObjectProxy is
 +     *  deserialized. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function readExternal(input:IDataInput):void
 +    {
 +        var value:Object = input.readObject();
 +        _item = value;
 +    }
 +
 +    /**
 +     *  Since Flex only serializes the inner ActionScript object that it wraps,
 +     *  the server flex.messaging.io.ObjectProxy populates itself
 +     *  with this anonymous object's contents and appears to the user
 +     *  as a Map.
 +     *
 +     *  @param output The source object from which the ObjectProxy is
 +     *  deserialized.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function writeExternal(output:IDataOutput):void
 +    {
 +        output.writeObject(_item);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Registers an event listener object  
 +     *  so that the listener receives notification of an event. 
 +     *  For more information, including descriptions of the parameters see 
 +     *  <code>addEventListener()</code> in the 
 +     *  flash.events.EventDispatcher class.
 +     *
 +     *  @param type The type of event.
 +     *  
 +     *  @param listener The listener function that processes the event. This function must accept
 +     *  an Event object as its only parameter and must return nothing.
 +     *  
 +     *  @param useCapture Determines whether the listener works in the capture phase or the 
 +     *  target and bubbling phases. If <code>useCapture</code> is set to <code>true</code>, 
 +     *  the listener processes the event only during the capture phase and not in the 
 +     *  target or bubbling phase. If <code>useCapture</code> is <code>false</code>, the
 +     *  listener processes the event only during the target or bubbling phase. To listen for
 +     *  the event in all three phases, call <code>addEventListener</code> twice, once with 
 +     *  <code>useCapture</code> set to <code>true</code>, then again with
 +     *  <code>useCapture</code> set to <code>false</code>.
 +     * 
 +     *  @param priority The priority level of the event listener. 
 +     * 
 +     *  @param useWeakReference Determines whether the reference to the listener is strong or
 +     *  weak. A strong reference (the default) prevents your listener from being garbage-collected.
 +     *  A weak reference does not. 
 +     *
 +     *  @see flash.events.EventDispatcher#addEventListener()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function addEventListener(type:String, listener:Function,
 +                                     useCapture:Boolean = false,
 +                                     priority:int = 0,
 +                                     useWeakReference:Boolean = false):void
 +    {
 +        dispatcher.addEventListener(type, listener, useCapture,
 +                                    priority, useWeakReference);
 +    }
 +
 +    /**
 +     *  Removes an event listener. 
 +     *  If there is no matching listener registered with the EventDispatcher object, 
 +     *  a call to this method has no effect.
 +     *  For more information, see 
 +     *  the flash.events.EventDispatcher class.
 +     *  
 +     *  @param type The type of event.
 +     * 
 +     *  @param listener The listener object to remove.
 +     *
 +     *  @param useCapture Specifies whether the listener was registered for the capture 
 +     *  phase or the target and bubbling phases. If the listener was registered for both 
 +     *  the capture phase and the target and bubbling phases, two calls to 
 +     *  <code>removeEventListener()</code> are required to remove both, one call with 
 +     *  <code>useCapture</code> 
 +     *  set to <code>true</code>, and another call with <code>useCapture</code>
 +     *  set to <code>false</code>.
 +     *
 +     *  @see flash.events.EventDispatcher#removeEventListener()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function removeEventListener(type:String, listener:Function,
 +                                        useCapture:Boolean = false):void
 +    {
 +        dispatcher.removeEventListener(type, listener, useCapture);
 +    }
 +
 +    /**
 +     *  Dispatches an event into the event flow. 
 +     *  For more information, see
 +     *  the flash.events.EventDispatcher class.
 +     *  
 +     *  @param event The Event object that is dispatched into the event flow. If the 
 +     *  event is being redispatched, a clone of the event is created automatically. 
 +     *  After an event is dispatched, its target property cannot be changed, so you 
 +     *  must create a new copy of the event for redispatching to work.
 +     *
 +     *  @return Returns <code>true</code> if the event was successfully dispatched. 
 +     *  A value 
 +     *  of <code>false</code> indicates failure or that <code>preventDefault()</code>
 +     *  was called on the event.
 +     *
 +     *  @see flash.events.EventDispatcher#dispatchEvent()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function dispatchEvent(event:Event):Boolean
 +    {
 +        return dispatcher.dispatchEvent(event);
 +    }
 +    
 +    /**
 +     *  Checks whether there are any event listeners registered 
 +     *  for a specific type of event. 
 +     *  This allows you to determine where an object has altered handling 
 +     *  of an event type in the event flow hierarchy. 
 +     *  For more information, see
 +     *  the flash.events.EventDispatcher class.
 +     *
 +     *  @param type The type of event
 +     *
 +     *  @return Returns <code>true</code> if a listener of the specified type is 
 +     *  registered; <code>false</code> otherwise.
 +     *
 +     *  @see flash.events.EventDispatcher#hasEventListener()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function hasEventListener(type:String):Boolean
 +    {
 +        return dispatcher.hasEventListener(type);
 +    }
 +    
 +    /**
 +     *  Checks whether an event listener is registered with this object 
 +     *  or any of its ancestors for the specified event type. 
 +     *  This method returns <code>true</code> if an event listener is triggered 
 +     *  during any phase of the event flow when an event of the specified 
 +     *  type is dispatched to this object or any of its descendants.
 +     *  For more information, see the flash.events.EventDispatcher class.
 +     *
 +     *  @param type The type of event.
 +     *
 +     *  @return Returns <code>true</code> if a listener of the specified type will 
 +     *  be triggered; <code>false</code> otherwise.
 +     *
 +     *  @see flash.events.EventDispatcher#willTrigger()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function willTrigger(type:String):Boolean
 +    {
 +        return dispatcher.willTrigger(type);
 +    }
 +
 +    /**
 +     *  Called when a complex property is updated.
 +     *
 +     *  @param event An event object that has changed.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function propertyChangeHandler(event:PropertyChangeEvent):void
 +    {
 +        dispatcher.dispatchEvent(event);
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Protected Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  This method creates an array of all of the property names for the 
 +     *  proxied object.
 +     *  Descendants must override this method if they wish to add more 
 +     *  properties to this list.
 +     *  Be sure to call <code>super.setupPropertyList</code> before making any
 +     *  changes to the <code>propertyList</code> property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected function setupPropertyList():void
 +    {
 +        if (getQualifiedClassName(_item) == "Object")
 +        {
 +            propertyList = [];
 +            for (var prop:String in _item)
 +                propertyList.push(prop);
 +        }
 +        else
 +        {
 +            propertyList = ObjectUtil.getClassInfo(_item, null, {includeReadOnly:true, uris:["*"]}).properties;
 +        }
 +    }
 +}
 +
 +}


[10/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - switch out ViewBase for View

Posted by ah...@apache.org.
switch out ViewBase for View


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/324ce859
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/324ce859
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/324ce859

Branch: refs/heads/spark
Commit: 324ce8590049b62e296395b175c7b1185ac5a880
Parents: 562e54c
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jun 9 13:26:13 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Jun 9 13:26:27 2016 -0700

----------------------------------------------------------------------
 manualtests/ContainerTest/src/MyInitialView.mxml       | 6 +++---
 manualtests/DataGridXcompile/src/MyInitialView.mxml    | 4 ++--
 manualtests/DateChooserExample/src/MyInitialView.mxml  | 4 ++--
 manualtests/EffectsExample/src/MyInitialView.mxml      | 4 ++--
 manualtests/FlexJSTest_HTML5/src/MyInitialView.mxml    | 4 ++--
 manualtests/FlexJSTest_Panel/src/MyInitialView.mxml    | 4 ++--
 manualtests/FlexJSTest_SVG/src/GraphicsView.mxml       | 4 ++--
 manualtests/FlexJSTest_SVG/src/MyInitialView.mxml      | 4 ++--
 manualtests/FlexJSTest_SVG/src/SkinsView.mxml          | 6 +++---
 manualtests/FlexJSTest_SVG/src/skins/Button_up.mxml    | 4 ++--
 manualtests/FlexJSTest_basic/src/MyInitialView.mxml    | 4 ++--
 manualtests/FlexJSTest_createjs/build.xml              | 2 +-
 manualtests/FlexJSTest_createjs/src/MyInitialView.mxml | 4 ++--
 manualtests/FlexJSTest_jquery/src/MyInitialView.mxml   | 4 ++--
 manualtests/FormExample/src/MyFormView.mxml            | 4 ++--
 manualtests/FormatExample/src/MyFormView.mxml          | 4 ++--
 manualtests/ImageTest/src/MyInitialView.mxml           | 4 ++--
 manualtests/ListsTest/src/FirstView.mxml               | 4 ++--
 manualtests/ProxyTest/src/MyInitialView.mxml           | 4 ++--
 manualtests/ReflectionTest/src/MyInitialView.mxml      | 4 ++--
 manualtests/RollEventsTest/src/RollEventsTest.mxml     | 4 ++--
 manualtests/XMLTest/src/MyInitialView.mxml             | 4 ++--
 22 files changed, 45 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/ContainerTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/ContainerTest/src/MyInitialView.mxml b/manualtests/ContainerTest/src/MyInitialView.mxml
index a90db33..1243ef7 100644
--- a/manualtests/ContainerTest/src/MyInitialView.mxml
+++ b/manualtests/ContainerTest/src/MyInitialView.mxml
@@ -18,7 +18,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:local="*"
 				xmlns:models="models.*"
 				xmlns:js="library://ns.apache.org/flexjs/basic" 
@@ -88,7 +88,7 @@
 		]]>
 	</fx:Script>
 	<js:beads>
-		<js:MXMLBeadViewBaseDataBinding />
+		<js:MXMLBeadViewDataBinding />
 	</js:beads>
 	
 	<!-- FIRST COLUMN -->
@@ -185,4 +185,4 @@
 	</js:Panel>
 			
 			
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/DataGridXcompile/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/DataGridXcompile/src/MyInitialView.mxml b/manualtests/DataGridXcompile/src/MyInitialView.mxml
index 140a7f7..7b57be4 100644
--- a/manualtests/DataGridXcompile/src/MyInitialView.mxml
+++ b/manualtests/DataGridXcompile/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*"
 				xmlns:models="models.*"
@@ -80,4 +80,4 @@ limitations under the License.
 		</customControls:beads>
 	</customControls:DataGrid>
 
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/DateChooserExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/DateChooserExample/src/MyInitialView.mxml b/manualtests/DateChooserExample/src/MyInitialView.mxml
index 02132e7..546ea73 100644
--- a/manualtests/DateChooserExample/src/MyInitialView.mxml
+++ b/manualtests/DateChooserExample/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*">
@@ -41,4 +41,4 @@ limitations under the License.
 	
 	<js:DateField id="dateField" x="450" y="90" />
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/EffectsExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/EffectsExample/src/MyInitialView.mxml b/manualtests/EffectsExample/src/MyInitialView.mxml
index 9fa98e3..74cfafb 100644
--- a/manualtests/EffectsExample/src/MyInitialView.mxml
+++ b/manualtests/EffectsExample/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*" 
@@ -86,4 +86,4 @@ limitations under the License.
 		</js:Container>		
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_HTML5/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_HTML5/src/MyInitialView.mxml b/manualtests/FlexJSTest_HTML5/src/MyInitialView.mxml
index b88b7ce..65a3c83 100644
--- a/manualtests/FlexJSTest_HTML5/src/MyInitialView.mxml
+++ b/manualtests/FlexJSTest_HTML5/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:html5="library://ns.apache.org/flexjs/html5" 
 			   >
@@ -141,4 +141,4 @@ limitations under the License.
 		</html5:beads>
 	</html5:ComboBox>
     
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_Panel/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_Panel/src/MyInitialView.mxml b/manualtests/FlexJSTest_Panel/src/MyInitialView.mxml
index 25323dc..843ff6c 100644
--- a/manualtests/FlexJSTest_Panel/src/MyInitialView.mxml
+++ b/manualtests/FlexJSTest_Panel/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 			    initComplete="initControls()">
     <fx:Script>
@@ -141,4 +141,4 @@ limitations under the License.
 	</js:Panel>
 
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml b/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
index e43c01e..7428331 100644
--- a/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
+++ b/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:svg="library://ns.apache.org/flexjs/svg"
 				initComplete="viewbase1_initCompleteHandler(event)"
@@ -324,4 +324,4 @@ limitations under the License.
 		</js:fill>
 	</js:Path>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_SVG/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_SVG/src/MyInitialView.mxml b/manualtests/FlexJSTest_SVG/src/MyInitialView.mxml
index 33e0c29..a4aef49 100644
--- a/manualtests/FlexJSTest_SVG/src/MyInitialView.mxml
+++ b/manualtests/FlexJSTest_SVG/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:html5="library://ns.apache.org/flexjs/html5"
 				xmlns:svg="library://ns.apache.org/flexjs/svg"				
@@ -55,4 +55,4 @@ limitations under the License.
 	<html5:Label id="timerLabel" x="100" y="125" />
 
 	<svg:TextButton text="SVG Button" x="100" y="175" width="100" height="30" click="startTimer()" />
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_SVG/src/SkinsView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_SVG/src/SkinsView.mxml b/manualtests/FlexJSTest_SVG/src/SkinsView.mxml
index 9fd701d..85ace4e 100644
--- a/manualtests/FlexJSTest_SVG/src/SkinsView.mxml
+++ b/manualtests/FlexJSTest_SVG/src/SkinsView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic" xmlns:skins="skins.*" xmlns:mx="library://ns.adobe.com/flex/mx"
 				initComplete="viewbase1_initCompleteHandler(event)" >
 	<fx:Script>
@@ -66,7 +66,7 @@ limitations under the License.
 		<js:State name="disabled"/>
 	</js:states>
 	<!--<js:beads>
-		<js:ViewBaseDataBinding />
+		<js:ViewDataBinding />
 	</js:beads>-->
 	<js:Container x="0" y="0" >
 		<js:Label text="MyButton" x="20" y="5" includeIn="{[up,down,over,disabled]}" />
@@ -100,4 +100,4 @@ limitations under the License.
 		
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_SVG/src/skins/Button_up.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_SVG/src/skins/Button_up.mxml b/manualtests/FlexJSTest_SVG/src/skins/Button_up.mxml
index 0dca5c7..8583dbc 100644
--- a/manualtests/FlexJSTest_SVG/src/skins/Button_up.mxml
+++ b/manualtests/FlexJSTest_SVG/src/skins/Button_up.mxml
@@ -17,11 +17,11 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic">
 	<js:Path x="0" y="300" width="200" height="100" data="M 100 350 q 150 -300 300 0" >
 		<js:fill>
 			<js:SolidColor color="#0000FF" alpha="0.5" />
 		</js:fill>
 	</js:Path>
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_basic/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_basic/src/MyInitialView.mxml b/manualtests/FlexJSTest_basic/src/MyInitialView.mxml
index 496741a..a6d54fb 100644
--- a/manualtests/FlexJSTest_basic/src/MyInitialView.mxml
+++ b/manualtests/FlexJSTest_basic/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic" 
 			   >
     <fx:Script>
@@ -140,4 +140,4 @@ limitations under the License.
 		</js:beads>
 	</js:ComboBox>
     
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_createjs/build.xml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_createjs/build.xml b/manualtests/FlexJSTest_createjs/build.xml
index dd250a9..b8cda4e 100644
--- a/manualtests/FlexJSTest_createjs/build.xml
+++ b/manualtests/FlexJSTest_createjs/build.xml
@@ -56,7 +56,7 @@
     property="GOOG_HOME"
     value="${FLEXJS_HOME}/js/lib/google/closure-library"/>
     
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/createjs/out/bin/createjs.swc"/>
+    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/createjs/target/createjs.swc"/>
     
     <include file="${basedir}/../build_example.xml" />
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_createjs/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_createjs/src/MyInitialView.mxml b/manualtests/FlexJSTest_createjs/src/MyInitialView.mxml
index 6baacc0..8659424 100644
--- a/manualtests/FlexJSTest_createjs/src/MyInitialView.mxml
+++ b/manualtests/FlexJSTest_createjs/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<createjs:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<createjs:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic" 
 				xmlns:createjs="library://ns.apache.org/flexjs/createjs"
 				>
@@ -55,4 +55,4 @@ limitations under the License.
 	
 	<createjs:CheckBox id="check1" x="10" y="10" text="Check Me" selected="true"/>
 	
-</createjs:ViewBase>
+</createjs:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FlexJSTest_jquery/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_jquery/src/MyInitialView.mxml b/manualtests/FlexJSTest_jquery/src/MyInitialView.mxml
index 6059cdf..b91d58b 100644
--- a/manualtests/FlexJSTest_jquery/src/MyInitialView.mxml
+++ b/manualtests/FlexJSTest_jquery/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:jquery="library://ns.apache.org/flexjs/jquery"
 			   >
@@ -145,4 +145,4 @@ limitations under the License.
 		</js:beads>
 	</js:ComboBox>
     
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FormExample/src/MyFormView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FormExample/src/MyFormView.mxml b/manualtests/FormExample/src/MyFormView.mxml
index 894d7a2..190fbe5 100644
--- a/manualtests/FormExample/src/MyFormView.mxml
+++ b/manualtests/FormExample/src/MyFormView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*" 
@@ -70,4 +70,4 @@ limitations under the License.
 		</js:Container>		
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/FormatExample/src/MyFormView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FormatExample/src/MyFormView.mxml b/manualtests/FormatExample/src/MyFormView.mxml
index d974bf5..d513fcb 100644
--- a/manualtests/FormatExample/src/MyFormView.mxml
+++ b/manualtests/FormatExample/src/MyFormView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*" 
@@ -130,4 +130,4 @@ limitations under the License.
 		
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/ImageTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/ImageTest/src/MyInitialView.mxml b/manualtests/ImageTest/src/MyInitialView.mxml
index 342abcc..8037448 100644
--- a/manualtests/ImageTest/src/MyInitialView.mxml
+++ b/manualtests/ImageTest/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*">
 	<fx:Script>
@@ -42,4 +42,4 @@ limitations under the License.
 		
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/ListsTest/src/FirstView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/ListsTest/src/FirstView.mxml b/manualtests/ListsTest/src/FirstView.mxml
index 4bfc146..c343c7a 100644
--- a/manualtests/ListsTest/src/FirstView.mxml
+++ b/manualtests/ListsTest/src/FirstView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*">
     <fx:Script>
@@ -60,4 +60,4 @@ limitations under the License.
 	
 	<js:Label id="pickLabel" x="250" y="20" width="200" />
 
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/ProxyTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/ProxyTest/src/MyInitialView.mxml b/manualtests/ProxyTest/src/MyInitialView.mxml
index 9b51ed8..e51ae0b 100644
--- a/manualtests/ProxyTest/src/MyInitialView.mxml
+++ b/manualtests/ProxyTest/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*" 
@@ -64,4 +64,4 @@ limitations under the License.
 		<js:TextButton text="Test" click="runTest()" />
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/ReflectionTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/ReflectionTest/src/MyInitialView.mxml b/manualtests/ReflectionTest/src/MyInitialView.mxml
index 9d9df84..95d6bf5 100644
--- a/manualtests/ReflectionTest/src/MyInitialView.mxml
+++ b/manualtests/ReflectionTest/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*" 
@@ -107,4 +107,4 @@ limitations under the License.
 		<js:TextButton text="Test" click="runTest()" />
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/RollEventsTest/src/RollEventsTest.mxml
----------------------------------------------------------------------
diff --git a/manualtests/RollEventsTest/src/RollEventsTest.mxml b/manualtests/RollEventsTest/src/RollEventsTest.mxml
index 80e3e08..f36accd 100644
--- a/manualtests/RollEventsTest/src/RollEventsTest.mxml
+++ b/manualtests/RollEventsTest/src/RollEventsTest.mxml
@@ -39,7 +39,7 @@
 	</fx:Style>
 	
 	<js:initialView>
-		<js:ViewBase>
+		<js:View>
 			<js:Container x="50" y="50" width="400" height="400" className="ContainerBackground">
 				<js:beads>
 					<js:BasicLayout />
@@ -47,6 +47,6 @@
 				</js:beads>
 			</js:Container>
 			<js:Label id="output" x="500" y="50" text="roll here" />
-		</js:ViewBase>
+		</js:View>
 	</js:initialView>
 </js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/324ce859/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index 25803cd..efb4317 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*" 
@@ -258,4 +258,4 @@ limitations under the License.
 		<js:TextButton text="Test" click="runTest()" />
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>


[08/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - update examples with View class

Posted by ah...@apache.org.
update examples with View class


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/562e54cd
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/562e54cd
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/562e54cd

Branch: refs/heads/spark
Commit: 562e54cda74bd4d1765f49c53383d69b8265f991
Parents: dfd4704
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jun 9 13:11:09 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Jun 9 13:26:27 2016 -0700

----------------------------------------------------------------------
 examples/flexjs/ChartExample/src/MyInitialView.mxml       |  4 ++--
 examples/flexjs/ChartExample/src/SpeedTestView.mxml       |  4 ++--
 .../flexjs/CordovaCameraExample/src/MyInitialView.mxml    |  4 ++--
 examples/flexjs/DataBindingExample/src/MyInitialView.mxml |  6 +++---
 .../flexjs/DataBindingExample_Flat/src/MyInitialView.mxml |  6 +++---
 examples/flexjs/DataGridExample/src/MyInitialView.mxml    |  4 ++--
 examples/flexjs/DesktopMap/src/MyInitialView.mxml         |  6 +++---
 examples/flexjs/FlexJSStore/src/FlexJSStore.mxml          |  4 ++--
 .../src/productsView/ProductCatalogPanelTitleBarView.mxml |  6 +++---
 examples/flexjs/FlexJSStore_jquery/src/FlexJSStore.mxml   |  4 ++--
 .../src/productsView/ProductCatalogPanelTitleBarView.mxml |  6 +++---
 examples/flexjs/FlexWebsiteStatsViewer/src/StatsView.mxml |  4 ++--
 examples/flexjs/MapSearch/src/MyInitialView.mxml          |  6 +++---
 examples/flexjs/MobileTrader/src/MyInitialView.mxml       | 10 +++++-----
 examples/flexjs/MobileTrader/src/views/AlertsView.mxml    |  4 ++--
 examples/flexjs/MobileTrader/src/views/AssetsView.mxml    |  4 ++--
 examples/flexjs/MobileTrader/src/views/SearchView.mxml    |  4 ++--
 examples/flexjs/MobileTrader/src/views/StockView.mxml     |  4 ++--
 examples/flexjs/MobileTrader/src/views/WatchListView.mxml |  4 ++--
 examples/flexjs/StorageExample/src/MyInitialView.mxml     |  6 +++---
 .../src/sample/todo/views/TodoListView.mxml               |  4 ++--
 examples/flexjs/TreeExample/src/MyInitialView.mxml        |  6 +++---
 22 files changed, 55 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/ChartExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ChartExample/src/MyInitialView.mxml b/examples/flexjs/ChartExample/src/MyInitialView.mxml
index 6f0175e..17e2e09 100644
--- a/examples/flexjs/ChartExample/src/MyInitialView.mxml
+++ b/examples/flexjs/ChartExample/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*"
@@ -309,4 +309,4 @@ limitations under the License.
 		</js:series>
 	</js:LineChart>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/ChartExample/src/SpeedTestView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ChartExample/src/SpeedTestView.mxml b/examples/flexjs/ChartExample/src/SpeedTestView.mxml
index d1d4b2c..4b8f77d 100644
--- a/examples/flexjs/ChartExample/src/SpeedTestView.mxml
+++ b/examples/flexjs/ChartExample/src/SpeedTestView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
 				xmlns:models="models.*"
@@ -184,4 +184,4 @@ limitations under the License.
 		<js:Label text="  (results)" id="regChartResults" />
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/CordovaCameraExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/CordovaCameraExample/src/MyInitialView.mxml b/examples/flexjs/CordovaCameraExample/src/MyInitialView.mxml
index 29e31e3..7472d95 100644
--- a/examples/flexjs/CordovaCameraExample/src/MyInitialView.mxml
+++ b/examples/flexjs/CordovaCameraExample/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" >
     <fx:Script>
@@ -72,4 +72,4 @@ limitations under the License.
 	
 	<js:Image id="image" x="20" y="200" width="200" height="200" />
 
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/DataBindingExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample/src/MyInitialView.mxml b/examples/flexjs/DataBindingExample/src/MyInitialView.mxml
index 667254d..8345213 100644
--- a/examples/flexjs/DataBindingExample/src/MyInitialView.mxml
+++ b/examples/flexjs/DataBindingExample/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 			    initComplete="initControls()">
     <fx:Script>
@@ -100,7 +100,7 @@ limitations under the License.
         <js:State name="showAll" />        
     </js:states>
     <js:beads>
-        <js:ViewBaseDataBinding />
+        <js:ViewDataBinding />
     </js:beads>
     <js:Container x="0" y="0" className="topContainer" >
         <js:beads>
@@ -141,4 +141,4 @@ limitations under the License.
                         includeIn="showAll"
                         text="{MyModel(applicationModel).allData}" />
     </js:Container>	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/DataBindingExample_Flat/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample_Flat/src/MyInitialView.mxml b/examples/flexjs/DataBindingExample_Flat/src/MyInitialView.mxml
index b3456d2..26ca9b0 100644
--- a/examples/flexjs/DataBindingExample_Flat/src/MyInitialView.mxml
+++ b/examples/flexjs/DataBindingExample_Flat/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:js="library://ns.apache.org/flexjs/basic"
              xmlns:flat="library://ns.apache.org/flexjs/flat"
 			    initComplete="initControls()">
@@ -101,7 +101,7 @@ limitations under the License.
         <js:State name="showAll" />        
     </js:states>
     <js:beads>
-        <js:ViewBaseDataBinding />
+        <js:ViewDataBinding />
     </js:beads>
     <js:Container x="0" y="0" className="topContainer" >
         <js:beads>
@@ -142,4 +142,4 @@ limitations under the License.
                         includeIn="showAll"
                         text="{MyModel(applicationModel).allData}" />
     </js:Container>	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/DataGridExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataGridExample/src/MyInitialView.mxml b/examples/flexjs/DataGridExample/src/MyInitialView.mxml
index d6173a1..242c122 100644
--- a/examples/flexjs/DataGridExample/src/MyInitialView.mxml
+++ b/examples/flexjs/DataGridExample/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic">
     <fx:Script>
         <![CDATA[
@@ -64,4 +64,4 @@ limitations under the License.
 		</js:columns>
 	</js:DataGrid>
 
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/DesktopMap/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DesktopMap/src/MyInitialView.mxml b/examples/flexjs/DesktopMap/src/MyInitialView.mxml
index 9559493..7a1d46d 100644
--- a/examples/flexjs/DesktopMap/src/MyInitialView.mxml
+++ b/examples/flexjs/DesktopMap/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
                 xmlns:google="library://ns.apache.org/flexjs/google"
 				xmlns:local="*"
@@ -95,7 +95,7 @@ limitations under the License.
 	</fx:Style>
 	
 	<js:beads>
-		<js:ViewBaseDataBinding />
+		<js:ViewDataBinding />
 	</js:beads>
 	
 	
@@ -144,4 +144,4 @@ limitations under the License.
 		<js:TextButton text="MapIt" click="mapIt()" />
 	</js:Container>
 
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/FlexJSStore/src/FlexJSStore.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore/src/FlexJSStore.mxml b/examples/flexjs/FlexJSStore/src/FlexJSStore.mxml
index 4d04dc6..8f4ade3 100755
--- a/examples/flexjs/FlexJSStore/src/FlexJSStore.mxml
+++ b/examples/flexjs/FlexJSStore/src/FlexJSStore.mxml
@@ -186,7 +186,7 @@ limitations under the License.
         <js:ApplicationDataBinding />
     </js:beads>
     <js:initialView>
-        <js:ViewBase	width="990" height="585"
+        <js:View	width="990" height="585"
                         initComplete="completeHandler(null)"
                         stateChangeComplete="chainStatesIfNeeded()">
             <js:states>
@@ -263,6 +263,6 @@ limitations under the License.
                              width="100%" height="550"
                              />
             </js:Container>
-        </js:ViewBase>        
+        </js:View>        
     </js:initialView>    
 </js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml b/examples/flexjs/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
index 5e82f95..f2cb397 100755
--- a/examples/flexjs/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
+++ b/examples/flexjs/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:MXMLBeadView xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:js="library://ns.apache.org/flexjs/basic" 
                         xmlns:productsView="productsView.*"
                         >
@@ -36,7 +36,7 @@ limitations under the License.
         ]]>
     </fx:Script>
     <js:beads>
-        <js:MXMLBeadViewBaseDataBinding />
+        <js:MXMLBeadViewDataBinding />
         <js:ParentDocumentBead id="pdb" />
         <js:LayoutChangeNotifier watchedProperty="{buttons.width}" />
     </js:beads>
@@ -46,4 +46,4 @@ limitations under the License.
                        visible="{ITitleBarModel(model).showCloseButton}";
                        />
     <productsView:CatalogTitleButtons id="buttons" />
-</js:MXMLBeadViewBase>
+</js:MXMLBeadView>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/FlexJSStore_jquery/src/FlexJSStore.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/src/FlexJSStore.mxml b/examples/flexjs/FlexJSStore_jquery/src/FlexJSStore.mxml
index 94a724f..e5621c0 100755
--- a/examples/flexjs/FlexJSStore_jquery/src/FlexJSStore.mxml
+++ b/examples/flexjs/FlexJSStore_jquery/src/FlexJSStore.mxml
@@ -186,7 +186,7 @@ limitations under the License.
         <js:ApplicationDataBinding />
     </jquery:beads>
     <jquery:initialView>
-        <js:ViewBase	width="990" height="585"
+        <js:View	width="990" height="585"
                         initComplete="completeHandler(null)"
                         stateChangeComplete="chainStatesIfNeeded()">
             <js:states>
@@ -263,6 +263,6 @@ limitations under the License.
                              width="100%" height="550"
                              />
             </js:Container>
-        </js:ViewBase>        
+        </js:View>        
     </jquery:initialView>    
 </jquery:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml
index 5e82f95..f2cb397 100755
--- a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml
+++ b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:MXMLBeadView xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:js="library://ns.apache.org/flexjs/basic" 
                         xmlns:productsView="productsView.*"
                         >
@@ -36,7 +36,7 @@ limitations under the License.
         ]]>
     </fx:Script>
     <js:beads>
-        <js:MXMLBeadViewBaseDataBinding />
+        <js:MXMLBeadViewDataBinding />
         <js:ParentDocumentBead id="pdb" />
         <js:LayoutChangeNotifier watchedProperty="{buttons.width}" />
     </js:beads>
@@ -46,4 +46,4 @@ limitations under the License.
                        visible="{ITitleBarModel(model).showCloseButton}";
                        />
     <productsView:CatalogTitleButtons id="buttons" />
-</js:MXMLBeadViewBase>
+</js:MXMLBeadView>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/FlexWebsiteStatsViewer/src/StatsView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexWebsiteStatsViewer/src/StatsView.mxml b/examples/flexjs/FlexWebsiteStatsViewer/src/StatsView.mxml
index d3b090d..0636dda 100644
--- a/examples/flexjs/FlexWebsiteStatsViewer/src/StatsView.mxml
+++ b/examples/flexjs/FlexWebsiteStatsViewer/src/StatsView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
                 initComplete="testit()"
 				>
@@ -84,4 +84,4 @@ limitations under the License.
 			</js:ColumnSeries>
 		</js:series>
 	</js:ColumnChart>	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/MapSearch/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MapSearch/src/MyInitialView.mxml b/examples/flexjs/MapSearch/src/MyInitialView.mxml
index 0269c58..54ec4a2 100644
--- a/examples/flexjs/MapSearch/src/MyInitialView.mxml
+++ b/examples/flexjs/MapSearch/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
                 xmlns:google="library://ns.apache.org/flexjs/google"
 				xmlns:local="*"
@@ -160,7 +160,7 @@ limitations under the License.
 	</fx:Style>
 	
 	<js:beads>
-		<js:ViewBaseDataBinding />
+		<js:ViewDataBinding />
 	</js:beads>
 	
 	
@@ -208,4 +208,4 @@ limitations under the License.
 		
 	</js:Container>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/MobileTrader/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/MyInitialView.mxml b/examples/flexjs/MobileTrader/src/MyInitialView.mxml
index 6c6b83a..0c353ff 100755
--- a/examples/flexjs/MobileTrader/src/MyInitialView.mxml
+++ b/examples/flexjs/MobileTrader/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:local="*"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:views="views.*" 
@@ -186,7 +186,7 @@ limitations under the License.
 			import org.apache.flex.core.IBeadController;
 			import org.apache.flex.core.IBeadModel;
 			import org.apache.flex.events.Event;
-			import org.apache.flex.mobile.IView;
+			import org.apache.flex.mobile.IViewManagerView;
 			import org.apache.flex.mobile.IViewManager;
 			import org.apache.flex.mobile.chrome.NavigationBar;
 			
@@ -210,7 +210,7 @@ limitations under the License.
 				trace("watchlist stack changed");
 				var manager:StackedViewManager = event.currentTarget as StackedViewManager;
 				
-				var currentView:IView = manager.selectedView;
+				var currentView:IViewManagerView = manager.selectedView;
 				backButton.visible = manager.views.length > 1;
 			}
 			
@@ -224,7 +224,7 @@ limitations under the License.
 	</fx:Script>
 	
 	<js:beads>
-		<js:ViewBaseDataBinding />
+		<js:ViewDataBinding />
 	</js:beads>
 	
 	<js:TabbedViewManager id="navController" width="100%" height="100%" x="0" y="0" viewChanged="tabbedViewChanged(event)">
@@ -253,4 +253,4 @@ limitations under the License.
 		</js:views>
 	</js:TabbedViewManager>
 	
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/views/AlertsView.mxml b/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
index 6a393de..f06dd65 100755
--- a/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
+++ b/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:TitleView xmlns:fx="http://ns.adobe.com/mxml/2009"
 			 title="Alerts"
 				       xmlns:js="library://ns.apache.org/flexjs/basic"
 				       xmlns:local="*"
@@ -98,4 +98,4 @@ limitations under the License.
 		</js:columns>
 	</js:DataGrid>
 	
-</js:View>
\ No newline at end of file
+</js:TitleView>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/MobileTrader/src/views/AssetsView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/views/AssetsView.mxml b/examples/flexjs/MobileTrader/src/views/AssetsView.mxml
index c71e257..2929a3e 100755
--- a/examples/flexjs/MobileTrader/src/views/AssetsView.mxml
+++ b/examples/flexjs/MobileTrader/src/views/AssetsView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:TitleView xmlns:fx="http://ns.adobe.com/mxml/2009"
 			title="Assets"
 			xmlns:js="library://ns.apache.org/flexjs/basic"
 			xmlns:models="models.*"
@@ -86,4 +86,4 @@ limitations under the License.
 		</js:series>
 	</js:BarChart>
 
-</js:View>
\ No newline at end of file
+</js:TitleView>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/MobileTrader/src/views/SearchView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/views/SearchView.mxml b/examples/flexjs/MobileTrader/src/views/SearchView.mxml
index 6e73d71..0348fba 100755
--- a/examples/flexjs/MobileTrader/src/views/SearchView.mxml
+++ b/examples/flexjs/MobileTrader/src/views/SearchView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:TitleView xmlns:fx="http://ns.adobe.com/mxml/2009"
 					   xmlns:js="library://ns.apache.org/flexjs/basic"
 					   xmlns:apache="org.apache.flex.html.beads.*"
 					   xmlns:local="*"
@@ -34,4 +34,4 @@ limitations under the License.
 	</fx:Script>
 		
 	<js:Label text="Search View" x="20" y="100" />
-</js:View>
+</js:TitleView>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/MobileTrader/src/views/StockView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/views/StockView.mxml b/examples/flexjs/MobileTrader/src/views/StockView.mxml
index 8cb814e..95b8992 100755
--- a/examples/flexjs/MobileTrader/src/views/StockView.mxml
+++ b/examples/flexjs/MobileTrader/src/views/StockView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:TitleView xmlns:fx="http://ns.adobe.com/mxml/2009"
 					   xmlns:js="library://ns.apache.org/flexjs/basic"
 					   xmlns:apache="org.apache.flex.html.beads.*"
 					   xmlns:local="*"
@@ -95,4 +95,4 @@ limitations under the License.
 			<js:TextButton text="Remove From List" width="200" className="StockRemoveButton" click="removeFromList()" />
 		</js:Container>
 	</js:Container>
-</js:View>
\ No newline at end of file
+</js:TitleView>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/views/WatchListView.mxml b/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
index 46c7434..aa9da04 100755
--- a/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
+++ b/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:TitleView xmlns:fx="http://ns.adobe.com/mxml/2009"
 		 title="Watch List"
 		 xmlns:js="library://ns.apache.org/flexjs/basic"
 		 xmlns:controller="controller.*"
@@ -148,4 +148,4 @@ limitations under the License.
 		</js:columns>
 	</js:DataGrid>
 	
-</js:View>
+</js:TitleView>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/StorageExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/StorageExample/src/MyInitialView.mxml b/examples/flexjs/StorageExample/src/MyInitialView.mxml
index 0717fcd..370d0af 100644
--- a/examples/flexjs/StorageExample/src/MyInitialView.mxml
+++ b/examples/flexjs/StorageExample/src/MyInitialView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*"
 				initComplete="startup()">
@@ -199,7 +199,7 @@ limitations under the License.
 	</fx:Style>
 	
 	<js:beads>
-		<js:ViewBaseDataBinding />
+		<js:ViewDataBinding />
 	</js:beads>
 	
 	<js:VContainer width="100%" height="100%">
@@ -242,4 +242,4 @@ limitations under the License.
 	</js:VContainer>
 		
 
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/TodoListSampleApp/src/sample/todo/views/TodoListView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TodoListSampleApp/src/sample/todo/views/TodoListView.mxml b/examples/flexjs/TodoListSampleApp/src/sample/todo/views/TodoListView.mxml
index 153fb76..3a4c7e4 100644
--- a/examples/flexjs/TodoListSampleApp/src/sample/todo/views/TodoListView.mxml
+++ b/examples/flexjs/TodoListSampleApp/src/sample/todo/views/TodoListView.mxml
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:js="library://ns.apache.org/flexjs/basic"
                 xmlns:svg="library://ns.apache.org/flexjs/svg">
 
@@ -106,4 +106,4 @@ limitations under the License.
         }
     </fx:Style>
 
-</js:ViewBase>
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/562e54cd/examples/flexjs/TreeExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TreeExample/src/MyInitialView.mxml b/examples/flexjs/TreeExample/src/MyInitialView.mxml
index d7fa22f..2418cd7 100644
--- a/examples/flexjs/TreeExample/src/MyInitialView.mxml
+++ b/examples/flexjs/TreeExample/src/MyInitialView.mxml
@@ -17,11 +17,11 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic">
     
     <js:beads>
-        <js:ViewBaseDataBinding />
+        <js:ViewDataBinding />
     </js:beads>
 	
 	<js:Tree id="tree" x="30" y="30" width="400" height="300" 
@@ -34,4 +34,4 @@ limitations under the License.
 		</js:beads>
 	</js:Tree>
 
-</js:ViewBase>
+</js:View>


[06/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - rename mobile.View to TitleView and create a core.View so we don't have to use ViewBase in examples (trying to get rid of the 'Base' in examples)

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadViewBase.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadViewBase.as
deleted file mode 100644
index 301e430..0000000
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/MXMLBeadViewBase.as
+++ /dev/null
@@ -1,317 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html
-{
-	import org.apache.flex.states.State;
-	
-	import org.apache.flex.core.IBead;
-    import org.apache.flex.core.ILayoutHost;
-    import org.apache.flex.core.IParent;
-	import org.apache.flex.core.IParentIUIBase;
-	import org.apache.flex.core.IStrand;
-    import org.apache.flex.core.IStatesImpl;
-	import org.apache.flex.core.ValuesManager;
-    import org.apache.flex.html.beads.ContainerView;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.ValueChangeEvent;
-	import org.apache.flex.utils.MXMLDataInterpreter;
-
-    [DefaultProperty("mxmlContent")]
-    
-    /**
-     *  The MXMLBeadViewBase class extends BeadViewBase
-     *  and adds support for databinding and specification
-     *  of children in MXML.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class MXMLBeadViewBase extends ContainerView implements IStrand, ILayoutHost
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function MXMLBeadViewBase()
-		{
-			super();
-		}
-		
-        [Bindable("strandChanged")]
-        /**
-         *  An MXMLBeadViewBase doesn't create its children until it is added to
-         *  the strand.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        override public function set strand(value:IStrand):void
-        {
-            super.strand = value;
-            // each MXML file can also have styles in fx:Style block
-            ValuesManager.valuesImpl.init(this);
-            
-            dispatchEvent(new Event("strandChanged"));  
-            
-            for each (var bead:IBead in beads)
-                addBead(bead);
-            
-            dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
-
-            MXMLDataInterpreter.generateMXMLInstances(this, IParent(value), MXMLDescriptor);
-            
-            dispatchEvent(new Event("initBindings"))
-            dispatchEvent(new Event("initComplete"))
-            dispatchEvent(new Event("childrenAdded"));
-        }
-        
-        [Bindable("__NoChangeEvent__")]
-        /**
-         *  The model object.
-         */
-        public function get model():Object
-        {
-            return _strand["model"];
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.Application#MXMLDescriptor
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get MXMLDescriptor():Array
-        {
-            return null;
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.Application#generateMXMLAttributes()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function generateMXMLAttributes(data:Array):void
-        {
-            MXMLDataInterpreter.generateMXMLProperties(this, data);
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public var mxmlContent:Array;
-        
-        private var _states:Array;
-        
-        /**
-         *  The array of view states. These should
-         *  be instances of org.apache.flex.states.State.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get states():Array
-        {
-            return _states;
-        }
-        
-        /**
-         *  @private
-         */
-        public function set states(value:Array):void
-        {
-            _states = value;
-            _currentState = _states[0].name;
-            
-            try{
-                if (getBeadByType(IStatesImpl) == null)
-                    addBead(new (ValuesManager.valuesImpl.getValue(this, "iStatesImpl")) as IBead);
-            }
-            //TODO:  Need to handle this case more gracefully
-            catch(e:Error)
-            {
-                COMPILE::AS3
-                {
-                    trace(e.message);                        
-                }
-            }
-            
-        }
-        
-        /**
-         *  <code>true</code> if the array of states
-         *  contains a state with this name.
-         * 
-         *  @param state The state namem.
-         *  @return True if state in state array
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function hasState(state:String):Boolean
-        {
-            for each (var s:State in _states)
-            {
-                if (s.name == state)
-                    return true;
-            }
-            return false;
-        }
-        
-        private var _currentState:String;
-        
-        [Bindable("currentStateChange")]
-        /**
-         *  The name of the current state.
-         * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get currentState():String
-        {
-            return _currentState;   
-        }
-        
-        /**
-         *  @private
-         */
-        public function set currentState(value:String):void
-        {
-            var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
-            _currentState = value;
-            dispatchEvent(event);
-        }
-        
-        private var _transitions:Array;
-        
-        /**
-         *  The array of transitions.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get transitions():Array
-        {
-            return _transitions;   
-        }
-        
-        /**
-         *  @private
-         */
-        public function set transitions(value:Array):void
-        {
-            _transitions = value;   
-        }
-
-        /**
-         *  @copy org.apache.flex.core.Application#beads
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public var beads:Array;
-        
-        private var _beads:Array;
-        
-        /**
-         *  @copy org.apache.flex.core.IStrand#addBead()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */        
-        public function addBead(bead:IBead):void
-        {
-            if (!_beads)
-                _beads = [];
-            _beads.push(bead);
-            bead.strand = this;            
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.IStrand#getBeadByType()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function getBeadByType(classOrInterface:Class):IBead
-        {
-            for each (var bead:IBead in _beads)
-            {
-                if (bead is classOrInterface)
-                    return bead;
-            }
-            return null;
-        }
-        
-        /**
-         *  @copy org.apache.flex.core.IStrand#removeBead()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function removeBead(value:IBead):IBead	
-        {
-            var n:int = _beads.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                var bead:IBead = _beads[i];
-                if (bead == value)
-                {
-                    _beads.splice(i, 1);
-                    return bead;
-                }
-            }
-            return null;
-        }
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/TitleBarView.mxml
index cebd24b..206f43e 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/TitleBarView.mxml
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/TitleBarView.mxml
@@ -25,7 +25,7 @@ limitations under the License.
  @playerversion AIR 2.6
  @productversion FlexJS 0.0
 -->
-<js:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:MXMLBeadView xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:js="library://ns.apache.org/flexjs/basic">
 				  
     <fx:Script>
@@ -43,7 +43,7 @@ limitations under the License.
         ]]>
     </fx:Script>
     <js:beads>
-        <js:MXMLBeadViewBaseDataBinding />
+        <js:MXMLBeadViewDataBinding />
         <js:LayoutChangeNotifier watchedProperty="{titleLabel.text}" />
     </js:beads>
 
@@ -55,4 +55,4 @@ limitations under the License.
     <js:CloseButton id="closeButton" click="clickHandler()"
                        visible="{ITitleBarModel(model).showCloseButton}"/>
     
-</js:MXMLBeadViewBase>
+</js:MXMLBeadView>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index 9fe03a8..8904c6e 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -101,7 +101,7 @@
     <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout"/>
     <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout"/>
     <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout"/>
-    <component id="MXMLBeadViewBase" class="org.apache.flex.html.MXMLBeadViewBase"/>
+    <component id="MXMLBeadView" class="org.apache.flex.html.MXMLBeadView"/>
 
     <component id="Border" class="org.apache.flex.html.supportClasses.Border"/>
     

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/defaults.css b/frameworks/projects/HTML/src/main/resources/defaults.css
index 20fcebd..ba63d8e 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -355,7 +355,7 @@ ToolTip
     background-color: #FFFFCC;
 }
 
-ViewBase
+View
 {
     IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
     IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout");
@@ -634,7 +634,7 @@ ToggleTextButton
     IBeadView:  ClassReference("org.apache.flex.html.beads.CSSTextToggleButtonView");
 }
 
-ViewBase
+View
 {
     iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/MobileClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/MobileClasses.as b/frameworks/projects/Mobile/src/main/flex/MobileClasses.as
index 411b05c..7c650fd 100644
--- a/frameworks/projects/Mobile/src/main/flex/MobileClasses.as
+++ b/frameworks/projects/Mobile/src/main/flex/MobileClasses.as
@@ -35,7 +35,7 @@ internal class MobileClasses
 	import org.apache.flex.mobile.ViewManagerBase; ViewManagerBase;
 	import org.apache.flex.mobile.beads.StackedViewManagerView; StackedViewManagerView;
 	import org.apache.flex.mobile.beads.TabbedViewManagerView; TabbedViewManagerView;
-	import org.apache.flex.mobile.beads.ViewManagerView; ViewManagerView;
+	import org.apache.flex.mobile.beads.ViewManagerViewBase; ViewManagerViewBase;
 	import org.apache.flex.mobile.beads.ToggleSwitchView; ToggleSwitchView;
 	import org.apache.flex.mobile.beads.controllers.ToggleSwitchMouseController; ToggleSwitchMouseController;
 	import org.apache.flex.mobile.chrome.NavigationBar; NavigationBar;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as
deleted file mode 100644
index 232d212..0000000
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as
+++ /dev/null
@@ -1,43 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
-	/**
-	 * The IView interface is implemented by any class that can be managed by
-	 * an IViewManager.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public interface IView
-	{
-		/**
-		 * The parent view manager.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		function get viewManager():IViewManager;
-		function set viewManager(value:IViewManager):void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
index 54bb22a..75cce3c 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
@@ -27,7 +27,7 @@ package org.apache.flex.mobile
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public interface IViewManager extends IView
+	public interface IViewManager extends IViewManagerView
 	{
 		/**
 		 * The view that is currently active in the view manager.
@@ -37,6 +37,6 @@ package org.apache.flex.mobile
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		function get selectedView():IView;
+		function get selectedView():IViewManagerView;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
new file mode 100644
index 0000000..8735907
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.mobile
+{
+	/**
+	 * The IViewManagerView interface is implemented by any class that can be managed by
+	 * an IViewManager.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public interface IViewManagerView
+	{
+		/**
+		 * The parent view manager.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function get viewManager():IViewManager;
+		function set viewManager(value:IViewManager):void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
index 4b29d28..dc63c65 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
@@ -20,7 +20,7 @@ package org.apache.flex.mobile
 {	
 	import org.apache.flex.events.Event;
 	import org.apache.flex.html.Container;
-	import org.apache.flex.mobile.IView;
+	import org.apache.flex.mobile.IViewManagerView;
 	import org.apache.flex.mobile.IViewManager;
 	import org.apache.flex.mobile.chrome.NavigationBar;
 	import org.apache.flex.mobile.chrome.ToolBar;
@@ -101,7 +101,7 @@ package org.apache.flex.mobile
 		}
 
 		
-		private var _topView:IView;
+		private var _topView:IViewManagerView;
 
 		/**
 		 * The top-most (current) view.
@@ -111,7 +111,7 @@ package org.apache.flex.mobile
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		override public function get selectedView():IView
+		override public function get selectedView():IViewManagerView
 		{
 			return _topView;
 		}
@@ -125,7 +125,7 @@ package org.apache.flex.mobile
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function push(nextView:IView):void
+		public function push(nextView:IViewManagerView):void
 		{
 			nextView.viewManager = this;
 			ViewManagerModel(model).pushView(nextView);
@@ -151,7 +151,7 @@ package org.apache.flex.mobile
 				var lastView:Object = ViewManagerModel(model).popView();
 				removeElement(_topView);
 				addElement(lastView);
-				_topView = lastView as IView;
+				_topView = lastView as IViewManagerView;
 				
 				dispatchEvent( new Event("viewChanged") );
 			}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
index 43fc6a6..347f7c6 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
@@ -19,7 +19,7 @@
 package org.apache.flex.mobile
 {	
 	import org.apache.flex.html.Container;
-	import org.apache.flex.mobile.IView;
+	import org.apache.flex.mobile.IViewManagerView;
 	import org.apache.flex.mobile.IViewManager;
 	import org.apache.flex.mobile.chrome.TabBar;
 	import org.apache.flex.mobile.models.ViewManagerModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as
new file mode 100644
index 0000000..b2d2920
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as
@@ -0,0 +1,103 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.mobile
+{
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.html.Container;
+	
+	/**
+	 * The TitleView class represents a view in a mobile app that has
+	 * a title and is typically used in a ViewManager.
+	 */
+	public class TitleView extends Container implements IViewManagerView
+	{
+		public function TitleView()
+		{
+			super();
+			
+			// views always take up 100% of their space
+			percentWidth = 100;
+			percentHeight = 100;
+		}
+		
+		private var _title:String;
+		public function get title():String
+		{
+			return _title;
+		}
+		public function set title(value:String):void
+		{
+			_title = value;
+		}
+		
+		COMPILE::AS3
+		override public function toString():String
+		{
+			return _title;
+		}
+		
+		COMPILE::JS
+		public function toString():String
+		{
+			return _title;
+		}
+		
+		private var _viewManager:IViewManager;
+		public function get viewManager():IViewManager
+		{
+			return _viewManager;
+		}
+		public function set viewManager(value:IViewManager):void
+		{
+			_viewManager = value;
+		}
+		
+		private var _controller:IBeadController;
+        
+        /**
+         *  Get the controller for the view.
+         * 
+         *  @flexjsignorecoercion Class
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get controller():IBeadController
+		{
+			if (_controller == null) {
+				_controller = getBeadByType(IBeadController) as IBeadController;
+				if (_controller == null) {
+                    var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
+					_controller = new c() as IBeadController;
+					addBead(_controller);
+				}
+			}
+			return _controller;
+		}
+		public function set controller(value:IBeadController):void
+		{
+			_controller = value;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.as
deleted file mode 100644
index 490d8bf..0000000
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.as
+++ /dev/null
@@ -1,103 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IBeadController;
-	import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.html.Container;
-	
-	/**
-	 * The View class represents the area for a mobile app's primary
-	 * interface elements.
-	 */
-	public class View extends Container implements IView
-	{
-		public function View()
-		{
-			super();
-			
-			// views always take up 100% of their space
-			percentWidth = 100;
-			percentHeight = 100;
-		}
-		
-		private var _title:String;
-		public function get title():String
-		{
-			return _title;
-		}
-		public function set title(value:String):void
-		{
-			_title = value;
-		}
-		
-		COMPILE::AS3
-		override public function toString():String
-		{
-			return _title;
-		}
-		
-		COMPILE::JS
-		public function toString():String
-		{
-			return _title;
-		}
-		
-		private var _viewManager:IViewManager;
-		public function get viewManager():IViewManager
-		{
-			return _viewManager;
-		}
-		public function set viewManager(value:IViewManager):void
-		{
-			_viewManager = value;
-		}
-		
-		private var _controller:IBeadController;
-        
-        /**
-         *  Get the controller for the view.
-         * 
-         *  @flexjsignorecoercion Class
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get controller():IBeadController
-		{
-			if (_controller == null) {
-				_controller = getBeadByType(IBeadController) as IBeadController;
-				if (_controller == null) {
-                    var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
-					_controller = new c() as IBeadController;
-					addBead(_controller);
-				}
-			}
-			return _controller;
-		}
-		public function set controller(value:IBeadController):void
-		{
-			_controller = value;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
index 0da3f4d..690669b 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
@@ -21,7 +21,7 @@ package org.apache.flex.mobile
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.html.Container;
-	import org.apache.flex.mobile.IView;
+	import org.apache.flex.mobile.IViewManagerView;
 	import org.apache.flex.mobile.IViewManager;
 	import org.apache.flex.mobile.chrome.NavigationBar;
 	import org.apache.flex.mobile.models.ViewManagerModel;
@@ -170,7 +170,7 @@ package org.apache.flex.mobile
 			if (n > 0) {
 				for (var i:int = 0; i < n; i++)
 				{
-					var view:IView = ViewManagerModel(model).views[i] as IView;
+					var view:IViewManagerView = ViewManagerModel(model).views[i] as IViewManagerView;
 					view.viewManager = this;
 					if (i == 0) {
 						addElement(view, true);
@@ -195,7 +195,7 @@ package org.apache.flex.mobile
 			dispatchEvent( new Event("viewChanged") );
 		}
 		
-		private var _currentView:IView;
+		private var _currentView:IViewManagerView;
 		
 		/**
 		 * The currently visible view.
@@ -205,7 +205,7 @@ package org.apache.flex.mobile
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function get selectedView():IView
+		public function get selectedView():IViewManagerView
 		{
 			return _currentView;
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
index fd1a58b..85368ae 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
@@ -39,7 +39,7 @@ package org.apache.flex.mobile.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class StackedViewManagerView extends ViewManagerView
+	public class StackedViewManagerView extends ViewManagerViewBase
 	{
 		/**
 		 * Constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
index be20d2c..787375d 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
@@ -39,7 +39,7 @@ package org.apache.flex.mobile.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class TabbedViewManagerView extends ViewManagerView
+	public class TabbedViewManagerView extends ViewManagerViewBase
 	{
 		/**
 		 * Constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as
deleted file mode 100644
index 59baf94..0000000
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as
+++ /dev/null
@@ -1,165 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.beads
-{
-	import org.apache.flex.core.IBeadModel;
-	import org.apache.flex.core.IBeadView;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.IViewportModel;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.events.IEventDispatcher;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.html.Container;
-	import org.apache.flex.html.beads.layouts.HorizontalLayout;
-	import org.apache.flex.mobile.IView;
-	import org.apache.flex.mobile.chrome.NavigationBar;
-	import org.apache.flex.mobile.models.ViewManagerModel;
-	
-	/**
-	 * The ViewManagerView creates the visual elements of the StackedViewManager. This
-	 * includes a NavigationBar, ToolBar, and contentArea.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class ViewManagerView implements IBeadView
-	{
-		/**
-		 * Constructor.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function ViewManagerView()
-		{
-			super();
-		}
-		
-		public function get host():IUIBase
-		{
-			return _strand as IUIBase;
-		}
-		public function set host(value:IUIBase):void
-		{
-			// not implemented; getter only.
-		}
-		
-		private var _navigationBar:NavigationBar;
-		public function get navigationBar():NavigationBar
-		{
-			return _navigationBar;
-		}
-		public function set navigationBar(value:NavigationBar):void
-		{
-			// not implemented; getter only.
-		}
-		
-		private var _strand:IStrand;
-		public function get strand():IStrand
-		{
-			return _strand;
-		}
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			UIBase(_strand).addEventListener("sizeChanged", sizeChangedHandler);
-			UIBase(_strand).addEventListener("widthChanged", sizeChangedHandler);
-			UIBase(_strand).addEventListener("heightChanged", sizeChangedHandler);
-			
-			var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
-			model.addEventListener("selectedIndexChanged", viewsChangedHandler);
-
-			if (model.navigationBarItems)
-			{
-				_navigationBar = new NavigationBar();
-				_navigationBar.controls = model.navigationBarItems;
-				_navigationBar.addBead(new HorizontalLayout());
-				UIBase(_strand).addElement(_navigationBar, false);
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function viewsChangedHandler(event:Event):void
-		{
-			layoutChromeElements();
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function sizeChangedHandler(event:Event):void
-		{
-			layoutChromeElements();
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function layoutChromeElements():void
-		{
-			var host:UIBase = _strand as UIBase;
-			var contentAreaY:Number = 0;
-			var contentAreaHeight:Number = host.height;
-			
-			var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
-			
-			if (_navigationBar)
-			{
-				_navigationBar.x = 0;
-				_navigationBar.y = 0;
-				_navigationBar.width = host.width;
-				
-				contentAreaHeight -= _navigationBar.height;
-				contentAreaY = _navigationBar.height;
-				
-				model.navigationBar = _navigationBar;
-			}
-			
-			model.contentX = 0;
-			model.contentY = contentAreaY;
-			model.contentWidth = host.width;
-			model.contentHeight = contentAreaHeight;
-			
-			sizeViewsToFitContentArea();
-		}
-		
-		protected function sizeViewsToFitContentArea():void
-		{
-			var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
-			
-			var n:int = ViewManagerModel(model).views.length;
-			if (n > 0) {
-				for (var i:int = 0; i < n; i++)
-				{
-					var view:IView = ViewManagerModel(model).views[i] as IView;
-					UIBase(view).x = model.contentX;
-					UIBase(view).y = model.contentY;
-					UIBase(view).setWidthAndHeight(model.contentWidth, model.contentHeight, true);
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as
new file mode 100644
index 0000000..f314fad
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.mobile.beads
+{
+	import org.apache.flex.core.IBeadModel;
+	import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.IViewportModel;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.html.Container;
+	import org.apache.flex.html.beads.layouts.HorizontalLayout;
+	import org.apache.flex.mobile.IViewManagerView;
+	import org.apache.flex.mobile.chrome.NavigationBar;
+	import org.apache.flex.mobile.models.ViewManagerModel;
+	
+	/**
+	 * The ViewManagerViewBase creates the visual elements of the StackedViewManager. This
+	 * includes a NavigationBar, ToolBar, and contentArea.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class ViewManagerViewBase implements IBeadView
+	{
+		/**
+		 * Constructor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function ViewManagerViewBase()
+		{
+			super();
+		}
+		
+		public function get host():IUIBase
+		{
+			return _strand as IUIBase;
+		}
+		public function set host(value:IUIBase):void
+		{
+			// not implemented; getter only.
+		}
+		
+		private var _navigationBar:NavigationBar;
+		public function get navigationBar():NavigationBar
+		{
+			return _navigationBar;
+		}
+		public function set navigationBar(value:NavigationBar):void
+		{
+			// not implemented; getter only.
+		}
+		
+		private var _strand:IStrand;
+		public function get strand():IStrand
+		{
+			return _strand;
+		}
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			UIBase(_strand).addEventListener("sizeChanged", sizeChangedHandler);
+			UIBase(_strand).addEventListener("widthChanged", sizeChangedHandler);
+			UIBase(_strand).addEventListener("heightChanged", sizeChangedHandler);
+			
+			var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
+			model.addEventListener("selectedIndexChanged", viewsChangedHandler);
+
+			if (model.navigationBarItems)
+			{
+				_navigationBar = new NavigationBar();
+				_navigationBar.controls = model.navigationBarItems;
+				_navigationBar.addBead(new HorizontalLayout());
+				UIBase(_strand).addElement(_navigationBar, false);
+			}
+		}
+		
+		/**
+		 * @private
+		 */
+		protected function viewsChangedHandler(event:Event):void
+		{
+			layoutChromeElements();
+		}
+		
+		/**
+		 * @private
+		 */
+		protected function sizeChangedHandler(event:Event):void
+		{
+			layoutChromeElements();
+		}
+		
+		/**
+		 * @private
+		 */
+		protected function layoutChromeElements():void
+		{
+			var host:UIBase = _strand as UIBase;
+			var contentAreaY:Number = 0;
+			var contentAreaHeight:Number = host.height;
+			
+			var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
+			
+			if (_navigationBar)
+			{
+				_navigationBar.x = 0;
+				_navigationBar.y = 0;
+				_navigationBar.width = host.width;
+				
+				contentAreaHeight -= _navigationBar.height;
+				contentAreaY = _navigationBar.height;
+				
+				model.navigationBar = _navigationBar;
+			}
+			
+			model.contentX = 0;
+			model.contentY = contentAreaY;
+			model.contentWidth = host.width;
+			model.contentHeight = contentAreaHeight;
+			
+			sizeViewsToFitContentArea();
+		}
+		
+		protected function sizeViewsToFitContentArea():void
+		{
+			var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
+			
+			var n:int = ViewManagerModel(model).views.length;
+			if (n > 0) {
+				for (var i:int = 0; i < n; i++)
+				{
+					var view:IViewManagerView = ViewManagerModel(model).views[i] as IViewManagerView;
+					UIBase(view).x = model.contentX;
+					UIBase(view).y = model.contentY;
+					UIBase(view).setWidthAndHeight(model.contentWidth, model.contentHeight, true);
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40187884/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml b/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
index ddec534..4264191 100644
--- a/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
@@ -22,7 +22,7 @@
 <componentPackage>
     <component id="StackedViewManager" class="org.apache.flex.mobile.StackedViewManager" />
     <component id="TabbedViewManager" class="org.apache.flex.mobile.TabbedViewManager" />
-    <component id="View" class="org.apache.flex.mobile.View" />
+    <component id="TitleView" class="org.apache.flex.mobile.TitleView" />
     <component id="NavigationBar" class="org.apache.flex.mobile.chrome.NavigationBar" />
     <component id="ToolBar" class="org.apache.flex.mobile.chrome.ToolBar" />
     <component id="TabBar" class="org.apache.flex.mobile.chrome.TabBar" />


[13/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - force label to be single-line

Posted by ah...@apache.org.
force label to be single-line


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

Branch: refs/heads/spark
Commit: f9ddca525496c8baf35d0350fdd75186d2fb4bb7
Parents: 8a8fc6e
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jun 10 13:26:32 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jun 10 13:26:32 2016 -0700

----------------------------------------------------------------------
 .../projects/HTML/src/main/flex/org/apache/flex/html/Label.as       | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f9ddca52/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
index 392dcca..2512a31 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Label.as
@@ -156,6 +156,7 @@ package org.apache.flex.html
             element = document.createElement('span') as WrappedHTMLElement;
             positioner = element;
             element.flexjs_wrapper = this;
+            element.style.whiteSpace = "nowrap";
             return element;
         }        
 


[23/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - missing a $

Posted by ah...@apache.org.
missing a $


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/818c8ca5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/818c8ca5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/818c8ca5

Branch: refs/heads/spark
Commit: 818c8ca55d71a7167128ee31e9f6230a5f6c7b64
Parents: e1f0080
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jun 14 21:05:37 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jun 14 21:05:37 2016 -0700

----------------------------------------------------------------------
 ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/818c8ca5/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch
----------------------------------------------------------------------
diff --git a/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch b/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch
index 6d52970..9302d94 100644
--- a/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch	
+++ b/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch	
@@ -14,6 +14,6 @@
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_HIDE_INTERNAL_TARGETS" value="true"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$FLEXJS_HOME/ide/flashbuilder/antscripts.xml"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DprojectDir=&quot;{project_loc}&quot;"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-DprojectDir=&quot;${project_loc}&quot;"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
 </launchConfiguration>


[37/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/events/FocusEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/events/FocusEvent.as
index 11aaa61,0000000..9bd85b9
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/events/FocusEvent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/events/FocusEvent.as
@@@ -1,159 -1,0 +1,159 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.events
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.InteractiveObject;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.InteractiveObject;
 +}
 +import org.apache.flex.events.Event;
 +
 +/**
 + *  The FlexEvent class represents the event object passed to
 + *  the event listener for many Flex events.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class FocusEvent extends Event
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  The <code>FocusEvent.FOCUS_IN</code> constant defines the value of the
 +     *  <code>type</code> property of the event object for an <code>focusIn</code> event.
 +     *
 +     * <p>This event will only be dispatched when there are one or more relevant listeners 
 +     * attached to the dispatching object.</p>
 +     * 
 +     *  <p>The properties of the event object have the following values:</p>
 +     *  <table class="innertable">
 +     *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the
 +     *       event listener that handles the event. For example, if you use
 +     *       <code>myButton.addEventListener()</code> to register an event listener,
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event;
 +     *       it is not always the Object listening for the event.
 +     *       Use the <code>currentTarget</code> property to always access the
 +     *       Object listening for the event.</td></tr>
 +     *  </table>
 +     *
 +     *  @eventType focusIn
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const FOCUS_IN:String = "focusIn";
 +
 +    /**
 +     *  The <code>FlexEvent.FOCUS_OUT</code> constant defines the value of the
 +     *  <code>type</code> property of the event object for an <code>focusOut</code> event.
 +     *  This event is dispatched from an IFocusManagerContainer when its focusManager
 +     *  is assigned.
 +     *
 +     *  <p>The properties of the event object have the following values:</p>
 +     *  <table class="innertable">
 +     *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the
 +     *       event listener that handles the event. For example, if you use
 +     *       <code>myButton.addEventListener()</code> to register an event listener,
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event;
 +     *       it is not always the Object listening for the event.
 +     *       Use the <code>currentTarget</code> property to always access the
 +     *       Object listening for the event.</td></tr>
 +     *  </table>
 +     *
 +     *  @eventType focusOut
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public static const FOCUS_OUT:String = "focusOut";
 +
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @param type The event type; indicates the action that caused the event.
 +     *
 +     *  @param bubbles Specifies whether the event can bubble up
 +     *  the display list hierarchy.
 +     *
 +     *  @param cancelable Specifies whether the behavior
 +     *  associated with the event can be prevented.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function FocusEvent(type:String, bubbles:Boolean = false,
 +                              cancelable:Boolean = false)
 +    {
 +        super(type, bubbles, cancelable);
 +    }
 +
 +	public var relatedObject:InteractiveObject;
 +	
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: Event
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function cloneEvent():Event
 +    {
 +        return new FocusEvent(type, bubbles, cancelable);
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/events/IndexChangedEvent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/events/IndexChangedEvent.as
index 860f959,0000000..344697f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/events/IndexChangedEvent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/events/IndexChangedEvent.as
@@@ -1,317 -1,0 +1,317 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.events
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.display.DisplayObject;
 +}
 +COMPILE::JS
 +{
 +import flex.display.DisplayObject;
 +}
 +import flex.events.Event;
 +
 +/**
 + *  The IndexChangedEvent class represents events that are dispatched when 
 + *  an index changes.
 + *  This event can indicate that the index value of a child of a container changed,
 + *  the displayed child of a navigator container such as an Accordion or 
 + *  ViewStack changed, or the order of column headers in a DataGrid 
 + *  control changed.
 + *
 + *  @see mx.core.Container
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class IndexChangedEvent extends Event
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  The IndexChangedEvent.CHANGE constant defines the value of the 
 +     *  <code>type</code> property of the event object for a <code>change</code> event,
 +     *  which indicates that an index has changed, such as when and Accordion control
 +     *  changes the displayed panel or a ViewStack changes views. 
 +     *
 +     *  <p>The properties of the event object have the following values:</p>
 +     *  <table class="innertable">
 +     *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the 
 +     *       event listener that handles the event. For example, if you use 
 +     *       <code>myButton.addEventListener()</code> to register an event listener, 
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +     *     <tr><td><code>inputType</code></td><td>Indicates whether this event 
 +     *         was caused by a mouse or keyboard interaction.</td></tr>
 +     *     <tr><td><code>newIndex</code></td><td>The zero-based index 
 +     *       after the change.</td></tr>
 +     *     <tr><td><code>oldIndex</code></td><td>The zero-based index 
 +     *       before the change.</td></tr>
 +     *     <tr><td><code>relatedObject</code></td><td>Contains a reference
 +     *       to the child object that corresponds to the new index.</td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event; 
 +     *       it is not always the Object listening for the event. 
 +     *       Use the <code>currentTarget</code> property to always access the 
 +     *       Object listening for the event.</td></tr>
 +     *     <tr><td><code>TriggerEvent</code></td><td>The event that 
 +     *        triggered this event.</td></tr>
 +     *     <tr><td><code>Type</code></td><td>IndexChangedEvent.CHANGE</td></tr>
 +     *  </table>
 +     *   
 +     *  @eventType change
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const CHANGE:String = "change";
 +
 +    /**
 +     *  The IndexChangedEvent.CHILD_INDEX_CHANGE constant defines the value of the 
 +     *  <code>type</code> property of the event object for a childIndexChange event,
 +     *  which indicates that a component's index among a container's children 
 +     *  has changed.
 +     *
 +     *  <p>The properties of the event object have the following values:</p>
 +     *  <table class="innertable">
 +     *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the 
 +     *       event listener that handles the event. For example, if you use 
 +     *       <code>myButton.addEventListener()</code> to register an event listener, 
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +     *     <tr><td><code>inputType</code></td><td>Indicates whether this event 
 +     *         was caused by a mouse or keyboard interaction.</td></tr>
 +     *     <tr><td><code>newIndex</code></td><td>The zero-based index of the 
 +     *       child after the change.</td></tr>
 +     *     <tr><td><code>oldIndex</code></td><td>The zero-based index of the 
 +     *       child before the change.</td></tr>
 +     *     <tr><td><code>relatedObject</code></td><td>Contains a reference
 +     *       to the child object whose index changed.</td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event; 
 +     *       it is not always the Object listening for the event. 
 +     *       Use the <code>currentTarget</code> property to always access the 
 +     *       Object listening for the event.</td></tr>
 +     *     <tr><td><code>TriggerEvent</code></td><td>null</td></tr>
 +     *     <tr><td><code>Type</code></td><td>IndexChangedEvent.CHILD_INDEX_CHANGE</td></tr>
 +     *  </table>
 +     *   
 +     *  @eventType childIndexChange
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const CHILD_INDEX_CHANGE:String = "childIndexChange";
 +
 +    /**
 +     *  The IndexChangedEvent.HEADER_SHIFT constant defines the value of the 
 +     *  <code>type</code> property of the event object for a <code>headerShift</code> event,
 +     *  which indicates that a header has changed its index, as when a user drags
 +     *  a DataGrid column to a new position.
 +     *
 +     *  <p>The properties of the event object have the following values:</p>
 +     *  <table class="innertable">
 +     *     <tr><th>Property</th><th>Value</th></tr>
 +     *     <tr><td><code>bubbles</code></td><td>false</td></tr>
 +     *     <tr><td><code>cancelable</code></td><td>false</td></tr>
 +     *     <tr><td><code>currentTarget</code></td><td>The Object that defines the 
 +     *       event listener that handles the event. For example, if you use 
 +     *       <code>myButton.addEventListener()</code> to register an event listener, 
 +     *       myButton is the value of the <code>currentTarget</code>. </td></tr>
 +     *     <tr><td><code>inputType</code></td><td>Indicates whether this event 
 +     *         was caused by a mouse or keyboard interaction.</td></tr>
 +     *     <tr><td><code>newIndex</code></td><td>The zero-based index of the 
 +     *       header after the change.</td></tr>
 +     *     <tr><td><code>oldIndex</code></td><td>The zero-based index of the 
 +     *       header before the change.</td></tr>
 +     *     <tr><td><code>relatedObject</code></td><td>null</td></tr>
 +     *     <tr><td><code>target</code></td><td>The Object that dispatched the event; 
 +     *       it is not always the Object listening for the event. 
 +     *       Use the <code>currentTarget</code> property to always access the 
 +     *       Object listening for the event.</td></tr>
 +     *     <tr><td><code>TriggerEvent</code></td><td>The event that 
 +     *        triggered this event.</td></tr>
 +     *     <tr><td><code>Type</code></td><td>IndexChangedEvent.HEADER_SHIFT</td></tr>
 +     *  </table>
 +     *   
 +     *  @eventType headerShift
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const HEADER_SHIFT:String = "headerShift";
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  Normally called by a Flex control and not used in application code.
 +     *
 +     *  @param type The event type; indicates the action that caused the event.
 +     *
 +     *  @param bubbles Specifies whether the event can bubble
 +     *  up the display list hierarchy.
 +     *
 +     *  @param cancelable Specifies whether the behavior
 +     *  associated with the event can be prevented.
 +     *
 +     *  @param relatedObject The child object associated with the index change.
 +     *
 +     *  @param oldIndex The zero-based index before the change.
 +     *
 +     *  @param newIndex The zero-based index after the change.
 +     *
 +     *  @param triggerEvent The event that triggered this event.
 +     *  
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function IndexChangedEvent(type:String, bubbles:Boolean = false,
 +                                      cancelable:Boolean = false,
 +                                      relatedObject:DisplayObject = null,
 +                                      oldIndex:Number = -1,
 +                                      newIndex:Number = -1,
 +                                      triggerEvent:Event = null)
 +    {
 +        super(type, bubbles, cancelable);
 +
 +        this.relatedObject = relatedObject;
 +        this.oldIndex = oldIndex;
 +        this.newIndex = newIndex;
 +        this.triggerEvent = triggerEvent;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  newIndex
 +    //----------------------------------
 +
 +    /**
 +     *  The zero-based index after the change. For <code>change</code> events
 +     *  it is the index of the current child. For <code>childIndexChange</code>
 +     *  events, it is the new index of the child. For <code>headerShift</code>
 +     *  events, it is the new index of the header.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var newIndex:Number;
 +
 +    //----------------------------------
 +    //  oldIndex
 +    //----------------------------------
 +
 +    /**
 +     *  The zero-based index before the change.  
 +     *  For <code>change</code> events it is the index of the previous child.
 +     *  For <code>childIndexChange</code> events, it is the previous index 
 +     *  of the child.
 +     *  For <code>headerShift</code> events, it is the previous index of 
 +     *  the header.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var oldIndex:Number;
 +
 +    //----------------------------------
 +    //  relatedObject
 +    //----------------------------------
 +
 +    /**
 +     *  The child object whose index changed, or the object associated with
 +     *  the new index. This property is not set for header changes. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var relatedObject:DisplayObject;
 +
 +    //----------------------------------
 +    //  triggerEvent
 +    //----------------------------------
 +
 +    /**
 +     *  The event that triggered this event. 
 +     *  Indicates whether this event was caused by a mouse or keyboard interaction.
 +     *  The value is <code>null</code> when a container dispatches a 
 +     *  <code>childIndexChanged</code> event.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var triggerEvent:Event;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: Event
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function cloneEvent():Event
 +    {
 +        return new IndexChangedEvent(type, bubbles, cancelable,
 +                                     relatedObject, oldIndex, 
 +                                     newIndex, triggerEvent);
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
index 340f0c0,0000000..1d50f04
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
@@@ -1,1061 -1,0 +1,1061 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;
 +	import flash.display.InteractiveObject;
 +	import flash.display.Sprite;		
 +	import flash.events.IOErrorEvent;
 +	import flash.events.Event;
 +	import flash.events.ProgressEvent;
 +	import flash.events.ContextMenuEvent;
 +	import flash.text.TextField;
 +	import flash.text.TextFieldType;
 +	import flash.ui.Mouse;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;
 +	import flex.display.InteractiveObject;
 +	import flex.display.Sprite;
 +	import flex.events.ContextMenuEvent;
 +	import flex.events.Event;
 +	import flex.events.IOErrorEvent;
 +	import flex.events.ProgressEvent;
 +	import flex.text.TextField;
 +	import flex.text.TextFieldType;
 +	import flex.ui.Mouse;
 +}
 +import org.apache.flex.events.EventDispatcher;
 +import org.apache.flex.events.IEventDispatcher;
 +import org.apache.flex.events.MouseEvent;
 +import org.apache.flex.geom.Point;
 +import mx.core.FlexGlobals;
 +import org.apache.flex.utils.PointUtils;
 +import mx.core.mx_internal;
 +import mx.core.ISystemCursorClient;
 +import mx.core.UIComponent;		
 +import mx.events.Request;
 +import mx.styles.CSSStyleDeclaration;
 +import mx.styles.StyleManager;
 +import mx.core.IFlexModuleFactory;
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + */
 +public class CursorManagerImpl extends EventDispatcher implements ICursorManager
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private static var instance:ICursorManager;
 +
 +	/**
 +	 * @private
 +	 * 
 +	 * Place to hook in additional classes
 +	 */
 +	public static var mixins:Array;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public static function getInstance():ICursorManager
 +    {
 +        if (!instance)
 +            instance = new CursorManagerImpl();
 +
 +        return instance;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public function CursorManagerImpl(systemManager:ISystemManager = null)
 +    {
 +        super();
 +
 +        if (instance && !systemManager)
 +            throw new Error("Instance already exists.");
 +
 +		if (systemManager)
 +			this.systemManager = systemManager as ISystemManager;
 +		else
 +			this.systemManager = SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager;
 +
 +		if (mixins)
 +		{
 +			var n:int = mixins.length;
 +			for (var i:int = 0; i < n; i++)
 +			{
 +				new mixins[i](this);
 +		
 +			}
 +		}
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var nextCursorID:int = 1;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var cursorList:Array = [];
 +    
 +    /**
 +     *  @private
 +     */
 +    private var busyCursorList:Array = [];
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal var initialized:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal var cursorHolder:Sprite;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var currentCursor:DisplayObject;
 +
 +	/**
 +     *  @private
 +     */
 +	private var listenForContextMenu:Boolean = false;
 +    
 +    /*******************************************************************
 +     * Regarding overTextField, showSystemCursor, and showCustomCursor:
 +     *    Don't modify or read these variables unless you are certain
 +     *    you will not create race conditions. E.g. you may get the
 +     *    wrong (or no) cursor, and get stuck in an inconsistent state.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +     
 +    /**
 +     *  @private
 +     */
 +    private var overTextField:Boolean = false;
 +     
 +    /**
 +     *  @private
 +     */
 +    private var overLink:Boolean = false;
 +     
 +    /**
 +     *  @private
 +     */
 +    private var showSystemCursor:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var showCustomCursor:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     * 
 +     * State variable -- set when there is a custom cursor and the
 +     * mouse has left the stage. Upon return, mouseMoveHandler will
 +     * restore the custom cursor and remove the system cursor.
 +     */
 +    private var customCursorLeftStage:Boolean = false;
 +    
 +    /*******************************************************************/
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var systemManager:ISystemManager = null;
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal var sandboxRoot:IEventDispatcher = null;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var sourceArray:Array = [];
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  currentCursorID
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var _currentCursorID:int = 0 /* CursorManager.NO_CURSOR */;
 +
 +    /**
 +     *  ID of the current custom cursor,
 +     *  or CursorManager.NO_CURSOR if the system cursor is showing.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get currentCursorID():int
 +    {
 +        return _currentCursorID;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set currentCursorID(value:int):void
 +    {
 +        _currentCursorID = value;
 +
 +        if (hasEventListener("currentCursorID"))
 +	    	dispatchEvent(new Event("currentCursorID"));
 +    }
 +
 +    //----------------------------------
 +    //  currentCursorXOffset
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var _currentCursorXOffset:Number = 0;
 +
 +    /**
 +     *  The x offset of the custom cursor, in pixels,
 +     *  relative to the mouse pointer.
 +     *       
 +     *  @default 0
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get currentCursorXOffset():Number 
 +    {
 +        return _currentCursorXOffset;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set currentCursorXOffset(value:Number):void
 +    {
 +        _currentCursorXOffset = value;
 +
 +        if (hasEventListener("currentCursorXOffset"))
 +    		dispatchEvent(new Event("currentCursorXOffset"));
 +    }
 +
 +    //----------------------------------
 +    //  currentCursorYOffset
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var _currentCursorYOffset:Number = 0;
 +
 +    /**
 +     *  The y offset of the custom cursor, in pixels,
 +     *  relative to the mouse pointer.
 +     *
 +     *  @default 0
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get currentCursorYOffset():Number 
 +    {
 +        return _currentCursorYOffset;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set currentCursorYOffset(value:Number):void
 +    {
 +        _currentCursorYOffset = value;
 +
 +        if (hasEventListener("currentCursorYOffset"))
 +    		dispatchEvent(new Event("currentCursorYOffset"));
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Makes the cursor visible.
 +     *  Cursor visibility is not reference-counted.
 +     *  A single call to the <code>showCursor()</code> method
 +     *  always shows the cursor regardless of how many calls
 +     *  to the <code>hideCursor()</code> method were made.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function showCursor():void
 +    {
 +        if (cursorHolder)
 +	        cursorHolder.visible = true;
 +
 +        if (hasEventListener("showCursor"))
 +    		dispatchEvent(new Event("showCursor"));
 +    }
 +    
 +    /**
 +     *  Makes the cursor invisible.
 +     *  Cursor visibility is not reference-counted.
 +     *  A single call to the <code>hideCursor()</code> method
 +     *  always hides the cursor regardless of how many calls
 +     *  to the <code>showCursor()</code> method were made.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function hideCursor():void
 +    {
 +    	if (cursorHolder)
 +	        cursorHolder.visible = false;
 +		
 +        if (hasEventListener("hideCursor"))
 +    		dispatchEvent(new Event("hideCursor"));
 +
 +    }
 +
 +    /**
 +     *  Creates a new cursor and sets an optional priority for the cursor.
 +     *  Adds the new cursor to the cursor list.
 +     *
 +     *  @param cursorClass Class of the cursor to display.
 +     *
 +     *  @param priority Integer that specifies
 +     *  the priority level of the cursor.
 +     *  Possible values are <code>CursorManagerPriority.HIGH</code>,
 +     *  <code>CursorManagerPriority.MEDIUM</code>, and <code>CursorManagerPriority.LOW</code>.
 +     *
 +     *  @param xOffset Number that specifies the x offset
 +     *  of the cursor, in pixels, relative to the mouse pointer.
 +     *
 +     *  @param yOffset Number that specifies the y offset
 +     *  of the cursor, in pixels, relative to the mouse pointer.
 +     *
 +     *  @param setter The IUIComponent that set the cursor. Necessary (in multi-window environments) 
 +     *  to know which window needs to display the cursor. 
 +     * 
 +     *  @return The ID of the cursor.
 +     *
 +     *  @see mx.managers.CursorManagerPriority
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setCursor(cursorClass:Class, priority:int = 2,
 +                                     xOffset:Number = 0,
 +                                     yOffset:Number = 0):int 
 +    {
 +        if (hasEventListener("setCursor"))
 +        {
 +		    var event:Request = new Request("setCursor", false, true);
 +		    event.value = [ cursorClass, priority, xOffset, yOffset ];
 +		    if (!dispatchEvent(event))
 +		    {
 +			    return event.value as int;
 +		    }
 +        }
 +
 +        var cursorID:int = nextCursorID++;
 +        
 +        // Create a new CursorQueueItem.
 +        var item:CursorQueueItem = new CursorQueueItem();
 +        item.cursorID = cursorID;
 +        item.cursorClass = cursorClass;
 +        item.priority = priority;
 +        item.x = xOffset;
 +        item.y = yOffset;
 +        if (systemManager)
 +        	item.systemManager = systemManager;
 +        else
 +        	item.systemManager = FlexGlobals.topLevelApplication.systemManager;
 +        
 +        // Push it onto the cursor list.
 +        cursorList.push(item);
 +        
 +        // Re-sort the cursor list based on priority level.
 +        cursorList.sort(priorityCompare);
 +
 +        // Determine which cursor to display
 +        showCurrentCursor();
 +        
 +        return cursorID;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function priorityCompare(a:CursorQueueItem, b:CursorQueueItem):int
 +    {
 +        if (a.priority < b.priority)
 +            return -1;
 +        else if (a.priority == b.priority)
 +            return 0;
 +        
 +        return 1;
 +    }
 +
 +    /**
 +     *  Removes a cursor from the cursor list.
 +     *  If the cursor being removed is the currently displayed cursor,
 +     *  the CursorManager displays the next cursor in the list, if one exists.
 +     *  If the list becomes empty, the CursorManager displays
 +     *  the default system cursor.
 +     *
 +     *  @param cursorID ID of cursor to remove.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function removeCursor(cursorID:int):void 
 +    {
 +        if (hasEventListener("removeCursor"))
 +    		if (!dispatchEvent(new Request("removeCursor", false, true, cursorID)))
 +	    		return;
 +
 +        for (var i:Object in cursorList)
 +        {
 +            var item:CursorQueueItem = cursorList[i];
 +            if (item.cursorID == cursorID)
 +            {
 +                // Remove the element from the array.
 +                cursorList.splice(i, 1); 
 +
 +                // Determine which cursor to display.
 +                showCurrentCursor();
 +                    
 +                break;
 +            }
 +        }
 +    }
 +    
 +    /**
 +     *  Removes all of the cursors from the cursor list
 +     *  and restores the system cursor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function removeAllCursors():void
 +    {
 +        if (hasEventListener("removeAllCursors"))
 +    		if (!dispatchEvent(new Event("removeAllCursors", false, true)))
 +	    		return;
 +
 +        cursorList.splice(0);
 +        
 +        showCurrentCursor();
 +    }
 +
 +    /**
 +     *  Displays the busy cursor.
 +     *  The busy cursor has a priority of CursorManagerPriority.LOW.
 +     *  Therefore, if the cursor list contains a cursor
 +     *  with a higher priority, the busy cursor is not displayed 
 +     *  until you remove the higher priority cursor.
 +     *  To create a busy cursor at a higher priority level,
 +     *  use the <code>setCursor()</code> method.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setBusyCursor():void 
 +    {
 +        if (hasEventListener("setBusyCursor"))
 +    		if (!dispatchEvent(new Event("setBusyCursor", false, true)))
 +	    		return;
 +
 +        var cursorManagerStyleDeclaration:CSSStyleDeclaration =
 +            StyleManager.getStyleManager(systemManager as IFlexModuleFactory).
 +            getMergedStyleDeclaration("mx.managers.CursorManager");
 +        
 +        var busyCursorClass:Class =
 +            cursorManagerStyleDeclaration.getStyle("busyCursor");
 +        
 +        busyCursorList.push(setCursor(busyCursorClass, CursorManagerPriority.LOW));
 +    }
 +
 +    /**
 +     *  Removes the busy cursor from the cursor list.
 +     *  If other busy cursor requests are still active in the cursor list,
 +     *  which means you called the <code>setBusyCursor()</code> method more than once,
 +     *  a busy cursor does not disappear until you remove
 +     *  all busy cursors from the list.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function removeBusyCursor():void 
 +    {
 +        if (hasEventListener("removeBusyCursor"))
 +    		if (!dispatchEvent(new Event("removeBusyCursor", false, true)))
 +	    		return;
 +
 +        if (busyCursorList.length > 0)
 +            removeCursor(int(busyCursorList.pop()));
 +    }
 +
 +    /**
 +     *  @private
 +     *  Decides what cursor to display.
 +	 *  @flexjsignorecoercion flex.display.Sprite
 +     */
 +    private function showCurrentCursor():void 
 +    {
 +        // if there are custom cursors...
 +        if (cursorList.length > 0)
 +        {
 +            if (!initialized)
 +            {
 +				initialized = true;
 +
 +                var e:Event;
 +                if (hasEventListener("initialize"))
 +                {
 +                    e = new Event("initialize", false, true);
 +                }
 +				if (!e || dispatchEvent(e))
 +				{
 +					// The first time a cursor is requested of the CursorManager,
 +					// create a Sprite to hold the cursor symbol
 +					cursorHolder = new UIComponent() as Sprite;
 +					cursorHolder.name = "cursorHolder";
- 					COMPILE::AS3
++					COMPILE::SWF
 +					{
 +					cursorHolder.mouseEnabled = false;
 +					cursorHolder.mouseChildren = false;
 +					}
 +               		systemManager.cursorChildren.addChild(cursorHolder);
 +				}
 +            }
 +
 +            // Get the top most cursor.
 +            var item:CursorQueueItem = cursorList[0];
 +                
 +            // If the system cursor was being displayed, hide it.
 +            if (currentCursorID == CursorManager.NO_CURSOR)
 +                Mouse.hide();
 +			
 +            // If the current cursor has changed...
 +            if (item.cursorID != currentCursorID)
 +            {
 +                if (cursorHolder.numChildren > 0)
 +                    cursorHolder.removeChildAt(0);
 +                
 +                currentCursor = new item.cursorClass(); 
 +                
 +                if (currentCursor)
 +                {
- 					COMPILE::AS3
++					COMPILE::SWF
 +					{
 +						if (currentCursor is InteractiveObject)
 +							InteractiveObject(currentCursor).mouseEnabled = false;
 +						if (currentCursor is DisplayObjectContainer)
 +							DisplayObjectContainer(currentCursor).mouseChildren = false;							
 +					}
 +                    cursorHolder.addChild(currentCursor);
 +                    
 +                    addContextMenuHandlers();
 +
 +					var pt:Point;
 +                    // make sure systemManager is not other implementation of ISystemManager
 +                    if (systemManager is SystemManager)
 +                    {
 +						pt = new Point(SystemManager(systemManager).mouseX + item.x, SystemManager(systemManager).mouseY + item.y);
 +						pt = PointUtils.localToGlobal(pt, systemManager);
 +						pt = PointUtils.globalToLocal(pt, cursorHolder.parent);
 +                    	cursorHolder.x = pt.x;
 +                    	cursorHolder.y = pt.y;
 +                    }
 +                    // WindowedSystemManager
 +                    else if (systemManager is DisplayObject)
 +                    {
 +						pt = new Point(DisplayObject(systemManager).mouseX + item.x, DisplayObject(systemManager).mouseY + item.y);
 +						pt = PointUtils.localToGlobal(pt, systemManager);
 +						pt = PointUtils.globalToLocal(pt, cursorHolder.parent);
 +                    	cursorHolder.x = DisplayObject(systemManager).mouseX + item.x;
 +                    	cursorHolder.y = DisplayObject(systemManager).mouseY + item.y;
 +                    }
 +                    // otherwise
 +                    else
 +                    {
 +                    	cursorHolder.x = item.x;
 +                    	cursorHolder.y = item.y;
 +                    }
 +
 +					COMPILE::LATER
 +					{
 +                    var e2:Event;
 +                    if (hasEventListener("addMouseMoveListener"))
 +                        e2 = new Event("addMouseMoveListener", false, true);
 +					if (!e2 || dispatchEvent(e2))
 +						systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE,
 +                                                   mouseMoveHandler,true,EventPriority.CURSOR_MANAGEMENT);
 +                    
 +                    var e3:Event;
 +                    if (hasEventListener("addMouseOutListener"))
 +                        e3 = new Event("addMouseOutListener", false, true);
 +					if (!e3 || dispatchEvent(e3))
 +						systemManager.stage.addEventListener(MouseEvent.MOUSE_OUT,
 +                                                   mouseOutHandler,true,EventPriority.CURSOR_MANAGEMENT);
 +					}
 +                }
 +            	
 +                currentCursorID = item.cursorID;
 +                currentCursorXOffset = item.x;
 +                currentCursorYOffset = item.y;
 +            }
 +        }
 +        else
 +        {
 +            showCustomCursor = false;
 +
 +            if (currentCursorID != CursorManager.NO_CURSOR)
 +            {
 +                // There is no cursor in the cursor list to display,
 +                // so cleanup and restore the system cursor.
 +                currentCursorID = CursorManager.NO_CURSOR;
 +                currentCursorXOffset = 0;
 +                currentCursorYOffset = 0;
 +
 +				COMPILE::LATER
 +				{
 +                var e4:Event;
 +                if (hasEventListener("removeMouseMoveListener"))
 +                    e4 = new Event("removeMouseMoveListener", false, true)
 +				if (!e4 || dispatchEvent(e4))
 +                {
 +               		systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE,
 +                                          mouseMoveHandler,true);
 +                }
 +
 +                var e5:Event;
 +                if (hasEventListener("removeMouseMoveListener"))
 +                    e5 = new Event("removeMouseOutListener", false, true)
 +				if (!e5 || dispatchEvent(e5))
 +                {
 +               		systemManager.stage.removeEventListener(MouseEvent.MOUSE_OUT,
 +                                          mouseOutHandler,true);
 +                }
 +				}
 +                cursorHolder.removeChild(currentCursor);
 +                
 +				removeContextMenuHandlers();
 +		    }
 +            Mouse.show();
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function addContextMenuHandlers():void
 +    {
 +        if (!listenForContextMenu)
 +        {
 +            const app:InteractiveObject = systemManager.document as InteractiveObject;
 +        	const sm:InteractiveObject = systemManager as InteractiveObject;
 +        	
 +			COMPILE::LATER
 +			{
 +        	if (app && app.contextMenu)
 +        	{
 +        		app.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler,
 +        		                                 true, EventPriority.CURSOR_MANAGEMENT);
 +        		listenForContextMenu = true;
 +        	}
 +        	
 +        	if (sm && sm.contextMenu)
 +        	{
 +        		sm.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler,
 +        		                                true, EventPriority.CURSOR_MANAGEMENT);
 +        		listenForContextMenu = true;
 +        	}     
 +			}
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function removeContextMenuHandlers():void
 +    {
 +        if (listenForContextMenu)
 +        {
 +            const app:InteractiveObject = systemManager.document as InteractiveObject;
 +        	const sm:InteractiveObject = systemManager as InteractiveObject;
 +        	
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				if (app && app.contextMenu)
 +					app.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true);
 +				
 +				if (sm && sm.contextMenu)
 +					sm.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true);					
 +			}
 +   
 +        	listenForContextMenu = false; 	
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Called by other components if they want to display
 +     *  the busy cursor during progress events.
 +     */
 +    public function registerToUseBusyCursor(source:Object):void
 +    {
 +        if (hasEventListener("registerToUseBusyCursor"))
 +    		if (!dispatchEvent(new Request("registerToUseBusyCursor", false, true, source)))
 +	    		return;
 +
 +        if (source && source is EventDispatcher) 
 +        {
 +            source.addEventListener(ProgressEvent.PROGRESS, progressHandler);
 +            source.addEventListener(Event.COMPLETE, completeHandler);
 +            source.addEventListener(IOErrorEvent.IO_ERROR, completeHandler);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Called by other components to unregister
 +     *  a busy cursor from the progress events.
 +     */
 +    public function unRegisterToUseBusyCursor(source:Object):void
 +    {
 +        if (hasEventListener("unRegisterToUseBusyCursor"))
 +    		if (!dispatchEvent(new Request("unRegisterToUseBusyCursor", false, true, source)))
 +	    		return;
 +
 +        if (source && source is EventDispatcher) 
 +        {
 +            source.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
 +            source.removeEventListener(Event.COMPLETE, completeHandler);
 +            source.removeEventListener(IOErrorEvent.IO_ERROR, completeHandler);
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Called when contextMenu is opened
 +     */
 +    private function contextMenu_menuSelectHandler(event:ContextMenuEvent):void
 +    {
 +    	showCustomCursor = true; // Restore the custom cursor
 +    	// Standalone player doesn't initially send mouseMove when the contextMenu is closed,
 +    	// so we need to listen for mouseOver as well.   	
 +    	sandboxRoot.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function mouseOverHandler(event:MouseEvent):void
 +    {
 +    	sandboxRoot.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
 +    	mouseMoveHandler(event);
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function findSource(target:Object):int
 +    {
 +        var n:int = sourceArray.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            if (sourceArray[i] === target)
 +                return i;
 +        }
 +        return -1;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     * 
 +     * Handles the mouse leaving the stage; hides the custom cursor and restores the system cursor.
 +     */
 +    mx_internal function mouseOutHandler(event:MouseEvent):void
 +    {
 +        // relatedObject==null implies the mouse left the stage.
 +        // this also fires when you are returning from a context menu click.
 +        //
 +        // it sometimes fires after you drag off the stage, and back to the stage quickly,
 +        // and let go of the button -- this seems like a player bug
 +        if ((event.relatedObject == null) && (cursorList.length > 0))
 +        {
 +            //trace("mouseOutHandler", event);
 +            
 +            // this will get unset in mouseMoveHandler (since that fires when
 +            // the mouse returns/glides over the stage)
 +            customCursorLeftStage = true;
 +            hideCursor();
 +            Mouse.show();
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function mouseMoveHandler(event:MouseEvent):void
 +    {
 +        
 +		var pt:Point = new Point(event.screenX, event.screenY);
 +		pt = PointUtils.globalToLocal(pt, cursorHolder.parent);
 +		pt.x += currentCursorXOffset;
 +		pt.y += currentCursorYOffset;
 +       	cursorHolder.x = pt.x;
 +       	cursorHolder.y = pt.y;
 +
 +        var target:Object = event.target;
 +        
 +        var isInputTextField:Boolean = 
 +            (target is TextField && target.type == TextFieldType.INPUT) ||
 +                (target is ISystemCursorClient && 
 +                    ISystemCursorClient(target).showSystemCursor);
 +        
 +        // Do target test.
 +        if (!overTextField && isInputTextField)
 +        {   
 +            overTextField = true;
 +            showSystemCursor = true;
 +        } 
 +        else if (overTextField && !isInputTextField)
 +        {
 +            overTextField = false;
 +            showCustomCursor = true;
 +        }
 +		else
 +		{
 +			showCustomCursor = true
 +		}
 +    
 +        // Handle switching between system and custom cursor.
 +        if (showSystemCursor)
 +        {
 +            showSystemCursor = false;
 +			cursorHolder.visible = false;
 +            Mouse.show();
 +        }
 +        if (showCustomCursor)
 +        {
 +            showCustomCursor = false;
 +			cursorHolder.visible = true;
 +            Mouse.hide();
 +
 +            if (hasEventListener("showCustomCursor"))
 +	    		dispatchEvent(new Event("showCustomCursor"));
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Displays the busy cursor if a component is in a busy state.
 +     */
 +    private function progressHandler(event:ProgressEvent):void
 +    {
 +        // Only pay attention to the first progress call. Ignore all others.
 +        var sourceIndex:int = findSource(event.target);
 +        if (sourceIndex == -1)
 +        {
 +            // Add the target to the list of objects we are listening for.
 +            sourceArray.push(event.target);
 +            
 +            setBusyCursor();
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function completeHandler(event:Event):void
 +    {
 +        var sourceIndex:int = findSource(event.target);
 +        if (sourceIndex != -1)
 +        {
 +            // Remove from the list of targets we are listening to.
 +            sourceArray.splice(sourceIndex, 1);
 +            
 +            removeBusyCursor();
 +        }
 +    }
 +
 +}
 +
 +}
 +
 +import mx.managers.CursorManager;
 +import mx.managers.CursorManagerPriority;
 +import mx.managers.ISystemManager;
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: CursorQueueItem
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/**
 + *  @private
 + */
 +class CursorQueueItem
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function CursorQueueItem()
 +    {
 +        super();
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var cursorID:int = CursorManager.NO_CURSOR;
 +
 +    /**
 +     *  @private
 +     */
 +    public var cursorClass:Class = null;
 +
 +    /**
 +     *  @private
 +     */
 +    public var priority:int = CursorManagerPriority.MEDIUM;
 +    
 +     /**
 +     *  @private
 +     */
 +    public var systemManager:ISystemManager;
 +
 +    /**
 +     *  @private
 +     */
 +    public var x:Number;
 +
 +    /**
 +     *  @private
 +     */
 +    public var y:Number;
 +}
 +


[21/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Separated the icon parts of CheckBox and RadioButton so they can be styled more easily.

Posted by ah...@apache.org.
Separated the icon parts of CheckBox and RadioButton so they can be styled more easily.


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

Branch: refs/heads/spark
Commit: b86f09bda097081226a533bb0de8a8aac49c3a72
Parents: 4af86f5
Author: Peter Ent <pe...@apache.org>
Authored: Tue Jun 14 11:19:50 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Jun 14 11:19:50 2016 -0400

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/html/CheckBox.as  |  85 +++++++-------
 .../flex/org/apache/flex/html/RadioButton.as    | 115 ++++++++++---------
 .../flex/org/apache/flex/html/TextButton.as     |  44 ++++---
 .../flex/html/accessories/CheckBoxIcon.as       |  92 +++++++++++++++
 .../flex/html/accessories/RadioButtonIcon.as    | 111 ++++++++++++++++++
 .../HTML/src/main/resources/basic-manifest.xml  |   2 +
 6 files changed, 339 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b86f09bd/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
index bb1f6bd..d65cd5e 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/CheckBox.as
@@ -20,31 +20,32 @@ package org.apache.flex.html
 {
     COMPILE::SWF
     {
-        import flash.events.MouseEvent;            
+        import flash.events.MouseEvent;
     }
-	
+
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IToggleButtonModel;
 	import org.apache.flex.core.IUIBase;
     COMPILE::SWF
     {
-        import org.apache.flex.core.UIButtonBase;            
+        import org.apache.flex.core.UIButtonBase;
     }
     COMPILE::JS
     {
-        import org.apache.flex.core.UIBase;        
-        import org.apache.flex.core.WrappedHTMLElement;        
+        import org.apache.flex.core.UIBase;
+        import org.apache.flex.core.WrappedHTMLElement;
+		import org.apache.flex.html.accessories.CheckBoxIcon;
     }
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.MouseEvent;
-	
+
     //--------------------------------------
     //  Events
     //--------------------------------------
-    
+
     /**
      *  Dispatched when the user checks or un-checks the CheckBox.
-     *  
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
@@ -55,7 +56,7 @@ package org.apache.flex.html
     /**
      *  The CheckBox class implements the common user interface
      *  control.  The CheckBox includes its text label.
-     *  
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
@@ -66,7 +67,7 @@ package org.apache.flex.html
 	{
         /**
          *  Constructor.
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -75,13 +76,13 @@ package org.apache.flex.html
 		public function CheckBox()
 		{
 			super();
-			
+
 			addEventListener(org.apache.flex.events.MouseEvent.CLICK, internalMouseHandler);
 		}
-		
+
         /**
          *  The text label for the CheckBox.
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -91,7 +92,7 @@ package org.apache.flex.html
 		{
 			return IToggleButtonModel(model).text;
 		}
-        
+
         /**
          *  @private
          */
@@ -99,11 +100,11 @@ package org.apache.flex.html
 		{
 			IToggleButtonModel(model).text = value;
 		}
-		
+
         [Bindable("change")]
         /**
          *  <code>true</code> if the check mark is displayed.
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -113,7 +114,7 @@ package org.apache.flex.html
 		{
 			return IToggleButtonModel(model).selected;
 		}
-		
+
         /**
          *  @private
          */
@@ -121,61 +122,65 @@ package org.apache.flex.html
 		{
 			IToggleButtonModel(model).selected = value;
 		}
-				
+
 		private function internalMouseHandler(event:org.apache.flex.events.MouseEvent) : void
 		{
 			selected = !selected;
 			dispatchEvent(new Event("change"));
 		}
 	}
-    
+
     COMPILE::JS
     public class CheckBox extends UIBase
     {
+		private var _label:WrappedHTMLElement;
+		private var _icon:CheckBoxIcon;
+
+		private static var _checkNumber:Number = 0;
+
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          */
         override protected function createElement():WrappedHTMLElement
         {
             var cb:HTMLInputElement;
-            
+
             element = document.createElement('label') as WrappedHTMLElement;
-            
-            cb = document.createElement('input') as HTMLInputElement;
-            cb.type = 'checkbox';
-            element.appendChild(cb);
+			_label = element;
+			_icon = new CheckBoxIcon();
+            element.appendChild(_icon.element);
+
             element.appendChild(document.createTextNode(''));
-            
-            element.className = 'CheckBox';
-            typeNames = 'CheckBox';
-            
+
             positioner = element;
             positioner.style.position = 'relative';
-            (cb as WrappedHTMLElement).flexjs_wrapper = this;
             element.flexjs_wrapper = this;
-            
+
+            className = 'CheckBox';
+            typeNames = 'CheckBox, CheckBoxIcon';
+
             return element;
-        }        
-        
+        }
+
         public function get text():String
         {
-            return element.childNodes.item(1).nodeValue;
+            return _label.childNodes.item(1).nodeValue;
         }
-        
+
         public function set text(value:String):void
         {
-            element.childNodes.item(1).nodeValue = value;
+            _label.childNodes.item(1).nodeValue = value;
         }
-        
+
         public function get selected():Boolean
         {
-            return (element.childNodes.item(0) as HTMLInputElement).checked;
+            return (_icon.element as HTMLInputElement).checked;
         }
-        
+
         public function set selected(value:Boolean):void
         {
-            (element.childNodes.item(0) as HTMLInputElement).checked = value;
+           (_icon.element as HTMLInputElement).checked = value;
         }
-    }        
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b86f09bd/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
index 66f4e42..fc65985 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/RadioButton.as
@@ -22,34 +22,35 @@ package org.apache.flex.html
     {
         import flash.display.DisplayObject;
         import flash.events.MouseEvent;
-        import flash.utils.Dictionary;            
+        import flash.utils.Dictionary;
     }
-	
+
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IValueToggleButtonModel;
     COMPILE::SWF
     {
-        import org.apache.flex.core.UIButtonBase;            
+        import org.apache.flex.core.UIButtonBase;
     }
     COMPILE::JS
     {
         import org.apache.flex.core.UIBase;
         import org.apache.flex.core.WrappedHTMLElement;
+        import org.apache.flex.html.accessories.RadioButtonIcon;
     }
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.MouseEvent;
 	import org.apache.flex.core.IUIBase;
-	
+
 	[Event(name="change", type="org.apache.flex.events.Event")]
 
 	/**
 	 *  The RadioButton class is a component that displays a selectable Button. RadioButtons
 	 *  are typically used in groups, identified by the groupName property. RadioButton use
 	 *  the following beads:
-	 * 
+	 *
 	 *  org.apache.flex.core.IBeadModel: the data model, which includes the groupName.
 	 *  org.apache.flex.core.IBeadView:  the bead that constructs the visual parts of the RadioButton..
-	 *  
+	 *
 	 *  @langversion 3.0
 	 *  @playerversion Flash 10.2
 	 *  @playerversion AIR 2.6
@@ -69,14 +70,14 @@ package org.apache.flex.html
 		public function RadioButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
 		{
 			super(upState, overState, downState, hitTestState);
-			
+
 			addEventListener(org.apache.flex.events.MouseEvent.CLICK, internalMouseHandler);
 		}
-		
+
 		protected static var dict:Dictionary = new Dictionary(true);
-		
+
 		private var _groupName:String;
-		
+
 		/**
 		 *  The name of the group. Only one RadioButton in a group is selected.
 		 *
@@ -93,7 +94,7 @@ package org.apache.flex.html
 		{
 			IValueToggleButtonModel(model).groupName = value;
 		}
-		
+
 		/**
 		 *  The string used as a label for the RadioButton.
 		 *
@@ -110,7 +111,7 @@ package org.apache.flex.html
 		{
 			IValueToggleButtonModel(model).text = value;
 		}
-		
+
 		/**
 		 *  Whether or not the RadioButton instance is selected. Setting this property
 		 *  causes the currently selected RadioButton in the same group to lose the
@@ -128,7 +129,7 @@ package org.apache.flex.html
 		public function set selected(selValue:Boolean):void
 		{
 			IValueToggleButtonModel(model).selected = selValue;
-			
+
 			// if this button is being selected, its value should become
 			// its group's selectedValue
 			if( selValue ) {
@@ -141,7 +142,7 @@ package org.apache.flex.html
 				}
 			}
 		}
-		
+
 		/**
 		 *  The value associated with the RadioButton. For example, RadioButtons with labels,
 		 *  "Red", "Green", and "Blue" might have the values 0, 1, and 2 respectively.
@@ -159,7 +160,7 @@ package org.apache.flex.html
 		{
 			IValueToggleButtonModel(model).value = newValue;
 		}
-		
+
 		/**
 		 *  The group's currently selected value.
 		 *
@@ -168,17 +169,17 @@ package org.apache.flex.html
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function get selectedValue():Object 
+		public function get selectedValue():Object
 		{
 			return IValueToggleButtonModel(model).selectedValue;
 		}
-		public function set selectedValue(newValue:Object):void 
+		public function set selectedValue(newValue:Object):void
 		{
 			// a radio button is really selected when its value matches that of the group's value
 			IValueToggleButtonModel(model).selected = (newValue == value);
 			IValueToggleButtonModel(model).selectedValue = newValue;
 		}
-				
+
 		/**
 		 * @private
 		 */
@@ -189,9 +190,9 @@ package org.apache.flex.html
             // if this instance is selected, set the local selectedValue to
 			// this instance's value
 			if( selected ) selectedValue = value;
-			
+
 			else {
-			
+
 				// make sure this button's selectedValue is set from its group's selectedValue
 				// to keep it in sync with the rest of the buttons in its group.
 				for each(var rb:RadioButton in dict)
@@ -203,10 +204,10 @@ package org.apache.flex.html
 					}
 				}
 			}
-			
+
 			dict[this] = this;
 		}
-			
+
 		/**
 		 * @private
 		 */
@@ -219,15 +220,17 @@ package org.apache.flex.html
 			}
 		}
 	}
-    
+
     COMPILE::JS
     public class RadioButton extends UIBase
     {
         public static var radioCounter:int = 0;
-        
+
         private var input:HTMLInputElement;
         private var labelFor:HTMLLabelElement;
         private var textNode:Text;
+        private var icon:RadioButtonIcon;
+
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          * @flexjsignorecoercion HTMLInputElement
@@ -235,47 +238,47 @@ package org.apache.flex.html
          * @flexjsignorecoercion Text
          */
         override protected function createElement():WrappedHTMLElement
-        {            
-            input = document.createElement('input') as HTMLInputElement;
-            input.type = 'radio';
-            input.id = '_radio_' + RadioButton.radioCounter++;
-            
+        {
+            icon = new RadioButtonIcon()
+            icon.id = '_radio_' + RadioButton.radioCounter++;
+
+
             textNode = document.createTextNode('radio button') as Text;
-            
+
             labelFor = document.createElement('label') as HTMLLabelElement;
-            labelFor.appendChild(input);
+            labelFor.appendChild(icon.element);
             labelFor.appendChild(textNode);
-            
+
             element = labelFor as WrappedHTMLElement;
-            element.className = 'RadioButton';
-            typeNames = 'RadioButton';
-            
+
             positioner = element;
             positioner.style.position = 'relative';
-            
-            (input as WrappedHTMLElement).flexjs_wrapper = this;
+
             (element as WrappedHTMLElement).flexjs_wrapper = this;
             (textNode as WrappedHTMLElement).flexjs_wrapper = this;
-            
+
+            className = 'RadioButton';
+            typeNames = 'RadioButton, RadioButtonIcon';
+
             return element;
-        }        
-        
-        override public function set id(value:String):void 
+        }
+
+        override public function set id(value:String):void
         {
             super.id = value;
             labelFor.id = value;
-            input.id = value;
+            icon.element.id = value;
         }
-        
+
         public function get groupName():String
         {
-            return input.name as String;
+            return (icon.element as HTMLInputElement).name as String;
         }
         public function set groupName(value:String):void
         {
-            input.name = value;
+            (icon.element as HTMLInputElement).name = value;
         }
-        
+
         public function get text():String
         {
             return textNode.nodeValue as String;
@@ -284,17 +287,17 @@ package org.apache.flex.html
         {
             textNode.nodeValue = value;
         }
-        
+
         /** @export */
         public function get selected():Boolean
         {
-            return input.checked;
+            return (icon.element as HTMLInputElement).checked;
         }
         public function set selected(value:Boolean):void
         {
-            input.checked = value;            
+            (icon.element as HTMLInputElement).checked = value;
         }
-        
+
         public function get value():Object
         {
             return input.value;
@@ -303,18 +306,18 @@ package org.apache.flex.html
         {
             input.value = v as String;
         }
-        
+
         public function get selectedValue():Object
         {
             var buttons:NodeList;
             var groupName:String;
             var i:int;
             var n:int;
-            
+
             groupName = input.name as String;
             buttons = document.getElementsByName(groupName);
             n = buttons.length;
-            
+
             for (i = 0; i < n; i++) {
                 if (buttons[i].checked) {
                     return buttons[i].value;
@@ -322,7 +325,7 @@ package org.apache.flex.html
             }
             return null;
         }
-        
+
         /**
          * @flexjsignorecoercion Array
          */
@@ -332,7 +335,7 @@ package org.apache.flex.html
             var groupName:String;
             var i:int;
             var n:int;
-            
+
             groupName = input.name as String;
             buttons = document.getElementsByName(groupName);
             n = buttons.length;
@@ -343,6 +346,6 @@ package org.apache.flex.html
                 }
             }
         }
-    }        
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b86f09bd/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
index 7d90ed1..f8c8c8f 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
@@ -19,21 +19,25 @@
 package org.apache.flex.html
 {
 	import org.apache.flex.core.ITextModel;
-	
+
+	COMPILE::JS {
+		import org.apache.flex.core.WrappedHTMLElement;
+	}
+
     /**
      *  The TextButton class implements a basic button that
      *  displays text.
-     *  
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
-     */    
+     */
 	public class TextButton extends Button
 	{
         /**
          *  Constructor.
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -43,10 +47,10 @@ package org.apache.flex.html
 		{
 			super();
 		}
-		
+
         /**
          *  @copy org.apache.flex.html.Label#text
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -55,7 +59,7 @@ package org.apache.flex.html
 		public function get text():String
 		{
             COMPILE::SWF
-            {                    
+            {
                 return ITextModel(model).text;
             }
             COMPILE::JS
@@ -71,18 +75,18 @@ package org.apache.flex.html
 		{
             COMPILE::SWF
             {
-                ITextModel(model).text = value;                    
+                ITextModel(model).text = value;
             }
             COMPILE::JS
             {
                 this.element.innerHTML = value;
-                this.dispatchEvent('textChange');                
+                this.dispatchEvent('textChange');
             }
 		}
-		
+
         /**
          *  @copy org.apache.flex.html.Label#html
-         *  
+         *
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
@@ -92,7 +96,7 @@ package org.apache.flex.html
 		{
             COMPILE::SWF
             {
-                return ITextModel(model).html;                    
+                return ITextModel(model).html;
             }
             COMPILE::JS
             {
@@ -107,14 +111,26 @@ package org.apache.flex.html
 		{
             COMPILE::SWF
             {
-                ITextModel(model).html = value;                    
+                ITextModel(model).html = value;
             }
             COMPILE::JS
             {
                 this.element.innerHTML = value;
-                this.dispatchEvent('textChange');                
+                this.dispatchEvent('textChange');
             }
 		}
 
+		/**
+		 * @private
+		 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 */
+		COMPILE::JS
+		override protected function createElement():WrappedHTMLElement
+		{
+			var element:WrappedHTMLElement = super.createElement();
+			typeNames = "TextButton";
+			return element;
+		}
+
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b86f09bd/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/CheckBoxIcon.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/CheckBoxIcon.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/CheckBoxIcon.as
new file mode 100644
index 0000000..627e70d
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/CheckBoxIcon.as
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.html.accessories
+{
+	COMPILE::JS {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+
+	public class CheckBoxIcon
+	{
+		public function CheckBoxIcon()
+		{
+			COMPILE::JS {
+				createElement();
+			}
+
+			className = 'CheckBoxIcon';
+		}
+
+		COMPILE::JS {
+		public var element:WrappedHTMLElement;
+		public var positioner:WrappedHTMLElement;
+		}
+
+		private var _className:String;
+
+		public function get className():String
+		{
+			return _className;
+		}
+		public function set className(value:String):void
+		{
+			_className = value;
+
+			COMPILE::JS {
+				element.className = value;
+			}
+		}
+
+		private var _id:String;
+
+		public function get id():String
+		{
+			return _id;
+		}
+		public function set id(value:String):void
+		{
+			_id = value;
+
+			COMPILE::JS {
+				element.id = value;
+			}
+		}
+
+		/**
+		 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 * @flexjsignorecoercion HTMLInputElement
+		 * @flexjsignorecoercion Text
+		 */
+		COMPILE::JS
+ 		protected function createElement():WrappedHTMLElement
+		{
+			var input:HTMLInputElement = document.createElement('input') as HTMLInputElement;
+			input.type = 'checkbox';
+
+			element = input as WrappedHTMLElement;
+
+			positioner = element;
+			positioner.style.position = 'relative';
+
+			(element as WrappedHTMLElement).flexjs_wrapper = this;
+
+			return element;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b86f09bd/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/RadioButtonIcon.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/RadioButtonIcon.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/RadioButtonIcon.as
new file mode 100644
index 0000000..cbcf427
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/RadioButtonIcon.as
@@ -0,0 +1,111 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.html.accessories
+{
+	COMPILE::JS {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+
+	/**
+	 *  The RadioButton class is a component that displays a selectable Button. RadioButtons
+	 *  are typically used in groups, identified by the groupName property. RadioButton use
+	 *  the following beads:
+	 *
+	 *  org.apache.flex.core.IBeadModel: the data model, which includes the groupName.
+	 *  org.apache.flex.core.IBeadView:  the bead that constructs the visual parts of the RadioButton..
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class RadioButtonIcon
+	{
+		public function RadioButtonIcon()
+		{
+			COMPILE::JS {
+				createElement();
+			}
+
+			className = 'RadioButtonIcon';
+		}
+
+		COMPILE::JS {
+		public var element:WrappedHTMLElement;
+		public var positioner:WrappedHTMLElement;
+		}
+
+		private var _className:String;
+
+		/**
+		 * @private
+		 */
+		public function get className():String
+		{
+			return _className;
+		}
+		public function set className(value:String):void
+		{
+			_className = value;
+
+			COMPILE::JS {
+				element.className = value;
+			}
+		}
+
+		private var _id:String;
+
+		/**
+		 * @private
+		 */
+		public function get id():String
+		{
+			return _id;
+		}
+		public function set id(value:String):void
+		{
+			_id = value;
+
+			COMPILE::JS {
+				element.id = value;
+			}
+		}
+
+		/**
+		 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 * @flexjsignorecoercion HTMLInputElement
+		 * @flexjsignorecoercion Text
+		 */
+		COMPILE::JS
+ 		protected function createElement():WrappedHTMLElement
+		{
+			var input:HTMLInputElement = document.createElement('input') as HTMLInputElement;
+			input.type = 'radio';
+
+			element = input as WrappedHTMLElement;
+
+			positioner = element;
+			positioner.style.position = 'relative';
+
+			(element as WrappedHTMLElement).flexjs_wrapper = this;
+
+			return element;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b86f09bd/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index 8904c6e..5fd72c0 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -37,7 +37,9 @@
     <component id="List" class="org.apache.flex.html.List"/>
     <component id="SimpleList" class="org.apache.flex.html.SimpleList"/>
     <component id="CheckBox" class="org.apache.flex.html.CheckBox"/>
+    <component id="CheckBoxIcon" class="org.apache.flex.html.accessories.CheckBoxIcon" />
     <component id="RadioButton" class="org.apache.flex.html.RadioButton"/>
+    <component id="RadioButtonIcon" class="org.apache.flex.html.accessories.RadioButtonIcon"/>
     <component id="ComboBox" class="org.apache.flex.html.ComboBox"/>
     <component id="Container" class="org.apache.flex.html.Container"/>
     <component id="HContainer" class="org.apache.flex.html.HContainer"/>


[15/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - swap COMPILE::AS3 for COMPILE::SWF

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
index db0977e..b897012 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.supportClasses
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.text.TextFieldAutoSize;
         import flash.text.TextFieldType;
@@ -56,7 +56,7 @@ package org.apache.flex.html.supportClasses
 		{
 			super();
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 textField = new CSSTextField();
                 textField.type = TextFieldType.DYNAMIC;
@@ -66,13 +66,13 @@ package org.apache.flex.html.supportClasses
             }
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		public var textField:CSSTextField;
 		
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		override public function addedToParent():void
 		{
 			super.addedToParent();
@@ -85,7 +85,7 @@ package org.apache.flex.html.supportClasses
 		/**
 		 * @private
 		 */
-        COMPILE::AS3
+        COMPILE::SWF
 		override public function adjustSize():void
 		{
 			var cy:Number = height/2;
@@ -107,7 +107,7 @@ package org.apache.flex.html.supportClasses
 		 */
 		public function get text():String
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return textField.text;                    
             }
@@ -119,7 +119,7 @@ package org.apache.flex.html.supportClasses
 		
 		public function set text(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 textField.text = value;                    
             }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML/src/test/flex/flexUnitTests/DataGridColumnTester.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/test/flex/flexUnitTests/DataGridColumnTester.as b/frameworks/projects/HTML/src/test/flex/flexUnitTests/DataGridColumnTester.as
index e060b1f..d10c4c0 100644
--- a/frameworks/projects/HTML/src/test/flex/flexUnitTests/DataGridColumnTester.as
+++ b/frameworks/projects/HTML/src/test/flex/flexUnitTests/DataGridColumnTester.as
@@ -24,4 +24,4 @@ package flexUnitTests
     {
         public var dataGridColumnTesterTest:DataGridColumnTesterTest;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML5/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/.actionScriptProperties b/frameworks/projects/HTML5/.actionScriptProperties
index afe330e..ede2267 100644
--- a/frameworks/projects/HTML5/.actionScriptProperties
+++ b/frameworks/projects/HTML5/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="HTML5.as" projectUUID="5f79f743-aaab-4427-9842-97bbd3d20850" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/HTML5/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/build.xml b/frameworks/projects/HTML5/build.xml
index 5836136..0b4daf1 100644
--- a/frameworks/projects/HTML5/build.xml
+++ b/frameworks/projects/HTML5/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/JQuery/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/.actionScriptProperties b/frameworks/projects/JQuery/.actionScriptProperties
index 66d1df8..06c1906 100644
--- a/frameworks/projects/JQuery/.actionScriptProperties
+++ b/frameworks/projects/JQuery/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="JQuery.as" projectUUID="edaaba36-aa7e-491c-a242-f619527ec54d" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/JQuery/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/build.xml b/frameworks/projects/JQuery/build.xml
index b1c7627..52509b0 100644
--- a/frameworks/projects/JQuery/build.xml
+++ b/frameworks/projects/JQuery/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as
index cc27ad9..a67f18b 100644
--- a/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as
+++ b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as
@@ -20,7 +20,7 @@ package org.apache.flex.jquery
 {
 	import org.apache.flex.html.RadioButton;
 	
-	COMPILE::AS3
+	COMPILE::SWF
 	public class RadioButton extends org.apache.flex.html.RadioButton
 	{
 		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/.actionScriptProperties b/frameworks/projects/Mobile/.actionScriptProperties
index e0f6841..3f90a80 100644
--- a/frameworks/projects/Mobile/.actionScriptProperties
+++ b/frameworks/projects/Mobile/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Mobile.as" projectUUID="b4358e31-bd95-4301-a3d3-f0e67881b93b" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/build.xml b/frameworks/projects/Mobile/build.xml
index a570197..16d0352 100644
--- a/frameworks/projects/Mobile/build.xml
+++ b/frameworks/projects/Mobile/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
index 2be7214..59acda8 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
@@ -82,4 +82,4 @@ package org.apache.cordova
 			removeEventListener("preinitialize", handlePreInit);
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as
index 2e4b579..ae32d47 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.cordova
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.net.URLRequest;
         import flash.net.navigateToURL;            
@@ -69,7 +69,7 @@ package org.apache.cordova
 		 */
 		public function set guid(value:String):void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 navigateToURL(new URLRequest("http://debug.phonegap.com/client/#" + value), "_blank");                    
             }
@@ -85,4 +85,4 @@ package org.apache.cordova
             }
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as
index faea7c0..69d2fa1 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.cordova.camera
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.display.BitmapData;
         import flash.display.DisplayObject;
@@ -70,10 +70,10 @@ package org.apache.cordova.camera
 			FRONT : 1      // Use the front-facing camera
 		};
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private static var root:DisplayObjectContainer;
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		public static function init(r:DisplayObjectContainer):void
 		{
 			root = r;		
@@ -96,14 +96,14 @@ package org.apache.cordova.camera
 		
 		private var cameraSuccess:Function;
 		private var cameraError:Function;
-        COMPILE::AS3
+        COMPILE::SWF
 		private var ui:Sprite;
-        COMPILE::AS3
+        COMPILE::SWF
 		private var camera:flash.media.Camera;
 		
 		public function getPicture( cameraSuccess:Function, cameraError:Function, cameraOptions:Object ) : void
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 this.cameraSuccess = cameraSuccess;
                 this.cameraError = cameraError;
@@ -129,14 +129,14 @@ package org.apache.cordova.camera
             }
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private function mouseClickHandler(event:MouseEvent):void
 		{
 			savePicture();
 			root.removeChild(ui);
 		}
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private function keyDownHandler(event:KeyboardEvent):void
 		{
 			if (event.keyCode == Keyboard.ESCAPE)
@@ -148,7 +148,7 @@ package org.apache.cordova.camera
 			}
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
 		private function savePicture():void
 		{
 			var f:File = File.createTempFile();
@@ -176,4 +176,4 @@ package org.apache.cordova.camera
             }
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
index 75cce3c..7338d46 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
@@ -39,4 +39,4 @@ package org.apache.flex.mobile
 		 */
 		function get selectedView():IViewManagerView;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
index 8735907..6aaa9d3 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
@@ -40,4 +40,4 @@ package org.apache.flex.mobile
 		function get viewManager():IViewManager;
 		function set viewManager(value:IViewManager):void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
index 5c2e149..67c9fd0 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
@@ -52,7 +52,7 @@ package org.apache.flex.mobile
 			
 			_contentArea = new UIBase();
 			
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				addEventListener("initComplete", handleInitComplete);
 				addEventListener("sizeChanged", handleInitComplete);
 				addEventListener("widthChanged", handleInitComplete);
@@ -181,4 +181,4 @@ package org.apache.flex.mobile
 			return _contentArea.numElements;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
index dc63c65..ffa26c5 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
@@ -158,4 +158,4 @@ package org.apache.flex.mobile
 		}
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
index 347f7c6..49438a8 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
@@ -82,4 +82,4 @@ package org.apache.flex.mobile
 		}
 
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as
index b2d2920..2b7f43f 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TitleView.as
@@ -49,7 +49,7 @@ package org.apache.flex.mobile
 			_title = value;
 		}
 		
-		COMPILE::AS3
+		COMPILE::SWF
 		override public function toString():String
 		{
 			return _title;
@@ -100,4 +100,4 @@ package org.apache.flex.mobile
 			_controller = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ToggleSwitch.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ToggleSwitch.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ToggleSwitch.as
index e5f83fb..46eca31 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ToggleSwitch.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ToggleSwitch.as
@@ -102,4 +102,4 @@ package org.apache.flex.mobile
 			_controller = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
index 690669b..6d7175e 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
@@ -83,7 +83,7 @@ package org.apache.flex.mobile
 			ViewManagerModel(model).title = value;
 		}
 		
-		COMPILE::AS3
+		COMPILE::SWF
 		override public function toString():String
 		{
 			return ViewManagerModel(model).title;
@@ -233,4 +233,4 @@ package org.apache.flex.mobile
 			_viewManager = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/MobileWebBrowserView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/MobileWebBrowserView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/MobileWebBrowserView.as
index 7213d00..49a3d7e 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/MobileWebBrowserView.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/MobileWebBrowserView.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mobile.beads
 {
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		import flash.events.Event;
 		import flash.media.StageWebView;
 		import flash.geom.Rectangle;
@@ -48,7 +48,7 @@ package org.apache.flex.mobile.beads
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	COMPILE::AS3
+	COMPILE::SWF
 	public class MobileWebBrowserView implements IBeadView
 	{
 		/**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ToggleSwitchView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ToggleSwitchView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ToggleSwitchView.as
index fe35d45..bceee17 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ToggleSwitchView.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ToggleSwitchView.as
@@ -166,7 +166,7 @@ package org.apache.flex.mobile.beads
 				boundingBox.fill = fill;
 			}
 
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				boundingBox.drawRect(0, 0, boundingBox.width, boundingBox.height);
 				actualSwitch.drawRect(0, 0, actualSwitch.width, actualSwitch.height);
 			}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/controllers/ToggleSwitchMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/controllers/ToggleSwitchMouseController.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/controllers/ToggleSwitchMouseController.as
index d67f14d..9aa7698 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/controllers/ToggleSwitchMouseController.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/controllers/ToggleSwitchMouseController.as
@@ -76,7 +76,7 @@ package org.apache.flex.mobile.beads.controllers
 			
 			model = UIBase(value).model as IToggleButtonModel;
 			
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var viewBead:ToggleSwitchView = value.getBeadByType(IBeadView) as ToggleSwitchView;
                 viewBead.boundingBox.addEventListener(MouseEvent.CLICK, asClickHandler);
@@ -98,7 +98,7 @@ package org.apache.flex.mobile.beads.controllers
 		/**
 		 * @private
 		 */
-		COMPILE::AS3
+		COMPILE::SWF
 		private function asClickHandler( event:MouseEvent ) : void
 		{
 			var oldValue:Boolean = model.selected;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as
index 5e7873e..e93c138 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as
@@ -100,4 +100,4 @@ package org.apache.flex.mobile.chrome
 			dispatchEvent(new Event("layoutNeeded"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as
index 6e54326..54fa7c8 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as
@@ -47,4 +47,4 @@ package org.apache.flex.mobile.chrome
 			className = "TabBar";
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as
index af63d49..d802d93 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as
@@ -77,4 +77,4 @@ package org.apache.flex.mobile.chrome
 			dispatchEvent(new Event("layoutNeeded"));
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as
index c57cc61..20a55ff 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as
@@ -260,4 +260,4 @@ package org.apache.flex.mobile.models
 			_tabBar = value;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Network/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/.actionScriptProperties b/frameworks/projects/Network/.actionScriptProperties
index 65f04ca..5c998c6 100644
--- a/frameworks/projects/Network/.actionScriptProperties
+++ b/frameworks/projects/Network/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Network.as" projectUUID="9a67bdd4-1c63-4e33-b469-1af43c3cdf12" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Network/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/build.xml b/frameworks/projects/Network/build.xml
index dc1222e..7b382f0 100644
--- a/frameworks/projects/Network/build.xml
+++ b/frameworks/projects/Network/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as
index 3f9f697..03c0d78 100644
--- a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.net
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.events.HTTPStatusEvent;
         import flash.events.IOErrorEvent;
@@ -287,7 +287,7 @@ package org.apache.flex.net
          */        
 		public function get responseHeaders():Array
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (_responseHeaders && _responseHeaders.length > 0)
                 {
@@ -474,7 +474,7 @@ package org.apache.flex.net
          */        
 		public var beads:Array;
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _beads:Vector.<IBead>;
 
         /**
@@ -485,7 +485,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */       
-        COMPILE::AS3
+        COMPILE::SWF
 		public function addBead(bead:IBead):void
 		{
 			if (!_beads)
@@ -502,7 +502,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */     
-        COMPILE::AS3
+        COMPILE::SWF
 		public function getBeadByType(classOrInterface:Class):IBead
 		{
 			for each (var bead:IBead in _beads)
@@ -521,7 +521,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */  
-        COMPILE::AS3
+        COMPILE::SWF
 		public function removeBead(value:IBead):IBead	
 		{
 			var n:int = _beads.length;
@@ -537,7 +537,7 @@ package org.apache.flex.net
 			return null;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
         private var urlLoader:URLLoader;
         
         /**
@@ -551,7 +551,7 @@ package org.apache.flex.net
          */        
         public function send():void
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (!urlLoader)
                     urlLoader = new URLLoader();
@@ -658,7 +658,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */        
-        COMPILE::AS3
+        COMPILE::SWF
 		protected function statusHandler(event:HTTPStatusEvent):void
 		{
 			_status = event.status;
@@ -677,7 +677,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */  
-        COMPILE::AS3
+        COMPILE::SWF
 		protected function ioErrorHandler(event:IOErrorEvent):void
 		{
 			dispatchEvent(new Event(event.type));
@@ -691,7 +691,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */        
-        COMPILE::AS3
+        COMPILE::SWF
         protected function completeHandler(event:flash.events.Event):void
         {
             dispatchEvent(new Event(event.type));
@@ -725,7 +725,7 @@ package org.apache.flex.net
          */        
         public function get data():*
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return urlLoader.data;                    
             }
@@ -735,4 +735,4 @@ package org.apache.flex.net
             }
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as
index 45f08b3..05c8760 100644
--- a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as
@@ -76,4 +76,4 @@ package org.apache.flex.net
          */
 		public var value:String;
    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as
index 274559a..39820b7 100644
--- a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.net
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import flash.events.HTTPStatusEvent;
         import flash.events.IOErrorEvent;
@@ -330,7 +330,7 @@ package org.apache.flex.net
          */
 		public function get responseHeaders():Array
 		{
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (_responseHeaders && _responseHeaders.length > 0)
                 {
@@ -518,7 +518,7 @@ package org.apache.flex.net
          */
 		public var beads:Array;
 		
-        COMPILE::AS3
+        COMPILE::SWF
 		private var _beads:Vector.<IBead>;
         
         /**
@@ -529,7 +529,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function addBead(bead:IBead):void
 		{
 			if (!_beads)
@@ -546,7 +546,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function getBeadByType(classOrInterface:Class):IBead
 		{
 			for each (var bead:IBead in _beads)
@@ -565,7 +565,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		public function removeBead(value:IBead):IBead	
 		{
 			var n:int = _beads.length;
@@ -581,7 +581,7 @@ package org.apache.flex.net
 			return null;
 		}
 
-        COMPILE::AS3
+        COMPILE::SWF
         private var urlLoader:URLLoader;
         
         /**
@@ -601,7 +601,7 @@ package org.apache.flex.net
                     addBead(bead);
             }
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 if (!urlLoader)
                     urlLoader = new URLLoader();
@@ -707,7 +707,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		protected function statusHandler(event:HTTPStatusEvent):void
 		{
 			_status = event.status;
@@ -726,7 +726,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
 		protected function ioErrorHandler(event:IOErrorEvent):void
 		{
 			dispatchEvent(new Event(event.type));
@@ -740,7 +740,7 @@ package org.apache.flex.net
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        COMPILE::AS3
+        COMPILE::SWF
         protected function completeHandler(event:flash.events.Event):void
         {
             dispatchEvent(new Event(event.type));
@@ -773,7 +773,7 @@ package org.apache.flex.net
          */
         public function get data():String
         {
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 return urlLoader.data;                    
             }
@@ -802,4 +802,4 @@ package org.apache.flex.net
         }
 
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as
index 4cd73df..1eb0805 100644
--- a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.net
 {
-    COMPILE::AS3
+    COMPILE::SWF
     {
         import org.apache.flex.events.EventDispatcher;            
     }
@@ -35,7 +35,7 @@ package org.apache.flex.net
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
+    COMPILE::SWF
 	public class HTTPServiceBase extends EventDispatcher
 	{
     }
@@ -44,4 +44,4 @@ package org.apache.flex.net
     public class HTTPServiceBase extends HTMLElementWrapper
     {
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/.actionScriptProperties b/frameworks/projects/Reflection/.actionScriptProperties
index fbdbfa3..45ccbd4 100644
--- a/frameworks/projects/Reflection/.actionScriptProperties
+++ b/frameworks/projects/Reflection/.actionScriptProperties
@@ -18,7 +18,7 @@ limitations under the License.
 
 -->
 <actionScriptProperties analytics="false" mainApplicationPath="Reflection.as" projectUUID="86565b55-be36-439b-a583-877632ea28b7" version="11">
-  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+  <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
     <libraryPath defaultLinkType="0">
       <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/build.xml b/frameworks/projects/Reflection/build.xml
index 8a4fdf4..aa73d10 100644
--- a/frameworks/projects/Reflection/build.xml
+++ b/frameworks/projects/Reflection/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as
index 3ca31ba..b9179fe 100755
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as
@@ -38,7 +38,7 @@ package org.apache.flex.reflection
         {
             var results:Array = [];
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var xml:XML = rawData as XML;
                 var data:XMLList = xml.metadata;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as
index 4b9a8c9..48efac8 100755
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as
@@ -38,7 +38,7 @@ package org.apache.flex.reflection
         {
             var results:Array = [];
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var xml:XML = rawData as XML;
                 var data:XMLList = xml.arg;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
index 6035bab..cf69bd1 100755
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
@@ -54,7 +54,7 @@ package org.apache.flex.reflection
             if (_rawData == null)
             {
                 var def:Object = getDefinitionByName(packageName + "::" + name);
-                COMPILE::AS3
+                COMPILE::SWF
                 {
                     _rawData = describeType(def);                        
                 }
@@ -72,7 +72,7 @@ package org.apache.flex.reflection
         {
             var results:Array = [];
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var xml:XML = rawData as XML;
                 var data:XMLList = xml.extendsClass;
@@ -105,7 +105,7 @@ package org.apache.flex.reflection
         {
             var results:Array = [];
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var xml:XML = rawData as XML;
                 var data:XMLList = xml.implementsInterface;
@@ -146,7 +146,7 @@ package org.apache.flex.reflection
         {
             var results:Array = [];
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var xml:XML = rawData as XML;
                 var data:XMLList = xml.variable;
@@ -184,7 +184,7 @@ package org.apache.flex.reflection
         {
             var results:Array = [];
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var xml:XML = rawData as XML;
                 var data:XMLList = xml.accessor;
@@ -222,7 +222,7 @@ package org.apache.flex.reflection
         {
             var results:Array = [];
             
-            COMPILE::AS3
+            COMPILE::SWF
             {
                 var xml:XML = rawData as XML;
                 var data:XMLList = xml.method;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as
index 1114a1e..89b1821 100755
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.reflection
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.utils.describeType;
 }
@@ -33,7 +33,7 @@ COMPILE::AS3
      */
     public function describeType(value:Object):TypeDefinition
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             var xml:XML = flash.utils.describeType(value);
             return new TypeDefinition(xml.@name, xml);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as
index b18ab3c..3710c62 100755
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.reflection
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.utils.getDefinitionByName;
 }
@@ -33,7 +33,7 @@ COMPILE::AS3
      */
     public function getDefinitionByName(name:String):Object
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return flash.utils.getDefinitionByName(name);
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as
index 42eaa47..19abb47 100755
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.reflection
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.utils.getQualifiedClassName;
 }
@@ -33,7 +33,7 @@ COMPILE::AS3
      */
     public function getQualifiedClassName(value:*):String
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return flash.utils.getQualifiedClassName(value);
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as
index 95c75fa..a4b90e5 100755
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.reflection
 {
-COMPILE::AS3
+COMPILE::SWF
 {
     import flash.utils.getQualifiedSuperclassName;
 }
@@ -33,7 +33,7 @@ COMPILE::AS3
      */
     public function getQualifiedSuperclassName(value:*):String
 	{
-        COMPILE::AS3
+        COMPILE::SWF
         {
             return flash.utils.getQualifiedSuperclassName(value);
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/build.xml b/frameworks/projects/Storage/build.xml
index 75a8dff..2494b65 100644
--- a/frameworks/projects/Storage/build.xml
+++ b/frameworks/projects/Storage/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/IPermanentStorage.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/IPermanentStorage.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/IPermanentStorage.as
index d461420..d576c68 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/IPermanentStorage.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/IPermanentStorage.as
@@ -88,4 +88,4 @@ package org.apache.flex.storage
 		 */
 		function openInputDataStream( fileName:String ) : void;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileErrorEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileErrorEvent.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileErrorEvent.as
index 9491ad2..6528006 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileErrorEvent.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileErrorEvent.as
@@ -77,4 +77,4 @@ package org.apache.flex.storage.events
 		 */
 		public var errorCode:Number;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileEvent.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileEvent.as
index 423db20..c8e403f 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileEvent.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/events/FileEvent.as
@@ -81,4 +81,4 @@ package org.apache.flex.storage.events
 		 */
 		public var errorMessage:String;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataInputStream.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataInputStream.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataInputStream.as
index 369eeb7..c3c5f23 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataInputStream.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataInputStream.as
@@ -22,7 +22,7 @@ import org.apache.flex.events.EventDispatcher;
 import org.apache.flex.events.IEventDispatcher;
 import org.apache.flex.storage.events.FileEvent;
 
-COMPILE::AS3 {
+COMPILE::SWF {
 	import flash.filesystem.File;
 	import flash.filesystem.FileMode;
 	import flash.filesystem.FileStream;
@@ -77,7 +77,7 @@ public class DataInputStream extends EventDispatcher implements IDataInput
 			};
 		}
 			
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			_fileHandle = fileHandle as File;
 			_fileReader = fileReader as FileStream;
 		}
@@ -92,7 +92,7 @@ public class DataInputStream extends EventDispatcher implements IDataInput
 		private var _fileHandle:File;
 		private var _fileReader:FileReader;
 	}
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		private var _fileHandle:File;
 		private var _fileReader:FileStream;
 	}
@@ -111,7 +111,7 @@ public class DataInputStream extends EventDispatcher implements IDataInput
 		COMPILE::JS {
 			_fileReader.readAsText(_fileHandle);
 		}
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			var bytes:ByteArray = new ByteArray();
 			_fileReader.readBytes(bytes);
 			
@@ -133,7 +133,7 @@ public class DataInputStream extends EventDispatcher implements IDataInput
 	 */
 	public function close():void
 	{
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			_fileReader.close();
 		}
 		
@@ -143,4 +143,4 @@ public class DataInputStream extends EventDispatcher implements IDataInput
 	}
 }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataOutputStream.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataOutputStream.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataOutputStream.as
index e19f4ca..cd1d8f7 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataOutputStream.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/DataOutputStream.as
@@ -23,7 +23,7 @@ import org.apache.flex.events.IEventDispatcher;
 import org.apache.flex.storage.events.FileEvent;
 import org.apache.flex.storage.events.FileErrorEvent;
 
-COMPILE::AS3 {
+COMPILE::SWF {
 	import flash.filesystem.File;
 	import flash.filesystem.FileMode;
 	import flash.filesystem.FileStream;
@@ -83,7 +83,7 @@ public class DataOutputStream extends EventDispatcher implements IDataOutput
 			_fileWriter.truncate(0);
 		}
 			
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			_fileHandle = fileHandle as File;
 			_fileWriter = fileWriter as FileStream;
 		}
@@ -98,7 +98,7 @@ public class DataOutputStream extends EventDispatcher implements IDataOutput
 		private var _fileHandle:FileEntry;
 		private var _fileWriter:FileWriter;
 	}
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		private var _fileHandle:File;
 		private var _fileWriter:FileStream;
 	}
@@ -120,7 +120,7 @@ public class DataOutputStream extends EventDispatcher implements IDataOutput
 			var blob:Blob = new Blob([text], { type: 'text/plain' });
 			_fileWriter.write(blob);
 		}
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			try {
 				_fileWriter.writeUTFBytes(text);
 				
@@ -152,7 +152,7 @@ public class DataOutputStream extends EventDispatcher implements IDataOutput
 	 */
 	public function close():void
 	{
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			_fileWriter.close();
 		}
 			
@@ -162,4 +162,4 @@ public class DataOutputStream extends EventDispatcher implements IDataOutput
 	}
 }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataInput.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataInput.as
index 0e3b41e..7f7277a 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataInput.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataInput.as
@@ -29,4 +29,4 @@ public interface IDataInput extends IDataStream
 	function close():void;
 }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataOutput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataOutput.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataOutput.as
index 0105c04..026c5c7 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataOutput.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataOutput.as
@@ -29,4 +29,4 @@ public interface IDataOutput extends IDataStream
 	function close():void;
 }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataStream.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataStream.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataStream.as
index 448aef4..4435810 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataStream.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/IDataStream.as
@@ -29,4 +29,4 @@ public interface IDataStream
 	
 }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/LocalFile.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/LocalFile.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/LocalFile.as
index 47b8333..8ebdaa8 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/LocalFile.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/file/LocalFile.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.storage.file
 {
-COMPILE::AS3 {
+COMPILE::SWF {
 	import flash.filesystem.File;
 }
 COMPILE::JS {
@@ -27,7 +27,7 @@ COMPILE::JS {
 /**
  * The File class provides access to a specific file on the device.
  */
-COMPILE::AS3
+COMPILE::SWF
 public class LocalFile
 {
 	public static const documentsDirectory:String = "documentsDirectory";

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/AirStorageProvider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/AirStorageProvider.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/AirStorageProvider.as
index 7657532..856c3a2 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/AirStorageProvider.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/AirStorageProvider.as
@@ -21,7 +21,7 @@ package org.apache.flex.storage.providers
 	import org.apache.flex.events.EventDispatcher;
 	import org.apache.flex.events.IEventDispatcher;
 	
-	COMPILE::AS3 {
+	COMPILE::SWF {
 		import flash.filesystem.File;
 		import flash.filesystem.FileMode;
 		import flash.filesystem.FileStream;
@@ -102,7 +102,7 @@ package org.apache.flex.storage.providers
 		 */
 		public function readTextFromDataFile( fileName:String ) : void
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				var file:File = File.applicationStorageDirectory.resolvePath(fileName);
 				
 				if (!file.exists) {
@@ -144,7 +144,7 @@ package org.apache.flex.storage.providers
 		 */
 		public function openInputDataStream( fileName:String ) : void
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				var file:File = File.applicationStorageDirectory.resolvePath(fileName);
 				var stream:FileStream = new FileStream();
 				
@@ -181,7 +181,7 @@ package org.apache.flex.storage.providers
 		 */
 		public function writeTextToDataFile( fileName:String, text:String ) : void
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				var file:File = File.applicationStorageDirectory.resolvePath(fileName);
 				var stream:FileStream = new FileStream();
 				
@@ -224,7 +224,7 @@ package org.apache.flex.storage.providers
 		 */
 		public function openOutputDataStream( fileName:String ) : void
 		{
-			COMPILE::AS3 {
+			COMPILE::SWF {
 				var file:File = File.applicationStorageDirectory.resolvePath(fileName);
 				var stream:FileStream = new FileStream();
 				

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/LocalStorageProvider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/LocalStorageProvider.as b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/LocalStorageProvider.as
index 5370923..fbbaa70 100644
--- a/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/LocalStorageProvider.as
+++ b/frameworks/projects/Storage/src/main/flex/org/apache/flex/storage/providers/LocalStorageProvider.as
@@ -20,7 +20,7 @@ package org.apache.flex.storage.providers
 {
 	import org.apache.flex.storage.IWebStorage;
 
-COMPILE::AS3 {
+COMPILE::SWF {
 	import flash.net.SharedObject;
 }
 
@@ -50,7 +50,7 @@ public class LocalStorageProvider implements IWebStorage
 	 */
 	public function LocalStorageProvider()
 	{
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			try {
 				sharedObject = SharedObject.getLocal("flexjs","/",false);
 			} catch(e) {
@@ -59,7 +59,7 @@ public class LocalStorageProvider implements IWebStorage
 		}
 	}
 
-	COMPILE::AS3
+	COMPILE::SWF
 	private var sharedObject:SharedObject;
 
 	/**
@@ -75,7 +75,7 @@ public class LocalStorageProvider implements IWebStorage
 	{
 		var result:Boolean = false;
 
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			result = (sharedObject != null);
 		}
 
@@ -103,7 +103,7 @@ public class LocalStorageProvider implements IWebStorage
 	{
 		if (!storageAvailable()) return false;
 
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			sharedObject.data[key] = value;
 			sharedObject.flush();
 		}
@@ -131,7 +131,7 @@ public class LocalStorageProvider implements IWebStorage
 
 		var result:String = null;
 
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			result = sharedObject.data[key] as String;
 		}
 
@@ -157,7 +157,7 @@ public class LocalStorageProvider implements IWebStorage
 	{
 		if (!storageAvailable()) return null;
 
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			delete sharedObject.data[key];
 			sharedObject.flush();
 		}
@@ -184,7 +184,7 @@ public class LocalStorageProvider implements IWebStorage
 
 		var result:Boolean = false;
 
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			result = sharedObject.data.hasOwnProperty(key);
 		}
 
@@ -208,7 +208,7 @@ public class LocalStorageProvider implements IWebStorage
 	{
 		if (!storageAvailable()) return;
 
-		COMPILE::AS3 {
+		COMPILE::SWF {
 			sharedObject.clear();
 		}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/Storage/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/src/main/resources/defaults.css b/frameworks/projects/Storage/src/main/resources/defaults.css
index dd88207..c331cf2 100644
--- a/frameworks/projects/Storage/src/main/resources/defaults.css
+++ b/frameworks/projects/Storage/src/main/resources/defaults.css
@@ -39,4 +39,4 @@ PermanentStorage
 {
 	IStorageProvider: ClassReference("org.apache.flex.storage.providers.AirStorageProvider");
 }	
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/XML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml
index 185cd22..0c188b0 100644
--- a/frameworks/projects/XML/build.xml
+++ b/frameworks/projects/XML/build.xml
@@ -84,7 +84,7 @@
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
-            <arg value="-define=COMPILE::AS3,true" />
+            <arg value="-define=COMPILE::SWF,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/XML/src/main/flex/XMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLClasses.as b/frameworks/projects/XML/src/main/flex/XMLClasses.as
index c4e4f1d..7059082 100644
--- a/frameworks/projects/XML/src/main/flex/XMLClasses.as
+++ b/frameworks/projects/XML/src/main/flex/XMLClasses.as
@@ -34,4 +34,4 @@ internal class XMLClasses
 		import Namespace; Namespace;
 	}
 }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70dd87bb/frameworks/projects/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/pom.xml b/frameworks/projects/pom.xml
index 63025ca..59124c5 100644
--- a/frameworks/projects/pom.xml
+++ b/frameworks/projects/pom.xml
@@ -56,4 +56,4 @@
         <module>XML</module>
     </modules>
 
-</project>
\ No newline at end of file
+</project>


[20/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - - Set the airglobal dependency to scope "provided"

Posted by ah...@apache.org.
- Set the airglobal dependency to scope "provided"


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4af86f53
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4af86f53
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4af86f53

Branch: refs/heads/spark
Commit: 4af86f53d23064632228f4db098881301564aef5
Parents: 70dd87b
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Jun 14 10:46:45 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Jun 14 10:46:45 2016 +0200

----------------------------------------------------------------------
 examples/flexjs/pom.xml                 | 1 +
 frameworks/projects/Binding/pom.xml     | 2 +-
 frameworks/projects/Charts/pom.xml      | 2 +-
 frameworks/projects/Collections/pom.xml | 2 +-
 frameworks/projects/Core/pom.xml        | 2 +-
 frameworks/projects/CreateJS/pom.xml    | 2 +-
 frameworks/projects/DragDrop/pom.xml    | 2 +-
 frameworks/projects/Effects/pom.xml     | 2 +-
 frameworks/projects/Flat/pom.xml        | 2 +-
 frameworks/projects/Formatters/pom.xml  | 2 +-
 frameworks/projects/GoogleMaps/pom.xml  | 2 +-
 frameworks/projects/Graphics/pom.xml    | 2 +-
 frameworks/projects/HTML/pom.xml        | 2 +-
 frameworks/projects/HTML5/pom.xml       | 2 +-
 frameworks/projects/JQuery/pom.xml      | 2 +-
 frameworks/projects/Mobile/pom.xml      | 2 +-
 frameworks/projects/Network/pom.xml     | 2 +-
 frameworks/projects/Reflection/pom.xml  | 2 +-
 frameworks/projects/Storage/pom.xml     | 2 +-
 frameworks/projects/XML/pom.xml         | 2 +-
 20 files changed, 20 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/examples/flexjs/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/pom.xml b/examples/flexjs/pom.xml
index 694356e..4314d66 100644
--- a/examples/flexjs/pom.xml
+++ b/examples/flexjs/pom.xml
@@ -62,6 +62,7 @@
             <artifactId>playerglobal</artifactId>
             <version>20.0</version>
             <type>swc</type>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.flex.flexjs.framework</groupId>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Binding/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/pom.xml b/frameworks/projects/Binding/pom.xml
index 7390ec1..0af73b1 100644
--- a/frameworks/projects/Binding/pom.xml
+++ b/frameworks/projects/Binding/pom.xml
@@ -71,7 +71,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Charts/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/pom.xml b/frameworks/projects/Charts/pom.xml
index 82ea39a..e0aa9e5 100644
--- a/frameworks/projects/Charts/pom.xml
+++ b/frameworks/projects/Charts/pom.xml
@@ -77,7 +77,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Collections/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/pom.xml b/frameworks/projects/Collections/pom.xml
index 7dba653..6546e92 100644
--- a/frameworks/projects/Collections/pom.xml
+++ b/frameworks/projects/Collections/pom.xml
@@ -73,7 +73,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Core/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/pom.xml b/frameworks/projects/Core/pom.xml
index 16779a7..dd4372f 100644
--- a/frameworks/projects/Core/pom.xml
+++ b/frameworks/projects/Core/pom.xml
@@ -74,7 +74,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/CreateJS/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/pom.xml b/frameworks/projects/CreateJS/pom.xml
index 02f8dc1..c2e82f8 100644
--- a/frameworks/projects/CreateJS/pom.xml
+++ b/frameworks/projects/CreateJS/pom.xml
@@ -77,7 +77,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/DragDrop/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/pom.xml b/frameworks/projects/DragDrop/pom.xml
index 74bc925..7ba0d00 100644
--- a/frameworks/projects/DragDrop/pom.xml
+++ b/frameworks/projects/DragDrop/pom.xml
@@ -73,7 +73,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Effects/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/pom.xml b/frameworks/projects/Effects/pom.xml
index b1d8ea3..f435c81 100644
--- a/frameworks/projects/Effects/pom.xml
+++ b/frameworks/projects/Effects/pom.xml
@@ -73,7 +73,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Flat/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/pom.xml b/frameworks/projects/Flat/pom.xml
index 147a31c..2a99e5c 100644
--- a/frameworks/projects/Flat/pom.xml
+++ b/frameworks/projects/Flat/pom.xml
@@ -83,7 +83,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Formatters/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/pom.xml b/frameworks/projects/Formatters/pom.xml
index 204d6c6..ae0b6d7 100644
--- a/frameworks/projects/Formatters/pom.xml
+++ b/frameworks/projects/Formatters/pom.xml
@@ -73,7 +73,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/GoogleMaps/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/pom.xml b/frameworks/projects/GoogleMaps/pom.xml
index 38911b5..c7bbf7c 100644
--- a/frameworks/projects/GoogleMaps/pom.xml
+++ b/frameworks/projects/GoogleMaps/pom.xml
@@ -78,7 +78,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Graphics/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/pom.xml b/frameworks/projects/Graphics/pom.xml
index 58f6635..1404367 100644
--- a/frameworks/projects/Graphics/pom.xml
+++ b/frameworks/projects/Graphics/pom.xml
@@ -73,7 +73,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/HTML/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/pom.xml b/frameworks/projects/HTML/pom.xml
index a140cb2..0898ffa 100644
--- a/frameworks/projects/HTML/pom.xml
+++ b/frameworks/projects/HTML/pom.xml
@@ -86,7 +86,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/HTML5/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/pom.xml b/frameworks/projects/HTML5/pom.xml
index 692d4ee..27952ae 100644
--- a/frameworks/projects/HTML5/pom.xml
+++ b/frameworks/projects/HTML5/pom.xml
@@ -77,7 +77,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/JQuery/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/pom.xml b/frameworks/projects/JQuery/pom.xml
index f67cd83..5c94970 100644
--- a/frameworks/projects/JQuery/pom.xml
+++ b/frameworks/projects/JQuery/pom.xml
@@ -77,7 +77,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Mobile/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/pom.xml b/frameworks/projects/Mobile/pom.xml
index 3c65ccc..b63bfc0 100644
--- a/frameworks/projects/Mobile/pom.xml
+++ b/frameworks/projects/Mobile/pom.xml
@@ -81,7 +81,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Network/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/pom.xml b/frameworks/projects/Network/pom.xml
index 3300fd8..75aa9c7 100644
--- a/frameworks/projects/Network/pom.xml
+++ b/frameworks/projects/Network/pom.xml
@@ -73,7 +73,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Reflection/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/pom.xml b/frameworks/projects/Reflection/pom.xml
index 6e0002d..da69a51 100644
--- a/frameworks/projects/Reflection/pom.xml
+++ b/frameworks/projects/Reflection/pom.xml
@@ -65,7 +65,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/Storage/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Storage/pom.xml b/frameworks/projects/Storage/pom.xml
index c34ab41..cfb8e9d 100644
--- a/frameworks/projects/Storage/pom.xml
+++ b/frameworks/projects/Storage/pom.xml
@@ -77,7 +77,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4af86f53/frameworks/projects/XML/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/pom.xml b/frameworks/projects/XML/pom.xml
index 41943f0..482f662 100644
--- a/frameworks/projects/XML/pom.xml
+++ b/frameworks/projects/XML/pom.xml
@@ -71,7 +71,7 @@
             <artifactId>airglobal</artifactId>
             <version>${air.version}</version>
             <type>swc</type>
-            <scope>external</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>


[35/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
index 35e5800,0000000..d468939
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
@@@ -1,529 -1,0 +1,529 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.Sprite;		
 +	import flash.display.Stage;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.Sprite;		
 +}
 +import flex.display.ModuleInfo;
 +import flex.display.TopOfDisplayList;		
 +
 +import flex.events.IEventDispatcher;
 +import org.apache.flex.geom.Rectangle;
 +COMPILE::LATER
 +{
 +import flash.text.TextFormat;
 +}
 +
 +import mx.core.IChildList;
 +import mx.core.IFlexModuleFactory;
 +
 +/**
 + *  An ISystemManager manages an "application window".
 + *  Every application that runs on the desktop or in a browser
 + *  has an area where the visuals of the application will be
 + *  displayed.  It may be a window in the operating system
 + *  or an area within the browser.  That is an "application window"
 + *  and different from an instance of <code>mx.core.Application</code>, which
 + *  is the main "top-level" window within an application.
 + *
 + *  <p>Every application has an ISystemManager.  
 + *  The ISystemManager  sends an event if
 + *  the size of the application window changes (you cannot change it from
 + *  within the application, but only through interaction with the operating
 + *  system window or browser).  It parents all displayable items within the
 + *  application, such as the main mx.core.Application instance and all popups, 
 + *  tooltips, cursors, an so on.  Any object parented by the ISystemManager is
 + *  considered to be a "top-level" window, even tooltips and cursors.</p>
 + *
 + *  <p>The ISystemManager also switches focus between top-level windows
 + *  if there  are more than one IFocusManagerContainer displayed and users
 + *  are interacting with components within the IFocusManagerContainers.</p>
 + *
 + *  <p>All keyboard and mouse activity that is not expressly trapped is seen
 + *  by the ISystemManager, making it a good place to monitor activity
 + *  should you need to do so.</p>
 + *
 + *  <p>If an application is loaded into another application, an ISystemManager
 + *  will still be created, but will not manage an "application window",
 + *  depending on security and domain rules.
 + *  Instead, it will be the <code>content</code> of the <code>Loader</code> 
 + *  that loaded it and simply serve as the parent of the sub-application</p>
 + *
 + *  <p>The ISystemManager maintains multiple lists of children, one each for
 + *  tooltips, cursors, popup windows.
 + *  This is how it ensures that popup windows "float" above the main
 + *  application windows and that tooltips "float" above that
 + *  and cursors above that.
 + *  If you examine the <code>numChildren</code> property 
 + *  or <code>getChildAt()</code> method on the ISystemManager
 + *  you are accessing the main application window and any other windows
 + *  that aren't popped up.
 + *  To get the list of all windows, including popups, tooltips and cursors,
 + *  use the <code>rawChildren</code> property.</p>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory
 +{
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  cursorChildren
 +    //----------------------------------
 +
 +	/**
 +	 *  An list of the custom cursors
 +	 *  being parented by this ISystemManager.
 +	 *
 +	 *  <p>An ISystemManager has various types of children,
 +	 *  such as the Application, popups, top-most windows,
 +	 *  tooltips, and custom cursors.
 +	 *  You can access the custom cursors through
 +	 *  the <code>cursorChildren</code> property.</p>
 +	 *
 +	 *  <p>The IChildList object has methods like <code>getChildAt()</code>
 +	 *  and properties like <code>numChildren</code>.
 +	 *  For example, <code>cursorChildren.numChildren</code> gives
 +	 *  the number of custom cursors (which will be either 0 or 1)
 +	 *  and, if a custom cursor exists, you can access it as
 +	 *  <code>cursorChildren.getChildAt(0)</code>.</p>
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get cursorChildren():IChildList;
 +	
 +    //----------------------------------
 +    //  document
 +    //----------------------------------
 +
 +	/**
 +	 *  A reference to the document object. 
 +	 *  A document object is an Object at the top of the hierarchy of a 
 +	 *  Flex application, MXML component, or AS component.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get document():Object;
 +
 +	/**
 +	 *  @private
 +	 */
 +	function set document(value:Object):void;
 +
 +    //----------------------------------
 +    //  embeddedFontList
 +    //----------------------------------
 +
 +	/**
 +     *  @private
 +	 */
 +	function get embeddedFontList():Object;
 +
 +    //----------------------------------
 +    //  focusPane
 +    //----------------------------------
 +
 +	/**
 +	 *  A single Sprite shared among components used as an overlay for drawing focus.
 +	 *  You share it if you parent a focused component, not if you are IFocusManagerComponent.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get focusPane():Sprite;
 +
 +	/**
 +	 *  @private
 +	 */
 +	function set focusPane(value:Sprite):void;
 +
 +    //----------------------------------
 +    //  isProxy
 +    //----------------------------------
 +
 +	/**
 +	 *  True if the ISystemManager is a proxy and not a root class.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get isProxy():Boolean;
 +
 +    //----------------------------------
 +    //  loaderInfo
 +    //----------------------------------
 +
 +	/**
 +	 *  The LoaderInfo object that represents information about the application.
 +     *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get moduleInfo():ModuleInfo;
 +
 +    //----------------------------------
 +    //  numModalWindows
 +    //----------------------------------
 +
 +    /**
 +     *  The number of modal windows.  
 +     *
 +     *  <p>Modal windows don't allow
 +     *  clicking in another windows which would normally 
 +     *  activate the FocusManager in that window.  The PopUpManager
 +     *  modifies this count as it creates and destroy modal windows.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get numModalWindows():int;
 +
 +    /**
 +     *  @private
 +     */
 +    function set numModalWindows(value:int):void;
 +
 +    //----------------------------------
 +    //  popUpChildren
 +    //----------------------------------
 +
 +	/**
 +	 *  An list of the topMost (popup)
 +	 *  windows being parented by this ISystemManager.
 +	 *
 +	 *  <p>An ISystemManager has various types of children,
 +	 *  such as the Application, popups,
 +	 *  tooltips, and custom cursors.
 +	 *  You can access the top-most windows through
 +	 *  the <code>popUpChildren</code> property.</p>
 +	 *
 +	 *  <p>The IChildList object has methods like <code>getChildAt()</code>
 +	 *  and properties like <code>numChildren</code>.
 +	 *  For example, <code>popUpChildren.numChildren</code> gives
 +	 *  the number of topmost windows and you can access them as
 +	 *  <code>popUpChildren.getChildAt(i)</code>.</p>
 +	 *
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get popUpChildren():IChildList;
 +
 +    //----------------------------------
 +    //  rawChildren
 +    //----------------------------------
 +
 +	/**
 +	 *  A list of all children
 +	 *  being parented by this ISystemManager.
 +	 *
 +	 *  <p>An ISystemManager has various types of children,
 +	 *  such as the Application, popups, 
 +	 *  tooltips, and custom cursors.</p>
 +	 * 
 +	 *  <p>The IChildList object has methods like <code>getChildAt()</code>
 +	 *  and properties like <code>numChildren</code>.</p>
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get rawChildren():IChildList;
 +	
 +    //----------------------------------
 +    //  screen
 +    //----------------------------------
 +
 +	/**
 +	 *  The size and position of the application window.
 +	 *
 +	 *  The Rectangle object contains <code>x</code>, <code>y</code>,
 +	 *  <code>width</code>, and <code>height</code> properties.
 +     * 
 +     *  The Rectangle is in sandbox root coordinates.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get screen():Rectangle
 +
 +    //----------------------------------
 +    //  topOfDisplayList
 +    //----------------------------------
 +
 +	/**
 +	 *  The flash.display.Stage that represents the application window
 +	 *  mapped to this SystemManager
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get topOfDisplayList():TopOfDisplayList
 +
 +    //----------------------------------
 +    //  toolTipChildren
 +    //----------------------------------
 +
 +	/**
 +	 *  A list of the tooltips
 +	 *  being parented by this ISystemManager.
 +	 *
 +	 *  <p>An ISystemManager has various types of children,
 +	 *  such as the Application, popups, topmost windows,
 +	 *  tooltips, and custom cursors.</p>
 +	 *
 +	 *  <p>The IChildList object has methods like <code>getChildAt()</code>
 +	 *  and properties like <code>numChildren</code>.
 +	 *  For example, <code>toolTipChildren.numChildren</code> gives
 +	 *  the number of tooltips (which will be either 0 or 1)
 +	 *  and, if a tooltip exists, you can access it as
 +	 *  <code>toolTipChildren.getChildAt(0)</code>.</p>
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get toolTipChildren():IChildList;
 +	
 +    //----------------------------------
 +    //  topLevelSystemManager
 +    //----------------------------------
 +
 +	/**
 +	 *  The ISystemManager responsible for the application window.
 +	 *  This will be the same ISystemManager unless this application
 +	 *  has been loaded into another application.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function get topLevelSystemManager():ISystemManager;
 +
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  Converts the given String to a Class or package-level Function.
 +	 *  Calls the appropriate <code>ApplicationDomain.getDefinition()</code> 
 +	 *  method based on
 +	 *  whether you are loaded into another application or not.
 +	 *
 +	 *  @param name Name of class, for example "mx.video.VideoManager".
 +	 * 
 +	 *  @return The Class represented by the <code>name</code>, or null.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function getDefinitionByName(name:String):Object;
 +
 +	/**
 +	 *  Returns <code>true</code> if this ISystemManager is responsible
 +	 *  for an application window, and <code>false</code> if this
 +	 *  application has been loaded into another application.
 +	 *
 +	 *  @return <code>true</code> if this ISystemManager is responsible
 +	 *  for an application window.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	function isTopLevel():Boolean;
 +
 +    /**
 +     *  Returns <code>true</code> if the required font face is embedded
 +	 *  in this application, or has been registered globally by using the 
 +	 *  <code>Font.registerFont()</code> method.
 +	 *
 +	 *  @param tf The TextFormat class representing character formatting information.
 +	 *
 +	 *  @return <code>true</code> if the required font face is embedded
 +	 *  in this application, or has been registered globally by using the 
 +	 *  <code>Font.registerFont()</code> method.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function isFontFaceEmbedded(tf:TextFormat):Boolean;
 +
 +    /**
 +     *  Tests if this system manager is the root of all
 +     *  top level system managers.
 +     * 
 +     *  @return <code>true</code> if the SystemManager
 +     *  is the root of all SystemManagers on the display list,
 +     *  and <code>false</code> otherwise.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function isTopLevelRoot():Boolean;
 +    
 +    /**
 +     *  Attempts to get the system manager that is the in the main application.
 +     *
 +     *  @return The main application's systemManager if allowed by
 +	 *  security restrictions or null if it is in a different SecurityDomain.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getTopLevelRoot():DisplayObject;
 +
 +    /**
 +     *  Gets the system manager that is the root of all
 +     *  top level system managers in this SecurityDomain.
 +     *
 +     *  @return the highest-level systemManager in the sandbox
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    function getSandboxRoot():DisplayObject;
 +
 +    /**
 +     *  Get the bounds of the loaded application that are visible to the user
 +     *  on the screen.
 +     * 
 +     *  @param bounds Optional. The starting bounds for the visible rect. The
 +     *  bounds are in global coordinates. If <code>bounds</code> is null the 
 +     *  starting bounds is defined by the <code>screen</code> property of the 
 +     *  system manager. 
 +     * 
 +     *  @return a <code>Rectangle</code> including the visible portion of the this 
 +     *  object. The rectangle is in global coordinates.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */  
 +	COMPILE::LATER
 +	function getVisibleApplicationRect(bounds:Rectangle = null, skipToSandboxRoot:Boolean = false):Rectangle;
 +    
 +    /**
 +     *  Deploy or remove mouse shields. Mouse shields block mouse input to untrusted
 +     *  applications. The reason you would want to block mouse input is because
 +     *  when you are dragging over an untrusted application you would normally not
 +     *  receive any mouse move events. The Flash Player does not send events
 +     *  across trusted/untrusted boundries due to security concerns. By covering
 +     *  the untrusted application with a mouse shield (assuming you are its parent)
 +     *  you can get mouse move message and the drag operation will work as expected. 
 +     * 
 +     *  @param deploy <code>true</code> to deploy the mouse shields, <code>false</code>
 +     *  to remove the mouse shields.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function deployMouseShields(deploy:Boolean):void;
 +
 +    /**
 +     *  Attempt to notify the parent SWFLoader that the application's size may
 +     *  have changed.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function invalidateParentSizeAndDisplayList():void;
 +
 +	
 +	//----------------------------------
 +	//  stage
 +	//----------------------------------
 +	
 +	/**
 +	 *  The flash.display.Stage that represents the application window
 +	 *  mapped to this SystemManager
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
- 	COMPILE::AS3
++	COMPILE::SWF
 +	function get stage():Stage
 +
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
index a716ca1,0000000..e499ba2
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
@@@ -1,60 -1,0 +1,60 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;  		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;  		
 +}
 +
 +[ExcludeClass]
 +
 +/**
 + */
 +public interface ISystemManagerChildManager
 +{
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +   
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	function addingChild(child:DisplayObject):void;
 +	function childAdded(child:DisplayObject):void;
 +
 +	function childRemoved(child:DisplayObject):void;
 +	function removingChild(child:DisplayObject):void;
 +
 +	function initializeTopLevelWindow(width:Number, height:Number):void;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
index 6498b61,0000000..1b2212f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
@@@ -1,213 -1,0 +1,213 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +}
 +
 +import mx.core.IToolTip;
 +import mx.core.IUIComponent;
 +import mx.effects.IEffect;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  This interface was used by Flex 2.0.1.
 + *  Flex 3 uses IToolTipManager2 instead.
 + */
 +public interface IToolTipManager
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  currentTarget
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get currentTarget():DisplayObject;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set currentTarget(value:DisplayObject):void;
 +	
 +    //----------------------------------
 +    //  currentToolTip
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get currentToolTip():IToolTip;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set currentToolTip(value:IToolTip):void;
 +	
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get enabled():Boolean;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set enabled(value:Boolean):void;
 +	
 +    //----------------------------------
 +    //  hideDelay
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get hideDelay():Number;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set hideDelay(value:Number):void;
 +	
 +    //----------------------------------
 +    //  hideEffect
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get hideEffect():IEffect;
 +
 +	/**
 +	 *  @private
 +	 */
 +	function set hideEffect(value:IEffect):void;
 +	
 +    //----------------------------------
 +    //  scrubDelay
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get scrubDelay():Number;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set scrubDelay(value:Number):void;
 +	
 +    //----------------------------------
 +    //  showDelay
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get showDelay():Number;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set showDelay(value:Number):void;
 +	
 +    //----------------------------------
 +    //  showEffect
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get showEffect():IEffect;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set showEffect(value:IEffect):void;
 +
 +    //----------------------------------
 +    //  showEffect
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get toolTipClass():Class;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set toolTipClass(value:Class):void;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function registerToolTip(target:DisplayObject, oldToolTip:String,
 +							 newToolTip:String):void;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function registerErrorString(target:DisplayObject, oldErrorString:String,
 +								 newErrorString:String):void;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function sizeTip(toolTip:IToolTip):void;
 +
 +	/**
 +	 *  @private
 +	 */
 +	function createToolTip(text:String, x:Number, y:Number,
 +						   errorTipBorderStyle:String = null,
 +						   context:IUIComponent = null):IToolTip;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function destroyToolTip(toolTip:IToolTip):void;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
index db5af2d,0000000..196511f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
@@@ -1,226 -1,0 +1,226 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;		
 +}
 +
 +import mx.core.IToolTip;
 +import mx.core.IUIComponent;
 +import mx.effects.IAbstractEffect;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  This interface is used internally by Flex 3.
 + *  Flex 2.0.1 used the IToolTipManager interface.
 + *
 + *  This interface does not extend IToolTipManager
 + *  because IToolTipManager had a dependency on Effect,
 + *  which has a dependency on UIComponent.
 + *  IToolTipManager2 fixes this by depending on IAbstractEffect,
 + *  a new interface in Flex 3.
 + *
 + *  IToolTipManager2 must be in the cross-versioning
 + *  bootstrap set of classes (see bootstrap-defs.as)
 + *  and if the bootstrap loader contains implementation
 + *  classes such as Effect and UIComponent then any apps
 + *  and modules it loads would use the bootstrap's version
 + *  of these classes, instead of using their own versions.
 + */
 +public interface IToolTipManager2
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  currentTarget
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get currentTarget():DisplayObject;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set currentTarget(value:DisplayObject):void;
 +	
 +    //----------------------------------
 +    //  currentToolTip
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get currentToolTip():IToolTip;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set currentToolTip(value:IToolTip):void;
 +	
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get enabled():Boolean;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set enabled(value:Boolean):void;
 +	
 +    //----------------------------------
 +    //  hideDelay
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get hideDelay():Number;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set hideDelay(value:Number):void;
 +	
 +    //----------------------------------
 +    //  hideEffect
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get hideEffect():IAbstractEffect;
 +
 +	/**
 +	 *  @private
 +	 */
 +	function set hideEffect(value:IAbstractEffect):void;
 +	
 +    //----------------------------------
 +    //  scrubDelay
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get scrubDelay():Number;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set scrubDelay(value:Number):void;
 +	
 +    //----------------------------------
 +    //  showDelay
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get showDelay():Number;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set showDelay(value:Number):void;
 +	
 +    //----------------------------------
 +    //  showEffect
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get showEffect():IAbstractEffect;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set showEffect(value:IAbstractEffect):void;
 +
 +    //----------------------------------
 +    //  toolTipClass
 +    //----------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function get toolTipClass():Class;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function set toolTipClass(value:Class):void;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	function registerToolTip(target:DisplayObject, oldToolTip:String,
 +							 newToolTip:String):void;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function registerErrorString(target:DisplayObject, oldErrorString:String,
 +								 newErrorString:String):void;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function sizeTip(toolTip:IToolTip):void;
 +
 +	/**
 +	 *  @private
 +	 */
 +	function createToolTip(text:String, x:Number, y:Number,
 +						   errorTipBorderStyle:String = null,
 +						   context:IUIComponent = null):IToolTip;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	function destroyToolTip(toolTip:IToolTip):void;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
index b1588f4,0000000..160c0a4
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
@@@ -1,300 -1,0 +1,300 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.geom.Point;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import org.apache.flex.geom.Point;		
 +}
 +import mx.core.IChildList;
 +import mx.core.mx_internal;
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  A SystemManager has various types of children,
 + *  such as the Application, popups, tooltips, and custom cursors.
 + *
 + *  You can access all the children via the <code>rawChildren</code> property.
 + *  You can access just the popups via <code>popUpChildren</code>,
 + *  the tooltips via <code>toolTipChildren</code>,
 + *  and the custom cursors via <code>cursorChildren</code>.
 + *  Each of these returns a SystemChildrenList which implements IChildList.
 + *
 + *  The SystemChildrenList is given two indices that map
 + *  to a subset of the indices of children within the entire
 + *  set of child indices in the SystemManager.
 + *  It manages the children within those two indices.
 + */
 +public class SystemChildrenList implements IChildList
 +{
 +    include "../core/Version.as";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  Constructor.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function SystemChildrenList(owner:SystemManager,
 +									   lowerBoundReference:QName,
 +									   upperBoundReference:QName)
 +	{
 +		super();
 +
 +		this.owner = owner;
 +		this.lowerBoundReference = lowerBoundReference;
 +		this.upperBoundReference = upperBoundReference;
 +	}
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @private
 +	 */
 +	private var owner:SystemManager;
 +
 +	/**
 +	 *  @private
 +	 *  Either "noTopMostIndex", "topMostIndex", or "toolTipIndex".
 +	 *  The popUpChildren extends from noTopMostIndex to topMostIndex.
 +	 *  The toolTips extends from topMostIndex to toolTipIndex.
 +	 *  The cursors extends from toolTipIndex to cursorIndex.
 +	 */
 +	private var lowerBoundReference:QName;
 +
 +	/**
 +	 *  @private
 +	 *  Either "topMostIndex", "toolTipIndex", or "cursorIndex".
 +	 *  The popUpChildren extends from noTopMostIndex to topMostIndex.
 +	 *  The toolTips extends from topMostIndex to toolTipIndex.
 +	 *  The cursors extends from toolTipIndex to cursorIndex.
 +	 */
 +	private var upperBoundReference:QName;
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @copy mx.core.IChildList#numChildren
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function get numChildren():int
 +	{
 +		return owner[upperBoundReference] - owner[lowerBoundReference];
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#addChild
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function addChild(child:DisplayObject):DisplayObject
 +	{
 +		owner.rawChildren_addChildAt(
 +			child, owner[upperBoundReference]);
 +		owner[upperBoundReference]++;
 +		return child;
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#addChildAt
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function addChildAt(child:DisplayObject, index:int):DisplayObject
 +	{
 +		owner.rawChildren_addChildAt(
 +			child, owner[lowerBoundReference] + index);
 +		owner[upperBoundReference]++;
 +		return child;
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#removeChild
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function removeChild(child:DisplayObject):DisplayObject
 +	{
 +		var index:int = owner.rawChildren_getChildIndex(child);
 +		if (owner[lowerBoundReference] <= index &&
 +			index < owner[upperBoundReference])
 +		{
 +			owner.rawChildren_removeChild(child);
 +			owner[upperBoundReference]--;
 +		}
 +		return child;
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#removeChildAt
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function removeChildAt(index:int):DisplayObject
 +	{
 +		var child:DisplayObject = 
 +			owner.rawChildren_removeChildAt(
 +				index + owner[lowerBoundReference]);
 +		owner[upperBoundReference]--;
 +		return child;
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#getChildAt
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	public function getChildAt(index:int):DisplayObject
 +  	{
 +		var retval:DisplayObject =
 +			owner.rawChildren_getChildAt(
 +				owner[lowerBoundReference] + index);
 +		return retval;
 +  	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#getChildByName
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	public function getChildByName(name:String):DisplayObject
 +  	{
 +		return owner.rawChildren_getChildByName(name);
 +  	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#getChildIndex
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +  	public function getChildIndex(child:DisplayObject):int
 +  	{
 +		var retval:int = owner.rawChildren_getChildIndex(child);
 +		retval -= owner[lowerBoundReference];
 +		return retval;
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#setChildIndex
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function setChildIndex(child:DisplayObject, newIndex:int):void
 +	{		
 +		owner.rawChildren_setChildIndex(
 +			child, owner[lowerBoundReference] + newIndex);
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#getObjectsUnderPoint
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function getObjectsUnderPoint(point:Point):Array
 +	{
 +		return owner.rawChildren_getObjectsUnderPoint(point);
 +	}
 +
 +	/**
 +	 *  @copy mx.core.IChildList#contains
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function contains(child:DisplayObject):Boolean
 +	{
 +		if (child != owner && owner.rawChildren_contains(child))
 +		{
 +			while (child.parent != owner)
 +			{
 +				child = child.parent;
 +			}
 +			var childIndex:int = owner.rawChildren_getChildIndex(child);
 +			if (childIndex >= owner[lowerBoundReference] &&
 +				childIndex < owner[upperBoundReference])
 +			{
 +				return true;
 +			}
 +		}
 +		return false;
 +	}	
 +}
 +
 +}


[05/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - - Included the DataBindingExample_as after adding the 'defines' config options

Posted by ah...@apache.org.
- Included the DataBindingExample_as after adding the 'defines' config options


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/080c6cb1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/080c6cb1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/080c6cb1

Branch: refs/heads/spark
Commit: 080c6cb1a739eb9650d564df13af090dcc2bd12b
Parents: ca24dc2
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Jun 9 09:53:39 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Jun 9 09:53:39 2016 +0200

----------------------------------------------------------------------
 examples/flexjs/DataBindingExample_as/pom.xml | 23 +++++++++++++++-------
 examples/flexjs/pom.xml                       |  3 +--
 2 files changed, 17 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/080c6cb1/examples/flexjs/DataBindingExample_as/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample_as/pom.xml b/examples/flexjs/DataBindingExample_as/pom.xml
index 59dd151..8fca4e1 100644
--- a/examples/flexjs/DataBindingExample_as/pom.xml
+++ b/examples/flexjs/DataBindingExample_as/pom.xml
@@ -40,20 +40,29 @@
                 <version>0.7.0-SNAPSHOT</version>
                 <extensions>true</extensions>
                 <configuration>
-                    <mainClass>DataBindingExample.mxml</mainClass>
-                    <!--defines>
-                        <property>
+                    <mainClass>DataBindingExample.as</mainClass>
+                    <defines>
+                        <define>
                             <name>CONFIG::as_only</name>
                             <value>true</value>
-                        </property>
-                        <property>
+                        </define>
+                        <define>
                             <name>CONFIG::js_only</name>
                             <value>false</value>
-                        </property>
-                    </defines-->
+                        </define>
+                    </defines>
                 </configuration>
             </plugin>
         </plugins>
     </build>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.flex.flexjs.framework</groupId>
+            <artifactId>Network</artifactId>
+            <version>0.7.0-SNAPSHOT</version>
+            <type>swc</type>
+        </dependency>
+    </dependencies>
+
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/080c6cb1/examples/flexjs/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/pom.xml b/examples/flexjs/pom.xml
index 24132a5..694356e 100644
--- a/examples/flexjs/pom.xml
+++ b/examples/flexjs/pom.xml
@@ -37,8 +37,7 @@
         <module>CordovaCameraExample</module>
         <module>CreateJSExample</module>
         <module>DataBindingExample</module>
-        <!-- Needs "depends" support -->
-        <!--module>DataBindingExample_as</module-->
+        <module>DataBindingExample_as</module>
         <module>DataBindingExample_Flat</module>
         <module>DataGridExample</module>
         <module>DesktopMap</module>


[25/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
index b38d635,0000000..4b65a97
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
@@@ -1,1700 -1,0 +1,1700 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +    import flash.utils.ByteArray;
 +    import flash.utils.Dictionary;
 +    import flash.xml.XMLNode;
 +}
 +import mx.collections.IList;
 +
 +import org.apache.flex.reflection.DefinitionWithMetaData;
 +import org.apache.flex.reflection.MetaDataArgDefinition;
 +import org.apache.flex.reflection.MetaDataDefinition;
 +import org.apache.flex.reflection.MethodDefinition;
 +import org.apache.flex.reflection.TypeDefinition;
 +import org.apache.flex.reflection.getQualifiedClassName;
 +
 +/**
 + *  The ObjectUtil class is an all-static class with methods for
 + *  working with Objects within Flex.
 + *  You do not create instances of ObjectUtil;
 + *  instead you simply call static methods such as the 
 + *  <code>ObjectUtil.isSimple()</code> method.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ObjectUtil
 +{
 +    include "../core/Version.as";
 +    
 +    /**
 +    *  Array of properties to exclude from debugging output.
 +    *  
 +    *  @langversion 3.0
 +    *  @playerversion Flash 9
 +    *  @playerversion AIR 1.1
 +    *  @productversion Flex 3
 +    */
 +    private static var defaultToStringExcludes:Array = ["password", "credentials"];
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Compares the Objects and returns an integer value 
 +     *  indicating if the first item is less than greater than or equal to
 +     *  the second item.
 +     *  This method will recursively compare properties on nested objects and
 +     *  will return as soon as a non-zero result is found.
 +     *  By default this method will recurse to the deepest level of any property.
 +     *  To change the depth for comparison specify a non-negative value for
 +     *  the <code>depth</code> parameter.
 +     *
 +     *  @param a Object.
 +     *
 +     *  @param b Object.
 +     *
 +     *  @param depth Indicates how many levels should be 
 +     *  recursed when performing the comparison.
 +     *  Set this value to 0 for a shallow comparison of only the primitive 
 +     *  representation of each property.
 +     *  For example:<pre>
 +     *  var a:Object = {name:"Bob", info:[1,2,3]};
 +     *  var b:Object = {name:"Alice", info:[5,6,7]};
 +     *  var c:int = ObjectUtil.compare(a, b, 0);</pre>
 +     *
 +     *  <p>In the above example the complex properties of <code>a</code> and 
 +     *  <code>b</code> will be flattened by a call to <code>toString()</code>
 +     *  when doing the comparison.
 +     *  In this case the <code>info</code> property will be turned into a string
 +     *  when performing the comparison.</p>
 +     *
 +     *  @return Return 0 if a and b are null, NaN, or equal. 
 +     *  Return 1 if a is null or greater than b. 
 +     *  Return -1 if b is null or greater than a. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function compare(a:Object, b:Object, depth:int = -1):int
 +    {
 +        return internalCompare(a, b, 0, depth, new CircularReferenceManager());
 +    }
 +    
 +    /**
 +     *  Copies the specified Object and returns a reference to the copy.
 +     *  The copy is made using a native serialization technique. 
 +     *  This means that custom serialization will be respected during the copy.
 +     *
 +     *  <p>This method is designed for copying data objects, 
 +     *  such as elements of a collection. It is not intended for copying 
 +     *  a UIComponent object, such as a TextInput control. If you want to create copies 
 +     *  of specific UIComponent objects, you can create a subclass of the component and implement 
 +     *  a <code>clone()</code> method, or other method to perform the copy.</p>
 +     * 
 +     *  @param value Object that should be copied.
 +     * 
 +     *  @return Copy of the specified Object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */ 
 +    public static function copy(value:Object):Object
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            var buffer:ByteArray = new ByteArray();
 +            buffer.writeObject(value);
 +            buffer.position = 0;
 +            var result:Object = buffer.readObject();
 +            return result;
 +        }
 +        COMPILE::JS
 +        {
 +            return copyObject(value);
 +        }
 +    }
 +    
 +    COMPILE::JS
 +    private static function copyObject(value:*):*
 +    {
 +        var t:String = typeof(value);
 +        if (t === "undefined")
 +            return undefined;
 +        else if (t === "boolean")
 +            return value;
 +        else if (t === "string")
 +            return value;
 +        else if (t === "function")
 +            return value; // need to copy?
 +        else if (t === null)
 +            return null;
 +        
 +        var newObj:Object;
 +        if (value.constructor)
 +            newObj = new value.constructor(); // what about required constuctor args?
 +        else
 +            newObj = {};
 +        for (var p:String in value)
 +        {
 +            newObj[p] = copyObject(value[p]);
 +        }
 +        return newObj;
 +    }
 +
 +    /**
 +     *  Clones the specified Object and returns a reference to the clone.
 +     *  The clone is made using a native serialization technique. 
 +     *  This means that custom serialization will be respected during the
 +     *  cloning.  clone() differs from copy() in that the uid property of
 +     *  each object instance is retained.
 +     *
 +     *  <p>This method is designed for cloning data objects, 
 +     *  such as elements of a collection. It is not intended for cloning 
 +     *  a UIComponent object, such as a TextInput control. If you want to clone
 +     *  specific UIComponent objects, you can create a subclass of the component
 +     *  and implement a <code>clone()</code> method.</p>
 +     * 
 +     *  @param value Object that should be cloned.
 +     * 
 +     *  @return Clone of the specified Object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */ 
 +    public static function clone(value:Object):Object
 +    {
 +        var result:Object = copy(value);
 +        cloneInternal(result, value);
 +        return result;
 +    }
 +
 +    /**
 +     *  Recursive helper used by the public clone method. 
 +     *  @private
 +     */    
 +    private static function cloneInternal(result:Object, value:Object):void
 +    {
 +        if (value && value.hasOwnProperty("uid"))
 +            result.uid = value.uid;
 +
 +        var classInfo:Object = getClassInfo(value);
 +        var v:Object;
 +        for each (var p:* in classInfo.properties) 
 +        {
 +            v = value[p];
 +            if (v && v.hasOwnProperty("uid")) 
 +                cloneInternal(result[p], v);
 +        }
 +    }
 +   
 +    /**
 +     *  Returns <code>true</code> if the object reference specified
 +     *  is a simple data type. The simple data types include the following:
 +     *  <ul>
 +     *    <li><code>String</code></li>
 +     *    <li><code>Number</code></li>
 +     *    <li><code>uint</code></li>
 +     *    <li><code>int</code></li>
 +     *    <li><code>Boolean</code></li>
 +     *    <li><code>Date</code></li>
 +     *    <li><code>Array</code></li>
 +     *  </ul>
 +     *
 +     *  @param value Object inspected.
 +     *
 +     *  @return <code>true</code> if the object specified
 +     *  is one of the types above; <code>false</code> otherwise.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function isSimple(value:Object):Boolean
 +    {
 +        var objectType:String = typeof(value);
 +        switch (objectType)
 +        {
 +            case "number":
 +            case "string":
 +            case "boolean":
 +            {
 +                return true;
 +            }
 +
 +            case "object":
 +            {
 +                return (value is Date) || (value is Array);
 +            }
 +        }
 +
 +        return false;
 +    }
 +
 +    /**
 +     *  Compares two numeric values.
 +     * 
 +     *  @param a First number.
 +     * 
 +     *  @param b Second number.
 +     *
 +     *  @return 0 is both numbers are NaN. 
 +     *  1 if only <code>a</code> is a NaN.
 +     *  -1 if only <code>b</code> is a NaN.
 +     *  -1 if <code>a</code> is less than <code>b</code>.
 +     *  1 if <code>a</code> is greater than <code>b</code>.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function numericCompare(a:Number, b:Number):int
 +    {
 +        if (isNaN(a) && isNaN(b))
 +            return 0;
 +
 +        if (isNaN(a))
 +            return 1;
 +
 +        if (isNaN(b))
 +           return -1;
 +
 +        if (a < b)
 +            return -1;
 +
 +        if (a > b)
 +            return 1;
 +
 +        return 0;
 +    }
 +
 +    /**
 +     *  Compares two String values.
 +     * 
 +     *  @param a First String value.
 +     * 
 +     *  @param b Second String value.
 +     *
 +     *  @param caseInsensitive Specifies to perform a case insensitive compare, 
 +     *  <code>true</code>, or not, <code>false</code>.
 +     *
 +     *  @return 0 is both Strings are null. 
 +     *  1 if only <code>a</code> is null.
 +     *  -1 if only <code>b</code> is null.
 +     *  -1 if <code>a</code> precedes <code>b</code>.
 +     *  1 if <code>b</code> precedes <code>a</code>.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function stringCompare(a:String, b:String,
 +                                         caseInsensitive:Boolean = false):int
 +    {
 +        if (a == null && b == null)
 +            return 0;
 +
 +        if (a == null)
 +          return 1;
 +
 +        if (b == null)
 +           return -1;
 +
 +        // Convert to lowercase if we are case insensitive.
 +        if (caseInsensitive)
 +        {
 +            a = a.toLocaleLowerCase();
 +            b = b.toLocaleLowerCase();
 +        }
 +
 +        var result:int = a.localeCompare(b);
 +        
 +        if (result < -1)
 +            result = -1;
 +        else if (result > 1)
 +            result = 1;
 +
 +        return result;
 +    }
 +
 +    /**
 +     *  Compares the two Date objects and returns an integer value 
 +     *  indicating if the first Date object is before, equal to, 
 +     *  or after the second item.
 +     *
 +     *  @param a Date object.
 +     *
 +     *  @param b Date object.
 +     *
 +     *  @return 0 if <code>a</code> and <code>b</code> are equal
 +     *  (or both are <code>null</code>);
 +     *  -1 if <code>a</code> is before <code>b</code>
 +     *  (or <code>b</code> is <code>null</code>);
 +     *  1 if <code>a</code> is after <code>b</code>
 +     *  (or <code>a</code> is <code>null</code>);
 +	 *  0 is both dates getTime's are NaN;
 +     *  1 if only <code>a</code> getTime is a NaN;
 +     *  -1 if only <code>b</code> getTime is a NaN.    
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function dateCompare(a:Date, b:Date):int
 +    {
 +        if (a == null && b == null)
 +            return 0;
 +
 +        if (a == null)
 +          return 1;
 +
 +        if (b == null)
 +           return -1;
 +
 +        var na:Number = a.getTime();
 +        var nb:Number = b.getTime();
 +        
 +        if (na < nb)
 +            return -1;
 +
 +        if (na > nb)
 +            return 1;
 +		
 +		if (isNaN(na) && isNaN(nb))
 +			return 0;
 +		
 +		if (isNaN(na))
 +			return 1;
 +		
 +		if (isNaN(nb))
 +			return -1;
 +
 +        return 0;
 +    }
 +        
 +    /**
 +     *  Pretty-prints the specified Object into a String.
 +     *  All properties will be in alpha ordering.
 +     *  Each object will be assigned an id during printing;
 +     *  this value will be displayed next to the object type token
 +     *  preceded by a '#', for example:
 +     *
 +     *  <pre>
 +     *  (mx.messaging.messages::AsyncMessage)#2.</pre>
 +     *
 +     *  <p>This id is used to indicate when a circular reference occurs.
 +     *  Properties of an object that are of the <code>Class</code> type will
 +     *  appear only as the assigned type.
 +     *  For example a custom definition like the following:</p>
 +     *
 +     *  <pre>
 +     *    public class MyCustomClass {
 +     *      public var clazz:Class;
 +     *    }</pre>
 +     * 
 +     *  <p>With the <code>clazz</code> property assigned to <code>Date</code>
 +     *  will display as shown below:</p>
 +     * 
 +     *  <pre>
 +     *   (somepackage::MyCustomClass)#0
 +     *      clazz = (Date)</pre>
 +     *
 +     *  @param value Object to be pretty printed.
 +     * 
 +     *  @param namespaceURIs Array of namespace URIs for properties 
 +     *  that should be included in the output.
 +     *  By default only properties in the public namespace will be included in
 +     *  the output.
 +     *  To get all properties regardless of namespace pass an array with a 
 +     *  single element of "*".
 +     * 
 +     *  @param exclude Array of the property names that should be 
 +     *  excluded from the output.
 +     *  Use this to remove data from the formatted string.
 +     * 
 +     *  @return String containing the formatted version
 +     *  of the specified object.
 +     *
 +     *  @example
 +     *  <pre>
 +     *  // example 1
 +     *  var obj:AsyncMessage = new AsyncMessage();
 +     *  obj.body = [];
 +     *  obj.body.push(new AsyncMessage());
 +     *  obj.headers["1"] = { name: "myName", num: 15.3};
 +     *  obj.headers["2"] = { name: "myName", num: 15.3};
 +     *  obj.headers["10"] = { name: "myName", num: 15.3};
 +     *  obj.headers["11"] = { name: "myName", num: 15.3};
 +     *  trace(ObjectUtil.toString(obj));
 +     *
 +     *  // will output to flashlog.txt
 +     *  (mx.messaging.messages::AsyncMessage)#0
 +     *    body = (Array)#1
 +     *      [0] (mx.messaging.messages::AsyncMessage)#2
 +     *        body = (Object)#3
 +     *        clientId = (Null)
 +     *        correlationId = ""
 +     *        destination = ""
 +     *        headers = (Object)#4
 +     *        messageId = "378CE96A-68DB-BC1B-BCF7FFFFFFFFB525"
 +     *        sequenceId = (Null)
 +     *        sequencePosition = 0
 +     *        sequenceSize = 0
 +     *        timeToLive = 0
 +     *        timestamp = 0
 +     *    clientId = (Null)
 +     *    correlationId = ""
 +     *    destination = ""
 +     *    headers = (Object)#5
 +     *      1 = (Object)#6
 +     *        name = "myName"
 +     *        num = 15.3
 +     *      10 = (Object)#7
 +     *        name = "myName"
 +     *        num = 15.3
 +     *      11 = (Object)#8
 +     *        name = "myName"
 +     *        num = 15.3
 +     *      2 = (Object)#9
 +     *        name = "myName"
 +     *        num = 15.3
 +     *    messageId = "1D3E6E96-AC2D-BD11-6A39FFFFFFFF517E"
 +     *    sequenceId = (Null)
 +     *    sequencePosition = 0
 +     *    sequenceSize = 0
 +     *    timeToLive = 0
 +     *    timestamp = 0
 +     *
 +     *  // example 2 with circular references
 +     *  obj = {};
 +     *  obj.prop1 = new Date();
 +     *  obj.prop2 = [];
 +     *  obj.prop2.push(15.2);
 +     *  obj.prop2.push("testing");
 +     *  obj.prop2.push(true);
 +     *  obj.prop3 = {};
 +     *  obj.prop3.circular = obj;
 +     *  obj.prop3.deeper = new ErrorMessage();
 +     *  obj.prop3.deeper.rootCause = obj.prop3.deeper;
 +     *  obj.prop3.deeper2 = {};
 +     *  obj.prop3.deeper2.deeperStill = {};
 +     *  obj.prop3.deeper2.deeperStill.yetDeeper = obj;
 +     *  trace(ObjectUtil.toString(obj));
 +     *
 +     *  // will output to flashlog.txt
 +     *  (Object)#0
 +     *    prop1 = Tue Apr 26 13:59:17 GMT-0700 2005
 +     *    prop2 = (Array)#1
 +     *      [0] 15.2
 +     *      [1] "testing"
 +     *      [2] true
 +     *    prop3 = (Object)#2
 +     *      circular = (Object)#0
 +     *      deeper = (mx.messaging.messages::ErrorMessage)#3
 +     *        body = (Object)#4
 +     *        clientId = (Null)
 +     *        code = (Null)
 +     *        correlationId = ""
 +     *        destination = ""
 +     *        details = (Null)
 +     *        headers = (Object)#5
 +     *        level = (Null)
 +     *        message = (Null)
 +     *        messageId = "14039376-2BBA-0D0E-22A3FFFFFFFF140A"
 +     *        rootCause = (mx.messaging.messages::ErrorMessage)#3
 +     *        sequenceId = (Null)
 +     *        sequencePosition = 0
 +     *        sequenceSize = 0
 +     *        timeToLive = 0
 +     *        timestamp = 0
 +     *      deeper2 = (Object)#6
 +     *        deeperStill = (Object)#7
 +     *          yetDeeper = (Object)#0
 +     * 
 +     * // example 3 with Dictionary
 +     * var point:Point = new Point(100, 100);
 +     * var point2:Point = new Point(100, 100);
 +     * var obj:Dictionary = new Dictionary();
 +     * obj[point] = "point";
 +     * obj[point2] = "point2";
 +     * obj["1"] = { name: "one", num: 1};
 +     * obj["two"] = { name: "2", num: 2};
 +     * obj[3] = 3;
 +     * trace(ObjectUtil.toString(obj));
 +     * 
 +     * // will output to flashlog.txt
 +     * (flash.utils::Dictionary)#0
 +     *   {(flash.geom::Point)#1
 +     *     length = 141.4213562373095
 +     *     x = 100
 +     *     y = 100} = "point2"
 +     *   {(flash.geom::Point)#2
 +     *     length = 141.4213562373095
 +     *     x = 100
 +     *     y = 100} = "point"
 +     *   {1} = (Object)#3
 +     *     name = "one"
 +     *     num = 1
 +     *   {3} = 3
 +     *   {"two"} = (Object)#4
 +     *     name = "2"
 +     *     num = 2
 +     * 
 +     * </pre>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function toString(value:Object, 
 +                                    namespaceURIs:Array = null, 
 +                                    exclude:Array = null):String
 +    {
 +        if (exclude == null)
 +        {
 +            exclude = defaultToStringExcludes;
 +        }
 +        
 +        refCount = 0;
 +        return internalToString(value, 0, null, namespaceURIs, exclude);
 +    }
 +    
 +    /**
 +     *  This method cleans up all of the additional parameters that show up in AsDoc
 +     *  code hinting tools that developers shouldn't ever see.
 +     *  @private
 +     */
 +    private static function internalToString(value:Object, 
 +                                             indent:int = 0,
 +                                             refs:CircularReferenceManager = null, 
 +                                             namespaceURIs:Array = null, 
 +                                             exclude:Array = null):String
 +    {
 +        var str:String;
 +        var objectType:String = value == null ? "null" : typeof(value);
 +        switch (objectType)
 +        {
 +            case "boolean":
 +            case "number":
 +            {
 +                return value.toString();
 +            }
 +
 +            case "string":
 +            {
 +                return "\"" + value.toString() + "\"";
 +            }
 +
 +            case "object":
 +            {
 +                if (value is Date)
 +                {
 +                    return value.toString();
 +                }
 +                else if (isXMLNode(value))
 +                {
 +                    return value.toString();
 +                }
 +                else if (value is Class)
 +                {
 +                    return "(" + getQualifiedClassName(value) + ")";
 +                }
 +                else
 +                {
 +                    var classInfo:Object = getClassInfo(value, exclude,
 +                        { includeReadOnly: true, uris: namespaceURIs });
 +                        
 +                    var properties:Array = classInfo.properties;
 +                    
 +                    str = "(" + classInfo.name + ")";
 +                    
 +                    // refs help us avoid circular reference infinite recursion.
 +                    // Each time an object is encoumtered it is pushed onto the
 +                    // refs stack so that we can determine if we have visited
 +                    // this object already.
 +                    if (refs == null)
 +                        refs = new CircularReferenceManager();
 +
 +                    // Check to be sure we haven't processed this object before
 +                    // Dictionary has some bugs, so we want to work around them as best we can
 +                    try
 +                    {
 +                        var id:Object = refs[value];
 +                        if (id != null)
 +                        {
 +                            str += "#" + int(id);
 +                            return str;
 +                        }
 +                    }
 +                    catch (e:Error)
 +                    {
 +                        //Since we can't test for infinite loop, we simply return toString.
 +                        return String(value);
 +                    }
 +                    
 +                    if (value != null)
 +                    {
 +                        str += "#" + refCount.toString();
 +                        refs[value] = refCount;
 +                        refCount++;
 +                    }
 +
 +                    var isArray:Boolean = value is Array;
 +                    var isDict:Boolean;
-                     COMPILE::AS3
++                    COMPILE::SWF
 +                    {
 +                        isDict = value is Dictionary;
 +                    }
 +                    var prop:*;
 +                    indent += 2;
 +                    
 +                    // Print all of the variable values.
 +                    for (var j:int = 0; j < properties.length; j++)
 +                    {
 +                        str = newline(str, indent);
 +                        prop = properties[j];
 +                        
 +                        if (isArray)
 +                            str += "[";
 +                        else if (isDict)
 +                            str += "{";
 +
 +                    
 +                        if (isDict)
 +                        {
 +                            // in dictionaries, recurse on the key, because it can be a complex object
 +                            str += internalToString(prop, indent, refs,
 +                                                    namespaceURIs, exclude);
 +                        }
 +                        else
 +                        {
 +                            str += prop.toString();
 +                        }
 +                        
 +                        if (isArray)
 +                            str += "] ";
 +                        else if (isDict)
 +                            str += "} = ";
 +                        else
 +                            str += " = ";
 +                        
 +                        try
 +                        {
 +                            // print the value
 +                            str += internalToString(value[prop], indent, refs,
 +                                                    namespaceURIs, exclude);
 +                        }
 +                        catch(e:Error)
 +                        {
 +                            // value[prop] can cause an RTE
 +                            // for certain properties of certain objects.
 +                            // For example, accessing the properties
 +                            //   actionScriptVersion
 +                            //   childAllowsParent
 +                            //   frameRate
 +                            //   height
 +                            //   loader
 +                            //   parentAllowsChild
 +                            //   sameDomain
 +                            //   swfVersion
 +                            //   width
 +                            // of a Stage's loaderInfo causes
 +                            //   Error #2099: The loading object is not
 +                            //   sufficiently loaded to provide this information
 +                            // In this case, we simply output ? for the value.
 +                            str += "?";
 +                        }
 +                    }
 +                    indent -= 2;
 +                    return str;
 +                }
 +                break;
 +            }
 +
 +            case "xml":
 +            {
 +                return value.toXMLString();
 +            }
 +
 +            default:
 +            {
 +                return "(" + objectType + ")";
 +            }
 +        }
 +        
 +        return "(unknown)";
 +    }
 +
 +    /**
 +     *  @private
 +     *  This method will append a newline and the specified number of spaces
 +     *  to the given string.
 +     */
 +    private static function newline(str:String, n:int = 0):String
 +    {
 +        var result:String = str;
 +        result += "\n";
 +        
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            result += " ";
 +        }
 +        return result;
 +    }
 +    
 +    private static function internalCompare(a:Object, b:Object,
 +                                            currentDepth:int, desiredDepth:int,
 +                                            refs:CircularReferenceManager):int
 +    {
 +        if (a == null && b == null)
 +            return 0;
 +    
 +        if (a == null)
 +            return 1;
 +    
 +        if (b == null)
 +            return -1;
 +           
 +		COMPILE::LATER
 +		{
 +        if (a is ObjectProxy)
 +            a = ObjectProxy(a).object_proxy::object;
 +            
 +        if (b is ObjectProxy)
 +            b = ObjectProxy(b).object_proxy::object;
 +		}
 +            
 +        var typeOfA:String = typeof(a);
 +        var typeOfB:String = typeof(b);
 +        
 +        var result:int = 0;
 +        
 +        if (typeOfA == typeOfB)
 +        {
 +            switch(typeOfA)
 +            {
 +                case "boolean":
 +                {
 +                    result = numericCompare(Number(a), Number(b));
 +                    break;
 +                }
 +                
 +                case "number":
 +                {
 +                    result = numericCompare(a as Number, b as Number);
 +                    break;
 +                }
 +                
 +                case "string":
 +                {
 +                    result = stringCompare(a as String, b as String);
 +                    break;
 +                }
 +                
 +                case "object":
 +                {
 +                    var newDepth:int = desiredDepth > 0 ? desiredDepth -1 : desiredDepth;
 +                    
 +                    // refs help us avoid circular reference infinite recursion.
 +                    var aRef:Object = getRef(a,refs);
 +                    var bRef:Object = getRef(b,refs);
 +                    
 +                    if (aRef == bRef)
 +                        return 0;
 +                    // the cool thing about our dictionary is that if 
 +                    // we've seen objects and determined that they are unequal, then
 +                    // we would've already exited out of this compare() call.  So the 
 +                    // only info in the dictionary are sets of equal items
 +                    
 +                    // let's first define them as equal
 +                    // this stops an "infinite loop" problem where A.i = B and B.i = A
 +                    // if we later find that an object (one of the subobjects) is in fact unequal, 
 +                    // then we will return false and quit out of everything.  These refs are thrown away
 +                    // so it doesn't matter if it's correct.
 +                    refs[bRef] = aRef;
 +                    
 +                    if (desiredDepth != -1 && (currentDepth > desiredDepth))
 +                    {
 +                        // once we try to go beyond the desired depth we should 
 +                        // toString() our way out
 +                        result = stringCompare(a.toString(), b.toString());
 +                    }
 +                    else if ((a is Array) && (b is Array))
 +                    {
 +                        result = arrayCompare(a as Array, b as Array, currentDepth, desiredDepth, refs);
 +                    }
 +                    else if ((a is Date) && (b is Date))
 +                    {
 +                        result = dateCompare(a as Date, b as Date);
 +                    }
 +                    else if ((a is IList) && (b is IList))
 +                    {
 +                        result = listCompare(a as IList, b as IList, currentDepth, desiredDepth, refs);
 +                    }
 +                    else if (areBothByteArrays(a, b))
 +                    {
-                         COMPILE::AS3
++                        COMPILE::SWF
 +                        {
 +                            result = byteArrayCompare(a as ByteArray, b as ByteArray);                                
 +                        }
 +                    }
 +                    else if (getQualifiedClassName(a) == getQualifiedClassName(b))
 +                    {
 +                        var aProps:Array = getClassInfo(a).properties;
 +                        var bProps:Array;
 +                        
 +                        // if the objects are dynamic they could have different 
 +                        // # of properties and should be treated on that basis first
 +                        var isObjectDynamic:Boolean = isDynamicObject(a);
 +                        
 +                        // if it's dynamic, check to see that they have all the same properties
 +                        if (isObjectDynamic)
 +                        {
 +                            bProps = getClassInfo(b).properties;
 +                            result = arrayCompare(aProps, bProps, currentDepth, newDepth, refs);
 +                            if (result != 0)
 +                                return result;
 +                        }
 +                        
 +                        // now that we know we have the same properties, let's compare the values
- 						COMPILE::AS3
++						COMPILE::SWF
 +						{
 +							var propName:QName;								
 +						}
 +						COMPILE::JS
 +						{
 +							var propName:String;								
 +						}
 +                        var aProp:Object;
 +                        var bProp:Object;
 +                        for (var i:int = 0; i < aProps.length; i++)
 +                        {
 +                            propName = aProps[i];
 +                            aProp = a[propName];
 +                            bProp = b[propName];
 +                            result = internalCompare(aProp, bProp, currentDepth+1, newDepth, refs);
 +                            if (result != 0)
 +                            {
 +                                return result;
 +                            }
 +                        }
 +                    }
 +                    else
 +                    {
 +                        // We must be unequal, so return 1
 +                        return 1;
 +                    }
 +                    break;
 +                }
 +            }
 +        }
 +        else // be consistent with the order we return here
 +        {
 +            return stringCompare(typeOfA, typeOfB);
 +        }
 +
 +        return result;
 +    }
 +    
 +    private static function isXMLNode(value:Object):Boolean
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            return (value is XMLNode);
 +        }
 +        COMPILE::JS
 +        {
 +            return false;
 +        }
 +    }
 +    
 +    private static function areBothByteArrays(a:Object, b:Object):Boolean
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            return (a is ByteArray) && (b is ByteArray)
 +        }
 +        COMPILE::JS
 +        {
 +            return false;
 +        }
 +    }
 +    /**
 +     *  Returns information about the class, and properties of the class, for
 +     *  the specified Object.
 +     *
 +     *  @param obj The Object to inspect.
 +     *
 +     *  @param excludes Array of Strings specifying the property names that should be
 +     *  excluded from the returned result. For example, you could specify 
 +     *  <code>["currentTarget", "target"]</code> for an Event object since these properties 
 +     *  can cause the returned result to become large.
 +     *
 +     *  @param options An Object containing one or more properties 
 +     *  that control the information returned by this method. 
 +     *  The properties include the following:
 +     *
 +     *  <ul>
 +     *    <li><code>includeReadOnly</code>: If <code>false</code>, 
 +     *      exclude Object properties that are read-only. 
 +     *      The default value is <code>true</code>.</li>
 +     *  <li><code>includeTransient</code>: If <code>false</code>, 
 +     *      exclude Object properties and variables that have <code>[Transient]</code> metadata.
 +     *      The default value is <code>true</code>.</li>
 +     *  <li><code>uris</code>: Array of Strings of all namespaces that should be included in the output.
 +     *      It does allow for a wildcard of "~~". 
 +     *      By default, it is null, meaning no namespaces should be included. 
 +     *      For example, you could specify <code>["mx_internal", "mx_object"]</code> 
 +     *      or <code>["~~"]</code>.</li>
 +     *  </ul>
 +     * 
 +     *  @return An Object containing the following properties:
 +     *  <ul>
 +     *    <li><code>name</code>: String containing the name of the class.</li>
 +     *    <li><code>properties</code>: Sorted list of the property names of the specified object,
 +     *    or references to the original key if the specified object is a Dictionary. The individual
 +     *    array elements are QName instances, which contain both the local name of the property as well as the URI.</li>
 +     *  </ul>
 +    *  
 +    *  @langversion 3.0
 +    *  @playerversion Flash 9
 +    *  @playerversion AIR 1.1
 +    *  @productversion Flex 3
 +    */
 +    public static function getClassInfo(obj:Object,
 +                                        excludes:Array = null,
 +                                        options:Object = null):Object
 +    {   
 +        var n:int;
 +        var i:int;
 +
 +		COMPILE::LATER
 +		{
 +        if (obj is ObjectProxy)
 +            obj = ObjectProxy(obj).object_proxy::object;
 +		}
 +		
 +        if (options == null)
 +            options = { includeReadOnly: true, uris: null, includeTransient: true };
 +
 +        var result:Object;
 +        var propertyNames:Array = [];
 +        var cacheKey:String;
 +
 +        var className:String;
 +        var classAlias:String;
 +		COMPILE::LATER
 +		{
 +        var properties:XMLList;
 +        var prop:XML;
 +		}
 +		var propertyList:Array;
 +        var isDynamic:Boolean = false;
 +        var metadataInfo:Object;
 +
 +        if (typeof(obj) == "xml")
 +        {
 +			COMPILE::LATER
 +			{
 +            className = "XML";
 +            properties = obj.text();
 +            if (properties.length())
 +                propertyNames.push("*");
 +            properties = obj.attributes();
 +			}
 +        }
 +        else
 +        {
 +            var classInfo:TypeDefinition = DescribeTypeCache.describeType(obj).typeDescription;
 +            className = classInfo.name;
 +			COMPILE::LATER
 +			{
 +            classAlias = classInfo.@alias.toString();
 +			}
 +            isDynamic = classInfo.dynamic;
 +
 +			propertyList.concat(classInfo.accessors);
 +			propertyList.concat(classInfo.variables);
 +			
 +			COMPILE::LATER
 +			{
 +            if (options.includeReadOnly)
 +                properties = classInfo..accessor.(@access != "writeonly") + classInfo..variable;
 +            else
 +                properties = classInfo..accessor.(@access == "readwrite") + classInfo..variable;
 +			}
 +			
 +            var numericIndex:Boolean = false;
 +        }
 +
 +        // If type is not dynamic, check our cache for class info...
 +        if (!isDynamic)
 +        {
 +            cacheKey = getCacheKey(obj, excludes, options);
 +            result = CLASS_INFO_CACHE[cacheKey];
 +            if (result != null)
 +                return result;
 +        }
 +
 +        result = {};
 +        result["name"] = className;
 +        result["alias"] = classAlias;
 +        result["properties"] = propertyNames;
 +        result["dynamic"] = isDynamic;
 +        result["metadata"] = metadataInfo = recordMetadata(propertyList);
 +        
 +        var excludeObject:Object = {};
 +        if (excludes)
 +        {
 +            n = excludes.length;
 +            for (i = 0; i < n; i++)
 +            {
 +                excludeObject[excludes[i]] = 1;
 +            }
 +        }
 +
 +        var isArray:Boolean = (obj is Array);
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        var isDict:Boolean  = (obj is Dictionary);
 +		}
 +		COMPILE::JS
 +		{
 +			var isDict:Boolean = false;
 +		}
 +
 +        if (isDict)
 +        {
 +            // dictionaries can have multiple keys of the same type,
 +            // (they can index by reference rather than QName, String, or number),
 +            // which cannot be looked up by QName, so use references to the actual key
 +            for (var key:* in obj)
 +            {
 +                propertyNames.push(key);
 +            }
 +        }
 +		else if (isDynamic)
 +        {
 +            for (var p:String in obj)
 +            {
 +                if (excludeObject[p] != 1)
 +                {
 +                    if (isArray)
 +                    {
 +                         var pi:Number = parseInt(p);
 +                         if (isNaN(pi))
 +                            propertyNames.push(new QName("", p));
 +                         else
 +                            propertyNames.push(pi);
 +                    }
 +                    else
 +                    {
 +                        propertyNames.push(new QName("", p));
 +                    }
 +                }
 +            }
 +            numericIndex = isArray && !isNaN(Number(p));
 +        }
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			var allDone:Boolean = isArray || isDict || className == "Object";
 +		}
 +		COMPILE::JS
 +		{
 +			var allDone:Boolean = isArray || className == "Object";
 +		}
 +		
 +        if (allDone)
 +        {
 +            // Do nothing since we've already got the dynamic members
 +        }
 +        else if (className == "XML")
 +        {
 +			COMPILE::LATER
 +			{
 +            n = properties.length();
 +            for (i = 0; i < n; i++)
 +            {
 +                p = properties[i].name();
 +                if (excludeObject[p] != 1)
 +                    propertyNames.push(new QName("", "@" + p));
 +            }
 +			}
 +        }
 +        else
 +        {
 +            n = propertyList.length;
 +            var uris:Array = options.uris;
 +            var uri:String;
 +			var qName:QName;					
 +            for (i = 0; i < n; i++)
 +            {
 +				var member:DefinitionWithMetaData = propertyList[i] as DefinitionWithMetaData;
 +                p = member.name;
 +				COMPILE::LATER
 +				{
 +                uri = prop.@uri.toString();
 +				}
 +				uri = "";
 +				
 +                if (excludeObject[p] == 1)
 +                    continue;
 +                    
 +                if (!options.includeTransient && internalHasMetadata(metadataInfo, p, "Transient"))
 +                    continue;
 +                
 +				if (uris != null)
 +				{
 +					COMPILE::LATER
 +					{
 +					if (uris.length == 1 && uris[0] == "*")
 +					{   
 +						qName = new QName(uri, p);
 +						try
 +						{
 +							obj[qName]; // access the property to ensure it is supported
 +							propertyNames.push();
 +						}
 +						catch(e:Error)
 +						{
 +							// don't keep property name 
 +						}
 +					}
 +					else
 +					{
 +						for (var j:int = 0; j < uris.length; j++)
 +						{
 +							uri = uris[j];
 +							if (prop.@uri.toString() == uri)
 +							{
 +								qName = new QName(uri, p);
 +								try
 +								{
 +									obj[qName];
 +									propertyNames.push(qName);
 +								}
 +								catch(e:Error)
 +								{
 +									// don't keep property name 
 +								}
 +							}
 +						}
 +					}
 +					}
 +				}
 +				else if (uri.length == 0)
 +				{
 +					qName = new QName(uri, p);
 +					try
 +					{
 +						obj[qName];
 +						propertyNames.push(qName);
 +					}
 +					catch(e:Error)
 +					{
 +						// don't keep property name 
 +					}
 +				}
 +            }
 +        }
 +
 +        propertyNames.sort(Array.CASEINSENSITIVE |
 +                           (numericIndex ? Array.NUMERIC : 0));
 +
 +        // dictionary keys can be indexed by an object reference
 +        // there's a possibility that two keys will have the same toString()
 +        // so we don't want to remove dupes
 +        if (!isDict)
 +        {
 +            // for Arrays, etc., on the other hand...
 +            // remove any duplicates, i.e. any items that can't be distingushed by toString()
 +            for (i = 0; i < propertyNames.length - 1; i++)
 +            {
 +                // the list is sorted so any duplicates should be adjacent
 +                // two properties are only equal if both the uri and local name are identical
 +                if (propertyNames[i].toString() == propertyNames[i + 1].toString())
 +                {
 +                    propertyNames.splice(i, 1);
 +                    i--; // back up
 +                }
 +            }
 +        }
 +
 +        // For normal, non-dynamic classes we cache the class info
 +		// Don't cache XML as it can be dynamic
 +        if (!isDynamic && className != "XML")
 +        {
 +            cacheKey = getCacheKey(obj, excludes, options);
 +            CLASS_INFO_CACHE[cacheKey] = result;
 +        }
 +
 +        return result;
 +    }
 +
 +    /**
 +     * Uses <code>getClassInfo</code> and examines the metadata information to
 +     * determine whether a property on a given object has the specified 
 +     * metadata.
 +     * 
 +     * @param obj The object holding the property.
 +     * @param propName The property to check for metadata.
 +     * @param metadataName The name of the metadata to check on the property.
 +     * @param excludes If any properties need to be excluded when generating class info. (Optional)
 +     * @param options If any options flags need to changed when generating class info. (Optional)
 +     * @return true if the property has the specified metadata.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function hasMetadata(obj:Object, 
 +                propName:String, 
 +                metadataName:String, 
 +                excludes:Array = null,
 +                options:Object = null):Boolean
 +    {
 +        var classInfo:Object = getClassInfo(obj, excludes, options);
 +        var metadataInfo:Object = classInfo["metadata"];
 +        return internalHasMetadata(metadataInfo, propName, metadataName);
 +    }
 +
 +    /**
 +     *  Returns <code>true</code> if the object is an instance of a dynamic class.
 +     *
 +     *  @param obj The object.
 +     *
 +     *  @return <code>true</code> if the object is an instance of a dynamic class.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function isDynamicObject(obj:Object):Boolean
 +    {
 +        try
 +        {
 +            // this test for checking whether an object is dynamic or not is 
 +            // pretty hacky, but it assumes that no-one actually has a 
 +            // property defined called "wootHackwoot"
 +            obj["wootHackwoot"];
 +        }
 +        catch (e:Error)
 +        {
 +            // our object isn't from a dynamic class
 +            return false;
 +        }
 +        return true;
 +    }
 +
 +    /**
 +     *  Returns the value at the end of the property chain <code>path</code>.
 +     *  If the value cannot be reached due to null links on the chain,
 +     *  <code>undefined</code> is returned.
 +     *
 +     *  @param obj The object at the beginning of the property chain
 +     *  @param path The path to inspect (e.g. "address.street")
 +     *
 +     *  @return the value at the end of the property chain, <code>undefined</code>
 +     *  if it cannot be reached, or the object itself when <code>path</code> is empty.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function getValue(obj:Object, path:Array):*
 +    {
 +        if(!obj)
 +            return undefined;
 +
 +        if(!path || !path.length)
 +            return obj;
 +
 +        var result:* = obj;
 +        var i:int = -1;
 +        while(++i < path.length && result)
 +            result = result.hasOwnProperty(path[i]) ? result[path[i]] : undefined;
 +
 +        return result;
 +    }
 +
 +
 +    /**
 +     *  Sets a new value at the end of the property chain <code>path</code>.
 +     *  If the value cannot be reached due to null links on the chain,
 +     *  <code>false</code> is returned.
 +     *
 +     *  @param obj The object at the beginning of the property chain
 +     *  @param path The path to traverse (e.g. "address.street")
 +     *  @param newValue The value to set (e.g. "Fleet Street")
 +     *
 +     *  @return <code>true</code> if the value is successfully set,
 +     *  <code>false</code> otherwise. Note that the function does not
 +     *  use a try/catch block. You can implement one in the calling
 +     *  function if there's a risk of type mismatch or other errors during
 +     *  the assignment.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function setValue(obj:Object, path:Array, newValue:*):Boolean
 +    {
 +        if(!obj || !path || !path.length)
 +            return false;
 +
 +        var secondToLastLink:* = getValue(obj, path.slice(0, -1));
 +        if(secondToLastLink && secondToLastLink.hasOwnProperty(path[path.length - 1]))
 +        {
 +            secondToLastLink[path[path.length - 1]] = newValue;
 +            return true;
 +        }
 +
 +        return false;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private static function internalHasMetadata(metadataInfo:Object, propName:String, metadataName:String):Boolean
 +    {
 +        if (metadataInfo != null)
 +        {
 +            var metadata:Object = metadataInfo[propName];
 +            if (metadata != null)
 +            {
 +                if (metadata[metadataName] != null)
 +                    return true;
 +            }
 +        }
 +        return false;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private static function recordMetadata(properties:Array):Object
 +    {
 +        var result:Object = null;
 +
 +        try
 +        {
 +            for each (var prop:DefinitionWithMetaData in properties)
 +            {
 +                var propName:String = prop.name;
 +                var metadataList:Array = prop.metadata;
 +
 +                if (metadataList.length > 0)
 +                {
 +                    if (result == null)
 +                        result = {};
 +
 +                    var metadata:Object = {};
 +                    result[propName] = metadata;
 +
 +                    for each (var md:MetaDataDefinition in metadataList)
 +                    {
 +                        var mdName:String = md.name;
 +                        
 +                        var argsList:Array = md.args;
 +                        var value:Object = {};
 +
 +                        for each (var arg:MetaDataArgDefinition in argsList)
 +                        {
 +                            var argKey:String = arg.name;
 +                            if (argKey != null)
 +                            {
 +                                var argValue:String = arg.value;
 +                                value[argKey] = argValue;
 +                            }
 +                        }
 +
 +                        var existing:Object = metadata[mdName];
 +                        if (existing != null)
 +                        {
 +                            var existingArray:Array;
 +                            if (existing is Array)
 +                                existingArray = existing as Array;
 +                            else
 +                            {
 +                                existingArray = [existing];
 +                                delete metadata[mdName];
 +                            }
 +                            existingArray.push(value);
 +                            existing = existingArray;
 +                        }
 +                        else
 +                        {
 +                            existing = value;
 +                        }
 +                        metadata[mdName] = existing;
 +                    }
 +                }
 +            }
 +        }
 +        catch(e:Error)
 +        {
 +        }
 +        
 +        return result;
 +    }
 +
 +
 +    /**
 +     *  @private
 +     */
 +    private static function getCacheKey(o:Object, excludes:Array = null, options:Object = null):String
 +    {
 +        var key:String = getQualifiedClassName(o);
 +		
 +        if (excludes != null)
 +        {
 +			var length:int = excludes.length;
 +            for (var i:uint = 0; i < length; i++)
 +            {
 +                var excl:String = excludes[i] as String;
 +                if (excl != null)
 +                    key += excl;
 +            }
 +        }
 +
 +        if (options != null)
 +        {
 +            for (var flag:String in options)
 +            {
 +                key += flag;
 +				var value:String = options[flag];
 +				if (value != null)
 +					key += value.toString();
 +			}
 +        }
 +        return key;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private static function arrayCompare(a:Array, b:Array,
 +                                         currentDepth:int, desiredDepth:int,
 +                                         refs:CircularReferenceManager):int
 +    {
 +        var result:int = 0;
 +
 +        if (a.length != b.length)
 +        {
 +            if (a.length < b.length)
 +                result = -1;
 +            else
 +                result = 1;
 +        }
 +        else
 +        {
 +            var key:Object;
 +            for (key in a)
 +            {
 +                if (b.hasOwnProperty(key))
 +                {
 +                    result = internalCompare(a[key], b[key], currentDepth,
 +                                         desiredDepth, refs);
 +
 +                    if (result != 0)
 +                        return result;
 +                }
 +                else
 +                {
 +                    return -1;
 +                }
 +            }
 +
 +            for (key in b)
 +            {
 +                if (!a.hasOwnProperty(key))
 +                {
 +                    return 1;
 +                }
 +            }
 +        }
 +
 +        return result;
 +    }
 +    
 +    /**
 +     * @private
 +     */
-     COMPILE::AS3
++    COMPILE::SWF
 +    private static function byteArrayCompare(a:ByteArray, b:ByteArray):int
 +    {
 +        var result:int = 0;
 +        
 +        if (a == b)
 +            return result;
 +            
 +        if (a.length != b.length)
 +        {
 +            if (a.length < b.length)
 +                result = -1;
 +            else
 +                result = 1;
 +        }
 +        else
 +        {
 +            for (var i:int = 0; i < a.length; i++)
 +            {
 +                result = numericCompare(a[i], b[i]);
 +                if (result != 0)
 +                {
 +                    i = a.length;
 +                }
 +            }
 +        }
 +        return result;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private static function listCompare(a:IList, b:IList, currentDepth:int, 
 +                                        desiredDepth:int, refs:CircularReferenceManager):int
 +    {
 +        var result:int = 0;
 +
 +        if (a.length != b.length)
 +        {
 +            if (a.length < b.length)
 +                result = -1;
 +            else
 +                result = 1;
 +        }
 +        else
 +        {
 +            for (var i:int = 0; i < a.length; i++)
 +            {
 +                result = internalCompare(a.getItemAt(i), b.getItemAt(i), 
 +                                         currentDepth+1, desiredDepth, refs);
 +                if (result != 0)
 +                {
 +                    i = a.length;
 +                }
 +            }
 +        }
 +
 +        return result;
 +    }
 +    
 +    /**
 +     * @private
 +     * This is the "find" for our union-find algorithm when doing object searches.
 +     * The dictionary keeps track of sets of equal objects
 +     */
 +    private static function getRef(o:Object, refs:CircularReferenceManager):Object
 +    {
 +        var oRef:Object = refs[o]; 
 +        while (oRef && oRef != refs[oRef])
 +        {
 +            oRef = refs[oRef];
 +        }
 +        if (!oRef)
 +            oRef = o;
 +        if (oRef != refs[o])
 +            refs[o] = oRef;
 +        
 +        return oRef;
 +    }
 +    
 +    /**
 +     * @private
 +     */
 +    private static var refCount:int = 0;
 +
 +    /**
 +     * @private
 +     */ 
 +    private static var CLASS_INFO_CACHE:Object = {};
 +}
 +
 +}
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +    import flash.utils.Dictionary;
 +}
 +
 +class CircularReferenceManager
 +{
-     COMPILE::AS3
++    COMPILE::SWF
 +    private var dict:Dictionary = new Dictionary(true);
 +    
 +    COMPILE::JS
 +    private var array:Array = [];
 +    
 +    public function CircularReferenceManager()
 +    {    
 +    }
 +    
 +    public function put(obj:Object):void
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            dict[obj] = 1;
 +        }
 +        COMPILE::JS
 +        {
 +            array.push(obj);
 +        }
 +    }
 +    
 +    public function contains(obj:Object):Boolean
 +    {
-         COMPILE::AS3
++        COMPILE::SWF
 +        {
 +            return (dict[obj] == 1);
 +        }
 +        COMPILE::JS
 +        {
 +            return array.indexOf(obj) != -1;
 +        }
 +    }
 +        
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/OnDemandEventDispatcher.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/OnDemandEventDispatcher.as
index 013d4bd,0000000..57b3498
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/OnDemandEventDispatcher.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/OnDemandEventDispatcher.as
@@@ -1,169 -1,0 +1,169 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.events.Event;	
 +}
 +COMPILE::JS
 +{
 +	import org.apache.flex.events.Event;	
 +}
 +    import org.apache.flex.events.IEventDispatcher;
 +    import org.apache.flex.events.EventDispatcher;
 +
 +    /**
 +     * OnDemandEventDispatcher serves as a base class for classes that dispatch events but expect listeners
 +     * to be infrequent.  When a class extends OnDemandEventDispatcher instead of the standard EventDispatcher,
 +     * it is trading off a small overhead on every single instance for a slightly larger overhead on only the instances
 +     * that actually have listeners attached to them.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public class OnDemandEventDispatcher implements IEventDispatcher
 +    {
 +        private var _dispatcher:EventDispatcher;
 +    
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +        /**
 +         * Constructor.
 +         *  
 +         *  @langversion 3.0
 +         *  @playerversion Flash 9
 +         *  @playerversion AIR 1.1
 +         *  @productversion Flex 3
 +         */
 +        public function OnDemandEventDispatcher()
 +        {
 +        }
 +
 +        /**
 +         *  @inheritDoc
 +         *  
 +         *  @langversion 3.0
 +         *  @playerversion Flash 9
 +         *  @playerversion AIR 1.1
 +         *  @productversion Flex 3
 +         */
- 		COMPILE::AS3
++		COMPILE::SWF
 +        public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
 +        {
 +            if (_dispatcher == null)
 +            {
 +                _dispatcher = new EventDispatcher(this);
 +            }
 +            _dispatcher.addEventListener(type,listener,useCapture,priority,useWeakReference); 
 +        }
 +		COMPILE::JS
 +		public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, handlerScope:Object = null):void
 +		{
 +			if (_dispatcher == null)
 +			{
 +				_dispatcher = new EventDispatcher(this);
 +			}
 +			_dispatcher.addEventListener(type,listener,useCapture); 
 +		}
 +        
 +            
 +        /**
 +         *  @inheritDoc
 +         *  
 +         *  @langversion 3.0
 +         *  @playerversion Flash 9
 +         *  @playerversion AIR 1.1
 +         *  @productversion Flex 3
 +         */
- 		COMPILE::AS3
++		COMPILE::SWF
 +        public function dispatchEvent(event:Event):Boolean
 +        {
 +            if (_dispatcher != null)
 +                return _dispatcher.dispatchEvent(event);
 +            return true; 
 +        }
 +		COMPILE::JS
 +		public function dispatchEvent(event:Object):Boolean
 +		{
 +			if (_dispatcher != null)
 +				return _dispatcher.dispatchEvent(event);
 +			return true; 
 +		}
 +    
 +        /**
 +         *  @inheritDoc
 +         *  
 +         *  @langversion 3.0
 +         *  @playerversion Flash 9
 +         *  @playerversion AIR 1.1
 +         *  @productversion Flex 3
 +         */
 +        public function hasEventListener(type:String):Boolean
 +        {
 +            if (_dispatcher != null)
 +                return _dispatcher.hasEventListener(type);
 +            return false; 
 +        }
 +            
 +        /**
 +         *  @inheritDoc
 +         *  
 +         *  @langversion 3.0
 +         *  @playerversion Flash 9
 +         *  @playerversion AIR 1.1
 +         *  @productversion Flex 3
 +         */
- 		COMPILE::AS3
++		COMPILE::SWF
 +        public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
 +        {
 +            if (_dispatcher != null)
 +                _dispatcher.removeEventListener(type,listener,useCapture);         
 +        }
 +		COMPILE::JS
 +		public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false, handlerScope:Object = null):void
 +		{
 +			if (_dispatcher != null)
 +				_dispatcher.removeEventListener(type,listener,useCapture);         
 +		}
 +    
 +        /**
 +         *  @inheritDoc
 +         *  
 +         *  @langversion 3.0
 +         *  @playerversion Flash 9
 +         *  @playerversion AIR 1.1
 +         *  @productversion Flex 3
 +         */
- 		COMPILE::AS3
++		COMPILE::SWF
 +        public function willTrigger(type:String):Boolean
 +        {
 +            if (_dispatcher != null)
 +                return _dispatcher.willTrigger(type);
 +            return false; 
 +        }
 +
 +    }
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
index f1e05cb,0000000..b20c30e
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
@@@ -1,355 -1,0 +1,355 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
 +import org.apache.flex.utils.Proxy;
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.utils.flash_proxy;
 +import mx.utils.object_proxy;
 +
 +use namespace flash_proxy;
 +use namespace object_proxy;
 +}
 +
 +/**
 + *  OrderedObject acts as a wrapper to Object to preserve the ordering of the
 + *  properties as they are added. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */ 
 +public dynamic class OrderedObject extends Proxy
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     * Constructor.
 +     *
 +     * @param item An Object containing name/value pairs.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function OrderedObject(item:Object=null)
 +    {
 +        super();
 +
 +        propertyList = [];                                
 +    }    
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Contains a list of all of the property names for the proxied object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    object_proxy var propertyList:Array;
 +	COMPILE::JS
 +	protected var propertyList:Array;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     * 
 +     *  Work around for the Flash Player bug #232854. The Proxy bug occurs when 
 +     *  the Proxy class is used in a sibling ApplicationDomain of the main 
 +     *  application's ApplicationDomain. When the Proxy class is used in a 
 +     *  sibling ApplicationDomain the RTE looks like this:
 +     * 
 +     *  ArgumentError: Error #1063: Argument count mismatch on 
 +     *  Object/http://adobe.com/AS3/2006/builtin::hasOwnProperty(). 
 +     *  Expected 0, got 2. 
 +     * 
 +     *  Returns the specified property value of the proxied object.
 +     *
 +     *  @param name Typically a string containing the name of the property, or
 +     *  possibly a QName where the property name is found by inspecting the
 +     *  <code>localName</code> property.
 +     *
 +     *  @return The value of the property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    object_proxy function getObjectProperty(name:*):*
 +    {
 +        return getProperty(name);
 +    }
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  Work around for the Flash Player bug #232854. See the comments in 
 +     *  getObjectProperty() for more details.
 +     * 
 +     *  Call this method to set a property value instead of hashing into an 
 +     *  OrderObject which would end up calling setProperty().
 +     *
 +     *  Updates the specified property on the proxied object.
 +     *
 +     *  @param name Object containing the name of the property that should be
 +     *  updated on the proxied object.
 +     *
 +     *  @param value Value that should be set on the proxied object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    object_proxy function setObjectProperty(name:*, value:*):void
 +    {
 +        setProperty(name, value);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Deletes the specified property on the proxied object.
 +     * 
 +     *  @param name Typically a string containing the name of the property,
 +     *  or possibly a QName where the property name is found by 
 +     *  inspecting the <code>localName</code> property.
 +     *
 +     *  @return A Boolean indicating if the property was deleted.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function deleteProperty(name:*):Boolean
 +    {
 +        var deleted:Boolean = delete valueMap[name]; 
 +        
 +        var deleteIndex:int = -1;
 +        for (var i:int = 0; i < propertyList.length; i++)
 +        {
 +            if (propertyList[i] == name)
 +            {
 +                deleteIndex = i;
 +                break;
 +            }
 +        }
 +        if (deleteIndex > -1)
 +        {
 +            propertyList.splice(deleteIndex, 1);
 +        }
 +                
 +        return deleted;
 +    }
 +
 +	/**
 +	 *  Deletes the specified property on the proxied object.
 +	 * 
 +	 *  @param name Typically a string containing the name of the property,
 +	 *  or possibly a QName where the property name is found by 
 +	 *  inspecting the <code>localName</code> property.
 +	 *
 +	 *  @return A Boolean indicating if the property was deleted.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	COMPILE::JS
 +	override public function deleteProperty(name:String):Boolean
 +	{
 +		var deleted:Boolean = delete valueMap[name]; 
 +		
 +		var deleteIndex:int = -1;
 +		for (var i:int = 0; i < propertyList.length; i++)
 +		{
 +			if (propertyList[i] == name)
 +			{
 +				deleteIndex = i;
 +				break;
 +			}
 +		}
 +		if (deleteIndex > -1)
 +		{
 +			propertyList.splice(deleteIndex, 1);
 +		}
 +		
 +		return deleted;
 +	}
 +	
 +    /**
 +     *  This is an internal function that must be implemented by a subclass of
 +     *  flash.utils.Proxy.
 +     *  
 +     *  @param name The property name that should be tested for existence.
 +     *
 +     *  @return If the property exists, <code>true</code>; otherwise
 +     *  <code>false</code>.
 +     *
 +     *  @see flash.utils.Proxy#hasProperty()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function hasProperty(name:*):Boolean
 +    {
 +        return(name in valueMap);
 +    }
 +	COMPILE::JS
 +	override public function hasProperty(name:String):Boolean
 +	{
 +		return(name in valueMap);
 +	}
 +
 +    /**
 +     *  This is an internal function that must be implemented by a subclass of
 +     *  flash.utils.Proxy.
 +     *
 +     *  @param index The zero-based index value of the object's property.
 +     *
 +     *  @return The property's name.
 +     *
 +     *  @see flash.utils.Proxy#nextName()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function nextName(index:int):String
 +    {
 +        return propertyList[index -1];
 +    }
 +	COMPILE::JS
 +	override public function elementNames():Array
 +	{
 +		return propertyList.slice();
 +	}
 +
 +    /**
 +     *  This is an internal function that must be implemented by a subclass of
 +     *  flash.utils.Proxy.
 +     *
 +     *  @param index The zero-based index value of the object's property.
 +     *
 +     *  @return The property's value.
 +     *
 +     *  @see flash.utils.Proxy#nextValue()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function nextValue(index:int):*
 +    {
 +        return valueMap[propertyList[index -1]];
 +    }
 +
 +    /**
 +     *  Updates the specified property on the proxied object.
 +     *
 +     *  @param name Object containing the name of the property that should be
 +     *  updated on the proxied object.
 +     *
 +     *  @param value Value that should be set on the proxied object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function setProperty(name:*, value:*):void
 +    {
 +        var oldVal:* = valueMap[name];
 +        if (oldVal !== value)
 +        {
 +            // Update item.
 +			valueMap[name] = value;
 +            
 +            for (var i:int = 0; i < propertyList.length; i++)
 +            {
 +                if (propertyList[i] == name)
 +                {
 +                    return;
 +                }
 +            }
 +            propertyList.push(name);
 +        }
 +    }               
 +	COMPILE::JS
 +	override public function setProperty(name:String, value:*):void
 +	{
 +		var oldVal:* = valueMap[name];
 +		if (oldVal !== value)
 +		{
 +			// Update item.
 +			valueMap[name] = value;
 +			
 +			for (var i:int = 0; i < propertyList.length; i++)
 +			{
 +				if (propertyList[i] == name)
 +				{
 +					return;
 +				}
 +			}
 +			propertyList.push(name);
 +		}
 +	}               
 +
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
index e954380,0000000..2fb50eb
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
@@@ -1,344 -1,0 +1,344 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.system.Capabilities;	
 +}
 +import org.apache.flex.utils.Platform;
 +import org.apache.flex.reflection.getDefinitionByName;
 +
 +/**
 + *  The Platform utility class contains several static methods to check what
 + *  desktop or mobile platform the application is running on.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.0
 + *  @productversion Flex 4.12
 + */
 +public class Platform
 +{
 +    include "../core/Version.as";
 +
 +	protected static var _initialized:Boolean;
 +	protected static var _isAndroid:Boolean;
 +	protected static var _isIOS:Boolean;
 +	protected static var _isIPad:Boolean;
 +	protected static var _isBlackBerry:Boolean;
 +	protected static var _isMobile:Boolean;
 +	protected static var _isMac:Boolean;
 +	protected static var _isWindows:Boolean;
 +	protected static var _isLinux:Boolean;
 +	protected static var _isDesktop:Boolean;
 +	protected static var _isBrowser:Boolean;
 +	protected static var _isAir:Boolean;
 +    private static var _osVersion: String = null;
 +
 +	/**
 +	 * This value is set from AndroidPlatformVersionOverride
 +	 * 
 +	 */
 +	mx_internal static var androidVersionOverride:String;
 +
 +	/**
 +	 * This value is set from IOSPlatformVersionOverride
 +	 * 
 +	 */
 +	mx_internal static var iosVersionOverride:String;
 +	
 +	/**
 +	 *  Returns true if the application is running on IOS.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isIOS():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isIOS;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on an iPad.
 +	 *  Note this returns false in the AIR mobile device simulator.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isIPad():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isIPad;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on a BlackBerry.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isBlackBerry():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isBlackBerry;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on Android.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isAndroid():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isAndroid;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on Windows.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isWindows():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isWindows;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on a Mac.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isMac():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isMac;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on Linux.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isLinux():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isLinux;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on a Desktop OS.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isDesktop():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isDesktop;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on a Mobile device.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isMobile():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isMobile;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running on a desktop AIR.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isAir():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isAir;
 +	}
 +	
 +	/**
 +	 *  Returns true if the application is running in a browser.
 +	 *
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 2.0
 +	 *  @productversion Flex 4.12
 +	 */
 +	public static function get isBrowser():Boolean
 +	{
 +		getPlatforms();
 +		
 +		return _isBrowser;
 +	}
 +
 +    /**
 +     *  Returns the version of the OS the application  is running on
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 2.0
 +     *  @productversion Flex 4.13
 +     */
 +    public static function get osVersion(): String
 +    {
 +        //We needed to compute _osVersion later than getPlatforms, because it relies on resources that  ready later
 +        if (_osVersion == null){
 +			if(mx_internal::androidVersionOverride == null && mx_internal::iosVersionOverride == null)
 +			{
 +				_osVersion = computeOSVersionString();	
 +			}
 +			else if(mx_internal::androidVersionOverride != null)
 +			{
 +				_osVersion = mx_internal::androidVersionOverride; 
 +			}
 +			else if(mx_internal::iosVersionOverride != null)
 +			{
 +				_osVersion = mx_internal::iosVersionOverride; 
 +			}
 +        }
 +        return _osVersion;
 +    }
 +
 +    /* Notes on Capabilities.os for mobile apps:
 +        - on ADL => returns the OS where the ADL is running ( eg. Windows 7, or Mac OS )
 +         - on device => returns the OS of the device (eg.  iPhone OS ...  for iOS devices  )
 +    * */
 +	protected static function getPlatforms():void {
 +		if (!_initialized)
 +		{
 +			var p:String = org.apache.flex.utils.Platform.platform;
 +
 +			_isAndroid = p == org.apache.flex.utils.Platform.ANDROID;
 +			_isIOS = p == org.apache.flex.utils.Platform.IOS;
 +			_isBlackBerry = p == org.apache.flex.utils.Platform.BLACKBERRY;
 +			_isMobile = _isAndroid || _isIOS || _isBlackBerry;
 +			
 +			_isMac = p == org.apache.flex.utils.Platform.MAC;
 +			_isWindows = p == org.apache.flex.utils.Platform.WINDOWS;
 +			_isLinux = p == org.apache.flex.utils.Platform.LINUX; // note that Android is also Linux
 +			_isIPad = org.apache.flex.utils.Platform.isIPad;
 +			_isDesktop = !_isMobile;
 +			
 +			_isAir = org.apache.flex.utils.Platform.isAir;
 +			_isBrowser = org.apache.flex.utils.Platform.isBrowser;
 +			
 +			_initialized = true;
 +		}
 +	}
 +
 +    /** @private
 +     * extract OS version information from Capabilities.os
 +     * os is typically a non-numeric string (such as Windows,  iPhone OS, Android, etc...)  followed by a number sequence.
 +     * if no number is found, OS version is set to 0.
 +     * os on ADL will return the host OS and not the device OS.
 +     *
 +     * That's why we need to check for a specific sequence for iOS and Android.
 +     * On Android, os  is the Linux kernel version (such as Linux 3.4.34-1790463).
 +     * So the version information must be  retrieved from an internal file.
 +     * Since reading files API is only available on AIR, it's delegated to PlatformMobileHelper  in mobilecomponents.swc
 +     * @see   spark.utils.PlatformMobileHelper
 +     *
 +     * @return version number string, or empty string if could not retrieve the version.
 +     * */
 +    private static function computeOSVersionString(): String
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        var os: String = Capabilities.os;
 +        var osVersionMatch: Array;
 +        var version: String = "";
 +
 +        if (isIOS) {
 +            osVersionMatch = os.match(/iPhone OS\s([\d\.]+)/);
 +            if (osVersionMatch && osVersionMatch.length == 2)
 +                version = osVersionMatch[1];
 +        }
 +        else if (isAndroid) {
 +            try {
 +                var mobileHelperClass: Class = Class(getDefinitionByName("spark.utils::PlatformMobileHelper"));
 +                if (mobileHelperClass != null) {
 +                    version = mobileHelperClass["computeOSVersionForAndroid"]();
 +                }
 +            }
 +            catch (e: Error) {
 +                trace("Error: " + e.message);
 +            }
 +        }
 +        else {
 +            //on  other OS, extract version
 +            osVersionMatch = os.match(/[A-Za-z\s]+([\d\.]+)/);
 +            if (osVersionMatch && osVersionMatch.length == 2)
 +                version = osVersionMatch[1];
 +        }
 +        return version;
 +		}
 +		COMPILE::JS
 +		{
 +			// TODO (aharui): Do something better someday?
 +			return "0";
 +		}
 +    }
 +
 +}
 +}


[34/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
index 4a81a62,0000000..b54bc51
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
@@@ -1,4073 -1,0 +1,4073 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;
 +	import flash.display.Graphics;
 +	import flash.display.MovieClip;
 +	import flash.display.Sprite;
 +	import flash.display.LoaderInfo;
 +	import flash.display.Loader;
 +	import flash.display.Stage;
 +	import flash.display.StageAlign;
 +	import flash.display.StageQuality;
 +	import flash.display.StageScaleMode;
 +	import flash.events.Event;
 +	import flash.events.EventPhase;
 +	import flash.events.FocusEvent;
 +	import flash.events.KeyboardEvent;
 +	import flash.events.MouseEvent;
 +	import flash.events.TimerEvent;
 +	import flash.ui.Keyboard;
 +	import flash.geom.Point;
 +	import flash.system.ApplicationDomain;
 +	import flash.text.Font;
 +	import flash.text.TextFormat;
 +	import flash.utils.Dictionary;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;
 +	import flex.display.Graphics;
 +	import flex.display.MovieClip;
 +	import flex.display.Sprite;
 +	import flex.events.Event;
 +	import flex.events.EventPhase;
 +	import flex.ui.Keyboard;
 +	
 +	import org.apache.flex.events.MouseEvent;
 +	import org.apache.flex.geom.Point;
 +}
 +import org.apache.flex.utils.Timer;
 +import flex.system.DefinitionManager;
 +import org.apache.flex.reflection.getQualifiedClassName;
 +
 +import mx.core.IChildList;
 +import mx.core.IFlexDisplayObject;
 +import mx.core.IFlexModuleFactory;
 +import mx.core.IInvalidating;
 +import mx.core.IRawChildrenContainer;
 +import mx.core.IUIComponent;
 +COMPILE::LATER
 +{
 +import mx.core.RSLData;
 +import mx.core.RSLItem;
 +}
 +import mx.core.Singleton;
 +import mx.core.mx_internal;
 +import mx.events.DynamicEvent;
 +import mx.events.FlexEvent;
 +COMPILE::LATER
 +{	
 +import mx.events.RSLEvent;
 +import mx.events.Request;
 +import mx.events.SandboxMouseEvent;
 +}
 +import mx.preloaders.Preloader;
 +import mx.utils.DensityUtil;
 +COMPILE::LATER
 +{
 +import mx.utils.LoaderUtil;
 +}
 +import flex.display.ModuleInfo;
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flex.display.TopOfDisplayList;
 +}
 +COMPILE::LATER
 +{
 +
 +import org.apache.flex.core.UIBase;
 +}
 +import org.apache.flex.events.EventDispatcher;
 +import org.apache.flex.events.IEventDispatcher;
 +import org.apache.flex.geom.Rectangle;
 +import org.apache.flex.core.IFlexJSElement;
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import org.apache.flex.core.IBeadView;
 +import org.apache.flex.core.IBead;
 +import org.apache.flex.core.IBeadModel
 +};
 +
 +// NOTE: Minimize the non-Flash classes you import here.
 +// Any dependencies of SystemManager have to load in frame 1,
 +// before the preloader, or anything else, can be displayed.
 +
 +use namespace mx_internal;
 +
 +//--------------------------------------
 +//  Events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched when the application has finished initializing
 + *
 + *  @eventType mx.events.FlexEvent.APPLICATION_COMPLETE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="applicationComplete", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched every 100 milliseconds when there has been no keyboard
 + *  or mouse activity for 1 second.
 + *
 + *  @eventType mx.events.FlexEvent.IDLE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="idle", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when the Stage is resized.
 + *
 + *  @eventType flash.events.Event.RESIZE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="resize", type="flash.events.Event")]
 +
 +/**
 + *  The SystemManager class manages an application window.
 + *  Every application that runs on the desktop or in a browser
 + *  has an area where the visuals of the application are 
 + *  displayed.  
 + *  It may be a window in the operating system
 + *  or an area within the browser.  That area is an application window
 + *  and different from an instance of <code>mx.core.Application</code>, which
 + *  is the main, or top-level, window within an application.
 + *
 + *  <p>Every application has a SystemManager.  
 + *  The SystemManager sends an event if
 + *  the size of the application window changes (you cannot change it from
 + *  within the application, but only through interaction with the operating
 + *  system window or browser).  It parents all displayable things within the
 + *  application like the main mx.core.Application instance and all popups, 
 + *  tooltips, cursors, and so on.  Any object parented by the SystemManager is
 + *  considered to be a top-level window, even tooltips and cursors.</p>
 + *
 + *  <p>The SystemManager also switches focus between top-level windows if there 
 + *  are more than one IFocusManagerContainer displayed and users are interacting
 + *  with components within the IFocusManagerContainers.  </p>
 + *
 + *  <p>All keyboard and mouse activity that is not expressly trapped is seen by
 + *  the SystemManager, making it a good place to monitor activity should you need
 + *  to do so.</p>
 + *
 + *  <p>If an application is loaded into another application, a SystemManager
 + *  will still be created, but will not manage an application window,
 + *  depending on security and domain rules.
 + *  Instead, it will be the <code>content</code> of the <code>Loader</code> 
 + *  that loaded it and simply serve as the parent of the sub-application</p>
 + *
 + *  <p>The SystemManager maintains multiple lists of children, one each for tooltips, cursors,
 + *  popup windows.  This is how it ensures that popup windows "float" above the main
 + *  application windows and that tooltips "float" above that and cursors above that.
 + *  If you simply examine the <code>numChildren</code> property or 
 + *  call the <code>getChildAt()</code> method on the SystemManager, you are accessing
 + *  the main application window and any other windows that aren't popped up.  To get the list
 + *  of all windows, including popups, tooltips and cursors, use 
 + *  the <code>rawChildren</code> property.</p>
 + *
 + *  <p>The SystemManager is the first display class created within an application.
 + *  It is responsible for creating an <code>mx.preloaders.Preloader</code> that displays and
 + *  <code>mx.preloaders.SparkDownloadProgressBar</code> while the application finishes loading,
 + *  then creates the <code>mx.core.Application</code> instance.</p>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class SystemManager extends MovieClip
 +                           implements IChildList, IFlexDisplayObject,
 +                           IFlexModuleFactory, ISystemManager
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  The number of milliseconds that must pass without any user activity
 +     *  before SystemManager starts dispatching 'idle' events.
 +     */
 +    private static const IDLE_THRESHOLD:Number = 1000;
 +
 +    /**
 +     *  @private
 +     *  The number of milliseconds between each 'idle' event.
 +     */
 +    private static const IDLE_INTERVAL:Number = 100;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  An array of SystemManager instances loaded as child app domains
 +     */
 +	COMPILE::LATER
 +    mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  <p>This is the starting point for all Flex applications.
 +     *  This class is set to be the root class of a Flex SWF file.
 +         *  Flash Player instantiates an instance of this class,
 +     *  causing this constructor to be called.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function SystemManager()
 +    {
 +        CONFIG::performanceInstrumentation
 +        {
 +            var perfUtil:mx.utils.PerfUtil = mx.utils.PerfUtil.getInstance();
 +            perfUtil.startSampling("Application Startup", true /*absoluteTime*/);
 +            perfUtil.markTime("SystemManager c-tor");
 +        }
 +
 +        super();
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			// Loaded SWFs don't get a stage right away
 +			// and shouldn't override the main SWF's setting anyway.
 +			if (stage)
 +			{
 +				stage.scaleMode = StageScaleMode.NO_SCALE;
 +				stage.align = StageAlign.TOP_LEFT;
 +				stage.quality = StageQuality.HIGH;
 +			}				
 +		}
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        // If we don't have a stage then we are not top-level,
 +        // unless there are no other top-level managers, in which
 +        // case we got loaded by a non-Flex shell or are sandboxed.
 +        if (SystemManagerGlobals.topLevelSystemManagers.length > 0 && !stage)
 +            topLevel = false;
 +
 +        if (!stage)
 +            isStageRoot = false;
 +		}
 +		
 +        if (topLevel)
 +            SystemManagerGlobals.topLevelSystemManagers.push(this);
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			// Make sure to stop the playhead on the current frame.
 +			stop();				
 +		}
 +
 +        // Listen for the last frame (param is 0-indexed) to be executed.
 +        //addFrameScript(totalFrames - 1, frameEndHandler);
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			if (root && root.loaderInfo)
 +				root.loaderInfo.addEventListener(Event.INIT, initHandler);				
 +		}
 +		COMPILE::JS
 +		{
 +			initHandler(null);
 +			super.addEventListener(MouseEvent.MOUSE_MOVE, js_mouseMoveHandler);
 +		}
 +            
 +    }
 +
 +	//----------------------------------
 +	//  bindingEventDispatcher
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 *  Storage for the binding event dispatcher.
 +	 */
 +	private var _bindingEventDispatcher:EventDispatcher;
 +	
 +	[Inspectable(environment="none")]
 +	
 +	/**
 +	 *  Events get dispatched here first
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function get bindingEventDispatcher():IEventDispatcher
 +	{
 +		if (_bindingEventDispatcher == null)
 +			_bindingEventDispatcher = new EventDispatcher();
 +		return _bindingEventDispatcher;
 +	}
 +	
 +	//----------------------------------
 +	//  effectEventDispatcher
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 *  Storage for the effect event dispatcher.
 +	 */
 +	private var _effectEventDispatcher:EventDispatcher;
 +	
 +	[Inspectable(environment="none")]
 +	
 +	/**
 +	 *  Events get dispatched here last
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function get effectEventDispatcher():IEventDispatcher
 +	{
 +		if (_effectEventDispatcher == null)
 +			_effectEventDispatcher = new EventDispatcher();
 +		return _effectEventDispatcher;
 +	}
 +    
 +    
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private function deferredNextFrame():void
 +    {
 +        if (currentFrame + 1 > totalFrames)
 +            return;
 +
 +        if (currentFrame + 1 <= framesLoaded)
 +        {
 +            CONFIG::performanceInstrumentation
 +            {
 +                var perfUtil:mx.utils.PerfUtil = mx.utils.PerfUtil.getInstance();
 +                perfUtil.markTime("SystemManager.nextFrame().start");
 +            }
 +
 +            nextFrame();
 +
 +            CONFIG::performanceInstrumentation
 +            {
 +                perfUtil.markTime("SystemManager.nextFrame().end");
 +            }
 +        }
 +        else
 +        {
 +            // Next frame isn't baked yet, so we'll check back...
 +            nextFrameTimer = new Timer(100);
 +            nextFrameTimer.addEventListener(TimerEvent.TIMER,
 +                                            nextFrameTimerHandler);
 +            nextFrameTimer.start();
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Whether we are in the top-level list or not;
 +     *  top-level means we are the highest level SystemManager
 +     *  for this stage.
 +     */
 +    mx_internal var topLevel:Boolean = true;
 +
 +    /**
 +     *  @private
 +     * 
 +     * true if redipatching a resize event.
 +     */
 +    private var isDispatchingResizeEvent:Boolean;
 +    
 +    /**
 +     *  @private
 +     *  Whether we are the stage root or not.
 +     *  We are only the stage root if we were the root
 +     *  of the first SWF that got loaded by the player.
 +     *  Otherwise we could be top level but not stage root
 +     *  if we are loaded by some other non-Flex shell
 +     *  or are sandboxed.
 +     */
 +    mx_internal var isStageRoot:Boolean = true;
 +
 +    /**
 +     *  @private
 +     *  Whether we are the first SWF loaded into a bootstrap
 +     *  and therefore, the topLevelRoot
 +     */
 +    mx_internal var isBootstrapRoot:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  If we're not top level, then we delegate many things
 +     *  to the top level SystemManager.
 +     */
 +    private var _topLevelSystemManager:ISystemManager;
 +
 +    /**
 +     *  @private
 +     *  The childAdded/removed code
 +     */
 +    mx_internal var childManager:ISystemManagerChildManager;
 +
 +    /**
 +     * cached value of the stage.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private var _stage:Stage;
 +    
 +    /**
 +     *  Depth of this object in the containment hierarchy.
 +     *  This number is used by the measurement and layout code.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal var nestLevel:int = 0;
 +
 +    /**
 +     *  @private
 +     *  A reference to the preloader.
 +     */
 +    mx_internal var preloader:Preloader;
 +
 +    /**
 +     *  @private
 +     *  The mouseCatcher is the 0th child of the SystemManager,
 +     *  behind the application, which is child 1.
 +     *  It is the same size as the stage and is filled with
 +     *  transparent pixels; i.e., they've been drawn, but with alpha 0.
 +     *
 +     *  Its purpose is to make every part of the stage
 +     *  able to detect the mouse.
 +     *  For example, a Button puts a mouseUp handler on the SystemManager
 +     *  in order to capture mouseUp events that occur outside the Button.
 +     *  But if the children of the SystemManager don't have "drawn-on"
 +     *  pixels everywhere, the player won't dispatch the mouseUp.
 +     *  We can't simply fill the SystemManager itself with
 +     *  transparent pixels, because the player's pixel detection
 +     *  logic doesn't look at pixels drawn into the root DisplayObject.
 +     *
 +     *  Here is an example of what would happen without the mouseCatcher:
 +     *  Run a fixed-size Application (e.g. width="600" height="600")
 +     *  in the standalone player. Make the player window larger
 +     *  to reveal part of the stage. Press a Button, drag off it
 +     *  into the stage area, and release the mouse button.
 +     *  Without the mouseCatcher, the Button wouldn't return to its "up" state.
 +     */
 +    private var mouseCatcher:Sprite;
 +
 +    /**
 +     *  @private
 +     *  The top level window.
 +     */
 +    mx_internal var topLevelWindow:IUIComponent;
 +
 +    /**
 +     *  @private
 +     *  Number of frames since the last mouse or key activity.
 +     */
 +    mx_internal var idleCounter:int = 0;
 +
 +    /**
 +     *  @private
 +     *  The Timer used to determine when to dispatch idle events.
 +     */
 +    private var idleTimer:Timer;
 +
 +    /**
 +     *  @private
 +     *  A timer used when it is necessary to wait before incrementing the frame
 +     */
 +    private var nextFrameTimer:Timer = null;
 +
 +    /**
 +     *  @private
 +     *  Track which frame was last processed
 +     */
 +    private var lastFrame:int;
 +
 +    /**
 +     *  @private
 +     *  A boolean as to whether we've seen COMPLETE event from preloader
 +     */
 +    private var readyForKickOff:Boolean;
 +
 +    /**
 +     *  @private
 +     * 
 +     *  This variable exists only to provide a reference to this 
 +     *  app's resource bundles. This application is opting
 +     *  into referencing its own resource bundles so the
 +     *  ResourceManager does not need to do it. This 
 +     *  arrangement keeps the ResourceManager from pinning
 +     *  the application in memory. 
 +     * 
 +     *  If this is the main app, then this variable will be null.
 +     *  If this is a sub-app then ResourceManagerImpl set 
 +     *  this variable to the apps resource bundles. This variable 
 +     *  is public so it is visible to ResourceManagerImpl but starts
 +     *  with an underscore to hint that it is an implementation detail 
 +     *  and should not be relied on. 
 +     */
 +    public var _resourceBundles:Array;
 +
 +    /**
 +     *  @private
 +     *  Array of RSLData objects that represent the list of RSLs this
 +     *  module factory is loading. Each element of the Array is an 
 +     *  Array of RSLData.
 +     */ 
 +	COMPILE::LATER
 +    private var rslDataList:Array
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties: DisplayObject
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  height
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _height:Number;
 +
 +    /**
 +     *  The height of this object.  For the SystemManager
 +     *  this should always be the width of the stage unless the application was loaded
 +     *  into another application.  If the application was not loaded
 +     *  into another application, setting this value has no effect.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get height():Number
 +    {
 +        return _height;
 +    }
 +
 +    //----------------------------------
 +    //  stage
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  get the main stage if we're loaded into another swf in the same sandbox
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override public function get stage():Stage
 +    {
 +        if (_stage)
 +            return _stage;
 +            
 +        var s:Stage = super.stage;
 +        if (s)
 +        {
 +            _stage = s;
 +            return s;
 +        }
 +
 +		COMPILE::LATER
 +		{
 +        if (!topLevel && _topLevelSystemManager)
 +        {
 +            _stage = _topLevelSystemManager.stage; 
 +            return _stage;
 +        }
 +		}
 +
 +        // Case for version skew, we are a top level system manager, but
 +        // a child of the top level root system manager and we have access 
 +        // to the stage. 
 +        if (!isStageRoot && topLevel)
 +        {
 +            var root:DisplayObject = getTopLevelRoot();
 +            if (root)
 +            {
 +                _stage = root.stage;
 +                return _stage;
 +            }
 +        }
 +
 +        return null;
 +    }
 +
 +    //----------------------------------
 +    //  width
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _width:Number;
 +
 +    /**
 +     *  The width of this object.  For the SystemManager
 +     *  this should always be the width of the stage unless the application was loaded
 +     *  into another application.  If the application was not loaded
 +     *  into another application, setting this value will have no effect.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get width():Number
 +    {
 +        return _width;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties: DisplayObjectContainer
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  numChildren
 +    //----------------------------------
 +
 +    /**
 +     *  The number of non-floating windows.  This is the main application window
 +     *  plus any other windows added to the SystemManager that are not popups,
 +     *  tooltips or cursors.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get numChildren():int
 +    {
 +        return noTopMostIndex - applicationIndex;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  allowDomainsInNewRSLs
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */ 
 +	COMPILE::LATER
 +    private var _allowDomainsInNewRSLs:Boolean = true;
 +    
 +    /**
 +     *  @inheritDoc
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10.2
 +     *  @playerversion AIR 2.6
 +     *  @productversion Flex 4.5
 +     */   
 +	COMPILE::LATER
 +    public function get allowDomainsInNewRSLs():Boolean
 +    {
 +        return _allowDomainsInNewRSLs;
 +    }
 +    
 +    /**
 +     *  @private
 +     */ 
 +	COMPILE::LATER
 +    public function set allowDomainsInNewRSLs(value:Boolean):void
 +    {
 +        _allowDomainsInNewRSLs = value;
 +    }
 +    
 +    //----------------------------------
 +    //  allowInsecureDomainsInNewRSLs
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */ 
 +	COMPILE::LATER
 +    private var _allowInsecureDomainsInNewRSLs:Boolean = true;
 +    
 +    /**
 +     *  @inheritDoc
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10.2
 +     *  @playerversion AIR 2.6
 +     *  @productversion Flex 4.5
 +     */   
 +	COMPILE::LATER
 +    public function get allowInsecureDomainsInNewRSLs():Boolean
 +    {
 +        return _allowInsecureDomainsInNewRSLs;
 +    }
 +    
 +    /**
 +     *  @private
 +     */ 
 +	COMPILE::LATER
 +    public function set allowInsecureDomainsInNewRSLs(value:Boolean):void
 +    {
 +        _allowInsecureDomainsInNewRSLs = value;
 +    }
 +    
 +    //----------------------------------
 +    //  application
 +    //----------------------------------
 +
 +    /**
 +     *  The application parented by this SystemManager.
 +     *  SystemManagers create an instance of an Application
 +     *  even if they are loaded into another Application.
 +     *  Thus, this may not match mx.core.Application.application
 +     *  if the SWF has been loaded into another application.
 +     *  <p>Note that this property is not typed as mx.core.Application
 +     *  because of load-time performance considerations
 +     *  but can be coerced into an mx.core.Application.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get application():IUIComponent
 +    {
 +        return IUIComponent(_document);
 +    }
 +
 +    //----------------------------------
 +    //  applicationIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the applicationIndex property.
 +     */
 +    private var _applicationIndex:int = 1;
 +
 +    /**
 +     *  @private
 +     *  The index of the main mx.core.Application window, which is
 +     *  effectively its z-order.
 +     */
 +    mx_internal function get applicationIndex():int
 +    {
 +        return _applicationIndex;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set applicationIndex(value:int):void
 +    {
 +        _applicationIndex = value;
 +    }
 +
 +    
 +    //----------------------------------
 +    //  cursorChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the cursorChildren property.
 +     */
 +    private var _cursorChildren:SystemChildrenList;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get cursorChildren():IChildList
 +    {
 +        if (!topLevel)
 +            return _topLevelSystemManager.cursorChildren;
 +
 +        if (!_cursorChildren)
 +        {
 +            _cursorChildren = new SystemChildrenList(this,
 +                new QName(mx_internal, "toolTipIndex"),
 +                new QName(mx_internal, "cursorIndex"));
 +        }
 +
 +        return _cursorChildren;
 +    }
 +
 +    //----------------------------------
 +    //  cursorIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the toolTipIndex property.
 +     */
 +    private var _cursorIndex:int = 0;
 +
 +    /**
 +     *  @private
 +     *  The index of the highest child that is a cursor.
 +     */
 +    mx_internal function get cursorIndex():int
 +    {
 +        return _cursorIndex;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set cursorIndex(value:int):void
 +    {
 +        var delta:int = value - _cursorIndex;
 +        _cursorIndex = value;
 +    }
 +
 +    //----------------------------------
 +    //  densityScale
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the densityScale property 
 +     */
 +    private var _densityScale:Number = NaN;
 +    
 +    /**
 +     *  The density scale factor of the application.
 +     * 
 +     *  When density scaling is enabled, Flex applies a scale factor based on
 +     *  the application author density and the density of the current device
 +     *  that Flex is running on. 
 +     * 
 +     *  Returns 1.0 when there is no scaling.
 +     * 
 +     *  @see spark.components.Application#applicationDPI
 +     *  @see mx.core.DensityUtil
 +     * 
 +     *  @private
 +     */
 +    mx_internal function get densityScale():Number
 +    {
 +        if (isNaN(_densityScale))
 +        {    
 +            var applicationDPI:Number = info()["applicationDPI"];
 +            var runtimeDPI:Number = DensityUtil.getRuntimeDPI();
 +            _densityScale = DensityUtil.getDPIScale(applicationDPI, runtimeDPI);
 +            if (isNaN(_densityScale))
 +                _densityScale = 1;
 +        }
 +
 +        return _densityScale;
 +    }
 +    
 +    //----------------------------------
 +    //  document
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the document property.
 +     */
 +    private var _document:Object;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get document():Object
 +    {
 +        return _document;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set document(value:Object):void
 +    {
 +        _document = value;
 +    }
 +
 +    //----------------------------------
 +    //  embeddedFontList
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the fontList property.
 +     */
 +    private var _fontList:Object = null;
 +
 +    /**
 +     *  A table of embedded fonts in this application.  The 
 +     *  object is a table indexed by the font name.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get embeddedFontList():Object
 +    {
 +        if (_fontList == null)
 +        {
 +            _fontList = {};
 +
 +            var o:Object = info()["fonts"];
 +
 +            var p:String;
 +
 +            for (p in o)
 +            {
 +                _fontList[p] = o[p];
 +            }
 +
 +            // Top level systemManager may not be defined if SWF is loaded
 +            // as a background image in download progress bar.
 +            if (!topLevel && _topLevelSystemManager)                   
 +            {
 +                var fl:Object = _topLevelSystemManager.embeddedFontList;
 +                for (p in fl)
 +                {
 +                    _fontList[p] = fl[p];
 +                }
 +            }
 +        }
 +
 +        return _fontList;
 +    }
 +
 +    //----------------------------------
 +    //  explicitHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _explicitHeight:Number;
 +
 +    /**
 +     *  The explicit width of this object.  For the SystemManager
 +     *  this should always be NaN unless the application was loaded
 +     *  into another application.  If the application was not loaded
 +     *  into another application, setting this value has no effect.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function get explicitHeight():Number
 +    {
 +        return _explicitHeight;
 +    }
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function set explicitHeight(value:Number):void
 +    {
 +        _explicitHeight = value;
 +    }
 +
 +    //----------------------------------
 +    //  explicitWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _explicitWidth:Number;
 +
 +    /**
 +     *  The explicit width of this object.  For the SystemManager
 +     *  this should always be NaN unless the application was loaded
 +     *  into another application.  If the application was not loaded
 +     *  into another application, setting this value has no effect.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function get explicitWidth():Number
 +    {
 +        return _explicitWidth;
 +    }
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function set explicitWidth(value:Number):void
 +    {
 +        _explicitWidth = value;
 +    }
 +
 +    //----------------------------------
 +    //  focusPane
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _focusPane:Sprite;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#focusPane
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get focusPane():Sprite
 +    {
 +        return _focusPane;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set focusPane(value:Sprite):void
 +    {
 +        if (value)
 +        {
 +            addChild(value);
 +
 +            value.x = 0;
 +            value.y = 0;
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +            value.scrollRect = null;
 +			}
 +
 +            _focusPane = value;
 +        }
 +        else
 +        {
 +            removeChild(_focusPane);
 +
 +            _focusPane = null;
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  isProxy
 +    //----------------------------------
 +
 +    /**
 +     *  True if SystemManager is a proxy and not a root class
 +     */
 +    public function get isProxy():Boolean
 +    {
 +        return false;
 +    }
 +
 +    //----------------------------------
 +    //  measuredHeight
 +    //----------------------------------
 +
 +    /**
 +     *  The measuredHeight is the explicit or measuredHeight of 
 +     *  the main mx.core.Application window
 +     *  or the starting height of the SWF if the main window 
 +     *  has not yet been created or does not exist.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get measuredHeight():Number
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        return topLevelWindow ?
 +               topLevelWindow.getExplicitOrMeasuredHeight() :
 +               loaderInfo.height;
 +		}
 +		COMPILE::JS
 +		{
 +			return topLevelWindow ?
 +				topLevelWindow.getExplicitOrMeasuredHeight() :
 +				height;
 +		}
 +    }
 +
 +    //----------------------------------
 +    //  measuredWidth
 +    //----------------------------------
 +
 +    /**
 +     *  The measuredWidth is the explicit or measuredWidth of 
 +     *  the main mx.core.Application window,
 +     *  or the starting width of the SWF if the main window 
 +     *  has not yet been created or does not exist.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get measuredWidth():Number
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			return topLevelWindow ?
 +				topLevelWindow.getExplicitOrMeasuredWidth() :
 +				loaderInfo.width;				
 +		}
 +		COMPILE::JS
 +		{
 +			return topLevelWindow ?
 +				topLevelWindow.getExplicitOrMeasuredWidth() :
 +				width;				
 +		}
 +    }
 +
 +    //----------------------------------
 +    //  noTopMostIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the noTopMostIndex property.
 +     */
 +    private var _noTopMostIndex:int = 0;
 +
 +    /**
 +     *  @private
 +     *  The index of the highest child that isn't a topmost/popup window
 +     */
 +    mx_internal function get noTopMostIndex():int
 +    {
 +        return _noTopMostIndex;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set noTopMostIndex(value:int):void
 +    {
 +        var delta:int = value - _noTopMostIndex;
 +        _noTopMostIndex = value;
 +        topMostIndex += delta;
 +    }
 +
 +    //----------------------------------
 +    //  $numChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  This property allows access to the Player's native implementation
 +     *  of the numChildren property, which can be useful since components
 +     *  can override numChildren and thereby hide the native implementation.
 +     *  Note that this "base property" is final and cannot be overridden,
 +     *  so you can count on it to reflect what is happening at the player level.
 +     */
 +    mx_internal final function get $numChildren():int
 +    {
 +        return super.numChildren;
 +    }
 +
 +    //----------------------------------
 +    //  numModalWindows
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the numModalWindows property.
 +     */
 +    private var _numModalWindows:int = 0;
 +
 +    /**
 +     *  The number of modal windows.  Modal windows don't allow
 +     *  clicking in another windows which would normally
 +     *  activate the FocusManager in that window.  The PopUpManager
 +     *  modifies this count as it creates and destroys modal windows.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get numModalWindows():int
 +    {
 +        return _numModalWindows;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set numModalWindows(value:int):void
 +    {
 +        _numModalWindows = value;
 +    }
 +
 +    //----------------------------------
 +    //  preloadedRSLs
 +    //----------------------------------
 +    
 +    /**
 +     *  @inheritDoc 
 +     *  
 +     */
 +	COMPILE::LATER
 +    public function  get preloadedRSLs():Dictionary
 +    {
 +        // Overridden by compiler generate code.
 +        return null;                
 +    }
 +    
 +    /**
 +     *  @inheritDoc 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4.5
 +     */ 
 +	COMPILE::LATER
 +    public function addPreloadedRSL(loaderInfo:LoaderInfo, rsl:Vector.<RSLData>):void
 +    {
 +        preloadedRSLs[loaderInfo] = rsl;
 +        if (hasEventListener(RSLEvent.RSL_ADD_PRELOADED))
 +        {
 +            var rslEvent:RSLEvent = new RSLEvent(RSLEvent.RSL_ADD_PRELOADED);
 +            rslEvent.loaderInfo = loaderInfo;
 +            dispatchEvent(rslEvent);
 +        }
 +        
 +    }
 +    
 +    //----------------------------------
 +    //  preloaderBackgroundAlpha
 +    //----------------------------------
 +
 +    /**
 +     *  The background alpha used by the child of the preloader.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get preloaderBackgroundAlpha():Number
 +    {
 +        return info()["backgroundAlpha"];
 +    }
 +
 +    //----------------------------------
 +    //  preloaderBackgroundColor
 +    //----------------------------------
 +
 +    /**
 +     *  The background color used by the child of the preloader.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get preloaderBackgroundColor():uint
 +    {
 +        var value:* = info()["backgroundColor"];
 +        if (value == undefined)
 +            return 0xFFFFFFFF;
 +        else
 +            return value;
 +    }
 +
 +    //----------------------------------
 +    //  preloaderBackgroundImage
 +    //----------------------------------
 +
 +    /**
 +     *  The background color used by the child of the preloader.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get preloaderBackgroundImage():Object
 +    {
 +        return info()["backgroundImage"];
 +    }
 +
 +    //----------------------------------
 +    //  preloaderBackgroundSize
 +    //----------------------------------
 +
 +    /**
 +     *  The background size used by the child of the preloader.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get preloaderBackgroundSize():String
 +    {
 +        return info()["backgroundSize"];
 +    }
 +
 +    //----------------------------------
 +    //  popUpChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the popUpChildren property.
 +     */
 +    private var _popUpChildren:SystemChildrenList;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get popUpChildren():IChildList
 +    {
 +        if (!topLevel)
 +            return _topLevelSystemManager.popUpChildren;
 +
 +        if (!_popUpChildren)
 +        {
 +            _popUpChildren = new SystemChildrenList(this,
 +                new QName(mx_internal, "noTopMostIndex"),
 +                new QName(mx_internal, "topMostIndex"));
 +        }
 +
 +        return _popUpChildren;
 +    }
 +
 +    //----------------------------------
 +    //  rawChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the rawChildren property.
 +     */
 +    private var _rawChildren:SystemRawChildrenList;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get rawChildren():IChildList
 +    {
 +        //if (!topLevel)
 +        //  return _topLevelSystemManager.rawChildren;
 +
 +        if (!_rawChildren)
 +            _rawChildren = new SystemRawChildrenList(this);
 +
 +        return _rawChildren;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //  screen
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the screen property.
 +     */
 +    mx_internal var _screen:Rectangle;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get screen():Rectangle
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        if (!_screen)
 +            Stage_resizeHandler();
 +
 +        if (!isStageRoot)
 +        {
 +            Stage_resizeHandler();
 +        }
 +		}
 +        return _screen;
 +    }
 +
 +    //----------------------------------
 +    //  toolTipChildren
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the toolTipChildren property.
 +     */
 +    private var _toolTipChildren:SystemChildrenList;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get toolTipChildren():IChildList
 +    {
 +        if (!topLevel)
 +            return _topLevelSystemManager.toolTipChildren;
 +
 +        if (!_toolTipChildren)
 +        {
 +            _toolTipChildren = new SystemChildrenList(this,
 +                new QName(mx_internal, "topMostIndex"),
 +                new QName(mx_internal, "toolTipIndex"));
 +        }
 +
 +        return _toolTipChildren;
 +    }
 +
 +    //----------------------------------
 +    //  toolTipIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the toolTipIndex property.
 +     */
 +    private var _toolTipIndex:int = 0;
 +
 +    /**
 +     *  @private
 +     *  The index of the highest child that is a tooltip
 +     */
 +    mx_internal function get toolTipIndex():int
 +    {
 +        return _toolTipIndex;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set toolTipIndex(value:int):void
 +    {
 +        var delta:int = value - _toolTipIndex;
 +        _toolTipIndex = value;
 +        cursorIndex += delta;
 +    }
 +
 +    //----------------------------------
 +    //  topLevelSystemManager
 +    //----------------------------------
 +
 +    /**
 +     *  Returns the SystemManager responsible for the application window.  This will be
 +     *  the same SystemManager unless this application has been loaded into another
 +     *  application.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get topLevelSystemManager():ISystemManager
 +    {
 +        if (topLevel)
 +            return this;
 +
 +        return _topLevelSystemManager;
 +    }
 +
 +    //----------------------------------
 +    //  topMostIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the topMostIndex property.
 +     */
 +    private var _topMostIndex:int = 0;
 +
 +    /**
 +     *  @private
 +     *  The index of the highest child that is a topmost/popup window
 +     */
 +    mx_internal function get topMostIndex():int
 +    {
 +        return _topMostIndex;
 +    }
 +
 +    mx_internal function set topMostIndex(value:int):void
 +    {
 +        var delta:int = value - _topMostIndex;
 +        _topMostIndex = value;
 +        toolTipIndex += delta;
 +    }
 +
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: EventDispatcher
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  allows marshal implementation to add events
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal final function $addEventListener(type:String, listener:Function,
 +                                              useCapture:Boolean = false,
 +                                              priority:int = 0,
 +                                              useWeakReference:Boolean = false):void
 +    {   
 +        super.addEventListener(type, listener, useCapture, priority, useWeakReference);
 +    }
 +
 +    /**
 +     * @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */    
 +	COMPILE::LATER
 +    public function get childAllowsParent():Boolean
 +    {
 +        try
 +        {
 +            return loaderInfo.childAllowsParent;
 +        }
 +        catch (error:Error)
 +        {
 +            //Error #2099: The loading object is not sufficiently loaded to provide this information.
 +        }
 +        
 +        return false;   // assume the worst
 +    }
 +
 +    /**
 +     *  @copy mx.core.ISWFBridgeProvider#parentAllowsChild
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */    
 +	COMPILE::LATER
 +    public function get parentAllowsChild():Boolean
 +    {
 +        try
 +        {
 +            return loaderInfo.parentAllowsChild;
 +        }
 +        catch (error:Error)
 +        {
 +            //Error #2099: The loading object is not sufficiently loaded to provide this information.
 +        }
 +        
 +        return false;   // assume the worst
 +    }
 +
 +    /**
 +     * @private
 +     *  Only create idle events if someone is listening.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override public function addEventListener(type:String, listener:Function,
 +                                              useCapture:Boolean = false,
 +                                              priority:int = 0,
 +                                              useWeakReference:Boolean = false):void
 +    {
 +        if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN 
 +                || type == Event.ACTIVATE || type == Event.DEACTIVATE)
 +        {
 +            // also listen to stage if allowed
 +            try
 +            {
 +                if (stage)
 +                {
 +                    // Use weak listener because we don't always know when we
 +                    // no longer need this listener
 +                    stage.addEventListener(type, stageEventHandler, false, 0, true);
 +                }
 +            }
 +            catch (error:SecurityError)
 +            {
 +            }
 +        }
 +
 +        if (hasEventListener("addEventListener"))
 +        {
 +            var request:DynamicEvent = new DynamicEvent("addEventListener", false, true);
 +            request.eventType = type;
 +            request.listener = listener;
 +            request.useCapture = useCapture;
 +            request.priority = priority;
 +            request.useWeakReference = useWeakReference;
 +            if (!dispatchEvent(request))
 +                return;
 +        }
 +
 +		COMPILE::LATER
 +		{
 +        if (type == SandboxMouseEvent.MOUSE_UP_SOMEWHERE)
 +        {
 +            // If someone wants this event, also listen for mouseLeave.
 +            // Use weak listener because we don't always know when we
 +            // no longer need this listener
 +            try
 +            {
 +                if (stage)
 +                {
 +                    stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
 +                }
 +                else
 +                {
 +                    super.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
 +                }
 +            }
 +            catch (error:SecurityError)
 +            {
 +                super.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
 +            }
 +        }
 +		}
 +		
 +        // These two events will dispatched to applications in sandboxes.
 +        if (type == FlexEvent.RENDER || type == FlexEvent.ENTER_FRAME)
 +        {
 +            if (type == FlexEvent.RENDER)
 +                type = Event.RENDER;
 +            else
 +                type = Event.ENTER_FRAME;
 +                
 +            try
 +            {
 +                if (stage)
 +                    stage.addEventListener(type, listener, useCapture, priority, useWeakReference);
 +                else
 +                    super.addEventListener(type, listener, useCapture, priority, useWeakReference);
 +            }
 +            catch (error:SecurityError)
 +            {
 +                super.addEventListener(type, listener, useCapture, priority, useWeakReference);
 +            }
 +        
 +            if (stage && type == Event.RENDER)
 +                stage.invalidate();
 +
 +            return;
 +        }
 +
 +		COMPILE::LATER
 +		{
 +        // When the first listener registers for 'idle' events,
 +        // create a Timer that will fire every IDLE_INTERVAL.
 +        if (type == FlexEvent.IDLE && !idleTimer)
 +        {
 +            idleTimer = new Timer(IDLE_INTERVAL);
 +            idleTimer.addEventListener(TimerEvent.TIMER,
 +                                       idleTimer_timerHandler);
 +            idleTimer.start();
 +
 +            // Make sure we get all activity
 +            // in case someone calls stopPropagation().
 +            addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
 +            addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
 +        }
 +		}
 +		
 +
 +        super.addEventListener(type, listener, useCapture, priority, useWeakReference);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal final function $removeEventListener(type:String, listener:Function,
 +                                                 useCapture:Boolean = false):void
 +    {
 +        super.removeEventListener(type, listener, useCapture);
 +    }
 +    
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override public function removeEventListener(type:String, listener:Function,
 +                                                 useCapture:Boolean = false):void
 +    {
 +        if (hasEventListener("removeEventListener"))
 +        {
 +            var request:DynamicEvent = new DynamicEvent("removeEventListener", false, true);
 +            request.eventType = type;
 +            request.listener = listener;
 +            request.useCapture = useCapture;
 +            if (!dispatchEvent(request))
 +                return;
 +        }
 +
 +        // These two events will dispatched to applications in sandboxes.
 +        if (type == FlexEvent.RENDER || type == FlexEvent.ENTER_FRAME)
 +        {
 +            if (type == FlexEvent.RENDER)
 +                type = Event.RENDER;
 +            else
 +                type = Event.ENTER_FRAME;
 +                
 +            try
 +            {
 +                if (stage)
 +                    stage.removeEventListener(type, listener, useCapture);
 +            }
 +            catch (error:SecurityError)
 +            {
 +            }
 +            // Remove both listeners in case the system manager was added
 +            // or removed from the stage after the listener was added.
 +            super.removeEventListener(type, listener, useCapture);
 +        
 +            return;
 +        }
 +
 +        // When the last listener unregisters for 'idle' events,
 +        // stop and release the Timer.
 +        if (type == FlexEvent.IDLE)
 +        {
 +            super.removeEventListener(type, listener, useCapture);
 +
 +            if (!hasEventListener(FlexEvent.IDLE) && idleTimer)
 +            {
 +                idleTimer.stop();
 +                idleTimer = null;
 +
 +                removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
 +                removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
 +            }
 +        }
 +        else
 +        {
 +            super.removeEventListener(type, listener, useCapture);
 +        }
 +
 +        if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN 
 +                || type == Event.ACTIVATE || type == Event.DEACTIVATE)
 +        {
 +            if (!hasEventListener(type))
 +            {
 +                // also listen to stage if allowed
 +                try
 +                {
 +                    if (stage)
 +                    {
 +                        stage.removeEventListener(type, stageEventHandler, false);
 +                    }
 +                }
 +                catch (error:SecurityError)
 +                {
 +                }
 +            }
 +        }
 +
 +		COMPILE::LATER
 +		{
 +        if (type == SandboxMouseEvent.MOUSE_UP_SOMEWHERE)
 +        {
 +            if (!hasEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE))
 +            {
 +                // nobody wants this event any more for now
 +                try
 +                {
 +                    if (stage)
 +                    {
 +                        stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
 +                    }
 +                }
 +                catch (error:SecurityError)
 +                {
 +                }
 +                // Remove both listeners in case the system manager was added
 +                // or removed from the stage after the listener was added.
 +                super.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
 +            }
 +        }
 +		}
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: DisplayObjectContainer
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function addChild(child:DisplayObject):DisplayObject
 +    {
 +        var addIndex:int = numChildren;
 +        if (child.parent == this)
 +            addIndex--;
 +
 +        return addChildAt(child, addIndex);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function addChildAt(child:DisplayObject,
 +                                        index:int):DisplayObject
 +    {
 +        // Adjust the partition indexes before the 
 +        // "added" event is dispatched.
 +        noTopMostIndex = noTopMostIndex + 1;
 +
 +        var oldParent:DisplayObjectContainer = child.parent;
 +        if (oldParent)
 +            oldParent.removeChild(child);
 +        
 +        return rawChildren_addChildAt(child, applicationIndex + index);
 +    }
 +
 +    /**
 +     *  @private
 +     * 
 +     * Used by SystemManagerProxy to add a mouse catcher as a child.
 +     */ 
 +    mx_internal final function $addChildAt(child:DisplayObject,
 +                                        index:int):DisplayObject
 +    {
 +        return super.addChildAt(child, index);
 +    }
 +
 +    /**
 +     *  @private
 +     * 
 +     *  Companion to $addChildAt.
 +     */
 +    mx_internal final function $removeChildAt(index:int):DisplayObject
 +    {
 +        return super.removeChildAt(index);
 +    }
 +
 +
 +    /**
 +     *  @private
 +     */
 +    override public function removeChild(child:DisplayObject):DisplayObject
 +    {
 +        // Adjust the partition indexes
 +        // before the "removed" event is dispatched.
 +        noTopMostIndex = noTopMostIndex - 1;
 +
 +        return rawChildren_removeChild(child);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function removeChildAt(index:int):DisplayObject
 +    {
 +        // Adjust the partition indexes
 +        // before the "removed" event is dispatched.
 +        noTopMostIndex = noTopMostIndex - 1;
 +
 +        return rawChildren_removeChildAt(applicationIndex + index);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function getChildAt(index:int):DisplayObject
 +    {
 +        return super.getChildAt(applicationIndex + index)
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function getChildByName(name:String):DisplayObject
 +    {
 +        return super.getChildByName(name);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function getChildIndex(child:DisplayObject):int
 +    {
 +        return super.getChildIndex(child) - applicationIndex;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function setChildIndex(child:DisplayObject, newIndex:int):void
 +    {
 +        super.setChildIndex(child, applicationIndex + newIndex)
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    override public function getObjectsUnderPoint(point:Point):Array
 +    {
 +        var children:Array = [];
 +
 +        // Get all the children that aren't tooltips and cursors.
 +        var n:int = topMostIndex;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var child:DisplayObject = super.getChildAt(i);
 +            if (child is DisplayObjectContainer)
 +            {
 +                var temp:Array =
 +                    DisplayObjectContainer(child).getObjectsUnderPoint(point);
 +
 +                if (temp)
 +                    children = children.concat(temp);
 +            }
 +        }
 +
 +        return children;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function contains(child:DisplayObject):Boolean
 +    {
 +        if (super.contains(child))
 +        {
 +            if (child.parent == this)
 +            {
 +                var childIndex:int = super.getChildIndex(child);
 +                if (childIndex < noTopMostIndex)
 +                    return true;
 +            }
 +            else
 +            {
 +                for (var i:int = 0; i < noTopMostIndex; i++)
 +                {
 +                    var myChild:DisplayObject = super.getChildAt(i);
 +                    if (myChild is IRawChildrenContainer)
 +                    {
 +                        if (IRawChildrenContainer(myChild).rawChildren.contains(child))
 +                            return true;
 +                    }
 +                    if (myChild is DisplayObjectContainer)
 +                    {
 +                        if (DisplayObjectContainer(myChild).contains(child))
 +                            return true;
 +                    }
 +                }
 +            }
 +        }
 +        return false;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods: IFlexModuleFactory
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  This method is overridden in the autogenerated subclass.
 +     *  It is part of TLF's ISWFContext interface.
 +     *  Although this class does not declare that it implements this interface,
 +     *  the autogenerated subclass does.
 +     */
 +    public function callInContext(fn:Function, thisArg:Object,
 +                                  argArray:Array, returns:Boolean = true):*
 +    {
 +        return undefined;
 +    }
 +
 +    /**
 +     *  A factory method that requests an instance of a
 +     *  definition known to the module.
 +     * 
 +     *  You can provide an optional set of parameters to let building
 +     *  factories change what they create based on the
 +     *  input. Passing null indicates that the default definition
 +     *  is created, if possible. 
 +     *
 +     *  This method is overridden in the autogenerated subclass.
 +     *
 +     *  @param params An optional list of arguments. You can pass
 +     *  any number of arguments, which are then stored in an Array
 +     *  called <code>parameters</code>. 
 +     *
 +     *  @return An instance of the module, or <code>null</code>.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function create(... params):Object
 +    {
 +        var mainClassName:String = info()["mainClassName"];
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			if (mainClassName == null)
 +			{
 +				var url:String = loaderInfo.loaderURL;
 +				var dot:int = url.lastIndexOf(".");
 +				var slash:int = url.lastIndexOf("/");
 +				mainClassName = url.substring(slash + 1, dot);
 +			}				
 +		}
 +
 +        var mainClass:Class = Class(getDefinitionByName(mainClassName));
 +        
 +        return mainClass ? new mainClass() : null;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function info():Object
 +    {
 +        return {};
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Creates an instance of the preloader, adds it as a child, and runs it.
 +     *  This is needed by Flash Builder. Do not modify this function.
 +     */
 +    mx_internal function initialize():void
 +    {
 +        var runtimeDPIProviderClass:Class = info()["runtimeDPIProvider"] as Class;
 +        if (runtimeDPIProviderClass)
 +            Singleton.registerClass("mx.core::RuntimeDPIProvider", runtimeDPIProviderClass);
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        if (isStageRoot)
 +        {
 +            // TODO: Finalize scaling behavior
 +            Stage_resizeHandler();
 +            // _width = stage.stageWidth;
 +            // _height = stage.stageHeight;
 +        }
 +        else
 +        {
 +            _width = loaderInfo.width;
 +            _height = loaderInfo.height;
 +        }		
 +		}
 +
 +        // Create an instance of the preloader and add it to the stage
 +        preloader = new Preloader();
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			// Listen for preloader events
 +			// preloader notifes when it is ok to go to frame2
 +			preloader.addEventListener(FlexEvent.PRELOADER_DOC_FRAME_READY,
 +				preloader_preloaderDocFrameReadyHandler);				
 +		}
 +        // wait for a complete event.  This gives the preloader
 +        // a chance to load resource modules before
 +        // everything really gets kicked off
 +        preloader.addEventListener(Event.COMPLETE,
 +                                   preloader_completeHandler);
 +        // when the app is fully backed remove the preloader and show the app
 +        preloader.addEventListener(FlexEvent.PRELOADER_DONE,
 +                                   preloader_preloaderDoneHandler);
 +		COMPILE::LATER
 +		{
 +        preloader.addEventListener(RSLEvent.RSL_COMPLETE, 
 +                                   preloader_rslCompleteHandler);
 +		}
 +		
 +        // Add the preloader as a child.  Use backing variable because when loaded
 +        // we redirect public API to parent systemmanager
 +        if (!_popUpChildren)
 +        {
 +				_popUpChildren = new SystemChildrenList(
 +					this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));					
 +        }
 +        _popUpChildren.addChild(preloader);
 +
 +        var rsls:Array = info()["rsls"];
 +        var cdRsls:Array = info()["cdRsls"];
 +        var usePreloader:Boolean = true;
 +        if (info()["usePreloader"] != undefined)
 +            usePreloader = info()["usePreloader"];
 +
 +        var preloaderDisplayClass:Class = info()["preloader"] as Class;
 +
 +		COMPILE::LATER
 +		{
 +        // Put cross-domain RSL information in the RSL list.
 +        var rslItemList:Array = [];
 +        var n:int;
 +        var i:int;
 +        if (cdRsls && cdRsls.length > 0)
 +        {
 +            if (isTopLevel())
 +                rslDataList = cdRsls;
 +            else
 +                rslDataList = LoaderUtil.processRequiredRSLs(this, cdRsls);
 +            
 +            var normalizedURL:String = LoaderUtil.normalizeURL(this.loaderInfo);
 +            var crossDomainRSLItem:Class = Class(getDefinitionByName("mx.core::CrossDomainRSLItem"));
 +            n = rslDataList.length;
 +            for (i = 0; i < n; i++)
 +            {
 +                var rslWithFailovers:Array = rslDataList[i];
 +
 +                // If crossDomainRSLItem is null, then this is a compiler error. It should not be null.
 +                var cdNode:Object = new crossDomainRSLItem(rslWithFailovers,
 +                                                    normalizedURL,
 +                                                    this);
 +                rslItemList.push(cdNode);               
 +            }
 +        }
 +
 +        // Append RSL information in the RSL list.
 +        if (rsls != null && rsls.length > 0)
 +        {
 +            if (rslDataList == null)
 +                rslDataList = [];
 +            
 +            if (normalizedURL == null)
 +                normalizedURL = LoaderUtil.normalizeURL(this.loaderInfo);
 +
 +            n = rsls.length;
 +            for (i = 0; i < n; i++)
 +            {
 +                var node:RSLItem = new RSLItem(rsls[i].url, 
 +                                               normalizedURL,
 +                                               this);
 +                rslItemList.push(node);
 +                rslDataList.push([new RSLData(rsls[i].url, null, null, null, 
 +                                  false, false, "current")]);
 +            }
 +        }
 +
 +        // They can also specify a comma-separated list of URLs
 +        // for resource modules to be preloaded during frame 1.
 +        var resourceModuleURLList:String =
 +            loaderInfo.parameters["resourceModuleURLs"];
 +        var resourceModuleURLs:Array =
 +            resourceModuleURLList ? resourceModuleURLList.split(",") : null;
 +
 +        var domain:ApplicationDomain =
 +            !topLevel && parent is Loader ?
 +            Loader(parent).contentLoaderInfo.applicationDomain :
 +            info()["currentDomain"] as ApplicationDomain;
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        // Initialize the preloader.
 +        preloader.initialize(
 +            usePreloader,
 +            preloaderDisplayClass,
 +            preloaderBackgroundColor,
 +            preloaderBackgroundAlpha,
 +            preloaderBackgroundImage,
 +            preloaderBackgroundSize,
 +            isStageRoot ? stage.stageWidth : loaderInfo.width,
 +            isStageRoot ? stage.stageHeight : loaderInfo.height,
 +            null,
 +            null,
 +            rslItemList,
 +            resourceModuleURLs,
 +            domain);
 +		}
 +		}
 +		
 +		COMPILE::JS
 +		{
 +		// Initialize the preloader.
 +		preloader.initialize(
 +			usePreloader,
 +			preloaderDisplayClass,
 +			preloaderBackgroundColor,
 +			preloaderBackgroundAlpha,
 +			preloaderBackgroundImage,
 +			preloaderBackgroundSize,
 +			width,
 +			height,
 +			null,
 +			null);
 +		}
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods: Support for rawChildren access
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_addChild(child:DisplayObject):DisplayObject
 +    {
 +        childManager.addingChild(child);
 +
 +        super.addChild(child);
 +
 +        childManager.childAdded(child); // calls child.createChildren()
 +
 +        return child;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_addChildAt(child:DisplayObject,
 +                                                index:int):DisplayObject
 +    {
 +        // preloader goes through here before childManager is set up
 +        if (childManager) 
 +            childManager.addingChild(child);
 +
 +        super.addChildAt(child, index);
 +
 +        if (childManager) 
 +            childManager.childAdded(child); // calls child.createChildren()
 +
 +        return child;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_removeChild(child:DisplayObject):DisplayObject
 +    {
 +        childManager.removingChild(child);
 +        super.removeChild(child);
 +        childManager.childRemoved(child);
 +
 +        return child;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_removeChildAt(index:int):DisplayObject
 +    {
 +        var child:DisplayObject = super.getChildAt(index);
 +
 +        childManager.removingChild(child);
 +
 +        super.removeChildAt(index);
 +
 +        childManager.childRemoved(child);
 +
 +        return child;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_getChildAt(index:int):DisplayObject
 +    {
 +        return super.getChildAt(index);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_getChildByName(name:String):DisplayObject
 +    {
 +        return super.getChildByName(name);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_getChildIndex(child:DisplayObject):int
 +    {
 +        return super.getChildIndex(child);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_setChildIndex(child:DisplayObject, newIndex:int):void
 +    {
 +        super.setChildIndex(child, newIndex);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_getObjectsUnderPoint(pt:Point):Array
 +    {
 +        return super.getObjectsUnderPoint(pt);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal function rawChildren_contains(child:DisplayObject):Boolean
 +    {
 +        return super.contains(child);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods: Security
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  Calls Security.allowDomain() for the SWF associated with this SystemManager
 +     *  plus all the SWFs assocatiated with RSLs preloaded by this SystemManager.
 +     * 
 +     */  
 +    public function allowDomain(... domains):void
 +    {
 +        // Overridden by compiler generated code.
 +    }
 +    
 +    /**
 +     *  Calls Security.allowInsecureDomain() for the SWF associated with this SystemManager
 +     *  plus all the SWFs assocatiated with RSLs preloaded by this SystemManager.
 +     * 
 +     */  
 +    public function allowInsecureDomain(... domains):void
 +    {
 +        // Overridden by compiler generated code.
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods: Measurement and Layout
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  A convenience method for determining whether to use the
 +     *  explicit or measured width.
 +     *
 +     *  @return A Number that is the <code>explicitWidth</code> if defined,
 +     *  or the <code>measuredWidth</code> property if not.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getExplicitOrMeasuredWidth():Number
 +    {
 +        return !isNaN(explicitWidth) ? explicitWidth : measuredWidth;
 +    }
 +
 +    /**
 +     *  A convenience method for determining whether to use the
 +     *  explicit or measured height.
 +     *
 +     *  @return A Number that is the <code>explicitHeight</code> if defined,
 +     *  or the <code>measuredHeight</code> property if not.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getExplicitOrMeasuredHeight():Number
 +    {
 +        return !isNaN(explicitHeight) ? explicitHeight : measuredHeight;
 +    }
 +
 +    /**
 +     *  Calling the <code>move()</code> method
 +     *  has no effect as it is directly mapped
 +     *  to the application window or the loader.
 +     *
 +     *  @param x The new x coordinate.
 +     *
 +     *  @param y The new y coordinate.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function move(x:Number, y:Number):void
 +    {
 +    }
 +
 +    /**
 +     *  Calling the <code>setActualSize()</code> method
 +     *  has no effect if it is directly mapped
 +     *  to the application window and if it is the top-level window.
 +     *  Otherwise attempts to resize itself, clipping children if needed.
 +     *
 +     *  @param newWidth The new width.
 +     *
 +     *  @param newHeight The new height.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setActualSize(newWidth:Number, newHeight:Number):void
 +    {
 +        if (isStageRoot) return;
 +
 +        // mouseCatcher is a mask if not stage root
 +        // sometimes it is not in sync so we always
 +        // sync it up
 +        if (mouseCatcher)
 +        {
 +            mouseCatcher.width = newWidth;
 +            mouseCatcher.height = newHeight;
 +        }
 +
 +        if (_width != newWidth || _height != newHeight)
 +        {
 +            _width = newWidth;
 +            _height = newHeight;
 +
 +            dispatchEvent(new Event(Event.RESIZE));
 +        }
 +    }
 +
 +
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods: Other
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getDefinitionByName(name:String):Object
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        var domain:ApplicationDomain =
 +            !topLevel && parent is Loader ?
 +            Loader(parent).contentLoaderInfo.applicationDomain :
 +            info()["currentDomain"] as ApplicationDomain;
 +		var dm:DefinitionManager = new DefinitionManager(domain);
 +		}
 +		COMPILE::JS
 +		{
 +			var dm:DefinitionManager = new DefinitionManager();			
 +		}
 +		
 +        //trace("SysMgr.getDefinitionByName domain",domain,"currentDomain",info()["currentDomain"]);    
 +            
 +        var definition:Object;
 +
 +        if (dm.hasDefinition(name))
 +        {
 +            definition = dm.getDefinition(name);
 +            //trace("SysMgr.getDefinitionByName got definition",definition,"name",name);
 +        }
 +
 +        return definition;
 +    }
 +
 +    /**
 +     *  Returns the root DisplayObject of the SWF that contains the code
 +     *  for the given object.
 +     *
 +     *  @param object Any Object. 
 +     * 
 +     *  @return The root DisplayObject
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function getSWFRoot(object:Object):DisplayObject
 +    {
 +        var className:String = getQualifiedClassName(object);
 +
 +		COMPILE::LATER
 +		{
 +        for (var p:* in allSystemManagers)
 +        {
 +            var sm:ISystemManager = p as ISystemManager;
 +            var domain:ApplicationDomain = sm.loaderInfo.applicationDomain;
 +            try
 +            {
 +                var cls:Class = Class(domain.getDefinition(className));
 +                if (object is cls)
 +                    return sm as DisplayObject;
 +            }
 +            catch(e:Error)
 +            {
 +            }
 +        }
 +        return null;
 +		}
 +		return SystemManagerGlobals.topLevelSystemManagers[0] as DisplayObject;
 +    }
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function isTopLevel():Boolean
 +    {
 +        return topLevel;
 +    }
 +
 +    /**
 +     * @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */ 
 +    public function isTopLevelRoot():Boolean
 +    {
 +        return isStageRoot || isBootstrapRoot;
 +    }
 +    
 +    /**
 +         *  Determines if the given DisplayObject is the 
 +     *  top-level window.
 +     *
 +     *  @param object The DisplayObject to test.
 +     *
 +     *  @return <code>true</code> if the given DisplayObject is the 
 +     *  top-level window.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function isTopLevelWindow(object:DisplayObject):Boolean
 +    {
 +        return object is IUIComponent &&
 +               IUIComponent(object) == topLevelWindow;
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function isFontFaceEmbedded(textFormat:TextFormat):Boolean
 +    {
 +        var fontName:String = textFormat.font;
 +        var bold:Boolean = textFormat.bold;
 +        var italic:Boolean = textFormat.italic;
 +
 +        var fontList:Array = Font.enumerateFonts();
 +        
 +        var n:int = fontList.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var font:Font = Font(fontList[i]);
 +            if (font.fontName == fontName)
 +            {
 +                var style:String = "regular";
 +                if (bold && italic)
 +                    style = "boldItalic";
 +                else if (bold)
 +                    style = "bold";
 +                else if (italic)
 +                    style = "italic";
 +
 +                if (font.fontStyle == style)
 +                    return true;
 +            }
 +        }
 +
 +        if (!fontName ||
 +            !embeddedFontList ||
 +            !embeddedFontList[fontName])
 +        {
 +            return false;
 +        }
 +
 +        var info:Object = embeddedFontList[fontName];
 +
 +        return !((bold && !info.bold) ||
 +                 (italic && !info.italic) ||
 +                 (!bold && !italic && !info.regular));
 +    }
 +
 +    /**
 +     *  @private
 +     *  Makes the mouseCatcher the same size as the stage,
 +     *  filling it with transparent pixels.
 +     */
 +    private function resizeMouseCatcher():void
 +    {
 +        if (mouseCatcher)
 +        {
 +            try
 +            {
 +            var g:Graphics = mouseCatcher.graphics;
 +            var s:Rectangle = screen;
 +            g.clear();
 +            g.beginFill(0x000000, 0);
 +            g.drawRect(0, 0, s.width, s.height);
 +            g.endFill();
 +            }
 +            catch (e:Error)
 +            {
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +					if (!(e is SecurityError))
 +						throw e;
 +				}
 +                // trace("resizeMouseCatcher: ignoring security error " + e);
 +            }
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private function initHandler(event:Event):void
 +    {
 +        CONFIG::performanceInstrumentation
 +        {
 +            var perfUtil:mx.utils.PerfUtil = mx.utils.PerfUtil.getInstance();
 +            perfUtil.markTime("SystemManager.initHandler().start");
 +        }
 +        
 +        // we can still be the top level root if we can access our
 +        // parent and get a positive response to the query or
 +        // or there is not a listener for the new application event
 +        // that SWFLoader always adds. 
 +		COMPILE::LATER
 +		{
 +	        if (!isStageRoot)
 +	        {
 +	            if (root.loaderInfo.parentAllowsChild)
 +	            {
 +	                try
 +	                {
 +	                    if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)) ||
 +	                        // use string literal to avoid link dependency on SWFBridgeEvent.BRIDGE_NEW_APPLICATION
 +	                        !root.loaderInfo.sharedEvents.hasEventListener("bridgeNewApplication"))
 +	                        isBootstrapRoot = true;
 +	                }
 +	                catch (e:Error)
 +	                {
 +	                }
 +	            }
 +	        }
 +
 +			allSystemManagers[this] = this.loaderInfo.url;
 +		}
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        root.loaderInfo.removeEventListener(Event.INIT, initHandler);
 +		}
 +
 +        if (!SystemManagerGlobals.info)
 +            SystemManagerGlobals.info = info();
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        if (!SystemManagerGlobals.parameters)
 +            SystemManagerGlobals.parameters = loaderInfo.parameters;
 +        var docFrame:int = (totalFrames == 1)? 0 : 1;
 +        addEventListener(Event.ENTER_FRAME, docFrameListener);
 +		}
 +
 +        /*
 +        addFrameScript(docFrame, docFrameHandler);
 +        for (var f:int = docFrame + 1; f < totalFrames; ++f)
 +        {
 +            addFrameScript(f, extraFrameHandler);
 +        }
 +        */
 +
 +        initialize();
 +
 +        CONFIG::performanceInstrumentation
 +        {
 +            perfUtil.markTime("SystemManager.initHandler().end");
 +        }
 +    }
 +
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private function docFrameListener(event:Event):void
 +    {
 +        if (currentFrame == 2)
 +        {
 +            removeEventListener(Event.ENTER_FRAME, docFrameListener);
 +            if (totalFrames > 2)
 +                addEventListener(Event.ENTER_FRAME, extraFrameListener);
 +
 +            docFrameHandler();
 +        }
 +    }
 +
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private function extraFrameListener(event:Event):void
 +    {
 +        if (lastFrame == currentFrame)
 +            return;
 +
 +        lastFrame = currentFrame;
 +
 +        if (currentFrame + 1 > totalFrames)
 +            removeEventListener(Event.ENTER_FRAME, extraFrameListener);
 +
 +        extraFrameHandler();
 +    }
 +
 +    /**
 +     *  @private
 +     *  Once the swf has been fully downloaded,
 +     *  advance the playhead to the next frame.
 +     *  This will cause the framescript to run, which runs frameEndHandler().
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private function preloader_preloaderDocFrameReadyHandler(event:Event):void
 +    {
 +        // Advance the next frame
 +        preloader.removeEventListener(FlexEvent.PRELOADER_DOC_FRAME_READY,
 +                                      preloader_preloaderDocFrameReadyHandler);
 +
 +        deferredNextFrame();
 +    }
 +
 +    /**
 +     *  @private
 +     *  Remove the preloader and add the application as a child.
 +     */
 +    private function preloader_preloaderDoneHandler(event:Event):void
 +    {
 +        var app:IUIComponent = topLevelWindow;
 +
 +        // Once the preloader dispatches the PRELOADER_DONE event, remove the preloader
 +        // and add the application as the child
 +        preloader.removeEventListener(FlexEvent.PRELOADER_DONE,
 +                                      preloader_preloaderDoneHandler);
 +		COMPILE::LATER
 +		{
 +			preloader.removeEventListener(RSLEvent.RSL_COMPLETE, 
 +				preloader_rslCompleteHandler);				
 +		}
 +
 +        _popUpChildren.removeChild(preloader);
 +        preloader = null;
 +
 +        // Add the mouseCatcher as child 0.
 +        mouseCatcher = new Sprite();
 +        mouseCatcher.name = "mouseCatcher";
 +        // Must use addChildAt because a creationComplete handler can create a
 +        // dialog and insert it at 0.
 +        noTopMostIndex = noTopMostIndex + 1;
 +        super.addChildAt(mouseCatcher, 0);  
 +        resizeMouseCatcher();
 +		COMPILE::LATER
 +		{
 +        if (!topLevel)
 +        {
 +            mouseCatcher.visible = false;
 +            mask = mouseCatcher;
 +        }
 +		}
 +        // Add the application as child 1.
 +        noTopMostIndex = noTopMostIndex + 1;
 +        super.addChildAt(DisplayObject(app), 1);
 +
 +        CONFIG::performanceInstrumentation
 +        {
 +            var perfUtil:mx.utils.PerfUtil = mx.utils.PerfUtil.getInstance();
 +            perfUtil.markTime("APPLICATION_COMPLETE");
 +            perfUtil.finishSampling("Application Startup");
 +        }
 +
 +        // Dispatch the applicationComplete event from the Application
 +        // and then agaom from the SystemManager
 +        // (so that loading apps know we're done).
 +        app.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
 +        dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
 +    }
 +
 +    /**
 +     *  @private
 +     *  The preloader has completed loading an RSL.
 +     */
 +	COMPILE::LATER
 +    private function preloader_rslCompleteHandler(event:RSLEvent):void
 +    {
 +        if (!event.isResourceModule && event.loaderInfo)
 +        {
 +            var rsl:Vector.<RSLData> = Vector.<RSLData>(rslDataList[event.rslIndex]);
 +            var moduleFactory:IFlexModuleFactory = this;
 +            if (rsl && r

<TRUNCATED>

[04/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - - Fixed the build for 'Flat' by using a new config option 'includeLookupOnly'

Posted by ah...@apache.org.
- Fixed the build for 'Flat' by using a new config option 'includeLookupOnly'


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

Branch: refs/heads/spark
Commit: ca24dc2e675f364f8d72c547fa22b278b53c92d0
Parents: a47cadf
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Jun 9 09:44:38 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Jun 9 09:44:38 2016 +0200

----------------------------------------------------------------------
 frameworks/projects/Flat/pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ca24dc2e/frameworks/projects/Flat/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/pom.xml b/frameworks/projects/Flat/pom.xml
index d27c3fd..147a31c 100644
--- a/frameworks/projects/Flat/pom.xml
+++ b/frameworks/projects/Flat/pom.xml
@@ -64,6 +64,7 @@
                             <path>generated-sources/flexjs/*</path>
                         </include-file>
                     </includeFiles>
+                    <includeLookupOnly>true</includeLookupOnly>
                 </configuration>
                 <dependencies>
                     <dependency>


[41/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
index f455a5c,0000000..bf66b1e
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
@@@ -1,15039 -1,0 +1,15039 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{   
 +/*
 +import flash.accessibility.Accessibility;
 +import flash.accessibility.AccessibilityProperties;
 +import flash.display.BlendMode;
 +*/
 +import flex.display.TopOfDisplayList;
 +import flex.events.Event;
 +import flex.events.EventPhase;
 +import flex.ui.Keyboard;
 +
 +import org.apache.flex.events.Event;
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;		
 +	import flash.display.InteractiveObject;		
 +//	import flash.display.Sprite;
 +	import flash.display.GradientType;
 +	import flash.display.Graphics;
 +	import flash.display.Loader;
 +	import flash.events.Event;
 +	import flash.geom.Matrix;
 +	import flash.geom.Matrix3D;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;	
 +	import flex.display.DisplayObjectContainer;	
 +	import flex.display.InteractiveObject;	
 +	import flex.display.Graphics;
 +	import flex.display.Loader;
 +}
 +import flex.display.Sprite;	
 +/*
 +import flash.display.Shader;
 +*/
 +import mx.events.FocusEvent;
 +import mx.events.KeyboardEvent;
 +/*
 +import flash.events.IEventDispatcher;
 +import flash.geom.ColorTransform;
 +import flash.geom.PerspectiveProjection;
 +*/
 +import org.apache.flex.geom.Point;
 +import org.apache.flex.geom.Rectangle;
 +import org.apache.flex.utils.PointUtils;
 +/*
 +import flash.geom.Transform;
 +import flash.geom.Vector3D;
 +import flash.system.ApplicationDomain;
 +import flash.system.Capabilities;
 +import flash.utils.Dictionary;
 +*/
 +import flex.text.TextLineMetrics;
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.text.TextFormatAlign;		
 +}
 +COMPILE::JS
 +{
 +	import flex.text.TextFormatAlign;
 +}
 +import org.apache.flex.reflection.getQualifiedClassName;
 +
 +import mx.automation.IAutomationObject;
 +import mx.binding.Binding;
 +import mx.binding.BindingManager;
 +import mx.binding.FunctionReturnWatcher;
 +import mx.binding.PropertyWatcher;
 +import mx.binding.Watcher;
 +import mx.binding.StaticPropertyWatcher;
 +import mx.binding.XMLWatcher;
 +import mx.controls.IFlexContextMenu;
 +import mx.core.LayoutDirection;
 +import mx.effects.EffectManager;
 +import mx.effects.IEffect;
 +import mx.effects.IEffectInstance;
 +import mx.events.ChildExistenceChangedEvent;
 +import mx.events.DynamicEvent;
 +import mx.events.EffectEvent;
 +import mx.events.FlexEvent;
 +import mx.events.MoveEvent;
 +import mx.events.PropertyChangeEvent;
 +import mx.events.ResizeEvent;
 +import mx.events.StateChangeEvent;
 +import mx.events.ValidationResultEvent;
 +/*
 +import mx.filters.BaseFilter;
 +import mx.filters.IBitmapFilter;
 +*/
 +import mx.geom.RoundedRectangle;
 +/*
 +import mx.geom.Transform;
 +import mx.geom.TransformOffsets;
 +import mx.graphics.shaderClasses.ColorBurnShader;
 +import mx.graphics.shaderClasses.ColorDodgeShader;
 +import mx.graphics.shaderClasses.ColorShader;
 +import mx.graphics.shaderClasses.ExclusionShader;
 +import mx.graphics.shaderClasses.HueShader;
 +import mx.graphics.shaderClasses.LuminosityShader;
 +import mx.graphics.shaderClasses.SaturationShader;
 +import mx.graphics.shaderClasses.SoftLightShader;
 +*/
 +import mx.managers.CursorManager;
 +import mx.managers.ICursorManager;
 +import mx.managers.IFocusManager;
 +import mx.managers.IFocusManagerComponent;
 +import mx.managers.IFocusManagerContainer;
 +import mx.managers.ILayoutManagerClient;
 +import mx.managers.ISystemManager;
 +import mx.managers.IToolTipManagerClient;
 +import mx.managers.SystemManagerGlobals;
 +import mx.managers.SystemManager;
 +import mx.managers.ToolTipManager;
 +import mx.resources.IResourceManager;
 +import mx.resources.ResourceManager;
 +import mx.states.State;
 +import mx.states.Transition;
 +import mx.styles.CSSStyleDeclaration;
 +import mx.styles.IAdvancedStyleClient;
 +import mx.styles.ISimpleStyleClient;
 +import mx.styles.IStyleClient;
 +import mx.styles.IStyleManager2;
 +import mx.styles.StyleProtoChain;
 +import mx.styles.StyleManager;
 +import mx.utils.ColorUtil;
 +import mx.utils.GraphicsUtil;
 +/*
 +import mx.utils.MatrixUtil;
 +*/
 +import mx.utils.NameUtil;
 +import mx.utils.StringUtil;
 +/*
 +import mx.utils.TransformUtil;
 +*/
 +import mx.validators.IValidatorListener;
 +import mx.validators.ValidationResult;
 +
 +use namespace mx_internal;
 +
 +import flex.system.DefinitionManager;
 +import org.apache.flex.events.EventDispatcher;
 +import org.apache.flex.events.IEventDispatcher;
 +
 +// Excluding the property to enable code hinting for the layoutDirection style
 +[Exclude(name="layoutDirection", kind="property")]
 +
 +//--------------------------------------
 +//  Lifecycle events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched when the component is added to a container as a content child
 + *  by using the <code>addChild()</code>, <code>addChildAt()</code>, 
 + *  <code>addElement()</code>, or <code>addElementAt()</code> method.
 + *  If the component is added to the container as a noncontent child by
 + *  using the <code>rawChildren.addChild()</code> or
 + *  <code>rawChildren.addChildAt()</code> method, the event is not dispatched.
 + *
 + * <p>This event is only dispatched when there are one or more relevant listeners 
 + * attached to the dispatching object.</p>
 + * 
 + *  @eventType mx.events.FlexEvent.ADD
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="add", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when the component has finished its construction,
 + *  property processing, measuring, layout, and drawing.
 + *
 + *  <p>At this point, depending on its <code>visible</code> property,
 + *  the component is not visible even though it has been drawn.</p>
 + *
 + *  @eventType mx.events.FlexEvent.CREATION_COMPLETE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="creationComplete", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when an object has had its <code>commitProperties()</code>,
 + *  <code>measure()</code>, and
 + *  <code>updateDisplayList()</code> methods called (if needed).
 + *
 + *  <p>This is the last opportunity to alter the component before it is
 + *  displayed. All properties have been committed and the component has
 + *  been measured and layed out.</p>
 + *
 + *  <p>This event is only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + * 
 + *  @eventType mx.events.FlexEvent.UPDATE_COMPLETE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="updateComplete", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when an object's state changes from visible to invisible.
 + * 
 + *  <p>This event is only dispatched when there are one or more relevant listeners 
 + *  attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.FlexEvent.HIDE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="hide", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when the component has finished its construction
 + *  and has all initialization properties set.
 + *
 + *  <p>After the initialization phase, properties are processed, the component
 + *  is measured, laid out, and drawn, after which the
 + *  <code>creationComplete</code> event is dispatched.</p>
 + * 
 + *  @eventType mx.events.FlexEvent.INITIALIZE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="initialize", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when the object has moved.
 + *
 + *  <p>You can move the component by setting the <code>x</code>
 + *  or <code>y</code> properties, by calling the <code>move()</code>
 + *  method, by setting one
 + *  of the following properties either on the component or on other
 + *  components such that the LayoutManager needs to change the
 + *  <code>x</code> or <code>y</code> properties of the component:</p>
 + *
 + *  <ul>
 + *    <li><code>minWidth</code></li>
 + *    <li><code>minHeight</code></li>
 + *    <li><code>maxWidth</code></li>
 + *    <li><code>maxHeight</code></li>
 + *    <li><code>explicitWidth</code></li>
 + *    <li><code>explicitHeight</code></li>
 + *  </ul>
 + *
 + *  <p>When you call the <code>move()</code> method, the <code>move</code>
 + *  event is dispatched before the method returns.
 + *  In all other situations, the <code>move</code> event is not dispatched
 + *  until after the property changes.</p>
 + * 
 + *  <p>This event only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.MoveEvent.MOVE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="move", type="mx.events.MoveEvent")]
 +
 +/**
 + *  Dispatched at the beginning of the component initialization sequence.
 + *  The component is in a very raw state when this event is dispatched.
 + *  Many components, such as the Button control, create internal child
 + *  components to implement functionality; for example, the Button control
 + *  creates an internal UITextField component to represent its label text.
 + *  When Flex dispatches the <code>preinitialize</code> event,
 + *  the children, including the internal children, of a component
 + *  have not yet been created.
 + * 
 + *  @eventType mx.events.FlexEvent.PREINITIALIZE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="preinitialize", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when the component is removed from a container as a content child
 + *  by using the <code>removeChild()</code>, <code>removeChildAt()</code>,
 + *  <code>removeElement()</code>, or <code>removeElementAt()</code> method.
 + *  If the component is removed from the container as a noncontent child by
 + *  using the <code>rawChildren.removeChild()</code> or
 + *  <code>rawChildren.removeChildAt()</code> method, the event is not dispatched.
 + *
 + * <p>This event only dispatched when there are one or more relevant listeners 
 + * attached to the dispatching object.</p>
 + * 
 + *  @eventType mx.events.FlexEvent.REMOVE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="remove", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when the component is resized.
 + *
 + *  <p>You can resize the component by setting the <code>width</code> or
 + *  <code>height</code> property, by calling the <code>setActualSize()</code>
 + *  method, or by setting one of
 + *  the following properties either on the component or on other components
 + *  such that the LayoutManager needs to change the <code>width</code> or
 + *  <code>height</code> properties of the component:</p>
 + *
 + *  <ul>
 + *    <li><code>minWidth</code></li>
 + *    <li><code>minHeight</code></li>
 + *    <li><code>maxWidth</code></li>
 + *    <li><code>maxHeight</code></li>
 + *    <li><code>explicitWidth</code></li>
 + *    <li><code>explicitHeight</code></li>
 + *  </ul>
 + *
 + *  <p>The <code>resize</code> event is not
 + *  dispatched until after the property changes.</p>
 + * 
 + *  <p>This event only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.ResizeEvent.RESIZE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="resize", type="mx.events.ResizeEvent")]
 +
 +/**
 + *  Dispatched when an object's state changes from invisible to visible.
 + * 
 + *  <p>This event is only dispatched when there are one or more relevant listeners 
 + *  attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.FlexEvent.SHOW
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="show", type="mx.events.FlexEvent")]
 +
 +//--------------------------------------
 +//  Mouse events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched from a component opened using the PopUpManager
 + *  when the user clicks outside it.
 + *
 + *  @eventType mx.events.FlexMouseEvent.MOUSE_DOWN_OUTSIDE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="mouseDownOutside", type="mx.events.FlexMouseEvent")]
 +
 +/**
 + *  Dispatched from a component opened using the PopUpManager
 + *  when the user scrolls the mouse wheel outside it.
 + *
 + *  @eventType mx.events.FlexMouseEvent.MOUSE_WHEEL_OUTSIDE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="mouseWheelOutside", type="mx.events.FlexMouseEvent")]
 +
 +//--------------------------------------
 +//  Validation events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched when values are changed programmatically
 + *  or by user interaction.
 + *
 + *  <p>Because a programmatic change triggers this event, make sure
 + *  that any <code>valueCommit</code> event handler does not change
 + *  a value that causes another <code>valueCommit</code> event.
 + *  For example, do not change a control's <code>dataProvider</code>
 + *  property in a <code>valueCommit</code> event handler. </p>
 + *
 + *  @eventType mx.events.FlexEvent.VALUE_COMMIT
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="valueCommit", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when a component is monitored by a Validator
 + *  and the validation failed.
 + *
 + *  @eventType mx.events.FlexEvent.INVALID
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="invalid", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when a component is monitored by a Validator
 + *  and the validation succeeded.
 + *
 + *  @eventType mx.events.FlexEvent.VALID
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="valid", type="mx.events.FlexEvent")]
 +
 +//--------------------------------------
 +//  Drag-and-drop events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched by a component when the user moves the mouse over the component
 + *  during a drag operation.
 + *  In an application running in Flash Player,
 + *  the event is dispatched many times when you move the mouse over any component.
 + *  In an application running in AIR, the event is dispatched only once.
 + *
 + *  <p>In order to be a valid drop target, you must define a handler
 + *  for this event.
 + *  In the handler, you can change the appearance of the drop target
 + *  to provide visual feedback to the user that the component can accept
 + *  the drag.
 + *  For example, you could draw a border around the drop target,
 + *  or give focus to the drop target.</p>
 + *
 + *  <p>If you want to accept the drag, you must call the
 + *  <code>DragManager.acceptDragDrop()</code> method. If you don't
 + *  call <code>acceptDragDrop()</code>, you do not get any of the
 + *  other drag events.</p>
 + *
 + *  <p>In Flash Player, the value of the <code>action</code> property is always
 + *  <code>DragManager.MOVE</code>, even if you are doing a copy.
 + *  This is because the <code>dragEnter</code> event occurs before
 + *  the control recognizes that the Control key is pressed to signal a copy.
 + *  The <code>action</code> property of the event object for the
 + *  <code>dragOver</code> event does contain a value that signifies the type of
 + *  drag operation. You can change the type of drag action by calling the
 + *  <code>DragManager.showFeedback()</code> method.</p>
 + *
 + *  <p>In AIR, the default value of the <code>action</code> property is
 + *  <code>DragManager.COPY</code>.</p>
 + *
 + *  <p>Because of the way data to a Tree control is structured,
 + *  the Tree control handles drag and drop differently from the other list-based controls.
 + *  For the Tree control, the event handler for the <code>dragDrop</code> event
 + *  only performs an action when you move or copy data in the same Tree control,
 + *  or copy data to another Tree control.
 + *  If you drag data from one Tree control and drop it onto another Tree control
 + *  to move the data, the event handler for the <code>dragComplete</code> event
 + *  actually performs the work to add the data to the destination Tree control,
 + *  rather than the event handler for the dragDrop event,
 + *  and also removes the data from the source Tree control.
 + *  This is necessary because to reparent the data being moved,
 + *  Flex must remove it first from the source Tree control.</p>
 + *
 + *  @see mx.managers.DragManager
 + *
 + *  @eventType mx.events.DragEvent.DRAG_ENTER
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dragEnter", type="mx.events.DragEvent")]
 +
 +/**
 + *  Dispatched by a component when the user moves the mouse while over the component
 + *  during a drag operation.
 + *  In Flash Player, the event is dispatched
 + *  when you drag an item over a valid drop target.
 + *  In AIR, the event is dispatched when you drag an item over
 + *  any component, even if the component is not a valid drop target.
 + *
 + *  <p>In the handler, you can change the appearance of the drop target
 + *  to provide visual feedback to the user that the component can accept
 + *  the drag.
 + *  For example, you could draw a border around the drop target,
 + *  or give focus to the drop target.</p>
 + *
 + *  <p>Handle this event to perform additional logic
 + *  before allowing the drop, such as dropping data to various locations
 + *  in the drop target, reading keyboard input to determine if the
 + *  drag-and-drop action is a move or copy of the drag data, or providing
 + *  different types of visual feedback based on the type of drag-and-drop
 + *  action.</p>
 + *
 + *  <p>You can also change the type of drag action by changing the
 + *  <code>DragManager.showFeedback()</code> method.
 + *  The default value of the <code>action</code> property is
 + *  <code>DragManager.MOVE</code>.</p>
 + *
 + *  @see mx.managers.DragManager
 + *
 + *  @eventType mx.events.DragEvent.DRAG_OVER
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dragOver", type="mx.events.DragEvent")]
 +
 +/**
 + *  Dispatched by the component when the user drags outside the component,
 + *  but does not drop the data onto the target.
 + *
 + *  <p>You use this event to restore the drop target to its normal appearance
 + *  if you modified its appearance as part of handling the
 + *  <code>dragEnter</code> or <code>dragOver</code> event.</p>
 + *
 + *  @eventType mx.events.DragEvent.DRAG_EXIT
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dragExit", type="mx.events.DragEvent")]
 +
 +/**
 + *  Dispatched by the drop target when the user releases the mouse over it.
 + *
 + *  <p>You use this event handler to add the drag data to the drop target.</p>
 + *
 + *  <p>If you call <code>Event.preventDefault()</code> in the event handler
 + *  for the <code>dragDrop</code> event for
 + *  a Tree control when dragging data from one Tree control to another,
 + *  it prevents the drop.</p>
 + *
 + *  @eventType mx.events.DragEvent.DRAG_DROP
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dragDrop", type="mx.events.DragEvent")]
 +
 +/**
 + *  Dispatched by the drag initiator (the component that is the source
 + *  of the data being dragged) when the drag operation completes,
 + *  either when you drop the dragged data onto a drop target or when you end
 + *  the drag-and-drop operation without performing a drop.
 + *
 + *  <p>You can use this event to perform any final cleanup
 + *  of the drag-and-drop operation.
 + *  For example, if you drag a List control item from one list to another,
 + *  you can delete the List control item from the source if you no longer
 + *  need it.</p>
 + *
 + *  <p>If you call <code>Event.preventDefault()</code> in the event handler
 + *  for the <code>dragComplete</code> event for
 + *  a Tree control when dragging data from one Tree control to another,
 + *  it prevents the drop.</p>
 + *
 + *  @eventType mx.events.DragEvent.DRAG_COMPLETE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dragComplete", type="mx.events.DragEvent")]
 +
 +/**
 + *  Dispatched by the drag initiator when starting a drag operation.
 + *  This event is used internally by the list-based controls;
 + *  you do not handle it when implementing drag and drop.
 + *  If you want to control the start of a drag-and-drop operation,
 + *  use the <code>mouseDown</code> or <code>mouseMove</code> event.
 + *
 + *  @eventType mx.events.DragEvent.DRAG_START
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="dragStart", type="mx.events.DragEvent")]
 +
 +//--------------------------------------
 +//  Effect events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched just before an effect starts.
 + *
 + *  <p>The effect does not start changing any visuals
 + *  until after this event is fired.</p>
 + *
 + *  @eventType mx.events.EffectEvent.EFFECT_START
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="effectStart", type="mx.events.EffectEvent")]
 +
 +/**
 + *  Dispatched after an effect is stopped, which happens
 + *  only by a call to <code>stop()</code> on the effect.
 + *
 + *  <p>The effect then dispatches the EFFECT_END event
 + *  as the effect finishes. The purpose of the EFFECT_STOP
 + *  event is to let listeners know that the effect came to
 + *  a premature end, rather than ending naturally or as a 
 + *  result of a call to <code>end()</code>.</p>
 + *
 + *  @eventType mx.events.EffectEvent.EFFECT_STOP
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="effectStop", type="mx.events.EffectEvent")]
 +
 +/**
 + *  Dispatched after an effect ends.
 + *
 + *  <p>The effect makes the last set of visual changes
 + *  before this event is fired, but those changes are not 
 + *  rendered on the screen.
 + *  Thus, you might have to use the <code>callLater()</code> method
 + *  to delay any other changes that you want to make until after the
 + *  changes have been rendered onscreen.</p>
 + *
 + *  @eventType mx.events.EffectEvent.EFFECT_END
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="effectEnd", type="mx.events.EffectEvent")]
 +
 +
 +//--------------------------------------
 +//  State events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched after the <code>currentState</code> property changes,
 + *  but before the view state changes.
 + * 
 + *  <p>This event is only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.StateChangeEvent.CURRENT_STATE_CHANGING
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="currentStateChanging", type="mx.events.StateChangeEvent")]
 +
 +/**
 + *  Dispatched after the view state has changed.
 + * 
 + *  <p>This event is only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.StateChangeEvent.CURRENT_STATE_CHANGE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="currentStateChange", type="mx.events.StateChangeEvent")]
 +
 +/**
 + *  Dispatched after the component has entered a view state.
 + * 
 + *  <p>This event is only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.FlexEvent.ENTER_STATE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="enterState", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched just before the component exits a view state.
 + * 
 + *  <p>This event is only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.FlexEvent.EXIT_STATE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="exitState", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched after the component has entered a new state and
 + *  any state transition animation to that state has finished playing.
 + *
 + *  The event is dispatched immediately if there's no transition playing
 + *  between the states.
 + *
 + *  If the component switches to a different state while the transition is
 + *  underway, this event will be dispatched after the component completes the
 + *  transition to that new state.
 + * 
 + *  <p>This event is only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.FlexEvent.STATE_CHANGE_COMPLETE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +[Event(name="stateChangeComplete", type="mx.events.FlexEvent")]
 +
 +/**
 + *  Dispatched when a component interrupts a transition to its current
 + *  state in order to switch to a new state. 
 + * 
 + *  <p>This event is only dispatched when there are one or more 
 + *  relevant listeners attached to the dispatching object.</p>
 + *
 + *  @eventType mx.events.FlexEvent.STATE_CHANGE_INTERRUPTED
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +[Event(name="stateChangeInterrupted", type="mx.events.FlexEvent")]
 +
 +
 +//--------------------------------------
 +//  TouchInteraction events
 +//--------------------------------------
 +
 +/**
 + *  A cancellable event, dispatched by a component in an attempt to 
 + *  respond to a touch interaction user gesture.
 + * 
 + *  <p>The event is a bubbling event dispatched on the 
 + *  DisplayObject that the touch interaction
 + *  started (where the mouseDown/touchBegin occurred).</p>
 + * 
 + *  <p>Components responding to touch interactions should listen for
 + *  touch interaction events to coordinate with other components around 
 + *  what type of touch interaction the user intended to make and which component 
 + *  is responding to that touch interaction.</p>
 + * 
 + *  <p>A Scroller component will dispatch a touchInteractionStarting event 
 + *  to alert other components that may be responding to the same user's 
 + *  touch interaction that it would like to take control of this touch interaction.
 + *  This is an opportunity for other components to cancel the Scroller's 
 + *  action and to maintain control over this touch interaction.</p>
 + *
 + *  @eventType mx.events.TouchInteractionEvent.TOUCH_INTERACTION_STARTING
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +[Event(name="touchInteractionStarting", type="mx.events.TouchInteractionEvent")]
 +
 +/**
 + *  A non-cancellable event, dispatched by a component when it starts
 + *  responding to a touch interaction user gesture.
 + * 
 + *  <p>The event is a bubbling event dispatched on the 
 + *  DisplayObject that the touch interaction 
 + *  started (where the mouseDown/touchBegin occurred).</p>
 + * 
 + *  <p>Components responding to touch interactions should listen for
 + *  touch interaction events to coordinate with other components around 
 + *  what type of touch interaction the user intended to make and which component 
 + *  is responding to that touch interaction.</p>
 + * 
 + *  <p>A Scroller component will dispatch a touchInteractionStart event 
 + *  to alert other components that may be responding to the same user's 
 + *  touch interaction that it is taking control of this touch interaction.
 + *  When they see this event, other components should stop responding 
 + *  to the touch interaction, remove any visual indications that it is 
 + *  responding to the touch interaction, and perform other clean up.</p>
 + *
 + *  @eventType mx.events.TouchInteractionEvent.TOUCH_INTERACTION_START
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +[Event(name="touchInteractionStart", type="mx.events.TouchInteractionEvent")]
 +
 +/**
 + *  A non-cancellable event, dispatched by a component when it is done
 + *  responding to a touch interaction user gesture.
 + * 
 + *  <p>The event is a bubbling event dispatched on the 
 + *  DisplayObject that the touch interaction 
 + *  started (where the mouseDown/touchBegin occurred).</p>
 + * 
 + *  <p>Components responding to touch interactions should listen for
 + *  touch interaction events to coordinate with other components around 
 + *  what type of touch interaction the user intended to make and which component 
 + *  is responding to that touch interaction.</p>
 + * 
 + *  <p>A Scroller component will dispatch a touchInteractionEnd event 
 + *  to alert other components that it is done responding to the user's
 + *  touch interaction.</p>
 + *
 + *  @eventType mx.events.TouchInteractionEvent.TOUCH_INTERACTION_END
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +[Event(name="touchInteractionEnd", type="mx.events.TouchInteractionEvent")]
 +
 +//--------------------------------------
 +//  Tooltip events
 +//--------------------------------------
 +
 +/**
 + *  Dispatched by the component when it is time to create a ToolTip.
 + *
 + *  <p>If you create your own IToolTip object and place a reference
 + *  to it in the <code>toolTip</code> property of the event object
 + *  that is passed to your <code>toolTipCreate</code> handler,
 + *  the ToolTipManager displays your custom ToolTip.
 + *  Otherwise, the ToolTipManager creates an instance of
 + *  <code>ToolTipManager.toolTipClass</code> to display.</p>
 + *
 + *  <p>The sequence of ToolTip events is <code>toolTipStart</code>,
 + *  <code>toolTipCreate</code>, <code>toolTipShow</code>,
 + *  <code>toolTipShown</code>, <code>toolTipHide</code>,
 + *  and <code>toolTipEnd</code>.</p>
 + *
 + *  @eventType mx.events.ToolTipEvent.TOOL_TIP_CREATE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="toolTipCreate", type="mx.events.ToolTipEvent")]
 +
 +/**
 + *  Dispatched by the component when its ToolTip has been hidden
 + *  and is to be discarded soon.
 + *
 + *  <p>If you specify an effect using the
 + *  <code>ToolTipManager.hideEffect</code> property,
 + *  this event is dispatched after the effect stops playing.</p>
 + *
 + *  <p>The sequence of ToolTip events is <code>toolTipStart</code>,
 + *  <code>toolTipCreate</code>, <code>toolTipShow</code>,
 + *  <code>toolTipShown</code>, <code>toolTipHide</code>,
 + *  and <code>toolTipEnd</code>.</p>
 + *
 + *  @eventType mx.events.ToolTipEvent.TOOL_TIP_END
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="toolTipEnd", type="mx.events.ToolTipEvent")]
 +
 +/**
 + *  Dispatched by the component when its ToolTip is about to be hidden.
 + *
 + *  <p>If you specify an effect using the
 + *  <code>ToolTipManager.hideEffect</code> property,
 + *  this event is dispatched before the effect starts playing.</p>
 + *
 + *  <p>The sequence of ToolTip events is <code>toolTipStart</code>,
 + *  <code>toolTipCreate</code>, <code>toolTipShow</code>,
 + *  <code>toolTipShown</code>, <code>toolTipHide</code>,
 + *  and <code>toolTipEnd</code>.</p>
 + *
 + *  @eventType mx.events.ToolTipEvent.TOOL_TIP_HIDE
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="toolTipHide", type="mx.events.ToolTipEvent")]
 +
 +/**
 + *  Dispatched by the component when its ToolTip is about to be shown.
 + *
 + *  <p>If you specify an effect using the
 + *  <code>ToolTipManager.showEffect</code> property,
 + *  this event is dispatched before the effect starts playing.
 + *  You can use this event to modify the ToolTip before it appears.</p>
 + *
 + *  <p>The sequence of ToolTip events is <code>toolTipStart</code>,
 + *  <code>toolTipCreate</code>, <code>toolTipShow</code>,
 + *  <code>toolTipShown</code>, <code>toolTipHide</code>,
 + *  and <code>toolTipEnd</code>.</p>
 + *
 + *  @eventType mx.events.ToolTipEvent.TOOL_TIP_SHOW
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="toolTipShow", type="mx.events.ToolTipEvent")]
 +
 +/**
 + *  Dispatched by the component when its ToolTip has been shown.
 + *
 + *  <p>If you specify an effect using the
 + *  <code>ToolTipManager.showEffect</code> property,
 + *  this event is dispatched after the effect stops playing.</p>
 + *
 + *  <p>The sequence of ToolTip events is <code>toolTipStart</code>,
 + *  <code>toolTipCreate</code>, <code>toolTipShow</code>,
 + *  <code>toolTipShown</code>, <code>toolTipHide</code>,
 + *  and <code>toolTipEnd</code>.</p>
 + *
 + *  @eventType mx.events.ToolTipEvent.TOOL_TIP_SHOWN
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="toolTipShown", type="mx.events.ToolTipEvent")]
 +
 +/**
 + *  Dispatched by a component whose <code>toolTip</code> property is set,
 + *  as soon as the user moves the mouse over it.
 + *
 + *  <p>The sequence of ToolTip events is <code>toolTipStart</code>,
 + *  <code>toolTipCreate</code>, <code>toolTipShow</code>,
 + *  <code>toolTipShown</code>, <code>toolTipHide</code>,
 + *  and <code>toolTipEnd</code>.</p>
 + *
 + *  @eventType mx.events.ToolTipEvent.TOOL_TIP_START
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="toolTipStart", type="mx.events.ToolTipEvent")]
 +
 +//--------------------------------------
 +//  Styles
 +//--------------------------------------
 +
 +include "../styles/metadata/AnchorStyles.as";
 +
 +/**
 + *  The main color for a component.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +[Style(name="chromeColor", type="uint", format="Color", inherit="yes", theme="spark")]
 +
 +/**
 + *  Color of the component highlight when validation fails.
 + *  Flex also sets the <code>borderColor</code> style of the component to this
 + *  <code>errorColor</code> on a validation failure.
 + *
 + *  The default value for the Halo theme is <code>0xFF0000</code>.
 + *  The default value for the Spark theme is <code>0xFE0000</code>.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="errorColor", type="uint", format="Color", inherit="yes")]
 +
 +/**
 + *  The primary interaction mode for this component.  The acceptable values are: 
 + *  <code>mouse</code> and <code>touch</code>.
 + *
 + *  The default value for the Halo theme is <code>mouse</code>.
 + *  The default value for the Spark theme is <code>mouse</code>.
 + *  The default value for the Mobile theme is <code>touch</code>.
 + * 
 + *  @see mx.core.InteractionMode#MOUSE
 + *  @see mx.core.InteractionMode#TOUCH
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +[Style(name="interactionMode", type="String", enumeration="mouse,touch", inherit="yes")]
 +
 +/**
 + *  Blend mode used by the focus rectangle.
 + *  For more information, see the <code>blendMode</code> property
 + *  of the flash.display.DisplayObject class.
 + *
 + *  @default "normal"
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="focusBlendMode", type="String", inherit="no")]
 +
 +/**
 + *  Skin used to draw the focus rectangle.
 + *
 + *  The default value for Halo components is mx.skins.halo.HaloFocusRect. 
 + *  The default value for Spark components is spark.skins.spark.FocusSkin.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="focusSkin", type="Class", inherit="no")]
 +
 +/**
 + *  Thickness, in pixels, of the focus rectangle outline.
 + *
 + *  @default 2
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="focusThickness", type="Number", format="Length", inherit="no", minValue="0.0")]
 +
 +/**
 + *  Specifies the desired layout direction of a component. The allowed values
 + *  are <code>"ltr"</code> for left-to-right layout, used for 
 + *  components using Latin-style scripts, and <code>"rtl"</code> for
 + *  right-to-left layout, used for components using scripts such
 + *  as Arabic and Hebrew.
 + * 
 + *  <p>In ActionScript you can set the layoutDirection using the values 
 + *  <code>mx.core.LayoutDirection.LTR</code>, 
 + *  <code>mx.core.LayoutDirection.RTL</code> or 
 + *  <code>undefined</code>, to inherit the layoutDirection from the parent.</p>
 + * 
 + *  <p>The layoutDirection should typically be set on the 
 + *  <code>Application</code> rather than on individual components. If the 
 + *  layoutDirection is <code>"rtl"</code>, most visual elements, except text 
 + *  and images, will be mirrored.  The directionality of text is determined 
 + *  by the <code>direction</code> style.</p>
 + * 
 + *  <p>Components which handle Keyboard.LEFT and Keyboard.RIGHT events
 + *  typically swap the key\u2019s meaning when layoutDirection is 
 + *  <code>\u201crtl\u201d</code>.  In other words, left always means move left and
 + *  right always means move right, regardless of the 
 + *  <code>layoutDirection</code></p>
 + * 
 + *  <p>Note: This style applies to all Spark components and MX components that
 + *  specify UIFTETextField as their textFieldClass.</p> 
 + * 
 + *  @default "ltr"
 + * 
 + *  @see MXFTEText.css
 + *  @see mx.core.ILayoutDirectionElement
 + *  @see mx.core.LayoutDirection
 + * 
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4.1
 + */
 +[Style(name="layoutDirection", type="String", enumeration="ltr,rtl", inherit="yes")]
 +
 +/**
 + *  Show the error border or skin when this component is invalid
 + * 
 + *  @default true
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4.5
 + */
 +[Style(name="showErrorSkin", type="Boolean", inherit="yes")]
 +
 +/**
 + *  Show the error tip when this component is invalid and the user 
 + *  rolls over it 
 + * 
 + *  @default true
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4.5
 + */
 +[Style(name="showErrorTip", type="Boolean", inherit="yes")]
 +
 +/**
 + *  Theme color of a component. This property controls the appearance of highlights,
 + *  appearance when a component is selected, and other similar visual cues, but it
 + *  does not have any effect on the regular borders or background colors of the component.
 + *  The preferred values are <code>haloGreen</code>, <code>haloBlue</code>,
 + *  <code>haloOrange</code>, and <code>haloSilver</code>, although any valid color
 + *  value can be used.
 + *
 + *  <p>The default values of the <code>rollOverColor</code> and
 + *  <code>selectionColor</code> styles are based on the
 + *  <code>themeColor</code> value.</p>
 + *
 + *  @default "haloBlue"
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="themeColor", type="uint", format="Color", inherit="yes", theme="halo")]
 +
 +//--------------------------------------
 +//  Effects
 +//--------------------------------------
 +
 +/**
 + *  Played when the component is created.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="creationCompleteEffect", event="creationComplete")]
 +
 +/**
 + *  Played when the component is moved.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="moveEffect", event="move")]
 +
 +/**
 + *  Played when the component is resized.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="resizeEffect", event="resize")]
 +
 +/**
 + *  Played when the component becomes visible.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="showEffect", event="show")]
 +
 +/**
 + *  Played when the component becomes invisible.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="hideEffect", event="hide")]
 +
 +/**
 + *  Played when the user presses the mouse button while over the component.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="mouseDownEffect", event="mouseDown")]
 +
 +/**
 + *  Played when the user releases the mouse button while over the component.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="mouseUpEffect", event="mouseUp")]
 +
 +/**
 + *  Played when the user rolls the mouse over the component.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="rollOverEffect", event="rollOver")]
 +
 +/**
 + *  Played when the user rolls the mouse so it is no longer over the component.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="rollOutEffect", event="rollOut")]
 +
 +/**
 + *  Played when the component gains keyboard focus.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="focusInEffect", event="focusIn")]
 +
 +/**
 + *  Played when the component loses keyboard focus.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="focusOutEffect", event="focusOut")]
 +
 +/**
 + *  Played when the component is added as a child to a Container.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="addedEffect", event="added")]
 +
 +/**
 + *  Played when the component is removed from a Container.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Effect(name="removedEffect", event="removed")]
 +
 +//--------------------------------------
 +//  Other metadata
 +//--------------------------------------
 +
 +[AccessibilityClass(implementation="mx.accessibility.UIComponentAccProps")]
 +
 +[ResourceBundle("core")]
 +
 +// skins resources aren't found because CSS visited by the compiler
 +[ResourceBundle("skins")]
 +
 +/**
 + *  The UIComponent class is the base class for all visual components,
 + *  both interactive and noninteractive.
 + *
 + *  <p>An interactive component can participate in tabbing and other kinds of
 + *  keyboard focus manipulation, accept low-level events like keyboard and
 + *  mouse input, and be disabled so that it does not receive keyboard and
 + *  mouse input.
 + *  This is in contrast to noninteractive components, like Label and
 + *  ProgressBar, which simply display contents and are not manipulated by
 + *  the user.</p>
 + *  <p>The UIComponent class is not used as an MXML tag, but is used as a base
 + *  class for other classes.</p>
 + *
 + *  @mxml
 + *
 + *  <p>All user interface components in Flex extend the UIComponent class.
 + *  Flex components inherit the following properties from the UIComponent
 + *  class:</p>
 + *
 + *  <pre>
 + *  &lt;mx:<i>tagname</i>
 + *   <b>Properties </b>
 + *    accessibilityDescription="null"
 + *    accessibilityName="null"
 + *    accessibilityShortcut="null"
 + *    accessibilitySilent="true|false"
 + *    automationName="null"
 + *    cachePolicy="auto|on|off"
 + *    currentState="null"
 + *    doubleClickEnabled="false|true"
 + *    enabled="true|false"
 + *    explicitHeight="NaN"
 + *    explicitMaxHeight="NaN"
 + *    explicitMaxWidth="NaN"
 + *    explicitMinHeight="NaN"
 + *    explicitMinWidth="NaN"
 + *    explicitWidth="NaN"
 + *    focusEnabled="true|false"
 + *    hasFocusableChildren="false|true"
 + *    height="0"
 + *    id=""
 + *    includeInLayout="true|false"
 + *    maxHeight="10000"
 + *    maxWidth="10000"
 + *    measuredHeight=
 + *    measuredMinHeight=
 + *    measuredMinWidth=
 + *    measuredWidth=
 + *    minHeight="0"
 + *    minWidth="0"
 + *    mouseFocusEnabled="true|false"
 + *    percentHeight="NaN"
 + *    percentWidth="NaN"
 + *    scaleX="1.0"
 + *    scaleY="1.0"
 + *    states="null"
 + *    styleName="undefined"
 + *    toolTip="null"
 + *    transitions=""
 + *    validationSubField
 + *    width="0"
 + *    x="0"
 + *    y="0"
 + *
 + *  <b>Styles</b>
 + *    bottom="undefined"
 + *    errorColor="0xFF0000"
 + *    focusBlendMode="normal"
 + *    focusSkin="HaloFocusRect""
 + *    focusThickness="2"
 + *    horizontalCenter="undefined"
 + *    layoutDirection="ltr"
 + *    left="undefined"
 + *    right="undefined"
 + *    themeColor="haloGreen"
 + *    top="undefined"
 + *    verticalCenter="undefined"
 + *
 + *  <b>Effects</b>
 + *    addedEffect="<i>No default</i>"
 + *    creationCompleteEffect="<i>No default</i>"
 +  *   focusInEffect="<i>No default</i>"
 + *    focusOutEffect="<i>No default</i>"
 + *    hideEffect="<i>No default</i>"
 + *    mouseDownEffect="<i>No default</i>"
 + *    mouseUpEffect="<i>No default</i>"
 + *    moveEffect="<i>No default</i>"
 + *    removedEffect="<i>No default</i>"
 + *    resizeEffect="<i>No default</i>"
 + *    rollOutEffect="<i>No default</i>"
 + *    rollOverEffect="<i>No default</i>"
 + *    showEffect="<i>No default</i>"
 + *
 + *  <b>Events</b>
 + *    add="<i>No default</i>"
 + *    creationComplete="<i>No default</i>"
 + *    currentStateChange="<i>No default</i>"
 + *    currentStateChanging="<i>No default</i>"
 + *    dragComplete="<i>No default</i>"
 + *    dragDrop="<i>No default</i>"
 + *    dragEnter="<i>No default</i>"
 + *    dragExit="<i>No default</i>"
 + *    dragOver="<i>No default</i>"
 + *    effectEnd="<i>No default</i>"
 + *    effectStart="<i>No default</i>"
 + *    enterState="<i>No default</i>"
 + *    exitState="<i>No default</i>"
 + *    hide="<i>No default</i>"
 + *    initialize="<i>No default</i>"
 + *    invalid="<i>No default</i>"
 + *    mouseDownOutside="<i>No default</i>"
 + *    mouseWheelOutside="<i>No default</i>"
 + *    move="<i>No default</i>"
 + *    preinitialize="<i>No default</i>"
 + *    remove="<i>No default</i>"
 + *    resize="<i>No default</i>"
 + *    show="<i>No default</i>"
 + *    toolTipCreate="<i>No default</i>"
 + *    toolTipEnd="<i>No default</i>"
 + *    toolTipHide="<i>No default</i>"
 + *    toolTipShow="<i>No default</i>"
 + *    toolTipShown="<i>No default</i>"
 + *    toolTipStart="<i>No default</i>"
 + *    updateComplete="<i>No default</i>"
 + *    valid="<i>No default</i>"
 + *    valueCommit="<i>No default</i>"
 + *  &gt;
 + *  </pre>
 + *
 + *  @see mx.core.UIComponent
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class UIComponent extends Sprite
 +    implements IAutomationObject, IChildList, IConstraintClient,
 +    IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule,
 +    IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier,
 +    IRepeaterClient, IStateClient, IAdvancedStyleClient, IToolTipManagerClient,
 +    IUIComponent, IValidatorListener, IVisualElement
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  The default value for the <code>measuredWidth</code> property.
 +     *  Most components calculate a measuredWidth but some are flow-based and
 +     *  have to pick a number that looks reasonable.
 +     *
 +     *  @default 160
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const DEFAULT_MEASURED_WIDTH:Number = 160;
 +
 +    /**
 +     *  The default value for the <code>measuredMinWidth</code> property.
 +     *  Most components calculate a measuredMinWidth but some are flow-based and
 +     *  have to pick a number that looks reasonable.
 +     *
 +     *  @default 40
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40;
 +
 +    /**
 +     *  The default value for the <code>measuredHeight</code> property.
 +     *  Most components calculate a measuredHeight but some are flow-based and
 +     *  have to pick a number that looks reasonable.
 +     *
 +     *  @default 22
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const DEFAULT_MEASURED_HEIGHT:Number = 22;
 +
 +    /**
 +     *  The default value for the <code>measuredMinHeight</code> property.
 +     *  Most components calculate a measuredMinHeight but some are flow-based and
 +     *  have to pick a number that looks reasonable.
 +     *
 +     *  @default 22
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22;
 +
 +    /**
 +     *  The default value for the <code>maxWidth</code> property.
 +     *
 +     *  @default 10000
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const DEFAULT_MAX_WIDTH:Number = 10000;
 +    // When changing this constant, make sure you change
 +    // the constant with the same name in LayoutElementUIComponentUtils
 +
 +    /**
 +     *  The default value for the <code>maxHeight</code> property.
 +     *
 +     *  @default 10000
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static const DEFAULT_MAX_HEIGHT:Number = 10000;
 +    // When changing this constant, make sure you change
 +    // the constant with the same name in LayoutElementUIComponentUtils
 +
 +    /**
 +     *  @private
 +     *  Static constant representing no cached layout direction style value. 
 +     */
 +    private static const LAYOUT_DIRECTION_CACHE_UNSET:String = "layoutDirectionCacheUnset";
 +    
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class mixins
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Placeholder for mixin by UIComponentAccProps.
 +     */
 +    mx_internal static var createAccessibilityImplementation:Function;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  embeddedFontRegistry
 +    //----------------------------------
 +
 +    private static var noEmbeddedFonts:Boolean;
 +
 +    /**
 +     *  @private
 +     *  Storage for the _embeddedFontRegistry property.
 +     *  Note: This gets initialized on first access,
 +     *  not when this class is initialized, in order to ensure
 +     *  that the Singleton registry has already been initialized.
 +     */
 +    private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
 +
 +    /**
 +     *  @private
 +     *  A reference to the embedded font registry.
 +     *  Single registry in the system.
 +     *  Used to look up the moduleFactory of a font.
 +     */
 +    mx_internal static function get embeddedFontRegistry():IEmbeddedFontRegistry
 +    {
 +        if (!_embeddedFontRegistry && !noEmbeddedFonts)
 +        {
 +            try
 +            {
 +                _embeddedFontRegistry = IEmbeddedFontRegistry(
 +                    Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
 +            }
 +            catch (e:Error)
 +            {
 +                noEmbeddedFonts = true;
 +            }
 +        }
 +
 +        return _embeddedFontRegistry;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Blocks the background processing of methods
 +     *  queued by <code>callLater()</code>,
 +     *  until <code>resumeBackgroundProcessing()</code> is called.
 +     *
 +     *  <p>These methods can be useful when you have time-critical code
 +     *  which needs to execute without interruption.
 +     *  For example, when you set the <code>suspendBackgroundProcessing</code>
 +     *  property of an Effect to <code>true</code>,
 +     *  <code>suspendBackgroundProcessing()</code> is automatically called
 +     *  when it starts playing, and <code>resumeBackgroundProcessing</code>
 +     *  is called when it stops, in order to ensure that the animation
 +     *  is smooth.</p>
 +     *
 +     *  <p>Since the LayoutManager uses <code>callLater()</code>,
 +     *  this means that <code>commitProperties()</code>,
 +     *  <code>measure()</code>, and <code>updateDisplayList()</code>
 +     *  is not called in between calls to
 +     *  <code>suspendBackgroundProcessing()</code> and
 +     *  <code>resumeBackgroundProcessing()</code>.</p>
 +     *
 +     *  <p>It is safe for both an outer method and an inner method
 +     *  (i.e., one that the outer methods calls) to call
 +     *  <code>suspendBackgroundProcessing()</code>
 +     *  and <code>resumeBackgroundProcessing()</code>, because these
 +     *  methods actually increment and decrement a counter
 +     *  which determines whether background processing occurs.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function suspendBackgroundProcessing():void
 +    {
 +        UIComponentGlobals.callLaterSuspendCount++;
 +    }
 +
 +    /**
 +     *  Resumes the background processing of methods
 +     *  queued by <code>callLater()</code>, after a call to
 +     *  <code>suspendBackgroundProcessing()</code>.
 +     *
 +     *  <p>Refer to the description of
 +     *  <code>suspendBackgroundProcessing()</code> for more information.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function resumeBackgroundProcessing():void
 +    {
 +        if (UIComponentGlobals.callLaterSuspendCount > 0)
 +        {
 +            UIComponentGlobals.callLaterSuspendCount--;
 +
 +            // Once the suspend count gets back to 0, we need to
 +            // force a render event to happen
 +            if (UIComponentGlobals.callLaterSuspendCount == 0)
 +            {
 +                var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0];
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +                if (sm && sm.topOfDisplayList)
 +                    sm.topOfDisplayList.invalidate();
 +				}
 +            }
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function UIComponent()
 +    {
 +        super();
 +        
 +        // Override  variables in superclasses.
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        focusRect = false; // We do our own focus drawing.
 +        // We are tab enabled by default if IFocusManagerComponent
 +        tabEnabled = (this is IFocusManagerComponent);
 +		}
 +        tabFocusEnabled = (this is IFocusManagerComponent);
 +
 +        // Whether the component can accept user interaction.
 +        // The default is true. If you set enabled to false for a container,
 +        // Flex dims the color of the container and of all of its children,
 +        // and blocks user input  to the container and to all of its children.
 +        // We set enabled to true here because some components keep their
 +        // own _enabled flag and may not initialize it to true.
 +        enabled = true;
 +
 +        // Make the component invisible until the initialization sequence
 +        // is complete.
 +        // It will be set visible when the 'initialized' flag is set.
 +        $visible = false;
 +
 +        addEventListener(flex.events.Event.ADDED, addedHandler);
 +        addEventListener(flex.events.Event.REMOVED, removedHandler);
 +        addEventListener(flex.events.Event.REMOVED_FROM_STAGE, removedFromStageHandler);
 +
 +        // Register for focus and keyboard events.
 +        if (this is IFocusManagerComponent)
 +        {
 +            addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
 +            addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
 +            addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
 +            addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
 +        }
 +
 +        resourcesChanged();
 +
 +        // Register as a weak listener for "change" events from ResourceManager.
 +        // If UIComponents registered as a strong listener,
 +        // they wouldn't get garbage collected.
 +		COMPILE::LATER
 +		{
 +			resourceManager.addEventListener(
 +				org.apache.flex.events.Event.CHANGE, resourceManager_changeHandler, false, 0, true);				
 +		}
 +		resourceManager.addEventListener(
 +			org.apache.flex.events.Event.CHANGE, resourceManager_changeHandler);
 +
 +        _width = super.width;
 +        _height = super.height;
 +        
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Temporarily stores the values of styles specified with setStyle() until 
 +     *  moduleFactory is set.
 +     */
 +    private var deferredSetStyles:Object;
 +    
 +    /**
 +     *  @private
 +     *  There is a bug (139381) where we occasionally get callLaterDispatcher()
 +     *  even though we didn't expect it.
 +     *  That causes us to do a removeEventListener() twice,
 +     *  which messes up some internal thing in the player so that
 +     *  the next addEventListener() doesn't actually get us the render event.
 +     */
 +    private var listeningForRender:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  List of methods used by callLater().
 +     */
 +    private var methodQueue:Array /* of MethodQueueElement */ = [];
 +
 +    /**
 +     *  @private
 +     *  Whether or not we "own" the focus graphic
 +     */
 +    private var hasFocusRect:Boolean = false;
 +
 +    /**
 +     * @private
 +     * These variables cache the transition state from/to information for
 +     * the transition currently running. This information is used when
 +     * determining what to do with a new transition that interrupts the
 +     * running transition.
 +     */
 +    private var transitionFromState:String;
 +    private var transitionToState:String;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var parentChangedFlag:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     *  Cached layout direction style
 +     */
 +    private var layoutDirectionCachedValue:String = LAYOUT_DIRECTION_CACHE_UNSET;
 +    
 +	/**
 +	 *  @private
 +	 *  Whether or not we've processed the MXMLDescriptors 
 +	 */
 +	mx_internal var processedMXMLDescriptors:Boolean = false;
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Variables: Event Priority
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	//----------------------------------
 +	//  bindingEventDispatcher
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 *  Storage for the binding event dispatcher.
 +	 */
 +	private var _bindingEventDispatcher:EventDispatcher;
 +	
 +	[Inspectable(environment="none")]
 +	
 +	/**
 +	 *  Events get dispatched here first
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function get bindingEventDispatcher():IEventDispatcher
 +	{
 +		if (_bindingEventDispatcher == null)
 +			_bindingEventDispatcher = new EventDispatcher();
 +		return _bindingEventDispatcher;
 +	}
 +	
 +	//----------------------------------
 +	//  effectEventDispatcher
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 *  Storage for the effect event dispatcher.
 +	 */
 +	private var _effectEventDispatcher:EventDispatcher;
 +	
 +	[Inspectable(environment="none")]
 +	
 +	/**
 +	 *  Events get dispatched here last
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function get effectEventDispatcher():IEventDispatcher
 +	{
 +		if (_effectEventDispatcher == null)
 +			_effectEventDispatcher = new EventDispatcher();
 +		return _effectEventDispatcher;
 +	}
 +	
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables: Creation
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  initialized
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the initialized property.
 +     */
 +    private var _initialized:Boolean = false;
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  A flag that determines if an object has been through all three phases
 +     *  of layout: commitment, measurement, and layout (provided that any were required).
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get initialized():Boolean
 +    {
 +        return _initialized;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set initialized(value:Boolean):void
 +    {
 +        _initialized = value;
 +
 +        if (value)
 +        {
 +            setVisible(_visible, true);
 +            dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  processedDescriptors
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the processedDescriptors property.
 +     */
 +    private var _processedDescriptors:Boolean = false;
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  Set to <code>true</code> after immediate or deferred child creation,
 +     *  depending on which one happens. For a Container object, it is set
 +     *  to <code>true</code> at the end of
 +     *  the <code>createComponentsFromDescriptors()</code> method,
 +     *  meaning after the Container object creates its children from its child descriptors.
 +     *
 +     *  <p>For example, if an Accordion container uses deferred instantiation,
 +     *  the <code>processedDescriptors</code> property for the second pane of
 +     *  the Accordion container does not become <code>true</code> until after
 +     *  the user navigates to that pane and the pane creates its children.
 +     *  But, if the Accordion had set the <code>creationPolicy</code> property
 +     *  to <code>"all"</code>, the <code>processedDescriptors</code> property
 +     *  for its second pane is set to <code>true</code> during application startup.</p>
 +     *
 +     *  <p>For classes that are not containers, which do not have descriptors,
 +     *  it is set to <code>true</code> after the <code>createChildren()</code>
 +     *  method creates any internal component children.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get processedDescriptors():Boolean
 +    {
 +        return _processedDescriptors;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set processedDescriptors(value:Boolean):void
 +    {
 +        _processedDescriptors = value;
 +
 +        if (value)
 +            dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE));
 +    }
 +
 +    //----------------------------------
 +    //  updateCompletePendingFlag
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the updateCompletePendingFlag property.
 +     */
 +    private var _updateCompletePendingFlag:Boolean = false;
 +
 +    [Inspectable(environment="none")]
 +
 +    /**
 +     *  A flag that determines if an object has been through all three phases
 +     *  of layout validation (provided that any were required).
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get updateCompletePendingFlag():Boolean
 +    {
 +        return _updateCompletePendingFlag;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set updateCompletePendingFlag(value:Boolean):void
 +    {
 +        _updateCompletePendingFlag = value;
 +    }
 +
 +    //------------------------------------------------------------------------
 +    //
 +    //  Properties: Accessibility
 +    //
 +    //------------------------------------------------------------------------
 +
 +    /**
 +     *  A convenience accessor for the <code>silent</code> property
 +     *  in this UIComponent's <code>accessibilityProperties</code> object.
 +     *
 +     *  <p>Note that <code>accessibilityEnabled</code> has the opposite sense from silent;
 +     *  <code>accessibilityEnabled</code> is <code>true</code> 
 +     *  when <code>silent</code> is <code>false</code>.</p>
 +     *
 +     *  <p>The getter simply returns <code>accessibilityProperties.silent</code>,
 +     *  or <code>true</code> if <code>accessibilityProperties</code> is null.
 +     *  The setter first checks whether <code>accessibilityProperties</code> is null, 
 +     *  and if it is, sets it to a new AccessibilityProperties instance.
 +     *  Then it sets <code>accessibilityProperties.silent</code>.</p>
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get accessibilityEnabled():Boolean
 +    {
 +        return accessibilityProperties ? !accessibilityProperties.silent : true;
 +    }
 +    
 +	COMPILE::LATER
 +    public function set accessibilityEnabled(value:Boolean):void
 +    {
 +        if (!Capabilities.hasAccessibility)
 +            return;
 +
 +        if (!accessibilityProperties) 
 +            accessibilityProperties = new AccessibilityProperties();
 +                 
 +        accessibilityProperties.silent = !value;
 +        Accessibility.updateProperties();
 +    }
 +
 +    /**
 +     *  A convenience accessor for the <code>name</code> property
 +     *  in this UIComponent's <code>accessibilityProperties</code> object.
 +     *
 +     *  <p>The getter simply returns <code>accessibilityProperties.name</code>,
 +     *  or "" if accessibilityProperties is null.
 +     *  The setter first checks whether <code>accessibilityProperties</code> is null, 
 +     *  and if it is, sets it to a new AccessibilityProperties instance.
 +     *  Then it sets <code>accessibilityProperties.name</code>.</p>
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get accessibilityName():String
 +    {
 +        return accessibilityProperties ? accessibilityProperties.name : "";
 +    }
 +    
 +	COMPILE::LATER
 +    public function set accessibilityName(value:String):void 
 +    {
 +        if (!Capabilities.hasAccessibility)
 +            return;
 +
 +        if (!accessibilityProperties)
 +            accessibilityProperties = new AccessibilityProperties();
 +
 +        accessibilityProperties.name = value;
 +        Accessibility.updateProperties();
 +    }
 +
 +    /**
 +     *  A convenience accessor for the <code>description</code> property
 +     *  in this UIComponent's <code>accessibilityProperties</code> object.
 +     *
 +     *  <p>The getter simply returns <code>accessibilityProperties.description</code>,
 +     *  or "" if <code>accessibilityProperties</code> is null.
 +     *  The setter first checks whether <code>accessibilityProperties</code> is null, 
 +     *  and if it is, sets it to a new AccessibilityProperties instance.
 +     *  Then it sets <code>accessibilityProperties.description</code>.</p>
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get accessibilityDescription():String 
 +    {
 +        return accessibilityProperties ? accessibilityProperties.description : "";
 +    }
 +
 +	COMPILE::LATER
 +    public function set accessibilityDescription(value:String):void
 +    {
 +        if (!Capabilities.hasAccessibility)
 +            return;
 +
 +        if (!accessibilityProperties)
 +            accessibilityProperties = new AccessibilityProperties();
 +
 +        accessibilityProperties.description = value;
 +        Accessibility.updateProperties();
 +    }
 +
 +    /**
 +     *  A convenience accessor for the <code>shortcut</code> property
 +     *  in this UIComponent's <code>accessibilityProperties</code> object.
 +     *
 +     *  <p>The getter simply returns <code>accessibilityProperties.shortcut</code>,
 +     *  or "" if <code>accessibilityProperties</code> is null.
 +     *  The setter first checks whether <code>accessibilityProperties</code> is null, 
 +     *  and if it is, sets it to a new AccessibilityProperties instance.
 +     *  Then it sets <code>accessibilityProperties.shortcut</code>.</p>
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get accessibilityShortcut():String
 +    {
 +        return accessibilityProperties ? accessibilityProperties.shortcut : "";
 +    }
 +    
 +	COMPILE::LATER
 +    public function set accessibilityShortcut(value:String):void
 +    {
 +        if (!Capabilities.hasAccessibility)
 +            return;
 + 
 +        if (!accessibilityProperties)
 +                accessibilityProperties = new AccessibilityProperties();
 +
 +        accessibilityProperties.shortcut = value;
 +        Accessibility.updateProperties();
 +     }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables: Invalidation
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Whether this component needs to have its
 +     *  commitProperties() method called.
 +     */
 +    mx_internal var invalidatePropertiesFlag:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  Whether this component needs to have its
 +     *  measure() method called.
 +     */
 +    mx_internal var invalidateSizeFlag:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  Whether this component needs to be have its
 +     *  updateDisplayList() method called.
 +     */
 +    mx_internal var invalidateDisplayListFlag:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     *  Whether setActualSize() has been called on this component
 +     *  at least once.  This is used in validateBaselinePosition()
 +     *  to resize the component to explicit or measured
 +     *  size if baselinePosition getter is called before the
 +     *  component has been resized by the layout.
 +     */
 +    mx_internal var setActualSizeCalled:Boolean = false;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables: Measurement
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the x property.
 +     *  Used in dispatching a MoveEvent.
 +     */
 +    private var oldX:Number = 0;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the y property.
 +     *  Used in dispatching a MoveEvent.
 +     */
 +    private var oldY:Number = 0;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the width property.
 +     *  Used in dispatching a ResizeEvent.
 +     */
 +    private var oldWidth:Number = 0;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the height property.
 +     *  Used in dispatching a ResizeEvent.
 +     */
 +    private var oldHeight:Number = 0;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the minWidth property.
 +     */
 +    private var oldMinWidth:Number;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the minHeight property.
 +     */
 +    private var oldMinHeight:Number;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the explicitWidth property.
 +     */
 +    private var oldExplicitWidth:Number;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the explicitHeight property.
 +     */
 +    private var oldExplicitHeight:Number;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the scaleX property.
 +     */
 +    private var oldScaleX:Number = 1.0;
 +
 +    /**
 +     *  @private
 +     *  Holds the last recorded value of the scaleY property.
 +     */
 +    private var oldScaleY:Number = 1.0;
 +
 +    /**
 +     *  @private
 +     * True if createInFontContext has been called.
 +     */
 +    private var hasFontContextBeenSaved:Boolean = false;
 +
 +    /**
 +     *  @private
 +     * Holds the last recorded value of the module factory used to create the font.
 +     */
 +    private var oldEmbeddedFontContext:IFlexModuleFactory = null;
 +
 +    /**
 +     * @private
 +     *
 +     * storage for advanced layout and transform properties.
 +     */
 +	COMPILE::LATER
 +    mx_internal var _layoutFeatures:AdvancedLayoutFeatures;
 +	mx_internal var _layoutFeatures:Object;
 +
 +    /**
 +     * @private
 +     *
 +     * storage for the modified Transform object that can dispatch change events correctly.
 +     */
 +	COMPILE::LATER
 +    private var _transform:flash.geom.Transform;
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables: Styles
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var cachedTextFormat:UITextFormat;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables: Effects
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Sprite used to display an overlay.
 +     */
 +    mx_internal var effectOverlay:UIComponent;
 +
 +    /**
 +     *  @private
 +     *  Color used for overlay.
 +     */
 +    mx_internal var effectOverlayColor:uint;
 +
 +    /**
 +     *  @private
 +     *  Counter to keep track of the number of current users
 +     *  of the overlay.
 +     */
 +    mx_internal var effectOverlayReferenceCount:int = 0;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables: Validation
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var saveBorderColor:Boolean = true;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var origBorderColor:Number;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables: Other
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for automatically-created RadioButtonGroups.
 +     *  If a RadioButton's groupName isn't the id of a RadioButtonGroup tag,
 +     *  we automatically create a RadioButtonGroup and store it here as
 +     *  document.automaticRadioButtonGroups[groupName] = theRadioButtonGroup;
 +     */
 +    mx_internal var automaticRadioButtonGroups:Object;
 +
 +    private var _usingBridge:int = -1;
 +
 +    /**
 +     *  @private
 +     */
 +    private function get usingBridge():Boolean
 +    {
 +        if (_usingBridge == 0) return false;
 +        if (_usingBridge == 1) return true;
 +
 +        if (!_systemManager) return false;
 +
 +        // no types so no dependencies
 +        var mp:Object = _systemManager.getImplementation("mx.managers::IMarshalSystemManager");
 +        if (!mp)
 +        {
 +            _usingBridge = 0;
 +            return false;
 +        }
 +        if (mp.useSWFBridge())
 +        {
 +            _usingBridge = 1;
 +            return true;
 +        }
 +        _usingBridge = 0;
 +        return false;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  owner
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var _owner:DisplayObjectContainer;
 +
 +    /**
 +     *  @copy mx.core.IVisualElement#owner
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get owner():DisplayObjectContainer
 +    {
 +        return _owner ? _owner : parent;
 +    }
 +
 +    public function set owner(value:DisplayObjectContainer):void
 +    {
 +        _owner = value;
 +    }
 +
 +    //----------------------------------
 +    //  parent
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Reference to this component's virtual parent container.
 +     *  "Virtual" means that this parent may not be the same
 +     *  as the one that the Player returns as the 'parent'
 +     *  property of a DisplayObject.
 +     *  For example, if a Container has created a contentPane
 +     *  to improve scrolling performance,
 +     *  then its "children" are really its grandchildren
 +     *  and their "parent" is actually their grandparent,
 +     *  because we don't want developers to be concerned with
 +     *  whether a contentPane exists or not.
 +     */
 +    mx_internal var _parent:DisplayObjectContainer;
 +
 +    /**
 +     *  @copy mx.core.IVisualElement#parent
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get parent():DisplayObjectContainer
 +    {
 +        // Flash PlaceObject tags can have super.parent set
 +        // before we get to setting the _parent property.
 +        try
 +        {
 +            return _parent ? _parent : super.parent;
 +        }
 +        catch (e:Error)
 +        {
 +            // trace("UIComponent.get parent(): " + e);
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				if (!(e is SecurityError))
 +					throw e;
 +			}
 +        }
 +
 +        return null;
 +    }
 +
 +    //----------------------------------
 +    //  x
 +    //----------------------------------
 +
 +    [Bindable("xChanged")]
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  Number that specifies the component's horizontal position,
 +     *  in pixels, within its parent container.
 +     *
 +     *  <p>Setting this property directly or calling <code>move()</code>
 +     *  has no effect -- or only a temporary effect -- if the
 +     *  component is parented by a layout container such as HBox, Grid,
 +     *  or Form, because the layout calculations of those containers
 +     *  set the <code>x</code> position to the results of the calculation.
 +     *  However, the <code>x</code> property must almost always be set
 +     *  when the parent is a Canvas or other absolute-positioning
 +     *  container because the default value is 0.</p>
 +     *
 +     *  @default 0
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get x():Number
 +    {
 +        return (_layoutFeatures == null) ? super.x : _layoutFeatures.layoutX;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set x(value:Number):void
 +    {
 +        if (x == value)
 +            return;
 +
 +        if (_layoutFeatures == null)
 +        {
 +            super.x  = value;
 +        }
 +        else
 +        {
 +            _layoutFeatures.layoutX = value;
 +            invalidateTransform();
 +        }
 +
 +        invalidateProperties();
 +        
 +        if (parent && parent is UIComponent)
 +            UIComponent(parent).childXYChanged();
 +
 +        if (hasEventListener("xChanged"))
 +            dispatchEvent(new flex.events.Event("xChanged"));
 +    }
 +
 +    [Bindable("zChanged")]
 +    [Inspectable(category="General")]
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    override public function get z():Number
 +    {
 +        return (_layoutFeatures == null) ? super.z : _layoutFeatures.layoutZ;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    override public function set z(value:Number):void
 +    {
 +        if (z == value)
 +            return;
 +
 +        // validateMatrix when switching between 2D/3D, works around player bug
 +        // see sdk-23421 
 +        var was3D:Boolean = is3D;
 +        if (_layoutFeatures == null)
 +            initAdvancedLayoutFeatures();
 +
 +        _layoutFeatures.layoutZ = value;
 +        invalidateTransform();
 +        invalidateProperties();
 +        if (was3D != is3D)
 +            validateMatrix();
 +        
 +        if (hasEventListener("zChanged"))
 +            dispatchEvent(new flex.events.Event("zChanged"));
 +    }
 +
 +    /**
 +     *  Sets the x coordinate for the transform center of the component.
 +     * 
 +     *  <p>When this component is the target of a Spark transform effect, 
 +     *  you can override this property by setting 
 +     *  the <code>AnimateTransform.autoCenterTransform</code> property.
 +     *  If <code>autoCenterTransform</code> is <code>false</code>, the transform
 +     *  center is determined by the <code>transformX</code>,
 +     *  <code>transformY</code>, and <code>transformZ</code> properties
 +     *  of the effect target.
 +     *  If <code>autoCenterTransform</code> is <code>true</code>, 
 +     *  the effect occurs around the center of the target, 
 +     *  <code>(width/2, height/2)</code>.</p>
 +     *
 +     *  <p>Setting this property on the Spark effect class 
 +     *  overrides the setting on the target component.</p>
 +     *  
 +     *  @see spark.effects.AnimateTransform#autoCenterTransform 
 +     *  @see spark.effects.AnimateTransform#transformX 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get transformX():Number
 +    {
 +        return (_layoutFeatures == null) ? 0 : _layoutFeatures.transformX;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    public function set transformX(value:Number):void
 +    {
 +        if (transformX == value)
 +            return;
 +        if (_layoutFeatures == null)
 +            initAdvancedLayoutFeatures();
 +        _layoutFeatures.transformX = value;
 +        invalidateTransform();
 +        invalidateProperties();
 +        invalidateParentSizeAndDisplayList();
 +    }
 +
 +    /**
 +     *  Sets the y coordinate for the transform center of the component.
 +     * 
 +     *  <p>When this component is the target of a Spark transform effect, 
 +     *  you can override this property by setting 
 +     *  the <code>AnimateTransform.autoCenterTran

<TRUNCATED>

[50/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
Merge branch 'develop' into spark

There were unexpected conflicts where we had merged develop into spark before but on this merge we saw conflicts in files that had not changed in the spark branch, but both branches did have changes after the branch was made but prior to the last merge.  No idea why these conflicts happened.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/77148f4a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/77148f4a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/77148f4a

Branch: refs/heads/spark
Commit: 77148f4aed849da60c41be5b93d2aa2b0b3661c5
Parents: db3d64f 818c8ca
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jun 16 15:56:07 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Jun 16 15:56:07 2016 -0700

----------------------------------------------------------------------
 apache-flex-flexjs-installer-config.xml         |   2 +-
 build.xml                                       |  39 ++-
 .../flexjs/ChartExample/src/MyInitialView.mxml  |   4 +-
 .../flexjs/ChartExample/src/SpeedTestView.mxml  |   4 +-
 .../ChartExample/src/models/ProductsModel.as    |   2 +-
 .../flexjs/ChartExample/src/products/Product.as |   2 +-
 .../CordovaCameraExample/src/MyInitialView.mxml |   4 +-
 examples/flexjs/CreateJSExample/build.xml       |  18 +
 .../DataBindingExample/src/MyInitialView.mxml   |   6 +-
 .../src/StockDataJSONItemConverter.as           |   2 +-
 .../src/controllers/MyController.as             |   2 +-
 .../DataBindingExample/src/models/MyModel.as    |   2 +-
 .../src/MyInitialView.mxml                      |   6 +-
 .../src/StockDataJSONItemConverter.as           |   2 +-
 .../src/controllers/MyController.as             |   2 +-
 .../src/models/MyModel.as                       |   2 +-
 examples/flexjs/DataBindingExample_as/pom.xml   |  23 +-
 .../src/StockDataJSONItemConverter.as           |   2 +-
 .../src/controllers/MyController.as             |   2 +-
 .../DataBindingExample_as/src/models/MyModel.as |   2 +-
 .../DataGridExample/src/MyInitialView.mxml      |   4 +-
 .../DataGridExample/src/models/ProductsModel.as |   2 +-
 .../DataGridExample/src/products/Product.as     |   2 +-
 .../flexjs/DesktopMap/src/MyInitialView.mxml    |   6 +-
 .../flexjs/DesktopMap/src/models/MyModel.as     |   2 +-
 .../flexjs/FlexJSStore/src/FlexJSStore.mxml     |   4 +-
 .../FlexJSStore/src/ProductJSONItemConverter.as |   2 +-
 .../ProductCatalogPanelTitleBarView.mxml        |   6 +-
 .../src/samples/flexstore/Product.as            |   2 +-
 .../src/samples/flexstore/ProductFilter.as      |   2 +-
 .../src/samples/flexstore/ProductFilterEvent.as |   2 +-
 .../src/samples/flexstore/ProductListEvent.as   |   2 +-
 .../src/samples/flexstore/ProductThumbEvent.as  |   2 +-
 .../FlexJSStore_jquery/src/FlexJSStore.mxml     |   4 +-
 .../src/ProductJSONItemConverter.as             |   2 +-
 .../ProductCatalogPanelTitleBarView.mxml        |   6 +-
 .../src/samples/flexstore/Product.as            |   2 +-
 .../src/samples/flexstore/ProductFilter.as      |   2 +-
 .../src/samples/flexstore/ProductFilterEvent.as |   2 +-
 .../src/samples/flexstore/ProductListEvent.as   |   2 +-
 .../src/samples/flexstore/ProductThumbEvent.as  |   2 +-
 .../FlexWebsiteStatsViewer/src/StatsView.mxml   |   4 +-
 .../src/controllers/GAJSONInputParser.as        |   2 +-
 .../controllers/GAStatsDataJSONItemConverter.as |   2 +-
 .../src/controllers/StatsController.as          |   2 +-
 examples/flexjs/HelloWorld/build.xml            |  44 +++
 examples/flexjs/HelloWorld/src/HelloWorld.mxml  |  30 ++
 .../flexjs/MapSearch/src/MyInitialView.mxml     |   6 +-
 examples/flexjs/MapSearch/src/models/MyModel.as |   2 +-
 .../flexjs/MobileTrader/src/MyInitialView.mxml  |  10 +-
 .../src/StockDataJSONItemConverter.as           |   2 +-
 .../src/controller/AlertsViewController.as      |   2 +-
 .../src/controller/WatchListController.as       |   2 +-
 .../flexjs/MobileTrader/src/models/Alert.as     |   2 +-
 .../MobileTrader/src/models/ProductsModel.as    |   2 +-
 .../MobileTrader/src/renderers/AlertRenderer.as |   2 +-
 .../MobileTrader/src/renderers/StockRenderer.as |   2 +-
 .../MobileTrader/src/views/AlertsView.mxml      |   4 +-
 .../MobileTrader/src/views/AssetsView.mxml      |   4 +-
 .../MobileTrader/src/views/SearchView.mxml      |   4 +-
 .../MobileTrader/src/views/StockView.mxml       |   4 +-
 .../MobileTrader/src/views/WatchListView.mxml   |   4 +-
 .../StorageExample/src/MyInitialView.mxml       |   6 +-
 .../flexjs/StorageExample/src/models/MyModel.as |   2 +-
 .../todo/controllers/TodoListController.as      |   2 +-
 .../src/sample/todo/models/TodoListModel.as     |   2 +-
 .../src/sample/todo/views/TodoListView.mxml     |   4 +-
 .../flexjs/TreeExample/src/MyInitialView.mxml   |   6 +-
 examples/flexjs/pom.xml                         |   1 +
 .../native/AngularExample/src/AngularExample.as |   2 +-
 .../native/AngularExample/src/MyController.as   |   2 +-
 .../native/ButtonExample/src/ButtonExample.as   |   2 +-
 examples/native/USStatesMap/src/MapCoords.as    |   2 +-
 examples/native/USStatesMap/src/USStatesMap.as  |   2 +-
 frameworks/asdoc-config.xml                     |   2 +-
 frameworks/build.xml                            |  40 +++
 frameworks/createjs-config-template.xml         | 340 ++++++++++++++++++
 frameworks/createjs-config.xml                  | 340 ++++++++++++++++++
 frameworks/jquery-config-template.xml           | 340 ++++++++++++++++++
 frameworks/jquery-config.xml                    | 340 ++++++++++++++++++
 frameworks/js-config-template.xml               | 339 ++++++++++++++++++
 frameworks/js-config.xml                        | 339 ++++++++++++++++++
 .../projects/BindingJS/.actionScriptProperties  |   2 +-
 .../js/FlexJS/projects/BindingJS/build.xml      |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/ChartsJS/.actionScriptProperties   |   2 +-
 .../js/FlexJS/projects/ChartsJS/build.xml       |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../CollectionsJS/.actionScriptProperties       |   2 +-
 .../js/FlexJS/projects/CollectionsJS/build.xml  |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/CoreJS/.actionScriptProperties     |   2 +-
 frameworks/js/FlexJS/projects/CoreJS/build.xml  |  27 +-
 .../src/main/config/compile-js-config.xml       |  17 +-
 .../projects/CreateJSJS/.actionScriptProperties |   2 +-
 .../js/FlexJS/projects/CreateJSJS/build.xml     |  33 +-
 .../src/main/config/compile-js-config.xml       |  17 +-
 .../projects/DragDropJS/.actionScriptProperties |   2 +-
 .../js/FlexJS/projects/DragDropJS/build.xml     |  29 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/EffectsJS/.actionScriptProperties  |   2 +-
 .../js/FlexJS/projects/EffectsJS/build.xml      |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/FlatJS/.actionScriptProperties     |   2 +-
 frameworks/js/FlexJS/projects/FlatJS/build.xml  |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../FormattersJS/.actionScriptProperties        |   2 +-
 .../js/FlexJS/projects/FormattersJS/build.xml   |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../GoogleMapsJS/.actionScriptProperties        |   2 +-
 .../js/FlexJS/projects/GoogleMapsJS/build.xml   |  33 +-
 .../src/main/config/compile-js-config.xml       |  18 +-
 .../projects/GraphicsJS/.actionScriptProperties |   2 +-
 .../js/FlexJS/projects/GraphicsJS/build.xml     |  29 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/HTML5JS/.actionScriptProperties    |   2 +-
 frameworks/js/FlexJS/projects/HTML5JS/build.xml |  29 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/HTMLJS/.actionScriptProperties     |   2 +-
 frameworks/js/FlexJS/projects/HTMLJS/build.xml  |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/JQueryJS/.actionScriptProperties   |   2 +-
 .../js/FlexJS/projects/JQueryJS/build.xml       |  30 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../MXJS/src/main/config/compile-js-config.xml  |   2 +-
 .../projects/MobileJS/.actionScriptProperties   |   2 +-
 .../js/FlexJS/projects/MobileJS/build.xml       |  26 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../projects/NetworkJS/.actionScriptProperties  |   2 +-
 .../js/FlexJS/projects/NetworkJS/build.xml      |  27 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../ReflectionJS/.actionScriptProperties        |   2 +-
 .../js/FlexJS/projects/ReflectionJS/build.xml   |  28 +-
 .../src/main/config/compile-js-config.xml       |  16 +-
 .../js/FlexJS/projects/StorageJS/build.xml      |  35 +-
 .../src/main/config/compile-js-config.xml       |  18 +-
 frameworks/js/FlexJS/projects/XMLJS/build.xml   |  28 +-
 .../XMLJS/src/main/config/compile-js-config.xml |  16 +-
 frameworks/node-config-template.xml             | 340 ++++++++++++++++++
 frameworks/node-config.xml                      | 340 ++++++++++++++++++
 .../projects/Binding/.actionScriptProperties    |   2 +-
 frameworks/projects/Binding/build.xml           |   2 +-
 frameworks/projects/Binding/pom.xml             |  18 +-
 .../flex/binding/ApplicationDataBinding.as      |   2 +-
 .../org/apache/flex/binding/ChainBinding.as     |   2 +-
 .../org/apache/flex/binding/ConstantBinding.as  |   2 +-
 .../apache/flex/binding/ContainerDataBinding.as |   2 +-
 .../org/apache/flex/binding/GenericBinding.as   |   2 +-
 .../flex/binding/MXMLBeadViewBaseDataBinding.as | 342 -------------------
 .../flex/binding/MXMLBeadViewDataBinding.as     | 342 +++++++++++++++++++
 .../org/apache/flex/binding/PropertyWatcher.as  |   2 +-
 .../org/apache/flex/binding/SimpleBinding.as    |   2 +-
 .../apache/flex/binding/ViewBaseDataBinding.as  | 338 ------------------
 .../org/apache/flex/binding/ViewDataBinding.as  | 338 ++++++++++++++++++
 .../flex/org/apache/flex/binding/WatcherBase.as |   4 +-
 .../src/main/resources/basic-manifest.xml       |   4 +-
 .../projects/Charts/.actionScriptProperties     |   2 +-
 frameworks/projects/Charts/build.xml            |   2 +-
 frameworks/projects/Charts/pom.xml              |  12 +-
 .../flex/org/apache/flex/charts/ColumnChart.as  |   2 +-
 .../flex/org/apache/flex/charts/LineChart.as    |   2 +-
 .../flex/org/apache/flex/charts/PieChart.as     |   2 +-
 .../org/apache/flex/charts/StackedBarChart.as   |   2 +-
 .../apache/flex/charts/StackedColumnChart.as    |   2 +-
 .../apache/flex/charts/beads/AxisBaseBead.as    |   2 +-
 .../org/apache/flex/charts/beads/ChartView.as   |   2 +-
 .../DataItemRendererFactoryForSeriesData.as     |   2 +-
 .../org/apache/flex/charts/beads/DataTipBead.as |   2 +-
 .../charts/beads/HorizontalCategoryAxisBead.as  |   2 +-
 .../charts/beads/HorizontalLinearAxisBead.as    |   2 +-
 .../charts/beads/VerticalCategoryAxisBead.as    |   2 +-
 .../flex/charts/beads/VerticalLinearAxisBead.as |   2 +-
 .../flex/charts/beads/layouts/BarChartLayout.as |   2 +-
 .../charts/beads/layouts/ChartBaseLayout.as     |   2 +-
 .../charts/beads/layouts/ColumnChartLayout.as   |   2 +-
 .../layouts/LineChartCategoryVsLinearLayout.as  |   2 +-
 .../layouts/LineChartLinearVsLinearLayout.as    |   2 +-
 .../flex/charts/beads/layouts/PieChartLayout.as |   2 +-
 .../beads/layouts/StackedBarChartLayout.as      |   2 +-
 .../beads/layouts/StackedColumnChartLayout.as   |   2 +-
 .../apache/flex/charts/core/CartesianChart.as   |   2 +-
 .../org/apache/flex/charts/core/ChartBase.as    |   2 +-
 .../org/apache/flex/charts/core/IAxisBead.as    |   2 +-
 .../org/apache/flex/charts/core/IAxisGroup.as   |   2 +-
 .../flex/charts/core/ICartesianChartLayout.as   |   2 +-
 .../flex/org/apache/flex/charts/core/IChart.as  |   2 +-
 .../apache/flex/charts/core/IChartDataGroup.as  |   2 +-
 .../flex/charts/core/IChartItemRenderer.as      |   2 +-
 .../org/apache/flex/charts/core/IChartSeries.as |   2 +-
 .../flex/charts/core/IConnectedItemRenderer.as  |   2 +-
 .../flex/charts/core/IHorizontalAxisBead.as     |   2 +-
 .../flex/charts/core/IVerticalAxisBead.as       |   2 +-
 .../org/apache/flex/charts/core/PolarChart.as   |   2 +-
 .../flex/charts/optimized/SVGBoxItemRenderer.as |   2 +-
 .../flex/charts/optimized/SVGChartAxisGroup.as  |   2 +-
 .../flex/charts/optimized/SVGChartDataGroup.as  |   2 +-
 .../optimized/SVGLineSegmentItemRenderer.as     |   2 +-
 .../charts/optimized/SVGWedgeItemRenderer.as    |   2 +-
 .../flex/charts/supportClasses/BarSeries.as     |   2 +-
 .../charts/supportClasses/ChartAxisGroup.as     |   4 +-
 .../flex/charts/supportClasses/ColumnSeries.as  |   2 +-
 .../supportClasses/ILineSegmentItemRenderer.as  |   2 +-
 .../charts/supportClasses/IWedgeItemRenderer.as |   2 +-
 .../supportClasses/LineSegmentItemRenderer.as   |   2 +-
 .../flex/charts/supportClasses/LineSeries.as    |   2 +-
 .../flex/charts/supportClasses/PieSeries.as     |   2 +-
 .../charts/supportClasses/WedgeItemRenderer.as  |   2 +-
 .../Collections/.actionScriptProperties         |   2 +-
 frameworks/projects/Collections/build.xml       |   2 +-
 frameworks/projects/Collections/pom.xml         |   8 +-
 .../apache/flex/collections/FlattenedList.as    |   2 +-
 .../org/apache/flex/collections/ICollection.as  |   2 +-
 .../flex/collections/IStringCollection.as       |   2 +-
 .../apache/flex/collections/LazyCollection.as   |   8 +-
 .../collections/converters/IItemConverter.as    |   2 +-
 .../collections/converters/JSONItemConverter.as |   2 +-
 .../flex/collections/parsers/IInputParser.as    |   2 +-
 .../flex/collections/parsers/JSONInputParser.as |   2 +-
 .../projects/Core/.actionScriptProperties       |   2 +-
 frameworks/projects/Core/build.xml              |   2 +-
 frameworks/projects/Core/pom.xml                |  16 +-
 .../projects/Core/src/main/flex/CoreClasses.as  |  16 +-
 .../flex/org/apache/flex/core/Application.as    |  32 +-
 .../org/apache/flex/core/ApplicationBase.as     |   4 +-
 .../apache/flex/core/BrowserResizeListener.as   |   8 +-
 .../org/apache/flex/core/BrowserScroller.as     |   6 +-
 .../flex/org/apache/flex/core/BrowserWindow.as  |   4 +-
 .../org/apache/flex/core/CSSFontFaceBead.as     |  18 +-
 .../main/flex/org/apache/flex/core/CSSShape.as  |   2 +-
 .../main/flex/org/apache/flex/core/CSSSprite.as |   2 +-
 .../flex/org/apache/flex/core/CSSTextField.as   |   4 +-
 .../flex/org/apache/flex/core/CallLaterBead.as  |   6 +-
 .../flex/org/apache/flex/core/ContainerBase.as  |   2 +-
 .../flex/core/ContainerBaseStrandChildren.as    |   2 +-
 .../org/apache/flex/core/FilledRectangle.as     |   8 +-
 .../org/apache/flex/core/HTMLElementWrapper.as  |   4 +-
 .../flex/org/apache/flex/core/IBorderModel.as   |   2 +-
 .../main/flex/org/apache/flex/core/IChild.as    |   4 +-
 .../flex/org/apache/flex/core/IContainerView.as |   2 +-
 .../flex/org/apache/flex/core/IDataGridModel.as |   2 +-
 .../flex/org/apache/flex/core/IFlexJSElement.as |   2 +-
 .../flex/org/apache/flex/core/ILayoutChild.as   |   2 +-
 .../org/apache/flex/core/IScrollBarModel.as     |   2 +-
 .../main/flex/org/apache/flex/core/IUIBase.as   |   2 +-
 .../org/apache/flex/core/IViewportScroller.as   |   2 +-
 .../main/flex/org/apache/flex/core/ListBase.as  |   2 +-
 .../apache/flex/core/ListBaseStrandChildren.as  |   2 +-
 .../org/apache/flex/core/SimpleApplication.as   |   8 +-
 .../org/apache/flex/core/SimpleCSSValuesImpl.as |  18 +-
 .../flex/org/apache/flex/core/StageProxy.as     |   2 +-
 .../apache/flex/core/StyleableCSSTextField.as   |   2 +-
 .../main/flex/org/apache/flex/core/UIBase.as    |  62 ++--
 .../flex/org/apache/flex/core/UIButtonBase.as   |   2 +-
 .../src/main/flex/org/apache/flex/core/View.as  |  34 ++
 .../main/flex/org/apache/flex/core/ViewBase.as  |   3 +-
 .../org/apache/flex/events/ElementEvents.as     |   2 +-
 .../main/flex/org/apache/flex/events/Event.as   |   4 +-
 .../org/apache/flex/events/EventDispatcher.as   |   4 +-
 .../org/apache/flex/events/IEventDispatcher.as  |   4 +-
 .../flex/org/apache/flex/events/MouseEvent.as   |   4 +-
 .../flex/events/utils/IHandlesOriginalEvent.as  |   2 +-
 .../flex/events/utils/MouseEventConverter.as    |   2 +-
 .../src/main/flex/org/apache/flex/geom/Point.as |   4 +-
 .../main/flex/org/apache/flex/geom/Rectangle.as |   4 +-
 .../src/main/flex/org/apache/flex/geom/Size.as  |   2 +-
 .../flex/org/apache/flex/utils/BinaryData.as    |  28 +-
 .../org/apache/flex/utils/CSSBorderUtils.as     |   2 +-
 .../org/apache/flex/utils/CSSContainerUtils.as  |   2 +-
 .../main/flex/org/apache/flex/utils/Display.as  |  10 +-
 .../flex/org/apache/flex/utils/EffectTimer.as   |  12 +-
 .../flex/org/apache/flex/utils/HTMLLoader.as    |   4 +-
 .../main/flex/org/apache/flex/utils/Language.as |  57 +---
 .../apache/flex/utils/MXMLDataInterpreter.as    |  24 +-
 .../flex/org/apache/flex/utils/MixinManager.as  |   4 +-
 .../flex/org/apache/flex/utils/PNGEncoder.as    |   2 +-
 .../main/flex/org/apache/flex/utils/Platform.as |  12 +-
 .../flex/org/apache/flex/utils/PointUtils.as    |  10 +-
 .../main/flex/org/apache/flex/utils/Proxy.as    |   4 +-
 .../org/apache/flex/utils/SolidBorderUtil.as    |   2 +-
 .../flex/org/apache/flex/utils/StringTrimmer.as |   2 +-
 .../main/flex/org/apache/flex/utils/Timer.as    |   4 +-
 .../flex/utils/ViewSourceContextMenuOption.as   |   6 +-
 .../org/apache/flex/utils/dbg/DOMPathUtil.as    |   2 +-
 .../Core/src/main/resources/basic-manifest.xml  |   2 +-
 .../projects/Core/src/test/flex/build.xml       |   2 +-
 .../src/test/flex/flexUnitTests/StrandTester.as |   2 +-
 .../test/flex/flexUnitTests/StrandTesterTest.as |   2 +-
 .../projects/CreateJS/.actionScriptProperties   |   2 +-
 frameworks/projects/CreateJS/build.xml          |   2 +-
 frameworks/projects/CreateJS/pom.xml            |  12 +-
 .../org/apache/flex/createjs/Application.as     |   2 +-
 .../flex/org/apache/flex/createjs/CheckBox.as   |   4 +-
 .../flex/org/apache/flex/createjs/Container.as  |   4 +-
 .../main/flex/org/apache/flex/createjs/Label.as |   4 +-
 .../flex/org/apache/flex/createjs/TextButton.as |   4 +-
 .../apache/flex/createjs/core/CreateJSBase.as   |   4 +-
 .../org/apache/flex/createjs/core/UIBase.as     |   2 +-
 .../flex/org/apache/flex/createjs/core/View.as  |   2 +-
 .../org/apache/flex/createjs/graphics/Circle.as |   4 +-
 .../flex/createjs/graphics/GraphicShape.as      |   4 +-
 .../org/apache/flex/createjs/graphics/Rect.as   |   4 +-
 .../flex/org/apache/flex/createjs/tween/Ease.as |   8 +-
 .../org/apache/flex/createjs/tween/Tween.as     |   2 +-
 .../projects/DragDrop/.actionScriptProperties   |   2 +-
 frameworks/projects/DragDrop/build.xml          |   2 +-
 frameworks/projects/DragDrop/pom.xml            |   8 +-
 .../main/flex/org/apache/flex/core/DropType.as  |   2 +-
 .../flex/org/apache/flex/events/DragEvent.as    |   8 +-
 .../org/apache/flex/events/DragEventBase.as     |   6 +-
 .../projects/Effects/.actionScriptProperties    |   2 +-
 frameworks/projects/Effects/build.xml           |   2 +-
 frameworks/projects/Effects/pom.xml             |   8 +-
 .../flex/core/StatesWithTransitionsImpl.as      |   2 +-
 .../org/apache/flex/effects/PlatformWiper.as    |   6 +-
 .../projects/Flat/.actionScriptProperties       |   2 +-
 frameworks/projects/Flat/build.xml              |   2 +-
 frameworks/projects/Flat/pom.xml                |  18 +-
 .../projects/Flat/src/main/flex/FlatClasses.as  |   2 +-
 .../main/flex/org/apache/flex/flat/CheckBox.as  |   4 +-
 .../flex/org/apache/flex/flat/DropDownList.as   |   4 +-
 .../flex/org/apache/flex/flat/RadioButton.as    |   4 +-
 .../Flat/src/main/resources/defaults.css        |   4 +-
 .../Flat/src/main/resources/flat-manifest.xml   |   6 +-
 .../projects/Formatters/.actionScriptProperties |   2 +-
 frameworks/projects/Formatters/build.xml        |   2 +-
 frameworks/projects/Formatters/pom.xml          |   8 +-
 .../src/main/flex/FormattersClasses.as          |   2 +-
 .../flex/org/apache/flex/core/FormatBase.as     |   2 +-
 .../projects/GoogleMaps/.actionScriptProperties |   2 +-
 frameworks/projects/GoogleMaps/build.xml        |   2 +-
 frameworks/projects/GoogleMaps/pom.xml          |  20 +-
 .../src/main/flex/GoogleStubClasses.as          |   2 +-
 .../flex/maps/google/beads/GoogleMapView.as     |   4 +-
 .../flex/maps/google/beads/MapView_original.as  |   4 +-
 .../projects/Graphics/.actionScriptProperties   |   2 +-
 frameworks/projects/Graphics/build.xml          |   2 +-
 frameworks/projects/Graphics/pom.xml            |   8 +-
 .../org/apache/flex/core/graphics/Circle.as     |   6 +-
 .../org/apache/flex/core/graphics/Ellipse.as    |   6 +-
 .../apache/flex/core/graphics/GradientBase.as   |  12 +-
 .../apache/flex/core/graphics/GradientEntry.as  |   6 +-
 .../apache/flex/core/graphics/GraphicShape.as   |  10 +-
 .../flex/core/graphics/GraphicsContainer.as     | 100 +++---
 .../flex/org/apache/flex/core/graphics/IFill.as |   8 +-
 .../org/apache/flex/core/graphics/IStroke.as    |   4 +-
 .../apache/flex/core/graphics/LinearGradient.as |  10 +-
 .../flex/org/apache/flex/core/graphics/Path.as  |   4 +-
 .../flex/org/apache/flex/core/graphics/Rect.as  |   6 +-
 .../org/apache/flex/core/graphics/RoundRect.as  |   6 +-
 .../org/apache/flex/core/graphics/SolidColor.as |   8 +-
 .../flex/core/graphics/SolidColorStroke.as      |   6 +-
 .../flex/org/apache/flex/core/graphics/Text.as  |  12 +-
 .../core/graphics/utils/CompoundTransform.as    |   2 +-
 .../projects/HTML/.actionScriptProperties       |   2 +-
 frameworks/projects/HTML/build.xml              |   2 +-
 frameworks/projects/HTML/pom.xml                |  17 +-
 .../projects/HTML/src/main/flex/HTMLClasses.as  |  34 +-
 .../org/apache/flex/events/ItemAddedEvent.as    |   2 +-
 .../org/apache/flex/events/ItemClickedEvent.as  |   2 +-
 .../org/apache/flex/events/ItemRemovedEvent.as  |   2 +-
 .../main/flex/org/apache/flex/html/Button.as    |   4 +-
 .../main/flex/org/apache/flex/html/CheckBox.as  |  91 ++---
 .../src/main/flex/org/apache/flex/html/Label.as |  11 +-
 .../src/main/flex/org/apache/flex/html/List.as  |   2 +-
 .../flex/org/apache/flex/html/MXMLBeadView.as   | 317 +++++++++++++++++
 .../org/apache/flex/html/MXMLBeadViewBase.as    | 317 -----------------
 .../flex/org/apache/flex/html/RadioButton.as    | 121 +++----
 .../flex/org/apache/flex/html/RangeStepper.as   |  69 ++++
 .../flex/org/apache/flex/html/SimpleAlert.as    |   2 +-
 .../main/flex/org/apache/flex/html/TextArea.as  |   4 +-
 .../flex/org/apache/flex/html/TextButton.as     |  52 ++-
 .../main/flex/org/apache/flex/html/TextInput.as |  10 +-
 .../org/apache/flex/html/ToggleTextButton.as    |   4 +-
 .../flex/org/apache/flex/html/WebBrowser.as     |   4 +-
 .../flex/html/accessories/CheckBoxIcon.as       |  92 +++++
 .../accessories/NumericOnlyTextInputBead.as     |  10 +-
 .../flex/html/accessories/PasswordInputBead.as  |   8 +-
 .../flex/html/accessories/RadioButtonIcon.as    | 111 ++++++
 .../flex/html/accessories/TextPromptBead.as     |   8 +-
 .../flex/html/beads/BackgroundImageBead.as      |   2 +-
 .../org/apache/flex/html/beads/ContainerView.as |   2 +-
 .../apache/flex/html/beads/DataGridLinesBead.as |   2 +-
 .../html/beads/DataProviderChangeNotifier.as    |   2 +-
 .../flex/html/beads/DecrementButtonView.as      |  94 +++++
 .../org/apache/flex/html/beads/ISliderView.as   |   6 +-
 .../org/apache/flex/html/beads/ISpinnerView.as  |   6 +-
 .../flex/html/beads/ImageAndTextButtonView.as   |   2 +-
 .../apache/flex/html/beads/ImageButtonView.as   |  12 +-
 .../org/apache/flex/html/beads/ImageView.as     |  14 +-
 .../flex/html/beads/IncrementButtonView.as      |  94 +++++
 .../apache/flex/html/beads/RangeStepperView.as  | 157 +++++++++
 .../apache/flex/html/beads/SliderThumbView.as   |  18 +-
 .../apache/flex/html/beads/SliderTrackView.as   |  18 +-
 .../apache/flex/html/beads/TitleBarView.mxml    |   6 +-
 .../apache/flex/html/beads/WebBrowserView.as    |   4 +-
 .../controllers/ItemRendererMouseController.as  |  12 +-
 .../controllers/RangeStepperMouseController.as  |  94 +++++
 .../beads/controllers/SliderMouseController.as  |  14 +-
 .../beads/controllers/SpinnerMouseController.as |   2 +-
 .../flex/html/beads/layouts/BasicLayout.as      |   2 +-
 .../flex/html/beads/layouts/DataGridLayout.as   |   2 +-
 .../flex/html/beads/layouts/HorizontalLayout.as |   4 +-
 .../flex/html/beads/layouts/TileLayout.as       |   2 +-
 .../html/beads/layouts/VerticalColumnLayout.as  |   2 +-
 .../flex/html/beads/layouts/VerticalLayout.as   |   4 +-
 .../html/beads/models/ListPresentationModel.as  |   2 +-
 .../html/beads/models/RangeModelExtended.as     | 101 ++++++
 .../flex/html/beads/models/ViewportModel.as     |   2 +-
 .../html/supportClasses/ContainerContentArea.as |   2 +-
 .../html/supportClasses/DataItemRenderer.as     |   8 +-
 .../html/supportClasses/GraphicsItemRenderer.as |   2 +-
 .../html/supportClasses/ScrollingViewport.as    |  38 +--
 .../html/supportClasses/StringItemRenderer.as   |  14 +-
 .../HTML/src/main/resources/basic-manifest.xml  |   5 +-
 .../HTML/src/main/resources/defaults.css        |  10 +-
 .../flex/flexUnitTests/DataGridColumnTester.as  |   2 +-
 .../projects/HTML5/.actionScriptProperties      |   2 +-
 frameworks/projects/HTML5/build.xml             |   2 +-
 frameworks/projects/HTML5/pom.xml               |  12 +-
 .../projects/JQuery/.actionScriptProperties     |   2 +-
 frameworks/projects/JQuery/build.xml            |   2 +-
 frameworks/projects/JQuery/pom.xml              |  12 +-
 .../flex/org/apache/flex/jquery/RadioButton.as  |   2 +-
 .../MX/.externalToolBuilders/MXASJS.launch      |  44 ---
 .../MX/src/main/config/compile-as-config.xml    |   2 +-
 .../src/main/flex/flex/display/DisplayObject.as |   4 +-
 .../flex/flex/display/DisplayObjectContainer.as |   2 +-
 .../MX/src/main/flex/flex/display/Graphics.as   |   2 +-
 .../main/flex/flex/display/InteractiveObject.as |   2 +-
 .../MX/src/main/flex/flex/display/Loader.as     |   2 +-
 .../MX/src/main/flex/flex/display/ModuleInfo.as |  14 +-
 .../MX/src/main/flex/flex/display/MovieClip.as  |  12 +-
 .../MX/src/main/flex/flex/display/Shape.as      |   2 +-
 .../MX/src/main/flex/flex/display/Sprite.as     |   2 +-
 .../main/flex/flex/display/TopOfDisplayList.as  |   6 +-
 .../main/flex/flex/events/ContextMenuEvent.as   |   2 +-
 .../MX/src/main/flex/flex/events/Event.as       |   2 +-
 .../MX/src/main/flex/flex/events/EventPhase.as  |   2 +-
 .../MX/src/main/flex/flex/events/FocusEvent.as  |   2 +-
 .../main/flex/flex/events/IEventDispatcher.as   |   2 +-
 .../src/main/flex/flex/events/IOErrorEvent.as   |   2 +-
 .../src/main/flex/flex/events/ProgressEvent.as  |   2 +-
 .../MX/src/main/flex/flex/events/TimerEvent.as  |   2 +-
 .../main/flex/flex/system/DefinitionManager.as  |  12 +-
 .../MX/src/main/flex/flex/system/I18NManager.as |   6 +-
 .../MX/src/main/flex/flex/text/TextField.as     |   6 +-
 .../MX/src/main/flex/flex/text/TextFieldType.as |   2 +-
 .../MX/src/main/flex/flex/text/TextFormat.as    |   2 +-
 .../src/main/flex/flex/text/TextFormatAlign.as  |   2 +-
 .../src/main/flex/flex/text/TextLineMetrics.as  |   6 +-
 .../MX/src/main/flex/flex/ui/Keyboard.as        |   2 +-
 .../projects/MX/src/main/flex/flex/ui/Mouse.as  |   2 +-
 .../src/main/flex/flex/utils/IExternalizable.as |   2 +-
 .../flex/mx/automation/IAutomationObject.as     |   2 +-
 .../MX/src/main/flex/mx/binding/Binding.as      |   4 +-
 .../MX/src/main/flex/mx/binding/Watcher.as      |   2 +-
 .../containers/utilityClasses/CanvasLayout.as   |   2 +-
 .../utilityClasses/ConstraintColumn.as          |   2 +-
 .../containers/utilityClasses/ConstraintRow.as  |   2 +-
 .../main/flex/mx/controls/IFlexContextMenu.as   |   2 +-
 .../MX/src/main/flex/mx/controls/Label.as       |   2 +-
 .../MX/src/main/flex/mx/controls/ToolTip.as     |   6 +-
 .../MX/src/main/flex/mx/core/Application.as     |  20 +-
 .../MX/src/main/flex/mx/core/Container.as       |  22 +-
 .../src/main/flex/mx/core/ContainerGlobals.as   |   2 +-
 .../flex/mx/core/ContainerRawChildrenList.as    |   2 +-
 .../src/main/flex/mx/core/DPIClassification.as  |   2 +-
 .../MX/src/main/flex/mx/core/IChildList.as      |   2 +-
 .../src/main/flex/mx/core/IConstraintClient.as  |   2 +-
 .../MX/src/main/flex/mx/core/IContainer.as      |   4 +-
 .../main/flex/mx/core/IDeferredContentOwner.as  |   2 +-
 .../mx/core/IDisplayObjectContainerInterface.as |  20 +-
 .../flex/mx/core/IDisplayObjectInterface.as     |   4 +-
 .../src/main/flex/mx/core/IFlexDisplayObject.as |   2 +-
 .../src/main/flex/mx/core/INavigatorContent.as  |   2 +-
 .../src/main/flex/mx/core/IProgrammaticSkin.as  |   2 +-
 .../src/main/flex/mx/core/ISpriteInterface.as   |  18 +-
 .../MX/src/main/flex/mx/core/IStateClient2.as   |   2 +-
 .../src/main/flex/mx/core/ITextFieldFactory.as  |   2 +-
 .../flex/mx/core/ITransientDeferredInstance.as  |   2 +-
 .../MX/src/main/flex/mx/core/IUIComponent.as    |   2 +-
 .../MX/src/main/flex/mx/core/IUITextField.as    |   2 +-
 .../MX/src/main/flex/mx/core/IVisualElement.as  |   2 +-
 .../src/main/flex/mx/core/RuntimeDPIProvider.as |   6 +-
 .../MX/src/main/flex/mx/core/UIComponent.as     |  48 +--
 .../src/main/flex/mx/core/UIComponentGlobals.as |   4 +-
 .../MX/src/main/flex/mx/core/UITextField.as     |  50 +--
 .../MX/src/main/flex/mx/core/UITextFormat.as    |   2 +-
 .../src/main/flex/mx/effects/EffectManager.as   |   2 +-
 .../src/main/flex/mx/effects/IAbstractEffect.as |   4 +-
 .../main/flex/mx/effects/IEffectTargetHost.as   |   2 +-
 .../mx/events/ChildExistenceChangedEvent.as     |   2 +-
 .../src/main/flex/mx/events/FlexChangeEvent.as  |   2 +-
 .../MX/src/main/flex/mx/events/FocusEvent.as    |   2 +-
 .../main/flex/mx/events/IndexChangedEvent.as    |   2 +-
 .../main/flex/mx/managers/CursorManagerImpl.as  |   8 +-
 .../src/main/flex/mx/managers/FocusManager.as   |  42 +--
 .../flex/mx/managers/IFocusManagerContainer.as  |   2 +-
 .../src/main/flex/mx/managers/ISystemManager.as |   4 +-
 .../mx/managers/ISystemManagerChildManager.as   |   2 +-
 .../main/flex/mx/managers/IToolTipManager.as    |   2 +-
 .../main/flex/mx/managers/IToolTipManager2.as   |   2 +-
 .../main/flex/mx/managers/SystemChildrenList.as |   2 +-
 .../src/main/flex/mx/managers/SystemManager.as  | 116 +++----
 .../flex/mx/managers/SystemRawChildrenList.as   |   2 +-
 .../src/main/flex/mx/managers/ToolTipManager.as |   2 +-
 .../main/flex/mx/managers/ToolTipManagerImpl.as |   4 +-
 .../flex/mx/preloaders/IPreloaderDisplay.as     |   2 +-
 .../MX/src/main/flex/mx/preloaders/Preloader.as |   8 +-
 .../main/flex/mx/resources/ResourceBundle.as    |   6 +-
 .../main/flex/mx/resources/ResourceManager.as   |   2 +-
 .../flex/mx/resources/ResourceManagerImpl.as    |   6 +-
 .../MX/src/main/flex/mx/states/AddChild.as      |   2 +-
 .../MX/src/main/flex/mx/states/AddItems.as      |   2 +-
 .../main/flex/mx/states/InterruptionBehavior.as |   2 +-
 .../MX/src/main/flex/mx/states/OverrideBase.as  |   2 +-
 .../MX/src/main/flex/mx/states/RemoveChild.as   |   2 +-
 .../src/main/flex/mx/states/SetEventHandler.as  |   2 +-
 .../main/flex/mx/styles/CSSStyleDeclaration.as  |  12 +-
 .../src/main/flex/mx/styles/StyleManagerImpl.as |   2 +-
 .../src/main/flex/mx/styles/StyleProtoChain.as  |   2 +-
 .../metadata/ContainerBackgroundStyles.as       |   2 +-
 .../MX/src/main/flex/mx/utils/DensityUtil.as    |   2 +-
 .../flex/mx/utils/DescribeTypeCacheRecord.as    |   6 +-
 .../MX/src/main/flex/mx/utils/GraphicsUtil.as   |   2 +-
 .../MX/src/main/flex/mx/utils/IXMLNotifiable.as |   2 +-
 .../MX/src/main/flex/mx/utils/LoaderUtil.as     |  10 +-
 .../MX/src/main/flex/mx/utils/NameUtil.as       |   2 +-
 .../MX/src/main/flex/mx/utils/ObjectProxy.as    |  34 +-
 .../MX/src/main/flex/mx/utils/ObjectUtil.as     |  30 +-
 .../flex/mx/utils/OnDemandEventDispatcher.as    |  12 +-
 .../MX/src/main/flex/mx/utils/OrderedObject.as  |  20 +-
 .../MX/src/main/flex/mx/utils/Platform.as       |   4 +-
 .../MX/src/main/flex/mx/utils/UIDUtil.as        |  16 +-
 frameworks/projects/MX/src/test/flex/build.xml  |   2 +-
 .../MX/src/test/flex/src/TestCompile.mxml       |   4 +-
 .../projects/Mobile/.actionScriptProperties     |   2 +-
 frameworks/projects/Mobile/build.xml            |   2 +-
 frameworks/projects/Mobile/pom.xml              |  12 +-
 .../Mobile/src/main/flex/MobileClasses.as       |   4 +-
 .../main/flex/org/apache/cordova/Application.as |   2 +-
 .../src/main/flex/org/apache/cordova/Weinre.as  |   6 +-
 .../flex/org/apache/cordova/camera/Camera.as    |  20 +-
 .../flex/org/apache/flex/mobile/DatePicker.as   |  80 +++++
 .../main/flex/org/apache/flex/mobile/IView.as   |  45 ---
 .../flex/org/apache/flex/mobile/IViewManager.as |   6 +-
 .../org/apache/flex/mobile/IViewManagerView.as  |  45 +++
 .../flex/org/apache/flex/mobile/ManagerBase.as  |   4 +-
 .../apache/flex/mobile/StackedViewManager.as    |  16 +-
 .../org/apache/flex/mobile/TabbedViewManager.as |   4 +-
 .../flex/org/apache/flex/mobile/TitleView.as    | 103 ++++++
 .../flex/org/apache/flex/mobile/ToggleSwitch.as |   2 +-
 .../main/flex/org/apache/flex/mobile/View.as    | 103 ------
 .../org/apache/flex/mobile/ViewManagerBase.as   |  12 +-
 .../apache/flex/mobile/beads/DatePickerView.as  | 185 ++++++++++
 .../flex/mobile/beads/MobileWebBrowserView.as   |   4 +-
 .../flex/mobile/beads/StackedViewManagerView.as |   2 +-
 .../flex/mobile/beads/TabbedViewManagerView.as  |   2 +-
 .../flex/mobile/beads/ToggleSwitchView.as       |   2 +-
 .../apache/flex/mobile/beads/ViewManagerView.as | 166 ---------
 .../flex/mobile/beads/ViewManagerViewBase.as    | 166 +++++++++
 .../controllers/ToggleSwitchMouseController.as  |   4 +-
 .../apache/flex/mobile/chrome/NavigationBar.as  |   2 +-
 .../org/apache/flex/mobile/chrome/TabBar.as     |   2 +-
 .../org/apache/flex/mobile/chrome/ToolBar.as    |   2 +-
 .../flex/mobile/models/ViewManagerModel.as      |   2 +-
 .../src/main/resources/basic-manifest.xml       |   3 +-
 .../Mobile/src/main/resources/defaults.css      |  23 ++
 .../projects/Network/.actionScriptProperties    |   2 +-
 frameworks/projects/Network/build.xml           |   2 +-
 frameworks/projects/Network/pom.xml             |   8 +-
 .../flex/org/apache/flex/net/BinaryUploader.as  |  26 +-
 .../main/flex/org/apache/flex/net/HTTPHeader.as |   2 +-
 .../flex/org/apache/flex/net/HTTPService.as     |  26 +-
 .../flex/org/apache/flex/net/HTTPServiceBase.as |   6 +-
 .../projects/Reflection/.actionScriptProperties |   2 +-
 frameworks/projects/Reflection/build.xml        |   2 +-
 frameworks/projects/Reflection/pom.xml          |   8 +-
 .../flex/reflection/DefinitionWithMetaData.as   |   2 +-
 .../flex/reflection/MetaDataDefinition.as       |   2 +-
 .../apache/flex/reflection/TypeDefinition.as    |  14 +-
 .../org/apache/flex/reflection/describeType.as  |   4 +-
 .../flex/reflection/getDefinitionByName.as      |   4 +-
 .../flex/reflection/getQualifiedClassName.as    |   4 +-
 .../reflection/getQualifiedSuperclassName.as    |   4 +-
 frameworks/projects/Storage/build.xml           |   2 +-
 frameworks/projects/Storage/pom.xml             |  12 +-
 .../apache/flex/storage/IPermanentStorage.as    |   2 +-
 .../flex/storage/events/FileErrorEvent.as       |   2 +-
 .../org/apache/flex/storage/events/FileEvent.as |   2 +-
 .../apache/flex/storage/file/DataInputStream.as |  12 +-
 .../flex/storage/file/DataOutputStream.as       |  12 +-
 .../org/apache/flex/storage/file/IDataInput.as  |   2 +-
 .../org/apache/flex/storage/file/IDataOutput.as |   2 +-
 .../org/apache/flex/storage/file/IDataStream.as |   2 +-
 .../org/apache/flex/storage/file/LocalFile.as   |   4 +-
 .../storage/providers/AirStorageProvider.as     |  10 +-
 .../storage/providers/LocalStorageProvider.as   |  18 +-
 .../Storage/src/main/resources/defaults.css     |   2 +-
 frameworks/projects/XML/build.xml               |   2 +-
 frameworks/projects/XML/pom.xml                 |  10 +-
 .../projects/XML/src/main/flex/XMLClasses.as    |   2 +-
 frameworks/projects/pom.xml                     |   2 +-
 ...ew Flex Project to FlexJS MVC Project.launch |  21 ++
 ...rt New Flex Project to FlexJS Project.launch |  19 ++
 ide/flashbuilder/FlexJS (Cordova Build).launch  |   7 +-
 ide/flashbuilder/FlexJS (Cordova Run).launch    |   7 +-
 ide/flashbuilder/antscripts.xml                 |  61 ++++
 installer.xml                                   |  30 ++
 js/bin/asjsc                                    |   2 +-
 js/bin/asjsc.bat                                |   2 +-
 js/bin/asjscompc                                |   2 +-
 js/bin/asjscompc.bat                            |   2 +-
 js/bin/asnodec                                  |   2 +-
 js/bin/asnodec.bat                              |   2 +-
 js/bin/jquery                                   |   2 +-
 js/bin/jquery.bat                               |   2 +-
 .../ContainerTest/src/MyInitialView.mxml        |   6 +-
 .../ContainerTest/src/models/ProductsModel.as   |   2 +-
 .../ContainerTest/src/products/Product.as       |   2 +-
 .../DataGridXcompile/src/MyInitialView.mxml     |   4 +-
 .../src/models/MyGridPresentation.as            |   2 +-
 .../src/models/ProductsModel.as                 |   2 +-
 .../flex/core/IDataGridPresentationModel.as     |   2 +-
 .../apache/flex/html/customControls/DataGrid.as |   2 +-
 .../html/customControls/beads/IDataGridView.as  |   2 +-
 .../beads/IDataProviderItemRendererMapper.as    |   2 +-
 .../beads/models/DataGridPresentationModel.as   |   2 +-
 .../DataGridXcompile/src/products/Product.as    |   2 +-
 .../DateChooserExample/src/MyInitialView.mxml   |   4 +-
 .../EffectsExample/src/MyInitialView.mxml       |   4 +-
 .../FlexJSTest_HTML5/src/MyInitialView.mxml     |   4 +-
 .../src/StockDataJSONItemConverter.as           |   2 +-
 .../src/controllers/MyController.as             |   2 +-
 .../FlexJSTest_HTML5/src/models/MyModel.as      |   2 +-
 .../FlexJSTest_Panel/src/MyInitialView.mxml     |   4 +-
 .../FlexJSTest_SVG/src/GraphicsView.mxml        |   4 +-
 .../FlexJSTest_SVG/src/MyInitialView.mxml       |   4 +-
 manualtests/FlexJSTest_SVG/src/SkinsView.mxml   |   6 +-
 .../src/controllers/MyController.as             |   2 +-
 .../FlexJSTest_SVG/src/models/MyModel.as        |   2 +-
 .../FlexJSTest_SVG/src/skins/Button_up.mxml     |   4 +-
 .../src/skins/flatspark/enums/BrandColorEnum.as |   2 +-
 .../skins/flatspark/enums/ButtonColorEnum.as    |   2 +-
 .../src/skins/flatspark/enums/ButtonSizeEnum.as |   2 +-
 .../skins/flatspark/enums/ColorSwatchEnum.as    |   2 +-
 .../src/skins/flatspark/enums/SizeEnum.as       |   2 +-
 .../skins/flatspark/enums/TextInputSizeEnum.as  |   2 +-
 .../src/skins/flatspark/utils/AwesomeUtils.as   |   2 +-
 .../src/skins/flatspark/utils/ColorUtils.as     |   2 +-
 .../FlexJSTest_basic/src/MyInitialView.mxml     |   4 +-
 .../src/StockDataJSONItemConverter.as           |   2 +-
 .../src/controllers/MyController.as             |   2 +-
 .../FlexJSTest_basic/src/models/MyModel.as      |   2 +-
 manualtests/FlexJSTest_createjs/build.xml       |   2 +-
 .../FlexJSTest_createjs/src/MyInitialView.mxml  |   4 +-
 .../src/controllers/MyController.as             |   2 +-
 .../FlexJSTest_createjs/src/models/MyModel.as   |   2 +-
 .../FlexJSTest_jquery/src/MyInitialView.mxml    |   4 +-
 .../src/StockDataJSONItemConverter.as           |   2 +-
 .../src/controllers/MyController.as             |   2 +-
 .../FlexJSTest_jquery/src/models/MyModel.as     |   2 +-
 manualtests/FormExample/src/MyFormView.mxml     |   4 +-
 manualtests/FormatExample/src/MyFormView.mxml   |   4 +-
 manualtests/ImageTest/src/MyInitialView.mxml    |   4 +-
 manualtests/LanguageTests/src/LanguageTests.as  |   2 +-
 manualtests/LanguageTests/src/classes/B.as      |   2 +-
 manualtests/LanguageTests/src/classes/C.as      |   2 +-
 manualtests/LanguageTests/src/interfaces/IA.as  |   2 +-
 manualtests/LanguageTests/src/interfaces/IB.as  |   2 +-
 manualtests/LanguageTests/src/interfaces/IC.as  |   2 +-
 manualtests/LanguageTests/src/interfaces/ID.as  |   2 +-
 manualtests/LanguageTests/src/interfaces/IE.as  |   2 +-
 manualtests/LanguageTests/src/interfaces/IF.as  |   2 +-
 manualtests/ListsTest/src/FirstView.mxml        |   4 +-
 .../ListsTest/src/models/ProductsModel.as       |   2 +-
 manualtests/ListsTest/src/products/Product.as   |   2 +-
 manualtests/ProxyTest/src/MyInitialView.mxml    |   4 +-
 .../ProxyTest/src/controllers/MyController.as   |   2 +-
 manualtests/ProxyTest/src/models/MyModel.as     |   2 +-
 .../ReflectionTest/src/MyInitialView.mxml       |   4 +-
 .../src/controllers/MyController.as             |   2 +-
 .../ReflectionTest/src/models/MyModel.as        |   2 +-
 manualtests/RollEventsTest/src/RollEvent.as     |   2 +-
 .../RollEventsTest/src/RollEventController.as   |   2 +-
 .../RollEventsTest/src/RollEventsTest.mxml      |   4 +-
 manualtests/VanillaSDK_POC/src/Example.as       |   2 +-
 manualtests/XMLTest/src/MyInitialView.mxml      |   5 +-
 .../XMLTest/src/controllers/MyController.as     |   2 +-
 manualtests/XMLTest/src/models/MyModel.as       |   2 +-
 mustella/tests/basicTests/BasicTests.css        |   2 +-
 mustella/tests/basicTests/BasicTests.mxml       |   4 +-
 .../spark/views/styleTest/ADVStyleTestClass.as  |   2 +-
 .../spark/views/styleTest/ADVStyleTestEvent.as  |   2 +-
 .../utils/PlayerGlobalToJS/src/nl/ixms/Utils.as |   2 +-
 .../PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as    |   2 +-
 .../src/nl/ixms/vo/ClazzMemberTypeLists.as      |   2 +-
 .../PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as    |   2 +-
 .../src/vf2js/display/IDisplayObject.as         |   2 +-
 .../vf2js/display/IDisplayObjectContainer.as    |   2 +-
 .../src/vf2js/display/IInteractiveObject.as     |   2 +-
 .../src/vf2js/display/ILoaderInfo.as            |   2 +-
 .../src/vf2js/display/IMovieClip.as             |   2 +-
 .../src/vf2js/display/ISprite.as                |   2 +-
 .../src/vf2js/display/IStage.as                 |   2 +-
 .../PlayerGlobalToJS/src/vf2js/events/IEvent.as |   2 +-
 .../src/vf2js/events/IEventDispatcher.as        |   2 +-
 .../src/vf2js/events/IProgressEvent.as          |   2 +-
 .../src/vf2js/events/ITimerEvent.as             |   2 +-
 .../src/vf2js/system/IApplicationDomain.as      |   2 +-
 .../src/vf2js/system/ICapabilities.as           |   2 +-
 .../PlayerGlobalToJS/src/vf2js/utils/ITimer.as  |   2 +-
 .../src/vf2js/utils/IgetDefinitionByName.as     |   2 +-
 713 files changed, 7509 insertions(+), 3551 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/apache-flex-flexjs-installer-config.xml
----------------------------------------------------------------------
diff --cc apache-flex-flexjs-installer-config.xml
index 42813bf,42813bf..865b280
--- a/apache-flex-flexjs-installer-config.xml
+++ b/apache-flex-flexjs-installer-config.xml
@@@ -262,4 -262,4 +262,4 @@@
              <license>CC-BY-NC-ND \u6388\u6b0a\u5408\u7d04</license>
          </zh_TW>
      </component>
--</config>
++</config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/ChartExample/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/ChartExample/src/models/ProductsModel.as
index c173c6e,c173c6e..a3971f2
--- a/examples/flexjs/ChartExample/src/models/ProductsModel.as
+++ b/examples/flexjs/ChartExample/src/models/ProductsModel.as
@@@ -76,4 -76,4 +76,4 @@@ package model
  			return _wave;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/ChartExample/src/products/Product.as
----------------------------------------------------------------------
diff --cc examples/flexjs/ChartExample/src/products/Product.as
index 2205e69,2205e69..b85319e
--- a/examples/flexjs/ChartExample/src/products/Product.as
+++ b/examples/flexjs/ChartExample/src/products/Product.as
@@@ -42,4 -42,4 +42,4 @@@ package product
  			return title;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample/src/StockDataJSONItemConverter.as
index a39606b,a39606b..0f3849c
--- a/examples/flexjs/DataBindingExample/src/StockDataJSONItemConverter.as
+++ b/examples/flexjs/DataBindingExample/src/StockDataJSONItemConverter.as
@@@ -37,4 -37,4 +37,4 @@@ packag
  			return obj;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample/src/controllers/MyController.as
index 2ee16ae,2ee16ae..7aa74ae
--- a/examples/flexjs/DataBindingExample/src/controllers/MyController.as
+++ b/examples/flexjs/DataBindingExample/src/controllers/MyController.as
@@@ -78,4 -78,4 +78,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample/src/models/MyModel.as
index 5a16d02,5a16d02..8798300
--- a/examples/flexjs/DataBindingExample/src/models/MyModel.as
+++ b/examples/flexjs/DataBindingExample/src/models/MyModel.as
@@@ -122,4 -122,4 +122,4 @@@ package model
          }
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample_Flat/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample_Flat/src/StockDataJSONItemConverter.as
index a39606b,a39606b..0f3849c
--- a/examples/flexjs/DataBindingExample_Flat/src/StockDataJSONItemConverter.as
+++ b/examples/flexjs/DataBindingExample_Flat/src/StockDataJSONItemConverter.as
@@@ -37,4 -37,4 +37,4 @@@ packag
  			return obj;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample_Flat/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample_Flat/src/controllers/MyController.as
index 2ee16ae,2ee16ae..7aa74ae
--- a/examples/flexjs/DataBindingExample_Flat/src/controllers/MyController.as
+++ b/examples/flexjs/DataBindingExample_Flat/src/controllers/MyController.as
@@@ -78,4 -78,4 +78,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample_Flat/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample_Flat/src/models/MyModel.as
index 5a16d02,5a16d02..8798300
--- a/examples/flexjs/DataBindingExample_Flat/src/models/MyModel.as
+++ b/examples/flexjs/DataBindingExample_Flat/src/models/MyModel.as
@@@ -122,4 -122,4 +122,4 @@@ package model
          }
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample_as/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample_as/src/StockDataJSONItemConverter.as
index a39606b,a39606b..0f3849c
--- a/examples/flexjs/DataBindingExample_as/src/StockDataJSONItemConverter.as
+++ b/examples/flexjs/DataBindingExample_as/src/StockDataJSONItemConverter.as
@@@ -37,4 -37,4 +37,4 @@@ packag
  			return obj;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample_as/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample_as/src/controllers/MyController.as
index 2ee16ae,2ee16ae..7aa74ae
--- a/examples/flexjs/DataBindingExample_as/src/controllers/MyController.as
+++ b/examples/flexjs/DataBindingExample_as/src/controllers/MyController.as
@@@ -78,4 -78,4 +78,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataBindingExample_as/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataBindingExample_as/src/models/MyModel.as
index 4a17f22,4a17f22..c492099
--- a/examples/flexjs/DataBindingExample_as/src/models/MyModel.as
+++ b/examples/flexjs/DataBindingExample_as/src/models/MyModel.as
@@@ -124,4 -124,4 +124,4 @@@ package model
          }
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataGridExample/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataGridExample/src/models/ProductsModel.as
index 8eab2fe,8eab2fe..f16cfc4
--- a/examples/flexjs/DataGridExample/src/models/ProductsModel.as
+++ b/examples/flexjs/DataGridExample/src/models/ProductsModel.as
@@@ -52,4 -52,4 +52,4 @@@ package model
  			return _labelFields;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DataGridExample/src/products/Product.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DataGridExample/src/products/Product.as
index fd4b31e,fd4b31e..8fb3e21
--- a/examples/flexjs/DataGridExample/src/products/Product.as
+++ b/examples/flexjs/DataGridExample/src/products/Product.as
@@@ -40,4 -40,4 +40,4 @@@ package product
  			return title;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/DesktopMap/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/DesktopMap/src/models/MyModel.as
index e0dab68,e0dab68..c3b4c53
--- a/examples/flexjs/DesktopMap/src/models/MyModel.as
+++ b/examples/flexjs/DesktopMap/src/models/MyModel.as
@@@ -55,4 -55,4 +55,4 @@@ package model
  			return _coordinates;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as
index cb27bde,cb27bde..ee72a25
--- a/examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as
+++ b/examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as
@@@ -38,4 -38,4 +38,4 @@@ packag
  			return product;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore/src/samples/flexstore/Product.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore/src/samples/flexstore/Product.as
index 040fb8f,040fb8f..aa5cb16
--- a/examples/flexjs/FlexJSStore/src/samples/flexstore/Product.as
+++ b/examples/flexjs/FlexJSStore/src/samples/flexstore/Product.as
@@@ -75,4 -75,4 +75,4 @@@ public class Produc
  
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilter.as
index d182371,d182371..5b524e8
--- a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilter.as
+++ b/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilter.as
@@@ -53,4 -53,4 +53,4 @@@ public class ProductFilte
      }
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
index 28129e7,28129e7..6e907f4
--- a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
+++ b/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
@@@ -36,4 -36,4 +36,4 @@@ public class ProductFilterEvent extend
      }
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductListEvent.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore/src/samples/flexstore/ProductListEvent.as
index b6b9371,b6b9371..2aff45b
--- a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductListEvent.as
+++ b/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductListEvent.as
@@@ -39,4 -39,4 +39,4 @@@ public class ProductListEvent extends E
      
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
index f92dc7f,f92dc7f..0384d03
--- a/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
+++ b/examples/flexjs/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
@@@ -42,4 -42,4 +42,4 @@@ public class ProductThumbEvent extends 
      }
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore_jquery/src/ProductJSONItemConverter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore_jquery/src/ProductJSONItemConverter.as
index cb27bde,cb27bde..ee72a25
--- a/examples/flexjs/FlexJSStore_jquery/src/ProductJSONItemConverter.as
+++ b/examples/flexjs/FlexJSStore_jquery/src/ProductJSONItemConverter.as
@@@ -38,4 -38,4 +38,4 @@@ packag
  			return product;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/Product.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/Product.as
index 040fb8f,040fb8f..aa5cb16
--- a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/Product.as
+++ b/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/Product.as
@@@ -75,4 -75,4 +75,4 @@@ public class Produc
  
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilter.as
index d182371,d182371..5b524e8
--- a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilter.as
+++ b/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilter.as
@@@ -53,4 -53,4 +53,4 @@@ public class ProductFilte
      }
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilterEvent.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilterEvent.as
index 28129e7,28129e7..6e907f4
--- a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilterEvent.as
+++ b/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductFilterEvent.as
@@@ -36,4 -36,4 +36,4 @@@ public class ProductFilterEvent extend
      }
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductListEvent.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductListEvent.as
index b6b9371,b6b9371..2aff45b
--- a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductListEvent.as
+++ b/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductListEvent.as
@@@ -39,4 -39,4 +39,4 @@@ public class ProductListEvent extends E
      
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductThumbEvent.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductThumbEvent.as
index f92dc7f,f92dc7f..0384d03
--- a/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductThumbEvent.as
+++ b/examples/flexjs/FlexJSStore_jquery/src/samples/flexstore/ProductThumbEvent.as
@@@ -42,4 -42,4 +42,4 @@@ public class ProductThumbEvent extends 
      }
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAJSONInputParser.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAJSONInputParser.as
index c443de5,c443de5..9784627
--- a/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAJSONInputParser.as
+++ b/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAJSONInputParser.as
@@@ -35,4 -35,4 +35,4 @@@ package controller
  			return rowsArray;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAStatsDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAStatsDataJSONItemConverter.as
index 608db8f,608db8f..ae916a5
--- a/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAStatsDataJSONItemConverter.as
+++ b/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/GAStatsDataJSONItemConverter.as
@@@ -38,4 -38,4 +38,4 @@@ package controller
  			return obj;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/StatsController.as
----------------------------------------------------------------------
diff --cc examples/flexjs/FlexWebsiteStatsViewer/src/controllers/StatsController.as
index b4a054c,b4a054c..25ead28
--- a/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/StatsController.as
+++ b/examples/flexjs/FlexWebsiteStatsViewer/src/controllers/StatsController.as
@@@ -74,4 -74,4 +74,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MapSearch/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MapSearch/src/models/MyModel.as
index 8a1e8fd,8a1e8fd..b4af37e
--- a/examples/flexjs/MapSearch/src/models/MyModel.as
+++ b/examples/flexjs/MapSearch/src/models/MyModel.as
@@@ -68,4 -68,4 +68,4 @@@ package model
  			dispatchEvent(new Event("searchResultsChanged"));
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MobileTrader/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MobileTrader/src/StockDataJSONItemConverter.as
index 5c21c26,5c21c26..1669d9d
--- a/examples/flexjs/MobileTrader/src/StockDataJSONItemConverter.as
+++ b/examples/flexjs/MobileTrader/src/StockDataJSONItemConverter.as
@@@ -37,4 -37,4 +37,4 @@@ packag
  			return obj;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
index f8373ca,f8373ca..3b07493
--- a/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
+++ b/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
@@@ -138,4 -138,4 +138,4 @@@ package controlle
  			model.dispatchEvent(newEvent);
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MobileTrader/src/controller/WatchListController.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MobileTrader/src/controller/WatchListController.as
index 5da5b70,5da5b70..f8e1bb3
--- a/examples/flexjs/MobileTrader/src/controller/WatchListController.as
+++ b/examples/flexjs/MobileTrader/src/controller/WatchListController.as
@@@ -135,4 -135,4 +135,4 @@@ package controlle
  			model.dispatchEvent(newEvent);
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MobileTrader/src/models/Alert.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MobileTrader/src/models/Alert.as
index 7b9dc8b,7b9dc8b..f6ff495
--- a/examples/flexjs/MobileTrader/src/models/Alert.as
+++ b/examples/flexjs/MobileTrader/src/models/Alert.as
@@@ -91,4 -91,4 +91,4 @@@ package model
  		}
  		
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MobileTrader/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MobileTrader/src/models/ProductsModel.as
index f4b2008,f4b2008..cf0fece
--- a/examples/flexjs/MobileTrader/src/models/ProductsModel.as
+++ b/examples/flexjs/MobileTrader/src/models/ProductsModel.as
@@@ -162,4 -162,4 +162,4 @@@ package model
  			}
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MobileTrader/src/renderers/AlertRenderer.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MobileTrader/src/renderers/AlertRenderer.as
index e683020,e683020..3faa416
--- a/examples/flexjs/MobileTrader/src/renderers/AlertRenderer.as
+++ b/examples/flexjs/MobileTrader/src/renderers/AlertRenderer.as
@@@ -41,4 -41,4 +41,4 @@@ package renderer
  			}
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/MobileTrader/src/renderers/StockRenderer.as
----------------------------------------------------------------------
diff --cc examples/flexjs/MobileTrader/src/renderers/StockRenderer.as
index afba26f,afba26f..6731af4
--- a/examples/flexjs/MobileTrader/src/renderers/StockRenderer.as
+++ b/examples/flexjs/MobileTrader/src/renderers/StockRenderer.as
@@@ -44,4 -44,4 +44,4 @@@ package renderer
  			}
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/StorageExample/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/StorageExample/src/models/MyModel.as
index e0dab68,e0dab68..c3b4c53
--- a/examples/flexjs/StorageExample/src/models/MyModel.as
+++ b/examples/flexjs/StorageExample/src/models/MyModel.as
@@@ -55,4 -55,4 +55,4 @@@ package model
  			return _coordinates;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/TodoListSampleApp/src/sample/todo/controllers/TodoListController.as
----------------------------------------------------------------------
diff --cc examples/flexjs/TodoListSampleApp/src/sample/todo/controllers/TodoListController.as
index cbc4b1e,cbc4b1e..e7747ac
--- a/examples/flexjs/TodoListSampleApp/src/sample/todo/controllers/TodoListController.as
+++ b/examples/flexjs/TodoListSampleApp/src/sample/todo/controllers/TodoListController.as
@@@ -59,4 -59,4 +59,4 @@@ package sample.todo.controllers 
  			//todoModel.todos.push({title: evt.todo, selected: false});
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/TodoListSampleApp/src/sample/todo/models/TodoListModel.as
----------------------------------------------------------------------
diff --cc examples/flexjs/TodoListSampleApp/src/sample/todo/models/TodoListModel.as
index e4d06b1,e4d06b1..1cfca95
--- a/examples/flexjs/TodoListSampleApp/src/sample/todo/models/TodoListModel.as
+++ b/examples/flexjs/TodoListSampleApp/src/sample/todo/models/TodoListModel.as
@@@ -39,4 -39,4 +39,4 @@@ package sample.todo.models 
              _todos = value;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/flexjs/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/native/AngularExample/src/AngularExample.as
----------------------------------------------------------------------
diff --cc examples/native/AngularExample/src/AngularExample.as
index 6bc74c9,6bc74c9..73a9069
--- a/examples/native/AngularExample/src/AngularExample.as
+++ b/examples/native/AngularExample/src/AngularExample.as
@@@ -81,4 -81,4 +81,4 @@@ package 
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/native/AngularExample/src/MyController.as
----------------------------------------------------------------------
diff --cc examples/native/AngularExample/src/MyController.as
index 295df23,295df23..14978ef
--- a/examples/native/AngularExample/src/MyController.as
+++ b/examples/native/AngularExample/src/MyController.as
@@@ -67,4 -67,4 +67,4 @@@ package 
  			$mdDialog.cancel();
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/native/ButtonExample/src/ButtonExample.as
----------------------------------------------------------------------
diff --cc examples/native/ButtonExample/src/ButtonExample.as
index a3772e9,a3772e9..c817ecf
--- a/examples/native/ButtonExample/src/ButtonExample.as
+++ b/examples/native/ButtonExample/src/ButtonExample.as
@@@ -31,4 -31,4 +31,4 @@@ public class ButtonExampl
          document.body.appendChild(button);
  	}
  }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/native/USStatesMap/src/MapCoords.as
----------------------------------------------------------------------
diff --cc examples/native/USStatesMap/src/MapCoords.as
index 4cf953d,4cf953d..fa39c7b
--- a/examples/native/USStatesMap/src/MapCoords.as
+++ b/examples/native/USStatesMap/src/MapCoords.as
@@@ -72,4 -72,4 +72,4 @@@ packag
  			wa:"M253.652,30.221l-0.216-0.072l-0.72-0.144l-0.432-0.72l-1.584,0.36l-0.576-0.792l-0.72,0.072l0.936-3.816l0.144,0.792l-0.288,1.44l0.72-0.072l0.432,0.648l0.072-0.288l-0.504-0.72l0.576-0.792l-0.216-0.72l0.504-0.72l0.792,0.432h0.216l-0.288-0.72l-1.512-0.504l-0.144,0.072l-0.216-0.792l0.288-1.512l0.144,0.792l1.152-0.576l1.224-0.144l-0.72-0.288l-0.72-0.792l-0.72-0.504l-0.216,0.72l-0.288-0.216l0.288-0.792l0.216-2.232l-0.288-1.872l0.36-3.024l-0.072-0.792l-0.36-1.512l-0.576-0.864l-0.144-0.72V8.045l0.216-0.72l-0.072-0.72l0.504-0.792l0.216-0.792l0.216-0.144l-0.216-1.008l0.792,0.432l1.368,1.368l0.792,0.648l0.792,0.432l0.504,0.72l1.08,0.648l1.44,0.432l0.792,0.504l1.512,0.36l0.864,0.576l0.792-0.072l0.72-0.216l0.216,0.72l0.072,0.792l0.792-0.288l0.504,1.152l0.072-0.792l0.792-0.576l-0.216,0.792l0.432,1.872l-0.288,0.936l-0.792,0.72l-0.36,0.72v-0.72l0.216-0.72l-1.368,1.656l-0.72,0.432l-1.44,1.296l-0.504,0.72l0.648,0.648l1.512-0.288l-0.792-0.072l-0.72,0.144l-0.144-0.792l1.512-1.44l1.512-0.432l0.648
 -0.792l1.728-1.584l0.36,0.72l-0.072,0.792l-0.576,0.432l-0.792-0.144l0.144,0.792l-0.072,0.72l-0.72-0.216v0.792l0.72-0.144l0.36,0.72l-1.224,2.736l-0.792-0.504l0.648-0.792l-0.72,0.144l-0.504,0.72l-0.144,0.792l-0.288,0.288l-0.072-0.72l0.36-0.72l0.144-0.792l-1.512,1.08l-0.576,0.72l-0.72,0.072l0.72,0.216l-0.072,0.648l0.432,0.576l0.144-0.792l0.792-0.36l0.432,0.792l0.72-0.072l0.72-0.576l0.432-0.504l1.44-0.576l0.72-0.72l-0.144-1.584l0.648-0.72l-0.504-0.792l0.72-0.504l-0.072-0.72l0.864-1.008l0.792-0.72l-0.072-0.792l-0.432-0.72l0.144-1.512l-0.072-0.288l0.216-0.648l-0.648-0.936l-0.216-0.72l-0.72,0.072V7.541l0.504,0.144l0.792,0.432l0.216-0.792l-0.36-0.72l0.72,0.36l0.144-0.72l-0.072-0.72l0.144-0.72l-0.72-0.36l-0.576-0.792V3.365l-0.36-0.72l-0.072-0.72l0.576-0.504l10.44,2.808l11.808,2.952l13.68,3.168l7.344,1.512l-0.072,0.432l-5.616,26.208l-0.288,2.376l-0.36,0.72l0.504,1.512l-0.36,2.304l0.216,0.72l-9.432-1.944l-7.344-1.728l-0.792,0.432l-0.792-0.072l-0.792-0.288l-1.728-0.072l-0.576-0.216l-0.72,0.432l
 -2.376-0.072l-1.512,0.144l-1.44,0.36l-0.792,0.072l-0.72-0.144l-0.72-0.648l-0.792-0.216l-2.304,0.504l-0.72-0.288l-1.512,0.072l-0.144-0.72l-0.792-0.576l-0.72-0.144l-0.792-0.432l-1.296-0.072l-0.72-0.288h-0.72l-0.792,0.432l-0.72,0.144l-1.512,0.144l-0.72-0.072l-0.792-0.504l-0.36-0.072l-0.792-0.504l-1.152-0.504l-0.288-0.432l0.432-3.816l-0.36-1.512l-0.792-0.72l-0.432-0.72l-0.576-0.216l-0.72,0.072l-0.72-0.72l-0.216-0.72l-0.216-0.072L253.652,30.221z",
  			ca:"M233.492,83.789l0.216-1.44l0.144-0.144l-0.144-1.512l0.072-0.72l-0.504-0.864l0.432-0.72l0.504-1.584l0.359,0.072l18.72,5.184l15.84,4.032l-6.408,26.424l-1.944,7.776l27.216,39.672l11.52,16.992l-0.144,0.72v0.792l0.864,1.584l0.288,1.008l0.072,0.721l0.288,0.792l-0.072,0.863l1.44,1.513l0.504,0.72l-0.648,0.72l-2.52,1.368l-0.36,0.72l-0.72,0.432l-0.36,1.368l-0.072,1.44l-0.432,0.72l-0.288,1.008l-1.296,1.584l-0.792,0.504l-0.36,0.721l0.288,0.863l-0.072,0.721l-0.36,0.791l0.144,0.721l0.792,0.288l0.72,0.432l0.144,0.721l-0.072,1.224l-0.792,0.504l-0.216,0.72l-0.72-0.145l-0.288-0.215l-0.36,0.071l-0.36,0.072l-23.112-2.376l-0.36-0.072l-0.216-1.08l-0.288-0.791l0.36,0.791l0.288-0.72l-0.792-0.504l-0.216,0.576v-0.792l0.36-1.44l0.144-1.512l-0.144-1.513l-0.504-1.728l-0.72-1.512l-2.448-3.168l-0.792-0.648l-0.576-0.72l-0.72-1.225l-0.792-0.431l-0.72-0.145l-0.36,0.575l-0.792-0.504l-0.072-0.719l0.216-0.721l-0.072-0.72l-0.576-1.513l-0.145-0.144l-2.952-0.504l-1.512-0.937l-1.656-1.367l-0.216-1.512l-0.72-0.648l-
 0.576-0.721l-1.224-0.936l-1.512-0.145l-0.72-0.288l-1.44-1.007l-0.792-0.145l-0.72-0.288l-2.232-0.36l-0.648-0.72l-0.504-0.792l-0.504-0.144l0.072-0.792l0.504-0.793l-0.144-0.791l0.432-0.72v-1.513l0.647-1.08l0.072-0.72l-0.576-0.792l-0.792-0.288l-0.576-0.72l0.144-0.792l0.576-0.504l-0.144-0.792l-1.368-1.44l-0.433-1.512l-0.936-0.792l-0.288-0.721l-0.072-0.791l-0.792-1.44l-0.144-1.584l-0.647-0.576l-0.36-1.512l-1.224-1.513l-0.36-0.791l0.216-1.512v-1.584l1.512-0.721l0.288-0.72l0.36,0.144v-1.584l-0.432-1.512l-1.44-0.144l-0.792-0.648l-1.224-2.231l-0.288-0.721v-0.72l0.288-0.505l0.216-0.72l-0.072-1.512l-0.432-0.72l0.577-1.512l0.072-0.721l0.36-0.648h0.792l0.144,0.289l0.072,0.791l-0.432,0.721l-0.072,0.72l0.72,0.504l0.432,0.792l0.72,0.864l0.72,0.144l-0.576-0.792v-1.439l-0.216-1.439l-0.432-0.288l-0.288-0.792l0.216-0.721l-0.504-0.72l0.432-0.792h0.72l0.647-0.288l0.72,0.576l1.152-0.072l2.231,1.08l1.512-0.576l1.152,1.584v-0.216l-0.504-0.721l-0.648-0.647l-0.072-0.072l-0.792,0.36h-0.72l0.72-0.504l0.216-0.504
 l-0.72,0.575l-1.44-0.071l-0.647-0.721l-0.72-0.071l-0.648,0.359l-0.72-0.432l-0.576-0.792l-0.72-0.647l-0.792,0.287l-0.36,0.792l0.145,0.792l-0.576,0.504l0.36,0.792l-0.648,0.433l-0.72-0.72l-0.432-0.792l-0.792-0.505l-0.216-0.72l-0.792-0.863l-0.792,0.504l0.288-0.792l0.504-0.792l0.144-0.792l0.504,1.512l-0.216-1.512l-0.648-1.512l-0.072-0.072l-0.145,0.288l0.072-0.72l-0.144-0.792l-0.36-0.721l-0.648-0.72l-0.504-0.792l-0.792-2.232l-0.864-1.512l-0.648-1.512l0.648-0.72l0.144-1.152l-0.144-3.024l0.648-1.44l0.504-0.72v-0.936l0.144-0.72l-0.144-0.792l0.072-0.72l-0.72-2.304l-0.504-0.72v-0.72l-1.584-2.232l0.216-0.792v-1.224l0.648-1.512l0.72-0.792l0.432-0.72l0.792-0.36l0.72-0.504l-0.216-0.216l0.36-0.792l0.504-0.72l0.288-0.792l-0.145-0.72L233.492,83.789z"}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/examples/native/USStatesMap/src/USStatesMap.as
----------------------------------------------------------------------
diff --cc examples/native/USStatesMap/src/USStatesMap.as
index 9f5f8bf,9f5f8bf..4e672c4
--- a/examples/native/USStatesMap/src/USStatesMap.as
+++ b/examples/native/USStatesMap/src/USStatesMap.as
@@@ -137,4 -137,4 +137,4 @@@ packag
  		}
  		
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/build.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --cc frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
index 3555c44,0000000..a1e507a
mode 100644,000000..100644
--- a/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/MXJS/src/main/config/compile-js-config.xml
@@@ -1,106 -1,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.
 +
 +-->
 +<flex-config>
 +
 +    <compiler>
 +        <accessible>false</accessible>
 +        
 +        <external-library-path>
 +        </external-library-path>
 +        
 +		<mxml>
 +			<children-as-data>true</children-as-data>
 +		</mxml>
 +		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
 +		<binding-value-change-event-kind>org.apache.flex.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>
 +        
 +        <!-- Conditional compilation for the framework performance instrumentation code. -->
 +        <define>
 +            <name>CONFIG::performanceInstrumentation</name>
 +            <value>false</value>
 +        </define>
 +        <define>
-             <name>COMPILE::AS3</name>
++            <name>COMPILE::SWF</name>
 +            <value>false</value>
 +        </define>
 +        <define>
 +            <name>COMPILE::JS</name>
 +            <value>true</value>
 +        </define>
 +        <define>
 +            <name>COMPILE::LATER</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>
 +            <!-- 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/BindingJS.swc</path-element>
 +            <path-element>../../../../../libs/CoreJS.swc</path-element>
 +            <path-element>../../../../../libs/GraphicsJS.swc</path-element>
 +            <path-element>../../../../../libs/CollectionsJS.swc</path-element>
 +            <path-element>../../../../../libs/ReflectionJS.swc</path-element>
 +            <path-element>../../../../../libs/HTMLJS.swc</path-element>
 +        </library-path>
 +        
 +        <namespaces>
 +            <namespace>
 +                <uri>library://ns.apache.org/flexjs/mx</uri>
 +                <manifest>../../../../../../../projects/MX/src/main/resources/mx-manifest.xml</manifest>
 +            </namespace>
 +        </namespaces>
 +        
 +        <source-path>
 +            <path-element>../../../../../../../projects/MX/src/main/flex</path-element>
 +        </source-path>
 +        
 +        <warn-no-constructor>false</warn-no-constructor>
 +    </compiler>
 +    
 +    <include-file>
 +    </include-file>
 +
 +    <include-sources>
 +    </include-sources>
 +    
 +    <include-classes>
 +        <class>MXClasses</class>
 +    </include-classes>
 +    
 +    <include-namespaces>
 +        <uri>library://ns.apache.org/flexjs/mx</uri>
 +    </include-namespaces>
 +        
 +    <target-player>${playerglobal.version}</target-player>
 +	
 +
 +</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Binding/pom.xml
----------------------------------------------------------------------
diff --cc frameworks/projects/Binding/pom.xml
index d68bb46,0af73b1..679e2bb
--- a/frameworks/projects/Binding/pom.xml
+++ b/frameworks/projects/Binding/pom.xml
@@@ -83,6 -89,6 +89,14 @@@
              <classifier>extern</classifier>
              <scope>external</scope>
          </dependency>
++        <dependency>
++            <groupId>org.apache.flex.flexjs.framework</groupId>
++            <artifactId>Core</artifactId>
++            <version>0.7.0-SNAPSHOT</version>
++            <type>swc</type>
++            <classifier>extern</classifier>
++            <scope>external</scope>
++        </dependency>
      </dependencies>
  
  </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/ChartView.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IAxisGroup.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
index 430f7af,ec33c20..7f7ace7
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
@@@ -67,5 -67,50 +67,5 @@@ package org.apache.flex.charts.cor
  		function get yField():String;
  		function set yField(value:String):void;
  		
 -		/**
 -		 *  The x display position for the itemRenderer. This is set by
 -		 *  the chart's layout manager.
 -		 *
 -		 *  @langversion 3.0
 -		 *  @playerversion Flash 10.2
 -		 *  @playerversion AIR 2.6
 -		 *  @productversion FlexJS 0.0
 -		 */
 -		function set x(value:Number):void;
 -		function get x():Number;
 -		
 -		/**
 -		 *  The y display position for the itemRenderer. This is set by
 -		 *  the chart's layout manager.
 -		 *
 -		 *  @langversion 3.0
 -		 *  @playerversion Flash 10.2
 -		 *  @playerversion AIR 2.6
 -		 *  @productversion FlexJS 0.0
 -		 */
 -		function set y(value:Number):void;
 -		function get y():Number;
 -		
 -		/**
 -		 *  The display width for the itemRenderer. This is set by
 -		 *  the chart's layout manager.
 -		 *
 -		 *  @langversion 3.0
 -		 *  @playerversion Flash 10.2
 -		 *  @playerversion AIR 2.6
 -		 *  @productversion FlexJS 0.0
 -		 */
 -		function set width(value:Number):void;
 -		
 -		/**
 -		 *  The display height for the itemRenderer. This is set by
 -		 *  the chart's layout manager.
 -		 *
 -		 *  @langversion 3.0
 -		 *  @playerversion Flash 10.2
 -		 *  @playerversion AIR 2.6
 -		 *  @productversion FlexJS 0.0
 -		 */
 -		function set height(value:Number):void;
  	}
- }
+ }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/.actionScriptProperties
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/.actionScriptProperties
index fb4518b,b29cfae..9aec1c4
--- a/frameworks/projects/Core/.actionScriptProperties
+++ b/frameworks/projects/Core/.actionScriptProperties
@@@ -1,6 -1,24 +1,6 @@@
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<!--
 -
 -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.
 -
 --->
  <actionScriptProperties analytics="false" mainApplicationPath="Core.as" projectUUID="be5b3edf-e159-406d-a592-1f8d39993fea" version="11">
-   <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+   <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
      <compilerSourcePath/>
      <libraryPath defaultLinkType="0">
        <libraryPathEntry kind="4" path="">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/pom.xml
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/pom.xml
index 70d7d57,dd4372f..f87c344
--- a/frameworks/projects/Core/pom.xml
+++ b/frameworks/projects/Core/pom.xml
@@@ -85,7 -91,8 +91,15 @@@
              <version>0.7.0-SNAPSHOT</version>
              <type>swc</type>
              <classifier>extern</classifier>
+             <scope>external</scope>
+         </dependency>
++        <dependency>
++            <groupId>org.apache.flex.flexjs.externs</groupId>
++            <artifactId>flexjs-externs-gcl</artifactId>
++            <version>0.7.0-SNAPSHOT</version>
++            <type>swc</type>
++            <classifier>extern</classifier>
 +        </dependency>
      </dependencies>
  
  </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
index 49b85eb,ff6e5a6..fcc91b6
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
@@@ -414,11 -414,10 +414,11 @@@ package org.apache.flex.cor
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -        public function addElement(c:Object, dispatchEvent:Boolean = true):void
 +        public function addElement(c:IVisualElement):IVisualElement
          {
-             COMPILE::AS3 {
+             COMPILE::SWF {
                  if (c is IUIBase)
                  {
                      addChild(IUIBase(c).element as DisplayObject);
@@@ -442,11 -439,10 +442,11 @@@
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -        public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
 +        public function addElementAt(c:IVisualElement, index:int):IVisualElement
          {
-             COMPILE::AS3 {
+             COMPILE::SWF {
                  if (c is IUIBase)
                  {
                      addChildAt(IUIBase(c).element as DisplayObject, index);
@@@ -479,10 -473,10 +479,10 @@@
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
           */
 -        public function getElementAt(index:int):Object
 +        public function getElementAt(index:int):IVisualElement
          {
-             COMPILE::AS3 {
+             COMPILE::SWF {
 -                return getChildAt(index);
 +                return getChildAt(index) as IVisualElement;
              }
              COMPILE::JS {
                  var children:NodeList = internalChildren();
@@@ -497,11 -491,10 +497,11 @@@
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -        public function getElementIndex(c:Object):int
 +        public function getElementIndex(c:IVisualElement):int
          {
-             COMPILE::AS3 {
+             COMPILE::SWF {
                  if (c is IUIBase)
                      return getChildIndex(IUIBase(c).element as DisplayObject);
  
@@@ -527,11 -519,10 +527,11 @@@
           *  @playerversion Flash 10.2
           *  @playerversion AIR 2.6
           *  @productversion FlexJS 0.0
 +		 *  @flexjsignorecoercion org.apache.flex.core.IUIBase
           */
 -        public function removeElement(c:Object, dispatchEvent:Boolean = true):void
 +        public function removeElement(c:IVisualElement):IVisualElement
          {
-             COMPILE::AS3 {
+             COMPILE::SWF {
                  if (c is IUIBase)
                  {
                      removeChild(IUIBase(c).element as DisplayObject);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
index 368a4f8,962a11d..1068363
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
@@@ -48,10 -48,10 +48,10 @@@ package org.apache.flex.cor
  		{
  			super();
  			
-             COMPILE::AS3
+             COMPILE::SWF
              {
                  _shape = new flash.display.Shape();
 -                this.addElement(_shape);
 +                this.addChild(_shape);
              }
  		}
  		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
----------------------------------------------------------------------


[03/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - add named configs for jquery, node, and createjs, and use named configs in more places

Posted by ah...@apache.org.
add named configs for jquery, node, and createjs, and use named configs in more places


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

Branch: refs/heads/spark
Commit: a47cadf3bdf8a6e741b3386da356172eef14ec82
Parents: c914e2b
Author: Alex Harui <ah...@apache.org>
Authored: Wed Jun 8 09:20:37 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Jun 8 09:20:37 2016 -0700

----------------------------------------------------------------------
 build.xml                                       |  12 +
 frameworks/build.xml                            |  30 ++
 frameworks/createjs-config-template.xml         | 340 +++++++++++++++++++
 frameworks/createjs-config.xml                  | 340 +++++++++++++++++++
 frameworks/jquery-config-template.xml           | 340 +++++++++++++++++++
 frameworks/jquery-config.xml                    | 340 +++++++++++++++++++
 .../js/FlexJS/projects/CreateJSJS/build.xml     |   4 +-
 .../src/main/config/compile-js-config.xml       |   4 -
 .../js/FlexJS/projects/JQueryJS/build.xml       |   4 +-
 .../src/main/config/compile-js-config.xml       |   4 -
 frameworks/node-config-template.xml             | 340 +++++++++++++++++++
 frameworks/node-config.xml                      | 340 +++++++++++++++++++
 js/bin/asnodec                                  |   2 +-
 js/bin/asnodec.bat                              |   2 +-
 js/bin/jquery                                   |   2 +-
 js/bin/jquery.bat                               |   2 +-
 16 files changed, 2090 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 7f92eb3..a416414 100644
--- a/build.xml
+++ b/build.xml
@@ -358,6 +358,9 @@
         <ant dir="${basedir}/frameworks" target="flex-config" />
         <ant dir="${basedir}/frameworks" target="air-config" />
         <ant dir="${basedir}/frameworks" target="js-config" />
+        <ant dir="${basedir}/frameworks" target="jquery-config" />
+        <ant dir="${basedir}/frameworks" target="createjs-config" />
+        <ant dir="${basedir}/frameworks" target="node-config" />
     </target>
 	
     <target name="copy-externs" description="Copy extern swcs into this folder">
@@ -684,6 +687,9 @@
                 <include name="air-config-template.xml"/>
                 <include name="flex-config-template.xml"/>
                 <include name="js-config-template.xml"/>
+                <include name="jquery-config-template.xml"/>
+                <include name="createjs-config-template.xml"/>
+                <include name="node-config-template.xml"/>
             </fileset>
         </copy>
 
@@ -699,6 +705,12 @@
         <fix-config-file file="${basedir}/temp/frameworks/flex-config-template.xml" version="${build.version}" />
         <echo message="Updating config file js-config.xml with version ${build.version}"/>
         <fix-config-file file="${basedir}/temp/frameworks/js-config-template.xml" version="${build.version}" />
+        <echo message="Updating config file jquery-config.xml with version ${build.version}"/>
+        <fix-config-file file="${basedir}/temp/frameworks/jquery-config-template.xml" version="${build.version}" />
+        <echo message="Updating config file createjs-config.xml with version ${build.version}"/>
+        <fix-config-file file="${basedir}/temp/frameworks/createjs-config-template.xml" version="${build.version}" />
+        <echo message="Updating config file node-config.xml with version ${build.version}"/>
+        <fix-config-file file="${basedir}/temp/frameworks/node-config-template.xml" version="${build.version}" />
         
         <!-- Update all Version.as files in the kit frameworks directory with build.number -->
         <!--<antcall target="version-update"/>-->

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/build.xml b/frameworks/build.xml
index 839c896..acfb01e 100644
--- a/frameworks/build.xml
+++ b/frameworks/build.xml
@@ -268,6 +268,36 @@
         </copy>
     </target>
 
+    <target name="jquery-config" depends="playerglobal-setswfversion" description="Copy the jquery config template to jquery-config.xml and inject version numbers">
+        <copy file="${basedir}/jquery-config-template.xml" tofile="${basedir}/jquery-config.xml" overwrite="true">
+            <filterset>
+                <filter token="playerversion" value="${playerglobal.version}"/>
+                <filter token="swfversion" value="${playerglobal.swfversion}"/>
+                <filter token="locale" value="${locale}"/>
+            </filterset>
+        </copy>
+    </target>
+
+    <target name="createjs-config" depends="playerglobal-setswfversion" description="Copy the createjs config template to createjs-config.xml and inject version numbers">
+        <copy file="${basedir}/createjs-config-template.xml" tofile="${basedir}/createjs-config.xml" overwrite="true">
+            <filterset>
+                <filter token="playerversion" value="${playerglobal.version}"/>
+                <filter token="swfversion" value="${playerglobal.swfversion}"/>
+                <filter token="locale" value="${locale}"/>
+            </filterset>
+        </copy>
+    </target>
+
+    <target name="node-config" depends="playerglobal-setswfversion" description="Copy the node config template to node-config.xml and inject version numbers">
+        <copy file="${basedir}/node-config-template.xml" tofile="${basedir}/node-config.xml" overwrite="true">
+            <filterset>
+                <filter token="playerversion" value="${playerglobal.version}"/>
+                <filter token="swfversion" value="${playerglobal.swfversion}"/>
+                <filter token="locale" value="${locale}"/>
+            </filterset>
+        </copy>
+    </target>
+
 	<target name="playerglobal-setswfversion" description="Set the swfversion to insert into the flex config file">
 		<condition property="playerglobal.swfversion" value="11">
 			<equals arg1="${playerglobal.version}" arg2="10.2" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/createjs-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/createjs-config-template.xml b/frameworks/createjs-config-template.xml
new file mode 100644
index 0000000..d9c4341
--- /dev/null
+++ b/frameworks/createjs-config-template.xml
@@ -0,0 +1,340 @@
+<?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.
+
+-->
+
+
+<flex-config>
+    <!-- Specifies the minimum player version that will run the compiled SWF. -->
+   <target-player>@playerversion@</target-player>
+
+    <!-- Specifies the version of the compiled SWF -->
+   <swf-version>@swfversion@</swf-version>
+
+   <compiler>
+
+      <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+      <!-- not set -->
+      <!--
+      <source-path>
+         <path-element>string</path-element>
+      </source-path>
+      -->
+
+     <!-- Allow the source-path to have path-elements which contain other path-elements -->
+     <allow-source-path-overlap>false</allow-source-path-overlap>
+
+      <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+      <!-- code.                                                                       -->
+      <show-actionscript-warnings>true</show-actionscript-warnings>
+
+      <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+      <!-- but true by default for compc. -->
+      <!--
+      <debug>true</debug>
+      -->
+
+      <!-- List of SWC files or directories to compile against but to omit from -->
+      <!-- linking.                                                             -->
+      <external-library-path>
+          <path-element>../js/libs/js.swc</path-element>
+          <path-element>../js/libs/createjs.swc</path-element>
+      </external-library-path>
+
+      <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
+      <!-- the compiler during mxml translation and are helpful with understanding and   -->
+      <!-- debugging Flex applications.                                                  -->
+      <keep-generated-actionscript>false</keep-generated-actionscript>
+
+      <!-- not set -->
+      <!--
+      <include-libraries>
+         <library>string</library>
+      </include-libraries>
+      -->
+
+      <!-- List of SWC files or directories that contain SWC files. -->
+      <library-path>
+         <path-element>../js/libs/GCL.swc</path-element>
+      </library-path>
+
+      <mxml>
+          <children-as-data>true</children-as-data>
+          <imports>
+            <implicit-import>org.apache.flex.events.*</implicit-import>
+            <implicit-import>org.apache.flex.geom.*</implicit-import>
+            <implicit-import>org.apache.flex.core.ClassFactory</implicit-import>
+            <implicit-import>org.apache.flex.core.IFactory</implicit-import>
+        </imports>
+      </mxml>
+      <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+      <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+      <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+      <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+      <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
+      <states-class>org.apache.flex.states.State</states-class>
+      <states-instance-override-class>org.apache.flex.states.AddItems</states-instance-override-class>
+      <states-property-override-class>org.apache.flex.states.SetProperty</states-property-override-class>
+      <states-event-override-class>org.apache.flex.states.SetEventHandler</states-event-override-class>
+      <component-factory-class>org.apache.flex.core.ClassFactory</component-factory-class>
+      <component-factory-interface>org.apache.flex.core.IFactory</component-factory-interface>
+        
+      <namespaces>
+      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
+      <!-- elements.                                                                -->
+      </namespaces>
+
+      <!-- Enable post-link SWF optimization. -->
+      <optimize>true</optimize>
+
+      <!-- Enable trace statement omission. -->
+      <omit-trace-statements>true</omit-trace-statements>
+
+      <!-- Keep the following AS3 metadata in the bytecodes.                                             -->
+      <!-- Warning: For the data binding feature in the Flex framework to work properly,                 -->
+      <!--          the following metadata must be kept:                                                 -->
+      <!--          1. Bindable                                                                          -->
+      <!--          2. Managed                                                                           -->
+      <!--          3. ChangeEvent                                                                       -->
+      <!--          4. NonCommittingChangeEvent                                                          -->
+      <!--          5. Transient                                                                         -->
+      <!--
+      <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+      </keep-as3-metadata>
+      -->
+
+      <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
+      <!-- will not be able to detect assignments to "foo".                               -->
+      <show-binding-warnings>true</show-binding-warnings>
+
+      <!-- toggle whether warnings generated from unused type selectors are displayed -->
+      <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
+
+      <!-- Run the AS3 compiler in strict error checking mode. -->
+      <strict>true</strict>
+
+      <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
+      <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
+      <!-- (-strict is recommended, but not required, for earlier errors) -->
+      <as3>true</as3>
+
+      <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
+      <!-- properties. In the prototype based object model built-in functions are implemented as dynamic      -->
+      <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for         -->
+      <!-- references to dynamic properties) -->
+      <es>false</es>
+
+      <!-- List of CSS or SWC files to apply as a theme. -->
+      <theme>
+      </theme>
+
+      <!-- Turns on the display of stack traces for uncaught runtime errors. -->
+      <verbose-stacktraces>false</verbose-stacktraces>
+
+      <!-- Defines the AS3 file encoding. -->
+      <!-- not set -->
+      <!--
+      <actionscript-file-encoding></actionscript-file-encoding>
+      -->
+
+      <fonts>
+
+          <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
+          <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
+          <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
+          <advanced-anti-aliasing>true</advanced-anti-aliasing>
+
+          <!-- The number of embedded font faces that are cached. -->
+          <max-cached-fonts>20</max-cached-fonts>
+
+          <!-- The number of character glyph outlines to cache for each font face. -->
+          <max-glyphs-per-face>1000</max-glyphs-per-face>
+
+          <!-- Defines ranges that can be used across multiple font-face declarations. -->
+          <!-- See flash-unicode-table.xml for more examples. -->
+          <!-- not set -->
+          <!--
+          <languages>
+              <language-range>
+                  <lang>englishRange</lang>
+                  <range>U+0020-007E</range>
+              </language-range>
+          </languages>
+          -->
+
+          <!-- Compiler font manager classes, in policy resolution order -->
+          <!-- NOTE: For Apache Flex -->
+          <!-- AFEFontManager and CFFFontManager both use proprietary technology.  -->
+          <!-- You must install the optional font jars if you wish to use embedded fonts  -->
+          <!-- directly or you can use fontswf to precompile the font as a swf.  -->
+          <managers>
+              <manager-class>flash.fonts.JREFontManager</manager-class>
+              <manager-class>flash.fonts.BatikFontManager</manager-class>
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+              <manager-class>flash.fonts.CFFFontManager</manager-class>
+          </managers>
+
+          <!-- File containing cached system font licensing information produced via
+               java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
+               Will default to winFonts.ser on Windows XP and
+               macFonts.ser on Mac OS X, so is commented out by default.
+
+          <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
+          -->
+
+      </fonts>
+      
+      <!-- Array.toString() format has changed. -->
+      <warn-array-tostring-changes>false</warn-array-tostring-changes>
+
+      <!-- Assignment within conditional. -->
+      <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+      <!-- Possibly invalid Array cast operation. -->
+      <warn-bad-array-cast>true</warn-bad-array-cast>
+
+      <!-- Non-Boolean value used where a Boolean value was expected. -->
+      <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
+
+      <!-- Invalid Date cast operation. -->
+      <warn-bad-date-cast>true</warn-bad-date-cast>
+
+      <!-- Unknown method. -->
+      <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
+
+      <!-- Unknown property. -->
+      <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
+
+      <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+      <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+      <!-- Impossible assignment to null. -->
+      <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+      <!-- Illogical comparison with null. -->
+      <warn-bad-null-comparison>true</warn-bad-null-comparison>
+
+      <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+      <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+      <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
+      <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
+
+      <!-- __resolve is no longer supported. -->
+      <warn-changes-in-resolve>false</warn-changes-in-resolve>
+
+      <!-- Class is sealed. It cannot have members added to it dynamically. -->
+      <warn-class-is-sealed>true</warn-class-is-sealed>
+
+      <!-- Constant not initialized. -->
+      <warn-const-not-initialized>true</warn-const-not-initialized>
+
+      <!-- Function used in new expression returns a value. Result will be what the -->
+      <!-- function returns, rather than a new instance of that function.           -->
+      <warn-constructor-returns-value>false</warn-constructor-returns-value>
+
+      <!-- EventHandler was not added as a listener. -->
+      <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
+
+      <!-- Unsupported ActionScript 2.0 function. -->
+      <warn-deprecated-function-error>true</warn-deprecated-function-error>
+
+      <!-- Unsupported ActionScript 2.0 property. -->
+      <warn-deprecated-property-error>true</warn-deprecated-property-error>
+
+      <!-- More than one argument by the same name. -->
+      <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
+
+      <!-- Duplicate variable definition -->
+      <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+      <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
+      <warn-for-var-in-changes>false</warn-for-var-in-changes>
+
+      <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
+      <warn-import-hides-class>true</warn-import-hides-class>
+
+      <!-- Use of the instanceof operator. -->
+      <warn-instance-of-changes>true</warn-instance-of-changes>
+
+      <!-- Internal error in compiler. -->
+      <warn-internal-error>true</warn-internal-error>
+
+      <!-- _level is no longer supported. For more information, see the flash.display package. -->
+      <warn-level-not-supported>true</warn-level-not-supported>
+
+      <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+      <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+      <!-- Negative value will become a large positive value when assigned to a uint data type. -->
+      <warn-negative-uint-literal>true</warn-negative-uint-literal>
+
+      <!-- Missing constructor. -->
+      <warn-no-constructor>false</warn-no-constructor>
+
+      <!-- The super() statement was not called within the constructor. -->
+      <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
+
+      <!-- Missing type declaration. -->
+      <warn-no-type-decl>true</warn-no-type-decl>
+
+      <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
+      <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space.      -->
+      <warn-number-from-string-changes>false</warn-number-from-string-changes>
+
+      <!-- Change in scoping for the this keyword. Class methods extracted from an  -->
+      <!-- instance of a class will always resolve this back to that instance. In   -->
+      <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
+      <!-- is invoked from.                                                         -->
+      <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
+
+      <!-- Inefficient use of += on a TextField.-->
+      <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
+
+      <!-- Possible missing parentheses. -->
+      <warn-unlikely-function-value>true</warn-unlikely-function-value>
+
+      <!-- Possible usage of the ActionScript 2.0 XML class. -->
+      <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
+
+   </compiler>
+
+
+   <!-- target-player: specifies the version of the player the application is targeting.
+                       Features requiring a later version will not be compiled into the application.
+                       The minimum value supported is "9.0.0".-->
+   <!-- target-player usage:
+   <target-player>version</target-player>
+   -->
+
+   <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+   <metadata>
+      <title>Apache FlexJS Application</title>
+      <description>http://flex.apache.org/</description>
+      <publisher>Apache Software Foundation</publisher>
+      <creator>unknown</creator>
+      <language>EN</language>
+   </metadata>
+   
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/createjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/createjs-config.xml b/frameworks/createjs-config.xml
new file mode 100644
index 0000000..e29efb1
--- /dev/null
+++ b/frameworks/createjs-config.xml
@@ -0,0 +1,340 @@
+<?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.
+
+-->
+
+
+<flex-config>
+    <!-- Specifies the minimum player version that will run the compiled SWF. -->
+   <target-player>11.1</target-player>
+
+    <!-- Specifies the version of the compiled SWF -->
+   <swf-version>14</swf-version>
+
+   <compiler>
+
+      <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+      <!-- not set -->
+      <!--
+      <source-path>
+         <path-element>string</path-element>
+      </source-path>
+      -->
+
+     <!-- Allow the source-path to have path-elements which contain other path-elements -->
+     <allow-source-path-overlap>false</allow-source-path-overlap>
+
+      <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+      <!-- code.                                                                       -->
+      <show-actionscript-warnings>true</show-actionscript-warnings>
+
+      <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+      <!-- but true by default for compc. -->
+      <!--
+      <debug>true</debug>
+      -->
+
+      <!-- List of SWC files or directories to compile against but to omit from -->
+      <!-- linking.                                                             -->
+      <external-library-path>
+          <path-element>../js/libs/js.swc</path-element>
+          <path-element>../js/libs/createjs.swc</path-element>
+      </external-library-path>
+
+      <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
+      <!-- the compiler during mxml translation and are helpful with understanding and   -->
+      <!-- debugging Flex applications.                                                  -->
+      <keep-generated-actionscript>false</keep-generated-actionscript>
+
+      <!-- not set -->
+      <!--
+      <include-libraries>
+         <library>string</library>
+      </include-libraries>
+      -->
+
+      <!-- List of SWC files or directories that contain SWC files. -->
+      <library-path>
+         <path-element>../js/libs/GCL.swc</path-element>
+      </library-path>
+
+      <mxml>
+          <children-as-data>true</children-as-data>
+          <imports>
+            <implicit-import>org.apache.flex.events.*</implicit-import>
+            <implicit-import>org.apache.flex.geom.*</implicit-import>
+            <implicit-import>org.apache.flex.core.ClassFactory</implicit-import>
+            <implicit-import>org.apache.flex.core.IFactory</implicit-import>
+        </imports>
+      </mxml>
+      <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+      <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+      <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+      <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+      <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
+      <states-class>org.apache.flex.states.State</states-class>
+      <states-instance-override-class>org.apache.flex.states.AddItems</states-instance-override-class>
+      <states-property-override-class>org.apache.flex.states.SetProperty</states-property-override-class>
+      <states-event-override-class>org.apache.flex.states.SetEventHandler</states-event-override-class>
+      <component-factory-class>org.apache.flex.core.ClassFactory</component-factory-class>
+      <component-factory-interface>org.apache.flex.core.IFactory</component-factory-interface>
+        
+      <namespaces>
+      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
+      <!-- elements.                                                                -->
+      </namespaces>
+
+      <!-- Enable post-link SWF optimization. -->
+      <optimize>true</optimize>
+
+      <!-- Enable trace statement omission. -->
+      <omit-trace-statements>true</omit-trace-statements>
+
+      <!-- Keep the following AS3 metadata in the bytecodes.                                             -->
+      <!-- Warning: For the data binding feature in the Flex framework to work properly,                 -->
+      <!--          the following metadata must be kept:                                                 -->
+      <!--          1. Bindable                                                                          -->
+      <!--          2. Managed                                                                           -->
+      <!--          3. ChangeEvent                                                                       -->
+      <!--          4. NonCommittingChangeEvent                                                          -->
+      <!--          5. Transient                                                                         -->
+      <!--
+      <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+      </keep-as3-metadata>
+      -->
+
+      <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
+      <!-- will not be able to detect assignments to "foo".                               -->
+      <show-binding-warnings>true</show-binding-warnings>
+
+      <!-- toggle whether warnings generated from unused type selectors are displayed -->
+      <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
+
+      <!-- Run the AS3 compiler in strict error checking mode. -->
+      <strict>true</strict>
+
+      <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
+      <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
+      <!-- (-strict is recommended, but not required, for earlier errors) -->
+      <as3>true</as3>
+
+      <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
+      <!-- properties. In the prototype based object model built-in functions are implemented as dynamic      -->
+      <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for         -->
+      <!-- references to dynamic properties) -->
+      <es>false</es>
+
+      <!-- List of CSS or SWC files to apply as a theme. -->
+      <theme>
+      </theme>
+
+      <!-- Turns on the display of stack traces for uncaught runtime errors. -->
+      <verbose-stacktraces>false</verbose-stacktraces>
+
+      <!-- Defines the AS3 file encoding. -->
+      <!-- not set -->
+      <!--
+      <actionscript-file-encoding></actionscript-file-encoding>
+      -->
+
+      <fonts>
+
+          <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
+          <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
+          <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
+          <advanced-anti-aliasing>true</advanced-anti-aliasing>
+
+          <!-- The number of embedded font faces that are cached. -->
+          <max-cached-fonts>20</max-cached-fonts>
+
+          <!-- The number of character glyph outlines to cache for each font face. -->
+          <max-glyphs-per-face>1000</max-glyphs-per-face>
+
+          <!-- Defines ranges that can be used across multiple font-face declarations. -->
+          <!-- See flash-unicode-table.xml for more examples. -->
+          <!-- not set -->
+          <!--
+          <languages>
+              <language-range>
+                  <lang>englishRange</lang>
+                  <range>U+0020-007E</range>
+              </language-range>
+          </languages>
+          -->
+
+          <!-- Compiler font manager classes, in policy resolution order -->
+          <!-- NOTE: For Apache Flex -->
+          <!-- AFEFontManager and CFFFontManager both use proprietary technology.  -->
+          <!-- You must install the optional font jars if you wish to use embedded fonts  -->
+          <!-- directly or you can use fontswf to precompile the font as a swf.  -->
+          <managers>
+              <manager-class>flash.fonts.JREFontManager</manager-class>
+              <manager-class>flash.fonts.BatikFontManager</manager-class>
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+              <manager-class>flash.fonts.CFFFontManager</manager-class>
+          </managers>
+
+          <!-- File containing cached system font licensing information produced via
+               java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
+               Will default to winFonts.ser on Windows XP and
+               macFonts.ser on Mac OS X, so is commented out by default.
+
+          <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
+          -->
+
+      </fonts>
+      
+      <!-- Array.toString() format has changed. -->
+      <warn-array-tostring-changes>false</warn-array-tostring-changes>
+
+      <!-- Assignment within conditional. -->
+      <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+      <!-- Possibly invalid Array cast operation. -->
+      <warn-bad-array-cast>true</warn-bad-array-cast>
+
+      <!-- Non-Boolean value used where a Boolean value was expected. -->
+      <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
+
+      <!-- Invalid Date cast operation. -->
+      <warn-bad-date-cast>true</warn-bad-date-cast>
+
+      <!-- Unknown method. -->
+      <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
+
+      <!-- Unknown property. -->
+      <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
+
+      <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+      <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+      <!-- Impossible assignment to null. -->
+      <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+      <!-- Illogical comparison with null. -->
+      <warn-bad-null-comparison>true</warn-bad-null-comparison>
+
+      <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+      <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+      <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
+      <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
+
+      <!-- __resolve is no longer supported. -->
+      <warn-changes-in-resolve>false</warn-changes-in-resolve>
+
+      <!-- Class is sealed. It cannot have members added to it dynamically. -->
+      <warn-class-is-sealed>true</warn-class-is-sealed>
+
+      <!-- Constant not initialized. -->
+      <warn-const-not-initialized>true</warn-const-not-initialized>
+
+      <!-- Function used in new expression returns a value. Result will be what the -->
+      <!-- function returns, rather than a new instance of that function.           -->
+      <warn-constructor-returns-value>false</warn-constructor-returns-value>
+
+      <!-- EventHandler was not added as a listener. -->
+      <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
+
+      <!-- Unsupported ActionScript 2.0 function. -->
+      <warn-deprecated-function-error>true</warn-deprecated-function-error>
+
+      <!-- Unsupported ActionScript 2.0 property. -->
+      <warn-deprecated-property-error>true</warn-deprecated-property-error>
+
+      <!-- More than one argument by the same name. -->
+      <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
+
+      <!-- Duplicate variable definition -->
+      <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+      <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
+      <warn-for-var-in-changes>false</warn-for-var-in-changes>
+
+      <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
+      <warn-import-hides-class>true</warn-import-hides-class>
+
+      <!-- Use of the instanceof operator. -->
+      <warn-instance-of-changes>true</warn-instance-of-changes>
+
+      <!-- Internal error in compiler. -->
+      <warn-internal-error>true</warn-internal-error>
+
+      <!-- _level is no longer supported. For more information, see the flash.display package. -->
+      <warn-level-not-supported>true</warn-level-not-supported>
+
+      <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+      <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+      <!-- Negative value will become a large positive value when assigned to a uint data type. -->
+      <warn-negative-uint-literal>true</warn-negative-uint-literal>
+
+      <!-- Missing constructor. -->
+      <warn-no-constructor>false</warn-no-constructor>
+
+      <!-- The super() statement was not called within the constructor. -->
+      <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
+
+      <!-- Missing type declaration. -->
+      <warn-no-type-decl>true</warn-no-type-decl>
+
+      <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
+      <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space.      -->
+      <warn-number-from-string-changes>false</warn-number-from-string-changes>
+
+      <!-- Change in scoping for the this keyword. Class methods extracted from an  -->
+      <!-- instance of a class will always resolve this back to that instance. In   -->
+      <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
+      <!-- is invoked from.                                                         -->
+      <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
+
+      <!-- Inefficient use of += on a TextField.-->
+      <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
+
+      <!-- Possible missing parentheses. -->
+      <warn-unlikely-function-value>true</warn-unlikely-function-value>
+
+      <!-- Possible usage of the ActionScript 2.0 XML class. -->
+      <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
+
+   </compiler>
+
+
+   <!-- target-player: specifies the version of the player the application is targeting.
+                       Features requiring a later version will not be compiled into the application.
+                       The minimum value supported is "9.0.0".-->
+   <!-- target-player usage:
+   <target-player>version</target-player>
+   -->
+
+   <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+   <metadata>
+      <title>Apache FlexJS Application</title>
+      <description>http://flex.apache.org/</description>
+      <publisher>Apache Software Foundation</publisher>
+      <creator>unknown</creator>
+      <language>EN</language>
+   </metadata>
+   
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/jquery-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/jquery-config-template.xml b/frameworks/jquery-config-template.xml
new file mode 100644
index 0000000..aee0f53
--- /dev/null
+++ b/frameworks/jquery-config-template.xml
@@ -0,0 +1,340 @@
+<?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.
+
+-->
+
+
+<flex-config>
+    <!-- Specifies the minimum player version that will run the compiled SWF. -->
+   <target-player>@playerversion@</target-player>
+
+    <!-- Specifies the version of the compiled SWF -->
+   <swf-version>@swfversion@</swf-version>
+
+   <compiler>
+
+      <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+      <!-- not set -->
+      <!--
+      <source-path>
+         <path-element>string</path-element>
+      </source-path>
+      -->
+
+     <!-- Allow the source-path to have path-elements which contain other path-elements -->
+     <allow-source-path-overlap>false</allow-source-path-overlap>
+
+      <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+      <!-- code.                                                                       -->
+      <show-actionscript-warnings>true</show-actionscript-warnings>
+
+      <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+      <!-- but true by default for compc. -->
+      <!--
+      <debug>true</debug>
+      -->
+
+      <!-- List of SWC files or directories to compile against but to omit from -->
+      <!-- linking.                                                             -->
+      <external-library-path>
+          <path-element>../js/libs/js.swc</path-element>
+          <path-element>../js/libs/jquery.swc</path-element>
+      </external-library-path>
+
+      <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
+      <!-- the compiler during mxml translation and are helpful with understanding and   -->
+      <!-- debugging Flex applications.                                                  -->
+      <keep-generated-actionscript>false</keep-generated-actionscript>
+
+      <!-- not set -->
+      <!--
+      <include-libraries>
+         <library>string</library>
+      </include-libraries>
+      -->
+
+      <!-- List of SWC files or directories that contain SWC files. -->
+      <library-path>
+         <path-element>../js/libs/GCL.swc</path-element>
+      </library-path>
+
+      <mxml>
+          <children-as-data>true</children-as-data>
+          <imports>
+            <implicit-import>org.apache.flex.events.*</implicit-import>
+            <implicit-import>org.apache.flex.geom.*</implicit-import>
+            <implicit-import>org.apache.flex.core.ClassFactory</implicit-import>
+            <implicit-import>org.apache.flex.core.IFactory</implicit-import>
+        </imports>
+      </mxml>
+      <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+      <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+      <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+      <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+      <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
+      <states-class>org.apache.flex.states.State</states-class>
+      <states-instance-override-class>org.apache.flex.states.AddItems</states-instance-override-class>
+      <states-property-override-class>org.apache.flex.states.SetProperty</states-property-override-class>
+      <states-event-override-class>org.apache.flex.states.SetEventHandler</states-event-override-class>
+      <component-factory-class>org.apache.flex.core.ClassFactory</component-factory-class>
+      <component-factory-interface>org.apache.flex.core.IFactory</component-factory-interface>
+        
+      <namespaces>
+      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
+      <!-- elements.                                                                -->
+      </namespaces>
+
+      <!-- Enable post-link SWF optimization. -->
+      <optimize>true</optimize>
+
+      <!-- Enable trace statement omission. -->
+      <omit-trace-statements>true</omit-trace-statements>
+
+      <!-- Keep the following AS3 metadata in the bytecodes.                                             -->
+      <!-- Warning: For the data binding feature in the Flex framework to work properly,                 -->
+      <!--          the following metadata must be kept:                                                 -->
+      <!--          1. Bindable                                                                          -->
+      <!--          2. Managed                                                                           -->
+      <!--          3. ChangeEvent                                                                       -->
+      <!--          4. NonCommittingChangeEvent                                                          -->
+      <!--          5. Transient                                                                         -->
+      <!--
+      <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+      </keep-as3-metadata>
+      -->
+
+      <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
+      <!-- will not be able to detect assignments to "foo".                               -->
+      <show-binding-warnings>true</show-binding-warnings>
+
+      <!-- toggle whether warnings generated from unused type selectors are displayed -->
+      <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
+
+      <!-- Run the AS3 compiler in strict error checking mode. -->
+      <strict>true</strict>
+
+      <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
+      <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
+      <!-- (-strict is recommended, but not required, for earlier errors) -->
+      <as3>true</as3>
+
+      <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
+      <!-- properties. In the prototype based object model built-in functions are implemented as dynamic      -->
+      <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for         -->
+      <!-- references to dynamic properties) -->
+      <es>false</es>
+
+      <!-- List of CSS or SWC files to apply as a theme. -->
+      <theme>
+      </theme>
+
+      <!-- Turns on the display of stack traces for uncaught runtime errors. -->
+      <verbose-stacktraces>false</verbose-stacktraces>
+
+      <!-- Defines the AS3 file encoding. -->
+      <!-- not set -->
+      <!--
+      <actionscript-file-encoding></actionscript-file-encoding>
+      -->
+
+      <fonts>
+
+          <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
+          <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
+          <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
+          <advanced-anti-aliasing>true</advanced-anti-aliasing>
+
+          <!-- The number of embedded font faces that are cached. -->
+          <max-cached-fonts>20</max-cached-fonts>
+
+          <!-- The number of character glyph outlines to cache for each font face. -->
+          <max-glyphs-per-face>1000</max-glyphs-per-face>
+
+          <!-- Defines ranges that can be used across multiple font-face declarations. -->
+          <!-- See flash-unicode-table.xml for more examples. -->
+          <!-- not set -->
+          <!--
+          <languages>
+              <language-range>
+                  <lang>englishRange</lang>
+                  <range>U+0020-007E</range>
+              </language-range>
+          </languages>
+          -->
+
+          <!-- Compiler font manager classes, in policy resolution order -->
+          <!-- NOTE: For Apache Flex -->
+          <!-- AFEFontManager and CFFFontManager both use proprietary technology.  -->
+          <!-- You must install the optional font jars if you wish to use embedded fonts  -->
+          <!-- directly or you can use fontswf to precompile the font as a swf.  -->
+          <managers>
+              <manager-class>flash.fonts.JREFontManager</manager-class>
+              <manager-class>flash.fonts.BatikFontManager</manager-class>
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+              <manager-class>flash.fonts.CFFFontManager</manager-class>
+          </managers>
+
+          <!-- File containing cached system font licensing information produced via
+               java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
+               Will default to winFonts.ser on Windows XP and
+               macFonts.ser on Mac OS X, so is commented out by default.
+
+          <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
+          -->
+
+      </fonts>
+      
+      <!-- Array.toString() format has changed. -->
+      <warn-array-tostring-changes>false</warn-array-tostring-changes>
+
+      <!-- Assignment within conditional. -->
+      <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+      <!-- Possibly invalid Array cast operation. -->
+      <warn-bad-array-cast>true</warn-bad-array-cast>
+
+      <!-- Non-Boolean value used where a Boolean value was expected. -->
+      <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
+
+      <!-- Invalid Date cast operation. -->
+      <warn-bad-date-cast>true</warn-bad-date-cast>
+
+      <!-- Unknown method. -->
+      <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
+
+      <!-- Unknown property. -->
+      <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
+
+      <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+      <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+      <!-- Impossible assignment to null. -->
+      <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+      <!-- Illogical comparison with null. -->
+      <warn-bad-null-comparison>true</warn-bad-null-comparison>
+
+      <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+      <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+      <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
+      <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
+
+      <!-- __resolve is no longer supported. -->
+      <warn-changes-in-resolve>false</warn-changes-in-resolve>
+
+      <!-- Class is sealed. It cannot have members added to it dynamically. -->
+      <warn-class-is-sealed>true</warn-class-is-sealed>
+
+      <!-- Constant not initialized. -->
+      <warn-const-not-initialized>true</warn-const-not-initialized>
+
+      <!-- Function used in new expression returns a value. Result will be what the -->
+      <!-- function returns, rather than a new instance of that function.           -->
+      <warn-constructor-returns-value>false</warn-constructor-returns-value>
+
+      <!-- EventHandler was not added as a listener. -->
+      <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
+
+      <!-- Unsupported ActionScript 2.0 function. -->
+      <warn-deprecated-function-error>true</warn-deprecated-function-error>
+
+      <!-- Unsupported ActionScript 2.0 property. -->
+      <warn-deprecated-property-error>true</warn-deprecated-property-error>
+
+      <!-- More than one argument by the same name. -->
+      <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
+
+      <!-- Duplicate variable definition -->
+      <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+      <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
+      <warn-for-var-in-changes>false</warn-for-var-in-changes>
+
+      <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
+      <warn-import-hides-class>true</warn-import-hides-class>
+
+      <!-- Use of the instanceof operator. -->
+      <warn-instance-of-changes>true</warn-instance-of-changes>
+
+      <!-- Internal error in compiler. -->
+      <warn-internal-error>true</warn-internal-error>
+
+      <!-- _level is no longer supported. For more information, see the flash.display package. -->
+      <warn-level-not-supported>true</warn-level-not-supported>
+
+      <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+      <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+      <!-- Negative value will become a large positive value when assigned to a uint data type. -->
+      <warn-negative-uint-literal>true</warn-negative-uint-literal>
+
+      <!-- Missing constructor. -->
+      <warn-no-constructor>false</warn-no-constructor>
+
+      <!-- The super() statement was not called within the constructor. -->
+      <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
+
+      <!-- Missing type declaration. -->
+      <warn-no-type-decl>true</warn-no-type-decl>
+
+      <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
+      <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space.      -->
+      <warn-number-from-string-changes>false</warn-number-from-string-changes>
+
+      <!-- Change in scoping for the this keyword. Class methods extracted from an  -->
+      <!-- instance of a class will always resolve this back to that instance. In   -->
+      <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
+      <!-- is invoked from.                                                         -->
+      <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
+
+      <!-- Inefficient use of += on a TextField.-->
+      <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
+
+      <!-- Possible missing parentheses. -->
+      <warn-unlikely-function-value>true</warn-unlikely-function-value>
+
+      <!-- Possible usage of the ActionScript 2.0 XML class. -->
+      <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
+
+   </compiler>
+
+
+   <!-- target-player: specifies the version of the player the application is targeting.
+                       Features requiring a later version will not be compiled into the application.
+                       The minimum value supported is "9.0.0".-->
+   <!-- target-player usage:
+   <target-player>version</target-player>
+   -->
+
+   <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+   <metadata>
+      <title>Apache FlexJS Application</title>
+      <description>http://flex.apache.org/</description>
+      <publisher>Apache Software Foundation</publisher>
+      <creator>unknown</creator>
+      <language>EN</language>
+   </metadata>
+   
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/jquery-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/jquery-config.xml b/frameworks/jquery-config.xml
new file mode 100644
index 0000000..0399bfc
--- /dev/null
+++ b/frameworks/jquery-config.xml
@@ -0,0 +1,340 @@
+<?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.
+
+-->
+
+
+<flex-config>
+    <!-- Specifies the minimum player version that will run the compiled SWF. -->
+   <target-player>11.1</target-player>
+
+    <!-- Specifies the version of the compiled SWF -->
+   <swf-version>14</swf-version>
+
+   <compiler>
+
+      <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+      <!-- not set -->
+      <!--
+      <source-path>
+         <path-element>string</path-element>
+      </source-path>
+      -->
+
+     <!-- Allow the source-path to have path-elements which contain other path-elements -->
+     <allow-source-path-overlap>false</allow-source-path-overlap>
+
+      <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+      <!-- code.                                                                       -->
+      <show-actionscript-warnings>true</show-actionscript-warnings>
+
+      <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+      <!-- but true by default for compc. -->
+      <!--
+      <debug>true</debug>
+      -->
+
+      <!-- List of SWC files or directories to compile against but to omit from -->
+      <!-- linking.                                                             -->
+      <external-library-path>
+          <path-element>../js/libs/js.swc</path-element>
+          <path-element>../js/libs/jquery.swc</path-element>
+      </external-library-path>
+
+      <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
+      <!-- the compiler during mxml translation and are helpful with understanding and   -->
+      <!-- debugging Flex applications.                                                  -->
+      <keep-generated-actionscript>false</keep-generated-actionscript>
+
+      <!-- not set -->
+      <!--
+      <include-libraries>
+         <library>string</library>
+      </include-libraries>
+      -->
+
+      <!-- List of SWC files or directories that contain SWC files. -->
+      <library-path>
+         <path-element>../js/libs/GCL.swc</path-element>
+      </library-path>
+
+      <mxml>
+          <children-as-data>true</children-as-data>
+          <imports>
+            <implicit-import>org.apache.flex.events.*</implicit-import>
+            <implicit-import>org.apache.flex.geom.*</implicit-import>
+            <implicit-import>org.apache.flex.core.ClassFactory</implicit-import>
+            <implicit-import>org.apache.flex.core.IFactory</implicit-import>
+        </imports>
+      </mxml>
+      <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+      <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+      <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+      <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+      <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
+      <states-class>org.apache.flex.states.State</states-class>
+      <states-instance-override-class>org.apache.flex.states.AddItems</states-instance-override-class>
+      <states-property-override-class>org.apache.flex.states.SetProperty</states-property-override-class>
+      <states-event-override-class>org.apache.flex.states.SetEventHandler</states-event-override-class>
+      <component-factory-class>org.apache.flex.core.ClassFactory</component-factory-class>
+      <component-factory-interface>org.apache.flex.core.IFactory</component-factory-interface>
+        
+      <namespaces>
+      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
+      <!-- elements.                                                                -->
+      </namespaces>
+
+      <!-- Enable post-link SWF optimization. -->
+      <optimize>true</optimize>
+
+      <!-- Enable trace statement omission. -->
+      <omit-trace-statements>true</omit-trace-statements>
+
+      <!-- Keep the following AS3 metadata in the bytecodes.                                             -->
+      <!-- Warning: For the data binding feature in the Flex framework to work properly,                 -->
+      <!--          the following metadata must be kept:                                                 -->
+      <!--          1. Bindable                                                                          -->
+      <!--          2. Managed                                                                           -->
+      <!--          3. ChangeEvent                                                                       -->
+      <!--          4. NonCommittingChangeEvent                                                          -->
+      <!--          5. Transient                                                                         -->
+      <!--
+      <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+      </keep-as3-metadata>
+      -->
+
+      <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
+      <!-- will not be able to detect assignments to "foo".                               -->
+      <show-binding-warnings>true</show-binding-warnings>
+
+      <!-- toggle whether warnings generated from unused type selectors are displayed -->
+      <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
+
+      <!-- Run the AS3 compiler in strict error checking mode. -->
+      <strict>true</strict>
+
+      <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
+      <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
+      <!-- (-strict is recommended, but not required, for earlier errors) -->
+      <as3>true</as3>
+
+      <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
+      <!-- properties. In the prototype based object model built-in functions are implemented as dynamic      -->
+      <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for         -->
+      <!-- references to dynamic properties) -->
+      <es>false</es>
+
+      <!-- List of CSS or SWC files to apply as a theme. -->
+      <theme>
+      </theme>
+
+      <!-- Turns on the display of stack traces for uncaught runtime errors. -->
+      <verbose-stacktraces>false</verbose-stacktraces>
+
+      <!-- Defines the AS3 file encoding. -->
+      <!-- not set -->
+      <!--
+      <actionscript-file-encoding></actionscript-file-encoding>
+      -->
+
+      <fonts>
+
+          <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
+          <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
+          <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
+          <advanced-anti-aliasing>true</advanced-anti-aliasing>
+
+          <!-- The number of embedded font faces that are cached. -->
+          <max-cached-fonts>20</max-cached-fonts>
+
+          <!-- The number of character glyph outlines to cache for each font face. -->
+          <max-glyphs-per-face>1000</max-glyphs-per-face>
+
+          <!-- Defines ranges that can be used across multiple font-face declarations. -->
+          <!-- See flash-unicode-table.xml for more examples. -->
+          <!-- not set -->
+          <!--
+          <languages>
+              <language-range>
+                  <lang>englishRange</lang>
+                  <range>U+0020-007E</range>
+              </language-range>
+          </languages>
+          -->
+
+          <!-- Compiler font manager classes, in policy resolution order -->
+          <!-- NOTE: For Apache Flex -->
+          <!-- AFEFontManager and CFFFontManager both use proprietary technology.  -->
+          <!-- You must install the optional font jars if you wish to use embedded fonts  -->
+          <!-- directly or you can use fontswf to precompile the font as a swf.  -->
+          <managers>
+              <manager-class>flash.fonts.JREFontManager</manager-class>
+              <manager-class>flash.fonts.BatikFontManager</manager-class>
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+              <manager-class>flash.fonts.CFFFontManager</manager-class>
+          </managers>
+
+          <!-- File containing cached system font licensing information produced via
+               java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
+               Will default to winFonts.ser on Windows XP and
+               macFonts.ser on Mac OS X, so is commented out by default.
+
+          <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
+          -->
+
+      </fonts>
+      
+      <!-- Array.toString() format has changed. -->
+      <warn-array-tostring-changes>false</warn-array-tostring-changes>
+
+      <!-- Assignment within conditional. -->
+      <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+      <!-- Possibly invalid Array cast operation. -->
+      <warn-bad-array-cast>true</warn-bad-array-cast>
+
+      <!-- Non-Boolean value used where a Boolean value was expected. -->
+      <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
+
+      <!-- Invalid Date cast operation. -->
+      <warn-bad-date-cast>true</warn-bad-date-cast>
+
+      <!-- Unknown method. -->
+      <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
+
+      <!-- Unknown property. -->
+      <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
+
+      <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+      <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+      <!-- Impossible assignment to null. -->
+      <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+      <!-- Illogical comparison with null. -->
+      <warn-bad-null-comparison>true</warn-bad-null-comparison>
+
+      <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+      <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+      <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
+      <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
+
+      <!-- __resolve is no longer supported. -->
+      <warn-changes-in-resolve>false</warn-changes-in-resolve>
+
+      <!-- Class is sealed. It cannot have members added to it dynamically. -->
+      <warn-class-is-sealed>true</warn-class-is-sealed>
+
+      <!-- Constant not initialized. -->
+      <warn-const-not-initialized>true</warn-const-not-initialized>
+
+      <!-- Function used in new expression returns a value. Result will be what the -->
+      <!-- function returns, rather than a new instance of that function.           -->
+      <warn-constructor-returns-value>false</warn-constructor-returns-value>
+
+      <!-- EventHandler was not added as a listener. -->
+      <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
+
+      <!-- Unsupported ActionScript 2.0 function. -->
+      <warn-deprecated-function-error>true</warn-deprecated-function-error>
+
+      <!-- Unsupported ActionScript 2.0 property. -->
+      <warn-deprecated-property-error>true</warn-deprecated-property-error>
+
+      <!-- More than one argument by the same name. -->
+      <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
+
+      <!-- Duplicate variable definition -->
+      <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+      <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
+      <warn-for-var-in-changes>false</warn-for-var-in-changes>
+
+      <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
+      <warn-import-hides-class>true</warn-import-hides-class>
+
+      <!-- Use of the instanceof operator. -->
+      <warn-instance-of-changes>true</warn-instance-of-changes>
+
+      <!-- Internal error in compiler. -->
+      <warn-internal-error>true</warn-internal-error>
+
+      <!-- _level is no longer supported. For more information, see the flash.display package. -->
+      <warn-level-not-supported>true</warn-level-not-supported>
+
+      <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+      <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+      <!-- Negative value will become a large positive value when assigned to a uint data type. -->
+      <warn-negative-uint-literal>true</warn-negative-uint-literal>
+
+      <!-- Missing constructor. -->
+      <warn-no-constructor>false</warn-no-constructor>
+
+      <!-- The super() statement was not called within the constructor. -->
+      <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
+
+      <!-- Missing type declaration. -->
+      <warn-no-type-decl>true</warn-no-type-decl>
+
+      <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
+      <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space.      -->
+      <warn-number-from-string-changes>false</warn-number-from-string-changes>
+
+      <!-- Change in scoping for the this keyword. Class methods extracted from an  -->
+      <!-- instance of a class will always resolve this back to that instance. In   -->
+      <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
+      <!-- is invoked from.                                                         -->
+      <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
+
+      <!-- Inefficient use of += on a TextField.-->
+      <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
+
+      <!-- Possible missing parentheses. -->
+      <warn-unlikely-function-value>true</warn-unlikely-function-value>
+
+      <!-- Possible usage of the ActionScript 2.0 XML class. -->
+      <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
+
+   </compiler>
+
+
+   <!-- target-player: specifies the version of the player the application is targeting.
+                       Features requiring a later version will not be compiled into the application.
+                       The minimum value supported is "9.0.0".-->
+   <!-- target-player usage:
+   <target-player>version</target-player>
+   -->
+
+   <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+   <metadata>
+      <title>Apache FlexJS Application</title>
+      <description>http://flex.apache.org/</description>
+      <publisher>Apache Software Foundation</publisher>
+      <creator>unknown</creator>
+      <language>EN</language>
+   </metadata>
+   
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/js/FlexJS/projects/CreateJSJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CreateJSJS/build.xml b/frameworks/js/FlexJS/projects/CreateJSJS/build.xml
index 42e1f2b..15a857b 100644
--- a/frameworks/js/FlexJS/projects/CreateJSJS/build.xml
+++ b/frameworks/js/FlexJS/projects/CreateJSJS/build.xml
@@ -59,7 +59,7 @@
             <arg value="-compiler.strict-xml=true" />
             <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
             <arg value="-output=${basedir}/target/generated-sources/flexjs" />
-            <arg value="-load-config=${FLEX_HOME}/frameworks/js-config.xml" />
+            <arg value="-load-config=${FLEX_HOME}/frameworks/createjs-config.xml" />
             <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml" />
         </java>
     </target>
@@ -74,7 +74,7 @@
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
-            <load-config filename="${FLEX_HOME}/frameworks/js-config.xml" />
+            <load-config filename="${FLEX_HOME}/frameworks/createjs-config.xml" />
             <load-config filename="src/main/config/compile-js-config.xml" />
             <arg value="-compiler.strict-xml=true" />
         </compc>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
index 05fe473..e4888b5 100644
--- a/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/CreateJSJS/src/main/config/compile-js-config.xml
@@ -21,10 +21,6 @@
     <compiler>
         <accessible>false</accessible>
         
-        <external-library-path append="true">
-            <path-element>../../../../../../../../js/libs/createjs.swc</path-element>
-        </external-library-path>
-        
 		<mxml>
 			<children-as-data>true</children-as-data>
 		</mxml>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/js/FlexJS/projects/JQueryJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/JQueryJS/build.xml b/frameworks/js/FlexJS/projects/JQueryJS/build.xml
index 24ffad6..35fb357 100644
--- a/frameworks/js/FlexJS/projects/JQueryJS/build.xml
+++ b/frameworks/js/FlexJS/projects/JQueryJS/build.xml
@@ -59,7 +59,7 @@
             <arg value="-compiler.strict-xml=true" />
             <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
             <arg value="-output=${basedir}/target/generated-sources/flexjs" />
-            <arg value="-load-config=${FLEX_HOME}/frameworks/js-config.xml" />
+            <arg value="-load-config=${FLEX_HOME}/frameworks/jquery-config.xml" />
             <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml" />
         </java>
     </target>
@@ -74,7 +74,7 @@
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
-            <load-config filename="${FLEX_HOME}/frameworks/js-config.xml" />
+            <load-config filename="${FLEX_HOME}/frameworks/jquery-config.xml" />
             <load-config filename="src/main/config/compile-js-config.xml" />
             <arg value="-compiler.strict-xml=true" />
         </compc>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml b/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
index 666a828..202c55b 100644
--- a/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/JQueryJS/src/main/config/compile-js-config.xml
@@ -21,10 +21,6 @@
     <compiler>
         <accessible>false</accessible>
         
-        <external-library-path append="true">
-            <path-element>../../../../../../../../js/libs/jquery.swc</path-element>
-        </external-library-path>
-        
 		<mxml>
 			<children-as-data>true</children-as-data>
 		</mxml>


[28/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
index 304f18b,0000000..fdb7c41
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
@@@ -1,2056 -1,0 +1,2056 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.styles
 +{
 +	
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;		
 +}
 +COMPILE::LATER
 +{
 +	import flash.display.LoaderInfo;
 +	import flash.system.ApplicationDomain;
 +	import flash.system.SecurityDomain;		
 +	import flash.events.TimerEvent;
 +	import flash.utils.Timer;
 +}
 +import org.apache.flex.events.Event;
 +import org.apache.flex.events.EventDispatcher;
 +import org.apache.flex.events.IEventDispatcher;
 +
 +import mx.core.FlexVersion;
 +import mx.core.IFlexModuleFactory;
 +import mx.core.mx_internal;
 +import mx.events.FlexChangeEvent;
 +COMPILE::LATER
 +{
 +	import mx.events.ModuleEvent;
 +	import mx.events.StyleEvent;
 +	import mx.modules.IModuleInfo;
 +	import mx.modules.ModuleManager;
 +	import mx.styles.IStyleModule;		
 +}
 +import mx.events.Request;
 +import mx.managers.ISystemManager;
 +import mx.managers.SystemManagerGlobals;
 +import mx.resources.IResourceManager;
 +import mx.resources.ResourceManager;
 +import mx.styles.IStyleManager2;
 +import mx.utils.MediaQueryParser;
 +
 +use namespace mx_internal;
 +
 +[ExcludeClass]
 +
 +[ResourceBundle("styles")]
 +
 +[Mixin]
 +
 +/**
 + *  @private
 + */
 +public class StyleManagerImpl extends EventDispatcher implements IStyleManager2
 +{
 +	include "../core/Version.as";
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Class constants
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Class variables
 +	//
 +	//--------------------------------------------------------------------------
 +	/**
 +	 *  @private
 +	 */
 +	private static var instance:IStyleManager2;
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Class methods
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public static function init(fbs:IFlexModuleFactory):void
 +	{
 +		var styleDataClassName:String = fbs.info()["styleDataClassName"];
 +		if (styleDataClassName)
 +		{
 +			var sm:StyleManagerImpl = fbs.getImplementation("mx.styles::IStyleManager2") as StyleManagerImpl;
 +			if (!sm)
 +				sm = new StyleManagerImpl(fbs);
 +			
 +			var styleDataClass:Class = fbs.info()["currentDomain"].getDefinition(styleDataClassName);
 +			var styleNames:Array = styleDataClass["inheritingStyles"];
 +			for each (var s:String in styleNames)
 +			{
 +				sm.registerInheritingStyle(s);
 +			}
 +			generateCSSStyleDeclarations(sm, styleDataClass["factoryFunctions"], styleDataClass["data"]);
 +			sm.initProtoChainRoots();
 +		}
 +	}
 +	
 +	public static function generateCSSStyleDeclarations(styleManager:StyleManagerImpl, factoryFunctions:Object, data:Array, newSelectors:Array = null, overrideMap:Object = null):void
 +	{
 +		var arr:Array = data;
 +		
 +		var conditions:Array = null;
 +		var condition:CSSCondition = null;
 +		var selector:CSSSelector = null;
 +		var style:CSSStyleDeclaration;
 +		var declarationName:String = "";
 +		var segmentName:String = "";
 +		var effects:Array;
 +		
 +		var mergedStyle:CSSStyleDeclaration;
 +		
 +		var conditionCombiners:Object = {};
 +		conditionCombiners[CSSConditionKind.CLASS] = ".";
 +		conditionCombiners[CSSConditionKind.ID] = "#";
 +		conditionCombiners[CSSConditionKind.PSEUDO] = ':';    
 +		var n:int = arr.length;
 +		for (var i:int = 0; i < n; i++)
 +		{
 +			var className:int = arr[i];
 +			if (className == CSSClass.CSSSelector)
 +			{
 +				var selectorName:String = arr[++i];
 +				selector = new CSSSelector(selectorName, conditions, selector);
 +				segmentName = selectorName + segmentName;
 +				if (declarationName != "")
 +					declarationName += " ";
 +				declarationName += segmentName;
 +				segmentName = "";
 +				conditions = null;
 +			}
 +			else if (className == CSSClass.CSSCondition)
 +			{
 +				if (!conditions)
 +					conditions = [];
 +				var conditionType:String = arr[++i];
 +				var conditionName:String = arr[++i];
 +				condition = new CSSCondition(conditionType, conditionName);
 +				conditions.push(condition);
 +				segmentName = segmentName + conditionCombiners[conditionType] + conditionName;
 +			}
 +			else if (className == CSSClass.CSSStyleDeclaration)
 +			{
 +				var factoryName:int = arr[++i]; // defaultFactory or factory
 +				var defaultFactory:Boolean = factoryName == CSSFactory.DefaultFactory;
 +				if (defaultFactory)
 +				{
 +					mergedStyle = styleManager.getMergedStyleDeclaration(declarationName);
 +					style = new CSSStyleDeclaration(selector, styleManager, mergedStyle == null);
 +				}
 +				else
 +				{
 +					style = styleManager.getStyleDeclaration(declarationName);
 +					if (!style)
 +					{
 +						style = new CSSStyleDeclaration(selector, styleManager, mergedStyle == null);
 +						if (factoryName == CSSFactory.Override)
 +							newSelectors.push(style);
 +					}
 +				}
 +				if (defaultFactory)
 +				{
 +					if (style.defaultFactory == null)
 +						style.defaultFactory = factoryFunctions[declarationName];
 +				}
 +				else
 +				{
 +					if (factoryName == CSSFactory.Factory)
 +					{
 +						if (style.factory == null)
 +							style.factory = factoryFunctions[declarationName];
 +					}
 +					else
 +					{
 +						// apply overrides from CSS StyleModule
 +						var moduleStyles:Object = new factoryFunctions[declarationName];
 +						for (var styleProp:String in moduleStyles)
 +						{
 +							style.setLocalStyle(styleProp, moduleStyles[styleProp]);
 +							if (!overrideMap[declarationName])
 +								overrideMap[declarationName] = [];
 +							overrideMap[declarationName].push(styleProp);
 +						}
 +					}
 +				}
 +				if (defaultFactory && mergedStyle != null && 
 +					(mergedStyle.defaultFactory == null ||
 +						compareFactories(new style.defaultFactory(), new mergedStyle.defaultFactory())))
 +				{
 +					styleManager.setStyleDeclaration(style.mx_internal::selectorString, style, false);
 +				}
 +				selector = null;
 +				conditions = null;
 +				declarationName = "";
 +				mergedStyle = null;
 +			}
 +		}
 +	}
 +	
 +	private static var propList1:Vector.<String> = new Vector.<String>();
 +	private static var propList2:Vector.<String> = new Vector.<String>();
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private static function compareFactories(obj1:Object, obj2:Object):int
 +	{
 +		propList1.length = propList2.length = 0;
 +		for (var p:String in obj1)
 +			propList1.push(p);
 +		
 +		for (p in obj2)
 +			propList2.push(p);
 +		
 +		if (propList1.length != propList2.length)
 +			return 1;
 +		
 +		for each (p in propList1)
 +		{
 +			if (obj1[p] !== obj2[p])
 +				return 1;
 +		}
 +		
 +		return 0;
 +	}
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public static function getInstance():IStyleManager2
 +	{
 +		if (!instance)
 +		{
 +			// In Flex 4 each application/module creates its own style manager.
 +			// There will be no style manager if the application/module was compiled for 
 +			// Flex 3 compatibility. In that case create there will be no instance 
 +			// associated with the top-level application so create a new instance.
 +			instance = IStyleManager2(IFlexModuleFactory(SystemManagerGlobals.topLevelSystemManagers[0]).
 +				getImplementation("mx.styles::IStyleManager2"));
 +			
 +			if (!instance)
 +				instance = new StyleManagerImpl(SystemManagerGlobals.topLevelSystemManagers[0]);
 +		}
 +		
 +		return instance;
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	/**
 +	 *  @private
 +	 * 
 +	 *  @param moduleFactory The module factory that is creating this instance. May not be null.
 +	 */
 +	public function StyleManagerImpl(moduleFactory:IFlexModuleFactory = null)
 +	{
 +		super();
 +		
 +		if (!moduleFactory) return;
 +		
 +		this.moduleFactory = moduleFactory;
 +		this.moduleFactory.registerImplementation("mx.styles::IStyleManager2", this);
 +		
 +		// get our parent styleManager
 +		if (moduleFactory is DisplayObject)
 +		{
 +			var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
 +			DisplayObject(moduleFactory).dispatchEvent(request); 
 +			var parentModuleFactory:IFlexModuleFactory = request.value as IFlexModuleFactory;
 +			if (parentModuleFactory)
 +			{
 +				_parent = IStyleManager2(parentModuleFactory.
 +					getImplementation("mx.styles::IStyleManager2"));
 +				if (_parent is IEventDispatcher)
 +				{
 +					COMPILE::LATER
 +					{
 +						IEventDispatcher(_parent).addEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE, styleManagerChangeHandler, false, 0, true);							
 +					}
 +					IEventDispatcher(_parent).addEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE, styleManagerChangeHandler);
 +				}
 +			}
 +			
 +		}
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Variables
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	/**
 +	 *  @private
 +	 *  Used to assign the selectorIndex in CSSStyleDeclaration so we can track
 +	 *  the order they were added to the StyleManager.  
 +	 *  MatchStyleDeclarations has to return the declarations in the order 
 +	 *  they were declared
 +	 */ 
 +	private var selectorIndex:int = 0;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private var mqp:MediaQueryParser;
 +	
 +	/**
 +	 *  @private
 +	 *  Set of inheriting non-color styles.
 +	 *  This is not the complete set from CSS.
 +	 *  Some of the omitted we don't support at all,
 +	 *  others may be added later as needed.
 +	 *  The <code>isInheritingTextFormatStyle()</code> method queries this set.
 +	 */
 +	private var inheritingTextFormatStyles:Object =
 +		{
 +			align: true,
 +			bold: true,
 +			color: true,
 +			font: true,
 +			indent: true,
 +			italic: true,
 +			size: true
 +		};
 +	
 +	/**
 +	 *  @private
 +	 *  Set of styles for which setStyle() causes
 +	 *  invalidateSize() to be called on the component.
 +	 *  The method registerSizeInvalidatingStyle() adds to this set
 +	 *  and isSizeInvalidatingStyle() queries this set.
 +	 */
 +	private var sizeInvalidatingStyles:Object =
 +		{
 +			alignmentBaseline: true,
 +			baselineShift: true,
 +			blockProgression: true,
 +			borderStyle: true,
 +			borderThickness: true,
 +			breakOpportunity : true,
 +			cffHinting: true,
 +			columnCount: true,
 +			columnGap: true,
 +			columnWidth: true,
 +			digitCase: true,
 +			digitWidth: true,
 +			direction: true,
 +			dominantBaseline: true,
 +			firstBaselineOffset: true,
 +			fontAntiAliasType: true,
 +			fontFamily: true,
 +			fontGridFitType: true,
 +			fontLookup: true,
 +			fontSharpness: true,
 +			fontSize: true,
 +			fontStyle: true,
 +			fontThickness: true,
 +			fontWeight: true,
 +			headerHeight: true,
 +			horizontalAlign: true,
 +			horizontalGap: true,
 +			justificationRule: true,
 +			justificationStyle: true,
 +			kerning: true,
 +			leading: true,
 +			leadingModel: true,
 +			letterSpacing: true,
 +			ligatureLevel: true,
 +			lineBreak: true,
 +			lineHeight: true,
 +			lineThrough: true,
 +			listAutoPadding: true,
 +			listStylePosition: true,
 +			listStyleType: true,
 +			locale: true,
 +			marginBottom: true,
 +			marginLeft: true,
 +			marginRight: true,
 +			marginTop: true,
 +			paddingBottom: true,
 +			paddingLeft: true,
 +			paddingRight: true,
 +			paddingTop: true,
 +			paragraphEndIndent: true,
 +			paragraphStartIndent: true,
 +			paragraphSpaceAfter: true,
 +			paragraphSpaceBefore: true,            
 +			renderingMode: true,
 +			strokeWidth: true,
 +			tabHeight: true,
 +			tabWidth: true,
 +			tabStops: true,
 +			textAlign: true,
 +			textAlignLast: true,
 +			textDecoration: true,
 +			textIndent: true,
 +			textJustify: true,
 +			textRotation: true,
 +			tracking: true,
 +			trackingLeft: true,
 +			trackingRight: true,
 +			typographicCase: true,
 +			verticalAlign: true,
 +			verticalGap: true,
 +			wordSpacing:true,
 +			whitespaceCollapse: true
 +		}
 +	
 +	/**
 +	 *  @private
 +	 *  Set of styles for which setStyle() causes
 +	 *  invalidateSize() to be called on the component's parent.
 +	 *  The method registerParentSizeInvalidatingStyle() adds to this set
 +	 *  and isParentSizeInvalidatingStyle() queries this set.
 +	 */
 +	private var parentSizeInvalidatingStyles:Object =
 +		{
 +			baseline: true,
 +			bottom: true,
 +			horizontalCenter: true,
 +			left: true,
 +			right: true,
 +			top: true,
 +			verticalCenter: true
 +		}
 +	
 +	/**
 +	 *  @private
 +	 *  Set of styles for which setStyle() causes
 +	 *  invalidateDisplayList() to be called on the component's parent.
 +	 *  The method registerParentDisplayListInvalidatingStyle() adds to this set
 +	 *  and isParentDisplayListInvalidatingStyle() queries this set.
 +	 */
 +	private var parentDisplayListInvalidatingStyles:Object =
 +		{
 +			baseline: true,
 +			bottom: true,
 +			horizontalCenter: true,
 +			left: true,
 +			right: true,
 +			top: true,
 +			verticalCenter: true
 +		}
 +	
 +	/**
 +	 *  @private
 +	 *  Set of color names.
 +	 *  The method registerColorName() adds to this set
 +	 *  and isColorName() queries this set.
 +	 *  All color names in this set are lowercase in order to support
 +	 *  case-insensitive mapping in the StyleManager methods getColorName(),
 +	 *  getColorNames(), registerColorName(), and isColorName().
 +	 *  We handle color names at runtime in a case-insensitive way
 +	 *  because the MXML compiler does this at compile time,
 +	 *  in conformance with the CSS spec.
 +	 */
 +	private var colorNames:Object =
 +		{
 +			transparent: "transparent",
 +			black: 0x000000,
 +			blue: 0x0000FF,
 +			green: 0x008000,
 +			gray: 0x808080,
 +			silver: 0xC0C0C0,
 +			lime: 0x00FF00,
 +			olive: 0x808000,
 +			white: 0xFFFFFF,
 +			yellow: 0xFFFF00,
 +			maroon: 0x800000,
 +			navy: 0x000080,
 +			red: 0xFF0000,
 +			purple: 0x800080,
 +			teal: 0x008080,
 +			fuchsia: 0xFF00FF,
 +			aqua: 0x00FFFF,
 +			magenta: 0xFF00FF,
 +			cyan: 0x00FFFF,
 +			
 +			// IMPORTANT: Theme colors must also be updated
 +			// in the Flex compiler's CSS parser
 +			// (in \src\java\macromedia\css\Descriptor.java)
 +			// and possibly other places as well. Grep for them!
 +			halogreen: 0x80FF4D,
 +			haloblue: 0x009DFF,
 +			haloorange: 0xFFB600,
 +			halosilver: 0xAECAD9
 +		};
 +	
 +	/**
 +	 *  @private
 +	 *  Whether any advanced selectors have been registered with this style
 +	 *  manager.
 +	 */ 
 +	private var _hasAdvancedSelectors:Boolean;
 +	
 +	/**
 +	 *  @private
 +	 *  A map of CSS pseudo states. If a pseudo selector exists for a
 +	 *  particular state name, it is likely that styles need to be recalculated.
 +	 */ 
 +	private var _pseudoCSSStates:Object;
 +	
 +	/**
 +	 *  @private
 +	 *  A map of CSS selectors -- such as "global", "Button", and ".bigRed" --
 +	 *  to CSSStyleDeclarations.
 +	 *  This collection is accessed via getStyleDeclaration(),
 +	 *  setStyleDeclaration(), and clearStyleDeclaration().
 +	 */
 +	private var _selectors:Object = {};
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private var styleModules:Object = {};
 +	
 +	/**
 +	 *  @private
 +	 *  A map of selector "subjects" to an ordered map of selector Strings and
 +	 *  their associated CSSStyleDeclarations.
 +	 *  The subject is the right most simple type selector in a potential chain
 +	 *  of selectors.
 +	 */ 
 +	private var _subjects:Object = {};
 +	
 +	/**
 +	 *  @private
 +	 *  Used for accessing localized Error messages.
 +	 */
 +	private var resourceManager:IResourceManager =
 +		ResourceManager.getInstance();
 +	
 +	/**
 +	 *  @private
 +	 *  Cache merged styles between this and parent.
 +	 */
 +	private var mergedInheritingStylesCache:Object;
 +	
 +	/**
 +	 *  @private
 +	 *  This style manager's flex module factory.
 +	 */
 +	private var moduleFactory:IFlexModuleFactory;
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	//----------------------------------
 +	//  parent
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */    
 +	private var _parent:IStyleManager2;
 +	
 +	/**
 +	 *  @private
 +	 *   
 +	 *  The style manager that is the parent of this StyleManager.
 +	 *  
 +	 *  @return the parent StyleManager or null if this is the top-level StyleManager.
 +	 */
 +	public function get parent():IStyleManager2
 +	{
 +		return _parent;
 +	}
 +	
 +	//----------------------------------
 +	//  qualifiedTypeSelectors
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private static var _qualifiedTypeSelectors:Boolean = true;
 +	
 +	public function get qualifiedTypeSelectors():Boolean
 +	{
 +		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
 +			return false;
 +		
 +		if (_qualifiedTypeSelectors)
 +			return _qualifiedTypeSelectors;
 +		
 +		if (parent)
 +			return parent.qualifiedTypeSelectors;
 +		
 +		return false;
 +	}
 +	
 +	public function set qualifiedTypeSelectors(value:Boolean):void
 +	{
 +		_qualifiedTypeSelectors = value;
 +	}
 +	
 +	//----------------------------------
 +	//  stylesRoot
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private var _stylesRoot:Object;
 +	
 +	/**
 +	 *  @private
 +	 *  The root of all proto chains used for looking up styles.
 +	 *  This object is initialized once by initProtoChainRoots() and
 +	 *  then updated by calls to setStyle() on the global CSSStyleDeclaration.
 +	 *  It is accessed by code that needs to construct proto chains,
 +	 *  such as the initProtoChain() method of UIComponent.
 +	 */
 +	public function get stylesRoot():Object
 +	{
 +		return _stylesRoot;
 +	}
 +	public function set stylesRoot(value:Object):void
 +	{
 +		_stylesRoot = value;
 +	}
 +	
 +	//----------------------------------
 +	//  inheritingStyles
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private var _inheritingStyles:Object = {};
 +	
 +	/**
 +	 *  @private
 +	 *  Set of inheriting non-color styles.
 +	 *  This is not the complete set from CSS.
 +	 *  Some of the omitted we don't support at all,
 +	 *  others may be added later as needed.
 +	 *  The method registerInheritingStyle() adds to this set
 +	 *  and isInheritingStyle() queries this set.
 +	 */
 +	public function get inheritingStyles():Object
 +	{
 +		if (mergedInheritingStylesCache)
 +			return mergedInheritingStylesCache;
 +		
 +		var mergedStyles:Object = _inheritingStyles;
 +		
 +		if (parent)
 +		{
 +			var otherStyles:Object = parent.inheritingStyles;
 +			
 +			for (var obj:Object in otherStyles)
 +			{
 +				if (mergedStyles[obj] === undefined)
 +					mergedStyles[obj] = otherStyles[obj];
 +			}
 +		}
 +		
 +		mergedInheritingStylesCache = mergedStyles;
 +		
 +		return mergedStyles;
 +	}
 +	
 +	public function set inheritingStyles(value:Object):void
 +	{
 +		_inheritingStyles = value;
 +		mergedInheritingStylesCache = null;
 +		
 +		if (hasEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE))
 +			dispatchInheritingStylesChangeEvent();
 +	}
 +	
 +	//----------------------------------
 +	//  typeHierarchyCache
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private var _typeHierarchyCache:Object;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public function get typeHierarchyCache():Object
 +	{
 +		if (_typeHierarchyCache == null)
 +			_typeHierarchyCache = {};
 +		
 +		return _typeHierarchyCache;
 +	}
 +	
 +	/**
 +	 * @private
 +	 */ 
 +	public function set typeHierarchyCache(value:Object):void
 +	{
 +		_typeHierarchyCache = value;
 +	}
 +	
 +	//----------------------------------
 +	//  typeSelectorCache
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private var _typeSelectorCache:Object;
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public function get typeSelectorCache():Object
 +	{
 +		if (_typeSelectorCache == null)
 +			_typeSelectorCache = {};
 +		
 +		return _typeSelectorCache;
 +	}
 +	
 +	/**
 +	 * @private
 +	 */ 
 +	public function set typeSelectorCache(value:Object):void
 +	{
 +		_typeSelectorCache = value;
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Methods
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	/**
 +	 *  @private
 +	 *  This method is called by code autogenerated by the MXML compiler,
 +	 *  after StyleManager.styles is popuplated with CSSStyleDeclarations.
 +	 */
 +	public function initProtoChainRoots():void
 +	{
 +		if (!stylesRoot)
 +		{
 +			var style:CSSStyleDeclaration = getMergedStyleDeclaration("global");
 +			if (style != null)
 +			{
 +				stylesRoot = style.addStyleToProtoChain({}, null);
 +			}
 +		}
 +	}
 +	
 +	/**
 +	 *  Returns an array of strings of all CSS selectors registered with the StyleManager.
 +	 *  Pass items in this array to the getStyleDeclaration function to get the corresponding CSSStyleDeclaration.
 +	 *  Note that class selectors are prepended with a period.
 +	 *  
 +	 *  @return An array of all of the selectors
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */ 
 +	public function get selectors():Array
 +	{
 +		var theSelectors:Array = [];
 +		for (var i:String in _selectors)
 +			theSelectors.push(i);
 +		
 +		if (parent)
 +		{
 +			var otherSelectors:Array = parent.selectors;
 +			for (i in otherSelectors)
 +				theSelectors.push(i);
 +		}
 +		
 +		return theSelectors;
 +	}
 +	
 +	/**
 +	 *  Determines whether any of the selectors registered with the style
 +	 *  manager have been advanced selectors (descendant selector, id selector,
 +	 *  non-global class selector, pseudo selector).
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 1.5
 +	 *  @productversion Flex 4
 +	 */ 
 +	public function hasAdvancedSelectors():Boolean
 +	{
 +		if (_hasAdvancedSelectors)
 +			return true;
 +		
 +		if (parent)
 +			return parent.hasAdvancedSelectors();
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 * @private
 +	 * Determines whether at least one pseudo-condition has been specified for
 +	 * the given state.
 +	 */ 
 +	public function hasPseudoCondition(cssState:String):Boolean
 +	{
 +		if (_pseudoCSSStates != null && _pseudoCSSStates[cssState] != null)
 +			return true;
 +		
 +		if (parent)
 +			return parent.hasPseudoCondition(cssState);
 +		
 +		return false;
 +	}
 +	
 +	private static var propNames:Array = ["class", "id", "pseudo", "unconditional"];
 +	
 +	/**
 +	 *  Retrieve all style declarations applicable to this subject. The subject
 +	 *  is the right most simple type selector in a selector chain. Returns a 
 +	 *  map of selectors with four properties: class for class selectors,
 +	 *  id for id selectors, pseudo for pseudo selectors and unconditional
 +	 *  for selectors without conditions
 +	 * 
 +	 * 
 +	 *  @param subject The subject of the style declaration's selector.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10
 +	 *  @playerversion AIR 1.5
 +	 *  @productversion Flex 4
 +	 */ 
 +	public function getStyleDeclarations(subject:String):Object
 +	{
 +		// For Flex 3 and earlier, if we were passed a subject with a package
 +		// name, such as "mx.controls.Button", strip off the package name
 +		// leaving just "Button" and look for that subject.
 +		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
 +		{
 +			if (subject.charAt(0) != ".")
 +			{
 +				var index:int = subject.lastIndexOf(".");
 +				if (index != -1)
 +					subject = subject.substr(index + 1);
 +			}
 +		}
 +		
 +		// NOTE: It's important the parent declarations come before this style
 +		// manager's styles because the order here is the order they are added to the 
 +		// prototype chain.
 +		var theSubjects:Object = null;
 +		
 +		if (parent)
 +			theSubjects = parent.getStyleDeclarations(subject);
 +		
 +		var subjectsObject:Object = _subjects[subject];
 +		if (!theSubjects)
 +		{
 +			if (subjectsObject)
 +				theSubjects = subjectsObject;
 +		}
 +		else if (subjectsObject)
 +		{    
 +			var mergedSubjects:Object = {};
 +			for each (var prop:String in propNames)
 +			{
 +				mergedSubjects[prop] = subjectsObject[prop];
 +			}
 +			mergedSubjects.parent = theSubjects;
 +			theSubjects = mergedSubjects;
 +		}
 +		
 +		return theSubjects;
 +	}
 +	
 +	private function isUnique(element:*, index:int, arr:Array):Boolean {
 +		return (arr.indexOf(element) >= 0);
 +	}
 +	
 +	/**
 +	 *  Gets the CSSStyleDeclaration object that stores the rules
 +	 *  for the specified CSS selector.
 +	 *
 +	 *  <p>If the <code>selector</code> parameter starts with a period (.),
 +	 *  the returned CSSStyleDeclaration is a class selector and applies only to those instances
 +	 *  whose <code>styleName</code> property specifies that selector
 +	 *  (not including the period).
 +	 *  For example, the class selector <code>".bigMargins"</code>
 +	 *  applies to any UIComponent whose <code>styleName</code>
 +	 *  is <code>"bigMargins"</code>.</p>
 +	 *
 +	 *  <p>If the <code>selector</code> parameter does not start with a period,
 +	 *  the returned CSSStyleDeclaration is a type selector and applies to all instances
 +	 *  of that type.
 +	 *  For example, the type selector <code>"Button"</code>
 +	 *  applies to all instances of Button and its subclasses.</p>
 +	 *
 +	 *  <p>The <code>global</code> selector is similar to a type selector
 +	 *  and does not start with a period.</p>
 +	 *
 +	 *  @param selector The name of the CSS selector.
 +	 *
 +	 *  @return The style declaration whose name matches the <code>selector</code> property.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function getStyleDeclaration(selector:String):CSSStyleDeclaration
 +	{
 +		// For Flex 3 and earlier, if we were passed a selector with a package
 +		// name, such as "mx.controls.Button", strip off the package name
 +		// leaving just "Button" and look for that type selector.
 +		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
 +		{
 +			if (selector.charAt(0) != ".")
 +			{
 +				var index:int = selector.lastIndexOf(".");
 +				if (index != -1)
 +					selector = selector.substr(index + 1);
 +			}
 +		}
 +		
 +		return _selectors[selector];
 +	}
 +	
 +	/** 
 +	 * Gets a CSSStyleDeclaration object that stores the rules 
 +	 * for the specified CSS selector. The CSSStyleDeclaration object is the created by merging
 +	 * the properties of the specified CSS selector of this style manager with all of the parent
 +	 * style managers.
 +	 * 
 +	 * <p>
 +	 * If this style manager contains a style declaration for the given selector, its style properties
 +	 * will be updated with properties from the parent style manager's merged style declaration. If
 +	 * this style manager does not have a style declaration for a given selector, the parent's merged
 +	 * style declaration will be set into this style manager depending on the value of the <code>
 +	 * setSelector</code> parameter.
 +	 * </p>
 +	 * 
 +	 * <p>If the <code>selector</code> parameter starts with a period (.), 
 +	 * the returned CSSStyleDeclaration is a class selector and applies only to those instances 
 +	 * whose <code>styleName</code> property specifies that selector 
 +	 * (not including the period). 
 +	 * For example, the class selector <code>".bigMargins"</code> 
 +	 * applies to any UIComponent whose <code>styleName</code> 
 +	 * is <code>"bigMargins"</code>.</p> 
 +	 * 
 +	 * <p>If the <code>selector</code> parameter does not start with a period, 
 +	 * the returned CSSStyleDeclaration is a type selector and applies to all instances 
 +	 * of that type. 
 +	 * For example, the type selector <code>"Button"</code> 
 +	 * applies to all instances of Button and its subclasses.</p> 
 +	 * 
 +	 * <p>The <code>global</code> selector is similar to a type selector 
 +	 * and does not start with a period.</p> 
 +	 * 
 +	 * @param selector The name of the CSS selector. 
 +	 * @param localOnly Controls whether the returned style declaration is the result of merging  
 +	 * the properties of this and any parent style managers or if the style declaration is only 
 +	 * from this style manager. 
 +	 * 
 +	 * @return The style declaration whose name matches the <code>selector</code> property. 
 +	 *  
 +	 * @langversion 3.0 
 +	 * @playerversion Flash 9 
 +	 * @playerversion AIR 1.1 
 +	 * @productversion Flex 4 
 +	 */     
 +	public function getMergedStyleDeclaration(selector:String):CSSStyleDeclaration
 +	{
 +		var style:CSSStyleDeclaration = getStyleDeclaration(selector);
 +		COMPILE::LATER
 +		{
 +			var parentStyle:CSSStyleDeclaration = null;
 +			
 +			// If we have a parent, get its style and merge them with our style.
 +			if (parent)
 +				parentStyle = parent.getMergedStyleDeclaration(selector);
 +			
 +			if (style || parentStyle)
 +			{
 +				style = new CSSMergedStyleDeclaration(style, parentStyle, 
 +					style ? style.selectorString : parentStyle.selectorString, this, false);
 +			}
 +		}
 +		return style;
 +	}
 +	
 +	/**
 +	 *  Sets the CSSStyleDeclaration object that stores the rules
 +	 *  for the specified CSS selector.
 +	 *
 +	 *  <p>If the <code>selector</code> parameter starts with a period (.),
 +	 *  the specified selector is a class selector and applies only to those instances
 +	 *  whose <code>styleName</code> property specifies that selector
 +	 *  (not including the period).
 +	 *  For example, the class selector <code>".bigMargins"</code>
 +	 *  applies to any UIComponent whose <code>styleName</code>
 +	 *  is <code>"bigMargins"</code>.</p>
 +	 *
 +	 *  <p>If the <code>selector</code> parameter does not start with a period,
 +	 *  the specified selector is a "type selector" and applies to all instances
 +	 *  of that type.
 +	 *  For example, the type selector <code>"Button"</code>
 +	 *  applies to all instances of Button and its subclasses.</p>
 +	 *
 +	 *  <p>The <code>global</code> selector is similar to a type selector
 +	 *  and does not start with a period.</p>
 +	 *
 +	 *  <p>Note that the provided selector will update the selector and subject
 +	 *  of the styleDeclaration to keep them in sync.</p>
 +	 * 
 +	 *  @param selector The name of the CSS selector.
 +	 *  @param styleDeclaration The new style declaration.
 +	 *  @param update Set to <code>true</code> to force an immediate update of the styles.
 +	 *  Set to <code>false</code> to avoid an immediate update of the styles in the application.
 +	 *  The styles will be updated the next time this method or the <code>clearStyleDeclaration()</code> method
 +	 *  is called with the <code>update</code> property set to <code>true</code>.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function setStyleDeclaration(selector:String,
 +										styleDeclaration:CSSStyleDeclaration,
 +										update:Boolean):void
 +	{
 +		// For Flex 3 and earlier, if we were passed a selector with a package
 +		// name, such as "mx.controls.Button", strip off the package name
 +		// leaving just "Button" and look for that type selector.
 +		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
 +		{
 +			if (selector.charAt(0) != ".")
 +			{
 +				var index:int = selector.lastIndexOf(".");
 +				if (index != -1)
 +					selector = selector.substr(index + 1);
 +			}
 +		}
 +		
 +		// Populate the selectors Array for this style declaration
 +		styleDeclaration.selectorRefCount++;
 +		styleDeclaration.selectorIndex = selectorIndex++;
 +		_selectors[selector] = styleDeclaration;
 +		
 +		// We also index by subject to help match advanced selectors
 +		var subject:String = styleDeclaration.subject;
 +		if (selector)
 +		{
 +			if (!styleDeclaration.subject)
 +			{
 +				// If the styleDeclaration does not yet have a subject we
 +				// update its selector to keep it in sync with the provided
 +				// selector.
 +				styleDeclaration.selectorString = selector;
 +				subject = styleDeclaration.subject;
 +			}
 +			else if (selector != styleDeclaration.selectorString)
 +			{
 +				// The styleDeclaration does not match the provided selector, so
 +				// we ignore the subject on the styleDeclaration and try to
 +				// determine the subject from the selector
 +				var firstChar:String = selector.charAt(0); 
 +				if (firstChar == "." || firstChar == ":" || firstChar == "#")
 +				{
 +					subject = "*";
 +				}
 +				else
 +				{
 +					// TODO: Support parsing Advanced CSS selectors for a 
 +					// subject...
 +					subject = selector;
 +				}
 +				
 +				// Finally, we update the styleDeclaration's selector to keep
 +				// it in sync with the provided selector.
 +				styleDeclaration.selectorString = selector;
 +			}
 +		}
 +		
 +		if (subject != null)
 +		{
 +			// determine the kind of selector and add it to the appropriate 
 +			// bin of selectors for this subject
 +			var kind:String = styleDeclaration.selector.conditions ? 
 +				styleDeclaration.selector.conditions[0].kind : 
 +				"unconditional";
 +			var declarations:Object = _subjects[subject];
 +			if (declarations == null)
 +			{
 +				declarations = {};
 +				declarations[kind] = [styleDeclaration];
 +				_subjects[subject] = declarations;
 +			}
 +			else
 +			{
 +				var declarationList:Array = declarations[kind] as Array;
 +				if (declarationList == null)
 +					declarations[kind] = [styleDeclaration];   
 +				else
 +					declarationList.push(styleDeclaration);
 +			}
 +		}
 +		
 +		// Also remember subjects that have pseudo-selectors to optimize
 +		// styles during component state changes.
 +		var pseudoCondition:String = styleDeclaration.getPseudoCondition();
 +		if (pseudoCondition != null)
 +		{
 +			if (_pseudoCSSStates == null)
 +				_pseudoCSSStates = {};
 +			
 +			_pseudoCSSStates[pseudoCondition] = true;
 +		}
 +		
 +		// Record whether this is an advanced selector so that style declaration
 +		// look up can be optimized for when no advanced selectors have been
 +		// declared
 +		if (styleDeclaration.isAdvanced())
 +			_hasAdvancedSelectors = true;
 +		
 +		// Flush cache and start over.
 +		if (_typeSelectorCache)
 +			_typeSelectorCache = {};
 +		
 +		if (update)
 +			styleDeclarationsChanged();
 +	}
 +	
 +	/**
 +	 *  Clears the CSSStyleDeclaration object that stores the rules
 +	 *  for the specified CSS selector.
 +	 *
 +	 *  <p>If the specified selector is a class selector (for example, ".bigMargins" or ".myStyle"),
 +	 *  you must be sure to start the
 +	 *  <code>selector</code> property with a period (.).</p>
 +	 *
 +	 *  <p>If the specified selector is a type selector (for example, "Button"), do not start the
 +	 *  <code>selector</code> property with a period.</p>
 +	 *
 +	 *  <p>The <code>global</code> selector is similar to a type selector
 +	 *  and does not start with a period.</p>
 +	 *
 +	 *  @param selector The name of the CSS selector to clear.
 +	 *  @param update Set to <code>true</code> to force an immediate update of the styles.
 +	 *  Set to <code>false</code> to avoid an immediate update of the styles in the application.
 +	 *  The styles will be updated the next time this method or the <code>setStyleDeclaration()</code> method is
 +	 *  called with the <code>update</code> property set to <code>true</code>.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function clearStyleDeclaration(selector:String,
 +										  update:Boolean):void
 +	{
 +		var styleDeclaration:CSSStyleDeclaration =
 +			getStyleDeclaration(selector);
 +		
 +		if (styleDeclaration && styleDeclaration.selectorRefCount > 0)
 +			styleDeclaration.selectorRefCount--;
 +		
 +		// Clear out legacy selectors map
 +		delete _selectors[selector];
 +		
 +		// Clear out matching decls from our selectors stored by subject
 +		var decls:Array;
 +		var i:int;
 +		var decl:CSSStyleDeclaration;
 +		
 +		if (styleDeclaration && styleDeclaration.subject)
 +		{
 +			decls = _subjects[styleDeclaration.subject] as Array;
 +			if (decls)
 +			{
 +				// Work from the back of the array so we can remove elements
 +				// as we go.
 +				for (i = decls.length - 1; i >= 0; i--)
 +				{
 +					decl = decls[i];
 +					if (decl && decl.selectorString == selector)
 +					{
 +						if (decls.length == 1)
 +							delete _subjects[styleDeclaration.subject];
 +						else
 +							decls.splice(i, 1);
 +					}
 +				}
 +			}
 +		}
 +		else
 +		{
 +			// Without a subject, we start searching all declarations for this
 +			// selector, clear out matching selectors if found and then assume
 +			// this we can limit our search to this subject and stop looking.
 +			var matchingSubject:Boolean = false;
 +			for each (decls in _subjects)
 +			{
 +				if (decls)
 +				{
 +					// Work from the back of the array so we can remove elements
 +					// as we go.
 +					for (i = decls.length - 1; i >= 0; i--)
 +					{
 +						decl = decls[i];
 +						if (decl && decl.selectorString == selector)
 +						{
 +							matchingSubject = true;
 +							if (decls.length == 1)
 +								delete _subjects[decl.subject];
 +							else
 +								decls.splice(i, 1);
 +						}
 +					}
 +					
 +					if (matchingSubject)
 +						break;
 +				}
 +			}
 +		}
 +		
 +		if (update)
 +			styleDeclarationsChanged();
 +	}
 +	
 +	/**
 +	 *  @private
 +	 *  After an entire selector is added, replaced, or removed,
 +	 *  this method updates all the DisplayList trees.
 +	 */
 +	public function styleDeclarationsChanged():void
 +	{
 +		var sms:Array /* of SystemManager */ =
 +			SystemManagerGlobals.topLevelSystemManagers;
 +		var n:int = sms.length;
 +		for (var i:int = 0; i < n; i++)
 +		{
 +			// Type as Object to avoid dependency on SystemManager or WindowedSystemManager
 +			var sm:ISystemManager = sms[i];
 +			var cm:Object = sm.getImplementation("mx.managers::ISystemManagerChildManager");
 +			Object(cm).regenerateStyleCache(true);
 +			Object(cm).notifyStyleChangeInChildren(null, true);
 +		}
 +	}
 +	
 +	/**
 +	 *  Adds to the list of styles that can inherit values
 +	 *  from their parents.
 +	 *
 +	 *  <p><b>Note:</b> Ensure that you avoid using duplicate style names, as name
 +	 *  collisions can result in decreased performance if a style that is
 +	 *  already used becomes inheriting.</p>
 +	 *
 +	 *  @param styleName The name of the style that is added to the list of styles that can inherit values.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function registerInheritingStyle(styleName:String):void
 +	{
 +		if (_inheritingStyles[styleName] != true)
 +		{
 +			_inheritingStyles[styleName] = true;
 +			mergedInheritingStylesCache = null;
 +			
 +			if (hasEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE))
 +				dispatchInheritingStylesChangeEvent();
 +		}
 +	}
 +	
 +	/**
 +	 *  Tests to see if a style is inheriting.
 +	 *
 +	 *  @param styleName The name of the style that you test to see if it is inheriting.
 +	 *
 +	 *  @return Returns <code>true</code> if the specified style is inheriting.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function isInheritingStyle(styleName:String):Boolean
 +	{
 +		if (mergedInheritingStylesCache)
 +			return mergedInheritingStylesCache[styleName] == true;
 +		
 +		if (_inheritingStyles[styleName] == true)
 +			return true;
 +		
 +		if (parent && parent.isInheritingStyle(styleName))
 +			return true;
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 *  Test to see if a TextFormat style is inheriting.
 +	 *
 +	 *  @param styleName The name of the style that you test to see if it is inheriting.
 +	 *
 +	 *  @return Returns <code>true</code> if the specified TextFormat style
 +	 *  is inheriting.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function isInheritingTextFormatStyle(styleName:String):Boolean
 +	{
 +		if (inheritingTextFormatStyles[styleName] == true)
 +			return true;
 +		
 +		if (parent && parent.isInheritingTextFormatStyle(styleName))
 +			return true;
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 *  Adds to the list of styles which may affect the measured size
 +	 *  of the component.
 +	 *  When one of these styles is set with <code>setStyle()</code>,
 +	 *  the <code>invalidateSize()</code> method is automatically called on the component
 +	 *  to make its measured size get recalculated later.
 +	 *
 +	 *  @param styleName The name of the style that you add to the list.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function registerSizeInvalidatingStyle(styleName:String):void
 +	{
 +		sizeInvalidatingStyles[styleName] = true;
 +	}
 +	
 +	/**
 +	 *  Tests to see if a style changes the size of a component.
 +	 *
 +	 *  <p>When one of these styles is set with the <code>setStyle()</code> method,
 +	 *  the <code>invalidateSize()</code> method is automatically called on the component
 +	 *  to make its measured size get recalculated later.</p>
 +	 *
 +	 *  @param styleName The name of the style to test.
 +	 *
 +	 *  @return Returns <code>true</code> if the specified style is one
 +	 *  which may affect the measured size of the component.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function isSizeInvalidatingStyle(styleName:String):Boolean
 +	{
 +		if (sizeInvalidatingStyles[styleName] == true)
 +			return true;
 +		
 +		if (parent && parent.isSizeInvalidatingStyle(styleName))
 +			return true;
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 *  Adds to the list of styles which may affect the measured size
 +	 *  of the component's parent container.
 +	 *  <p>When one of these styles is set with <code>setStyle()</code>,
 +	 *  the <code>invalidateSize()</code> method is automatically called on the component's
 +	 *  parent container to make its measured size get recalculated
 +	 *  later.</p>
 +	 *
 +	 *  @param styleName The name of the style to register.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function registerParentSizeInvalidatingStyle(styleName:String):void
 +	{
 +		parentSizeInvalidatingStyles[styleName] = true;
 +	}
 +	
 +	/**
 +	 *  Tests to see if the style changes the size of the component's parent container.
 +	 *
 +	 *  <p>When one of these styles is set with <code>setStyle()</code>,
 +	 *  the <code>invalidateSize()</code> method is automatically called on the component's
 +	 *  parent container to make its measured size get recalculated
 +	 *  later.</p>
 +	 *
 +	 *  @param styleName The name of the style to test.
 +	 *
 +	 *  @return Returns <code>true</code> if the specified style is one
 +	 *  which may affect the measured size of the component's
 +	 *  parent container.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function isParentSizeInvalidatingStyle(styleName:String):Boolean
 +	{
 +		if (parentSizeInvalidatingStyles[styleName] == true)
 +			return true;
 +		
 +		if (parent && parent.isParentSizeInvalidatingStyle(styleName))
 +			return true;
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 *  Adds to the list of styles which may affect the appearance
 +	 *  or layout of the component's parent container.
 +	 *  When one of these styles is set with <code>setStyle()</code>,
 +	 *  the <code>invalidateDisplayList()</code> method is auomatically called on the component's
 +	 *  parent container to make it redraw and/or relayout its children.
 +	 *
 +	 *  @param styleName The name of the style to register.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function registerParentDisplayListInvalidatingStyle(
 +		styleName:String):void
 +	{
 +		parentDisplayListInvalidatingStyles[styleName] = true;
 +	}
 +	
 +	/**
 +	 *  Tests to see if this style affects the component's parent container in
 +	 *  such a way as to require that the parent container redraws itself when this style changes.
 +	 *
 +	 *  <p>When one of these styles is set with <code>setStyle()</code>,
 +	 *  the <code>invalidateDisplayList()</code> method is auomatically called on the component's
 +	 *  parent container to make it redraw and/or relayout its children.</p>
 +	 *
 +	 *  @param styleName The name of the style to test.
 +	 *
 +	 *  @return Returns <code>true</code> if the specified style is one
 +	 *  which may affect the appearance or layout of the component's
 +	 *  parent container.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function isParentDisplayListInvalidatingStyle(
 +		styleName:String):Boolean
 +	{
 +		if (parentDisplayListInvalidatingStyles[styleName] == true)
 +			return true;
 +		
 +		if (parent && parent.isParentDisplayListInvalidatingStyle(styleName))
 +			return true;
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 *  Adds a color name to the list of aliases for colors.
 +	 *
 +	 *  @param colorName The name of the color to add to the list; for example, "blue".
 +	 *  If you later access this color name, the value is not case-sensitive.
 +	 *
 +	 *  @param colorValue Color value, for example, 0x0000FF.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function registerColorName(colorName:String, colorValue:uint):void
 +	{
 +		colorNames[colorName.toLowerCase()] = colorValue;
 +	}
 +	
 +	/**
 +	 *  Tests to see if the given String is an alias for a color value. For example,
 +	 *  by default, the String "blue" is an alias for 0x0000FF.
 +	 *
 +	 *  @param colorName The color name to test. This parameter is not case-sensitive.
 +	 *
 +	 *  @return Returns <code>true</code> if <code>colorName</code> is an alias
 +	 *  for a color.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function isColorName(colorName:String):Boolean
 +	{
 +		if (colorNames[colorName.toLowerCase()] !== undefined)
 +			return true;
 +		
 +		if (parent && parent.isColorName(colorName))
 +			return true;
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 *  Returns the numeric RGB color value that corresponds to the
 +	 *  specified color string.
 +	 *  The color string can be either a case-insensitive color name
 +	 *  such as <code>"red"</code>, <code>"Blue"</code>, or
 +	 *  <code>"haloGreen"</code>, a hexadecimal value such as 0xFF0000, or a #-hexadecimal String
 +	 *  such as <code>"#FF0000"</code>.
 +	 *
 +	 *  <p>This method returns a uint, such as 4521830, that represents a color. You can convert
 +	 *  this uint to a hexadecimal value by passing the numeric base (in this case, 16), to
 +	 *  the uint class's <code>toString()</code> method, as the following example shows:</p>
 +	 *  <pre>
 +	 *  import mx.styles.StyleManager;
 +	 *  private function getNewColorName():void {
 +	 *      StyleManager.registerColorName("soylentGreen",0x44FF66);
 +	 *      trace(StyleManager.getColorName("soylentGreen").toString(16));
 +	 *  }
 +	 *  </pre>
 +	 *
 +	 *  @param colorName The color name.
 +	 *
 +	 *  @return Returns a uint that represents the color value or <code>NOT_A_COLOR</code>
 +	 *  if the value of the <code>colorName</code> property is not an alias for a color.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function getColorName(colorName:Object):uint
 +	{
 +		var n:Number;
 +		
 +		if (colorName is String)
 +		{
 +			if (colorName.charAt(0) == "#")
 +			{
 +				// Map "#77EE11" to 0x77EE11
 +				n = Number("0x" + colorName.slice(1));
 +				return isNaN(n) ? StyleManager.NOT_A_COLOR : uint(n);
 +			}
 +			
 +			if (colorName.charAt(1) == "x" && colorName.charAt(0) == '0')
 +			{
 +				// Map "#77EE11" to 0x77EE11
 +				n = Number(colorName);
 +				return isNaN(n) ? StyleManager.NOT_A_COLOR : uint(n);
 +			}
 +			
 +			// Map "red" or "Red" to 0xFF0000;
 +			// Map "haloGreen" or "HaLoGrEeN" to 0x46FF00.
 +			var c:* = colorNames[colorName.toLowerCase()];
 +			if (c === undefined)
 +			{
 +				// If not found then try our parent
 +				if (parent)
 +					c = parent.getColorName(colorName);
 +			}
 +			
 +			if (c === undefined)
 +				return StyleManager.NOT_A_COLOR;                
 +			
 +			return uint(c);
 +		}
 +		
 +		return uint(colorName);
 +	}
 +	
 +	/**
 +	 *  Converts each element of the colors Array from a color name
 +	 *  to a numeric RGB color value.
 +	 *  Each color String can be either a case-insensitive color name
 +	 *  such as <code>"red"</code>, <code>"Blue"</code>, or
 +	 *  <code>"haloGreen"</code>, a hexadecimal value such as 0xFF0000, or a #-hexadecimal String
 +	 *  such as <code>"#FF0000"</code>..
 +	 *
 +	 *  @param colors An Array of color names.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function getColorNames(colors:Array /* of Number or String */):void
 +	{
 +		if (!colors)
 +			return;
 +		
 +		var n:int = colors.length;
 +		for (var i:int = 0; i < n; i++)
 +		{
 +			if ((colors[i] != null) && isNaN(colors[i]))
 +			{
 +				var colorNumber:uint = getColorName(colors[i]);
 +				if (colorNumber != StyleManager.NOT_A_COLOR)
 +					colors[i] = colorNumber;
 +			}
 +		}
 +	}
 +	
 +	/**
 +	 *  Determines if a specified parameter is a valid style property. For example:
 +	 *
 +	 *  <pre>
 +	 *  trace(StyleManager.isValidStyleValue(myButton.getStyle("color")).toString());
 +	 *  </pre>
 +	 *
 +	 *  <p>This can be useful because some styles can be set to values
 +	 *  such as 0, <code>NaN</code>,
 +	 *  the empty String (<code>""</code>), or <code>null</code>, which can
 +	 *  cause an <code>if (value)</code> test to fail.</p>
 +	 *
 +	 *  @param value The style property to test.
 +	 *
 +	 *  @return If you pass the value returned by a <code>getStyle()</code> method call
 +	 *  to this method, it returns <code>true</code> if the style
 +	 *  was set and <code>false</code> if it was not set.
 +	 *
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function isValidStyleValue(value:*):Boolean
 +	{
 +		// By convention, we don't allow style values to be undefined,
 +		// so we can check for this as the "not set" value.
 +		if (value !== undefined)
 +			return true;
 +		
 +		if (parent)
 +			return parent.isValidStyleValue(value);
 +		
 +		return false;
 +	}
 +	
 +	/**
 +	 *  @private
 +	 */
 +	COMPILE::LATER
 +	public function loadStyleDeclarations(
 +		url:String, update:Boolean = true,
 +		trustContent:Boolean = false,
 +		applicationDomain:ApplicationDomain = null,
 +		securityDomain:SecurityDomain = null):
 +		IEventDispatcher
 +	{
 +		return loadStyleDeclarations2(url, update, applicationDomain, securityDomain);
 +	}
 +	
 +	/**
 +	 *  Loads a style SWF.
 +	 *
 +	 *  @param url Location of the style SWF.
 +	 *
 +	 *  @param update If true, all the DisplayList trees will be updated.
 +	 *         The default is true.
 +	 *
 +	 *  @return An IEventDispatcher implementation that supports
 +	 *          StyleEvent.PROGRESS, StyleEvent.COMPLETE, and
 +	 *          StyleEvent.ERROR.
 +	 *
 +	 *  @see flash.system.SecurityDomain
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	COMPILE::LATER
 +	public function loadStyleDeclarations2(
 +		url:String, update:Boolean = true,
 +		applicationDomain:ApplicationDomain = null,
 +		securityDomain:SecurityDomain = null):
 +		IEventDispatcher
 +	{
 +		var module:IModuleInfo = ModuleManager.getModule(url);
 +		var thisStyleManager:IStyleManager2 = this;
 +		
 +		var readyHandler:Function = function(moduleEvent:ModuleEvent):void
 +		{
 +			var styleModule:IStyleModule = IStyleModule(moduleEvent.module.factory.create());
 +			
 +			// Register the style module to use this style manager.
 +			moduleEvent.module.factory.registerImplementation("mx.styles::IStyleManager2", thisStyleManager);
 +			styleModule.setStyleDeclarations(thisStyleManager);
 +			styleModules[moduleEvent.module.url].styleModule = styleModule;
 +			if (update)
 +				styleDeclarationsChanged();
 +		};
 +		
 +		module.addEventListener(ModuleEvent.READY, readyHandler,
 +			false, 0, true);
 +		
 +		var styleEventDispatcher:StyleEventDispatcher =
 +			new StyleEventDispatcher(module);
 +		
 +		var errorHandler:Function = function(moduleEvent:ModuleEvent):void
 +		{
 +			var errorText:String = resourceManager.getString(
 +				"styles", "unableToLoad", [ moduleEvent.errorText, url ]);
 +			
 +			if (styleEventDispatcher.willTrigger(StyleEvent.ERROR))
 +			{
 +				var styleEvent:StyleEvent = new StyleEvent(
 +					StyleEvent.ERROR, moduleEvent.bubbles, moduleEvent.cancelable);
 +				styleEvent.bytesLoaded = 0;
 +				styleEvent.bytesTotal = 0;
 +				styleEvent.errorText = errorText;
 +				styleEventDispatcher.dispatchEvent(styleEvent);
 +			}
 +			else
 +			{
 +				throw new Error(errorText);
 +			}
 +		};
 +		
 +		module.addEventListener(ModuleEvent.ERROR, errorHandler,
 +			false, 0, true);
 +		
 +		styleModules[url] =
 +			new StyleModuleInfo(module, readyHandler, errorHandler);
 +		
 +		// This Timer gives the loadStyleDeclarations() caller a chance
 +		// to add event listeners to the return value, before the module
 +		// is loaded.
 +		var timer:Timer = new Timer(0);
 +		var timerHandler:Function = function(event:TimerEvent):void
 +		{
 +			timer.removeEventListener(TimerEvent.TIMER, timerHandler);
 +			timer.stop();
 +			module.load(applicationDomain, securityDomain, null, moduleFactory);
 +		};
 +		
 +		timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
 +		
 +		timer.start();
 +		
 +		return styleEventDispatcher;
 +	}
 +	
 +	/**
 +	 *  Unloads a style SWF.
 +	 *
 +	 *  @param url Location of the style SWF.
 +	 *
 +	 *  @param update If true, all the DisplayList trees will be updated.
 +	 *         The default is true.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	COMPILE::LATER
 +	public function unloadStyleDeclarations(
 +		url:String, update:Boolean = true):void
 +	{
 +		var styleModuleInfo:StyleModuleInfo = styleModules[url];
 +		if (styleModuleInfo)
 +		{
 +			styleModuleInfo.styleModule.unload();
 +			
 +			var module:IModuleInfo = styleModuleInfo.module;
 +			module.unload();
 +			
 +			module.removeEventListener(ModuleEvent.READY,
 +				styleModuleInfo.readyHandler);
 +			module.removeEventListener(ModuleEvent.ERROR,
 +				styleModuleInfo.errorHandler);
 +			
 +			styleModules[url] = null;
 +		}
 +		
 +		if (update)
 +			styleDeclarationsChanged();
 +	}
 +	
 +	
 +	/**
 +	 *  @private
 +	 */  
 +	private function dispatchInheritingStylesChangeEvent():void
 +	{
 +		var event:Event = new FlexChangeEvent(FlexChangeEvent.STYLE_MANAGER_CHANGE, 
 +			false, false, {property: "inheritingStyles"});
 +		dispatchEvent(event);
 +	}
 +	
 +	/**
 +	 *  @private
 +	 */  
 +	public function acceptMediaList(value:String):Boolean
 +	{
 +		if (!mqp)
 +		{
 +			mqp = MediaQueryParser.instance;
 +			if (!mqp)
 +			{
 +				mqp = new MediaQueryParser(moduleFactory);
 +				MediaQueryParser.instance = mqp;
 +			}
 +		}
 +		return mqp.parse(value);
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Event handlers
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	private function styleManagerChangeHandler(event:FlexChangeEvent):void
 +	{
 +		if (!event.data)
 +			return;     // invalid message
 +		
 +		var property:String = event.data["property"];
 +		
 +		if (property == "inheritingStyles")
 +		{
 +			mergedInheritingStylesCache = null;
 +		}
 +		
 +		if (hasEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE))
 +			dispatchEvent(event);
 +	}
 +}
 +	
 +}
 +
 +import org.apache.flex.events.EventDispatcher;
 +COMPILE::LATER
 +{
 +import mx.events.ModuleEvent;
 +import mx.events.StyleEvent;
 +import mx.modules.IModuleInfo;
 +import mx.styles.IStyleModule;
 +}
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: StyleEventDispatcher
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/**
 + *  @private
 + */
 +COMPILE::LATER
 +class StyleEventDispatcher extends EventDispatcher
 +{
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	/**
 +	 *  Constructor
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function StyleEventDispatcher(moduleInfo:IModuleInfo)
 +	{
 +		super();
 +		
 +		moduleInfo.addEventListener(
 +			ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
 +		
 +		moduleInfo.addEventListener(
 +			ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Event handlers
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private function moduleInfo_progressHandler(event:ModuleEvent):void
 +	{
 +		var styleEvent:StyleEvent = new StyleEvent(
 +			StyleEvent.PROGRESS, event.bubbles, event.cancelable);
 +		styleEvent.bytesLoaded = event.bytesLoaded;
 +		styleEvent.bytesTotal = event.bytesTotal;
 +		dispatchEvent(styleEvent);
 +	}
 +	
 +	/**
 +	 *  @private
 +	 */
 +	private function moduleInfo_readyHandler(event:ModuleEvent):void
 +	{
 +		var styleEvent:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
 +		styleEvent.bytesLoaded = event.bytesLoaded;
 +		styleEvent.bytesTotal = event.bytesTotal;
 +		dispatchEvent(styleEvent);
 +	}
 +}
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: StyleModuleInfo
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/**
 + *  @private
 + */
 +COMPILE::LATER
 +class StyleModuleInfo
 +{
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Constructor
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	/**
 +	 *  Constructor
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 */
 +	public function StyleModuleInfo(module:IModuleInfo,
 +									readyHandler:Function,
 +									errorHandler:Function)
 +	{
 +		super();
 +		
 +		this.module = module;
 +		this.readyHandler = readyHandler;
 +		this.errorHandler = errorHandler;
 +	}
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Properties
 +	//
 +	//--------------------------------------------------------------------------
 +	
 +	//----------------------------------
 +	//  errorHandler
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public var errorHandler:Function;
 +	
 +	//----------------------------------
 +	//  readyHandler
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public var readyHandler:Function;
 +	
 +	//----------------------------------
 +	//  styleModule
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public var styleModule:IStyleModule;
 +	
 +	//----------------------------------
 +	//  module
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	public var module:IModuleInfo
 +}
 +
 +class CSSClass
 +{
 +	public static const CSSSelector:int = 0;
 +	public static const CSSCondition:int = 1;
 +	public static const CSSStyleDeclaration:int = 2;
 +}
 +
 +class CSSFactory
 +{
 +	public static const DefaultFactory:int = 0;
 +	public static const Factory:int = 1;
 +	public static const Override:int = 2;
 +}
 +
 +class CSSDataType
 +{
 +	public static const Native:int = 0;
 +	public static const Definition:int = 1;
 +}


[30/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/states/AddItems.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/states/AddItems.as
index 3254346,0000000..b04e00e
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/states/AddItems.as
+++ b/frameworks/projects/MX/src/main/flex/mx/states/AddItems.as
@@@ -1,1205 -1,0 +1,1205 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.states 
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;			
 +}
 +import org.apache.flex.events.Event;
 +import org.apache.flex.events.IEventDispatcher;
 +
 +import mx.binding.BindingManager;
 +import mx.collections.IList;
 +import mx.core.ContainerCreationPolicy;
 +import mx.core.IChildList;
 +import mx.core.IDeferredContentOwner;
 +import mx.core.IMXMLObject;
 +import mx.core.ITransientDeferredInstance;
 +import mx.core.IUIComponent;
 +import org.apache.flex.core.IVisualElement;
 +import mx.core.IVisualElementContainer;
 +import mx.core.UIComponent;
 +
 +[DefaultProperty("itemsFactory")]
 +
 +/**
 + *  Documentation is not currently available.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +public class AddItems extends OverrideBase implements IMXMLObject 
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class Constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Documentation is not currently available.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public static const FIRST:String = "first";
 +
 +    /**
 +     *  Documentation is not currently available.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public static const LAST:String = "last";
 +
 +    /**
 +     *  Documentation is not currently available.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public static const BEFORE:String = "before";
 +
 +    /**
 +     *  Documentation is not currently available.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public static const AFTER:String = "after";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function AddItems()
 +    {
 +        super();
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    private var document:Object;	
 +    
 +    /**
 +     *  @private
 +     */
 +    private var added:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    private var startIndex:int;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var numAdded:int;
 +
 +    /**
 +     *  @private
 +     */
 +    private var instanceCreated:Boolean = false;
 +    
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //------------------------------------
 +    //  creationPolicy
 +    //------------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the creationPolicy property.
 +     */
 +    private var _creationPolicy:String = ContainerCreationPolicy.AUTO;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The creation policy for the items.
 +     *  This property determines when the <code>itemsFactory</code> will create 
 +     *  the instance of the items.
 +     *  Flex uses this property only if you specify an <code>itemsFactory</code> property.
 +     *  The following values are valid:
 +     * 
 +     *  <p></p>
 +     * <table class="innertable">
 +     *     <tr><th>Value</th><th>Meaning</th></tr>
 +     *     <tr><td><code>auto</code></td><td>(default)Create the instance the 
 +     *         first time it is needed.</td></tr>
 +     *     <tr><td><code>all</code></td><td>Create the instance when the 
 +     *         application started up.</td></tr>
 +     *     <tr><td><code>none</code></td><td>Do not automatically create the instance. 
 +     *         You must call the <code>createInstance()</code> method to create 
 +     *         the instance.</td></tr>
 +     * </table>
 +     *
 +     *  @default "auto"
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get creationPolicy():String
 +    {
 +        return _creationPolicy;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set creationPolicy(value:String):void
 +    {
 +        _creationPolicy = value;
 +
 +        if (_creationPolicy == ContainerCreationPolicy.ALL)
 +            createInstance();
 +    }
 +
 +    //------------------------------------
 +    //  destructionPolicy
 +    //------------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the destructionPolicy property.
 +     */
 +    private var _destructionPolicy:String = "never";
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The destruction policy for the items.
 +     *  This property determines when the <code>itemsFactory</code> will destroy
 +     *  the deferred instances it manages.  By default once instantiated, all
 +     *  instances are cached (destruction policy of 'never').
 +     *  Flex uses this property only if you specify an <code>itemsFactory</code> property.
 +     *  The following values are valid:
 +     * 
 +     *  <p></p>
 +     * <table class="innertable">
 +     *     <tr><th>Value</th><th>Meaning</th></tr>
 +     *     <tr><td><code>never</code></td><td>(default)Once created never destroy
 +     *        the instance.</td></tr>
 +     *     <tr><td><code>auto</code></td><td>Destroy the instance when the override
 +     *         no longer applies.</td></tr>
 +     * </table>
 +     *
 +     *  @default "never"
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get destructionPolicy():String
 +    {
 +        return _destructionPolicy;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set destructionPolicy(value:String):void
 +    {
 +        _destructionPolicy = value;
 +    }
 +    
 +    //------------------------------------
 +    //  destination
 +    //------------------------------------
 +
 +    /**
 +     *  The object relative to which the child is added. This property is used
 +     *  in conjunction with the <code>position</code> property. 
 +     *  This property is optional; if
 +     *  you omit it, Flex uses the immediate parent of the <code>State</code>
 +     *  object, that is, the component that has the <code>states</code>
 +     *  property, or <code>&lt;mx:states&gt;</code>tag that specifies the State
 +     *  object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var destination:Object;
 +    
 +    //------------------------------------
 +    //  items
 +    //------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the items property
 +     */
 +    private var _items:*;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *
 +     *  The items to be added.
 +     *  If you set this property, the items are created at app startup.
 +     *  Setting this property is equivalent to setting a <code>itemsFactory</code>
 +     *  property with a <code>creationPolicy</code> of <code>"all"</code>.
 +     *
 +     *  <p>Do not set this property if you set the <code>itemsFactory</code>
 +     *  property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get items():*
 +    {
 +        if (!_items && creationPolicy != ContainerCreationPolicy.NONE)
 +            createInstance();
 +
 +        return _items;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set items(value:*):void
 +    {
 +        _items = value;
 +    }
 +    
 +    //------------------------------------
 +    //  itemsDescriptor
 +    //------------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the itemsDescriptor property.
 +     */
 +    private var _itemsDescriptor:Array;
 +    
 +    [Inspectable(category="General")]
 +    
 +    /**
 +     *
 +     * The descriptor that describes the items. 
 +     *
 +     *  <p>If you set this property, the items are instantiated at the time
 +     *  determined by the <code>creationPolicy</code> property.</p>
 +     *  
 +     *  <p>Do not set this property if you set the <code>items</code>
 +     *  property.
 +     *  This propety is the <code>AddItems</code> class default property.
 +     *  Setting this property with a <code>creationPolicy</code> of "all"
 +     *  is equivalent to setting a <code>items</code> property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get itemsDescriptor():Array
 +    {
 +        return _itemsDescriptor;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set itemsDescriptor(value:Array):void
 +    {
 +        _itemsDescriptor = value;
 +        
 +        if (creationPolicy == ContainerCreationPolicy.ALL)
 +            createInstance();
 +    }
 +
 +    //------------------------------------
 +    //  itemsFactory
 +    //------------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the itemsFactory property.
 +     */
 +    private var _itemsFactory:ITransientDeferredInstance;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *
 +     * The factory that creates the items. 
 +     *
 +     *  <p>If you set this property, the items are instantiated at the time
 +     *  determined by the <code>creationPolicy</code> property.</p>
 +     *  
 +     *  <p>Do not set this property if you set the <code>items</code>
 +     *  property.
 +     *  This propety is the <code>AddItems</code> class default property.
 +     *  Setting this property with a <code>creationPolicy</code> of "all"
 +     *  is equivalent to setting a <code>items</code> property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get itemsFactory():ITransientDeferredInstance
 +    {
 +        return _itemsFactory;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set itemsFactory(value:ITransientDeferredInstance):void
 +    {
 +        _itemsFactory = value;
 +
 +        if (creationPolicy == ContainerCreationPolicy.ALL)
 +            createInstance();
 +    }
 +
 +    //------------------------------------
 +    //  position
 +    //------------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The position of the child in the display list, relative to the
 +     *  object specified by the <code>relativeTo</code> property.
 +     *
 +     *  @default AddItems.LAST
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var position:String = AddItems.LAST;
 +
 +    //------------------------------------
 +    //  isStyle
 +    //------------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  Denotes whether or not the collection represented by the 
 +     *  target property is a style.
 +     *
 +     *  @default false
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var isStyle:Boolean = false;
 +    
 +    //------------------------------------
 +    //  isArray
 +    //------------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  Denotes whether or not the collection represented by the 
 +     *  target property is to be treated as a single array instance
 +     *  instead of a collection of items (the default).
 +     *
 +     *  @default false
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var isArray:Boolean = false;
 +
 +    //------------------------------------
 +    //  vectorClass
 +    //------------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  When the collection represented by the target property is a
 +     *  Vector, vectorClass is the type of the target.  It is used to
 +     *  initialize the target property.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4.5
 +     */
 +    public var vectorClass:Class;
 +    
 +    //------------------------------------
 +    //  propertyName
 +    //------------------------------------
 +    
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The name of the Array property that is being modified. If the <code>destination</code>
 +     *  property is a Group or Container, this property is optional. If not defined, the
 +     *  items will be added as children of the Group/Container.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var propertyName:String;
 +    
 +    //------------------------------------
 +    //  relativeTo
 +    //------------------------------------
 +    
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The object relative to which the child is added. This property is only
 +     *  used when the <code>position</code> property is <code>AddItems.BEFORE</code>
 +     *  or <code>AddItems.AFTER</code>. 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public var relativeTo:Object;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Creates the items instance from the factory.
 +     *  You must use this method only if you specify a <code>targetItems</code>
 +     *  property and a <code>creationPolicy</code> value of <code>"none"</code>.
 +     *  Flex automatically calls this method if the <code>creationPolicy</code>
 +     *  property value is <code>"auto"</code> or <code>"all"</code>.
 +     *  If you call this method multiple times, the items instance is
 +     *  created only on the first call.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function createInstance():void
 +    {
 +        if (!instanceCreated && !_items && itemsFactory && !_itemsDescriptor)
 +        {
 +            instanceCreated = true;
 +            items = itemsFactory.getInstance();
 +        }
 +        else if (!instanceCreated && !_items && !itemsFactory && _itemsDescriptor)
 +        {
 +            instanceCreated = true;
 +            items = generateMXMLArray(document, itemsDescriptor, false);
 +        }
 +    }
 +    
 +	protected function generateMXMLObject(document:Object, data:Array):Object
 +	{
 +		var i:int = 0;
 +		var cls:Class = data[i++];
 +		var comp:Object = new cls();
 +		
 +		var m:int;
 +		var j:int;
 +		var name:String;
 +		var simple:*;
 +		var value:Object;
 +		var id:String;
 +		
 +		m = data[i++]; // num props
 +		for (j = 0; j < m; j++)
 +		{
 +			name = data[i++];
 +			simple = data[i++];
 +			value = data[i++];
 +			if (simple === null)
 +				value = generateMXMLArray(document, value as Array);
 +			else if (simple === undefined)
 +				value = generateMXMLVector(document, value as Array);
 +			else if (simple == false)
 +				value = generateMXMLObject(document, value as Array);
 +			if (name == "id")
 +			{
 +				document[value] = comp;
 +				id = value as String;
 +				if (comp is IMXMLObject)
 +					continue;  // skip assigment to comp
 +				if (!("id" in comp))
 +					continue;
 +			}
 +			else if (name == "_id")
 +			{
 +				document[value] = comp;
 +				id = value as String;
 +				continue; // skip assignment to comp
 +			}
 +			comp[name] = value;
 +		}
 +		m = data[i++]; // num styles
 +		for (j = 0; j < m; j++)
 +		{
 +			name = data[i++];
 +			simple = data[i++];
 +			value = data[i++];
 +			if (simple == null)
 +				value = generateMXMLArray(document, value as Array);
 +			else if (simple == false)
 +				value = generateMXMLObject(document, value as Array);
 +			comp.setStyle(name, value);
 +		}
 +		
 +		m = data[i++]; // num effects
 +		for (j = 0; j < m; j++)
 +		{
 +			name = data[i++];
 +			simple = data[i++];
 +			value = data[i++];
 +			if (simple == null)
 +				value = generateMXMLArray(document, value as Array);
 +			else if (simple == false)
 +				value = generateMXMLObject(document, value as Array);
 +			comp.setStyle(name, value);
 +		}
 +		
 +		m = data[i++]; // num events
 +		for (j = 0; j < m; j++)
 +		{
 +			name = data[i++];
 +			value = data[i++];
 +			comp.addEventListener(name, value);
 +		}
 +		
 +		if (comp is IUIComponent)
 +		{
 +			if (comp.document == null)
 +				comp.document = document;
 +		}
 +		var children:Array = data[i++];
 +		if (children)
 +		{
 +			comp.generateMXMLInstances(document, children);
 +		}
 +		
 +		if (id)
 +		{
 +			document[id] = comp;
 +			mx.binding.BindingManager.executeBindings(document, id, comp); 
 +		}
 +		if (comp is IMXMLObject)
 +			comp.initialized(document, id);
 +		return comp;
 +	}
 +	
 +	public function generateMXMLVector(document:Object, data:Array, recursive:Boolean = true):*
 +	{
 +		var comps:Array;
 +		
 +		var n:int = data.length;
 +		var hint:* = data.shift();
 +		var generatorFunction:Function = data.shift();
 +		comps = generateMXMLArray(document, data, recursive);
 +		return generatorFunction(comps);
 +	}
 +	
 +	public function generateMXMLArray(document:Object, data:Array, recursive:Boolean = true):Array
 +	{
 +		var comps:Array = [];
 +		
 +		var n:int = data.length;
 +		var i:int = 0;
 +		while (i < n)
 +		{
 +			var cls:Class = data[i++];
 +			var comp:Object = new cls();
 +			
 +			var m:int;
 +			var j:int;
 +			var name:String;
 +			var simple:*;
 +			var value:Object;
 +			var id:String = null;
 +			
 +			m = data[i++]; // num props
 +			for (j = 0; j < m; j++)
 +			{
 +				name = data[i++];
 +				simple = data[i++];
 +				value = data[i++];
 +				if (simple === null)
 +					value = generateMXMLArray(document, value as Array, recursive);
 +				else if (simple === undefined)
 +					value = generateMXMLVector(document, value as Array, recursive);
 +				else if (simple == false)
 +					value = generateMXMLObject(document, value as Array);
 +				if (name == "id")
 +				{
 +					document[value] = comp;
 +					id = value as String;
 +					if (comp is IMXMLObject)
 +						continue;  // skip assigment to comp
 +					try {
 +						if (!("id" in comp))
 +							continue;
 +					}
 +					catch (e:Error)
 +					{
 +						continue; // proxy subclasses might throw here
 +					}
 +				}
 +				if (name == "document" && !comp.document)
 +					comp.document = document;
 +				else if (name == "_id")
 +					id = value as String; // and don't assign to comp
 +				else
 +					comp[name] = value;
 +			}
 +			m = data[i++]; // num styles
 +			for (j = 0; j < m; j++)
 +			{
 +				name = data[i++];
 +				simple = data[i++];
 +				value = data[i++];
 +				if (simple == null)
 +					value = generateMXMLArray(document, value as Array, recursive);
 +				else if (simple == false)
 +					value = generateMXMLObject(document, value as Array);
 +				comp.setStyle(name, value);
 +			}
 +			
 +			m = data[i++]; // num effects
 +			for (j = 0; j < m; j++)
 +			{
 +				name = data[i++];
 +				simple = data[i++];
 +				value = data[i++];
 +				if (simple == null)
 +					value = generateMXMLArray(document, value as Array, recursive);
 +				else if (simple == false)
 +					value = generateMXMLObject(document, value as Array);
 +				comp.setStyle(name, value);
 +			}
 +			
 +			m = data[i++]; // num events
 +			for (j = 0; j < m; j++)
 +			{
 +				name = data[i++];
 +				value = data[i++];
 +				comp.addEventListener(name, value);
 +			}
 +			
 +			if (comp is IUIComponent)
 +			{
 +				if (comp.document == null)
 +					comp.document = document;
 +			}
 +			var children:Array = data[i++];
 +			if (children)
 +			{
 +				if (recursive)
 +					comp.generateMXMLInstances(document, children, recursive);
 +				else
 +					comp.setMXMLDescriptor(children);
 +			}
 +			
 +			if (id)
 +			{
 +				document[id] = comp;
 +				mx.binding.BindingManager.executeBindings(document, id, comp); 
 +			}
 +			if (comp is IMXMLObject)
 +				comp.initialized(document, id);
 +			comps.push(comp);
 +		}
 +		return comps;
 +	}
 + 
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    override public function initialize():void
 +    {
 +        if (creationPolicy == ContainerCreationPolicy.AUTO)
 +            createInstance();
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    override public function apply(parent:UIComponent):void
 +    {
 +        var dest:* = getOverrideContext(destination, parent);
 +        var localItems:Array;
 +        
 +        added = false;
 +        parentContext = parent;
 +        
 +        // Early exit if destination is null.
 +        if (!dest)
 +        {
 +            if (destination != null && !applied)
 +            {
 +                // Our destination context is unavailable so we attempt to register
 +                // a listener on our parent document to detect when/if it becomes
 +                // valid.
 +                addContextListener(destination);
 +            }
 +            applied = true;
 +            return;
 +        }
 +
 +        applied = true;
 +        destination = dest;
 +        
 +        // Coerce to array if not already an array, or we wish
 +        // to treat the array as *the* item to add (isArray == true)
 +        if (items is Array && !isArray)
 +            localItems = items;
 +        else
 +            localItems = [items];
 +        
 +        switch (position)
 +        {
 +            case FIRST:
 +                startIndex = 0;
 +                break;
 +            case LAST:
 +                startIndex = -1;
 +                break;
 +            case BEFORE:
 +                startIndex = getRelatedIndex(parent, dest);
 +                break;
 +            case AFTER:
 +                startIndex = getRelatedIndex(parent, dest) + 1;
 +                break;
 +        }    
 +        
 +        if ( (propertyName == null || propertyName == "mxmlContent") && (dest is IVisualElementContainer))
 +        {
 +            if (!addItemsToContentHolder(dest as IVisualElementContainer, localItems))
 +                return;
 +        }
 +        else if (propertyName == null && dest is IChildList)
 +        {
 +            addItemsToContainer(dest as IChildList, localItems);
 +        }
 +        else if (propertyName != null && !isStyle && dest[propertyName] is IList)
 +        {
 +            addItemsToIList(dest[propertyName], localItems);
 +        }
 +        else if (vectorClass)
 +        {
 +            addItemsToVector(dest, propertyName, localItems);
 +        }
 +        else
 +        {
 +            addItemsToArray(dest, propertyName, localItems);
 +        }
 +        
 +        added = true;
 +        numAdded = localItems.length;
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    override public function remove(parent:UIComponent):void
 +    {
 +        var dest:* = getOverrideContext(destination, parent);
 +        var localItems:Array;
 +        var i:int;
 +        
 +        if (!added)
 +        {
 +            if (dest == null)
 +            {
 +                // It seems our override is no longer active, but we were never
 +                // able to successfully apply ourselves, so remove our context
 +                // listener if applicable.
 +                removeContextListener();
 +            }
 +            else if (_waitingForDeferredContent)
 +            {
 +                // Or we were waiting around for deferred content of our target
 +                // to be created and it never happened, so we'll stop listening
 +                // for now.
 +                removeCreationCompleteListener();
 +            }
 +            applied = false;
 +            parentContext = null;
 +            return;
 +        }
 +                    
 +        // Coerce to array if not already an array, or we wish
 +        // to treat the array as *the* item to add (isArray == true)
 +        if (items is Array && !isArray)
 +            localItems = items;
 +        else
 +            localItems = [items];
 +             
 +        if ((propertyName == null || propertyName == "mxmlContent") && (dest is IVisualElementContainer))
 +        {
 +            for (i = 0; i < numAdded; i++)
 +            {
 +                if (IVisualElementContainer(dest).numElements > startIndex)
 +                    IVisualElementContainer(dest).removeElementAt(startIndex);
 +            }
 +        }
 +        else if (propertyName == null && dest is IChildList)
 +        {
 +            for (i = 0; i < numAdded; i++)
 +            {
 +                if (IChildList(dest).numChildren > startIndex)
 +                    IChildList(dest).removeChildAt(startIndex);
 +            }
 +        }
 +        else if (propertyName != null && !isStyle && dest[propertyName] is IList)
 +        {
 +            removeItemsFromIList(dest[propertyName] as IList);
 +        }
 +        else if (vectorClass)
 +        {
 +            var tempVector:Object = isStyle ? dest.getStyle(propertyName) : dest[propertyName];
 +                
 +            if (numAdded < tempVector.length) 
 +            {
 +                tempVector.splice(startIndex, numAdded);
 +                assign(dest, propertyName, tempVector);
 +            } 
 +            else
 +            {
 +                // For destinations like ArrayCollection we don't want to 
 +                // affect the vector in-place in some cases, as ListCollectionView a
 +                // attempts to compare the "before" and "after" state of the vector
 +                assign(dest, propertyName, new vectorClass());
 +            }      
 +        }
 +        else
 +        {
 +            var tempArray:Array = isStyle ? dest.getStyle(propertyName) : dest[propertyName];
 +                
 +            if (numAdded < tempArray.length) 
 +            {
 +                tempArray.splice(startIndex, numAdded);
 +                assign(dest, propertyName, tempArray);
 +            } 
 +            else
 +            {
 +                // For destinations like ArrayCollection we don't want to 
 +                // affect the array in-place in some cases, as ListCollectionView a
 +                // attempts to compare the "before" and "after" state of the array
 +                assign(dest, propertyName, []);
 +            }      
 +        }
 +        
 +        if (destructionPolicy == "auto")
 +            destroyInstance();
 +            
 +        // Clear our flags and override context.
 +        added = false;
 +        applied = false;
 +        parentContext = null;
 +    }
 +       
 +    /**
 +     *  @private
 +     */
 +    private function destroyInstance():void
 +    {
 +        if (_itemsFactory)
 +        {
 +            instanceCreated = false;
 +            items = null;
 +            _itemsFactory.reset();
 +        }
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    protected function getObjectIndex(object:Object, dest:Object):int
 +    {
 +        try
 +        {
 +            if ((propertyName == null || propertyName == "mxmlContent") && (dest is IVisualElementContainer))
 +                return IVisualElementContainer(dest).getElementIndex(object as IVisualElement);
 +            
 +            if (propertyName == null && dest is IChildList)
 +                return IChildList(dest).getChildIndex(DisplayObject(object));
 +    
 +            if (propertyName != null && !isStyle && dest[propertyName] is IList)
 +                return IList(dest[propertyName].list).getItemIndex(object);
 +                
 +            if (propertyName != null && isStyle)
 +                return dest.getStyle(propertyName).indexOf(object);
 +            
 +            return dest[propertyName].indexOf(object);
 +        }
 +        catch(e:Error) {}
 +        return -1;
 +    }
 +  
 +    /**
 +     * @private 
 +     * Find the index of the relative object. If relativeTo is an array,
 +     * search for the first valid item's index.  This is used for stateful
 +     * documents where one or more relative siblings of the newly inserted
 +     * item may not be realized within the current state.
 +     */
 +    protected function getRelatedIndex(parent:UIComponent, dest:Object):int
 +    {
 +        var index:int = -1;
 +        if (relativeTo is Array)
 +        {
 +            for (var i:int = 0; ((i < relativeTo.length) && index < 0); i++)
 +            { 
 +                var relativeObject:Object = getOverrideContext(relativeTo[i], parent);
 +                index = getObjectIndex(relativeObject, dest);
 +            }
 +        }
 +        else
 +        {
 +            relativeObject = getOverrideContext(relativeTo, parent);
 +            index = getObjectIndex(relativeObject, dest);
 +        }
 +        return index;
 +    }
 +    
 +    private var _waitingForDeferredContent:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     */
 +    protected function addItemsToContentHolder(dest:IVisualElementContainer, items:Array):Boolean
 +    {
 +        // If we are being asked to add more children to a deferred content owner,
 +        // but the deferred content has yet to be created, we will defer application
 +        // until it is safe to do so.
 +        if (dest is IDeferredContentOwner && dest is IEventDispatcher)
 +        {
 +            var dco:IDeferredContentOwner= dest as IDeferredContentOwner;
 +            if (!dco.deferredContentCreated)
 +            {
 +                IEventDispatcher(dest).addEventListener("contentCreationComplete", onDestinationContentCreated);
 +                _waitingForDeferredContent = true;
 +                return false;
 +            }            
 +        }
 +        
 +        if (startIndex == -1)
 +            startIndex = dest.numElements;
 +        
 +        for (var i:int = 0; i < items.length; i++)
 +            dest.addElementAt(items[i], startIndex + i);
 +        
 +        return true;
 +    }
 +       
 +    /**
 +     *  @private
 +     */
 +    protected function addItemsToContainer(dest:IChildList, items:Array):void
 +    {
 +        if (startIndex == -1)
 +            startIndex = dest.numChildren;
 +        
 +        for (var i:int = 0; i < items.length; i++)
 +            dest.addChildAt(items[i], startIndex + i);
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    protected function addItemsToArray(dest:Object, propertyName:String, items:Array):void
 +    {
 +        var tempArray:Array = isStyle ? dest.getStyle(propertyName) : dest[propertyName];
 +        
 +        if (!tempArray)
 +            tempArray = [];
 +        
 +        if (startIndex == -1)
 +            startIndex = tempArray.length;
 +        
 +        for (var i:int  = 0; i < items.length; i++) 
 +            tempArray.splice(startIndex + i, 0, items[i]);
 +        
 +        assign(dest, propertyName, tempArray);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    protected function addItemsToVector(dest:Object, propertyName:String, items:Array):void
 +    {
 +        var tempVector:Object = isStyle ? dest.getStyle(propertyName) : dest[propertyName];
 +        
 +        if (!tempVector)
 +            tempVector = new vectorClass();
 +        
 +        if (startIndex == -1)
 +            startIndex = tempVector.length;
 +        
 +        for (var i:int  = 0; i < items.length; i++) 
 +            tempVector.splice(startIndex + i, 0, items[i]);
 +        
 +        assign(dest, propertyName, tempVector);
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    protected function addItemsToIList(list:IList, items:Array):void
 +    {       
 +        if (startIndex == -1)
 +            startIndex = list.length;
 +        
 +        for (var i:int = 0; i < items.length; i++)
 +            list.addItemAt(items[i], startIndex + i);   
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    protected function removeItemsFromIList(list:IList):void
 +    {
 +        for (var i:int = 0; i < numAdded; i++)
 +            list.removeItemAt(startIndex);
 +        
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    protected function assign(dest:Object, propertyName:String, value:Object):void
 +    {
 +        if (isStyle)
 +        {
 +            dest.setStyle(propertyName, value);
 +            dest.styleChanged(propertyName);
 +            dest.notifyStyleChangeInChildren(propertyName, true);
 +        }
 +        else
 +        {
 +            dest[propertyName] = value;
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  We've detected that our IDeferredContentOwnder target has created its
 +     *  content, so it's safe to apply our override content now.
 +     */
 +    private function onDestinationContentCreated(e:Event):void
 +    {
 +        if (parentContext)
 +        {
 +            removeCreationCompleteListener();
 +            apply(parentContext);
 +        }   
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Remove our contentCreationComplete listener.
 +     */
 +    private function removeCreationCompleteListener():void
 +    {
 +        if (parentContext)
 +        {
 +            parentContext.removeEventListener("contentCreationComplete", onDestinationContentCreated);
 +            _waitingForDeferredContent = false;
 +        }   
 +    }
 +    
 +    /**
 +     *  IMXMLObject support
 +     */
 +    public function initialized(document:Object, id:String):void
 +    {
 +        this.document = document;
 +    }
 +    
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/states/InterruptionBehavior.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/states/InterruptionBehavior.as
index 642f006,0000000..f44d8a9
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/states/InterruptionBehavior.as
+++ b/frameworks/projects/MX/src/main/flex/mx/states/InterruptionBehavior.as
@@@ -1,62 -1,0 +1,62 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.states
 +{
 +    /**
 +     *  The InterruptionBehavior class defines constants for use with the 
 +     *  <code>interruptionBehavior</code> property of the mx.states.Transition class.
 +     * 
 +     *  @see Transition#interruptionBehavior
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10.2
 +     *  @playerversion AIR 2.5
 +     *  @productversion Flex 4.5
 +     */
 +    public final class InterruptionBehavior
 +    {
 +        /**
 +         *  Specifies that a transition that interrupts another running
 +         *  transition ends that other transition before starting.
 +         *  The transition ends by calling the <code>end()</code> method 
 +         *  on all effects in the transition.
 +         *  The <code>end()</code> method causes all effects 
 +         *  to snap to their end state.
 +         *
 +         *  @langversion 3.0
 +         *  @playerversion Flash 10.2
 +         *  @playerversion AIR 2.5
 +         *  @productversion Flex 4.5
 +         */
 +        public static const END:String = "end";
 +        
 +        /**
 +         *  Specifies that a transition that interrupts another running
 +         *  transition stops that other transition in place before starting.
 +         *  The transition stops by calling the <code>stop()</code> method 
 +         *  on all effects in the transition.
 +         *
 +         *  @langversion 3.0
 +         *  @playerversion Flash 10.2
 +         *  @playerversion AIR 2.5
 +         *  @productversion Flex 4.5
 +         */
 +        public static const STOP:String = "stop";
 +    }
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/states/OverrideBase.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/states/OverrideBase.as
index b34ad52,0000000..702b261
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/states/OverrideBase.as
+++ b/frameworks/projects/MX/src/main/flex/mx/states/OverrideBase.as
@@@ -1,222 -1,0 +1,222 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.states
 +{
 +    
 +import mx.binding.BindingManager;
 +import mx.core.UIComponent;
 +import mx.core.mx_internal;
 +import mx.events.PropertyChangeEvent;
 +import mx.utils.OnDemandEventDispatcher;
 +
 +/**
 + *  The OverrideBase class is the base class for the 
 + *  override classes used by view states. 
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class OverrideBase extends OnDemandEventDispatcher implements IOverride
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function OverrideBase() {}
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Flag which tracks if we're actively overriding a property.
 +     */
 +    protected var applied:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     *  Our most recent parent context.
 +     */
 +    protected var parentContext:UIComponent;
 +    
 +    /**
 +     *  @private
 +     */  
 +    private var targetProperty:String;
 +    
 +    /**
 +     *  @private
 +     *  Specifies whether or not a property-centric 
 +     *  state override's base value is data bound.
 +     *  
 +     *  This value is intended for use by the MXML 
 +     *  compiler only.
 +     */
 +    public var isBaseValueDataBound:Boolean;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    /**
 +     *  IOverride interface method; this class implements it as an empty method.
 +     * 
 +     *  @copy IOverride#initialize()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function initialize():void {}
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function apply(parent:UIComponent):void {}
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function remove(parent:UIComponent):void {}
 +    
 +    /**
 +     * @private 
 +     * Initialize this object from a descriptor.
 +     */
 +    public function initializeFromObject(properties:Object):Object
 +    {
 +        for (var p:String in properties)
 +        {
 +            this[p] = properties[p];
 +        }
 +        
 +        return Object(this);
 +    }
 +    
 +    /**
 +     * @private
 +     * @param parent The document level context for this override.
 +     * @param target The component level context for this override.
 +     */
 +    protected function getOverrideContext(target:Object, parent:UIComponent):Object
 +    {
 +        if (target == null)
 +            return parent;
 +    
 +        if (target is String)
 +            return parent[target];
 +    
 +        return target;
 +    }
 + 
 +    /**
 +     * @private
 +     * If the target of our override is a String (representing a property), 
 +     * we register a PROPERTY_CHANGE listener to determine when/if our target 
 +     * context becomes available or changes.  
 +     */ 
 +    protected function addContextListener(target:Object):void
 +    {
 +        if (target is String && parentContext != null)
 +        {
 +            targetProperty = target as String;
 +            parentContext.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
 +                context_propertyChangeHandler);
 +        }
 +    }
 +    
 +    /**
 +     * @private
 +     * Unregister our PROPERTY_CHANGE listener.
 +     */ 
 +    protected function removeContextListener():void
 +    {
 +        if (parentContext != null)
 +        {
 +            parentContext.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
 +                context_propertyChangeHandler);
 +        }
 +    }
 +    
 +    /**
 +     * @private
 +     * Called when our target context is set.  We re-apply our override
 +     * if appropriate.
 +     */
 +    protected function context_propertyChangeHandler(event:PropertyChangeEvent):void
 +    {
 +        if (event.property == targetProperty && event.newValue != null)
 +        {
 +            apply(parentContext);
 +            removeContextListener();
 +        }
 +    }
 +    
 +    /**
 +     * @private 
 +     * Disables or enables binding associated with a property override.
 +     */
 +    protected function enableBindings(target:Object, parent:UIComponent, property:String, enable:Boolean=true):void
 +    {
 +        if (isBaseValueDataBound && target && parent && property)
 +        {
 +            var document:Object = target.hasOwnProperty("document") ? target.document : null;
 +            document = !document && parent.hasOwnProperty("document") ? parent.document : document;
 +            
 +            var name:String = target.hasOwnProperty("id") ? target.id : null;
 +            name = !name && target.hasOwnProperty("name") ? target.name : name;
 +            
 +            if (document && name)
 +            {
 +                var root:String = (document == target) ? "this" : name;
 +                BindingManager.enableBindings(document, root + "." + property, enable);
 +            }
 +        }
 +    }
 +}
 +
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/states/RemoveChild.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/states/RemoveChild.as
index c98b88a,0000000..9a6f7fa
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/states/RemoveChild.as
+++ b/frameworks/projects/MX/src/main/flex/mx/states/RemoveChild.as
@@@ -1,218 -1,0 +1,218 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.states
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;		
 +}
 +
 +import mx.core.UIComponent;
 +import mx.core.mx_internal;
 +
 +use namespace mx_internal;
 +
 +/**
 + *
 + *  The RemoveChild class removes a child display object, such as a component, 
 + *  from a container as part of a view state.
 + *  The child is only removed from the display list, it is not deleted.
 + *  You use this class in the <code>overrides</code> property of the State class.
 + *
 + *  @mxml
 + *
 + *  <p>The <code>&lt;mx:RemoveChild&gt;</code> tag
 + *  has the following attributes:</p>
 + *  
 + *  <pre>
 + *  &lt;mx:RemoveChild
 + *  <b>Properties</b>
 + *  target="null"
 + *  /&gt;
 + *  </pre>
 + *
 + *  @see mx.states.State
 + *  @see mx.states.AddChild
 + *  @see mx.states.Transition
 + *  @see mx.effects.RemoveChildAction
 + *
 + *  @includeExample examples/StatesExample.mxml
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class RemoveChild extends OverrideBase 
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @param target The child to remove from the view.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function RemoveChild(target:DisplayObject = null)
 +    {
 +        super();
 +
 +        this.target = target;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Parent of the removed child.
 +     */
 +    private var oldParent:DisplayObjectContainer;
 +
 +    /**
 +     *  @private
 +     *  Index of the removed child.
 +     */
 +    private var oldIndex:int;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var removed:Boolean;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  target
 +    //----------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The child to remove from the view.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var target:Object;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function apply(parent:UIComponent):void
 +    {
 +        parentContext = parent;
 +        removed = false;
 +        
 +        var obj:* = getOverrideContext(target, parent);
 +        if ((obj is DisplayObject) && obj.parent)
 +        {
 +            oldParent = obj.parent;
 +            oldIndex = oldParent.getChildIndex(obj);
 +            oldParent.removeChild(obj);
 +            removed = true;
 +        }
 +        else if (obj == null && !applied)
 +        {
 +            // Our target context is unavailable so we attempt to register
 +            // a listener on our parent document to detect when/if it becomes
 +            // valid.
 +            addContextListener(target); 
 +        }
 +        
 +        // Save state in case our value or target is changed while applied. This
 +        // can occur when our value property is databound or when a target is 
 +        // deferred instantiated.
 +        applied = true;
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function remove(parent:UIComponent):void
 +    {        
 +        var obj:* = getOverrideContext(target, parent);     
 +        if (removed && (obj is DisplayObject))
 +        {
 +            oldParent.addChildAt(obj, oldIndex);
 +
 +            // Make sure any changes made while the child was removed are reflected
 +            // properly.
 +            if (obj is UIComponent)
 +                UIComponent(target).updateCallbacks();
 +
 +            removed = false;
 +        }
 +        else if (obj == null)
 +        {
 +            // It seems our override is no longer active, but we were never
 +            // able to successfully apply ourselves, so remove our context
 +            // listener if applicable.
 +            removeContextListener();
 +        }
 +        
 +        // Clear our flags and override context.
 +        applied = false;
 +        parentContext = null;
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
index 531b6e1,0000000..757c303
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
+++ b/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
@@@ -1,407 -1,0 +1,407 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.states
 +{
 +
 +import org.apache.flex.events.EventDispatcher;
 +import flash.utils.Dictionary;
 +import mx.core.ComponentDescriptor;
 +import mx.core.UIComponent;
 +import mx.states.OverrideBase;
 +import mx.core.IStateClient2;
 +
 +/**
 + *  The event handler function to execute in response to the event that is
 + *  specified by the <code>name</code> property. 
 + *
 + *  <p>Do not specify the <code>handler</code> property and the <code>handlerFunction</code>
 + *  property in a single <code>&lt;mx:SetEventHandler&gt;</code> tag.</p>
 + *
 + *  <p>Flex does <i>not</i> dispatch a <code>handler</code> event.
 + *  You use the <code>handler</code> key word only as an MXML attribte. 
 + *  When you use the <code>handler</code> handler attribute, you can specify a 
 + *  method that takes multiple parameters, not just the Event object;
 + *  also, you can specify the handler code in-line in the MXML tag.</p>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="handler", type="Object")]
 +
 +/**
 + *  The SetEventHandler class specifies an event handler that is active 
 + *  only during a particular view state.
 + *  For example, you might define a Button control that uses one event handler 
 + *  in the base view state, but uses a different event handler when you change view state.
 + *
 + *  <p> You use this class in the <code>overrides</code> property of the State class.</p>
 + *
 + *  @mxml
 + *
 + *  <p>The <code>&lt;mx:SetEventHanlder&gt;</code> tag
 + *  has the following attributes:</p>
 + *  
 + *  <pre>
 + *  &lt;mx:SetEventHandler
 + *  <b>Properties</b>
 + *  name="null"
 + *  handlerFunction="null"
 + *  target="null"
 + *  
 + *  <b>Events</b>
 + *  handler=<i>No default</i>
 + *  /&gt;
 + *  </pre>
 + *
 + *  @see mx.states.State
 + *  @see mx.states.SetProperty
 + *  @see mx.states.SetStyle
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class SetEventHandler extends OverrideBase
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @param target The object that dispatches the event to be handled.
 +     *  By default, Flex uses the immediate parent of the State object.
 +     *
 +     *  @param event The event type for which to set the handler.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function SetEventHandler(
 +            target:EventDispatcher = null,
 +            name:String = null)
 +    {
 +        super();
 +
 +        this.target = target;
 +        this.name = name;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the old event handler value.
 +     */
 +    private var oldHandlerFunction:Function;
 +
 +    /**
 +     *  @private
 +     *  Dictionary of installed event handlers.
 +     */
 +	COMPILE::LATER
 +    private static var installedHandlers:Dictionary;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  name
 +    //----------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The name of the event whose handler is being set.
 +     *  You must set this property, either in 
 +     *  the SetEventHandler constructor or by setting
 +     *  the property value directly.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var name:String;
 +
 +    /**
 +     *  The handler function for the event.
 +     *  This property is intended for developers who use ActionScript to
 +     *  create and access view states.
 +     *  In MXML, you can use the equivalent <code>handler</code>
 +     *  event attribute; do not use both in a single MXML tag.
 +     *  
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var handlerFunction:Function;
 +    
 +    /**
 +     *  The handler function to remove prior to applying our override.
 +     *  
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4.5
 +     */
 +    public var originalHandlerFunction:Function;
 +
 +    //----------------------------------
 +    //  target
 +    //----------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The component that dispatches the event.
 +     *  If the property value is <code>null</code>, Flex uses the
 +     *  immediate parent of the <code>&lt;mx:states&gt;</code> tag.
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var target:Object;
 +
 +    /**
 +     *  The cached target for which we applied our override.
 +     *  We keep track of the applied target while applied since
 +     *  our target may be swapped out in the owning document and 
 +     *  we want to make sure we roll back the correct (original) 
 +     *  element. 
 +     *
 +     *  @private
 +     */
 +    private var appliedTarget:Object;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: EventDispatcher
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override public function addEventListener(
 +                                    type:String, listener:Function,
 +                                    useCapture:Boolean = false,
 +                                    priority:int = 0,
 +                                    useWeakReference:Boolean = false):void
 +	{
 +		if (type == "handler")
 +			handlerFunction = listener;
 +		
 +		super.addEventListener(type, listener, useCapture,
 +			priority, useWeakReference);
 +	}
 +	
 +	COMPILE::JS
 +	override public function addEventListener(
 +		type:String, listener:Function,
 +		useCapture:Boolean = false, handlerScope:Object = null):void
 +   {
 +        if (type == "handler")
 +            handlerFunction = listener;
 +
 +        super.addEventListener(type, listener, useCapture);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function apply(parent:UIComponent):void
 +    {
 +        parentContext = parent;
 +        var obj:* = getOverrideContext(target, parent);
 +        if (obj != null)
 +        {
 +            appliedTarget = obj;
 +            var uiObj:UIComponent = obj as UIComponent;
 +    
 +			COMPILE::LATER
 +			{
 +            if (!installedHandlers)
 +                installedHandlers = new Dictionary(true);
 +                
 +            // Remember the current handler so it can be restored
 +            if (installedHandlers[obj] && installedHandlers[obj][name])
 +            {
 +                oldHandlerFunction = installedHandlers[obj][name];
 +                obj.removeEventListener(name, oldHandlerFunction);
 +            }
 +            else if (originalHandlerFunction != null)
 +            {
 +                oldHandlerFunction = originalHandlerFunction;
 +                obj.removeEventListener(name, oldHandlerFunction);   
 +            }
 +            else if (uiObj && uiObj.descriptor)
 +            {
 +                var descriptor:ComponentDescriptor = uiObj.descriptor;
 +    
 +                if (descriptor.events && descriptor.events[name])
 +                {
 +                    oldHandlerFunction = uiObj.document[descriptor.events[name]];
 +                    obj.removeEventListener(name, oldHandlerFunction);
 +                }
 +            }
 +			}
 +    
 +            // Set new handler as weak reference
 +            if (handlerFunction != null)
 +            {
 +                obj.addEventListener(name, handlerFunction, false, 0, true);
 +                
 +                // Add this handler to our installedHandlers list so it can
 +                // be removed if needed by a state based on this state. We 
 +                // only do so for legacy MXML documents that support hierarchical
 +                // states. 
 +				COMPILE::LATER
 +				{
 +                if (!(parent.document is IStateClient2))
 +                {   
 +                    if (installedHandlers[obj] == undefined)
 +                        installedHandlers[obj] = {};
 +                    
 +                    installedHandlers[obj][name] = handlerFunction;
 +                }
 +				}
 +                
 +                // Disable bindings for the base event handler if appropriate. If the binding
 +                // fires while our override is applied, the correct value will automatically
 +                // be applied when the binding is later enabled.
 +                enableBindings(obj, parent, name, false);
 +            }
 +        }
 +        else if (!applied)
 +        {
 +            // Our target context is unavailable so we attempt to register
 +            // a listener on our parent document to detect when/if it becomes
 +            // valid.
 +            addContextListener(target);
 +        }
 +        
 +        // Save state in case our value or target is changed while applied. This
 +        // can occur when our value property is databound or when a target is 
 +        // deferred instantiated.
 +        applied = true;
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function remove(parent:UIComponent):void
 +    {        
 +        var obj:* = getOverrideContext(appliedTarget, parent);
 +        if (obj != null && appliedTarget)
 +        {
 +	        if (handlerFunction != null)
 +	            obj.removeEventListener(name, handlerFunction);
 +	
 +	        // Restore the old value
 +	        if (oldHandlerFunction != null)
 +	            obj.addEventListener(name, oldHandlerFunction, false, 0, true);
 +	        
 +			COMPILE::LATER
 +			{
 +	        if (installedHandlers[obj])
 +	        {
 +	            var deleteObj:Boolean = true;
 +	            
 +	            // Remove this handler
 +	            delete installedHandlers[obj][name];
 +	
 +	            // If no other handlers are installed for this object, delete
 +	            // this object from the installedHandlers dictionary
 +	            for (var i:String in installedHandlers[obj])
 +	            {
 +	                // Found one - don't delete this object
 +	                deleteObj = false;
 +	                break;
 +	            }
 +	
 +	            if (deleteObj)
 +	                delete installedHandlers[obj];
 +	        }
 +			}
 +            // Re-enable bindings for the base event handler if appropriate. If the binding
 +            // fired while our override was applied, the current value will automatically
 +            // be applied once enabled.
 +            enableBindings(obj, parent, name);
 +        }
 +        else
 +        {
 +            // It seems our override is no longer active, but we were never
 +            // able to successfully apply ourselves, so remove our context
 +            // listener if applicable.
 +            removeContextListener();
 +        }
 +        
 +        // Clear our flags and override context.
 +        applied = false;
 +        parentContext = null;
 +        appliedTarget = null;
 +    }
 +}
 +
 +}


[32/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/preloaders/IPreloaderDisplay.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/preloaders/IPreloaderDisplay.as
index d1a1edd,0000000..9ed1a66
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/preloaders/IPreloaderDisplay.as
+++ b/frameworks/projects/MX/src/main/flex/mx/preloaders/IPreloaderDisplay.as
@@@ -1,200 -1,0 +1,200 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.preloaders
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.Sprite;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.Sprite;		
 +}
 +import org.apache.flex.events.IEventDispatcher;
 +
 +/**
 + *  Defines the interface that 
 + *  a class must implement to be used as a download progress bar.
 + *  The IPreloaderDisplay receives events from the Preloader class
 + *  and is responsible for visualizing that information to the user.
 + *
 + *  @see mx.preloaders.DownloadProgressBar
 + *  @see mx.preloaders.Preloader
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IPreloaderDisplay extends IEventDispatcher
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  backgroundAlpha
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#backgroundAlpha
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get backgroundAlpha():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set backgroundAlpha(value:Number):void;
 +    
 +    //----------------------------------
 +    //  backgroundColor
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#backgroundColor
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */ 
 +    function get backgroundColor():uint;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set backgroundColor(value:uint):void;
 +    
 +    //----------------------------------
 +    //  backgroundImage
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#backgroundImage
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get backgroundImage():Object;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set backgroundImage(value:Object):void;
 +
 +    //----------------------------------
 +    //  backgroundSize
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#backgroundSize
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get backgroundSize():String;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set backgroundSize(value:String):void;
 +
 +    //----------------------------------
 +    //  preloader
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#preloader
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function set preloader(obj:Sprite):void;
 +    
 +    //----------------------------------
 +    //  stageHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#stageHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get stageHeight():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set stageHeight(value:Number):void;
 +    
 +    //----------------------------------
 +    //  stageWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#stageWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get stageWidth():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set stageWidth(value:Number):void;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @copy mx.preloaders.DownloadProgressBar#initialize()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function initialize():void;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
index a5dc22c,0000000..1a341a9
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
+++ b/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
@@@ -1,717 -1,0 +1,717 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.preloaders
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.LoaderInfo;
 +	import flash.display.MovieClip;
 +	import flash.display.Sprite;
 +	import flash.events.ErrorEvent;
 +	import flash.events.Event;
 +	import flash.events.IEventDispatcher;
 +	import flash.events.IOErrorEvent;
 +	import flash.events.ProgressEvent;
 +	import flash.events.TimerEvent;
 +	import flash.utils.Timer;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.MovieClip;
 +	import flex.display.Sprite;
 +	import flex.events.Event;
 +	import flex.events.IEventDispatcher;
 +	import flex.events.IOErrorEvent;
 +	import flex.events.ProgressEvent;
 +	import flex.events.TimerEvent;
 +	
 +	import org.apache.flex.utils.Timer;		
 +}
 +
 +import flex.system.DefinitionManager;
 +
 +COMPILE::LATER
 +{
 +import mx.core.RSLItem;
 +import mx.core.RSLListLoader;
 +import mx.core.ResourceModuleRSLItem;
 +import mx.events.RSLEvent;
 +import mx.managers.SystemManagerGlobals;
 +import mx.resources.IResourceManager;
 +}
 +import mx.core.mx_internal;
 +import mx.events.FlexEvent;
 +
 +use namespace mx_internal;
 +
 +/**
 + *  The Preloader class is used by the SystemManager to monitor
 + *  the download and initialization status of a Flex application.
 + *  It is also responsible for downloading the runtime shared libraries (RSLs).
 + *
 + *  <p>The Preloader class instantiates a download progress bar, 
 + *  which must implement the IPreloaderDisplay interface, and passes download
 + *  and initialization events to the download progress bar.</p>
 + *
 + *  @see mx.preloaders.DownloadProgressBar
 + *  @see mx.preloaders.Preloader
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class Preloader extends Sprite
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function Preloader()
 +    {
 +        super()
 +    }   
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var displayClass:IPreloaderDisplay = null;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var timer:Timer;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var showDisplay:Boolean;
 +    
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    private var rslListLoader:RSLListLoader;
 +    
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    private var resourceModuleListLoader:RSLListLoader;
 +
 +    /**
 +     *  @private
 +     */
 +    private var rslDone:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var loadingRSLs:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    private var waitingToLoadResourceModules:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    private var sentDocFrameReady:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    private var app:IEventDispatcher = null;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var applicationDomain:DefinitionManager = null;
 +    
 +    /**
 +     *  @private
 +     */
 +    private var waitedAFrame:Boolean = false;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +	COMPILE::LATER
 +	public function initialize(showDisplay:Boolean, 
 +							   displayClassName:Class,
 +							   backgroundColor:uint,
 +							   backgroundAlpha:Number,
 +							   backgroundImage:Object,
 +							   backgroundSize:String,
 +							   displayWidth:Number,
 +							   displayHeight:Number,
 +							   libs:Array = null,
 +							   sizes:Array = null,
 +							   rslList:Array = null,
 +							   resourceModuleURLs:Array = null,
 +							   applicationDomain:DefinitionManager = null):void
 +	{
 +		
 +	}
 +	
 +    /**  
 +     *  Called by the SystemManager to initialize a Preloader object.
 +     * 
 +     *  @param showDisplay Determines if the display class should be displayed.
 +     *
 +     *  @param displayClassName The IPreloaderDisplay class to use
 +     *  for displaying the preloader status.
 +     *
 +     *  @param backgroundColor Background color of the application.
 +     *
 +     *  @param backgroundAlpha Background alpha of the application.
 +     *
 +     *  @param backgroundImage Background image of the application.
 +     *
 +     *  @param backgroundSize Background size of the application.
 +     *
 +     *  @param displayWidth Width of the application.
 +     *
 +     *  @param displayHeight Height of the application.
 +     *
 +     *  @param libs Array of string URLs for the runtime shared libraries.
 +     *
 +     *  @param sizes Array of uint values containing the byte size for each URL
 +     *  in the libs argument
 +     * 
 +     *  @param rslList Array of object of type RSLItem and CdRSLItem.
 +     *  This array describes all the RSLs to load.
 +     *  The libs and sizes parameters are ignored and must be set to null.
 +     *
 +     *  @param resourceModuleURLs Array of Strings specifying URLs
 +     *  from which to preload resource modules.
 +     *
 +     *  @param applicationDomain The application domain in which 
 +     *  your code is executing.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */ 
 +    public function initialize(showDisplay:Boolean, 
 +                               displayClassName:Class,
 +                               backgroundColor:uint,
 +                               backgroundAlpha:Number,
 +                               backgroundImage:Object,
 +                               backgroundSize:String,
 +                               displayWidth:Number,
 +                               displayHeight:Number,
 +                               libs:Array = null,
 +                               sizes:Array = null):void
 +    {
 +		COMPILE::LATER
 +		{
 +        if ((libs != null || sizes != null) && rslList != null)
 +        {
 +            // both args can't be used at the same time
 +            throw new Error("RSLs may only be specified by using libs and sizes or rslList, not both.");  // $NON-NLS-1$
 +        }
 +		}
 +
 +        this.applicationDomain = applicationDomain;
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);				
 +		}
 +    
 +        var n:int;
 +        var i:int;
 +        
 +		COMPILE::LATER
 +		{
 +        // Store the RSL information.
 +        // Keep this code for API backwards compatibility
 +        if (libs && libs.length > 0)
 +        {
 +            if (rslList == null)
 +            {
 +                rslList = [];
 +            }
 +    
 +            n = libs.length;
 +            for (i = 0; i < n; i++)
 +            {
 +                var node:RSLItem = new RSLItem(libs[i]);
 +                rslList.push(node);
 +            }
 +        }
 +
 +        var resourceModuleList:Array = [];
 +        // Preloading resource modules is similar enough to loading RSLs
 +        // that we can simply create ResourceModuleRSLItems for them
 +        if (resourceModuleURLs && resourceModuleURLs.length > 0)
 +        {
 +            n = resourceModuleURLs.length;
 +            for (i = 0; i < n; i++)
 +            {
 +                var resourceModuleNode:ResourceModuleRSLItem =
 +                    new ResourceModuleRSLItem(resourceModuleURLs[i], applicationDomain);
 +                resourceModuleList.push(resourceModuleNode);
 +            }
 +        }
 +
 +        rslListLoader = new RSLListLoader(rslList);
 +        if (resourceModuleList.length)
 +            resourceModuleListLoader = new RSLListLoader(resourceModuleList);
 +		}
 +        this.showDisplay = showDisplay;
 +
 +        // Create the timer (really should be adding event listeners to root.LoaderInfo)    
 +        timer = new Timer(10);
 +        timer.addEventListener(TimerEvent.TIMER, timerHandler);
 +        timer.start();
 +        
 +        // Create a new instance of the display class and attach it to the stage
 +        if (showDisplay)
 +        {
 +            displayClass = new displayClassName(); 
 +            // Listen for when the displayClass no longer needs to be on the stage
 +            displayClass.addEventListener(Event.COMPLETE,
 +                                          displayClassCompleteHandler);
 +            
 +            // Add the display class as a child of the Preloader
 +            addChild(DisplayObject(displayClass));
 +                        
 +            displayClass.backgroundColor = backgroundColor;
 +            displayClass.backgroundAlpha = backgroundAlpha;
 +            displayClass.backgroundImage = backgroundImage;
 +            displayClass.backgroundSize = backgroundSize;
 +            displayClass.stageWidth = displayWidth;
 +            displayClass.stageHeight = displayHeight;
 +            displayClass.initialize();  
 +            displayClass.preloader = this;
 +            
 +            // Listen for ENTER_FRAME to make sure that we are going to render the displayClass first,
 +            // before dispatching PRELOADER_DOC_FRAME_READY. This way we the run-time can render
 +            // the displayClass as soon as possible, before advancing onto frame 2.
 +            CONFIG::performanceInstrumentation
 +            {
 +                import mx.utils.PerfUtil;
 +                PerfUtil.getInstance().markTime("Preloader.displayClass created");
 +            }
 +            this.addEventListener(Event.ENTER_FRAME, waitAFrame);
 +        }   
 +        
 +		COMPILE::LATER
 +		{
 +        // move below showDisplay so error messages can be displayed
 +        if (rslListLoader.getItemCount() > 0)
 +        {
 +            // Start loading the RSLs.
 +            rslListLoader.load(rslProgressHandler,
 +                               rslCompleteHandler,
 +                               rslErrorHandler,
 +                               rslErrorHandler,
 +                               rslErrorHandler);
 +            loadingRSLs = true;
 +        }
 +        else if (resourceModuleListLoader && resourceModuleListLoader.getItemCount() > 0)
 +        {
 +            if (applicationDomain.hasDefinition("mx.resources::ResourceManager"))
 +            {
 +                rslListLoader = resourceModuleListLoader;
 +                // Start loading the resourceModules
 +                rslListLoader.load(rslProgressHandler,
 +                                   rslCompleteHandler,
 +                                   rslErrorHandler,
 +                                   rslErrorHandler,
 +                                   rslErrorHandler);
 +            }
 +            else
 +            {
 +                waitingToLoadResourceModules = true;
 +                rslDone = true;
 +            }
 +        }
 +        else
 +        {
 +            rslDone = true;
 +        }
 +		}
 +    }
 +    
 +    /**
 +     *  Called by the SystemManager after it has finished instantiating
 +     *  an instance of the application class. Flex calls this method; you 
 +     *  do not call it yourself.
 +     *
 +     *  @param app The application object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function registerApplication(app:IEventDispatcher):void
 +    {
 +        // Listen for events from the application.
 +        app.addEventListener("validatePropertiesComplete", appProgressHandler);
 +        app.addEventListener("validateSizeComplete", appProgressHandler);
 +        app.addEventListener("validateDisplayListComplete", appProgressHandler);
 +        app.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
 +        
 +        // Cache for later cleanup.
 +        this.app = app;
 +    }
 +    
 +    
 +    /**
 +     *  @private
 +     *  Return the number of bytes loaded and total for the SWF and any RSLs.
 +     */
 +    private function getByteValues():Object
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			var li:LoaderInfo = root.loaderInfo;
 +			var loaded:int = li.bytesLoaded;
 +			var total:int = li.bytesTotal;				
 +		}
 +		COMPILE::JS
 +		{
 +			var loaded:int = 100;
 +			var total:int = 100;				
 +		}
 +		COMPILE::LATER
 +		{
 +        // Look up the rsl bytes and include those
 +        var n:int = rslListLoader ? rslListLoader.getItemCount() : 0;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            loaded += rslListLoader.getItem(i).loaded;
 +
 +            // If the rsl total is zero then provide an average rsl size
 +            // to set rough expectations.
 +            var rslTotal:int = rslListLoader.getItem(i).total;
 +            total += rslTotal;
 +        }
 +		}
 +        
 +        return { loaded: loaded, total: total };
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function dispatchAppEndEvent(event:Object = null):void
 +    {
 +        // Dispatch the application initialization end event
 +        dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE));
 +        
 +        if (!showDisplay)
 +            displayClassCompleteHandler(null);
 +    }
 +    
 +    /**
 +     *  @private
 +     *  We don't listen for the events directly
 +     *  because we don't know which RSL is sending the event.
 +     *  So we have the RSLNode listen to the events
 +     *  and then pass them along to the Preloader.
 +     */ 
 +	COMPILE::LATER
 +    mx_internal function rslProgressHandler(event:ProgressEvent):void
 +    {
 +        var index:int = rslListLoader.getIndex();
 +        var item:RSLItem = rslListLoader.getItem(index);
 +        
 +        
 +        var rslEvent:RSLEvent = new RSLEvent(RSLEvent.RSL_PROGRESS);
 +        rslEvent.isResourceModule = (rslListLoader == resourceModuleListLoader);
 +        rslEvent.bytesLoaded = event.bytesLoaded;
 +        rslEvent.bytesTotal = event.bytesTotal;
 +        rslEvent.rslIndex = index;
 +        rslEvent.rslTotal = rslListLoader.getItemCount();
 +        rslEvent.url = item.urlRequest;
 +        dispatchEvent(rslEvent);
 +    }
 +
 +    
 +    /**
 +     *  @private
 +     *  Load the next RSL in the list and dispatch an event.
 +     */
 +	COMPILE::LATER
 +    mx_internal function rslCompleteHandler(event:Event):void
 +    {
 +        var index:int = rslListLoader.getIndex();
 +        var item:RSLItem = rslListLoader.getItem(index);
 +
 +        var rslEvent:RSLEvent = new RSLEvent(RSLEvent.RSL_COMPLETE);
 +        rslEvent.isResourceModule = (rslListLoader == resourceModuleListLoader);
 +        rslEvent.bytesLoaded = item.total;
 +        rslEvent.bytesTotal = item.total;
 +        rslEvent.loaderInfo = event.target as LoaderInfo;
 +        rslEvent.rslIndex = index;
 +        rslEvent.rslTotal = rslListLoader.getItemCount();
 +        rslEvent.url = item.urlRequest;
 +        dispatchEvent(rslEvent);
 +        
 +        if (loadingRSLs && resourceModuleListLoader && index + 1 == rslEvent.rslTotal)
 +        {
 +            loadingRSLs = false;
 +            waitingToLoadResourceModules = true;
 +            // timer will switch over to loading resource modules
 +        }
 +
 +        rslDone = (index + 1 == rslEvent.rslTotal);
 +    }
 +        
 +    
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    mx_internal function rslErrorHandler(event:ErrorEvent):void
 +    {
 +        // send an error event
 +        var index:int = rslListLoader.getIndex();
 +        var item:RSLItem = rslListLoader.getItem(index);
 +        var rslEvent:RSLEvent = new RSLEvent(RSLEvent.RSL_ERROR);
 +        rslEvent.isResourceModule = (rslListLoader == resourceModuleListLoader);
 +        rslEvent.bytesLoaded = 0;
 +        rslEvent.bytesTotal = 0;
 +        rslEvent.rslIndex = index;
 +        rslEvent.rslTotal = rslListLoader.getItemCount();
 +        rslEvent.url = item.urlRequest;
 +        rslEvent.errorText = decodeURI(event.text);
 +        dispatchEvent(rslEvent);
 +
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Listen or poll for progress events and dispatch events
 +     *  describing the current state of the download
 +     */
 +    private function timerHandler(event:TimerEvent):void
 +    {
 +        // loaded swfs may not have root right away
 +        if (!root)
 +            return;
 +
 +        var bytes:Object = getByteValues();
 +        var loaded:int = bytes.loaded;
 +        var total:int = bytes.total;
 +        
 +        // Dispatch a progress event (later we might conditionalize this
 +        // so that it isn't sent on a cache load).
 +        dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS,
 +                                        false, false, loaded, total));
 +
 +		COMPILE::LATER
 +		{
 +        if (waitingToLoadResourceModules)
 +        {
 +            if (applicationDomain.hasDefinition("mx.resources::ResourceManager"))
 +            {
 +                waitingToLoadResourceModules = false;
 +                rslListLoader = resourceModuleListLoader;
 +                rslDone = false;
 +                // Start loading the resourceModules
 +                rslListLoader.load(rslProgressHandler,
 +                                   rslCompleteHandler,
 +                                   rslErrorHandler,
 +                                   rslErrorHandler,
 +                                   rslErrorHandler);
 +            }
 +        }
 +		}
 +
 +        // Check if we are finished
 +        if (rslDone &&
 +            ((loaded >= total && total > 0) || (total == 0 && loaded > 0) || (root is MovieClip && (MovieClip(root).totalFrames > 2) && (MovieClip(root).framesLoaded >= 2)) ))
 +        {
 +            if (!sentDocFrameReady)
 +            {
 +                // If there's a displayClass, don't send the PRELOADER_DOC_FRAME_READY 
 +                // event before we render at least one frame
 +                if (showDisplay && !waitedAFrame)
 +                    return;
 +
 +                sentDocFrameReady = true;
 +                // Dispatch a Frame1 done event.
 +                dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DOC_FRAME_READY));
 +                return;
 +            }
 +
 +			COMPILE::LATER
 +			{
 +            if (waitingToLoadResourceModules)
 +            {
 +                if (applicationDomain.hasDefinition("mx.resources::ResourceManager"))
 +                {
 +                    waitingToLoadResourceModules = false;
 +                    rslListLoader = resourceModuleListLoader;
 +                    rslDone = false;
 +                    // Start loading the resourceModules
 +                    rslListLoader.load(rslProgressHandler,
 +                                       rslCompleteHandler,
 +                                       rslErrorHandler,
 +                                       rslErrorHandler,
 +                                       rslErrorHandler);
 +                    return;
 +                }
 +            }
 +
 +            if (resourceModuleListLoader)
 +            {
 +                var resourceManager:IResourceManager;
 +                // do this to prevent dependency on ResourceManager
 +                if (applicationDomain.hasDefinition("mx.resources::ResourceManager"))
 +                {
 +                    var resourceManagerClass:Class = 
 +                        Class(applicationDomain.getDefinition("mx.resources::ResourceManager"));
 +                    resourceManager = 
 +                        IResourceManager(resourceManagerClass["getInstance"]());
 +                }
 +                // The FlashVars of the SWF's HTML wrapper,
 +                // or the query parameters of the SWF URL,
 +                // can specify the ResourceManager's localeChain.
 +                var localeChainList:String =  
 +                    SystemManagerGlobals.parameters["localeChain"];
 +                if (localeChainList != null && localeChainList != "")
 +                    resourceManager.localeChain = localeChainList.split(",");
 +            }            
 +			}
 +            timer.removeEventListener(TimerEvent.TIMER, timerHandler);
 +            
 +            // Stop the timer.
 +            timer.reset();
 +        
 +            // Dispatch a complete event.
 +            dispatchEvent(new Event(Event.COMPLETE));
 +            
 +            // Dispatch an initProgress event.
 +            dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
 +
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function ioErrorHandler(event:IOErrorEvent):void
 +    {
 +        // Ignore the event
 +    }
 +
 +    /**
 +     *  @private
 +     *  Called when the displayClass has finished animating
 +     *  and no longer needs to be displayed.
 +     */
 +    private function displayClassCompleteHandler(event:Event):void
 +    {
 +        // Cleanup
 +        if (displayClass)
 +            displayClass.removeEventListener(Event.COMPLETE, displayClassCompleteHandler);
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        if (root) 
 +            root.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
 +		}
 +		
 +        if (app) 
 +        {
 +            app.removeEventListener("validatePropertiesComplete", appProgressHandler);
 +            app.removeEventListener("validateSizeComplete", appProgressHandler);
 +            app.removeEventListener("validateDisplayListComplete", appProgressHandler);
 +            app.removeEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
 +            app = null;
 +        }
 +            
 +        // Send an event to the SystemManager that we are completely finished
 +        dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE));
 +    }
 +        
 +    /**
 +     *  @private
 +     */
 +    private function appCreationCompleteHandler(event:FlexEvent):void
 +    {       
 +        dispatchAppEndEvent();
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function appProgressHandler(event:Event):void
 +    {       
 +        dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function waitAFrame(event:Event):void
 +    {
 +        CONFIG::performanceInstrumentation
 +        {
 +            mx.utils.PerfUtil.getInstance().markTime("Preloader.displayClass rendered");
 +        }
 +
 +        this.removeEventListener(Event.ENTER_FRAME, waitAFrame);
 +        waitedAFrame = true;
 +    }
 +
 +}
 +
 +}
 +

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
index c9573de,0000000..2b74571
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
+++ b/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
@@@ -1,256 -1,0 +1,256 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.resources
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.system.ApplicationDomain;		
 +}
 +
 +import mx.core.mx_internal;
 +COMPILE::LATER
 +{
 +	import mx.utils.StringUtil;
 +}
 +use namespace mx_internal;
 +
 +/**
 + *  Provides an implementation of the IResourceBundle interface.
 + *  The IResourceManager and IResourceBundle interfaces work together
 + *  to provide internationalization support for Flex applications.
 + *
 + *  <p>A Flex application typically has multiple instances of this class,
 + *  all managed by a single instance of the ResourceManager class.
 + *  It is possible to have ResourceBundle instances for multiple locales,
 + *  one for each locale. There can be multiple ResourceBundle instances with
 + *  different bundle names.</p>
 + *  
 + *  @see mx.resources.IResourceBundle
 + *  @see mx.resources.IResourceManager
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ResourceBundle implements IResourceBundle
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Set by SystemManager constructor in order to make the deprecated
 +     *  getResourceBundle() method work with the new resource scheme
 +     *  in the single-locale case.
 +     */
 +    mx_internal static var locale:String;
 +
 +    /**
 +     *  @private
 +     *  Set by bootstrap loaders
 +     *  to allow for alternate search paths for resources
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    mx_internal static var backupApplicationDomain:ApplicationDomain;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private static function getClassByName(name:String,
 +                                           domain:ApplicationDomain):Class
 +    {
 +        var c:Class;
 +
 +        if (domain.hasDefinition(name))
 +            c = domain.getDefinition(name) as Class;
 +
 +        return c;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @param locale A locale string, such as <code>"en_US"</code>.
 +     *
 +     *  @param bundleName A name that identifies this bundle,
 +     *  such as <code>"MyResources"</code>.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function ResourceBundle(locale:String = null,
 +                                   bundleName:String = null)
 +    {
 +        // The only reason that the arguments are optional is so that
 +        // Flex 3 applications can link against Flex 2 resource SWCs.
 +        // In Flex 2, the constructor had no arguments at all
 +        // and the autogenerated ResourceBundle subclasses
 +        // therefore called super() with no arguments.
 +        // If, in Flex 3, the constructor has required arguments,
 +        // this causes a VerifyError.
 +        
 +        super();
 +        
 +        _locale = locale;
 +        _bundleName = bundleName;
 +
 +        _content = getContent();
 +    }  
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    //----------------------------------
 +    //  bundleName
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the bundleName property.
 +     */
 +    mx_internal var _bundleName:String;
 +
 +    /**
 +     *  @copy mx.resources.IResourceBundle#bundleName
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */     
 +    public function get bundleName():String
 +    {
 +        return _bundleName;
 +    }
 +
 +    //----------------------------------
 +    //  content
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the content property.
 +     */
 +    private var _content:Object = {};
 +
 +    /**
 +     *  @copy mx.resources.IResourceBundle#content
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */     
 +    public function get content():Object
 +    {
 +        return _content;
 +    }
 +
 +    //----------------------------------
 +    //  locale
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the locale property.
 +     */
 +    mx_internal var _locale:String;
 +
 +    /**
 +     *  @copy mx.resources.IResourceBundle#locale
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */     
 +    public function get locale():String
 +    {
 +        return _locale;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  When a properties file is compiled into a resource bundle,
 +     *  the MXML compiler autogenerates a subclass of ResourceBundle.
 +     *  The subclass overrides this method to return an Object
 +     *  that contains key-value pairs for the bundle's resources.
 +     *
 +     *  <p>If you create your own ResourceBundle instances,
 +     *  you can set the key-value pairs on the <code>content</code> object.</p>
 +     *  
 +     *  @return The Object that contains key-value pairs for the bundle's resources.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    protected function getContent():Object
 +    {
 +        return {};
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function _getObject(key:String):Object
 +    {
 +        var value:Object = content[key];
 +        if (!value)
 +        {
 +            throw new Error("Key " + key +
 +                            " was not found in resource bundle " + bundleName);
 +        }
 +        return value;
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/resources/ResourceManager.as
index 7442509,0000000..e016f79
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManager.as
@@@ -1,129 -1,0 +1,129 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.resources
 +{
 +
 +import org.apache.flex.reflection.getDefinitionByName;
 +import mx.core.mx_internal;
 +import mx.core.Singleton;
 +
 +/**
 + *  This class is used to get a single instance of the IResourceManager
 + *  implementation.
 + *  The IResourceManager and IResourceBundle interfaces work together
 + *  to provide internationalization support for Flex applications.
 + *
 + *  <p>A single instance of an IResourceManager implementation
 + *  manages all localized resources
 + *  for a Flex application.</p>
 + *  
 + *  @see mx.resources.IResourceManager
 + *  @see mx.resources.IResourceBundle
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class ResourceManager
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Linker dependency on implementation class.
 +     */
 +    private static var implClassDependency:ResourceManagerImpl;
 +
 +    /**
 +     *  @private
 +     *  The sole instance of the ResourceManager.
 +     */
 +    private static var instance:IResourceManager;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Gets the single instance of the ResourceManager class.
 +     *  This object manages all localized resources for a Flex application.
 +     *  
 +     *  @return An object implementing IResourceManager.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function getInstance():IResourceManager
 +    {
 +        if (!instance)
 +        {
 +            CONFIG::performanceInstrumentation
 +            {
 +                var perfUtil:mx.utils.PerfUtil = mx.utils.PerfUtil.getInstance();
 +                perfUtil.markTime("ResourceManager.getInstance().start");
 +            }
 +            
 +			if (!Singleton.getClass("mx.resources::IResourceManager"))
 +				// install ResourceManagerImpl if not registered already
 +				Singleton.registerClass("mx.resources::IResourceManager",
 +					Class(getDefinitionByName("mx.resources::ResourceManagerImpl")));
 +
 +
 +            try
 +			{
 +				instance = IResourceManager(
 +					Singleton.getInstance("mx.resources::IResourceManager"));
 +			}
 +			catch(e:Error)
 +			{
 +				// In non-Flex apps and modules, the Singleton manager
 +				// won't have been initialized by SystemManager
 +				// or FlexModuleFactory (since these don't get linked in)
 +				// so the above call to getInstance() will throw an exception.
 +			}
 +			
 +			// In this situation, the ResourceManager simply creates
 +			// its own ResourceManagerImpl.
 +			if (!instance)
 +				instance = new ResourceManagerImpl();
 +
 +            CONFIG::performanceInstrumentation
 +            {
 +                perfUtil.markTime("ResourceManager.getInstance().end");
 +            }
 +        }
 +        
 +        return instance;
 +    }
 +    
 +}
 +
- }
++}


[39/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
index 07c0fa9,0000000..0e7cf88
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
@@@ -1,2870 -1,0 +1,2870 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;		
 +	import flash.geom.Matrix;
 +	import flash.text.TextFieldType;
 +	import flash.text.TextFormat;
 +	import flash.text.TextFormatAlign;
 +	import flex.display.TopOfDisplayList;
 +	import org.apache.flex.core.IFlexJSElement;
 +	import org.apache.flex.events.IEventDispatcher;
 +	import org.apache.flex.core.IBeadView;
 +	import org.apache.flex.core.IBead;
 +	import org.apache.flex.core.IBeadModel
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;
 +	import flex.text.TextFieldType;
 +	import flex.text.TextFormat;
 +	import flex.text.TextFormatAlign;
 +}
 +import flex.text.TextLineMetrics;
 +import flex.display.Sprite;
 +
 +import mx.automation.IAutomationObject;
 +import mx.core.LayoutDirection;
 +import mx.managers.ISystemManager;
 +import mx.managers.IToolTipManagerClient;
 +import mx.managers.SystemManager;
 +import mx.managers.ToolTipManager;
 +import mx.resources.IResourceManager;
 +import mx.resources.ResourceManager;
 +import mx.styles.ISimpleStyleClient;
 +import mx.styles.IStyleClient;
 +import mx.styles.IStyleManager2;
 +import mx.styles.StyleManager;
 +import mx.styles.StyleProtoChain;
 +import mx.utils.NameUtil;
 +import mx.utils.StringUtil;
 +
 +import flex.events.Event;
 +import flex.text.TextField;
 +import org.apache.flex.events.IEventDispatcher;
 +
 +use namespace mx_internal;
 +
 +include "../styles/metadata/LeadingStyle.as"
 +include "../styles/metadata/PaddingStyles.as"
 +include "../styles/metadata/TextStyles.as"
 +
 +//--------------------------------------
 +//  Excluded APIs
 +//--------------------------------------
 +
 +[Exclude(name="direction", kind="style")]
 +
 +//--------------------------------------
 +//  Other metadata
 +//--------------------------------------
 +
 +[ResourceBundle("core")]
 +    
 +/**
 + *  The UITextField class defines the component used by many Flex
 + *  components to display text.
 + *  For example, the mx.controls.Button control uses a 
 + *  UITextField component to define the label area of the Button control. 
 + * 
 + *  <p>The UITextField class extends the flash.text.TextField class to
 + *  support additional functionality required by Flex, such as CSS styles,
 + *  invalidation/measurement/layout, enabling/disabling, tooltips, and IME
 + *  (Input Method Editor) support for entering Chinese, Japanese, and
 + *  Korean text.</p>
 + * 
 + *  <p>Warning: if UITextField inherits <code>layoutDirection="rtl"</code>, it 
 + *  will modify its own <code>transform.matrix</code> to restore the default
 + *  coordinate system locally.</p>
 + *
 + *  @see flash.text.TextField
 + *  @see mx.core.UITextFormat
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class UITextField extends TextField
 +                         implements IAutomationObject, IIMESupport,
 +                         IFlexModule,
 +                         IInvalidating, ISimpleStyleClient,
 +                         IToolTipManagerClient, IUITextField
 +       
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Implementation notes
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /*
 +
 +        UITextField extends the Player's TextField class,
 +        so here are some notes about TextField.
 +
 +        The property values of a new TextField are as follows:
 +
 +            alwaysShowSelection = false
 +            autoSize = TextFieldAutoSize.NONE
 +            background = false
 +            backgroundColor = 0xFFFFFF
 +            border = false
 +            borderColor = 0x000000
 +            caretIndex = 0
 +            condenseWhite = false
 +            displayAsPassword = false
 +            embedFonts = false
 +            height = 100
 +            htmlText = ""
 +            length = 0
 +            maxChars = 0
 +            mouseWheelEnabled = true
 +            multiline = false
 +            numLines = 1
 +            restrict = null
 +            selectable = true
 +            selectionBeginIndex = 0
 +            selectionEndIndex = 0
 +            text = ""
 +            textColor = 0x000000
 +            textHeight = 0
 +            textWidth = 0
 +            type = TextFieldType.DYNAMIC
 +            width = 100
 +            wordWrap = false
 +                
 +        Many of these properties are coupled.
 +        For example, setting 'text' affects 'htmlText', 'length',
 +        'textWidth', and 'textHeight'.
 +        If 'autoSize' isn't "none", it also affects 'width' and 'height'.
 +
 +        The 'htmlText' getter and setter aren't symmetrical;
 +        if you set it and then get it, you don't get what you just set;
 +        you'll get additional HTML markup corresponding to the
 +        defaultTextFormat.
 +
 +        If you set both the 'text' and the 'htmlText' properties
 +        of a TextField, the last one set wins.
 +
 +        These setters do a lot of work; for example, suppose you set the 'text'.
 +        If it is an autosizing TextField, it computes the new width and height.
 +        If it is a wordwrapping TextField, it computes the appropriate line
 +        breaks.
 +
 +        If you then get the 'text' property, it is what you just set.
 +        If you get the 'length', it is the length of the 'text' string.
 +        If you get the 'htmlText', it will contain a lot of autogenerated
 +        HTML markup corresponding to the defaultTextFormat, which was applied
 +        as a run across the entire new text.
 +
 +        Now suppose you set the 'htmlText' property.
 +        The Player parses the string, separating the text characters
 +        from the markup.
 +        It first applies the defaultTextFormat as a run across the entire new
 +        text; it then uses the markup to modify this TextFormat or create
 +        additional TextFormat runs.
 +        When it's done it discards the 'htmlText' string that you set.
 +        
 +        If you then get the 'htmlText', it will not be what you just set; it
 +        will contain additional HTML markup corresponding to defaultTextFormat
 +        If you get the 'text', it will be text characters in the 'htmlText',
 +        without any of the HTML markup.
 +        If you get the 'length', it is the length of the 'text' string.
 +
 +        If you set a TextFormat run with setTextFormat(), it will change the
 +        runs created from the HTML markup in the 'htmlText' that was last set.
 +        This is why, in the validateNow() method in UITextField, the original
 +        'htmlText' is reapplied after the TextFormat is changed.
 +    
 +        The 'condenseWhite' property only applies when setting 'htmlText',
 +        not 'text'.
 +        Changing 'condenseWhite' after setting 'htmlText' doesn't affect
 +        anything except future settings of 'htmlText'.
 +        
 +        The width and height of the TextField are 4 pixels greater than
 +        the textWidth and textHeight.
 +    
 +    */
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  The padding to be added to textWidth to get the width
 +     *  of a TextField that can display the text without clipping.
 +     */ 
 +    mx_internal static const TEXT_WIDTH_PADDING:int = 5;
 +
 +    /**
 +     *  @private
 +     *  The padding to be added to textHeight to get the height
 +     *  of a TextField that can display the text without clipping.
 +     */ 
 +    mx_internal static const TEXT_HEIGHT_PADDING:int = 4;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Most resources are fetched on the fly from the ResourceManager,
 +     *  so they automatically get the right resource when the locale changes.
 +     *  But since truncateToFit() can be called frequently,
 +     *  this class caches this resource value in this variable
 +     *  and updates it when the locale changes.
 +     */ 
 +    private static var truncationIndicatorResource:String;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal static var debuggingBorders:Boolean = false;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  embeddedFontRegistry
 +    //----------------------------------
 +
 +    private static var noEmbeddedFonts:Boolean;
 +
 +    /**
 +     *  @private
 +     *  Storage for the _embeddedFontRegistry property.
 +     *  Note: This gets initialized on first access,
 +     *  not when this class is initialized, in order to ensure
 +     *  that the Singleton registry has already been initialized.
 +     */
 +    private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
 +
 +    /**
 +     *  @private
 +     *  A reference to the embedded font registry.
 +     *  Single registry in the system.
 +     *  Used to look up the moduleFactory of a font.
 +     */
 +    private static function get embeddedFontRegistry():IEmbeddedFontRegistry
 +    {
 +        if (!_embeddedFontRegistry && !noEmbeddedFonts)
 +        {
 +            try
 +            {
 +                _embeddedFontRegistry = IEmbeddedFontRegistry(
 +                    Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
 +            }
 +            catch (e:Error)
 +            {
 +                noEmbeddedFonts = true;
 +            }
 +        }
 +
 +        return _embeddedFontRegistry;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function UITextField()
 +    {
 +        super();
 +
 +        // Although a TextField's 'text' is initially "",
 +        // getLineMetrics() will return bad values until some text is set.
 +        super.text = "";
 +
 +        focusRect = false;
 +        selectable = false;
 +        tabEnabled = false;
 +         
 +        if (debuggingBorders)
 +            border = true;
 +         
 +        if (!truncationIndicatorResource)
 +        {
 +            truncationIndicatorResource = resourceManager.getString(
 +                "core", "truncationIndicator");
 +        }
 +        
 +        addEventListener(Event.CHANGE, changeHandler);
 +        addEventListener("textFieldStyleChange", textFieldStyleChangeHandler);
 +        
 +        // Register as a weak listener for "change" events from ResourceManager.
 +        // If UITextFields registered as a strong listener,
 +        // they wouldn't get garbage collected
 +		COMPILE::LATER
 +		{
 +			resourceManager.addEventListener(
 +				Event.CHANGE, resourceManager_changeHandler, false, 0, true);
 +		}
 +		resourceManager.addEventListener(
 +			Event.CHANGE, resourceManager_changeHandler);
 +
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Cached value of the TextFormat read from the Styles.
 +     */
 +    private var cachedTextFormat:TextFormat;
 +
 +    /**
 +     *  @private
 +     */
 +    private var invalidateDisplayListFlag:Boolean = true;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var styleChangedFlag:Boolean = true;
 +
 +    /**
 +     *  @private
 +     *  This var is either the last value of 'htmlText' that was set
 +     *  or null (if 'text' was set instead of 'htmlText').
 +     *
 +     *  This var is different from getting the 'htmlText',
 +     *  because when you set 'htmlText' into a TextField and then get it,
 +     *  you don't get what you set; what you get includes additional
 +     *  HTML markup generated from the defaultTextFormat
 +     *  (which for a Flex component is based on the CSS styles).
 +     *
 +     *  When you set 'htmlText', a TextField parses through it
 +     *  and creates TextFormat runs based on the HTML markup.
 +     *  It applies these on top of the defaultTextFormat.
 +     *  A TextField saves the non-markup characters as the 'text',
 +     *  but it doesn't save the original 'htmlText',
 +     *  so we have to do this ourselves.
 +     *
 +     *  If the CSS styles change, validateNow() will get called
 +     *  and a new TextFormat based on the new CSS styles
 +     *  will get applied to the entire TextField, wiping
 +     *  out any TextFormats that came from the HTML markup.
 +     *  So we use this var to re-apply the original markup
 +     *  after a CSS change.
 +     */
 +    private var explicitHTMLText:String = null;
 +
 +    /**
 +     *  @private
 +     *  Color set explicitly by setColor(); overrides style lookup.
 +     */
 +    mx_internal var explicitColor:uint = StyleManager.NOT_A_COLOR;
 +
 +    /**
 +     *  @private
 +     */
 +    private var resourceManager:IResourceManager =
 +                                    ResourceManager.getInstance();
 +
 +    /**
 +     *  @private
 +     */
 +    private var untruncatedText:String;
 +    
 +    /**
 +     *  @private
 +     *  True if we've inherited layoutDirection="rtl".  
 +     */
 +    private var mirror:Boolean = false;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    //----------------------------------
 +    //  x
 +    //----------------------------------
 +    
 +    private var _x:Number = 0;
 +    
 +    /**
 +     *  @private
 +     */
 +    override public function set x(value:Number):void
 +    {
 +        _x = value;
 +        super.x = value;
 +		COMPILE::LATER
 +		{
 +        if (mirror)
 +            validateTransformMatrix();
 +		}
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    override public function get x():Number
 +    {
 +        // TODO(hmuller): by default get x returns transform.matrix.tx rounded to the nearest 20th.
 +        // should do the same here, if we're returning _x.
 +        return (mirror) ? _x : super.x;
 +    }
 +    
 +    //----------------------------------
 +    //  width
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    override public function set width(value:Number):void  
 +    {
 +        var changed:Boolean = super.width != value;
 +        
 +        super.width = value;
 +		COMPILE::LATER
 +		{
 +        if (mirror)
 +            validateTransformMatrix();
 +		}
 +        
 +        // Since changing the width may reflow the text which can
 +        // change the textWidth and/or textHeight dispatch an event so 
 +        // that listeners can react to this.
 +        if (changed)
 +            dispatchEvent(new Event("textFieldWidthChange"));
 +    }
 +    
 +    //----------------------------------
 +    //  htmlText
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set htmlText(value:String):void
 +    {
 +        // TextField's htmlText property can't be set to null.
 +        if (!value)
 +            value = "";
 +
 +        // Performance optimization: if the htmlText hasn't changed,
 +        // don't let the player think that we're dirty.
 +        if (isHTML && super.htmlText == value)
 +            return;
 +
 +        // Reapply the format because TextField would otherwise reset to
 +        // black, Times New Roman, 12
 +        if (cachedTextFormat && styleSheet == null)
 +            defaultTextFormat = cachedTextFormat;
 +            
 +        super.htmlText = value;
 +        
 +        // Remember the htmlText that we've set,
 +        // because the TextField doesn't remember it for us.
 +        // We need it so that we can re-apply the HTML markup
 +        // in validateNow() after the CSS styles change
 +        explicitHTMLText = value;
 +
 +        if (invalidateDisplayListFlag)
 +            validateNow();
 +    }
 +
 +    //----------------------------------
 +    //  parent
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Reference to this component's virtual parent container.
 +     *  "Virtual" means that this parent may not be the same
 +     *  as the one that the Player returns as the 'parent'
 +     *  property of a DisplayObject.
 +     *  For example, if a Container has created a contentPane
 +     *  to improve scrolling performance,
 +     *  then its "children" are really its grandchildren
 +     *  and their "parent" is actually their grandparent,
 +     *  because we don't want developers to be concerned with
 +     *  whether a contentPane exists or not.
 +     */
 +    mx_internal var _parent:DisplayObjectContainer;
 +
 +    /**
 +     *  The parent container or component for this component.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function get parent():DisplayObjectContainer
 +    {
 +        // Flash PlaceObject tags can have super.parent set
 +        // before we get to setting the _parent property.
 +        return _parent ? _parent : super.parent;
 +    }
 +
 +    //----------------------------------
 +    //  text
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function set text(value:String):void
 +    {
 +        // TextField's text property can't be set to null.
 +        if (!value)
 +            value = "";
 +        
 +        // Performance optimization: if the text hasn't changed,
 +        // don't let the player think that we're dirty.
 +        if (!isHTML && super.text == value)
 +            return;
 +
 +        super.text = value;
 +
 +        explicitHTMLText = null;
 +
 +        if (invalidateDisplayListFlag)
 +            validateNow();
 +    }
 +
 +	//----------------------------------
 +	//  textColor
 +	//----------------------------------
 +	
 +	/**
 +	 *  @private
 +	 */
 +	override public function set textColor(value:uint):void
 +	{
 +		setColor(value);
 +	}
 +	
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +    
 +    //----------------------------------
 +    //  automationDelegate
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    private var _automationDelegate:IAutomationObject;
 +
 +    /**
 +     *  The delegate object which is handling the automation related functionality.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get automationDelegate():Object
 +    {
 +        return _automationDelegate;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set automationDelegate(value:Object):void
 +    {
 +        _automationDelegate = value as IAutomationObject;
 +    }
 +
 +    //----------------------------------
 +    //  automationName
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the automationName property.
 +     */
 +    private var _automationName:String;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get automationName():String
 +    {
 +        if (_automationName)
 +            return _automationName; 
 +        if (automationDelegate)
 +            return automationDelegate.automationName;
 +        
 +        return "";
 +    }
 +
 +    /**
 +     * @private
 +     */
 +    public function set automationName(value:String):void
 +    {
 +        _automationName = value;
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get automationValue():Array
 +    {
 +        if (automationDelegate)
 +           return automationDelegate.automationValue;
 +        
 +        return [""];
 +    }
 +    
 +    //----------------------------------
 +    //  automationOwner
 +    //----------------------------------
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    public function get automationOwner():DisplayObjectContainer
 +    {
 +        return owner;
 +    }
 +    
 +    //----------------------------------
 +    //  automationParent
 +    //----------------------------------
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    public function get automationParent():DisplayObjectContainer
 +    {
 +        return parent;
 +    }
 +    
 +    //----------------------------------
 +    //  automationEnabled
 +    //----------------------------------
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    public function get automationEnabled():Boolean
 +    {
 +        return enabled;
 +    }
 +    
 +    //----------------------------------
 +    //  automationVisible
 +    //----------------------------------
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 4
 +     */
 +    public function get automationVisible():Boolean
 +    {
 +        return visible;
 +    }
 +
 +    //----------------------------------
 +    //  baselinePosition
 +    //----------------------------------
 +
 +    /**
 +     *  The y-coordinate of the baseline of the first line of text.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get baselinePosition():Number
 +    {
 +        var tlm:TextLineMetrics;
 +        
 +        // The text styles aren't known until there is a parent.
 +        if (!parent)
 +            return NaN;
 +            
 +        // getLineMetrics() returns strange numbers for an empty string,
 +        // so instead we get the metrics for a non-empty string.
 +        var isEmpty:Boolean = text == "";
 +        if (isEmpty)
 +            super.text = "Wj";
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			tlm = TextLineMetrics.convert(getLineMetrics(0));				
 +		}
 +		COMPILE::JS
 +		{
 +			tlm = getLineMetrics(0);				
 +		}
 +
 +        if (isEmpty)
 +            super.text = "";
 +
 +        // TextFields have 2 pixels of padding all around.
 +        return 2 + tlm.ascent;
 +    }
 +    
 +    //----------------------------------
 +    //  className
 +    //----------------------------------
 +
 +    /**
 +     *  The name of this instance's class, such as
 +     *  <code>"DataGridItemRenderer"</code>.
 +     *
 +     *  <p>This string does not include the package name.
 +     *  If you need the package name as well, call the
 +     *  <code>getQualifiedClassName()</code> method in the flash.utils package.
 +     *  It will return a string such as
 +     *  <code>"mx.controls.dataGridClasses::DataGridItemRenderer"</code>.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function get className():String
 +    {
 +        return NameUtil.getUnqualifiedClassName(this);
 +    }
 +
 +    //----------------------------------
 +    //  document
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the enabled property.
 +     */
 +    private var _document:Object;
 +
 +    /**
 +     *  A reference to the document object associated with this UITextField object. 
 +     *  A document object is an Object at the top of the hierarchy of a Flex application, 
 +     *  MXML component, or AS component.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get document():Object
 +    {
 +        return _document;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set document(value:Object):void
 +    {
 +        _document = value;
 +    }
 +
 +    //----------------------------------
 +    //  enableIME
 +    //----------------------------------
 +
 +    /**
 +     *  A flag that indicates whether the IME should
 +     *  be enabled when the component receives focus.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get enableIME():Boolean
 +    {
 +        return type == TextFieldType.INPUT;
 +    }
 +
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the enabled property.
 +     */
 +    private var _enabled:Boolean = true;
 +
 +    /**
 +     *  A Boolean value that indicates whether the component is enabled. 
 +     *  This property only affects
 +     *  the color of the text and not whether the UITextField is editable.
 +     *  To control editability, use the 
 +     *  <code>flash.text.TextField.type</code> property.
 +     *  
 +     *  @default true
 +     *  @see flash.text.TextField
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get enabled():Boolean
 +    {
 +        return _enabled;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set enabled(value:Boolean):void
 +    {
 +        mouseEnabled = value;
 +        _enabled = value;
 +
 +        styleChanged("color");
 +    }
 +
 +    //----------------------------------
 +    //  explicitHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the explicitHeight property.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private var _explicitHeight:Number;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#explicitHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function get explicitHeight():Number
 +    {
 +        return _explicitHeight;
 +    }
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function set explicitHeight(value:Number):void
 +    {
 +        _explicitHeight = value;
 +    }
 +
 +    //----------------------------------
 +    //  explicitMaxHeight
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the maximum height of the component, 
 +     *  in pixels, in the component's coordinates, if the maxHeight property
 +     *  is set. Because maxHeight is read-only, this method returns NaN. 
 +     *  You must override this method and add a setter to use this
 +     *  property.
 +     *  
 +     *  @see mx.core.UIComponent#explicitMaxHeight
 +     *  
 +     *  @default NaN
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get explicitMaxHeight():Number
 +    {
 +        return NaN;
 +    }
 +
 +    //----------------------------------
 +    //  explicitMaxWidth
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the maximum width of the component, 
 +     *  in pixels, in the component's coordinates, if the maxWidth property
 +     *  is set. Because maxWidth is read-only, this method returns NaN. 
 +     *  You must override this method and add a setter to use this
 +     *  property.
 +     *  
 +     *  @see mx.core.UIComponent#explicitMaxWidth
 +     *  
 +     *  @default NaN
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get explicitMaxWidth():Number
 +    {
 +        return NaN;
 +    }
 +
 +    //----------------------------------
 +    //  explicitMinHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#explicitMinHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get explicitMinHeight():Number
 +    {
 +        return NaN;
 +    }
 +
 +    //----------------------------------
 +    //  explicitMinWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#explicitMinWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get explicitMinWidth():Number
 +    {
 +        return NaN;
 +    }
 +
 +    //----------------------------------
 +    //  explicitWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the explicitWidth property.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private var _explicitWidth:Number;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#explicitWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function get explicitWidth():Number
 +    {
 +        return _explicitWidth;
 +    }
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function set explicitWidth(value:Number):void
 +    {
 +        _explicitWidth = value;
 +    }
 +
 +    //----------------------------------
 +    //  focusPane
 +    //----------------------------------
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get focusPane():Sprite
 +    {
 +        return null;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set focusPane(value:Sprite):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  ignorePadding
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the ignorePadding property.
 +     */
 +    private var _ignorePadding:Boolean = true;
 +
 +    /**
 +     *  If <code>true</code>, the <code>paddingLeft</code> and
 +     *  <code>paddingRight</code> styles will not add space
 +     *  around the text of the component.
 +     *  
 +     *  @default true
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get ignorePadding():Boolean
 +    {
 +        return _ignorePadding;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set ignorePadding(value:Boolean):void
 +    {
 +        _ignorePadding = value;
 +
 +        styleChanged(null);
 +    }
 +
 +    //----------------------------------
 +    //  imeMode
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the imeMode property.
 +     */
 +    private var _imeMode:String = null;
 +
 +    /**
 +     *  Specifies the IME (input method editor) mode.
 +     *  The IME enables users to enter text in Chinese, Japanese, and Korean.
 +     *  Flex sets the specified IME mode when the control gets the focus,
 +     *  and sets it back to the previous value when the control loses the focus.
 +     *
 +     * <p>The flash.system.IMEConversionMode class defines constants for the
 +     *  valid values for this property.
 +     *  You can also specify <code>null</code> to specify no IME.</p>
 +     *
 +     *  @see flash.system.IMEConversionMode
 +     *
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get imeMode():String
 +    {
 +        return _imeMode;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set imeMode(value:String):void
 +    {
 +        _imeMode = value;
 +    }
 +
 +    //----------------------------------
 +    //  includeInLayout
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the includeInLayout property.
 +     */
 +    private var _includeInLayout:Boolean = true;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#includeInLayout
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get includeInLayout():Boolean
 +    {
 +        return _includeInLayout;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set includeInLayout(value:Boolean):void
 +    {
 +        if (_includeInLayout != value)
 +        {
 +            _includeInLayout = value;
 +
 +            var p:IInvalidating = parent as IInvalidating;
 +            if (p)
 +            {
 +                p.invalidateSize();
 +                p.invalidateDisplayList();
 +            }
 +        }
 +    }
 +
 +    //----------------------------------
 +    //  inheritingStyles
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the inheritingStyles property.
 +     */
 +    private var _inheritingStyles:Object = StyleProtoChain.STYLE_UNINITIALIZED;
 +
 +    /**
 +     *  The beginning of this UITextField's chain of inheriting styles.
 +     *  The <code>getStyle()</code> method accesses
 +     *  <code>inheritingStyles[styleName]</code> to search the entire
 +     *  prototype-linked chain.
 +     *  This object is set up by the <code>initProtoChain()</code> method.
 +     *  You typically never need to access this property directly.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get inheritingStyles():Object
 +    {
 +        return _inheritingStyles;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set inheritingStyles(value:Object):void
 +    {
 +        _inheritingStyles = value;
 +    }
 +
 +    //----------------------------------
 +    //  initialized
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the initialize property.
 +     */
 +    private var _initialized:Boolean = false;
 +
 +    /**
 +     *  A flag that determines if an object has been through all three phases
 +     *  of layout validation (provided that any were required)
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get initialized():Boolean
 +    {
 +        return _initialized;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set initialized(value:Boolean):void
 +    {
 +        _initialized = value;
 +    }
 +
 +    //----------------------------------
 +    //  isHTML
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private function get isHTML():Boolean
 +    {
 +        return explicitHTMLText != null;
 +    }
 +
 +    //----------------------------------
 +    //  isPopUp
 +    //----------------------------------
 +    /**
 +     *  @copy mx.core.UIComponent#isPopUp
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get isPopUp():Boolean
 +    {
 +    return false;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set isPopUp(value:Boolean):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  maxHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#maxHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get maxHeight():Number
 +    {
 +        return UIComponent.DEFAULT_MAX_HEIGHT;
 +    }
 +
 +    //----------------------------------
 +    //  maxWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#maxWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get maxWidth():Number
 +    {
 +        return UIComponent.DEFAULT_MAX_WIDTH;
 +    }
 +
 +    //----------------------------------
 +    //  measuredHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#measuredHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get measuredHeight():Number
 +    {
 +        validateNow();
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			// If we use device fonts, then the unscaled height is 
 +			// textHeight * scaleX / scaleY
 +			
 +			if (!stage || embedFonts)
 +				return textHeight + TEXT_HEIGHT_PADDING;
 +			
 +			const m:Matrix = transform.concatenatedMatrix;
 +			
 +			return Math.abs((textHeight * m.a / m.d)) + TEXT_HEIGHT_PADDING;				
 +		}
 +		COMPILE::JS
 +		{
 +			return element.offsetHeight;
 +		}
 +    }
 +
 +    //----------------------------------
 +    //  measuredMinHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#measuredMinHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get measuredMinHeight():Number
 +    {
 +        return 0;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set measuredMinHeight(value:Number):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  measuredMinWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#measuredMinWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get measuredMinWidth():Number
 +    {
 +        return 0;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set measuredMinWidth(value:Number):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  measuredWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#measuredWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get measuredWidth():Number
 +    {
 +        validateNow();
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			// If we use device fonts, then the unscaled width is 
 +			// textWidth * scaleX / scaleY
 +			
 +			if (!stage || embedFonts)
 +				return textWidth + TEXT_WIDTH_PADDING;
 +			
 +			const m:Matrix = transform.concatenatedMatrix;      
 +			
 +			return Math.abs((textWidth * m.a / m.d)) + TEXT_WIDTH_PADDING;			
 +		}
 +		COMPILE::JS
 +		{
 +			return element.offsetWidth;
 +		}
 +    }
 +
 +    //----------------------------------
 +    //  minHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#minHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get minHeight():Number
 +    {
 +        return 0;
 +    }
 +
 +    //----------------------------------
 +    //  minWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#minWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get minWidth():Number
 +    {
 +        return 0;
 +    }
 +
 +    //----------------------------------
 +    //  moduleFactory
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the moduleFactory property.
 +     */
 +    private var _moduleFactory:IFlexModuleFactory;
 +    
 +    [Inspectable(environment="none")]
 +    
 +    /**
 +     *  The moduleFactory that is used to create TextFields in the correct SWF context. This is necessary so that
 +     *  embedded fonts will work.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get moduleFactory():IFlexModuleFactory
 +    {
 +        return _moduleFactory;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set moduleFactory(factory:IFlexModuleFactory):void
 +    {
 +        _moduleFactory = factory;
 +        _styleManager = null;
 +    }
 +
 +    //----------------------------------
 +    //  nestLevel
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the nestLevel property.
 +     */
 +    private var _nestLevel:int = 0;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#nestLevel
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get nestLevel():int
 +    {
 +        return _nestLevel;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set nestLevel(value:int):void
 +    {
 +        // If my parent hasn't been attached to the display list, then its nestLevel
 +        // will be zero.  If it tries to set my nestLevel to 1, ignore it.  We'll
 +        // update nest levels again after the parent is added to the display list.
 +        //
 +        // Also punt if the new value for nestLevel is the same as my current value.
 +        if (value > 1 && _nestLevel != value)
 +        {
 +            _nestLevel = value;
 +
 +            StyleProtoChain.initTextField(this);
 +            styleChangedFlag = true;
 +            validateNow();
 +        }
 +    }
 +    
 +    //----------------------------------
 +    //  nonInheritingStyles
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the nonInheritingStyles property.
 +     */
 +    private var _nonInheritingStyles:Object = StyleProtoChain.STYLE_UNINITIALIZED;
 +
 +    /**
 +     *  The beginning of this UITextField's chain of non-inheriting styles.
 +     *  The <code>getStyle()</code> method accesses
 +     *  <code>nonInheritingStyles[styleName]</code> method to search the entire
 +     *  prototype-linked chain.
 +     *  This object is set up by the <code>initProtoChain()</code> method.
 +     *  You typically never need to access this property directly.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get nonInheritingStyles():Object
 +    {
 +        return _nonInheritingStyles;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set nonInheritingStyles(value:Object):void
 +    {
 +        _nonInheritingStyles = value;
 +    }
 +
 +    //----------------------------------
 +    //  percentHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#percentHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function get percentHeight():Number
 +    {
 +        return NaN;
 +    }
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +     public function set percentHeight(value:Number):void
 +     {
 +     }
 +
 +    //----------------------------------
 +    //  percentWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#percentWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	 COMPILE::AS3
++	 COMPILE::SWF
 +    public function get percentWidth():Number
 +    {
 +        return NaN;
 +    }
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +     public function set percentWidth(value:Number):void
 +     {
 +     }
 +
 +    //----------------------------------
 +    //  processedDescriptors
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _processedDescriptors:Boolean = true;
 +
 +    /**
 +     *  Set to <code>true</code> after the <code>createChildren()</code>
 +     *  method creates any internal component children.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get processedDescriptors():Boolean
 +    {
 +        return _processedDescriptors;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set processedDescriptors(value:Boolean):void
 +    {
 +        _processedDescriptors = value;
 +    }
 +
 +    //----------------------------------
 +    //  styleManager
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     */
 +    private var _styleManager:IStyleManager2;
 +
 +    /**
 +     *  @private
 +     * 
 +     *  Returns the style manager used by this component.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public function get styleManager():IStyleManager2
 +    {
 +        if (!_styleManager)
 +        {
 +            _styleManager = StyleManager.getStyleManager(moduleFactory);
 +        }
 +        return _styleManager;
 +    }
 +    
 +    //----------------------------------
 +    //  styleName
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the styleName property.
 +     */
 +    private var _styleName:Object /* String, CSSStyleDeclaration, or UIComponent */;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#styleName
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get styleName():Object /* String, CSSStyleDeclaration, or UIComponent */
 +    {
 +        return _styleName;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set styleName(value:Object /* String, CSSStyleDeclaration, or UIComponent */):void
 +    {
 +        if (_styleName === value)
 +            return;
 +
 +        _styleName = value;
 +
 +        if (parent)
 +        {
 +            StyleProtoChain.initTextField(this);
 +            styleChanged("styleName");
 +        }
 +
 +		COMPILE::JS
 +		{
 +			element.className = styleName.toString();
 +		}
 +        // If we don't have a parent pointer yet, then we'll wait
 +        // and initialize the proto chain when the parentChanged()
 +        // method is called.
 +    }
 +
 +    //----------------------------------
 +    //  systemManager
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#systemManager
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get systemManager():ISystemManager
 +    {
 +        var o:DisplayObject = parent;
 +        while (o)
 +        {
 +            var ui:IUIComponent = o as IUIComponent;
 +            if (ui)
 +                return ui.systemManager;
 +
 +            o = o.parent;
 +        }
 +
 +        return null;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set systemManager(value:ISystemManager):void
 +    {
 +        // Not supported
 +    }
 +
 +    //----------------------------------
 +    //  nonZeroTextHeight
 +    //----------------------------------
 +
 +    /**
 +     *  Unlike textHeight, this returns a non-zero value
 +     *  even when the text is empty.
 +     *  In this case, it returns what the textHeight would be
 +     *  if the text weren't empty.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get nonZeroTextHeight():Number
 +    {
 +        if (super.text == "")
 +        {
 +            super.text = "Wj";
 +            var result:Number = textHeight;
 +            super.text = "";
 +            return result;
 +        }
 +        
 +        return textHeight;
 +    }
 + 
 +    //----------------------------------
 +    //  textHeight
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     *  TextField does not take into account the leading on the final
 +     *  line of text when measuring itself, yet will scroll if it is
 +     *  not given this extra height. This is a player bug bug that
 +     *  has been retired.
 +     */
 +    override public function get textHeight():Number
 +    {
 +        var result:Number = super.textHeight;
 +        if (numLines > 1)
 +            result += getLineMetrics(1).leading;
 +        
 +        return result;
 +    }
 +    
 +    //----------------------------------
 +    //  toolTip
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the toolTip property.
 +     */
 +    mx_internal var _toolTip:String;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#toolTip
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get toolTip():String
 +    {
 +        return _toolTip;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set toolTip(value:String):void
 +    {
 +        var oldValue:String = _toolTip;
 +        _toolTip = value;
 +
 +        ToolTipManager.registerToolTip(this, oldValue, value);
 +    }
 +
 +   //----------------------------------
 +    //  tweeningProperties
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#tweeningProperties
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get tweeningProperties():Array
 +    {
 +        return null;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set tweeningProperties(value:Array):void
 +    {
 +    }
 +
 +    //----------------------------------
 +    //  updateCompletePendingFlag
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the updateCompletePendingFlag property.
 +     */
 +    private var _updateCompletePendingFlag:Boolean = false;
 +
 +    /**
 +     *  A flag that determines if an object has been through all three phases
 +     *  of layout validation (provided that any were required)
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get updateCompletePendingFlag():Boolean
 +    {
 +        return _updateCompletePendingFlag;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set updateCompletePendingFlag(value:Boolean):void
 +    {
 +        _updateCompletePendingFlag = value;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods: TextField
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    override public function setTextFormat(format:TextFormat,
 +                                           beginIndex:int = -1,
 +                                           endIndex:int = -1):void
 +    {
 +        // It is an exception to call setTextFormat()
 +        // when styleSheet is applied.
 +        if (styleSheet)
 +            return;
 +
 +        super.setTextFormat(format, beginIndex, endIndex);
 +
 +        // Since changing the TextFormat will change the htmlText,
 +        // dispatch an event so that listeners can react to this.
 +        dispatchEvent(new Event("textFormatChange"));
 +    }   
 +    
 +    /**
 +     *  @private
 +	 *  TODO (aharui): I'm not seeing this in the doc
 +     */
 +	COMPILE::LATER
 +    override public function insertXMLText(beginIndex:int, endIndex:int, 
 +                                           richText:String, 
 +                                           pasting:Boolean = false):void
 +    {
 +        super.insertXMLText(beginIndex, endIndex, richText, pasting);
 +        
 +        dispatchEvent(new Event("textInsert"));
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    override public function replaceText(beginIndex:int, endIndex:int,
 +                                         newText:String):void
 +    {
 +        super.replaceText(beginIndex, endIndex, newText);
 +        
 +        dispatchEvent(new Event("textReplace"));
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Initializes this component.
 +     *
 +     *  <p>This method is required by the IUIComponent interface,
 +     *  but it actually does nothing for a UITextField.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function initialize():void
 +    {
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#getExplicitOrMeasuredWidth()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getExplicitOrMeasuredWidth():Number
 +    {
 +        return !isNaN(explicitWidth) ? explicitWidth : measuredWidth;
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#getExplicitOrMeasuredHeight()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getExplicitOrMeasuredHeight():Number
 +    {
 +        return !isNaN(explicitHeight) ? explicitHeight : measuredHeight;
 +    }
 +
 +    /**
 +     *  Sets the <code>visible</code> property of this UITextField object.
 +     * 
 +     *  @param visible <code>true</code> to make this UITextField visible, 
 +     *  and <code>false</code> to make it invisible.
 +     *
 +     *  @param noEvent <code>true</code> to suppress generating an event when you change visibility.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setVisible(visible:Boolean, noEvent:Boolean = false):void
 +    {
 +        this.visible = visible
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#setFocus()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function setFocus():void
 +    {
 +        systemManager.topOfDisplayList.focus = this;
 +    }
 +
 +    /**
 +     *  Returns a UITextFormat object that contains formatting information for this component. 
 +     *  This method is similar to the <code>getTextFormat()</code> method of the 
 +     *  flash.text.TextField class, but it returns a UITextFormat object instead 
 +     *  of a TextFormat object.
 +     *
 +     *  <p>The UITextFormat class extends the TextFormat class to add the text measurement methods
 +     *  <code>measureText()</code> and <code>measureHTMLText()</code>.</p>
 +     *
 +     *  @return An object that contains formatting information for this component.
 +     *
 +     *  @see mx.core.UITextFormat
 +     *  @see flash.text.TextField
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getUITextFormat():UITextFormat
 +    {
 +        validateNow();
 +        
 +        var textFormat:UITextFormat = new UITextFormat(creatingSystemManager());
 +        textFormat.moduleFactory = moduleFactory;
 +        
 +        textFormat.copyFrom(getTextFormat());
 +        
 +        textFormat.antiAliasType = antiAliasType;
 +        textFormat.gridFitType = gridFitType;
 +        textFormat.sharpness = sharpness;
 +        textFormat.thickness = thickness;
 +        
 +        return textFormat;
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#move()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function move(x:Number, y:Number):void
 +    {
 +        // Performance optimization: if the position hasn't changed, don't let
 +        // the player think that we're dirty
 +        if (this.x != x)
 +            this.x = x;
 +        if (this.y != y)           
 +            this.y = y;
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#setActualSize()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setActualSize(w:Number, h:Number):void
 +    {
 +        // Performance optimization: if the size hasn't changed, don't let
 +        // the player think that we're dirty
 +        if (width != w)
 +            width = w;
 +        if (height != h)
 +            height = h;
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#getStyle()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getStyle(styleProp:String):*
 +    {
 +        if (styleManager.inheritingStyles[styleProp])
 +        {        
 +            return inheritingStyles ?
 +                   inheritingStyles[styleProp] :
 +                   IStyleClient(parent).getStyle(styleProp);
 +        }
 +        else
 +        {       
 +            return nonInheritingStyles ?
 +                   nonInheritingStyles[styleProp] :
 +                   IStyleClient(parent).getStyle(styleProp);
 +        }   
 +    }
 +
 +    /**
 +     *  Does nothing.
 +     *  A UITextField cannot have inline styles.
 +     *
 +     *  @param styleProp Name of the style property.
 +     *
 +     *  @param newValue New value for the style.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setStyle(styleProp:String, value:*):void
 +    {
 +    }
 +
 +    /**
 +     *  This function is called when a UITextField object is assigned
 +     *  a parent.
 +     *  You typically never need to call this method.
 +     *
 +     *  @param p The parent of this UITextField object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function parentChanged(p:DisplayObjectContainer):void
 +    {
 +        if (!p)
 +        {
 +            _parent = null;
 +            _nestLevel = 0;
 +        }
 +        else if (p is IStyleClient)
 +        {
 +            _parent = p;
 +        }
 +        else if (p is SystemManager)
 +        {
 +            _parent = p;
 +        }
 +        else
 +        {
 +            _parent = p.parent;
 +        }
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#styleChanged()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function styleChanged(styleProp:String):void
 +    {
 +        styleChangedFlag = true;
 +
 +        if (!invalidateDisplayListFlag)
 +        {
 +            invalidateDisplayListFlag = true;
 +            if ("callLater" in parent)
 +                Object(parent).callLater(validateNow);
 +        }
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#validateNow()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function validateNow():void
 +    {
 +        // If we don't have a parent pointer yet, then any attempts to get
 +        // style information will fail.  Do nothing now - this function will
 +        // be called again when parentChanged is called.
 +        if (!parent)
 +            return;
 +        
 +        // If mirroring, setting width can change the transform matrix.
 +        if (!isNaN(explicitWidth) && super.width != explicitWidth)
 +            width = (explicitWidth > 4) ? explicitWidth : 4;
 +
 +        if (!isNaN(explicitHeight) && super.height != explicitHeight)
 +            super.height = explicitHeight;
 +        
 +        // Update transform.matrix to compensate for layout mirroring
 +        if (styleChangedFlag)
 +        {
 +            const oldMirror:Boolean = mirror;
 +            mirror = getStyle("layoutDirection") == LayoutDirection.RTL;
 +			COMPILE::LATER
 +			{
 +            if (mirror || oldMirror)
 +                validateTransformMatrix();
 +			}
 +        }
 +
 +        // Set the text format.
 +        if (styleChangedFlag)
 +        {
 +            var textFormat:TextFormat = getTextStyles();
 +            if (textFormat.font)
 +            {
 +                var fontModuleFactory:IFlexModuleFactory = (noEmbeddedFonts || !embeddedFontRegistry) ? 
 +                    null : 
 +                    embeddedFontRegistry.getAssociatedModuleFactory(
 +                        textFormat.font, textFormat.bold, textFormat.italic,
 +                        this, moduleFactory, creatingSystemManager(), false);
 +    
 +                embedFonts = (fontModuleFactory != null);
 +            }
 +            else
 +            {
 +                embedFonts = getStyle("embedFonts");
 +            }
 +
 +            if (embedFonts && getStyle("fontAntiAliasType") != undefined)
 +            {
 +                antiAliasType = getStyle("fontAntiAliasType");
 +                gridFitType = getStyle("fontGridFitType");
 +                sharpness = getStyle("fontSharpness");
 +                thickness = getStyle("fontThickness");
 +            }
 +
 +            if (!styleSheet)
 +            {
 +                super.setTextFormat(textFormat);
 +                defaultTextFormat = textFormat;
 +            }
 +                    
 +            // Since changing the TextFormat will change the htmlText,
 +            // dispatch an event so that listeners can react to this.
 +            dispatchEvent(new Event("textFieldStyleChange"));
 +        }
 +        
 +        styleChangedFlag = false;
 +        invalidateDisplayListFlag = false;
 +    }
 +    /**
 +     *  @private
 +     *  Update the transform.matrix based on the mirror flag.  This method must be 
 +     *  called when x, width, or layoutDirection changes.
 +     */
 +	COMPILE::LATER
 +    private function validateTransformMatrix():void
 +    {
 +        if (mirror)
 +        {
 +            const mirrorMatrix:Matrix = this.transform.matrix;
 +            mirrorMatrix.a = -1;
 +            mirrorMatrix.tx = _x + width;
 +            transform.matrix = mirrorMatrix;
 +        }
 +        else // layoutDirection changed, mirror=false, reset transform.matrix to its default
 +        {
 +            const defaultMatrix:Matrix = new Matrix();
 +            defaultMatrix.tx = _x;
 +            defaultMatrix.ty = y;
 +            transform.matrix = defaultMatrix;
 +        }
 +    }
 +    
 +    /**
 +     *  Returns the TextFormat object that represents 
 +     *  character formatting information for this UITextField object.
 +     *
 +     *  @return A TextFormat object. 
 +     *
 +     *  @see flash.text.TextFormat
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getTextStyles():TextFormat
 +    {
 +        var textFormat:TextFormat = new TextFormat();
 +
 +        var textAlign:String = getStyle("textAlign");
 +        // Map new Spark values that might be set in a selector
 +        // affecting both Halo and Spark components.
 +        var direction:String = getStyle("direction");
 +        if (textAlign == "start")
 +            textAlign = direction == "ltr" ? TextFormatAlign.LEFT : TextFormatAlign.RIGHT;
 +        else if (textAlign == "end")
 +            textAlign = direction == "ltr" ? TextFormatAlign.RIGHT : TextFormatAlign.LEFT;
 +        else if (textAlign == "justify" && direction == "rtl")
 +            textAlign = TextFormatAlign.RIGHT;
 +        textFormat.align = textAlign; 
 +        textFormat.bold = getStyle("fontWeight") == "bold";
 +        if (enabled)
 +        {
 +            if (explicitColor == StyleManager.NOT_A_COLOR)
 +                textFormat.color = getStyle("color");
 +            else
 +                textFormat.color = explicitColor;
 +        }
 +        else
 +        {
 +            textFormat.color = getStyle("disabledColor");
 +        }
 +        textFormat.font = StringUtil.trimArrayElements(getStyle("fontFamily"),",");
 +        textFormat.indent = getStyle("textIndent");
 +        textFormat.italic = getStyle("fontStyle") == "italic";
 +        var kerning:* = getStyle("kerning");
 +        // In Halo components based on TextField,
 +        // kerning is supposed to be true or false.
 +        // The default in TextField and Flex 3 is false
 +        // because kerning doesn't work for device fonts
 +        // and is slow for embedded fonts.
 +        // In Spark components based on TLF and FTE,
 +        // kerning is "auto", "on", or, "off".
 +        // The default in TLF and FTE is "auto"
 +        // (which means kern non-Asian characters)
 +        // because kerning works even on device fonts
 +        // and has miminal performance impact.
 +        // Since a CSS selector or parent container
 +        // can affect both Halo and Spark components,
 +        // we need to map "auto" and "on" to true
 +        // and "off" to false for Halo components
 +        // here and in UIFTETextField.
 +        // For Spark components, Label and CSSTextLayoutFormat,
 +        // do the opposite mapping of true to "on" and false to "off".
 +        // We also support a value of "default"
 +        // (which we set in the global selector)
 +        // to mean false for Halo and "auto" for Spark,
 +        // to get the recommended behavior in both sets of components.
 +        if (kerning == "auto" || kerning == "on")
 +            kerning = true;
 +        else if (kerning == "default" || kerning == "off")
 +            kerning = false;
 +        textFormat.kerning = kerning;
 +        textFormat.leading = getStyle("leading");
 +        textFormat.leftMargin = ignorePadding ? 0 : getStyle("paddingLeft");
 +        textFormat.letterSpacing = getStyle("letterSpacing");
 +        textFormat.rightMargin = ignorePadding ? 0 : getStyle("paddingRight");
 +        textFormat.size = getStyle("fontSize");
 +        textFormat.underline = getStyle("textDecoration") == "underline";
 +
 +        cachedTextFormat = textFormat;
 +        return textFormat;
 +    }
 +
 +    /**
 +     *  Sets the font color of the text.
 +     *
 +     *  @param color The new font color.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public function setColor(color:uint):void
 +    {
 +        explicitColor = color;
 +        styleChangedFlag = true;
 +        invalidateDisplayListFlag = true;
 +        
 +        validateNow();
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#invalidateSize()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function invalidateSize():void
 +    {
 +        invalidateDisplayListFlag = true;
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#invalidateDisplayList()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function invalidateDisplayList():void
 +    {
 +        invalidateDisplayListFlag = true;
 +    }
 +
 +    /**
 +     *  @copy mx.core.UIComponent#invalidateProperties()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function invalidateProperties():void
 +    {
 +    }
 +    
 +    /**
 +     *  Truncate text to make it fit horizontally in the area defined for the control, 
 +     *  and append an ellipsis, three periods (...), to the text.
 +     *
 +     *  @param truncationIndicator The text to be appended after truncation.
 +     *  If you pass <code>null</code>, a localizable string
 +     *  such as <code>"..."</code> will be used.
 +     *
 +     *  @return <code>true</code> if the text needed truncation.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function truncateToFit(truncationIndicator:String = null):Boolean
 +    {
 +        if (!truncationIndicator)
 +            truncationIndicator = truncationIndicatorResource;
 +                
 +        // Ensure that the proper CSS styles get applied to the textField
 +        // before measuring text.
 +        // Otherwise the callLater(validateNow) in styleChanged()
 +        // can apply the CSS styles too late.
 +        validateNow();
 +        
 +        var originalText:String = super.text;
 +
 +        untruncatedText = originalText;
 +
 +        var w:Number = width;
 +
 +        // Need to check if we should truncate, but it 
 +        // could be due to rounding error.  Let's check that it's not.
 +        // Examples of rounding errors happen with "South Africa" and "Game"
 +        // with verdana.ttf.
 +        if (originalText != "" && textWidth + TEXT_WIDTH_PADDING > w + 0.00000000000001)
 +        {
 +            // This should get us into the ballpark.
 +            var s:String = 
 +                originalText.slice(0,
 +                    Math.floor((w / (textWidth + TEXT_WIDTH_PADDING)) * originalText.length));
 +
 +            // This doesn't seem correct but it preserves previous behavior.
 +            // If one character doesn't fit the text is one character plus the
 +            // truncation indicator rather than just the truncation indicator as you would expect.
 +            if (s.length <= 1 && textWidth + TEXT_WIDTH_PADDING > w)
 +                super.text = originalText.charAt(0) + truncationIndicator;
 +            
 +            while (s.length > 1 && textWidth + TEXT_WIDTH_PADDING > w)
 +            {
 +                s = s.slice(0, -1);
 +                super.text = s + truncationIndicator;
 +            }
 +            
 +			var otl:int = originalText.length;
 +			var t:String = s;
 +			while (t.length < otl)
 +			{
 +				t = originalText.slice(0, t.length + 1);
 +				super.text = t + truncationIndicator;
 +				if (textWidth + TEXT_WIDTH_PADDING <= w)
 +					s = t;
 +				else
 +					break;
 +			} 
 +			if (s.length > 0)
 +				super.text = s + truncationIndicator;
 +			
 +            return true;
 +        }
 +
 +        return false;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private function changeHandler(event:Event):void
 +    {
 +        // If the user changes the text displayed by the TextField,
 +        // whatever htmlText might have been set is now irrelevant.
 +        // This means that we can no longer re-apply any HTML markup
 +        // after a CSS style change.
 +        explicitHTMLText = null;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function textFieldStyleChangeHandler(event:Event):void
 +    {
 +        // Some TextFormat in the TextField just changed.
 +        // If the TextField is displaying htmlText we need
 +        // to reset the htmlText that was last set
 +        // so that its markup is applied on top of the new TextFormat.
 +        if (explicitHTMLText != null)
 +            super.htmlText = explicitHTMLText;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function resourceManager_changeHandler(event:Event):void
 +    {
 +        truncationIndicatorResource = resourceManager.getString(
 +            "core", "truncationIndicator");
 +
 +        if (untruncatedText != null)
 +        {
 +            super.text = untruncatedText;
 +            truncateToFit();
 +        }
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  IUIComponent
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Returns <code>true</code> if the child is parented or owned by this object.
 +     *
 +     *  @param child The child DisplayObject.
 +     *
 +     *  @return <code>true</code> if the child is parented or owned by this UITextField object.
 +     * 
 +     *  @see #owner
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function owns(child:DisplayObject):Boolean
 +    {
 +        return child == this;
 +    }
 +
 +    //----------------------------------
 +    //  owner
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var _owner:DisplayObjectContainer;
 +
 +    /**
 +     *  By default, set to the parent container of this object. 
 +     *  However, if this object is a child component that is 
 +     *  popped up by its parent, such as the dropdown list of a ComboBox control, 
 +     *  the owner is the component that popped up this object. 
 +     *
 +     *  <p>This property is not managed by Flex, but by each component. 
 +     *  Therefore, if you use the <code>PopUpManger.createPopUp()</code> or 
 +     *  <code>PopUpManger.addPopUp()</code> method to pop up a child component, 
 +     *  you should set the <code>owner</code> property of the child component 
 +     *  to the component that popped it up.</p>
 +     * 
 +     *  <p>The default value is the value of the <code>parent</code> property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get owner():DisplayObjectContainer
 +    {
 +        return _owner ? _owner : parent;
 +    }
 +
 +    public function set owner(value:DisplayObjectContainer):void
 +    {
 +        _owner = value;
 +    }
 +
 +    private function creatingSystemManager():ISystemManager
 +    {
 +        return ((moduleFactory != null) && (moduleFactory is ISystemManager))
 +                ? ISystemManager(moduleFactory)
 +                : systemManager;
 +    }
 +    
 +    //----------------------------------
 +    //  IAutomationObject interface
 +    //----------------------------------
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function replayAutomatableEvent(event:Event):Boolean
 +    {
 +        if (automationDelegate)
 +            return automationDelegate.replayAutomatableEvent(event);
 +        return false;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function createAutomationIDPart(child:IAutomationObject):Object
 +    {
 +        return null;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, 
 +                                                                 properties:Array):Object
 +    {
 +        return null;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function resolveAutomationIDPart(criteria:Object):Array
 +    {
 +        return [];
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function getAutomationChildAt(index:int):IAutomationObject
 +    {
 +        return null;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function getAutomationChildren():Array
 +    {
 +        return null;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function get numAutomationChildren():int
 +    {
 +        return 0;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function get showInAutomationHierarchy():Boolean
 +    {
 +        return true;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set showInAutomationHierarchy(value:Boolean):void
 +    {
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function get automationTabularData():Object
 +    {
 +        return null;
 +    }
 +
- 	COMPILE::AS3
++	COMPILE::SWF
 +	private var _beads:Vector.<IBead>;
 +	
 +	/**
 +	 *  @copy org.apache.flex.core.IStrand#addBead()
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10.2
 +	 *  @playerversion AIR 2.6
 +	 *  @productversion FlexJS 0.0
 +	 */ 
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public function addBead(bead:IBead):void
 +	{
 +		if (!_beads)
 +			_beads = new Vector.<IBead>;
 +		bead.strand = this;		
 +	}
 +	
 +	/**
 +	 *  @copy org.apache.flex.core.IStrand#getBeadByType()
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10.2
 +	 *  @playerversion AIR 2.6
 +	 *  @productversion FlexJS 0.0
 +	 */
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public function getBeadByType(classOrInterface:Class):IBead
 +	{
 +		for each (var bead:IBead in _beads)
 +		{
 +			if (bead is classOrInterface)
 +				return bead;
 +		}
 +		return null;
 +	}
 +	
 +	/**
 +	 *  @copy org.apache.flex.core.IStrand#removeBead()
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10.2
 +	 *  @playerversion AIR 2.6
 +	 *  @productversion FlexJS 0.0
 +	 */
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public function removeBead(value:IBead):IBead	
 +	{
 +		var n:int = _beads.length;
 +		for (var i:int = 0; i < n; i++)
 +		{
 +			var bead:IBead = _beads[i];
 +			if (bead == value)
 +			{
 +				_beads.splice(i, 1);
 +				return bead;
 +			}
 +		}
 +		return null;
 +	}
 +	
 +	/**
 +	 *  @copy org.apache.flex.core.IUIBase#element
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10.2
 +	 *  @playerversion AIR 2.6
 +	 *  @productversion FlexJS 0.0
 +	 */
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public function get element():IFlexJSElement
 +	{
 +		return null;
 +	}
 +	
 +	/**
 +	 *  The method called when added to a parent.  This is a good
 +	 *  time to set up beads.
 +	 * 
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 10.2
 +	 *  @playerversion AIR 2.6
 +	 *  @productversion FlexJS 0.0
 +	 *  @flexjsignorecoercion Class
 +	 *  @flexjsignorecoercion Number
 +	 */
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public function addedToParent():void
 +	{
 +		// do nothing for now
 +	}
 +	
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public function get topMostEventDispatcher():IEventDispatcher
 +	{
 +		return root as IEventDispatcher;
 +	}
 +
- 	COMPILE::AS3
++	COMPILE::SWF
 +	private var _topOfDisplayList:TopOfDisplayList;
 +	
 +	/**
 +	 *  @flexjsignorecoercion flex.display.TopOfDisplayList
 +	 */
- 	COMPILE::AS3
++	COMPILE::SWF
 +	public function get topOfDisplayList():TopOfDisplayList
 +	{
 +		if (!_topOfDisplayList)
 +			_topOfDisplayList = new TopOfDisplayList(stage);
 +		return _topOfDisplayList;
 +	}
 +	
 +
 +}
 +
 +}


[24/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/UIDUtil.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/UIDUtil.as
index 91af364,0000000..2769d0a
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/UIDUtil.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/UIDUtil.as
@@@ -1,484 -1,0 +1,484 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.utils.ByteArray;
 +	import flash.utils.Dictionary;		
 +}
 +
 +import mx.core.IPropertyChangeNotifier;
 +import mx.core.IUIComponent;
 +import mx.core.IUID;
 +import mx.core.mx_internal;
 +
 +use namespace mx_internal;
 +
 +/**
 + *  The UIDUtil class is an all-static class
 + *  with methods for working with UIDs (unique identifiers) within Flex.
 + *  You do not create instances of UIDUtil;
 + *  instead you simply call static methods such as the
 + *  <code>UIDUtil.createUID()</code> method.
 + * 
 + *  <p><b>Note</b>: If you have a dynamic object that has no [Bindable] properties 
 + *  (which force the object to implement the IUID interface), Flex  adds an 
 + *  <code>mx_internal_uid</code> property that contains a UID to the object. 
 + *  To avoid having this field 
 + *  in your dynamic object, make it [Bindable], implement the IUID interface
 + *  in the object class, or set a <coded>uid</coded> property with a value.</p>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class UIDUtil
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Char codes for 0123456789ABCDEF
 +     */
 +	private static const ALPHA_CHAR_CODES:Array = [48, 49, 50, 51, 52, 53, 54, 
 +		55, 56, 57, 65, 66, 67, 68, 69, 70];
 +
 +    private static const DASH:int = 45;       // dash ascii
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private static const UIDBuffer:ByteArray = new ByteArray();       // static ByteArray used for UID generation to save memory allocation cost
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /** 
 +     *  This Dictionary records all generated uids for all existing items.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private static var uidDictionary:Dictionary = new Dictionary(true);
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Generates a UID (unique identifier) based on ActionScript's
 +     *  pseudo-random number generator and the current time.
 +     *
 +     *  <p>The UID has the form
 +     *  <code>"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"</code>
 +     *  where X is a hexadecimal digit (0-9, A-F).</p>
 +     *
 +     *  <p>This UID will not be truly globally unique; but it is the best
 +     *  we can do without player support for UID generation.</p>
 +     *
 +     *  @return The newly-generated UID.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	public static function createUID():String
 +    {
 +		var i:int;
 +		var j:int;
 +		
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        UIDBuffer.position = 0;
 +
 +        for (i = 0; i < 8; i++)
 +        {
 +            UIDBuffer.writeByte(ALPHA_CHAR_CODES[int(Math.random() * 16)]);
 +        }
 +
 +        for (i = 0; i < 3; i++)
 +        {
 +            UIDBuffer.writeByte(DASH);
 +            for (j = 0; j < 4; j++)
 +            {
 +                UIDBuffer.writeByte(ALPHA_CHAR_CODES[int(Math.random() * 16)]);
 +            }
 +        }
 +
 +        UIDBuffer.writeByte(DASH);
 +
 +        var time:uint = new Date().getTime(); // extract last 8 digits
 +        var timeString:String = time.toString(16).toUpperCase();
 +        // 0xFFFFFFFF milliseconds ~= 3 days, so timeString may have between 1 and 8 digits, hence we need to pad with 0s to 8 digits
 +        for (i = 8; i > timeString.length; i--)
 +            UIDBuffer.writeByte(48);
 +        UIDBuffer.writeUTFBytes(timeString);
 +
 +        for (i = 0; i < 4; i++)
 +        {
 +            UIDBuffer.writeByte(ALPHA_CHAR_CODES[int(Math.random() * 16)]);
 +        }
 +
 +        return UIDBuffer.toString();
 +		}
 +		COMPILE::JS
 +		{
 +			var s:String = "";
 +			for (i = 0; i < 8; i++)
 +			{
 +				s += ALPHA_CHAR_CODES[int(Math.random() * 16)];
 +			}
 +			
 +			for (i = 0; i < 3; i++)
 +			{
 +				s += DASH;
 +				for (j = 0; j < 4; j++)
 +				{
 +					s += ALPHA_CHAR_CODES[int(Math.random() * 16)];
 +				}
 +			}
 +			
 +			s += DASH;
 +			
 +			var time:uint = new Date().getTime(); // extract last 8 digits
 +			var timeString:String = time.toString(16).toUpperCase();
 +			// 0xFFFFFFFF milliseconds ~= 3 days, so timeString may have between 1 and 8 digits, hence we need to pad with 0s to 8 digits
 +			for (i = 8; i > timeString.length; i--)
 +				s += "0";
 +			s += timeString;
 +			
 +			for (i = 0; i < 4; i++)
 +			{
 +				s += ALPHA_CHAR_CODES[int(Math.random() * 16)];
 +			}
 +			
 +			return s;
 +		}
 +    }
 +
 +    /**
 +     * Converts a 128-bit UID encoded as a ByteArray to a String representation.
 +     * The format matches that generated by createUID. If a suitable ByteArray
 +     * is not provided, null is returned.
 +     * 
 +     * @param ba ByteArray 16 bytes in length representing a 128-bit UID.
 +     * 
 +     * @return String representation of the UID, or null if an invalid
 +     * ByteArray is provided.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public static function fromByteArray(ba:ByteArray):String
 +    {
 +        if (ba != null && ba.length >= 16 && ba.bytesAvailable >= 16)
 +        {
 +            UIDBuffer.position = 0;
 +            var index:uint = 0;
 +            for (var i:uint = 0; i < 16; i++)
 +            {
 +                if (i == 4 || i == 6 || i == 8 || i == 10)
 +                    UIDBuffer.writeByte(DASH); // Hyphen char code
 +
 +                var b:int = ba.readByte();
 +                UIDBuffer.writeByte(ALPHA_CHAR_CODES[(b & 0xF0) >>> 4]);
 +                UIDBuffer.writeByte(ALPHA_CHAR_CODES[(b & 0x0F)]);
 +            }
 +            return UIDBuffer.toString();
 +        }
 +
 +        return null;
 +    }
 +
 +    /**
 +     * A utility method to check whether a String value represents a 
 +     * correctly formatted UID value. UID values are expected to be 
 +     * in the format generated by createUID(), implying that only
 +     * capitalized A-F characters in addition to 0-9 digits are
 +     * supported.
 +     * 
 +     * @param uid The value to test whether it is formatted as a UID.
 +     * 
 +     * @return Returns true if the value is formatted as a UID.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function isUID(uid:String):Boolean
 +    {
 +        if (uid != null && uid.length == 36)
 +        {
 +            for (var i:uint = 0; i < 36; i++)
 +            {
 +                var c:Number = uid.charCodeAt(i);
 +
 +                // Check for correctly placed hyphens
 +                if (i == 8 || i == 13 || i == 18 || i == 23)
 +                {
 +                    if (c != DASH)
 +                    {
 +                        return false;
 +                    }
 +                }
 +                // We allow capital alpha-numeric hex digits only
 +                else if (c < 48 || c > 70 || (c > 57 && c < 65))
 +                {
 +                    return false;
 +                }
 +            }
 +
 +            return true;
 +        }
 +
 +        return false;
 +    }
 +
 +    /**
 +     * Converts a UID formatted String to a ByteArray. The UID must be in the
 +     * format generated by createUID, otherwise null is returned.
 +     * 
 +     * @param String representing a 128-bit UID
 +     * 
 +     * @return ByteArray 16 bytes in length representing the 128-bits of the
 +     * UID or null if the uid could not be converted.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    public static function toByteArray(uid:String):ByteArray
 +    {
 +        if (isUID(uid))
 +        {
 +            var result:ByteArray = new ByteArray();
 +
 +            for (var i:uint = 0; i < uid.length; i++)
 +            {
 +                var c:String = uid.charAt(i);
 +                if (c == "-")
 +                    continue;
 +                var h1:uint = getDigit(c);
 +                i++;
 +                var h2:uint = getDigit(uid.charAt(i));
 +                result.writeByte(((h1 << 4) | h2) & 0xFF);
 +            }
 +            result.position = 0;
 +            return result;
 +        }
 +
 +        return null;
 +    }
 +
 +    /**
 +     *  Returns the UID (unique identifier) for the specified object.
 +     *  If the specified object doesn't have an UID
 +     *  then the method assigns one to it.
 +     *  If a map is specified this method will use the map
 +     *  to construct the UID.
 +     *  As a special case, if the item passed in is null,
 +     *  this method returns a null UID.
 +     *  
 +     *  @param item Object that we need to find the UID for.
 +     *
 +     *  @return The UID that was either found or generated.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function getUID(item:Object):String
 +    {
 +        var result:String = null;
 +
 +        if (item == null)
 +            return result;
 +
 +        if (item is IUID)
 +        {
 +            result = IUID(item).uid;
 +            if (result == null || result.length == 0)
 +            {
 +                result = createUID();
 +                IUID(item).uid = result;
 +            }
 +        }
 +        else if ((item is IPropertyChangeNotifier) &&
 +                 !(item is IUIComponent))
 +        {
 +            result = IPropertyChangeNotifier(item).uid;
 +            if (result == null || result.length == 0)
 +            {
 +                result = createUID();
 +                IPropertyChangeNotifier(item).uid = result;
 +            }
 +        }
 +        else if (item is String)
 +        {
 +            return item as String;
 +        }
 +        else
 +        {
 +            try
 +            {
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +                // We don't create uids for XMLLists, but if
 +                // there's only a single XML node, we'll extract it.
 +                if (item is XMLList && item.length == 1)
 +                    item = item[0];
 +
 +                if (item is XML)
 +                {
 +                    // XML nodes carry their UID on the
 +                    // function-that-is-a-hashtable they can carry around.
 +                    // To decorate an XML node with a UID,
 +                    // we need to first initialize it for notification.
 +                    // There is a potential performance issue here,
 +                    // since notification does have a cost, 
 +                    // but most use cases for needing a UID on an XML node also
 +                    // require listening for change notifications on the node.
 +                    var xitem:XML = XML(item);
 +                    var nodeKind:String = xitem.nodeKind();
 +                    if (nodeKind == "text" || nodeKind == "attribute")
 +                        return xitem.toString();
 +
 +                    var notificationFunction:Function = xitem.notification();
 +                    if (!(notificationFunction is Function))
 +                    {
 +                        // The xml node hasn't already been initialized
 +                        // for notification, so do so now.
 +                        notificationFunction =
 +                            XMLNotifier.initializeXMLForNotification(); 
 +                        xitem.setNotification(notificationFunction);
 +                    }
 +                    
 +                    // Generate a new uid for the node if necessary.
 +                    if (notificationFunction["uid"] == undefined)
 +                        result = notificationFunction["uid"] = createUID();
 +
 +                    result = notificationFunction["uid"];
 +                }
 +                else
 +                {
 +                    if ("mx_internal_uid" in item)
 +                        return item.mx_internal_uid;
 +
 +                    if ("uid" in item)
 +                        return item.uid;
 +
 +                    result = uidDictionary[item];
 +
 +                    if (!result)
 +                    {
 +                        result = createUID();
 +                        try 
 +                        {
 +                            item.mx_internal_uid = result;
 +                        }
 +                        catch(e:Error)
 +                        {
 +                            uidDictionary[item] = result;
 +                        }
 +                    }
 +                }
 +				}
 +				COMPILE::JS
 +				{
 +					if ("mx_internal_uid" in item)
 +						return item.mx_internal_uid;
 +					
 +					if ("uid" in item)
 +						return item.uid;
 +					
 +					item["mx_internal_uid"] = result = createUID();
 +				}
 +            }
 +            catch(e:Error)
 +            {
 +                result = item.toString();
 +            }
 +        }
 +
 +        return result;
 +    }
 +
 +    /**
 +     * Returns the decimal representation of a hex digit.
 +     * @private
 +     */
 +    private static function getDigit(hex:String):uint
 +    {
 +        switch (hex) 
 +        {
 +            case "A": 
 +            case "a":           
 +                return 10;
 +            case "B":
 +            case "b":
 +                return 11;
 +            case "C":
 +            case "c":
 +                return 12;
 +            case "D":
 +            case "d":
 +                return 13;
 +            case "E":
 +            case "e":
 +                return 14;                
 +            case "F":
 +            case "f":
 +                return 15;
 +            default:
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +                return new uint(hex);
 +				}
 +				COMPILE::JS
 +				{
 +				return parseInt(hex, 16);
 +				}
 +        }    
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/test/flex/build.xml
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/test/flex/build.xml
index 7395390,0000000..dc226ab
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/test/flex/build.xml
+++ b/frameworks/projects/MX/src/test/flex/build.xml
@@@ -1,229 -1,0 +1,229 @@@
 +<?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="MX.test" default="main" basedir=".">
 +    <property name="FLEXJS_HOME" location="../../../../../.."/>
 +    
 +    <property file="${FLEXJS_HOME}/env.properties"/>
 +    <property environment="env"/>
 +    <property file="${FLEXJS_HOME}/build.properties"/>
 +    <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
 +    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
 +    <property name="target.name" value="MX-${release.version}.swc" />
 +    
 +	<condition property="browser" value="C:/Program Files/Internet Explorer/iexplore.exe">
 +		<os family="windows"/>
 +    </condition>
 +    <condition property="browser" value="/Applications/Safari.app/Contents/MacOS/Safari">
 +        <os family="mac"/>
 +    </condition>
 +	
 +    <property name="report.dir" value="${basedir}/out" />
 +    
 +    <available file="${FLEXJS_HOME}/../flex-flexunit"
 +        type="dir"
 +        property="FLEXUNIT_HOME"
 +        value="${FLEXJS_HOME}/../flex-flexunit" />
 +    
 +    <available file="${FLEXJS_HOME}/../flexunit"
 +        type="dir"
 +        property="FLEXUNIT_HOME"
 +        value="${FLEXJS_HOME}/../flexunit" />
 +	
 +    <available file="${env.FLEXUNIT_HOME}"
 +        type="dir"
 +        property="FLEXUNIT_HOME"
 +        value="${env.FLEXUNIT_HOME}"/>
 +    
 +    <available file="${FLEXUNIT_HOME}/FlexUnit4/target"
 +        type="dir"
 +        property="FLEXUNIT_LIBPATH1"
 +        value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4/target/flexunit-4.3.0-20140410-as3_4.12.0.swc" />
 +    <property name="FLEXUNIT_LIBPATH1" value="-library-path+=${FLEXUNIT_HOME}/flexunit" />
 +        
 +    <available file="${FLEXUNIT_HOME}/FlexUnit4CIListener/target"
 +        type="dir"
 +        property="FLEXUNIT_LIBPATH2"
 +        value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4CIListener/target" />
 +    <property name="FLEXUNIT_LIBPATH2" value="-define=CONFIG::dummy,false" />
 +        
 +    <available file="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target"
 +        type="dir"
 +        property="FLEXUNIT_CLASSPATH"
 +        value="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target" />
 +    <property name="FLEXUNIT_CLASSPATH" value="${FLEXUNIT_HOME}/flexunit" />
 +
 +    <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>
 +
 +
 +    <target name="main" depends="clean,compile,test" description="Clean test of ${target.name}">
 +    </target>
 +
 +    <target name="clean">
 +        <delete failonerror="false">
 +            <fileset dir="${basedir}">
 +                <include name="FlexUnitFlexJSApplication.swf"/>
 +            </fileset>
 +        </delete>
 +        <delete failonerror="false">
 +            <fileset dir="${basedir}/bin">
 +                <include name="**/**"/>
 +            </fileset>
 +        </delete>
 +    </target>
 +    
 +    <path id="lib.path">
 +      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
 +    </path>
 +
 +    <target name="compile" description="Compiles TestCompile.swf">
 +        <echo message="Compiling TestCompile.swf"/>
 +        <echo message="FLEXJS_HOME: ${FLEXJS_HOME}"/>
 +        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
 +        <echo message="FLEXUNIT_HOME: ${FLEXUNIT_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"/>
 +        <!--
 +            Link in the classes (and their dependencies) for the MXML tags
 +            listed in this project's manifest.xml.
 +            Also link the additional classes (and their dependencies)
 +            listed in FlexJSUIClasses.as,
 +            because these aren't referenced by the manifest classes.
 +            Keep the standard metadata when compiling.
 +            Include the appropriate CSS files and assets in the SWC.
 +            Don't include any resources in the SWC.
 +            Write a bundle list of referenced resource bundles
 +            into the file bundles.properties in this directory.
 +        -->
 +        <mxmlc fork="true"
 +            file="${basedir}/src/TestCompile.mxml"
 +            output="${basedir}/src/TestCompile.swf">
 +            <jvmarg line="${mxmlc.jvm.args}"/>
 +            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
 +            <arg value="-debug" />
-             <arg value="-define=COMPILE::AS3,true" />
++            <arg value="-define=COMPILE::SWF,true" />
 +            <arg value="-define=COMPILE::JS,false" />
 +            <arg value="-define=COMPILE::LATER,false" />
 +            <arg value="-define=CONFIG::performanceInstrumentation,false" />
 +            <arg value="+playerglobal.version=${playerglobal.version}" />
 +            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
 +            <arg value="-source-path+=${FLEXJS_HOME}/frameworks/projects/MX/src/main/flex" />
 +            <arg value="-library-path+=${FLEXJS_HOME}/frameworks/libs" />
 +            <!-- need to figure out better way to find these -->
 +            <arg value="-library-path+=${FLEXJS_HOME}/../flex-sdk/frameworks/locale/en_US" />
 +            <arg value="${FLEXUNIT_LIBPATH1}" />
 +            <arg value="${FLEXUNIT_LIBPATH2}" />
 +        </mxmlc>
 +    </target>
 +
 +    <target name="test">
 +        <echo message="Compiling TestCompile.js"/>
 +        <echo message="FLEXJS_HOME: ${FLEXJS_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" />
 +            <arg value="${theme_arg}" />
 +            <arg value="-compiler.mxml.children-as-data" />
 +            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
 +            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
 +            <arg value="-compiler.binding-value-change-event-type=valueChange" />
 +            <arg value="+playerglobal.version=${playerglobal.version}" />
 +            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
 +            <arg value="${extlib_arg}" />
 +            <arg value="${opt1_arg}" />
 +            <arg value="${opt2_arg}" />
 +            <arg value="-library-path+=${FLEXJS_HOME}/frameworks/libs" />
 +            <!-- need to figure out better way to find these -->
 +            <arg value="-external-library-path+=${FLEXJS_HOME}/../flex-sdk/frameworks/locale/en_US" />
 +            <arg value="-closure-lib=${GOOG_HOME}" />
 +            <arg value="-js-output-type=FLEXJS" />
 +            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" />
 +            <arg value="${basedir}/src/TestCompile.mxml" />
 +        </java>
 +        <fail>
 +            <condition>
 +                <not>
 +                    <or>
 +                        <equals arg1="${errorCode}" arg2="0" />
 +                        <equals arg1="${errorCode}" arg2="2" />
 +                    </or>
 +                </not>
 +            </condition>
 +        </fail>
 +        <!--
 +        <taskdef resource="flexUnitTasks.tasks">
 +            <classpath>
 +                <fileset dir="${FLEXUNIT_CLASSPATH}">
 +                    <include name="flexUnitTasks*.jar" />
 +                </fileset>
 +            </classpath>
 +        </taskdef>
 +		<mkdir dir="${report.dir}" />
 +		<flexunit
 +            swf="${basedir}/FlexUnitFlexJSApplication.swf"
 +		    workingDir="${basedir}"
 +		    toDir="${report.dir}"
 +			haltonfailure="false"
 +			verbose="true"
 +			localTrusted="true"
 +			timeout="90000">
 +            <source dir="${FLEXJS_HOME}/frameworks/projects/Core/src/main/flex" />
 +            <library dir="${FLEXJS_HOME}/frameworks/libs" />
 +        </flexunit>
 +        -->
 +		<!-- Generate readable JUnit-style reports
 +		<junitreport todir="${report.dir}">
 +			<fileset dir="${report.dir}">
 +				<include name="TEST-*.xml" />
 +			</fileset>
 +			<report format="frames" todir="${report.dir}/html" />
 +		</junitreport>
 +         -->
 +    </target>
 +</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/test/flex/src/TestCompile.mxml
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/test/flex/src/TestCompile.mxml
index 6601e6c,0000000..7ad8c1b
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/test/flex/src/TestCompile.mxml
+++ b/frameworks/projects/MX/src/test/flex/src/TestCompile.mxml
@@@ -1,44 -1,0 +1,44 @@@
 +<?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:mx="library://ns.apache.org/flexjs/mx"
 +				xmlns:js="library://ns.apache.org/flexjs/basic" 
 +                   applicationComplete="runTests()"
 +                   >
 +    <fx:Script>
 +        <![CDATA[
 +			import org.apache.flex.core.IUIBase;
 +            public function runTests() : void
 +            {
 +				var foo:Object = this as IUIBase;
 +            }
 +            
 +        ]]>
 +    </fx:Script>
 +    <js:valuesImpl>
 +        <js:SimpleValuesImpl />
 +    </js:valuesImpl>
 +	<js:initialView>
- 		<js:ViewBase>
++		<js:View>
 +			<mx:UIComponent />
- 		</js:ViewBase>
++		</js:View>
 +	</js:initialView>
 +</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
index 0000000,6aaa9d3..524797b
mode 000000,100644..100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManagerView.as
@@@ -1,0 -1,43 +1,45 @@@
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ //  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 org.apache.flex.mobile
+ {
++	import org.apache.flex.core.IVisualElement;
++	
+ 	/**
+ 	 * The IViewManagerView interface is implemented by any class that can be managed by
+ 	 * an IViewManager.
+ 	 *  
+ 	 *  @langversion 3.0
+ 	 *  @playerversion Flash 10.2
+ 	 *  @playerversion AIR 2.6
+ 	 *  @productversion FlexJS 0.0
+ 	 */
 -	public interface IViewManagerView
++	public interface IViewManagerView extends IVisualElement
+ 	{
+ 		/**
+ 		 * The parent view manager.
+ 		 *  
+ 		 *  @langversion 3.0
+ 		 *  @playerversion Flash 10.2
+ 		 *  @playerversion AIR 2.6
+ 		 *  @productversion FlexJS 0.0
+ 		 */
+ 		function get viewManager():IViewManager;
+ 		function set viewManager(value:IViewManager):void;
+ 	}
+ }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
index aa1dfd7,ffa26c5..9e4180e
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
@@@ -144,15 -144,14 +144,15 @@@ package org.apache.flex.mobil
  		 *  @playerversion Flash 10.2
  		 *  @playerversion AIR 2.6
  		 *  @productversion FlexJS 0.0
- 		 *  @flexjsignorecoercion org.apache.flex.mobile.IView
++		 *  @flexjsignorecoercion org.apache.flex.mobile.IViewManagerView
  		 */
  		public function pop():void
  		{
  			if (ViewManagerModel(model).views.length > 1) {
- 				var lastView:IView = ViewManagerModel(model).popView() as IView;
 -				var lastView:Object = ViewManagerModel(model).popView();
++				var lastView:IViewManagerView = ViewManagerModel(model).popView() as IViewManagerView;
  				removeElement(_topView);
  				addElement(lastView);
- 				_topView = lastView;
+ 				_topView = lastView as IViewManagerView;
  				
  				dispatchEvent( new Event("viewChanged") );
  			}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
index b4d8be6,6d7175e..9b55e5a
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
@@@ -170,10 -170,10 +170,10 @@@ package org.apache.flex.mobil
  			if (n > 0) {
  				for (var i:int = 0; i < n; i++)
  				{
- 					var view:IView = ViewManagerModel(model).views[i] as IView;
+ 					var view:IViewManagerView = ViewManagerModel(model).views[i] as IViewManagerView;
  					view.viewManager = this;
  					if (i == 0) {
 -						addElement(view, true);
 +						addElement(view);
  					}
  				}
  				ViewManagerModel(model).selectedIndex = 0;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ToggleSwitchView.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as
index 0000000,f314fad..955a3e1
mode 000000,100644..100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerViewBase.as
@@@ -1,0 -1,165 +1,166 @@@
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ //  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 org.apache.flex.mobile.beads
+ {
+ 	import org.apache.flex.core.IBeadModel;
+ 	import org.apache.flex.core.IBeadView;
+ 	import org.apache.flex.core.IStrand;
+ 	import org.apache.flex.core.IUIBase;
+ 	import org.apache.flex.core.IViewportModel;
+ 	import org.apache.flex.core.UIBase;
+ 	import org.apache.flex.events.IEventDispatcher;
+ 	import org.apache.flex.events.Event;
+ 	import org.apache.flex.html.Container;
+ 	import org.apache.flex.html.beads.layouts.HorizontalLayout;
+ 	import org.apache.flex.mobile.IViewManagerView;
+ 	import org.apache.flex.mobile.chrome.NavigationBar;
+ 	import org.apache.flex.mobile.models.ViewManagerModel;
+ 	
+ 	/**
+ 	 * The ViewManagerViewBase creates the visual elements of the StackedViewManager. This
+ 	 * includes a NavigationBar, ToolBar, and contentArea.
+ 	 *  
+ 	 *  @langversion 3.0
+ 	 *  @playerversion Flash 10.2
+ 	 *  @playerversion AIR 2.6
+ 	 *  @productversion FlexJS 0.0
+ 	 */
+ 	public class ViewManagerViewBase implements IBeadView
+ 	{
+ 		/**
+ 		 * Constructor.
+ 		 *  
+ 		 *  @langversion 3.0
+ 		 *  @playerversion Flash 10.2
+ 		 *  @playerversion AIR 2.6
+ 		 *  @productversion FlexJS 0.0
+ 		 */
+ 		public function ViewManagerViewBase()
+ 		{
+ 			super();
+ 		}
+ 		
+ 		public function get host():IUIBase
+ 		{
+ 			return _strand as IUIBase;
+ 		}
+ 		public function set host(value:IUIBase):void
+ 		{
+ 			// not implemented; getter only.
+ 		}
+ 		
+ 		private var _navigationBar:NavigationBar;
+ 		public function get navigationBar():NavigationBar
+ 		{
+ 			return _navigationBar;
+ 		}
+ 		public function set navigationBar(value:NavigationBar):void
+ 		{
+ 			// not implemented; getter only.
+ 		}
+ 		
+ 		private var _strand:IStrand;
+ 		public function get strand():IStrand
+ 		{
+ 			return _strand;
+ 		}
+ 		public function set strand(value:IStrand):void
+ 		{
+ 			_strand = value;
+ 			UIBase(_strand).addEventListener("sizeChanged", sizeChangedHandler);
+ 			UIBase(_strand).addEventListener("widthChanged", sizeChangedHandler);
+ 			UIBase(_strand).addEventListener("heightChanged", sizeChangedHandler);
+ 			
+ 			var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
+ 			model.addEventListener("selectedIndexChanged", viewsChangedHandler);
+ 
+ 			if (model.navigationBarItems)
+ 			{
+ 				_navigationBar = new NavigationBar();
+ 				_navigationBar.controls = model.navigationBarItems;
+ 				_navigationBar.addBead(new HorizontalLayout());
 -				UIBase(_strand).addElement(_navigationBar, false);
++				// no event is expected
++				UIBase(_strand).addElement(_navigationBar);
+ 			}
+ 		}
+ 		
+ 		/**
+ 		 * @private
+ 		 */
+ 		protected function viewsChangedHandler(event:Event):void
+ 		{
+ 			layoutChromeElements();
+ 		}
+ 		
+ 		/**
+ 		 * @private
+ 		 */
+ 		protected function sizeChangedHandler(event:Event):void
+ 		{
+ 			layoutChromeElements();
+ 		}
+ 		
+ 		/**
+ 		 * @private
+ 		 */
+ 		protected function layoutChromeElements():void
+ 		{
+ 			var host:UIBase = _strand as UIBase;
+ 			var contentAreaY:Number = 0;
+ 			var contentAreaHeight:Number = host.height;
+ 			
+ 			var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
+ 			
+ 			if (_navigationBar)
+ 			{
+ 				_navigationBar.x = 0;
+ 				_navigationBar.y = 0;
+ 				_navigationBar.width = host.width;
+ 				
+ 				contentAreaHeight -= _navigationBar.height;
+ 				contentAreaY = _navigationBar.height;
+ 				
+ 				model.navigationBar = _navigationBar;
+ 			}
+ 			
+ 			model.contentX = 0;
+ 			model.contentY = contentAreaY;
+ 			model.contentWidth = host.width;
+ 			model.contentHeight = contentAreaHeight;
+ 			
+ 			sizeViewsToFitContentArea();
+ 		}
+ 		
+ 		protected function sizeViewsToFitContentArea():void
+ 		{
+ 			var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
+ 			
+ 			var n:int = ViewManagerModel(model).views.length;
+ 			if (n > 0) {
+ 				for (var i:int = 0; i < n; i++)
+ 				{
+ 					var view:IViewManagerView = ViewManagerModel(model).views[i] as IViewManagerView;
+ 					UIBase(view).x = model.contentX;
+ 					UIBase(view).y = model.contentY;
+ 					UIBase(view).setWidthAndHeight(model.contentWidth, model.contentHeight, true);
+ 				}
+ 			}
+ 		}
+ 	}
+ }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
index fd1f7b3,cf69bd1..0777403
--- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
@@@ -65,28 -65,6 +65,28 @@@ package org.apache.flex.reflectio
              }
              return _rawData;
          }
 +		
 +		public function get dynamic():Boolean
 +		{
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +				return Boolean(rawData.@dynamic);
 +			}
 +			COMPILE::JS
 +			{
 +				var data:Object = rawData;
 +				var name:String = data.names[0].qName;
 +				var def:Object = getDefinitionByName(name);
 +				var rdata:* = def.prototype.FLEXJS_REFLECTION_INFO();
 +				if (rdata !== undefined)
 +				{
 +					return Boolean(rdata.dynamic);
 +				}
 +				return false;
 +			}
 +					
 +		}        
 +		
          /**
           *  @flexjsignorecoercion XML 
           */

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ContainerTest/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --cc manualtests/ContainerTest/src/models/ProductsModel.as
index b69b1dc,b69b1dc..0e9c530
--- a/manualtests/ContainerTest/src/models/ProductsModel.as
+++ b/manualtests/ContainerTest/src/models/ProductsModel.as
@@@ -41,4 -41,4 +41,4 @@@ package model
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ContainerTest/src/products/Product.as
----------------------------------------------------------------------
diff --cc manualtests/ContainerTest/src/products/Product.as
index b4854a3,b4854a3..2f30c48
--- a/manualtests/ContainerTest/src/products/Product.as
+++ b/manualtests/ContainerTest/src/products/Product.as
@@@ -40,4 -40,4 +40,4 @@@ package product
  			return title;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/models/MyGridPresentation.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/models/MyGridPresentation.as
index a724722,a724722..4c53c9c
--- a/manualtests/DataGridXcompile/src/models/MyGridPresentation.as
+++ b/manualtests/DataGridXcompile/src/models/MyGridPresentation.as
@@@ -29,4 -29,4 +29,4 @@@ package model
  			this.columnLabels = ["ID","Title","Inventory"];
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/models/ProductsModel.as
index be0bfe2,be0bfe2..5365251
--- a/manualtests/DataGridXcompile/src/models/ProductsModel.as
+++ b/manualtests/DataGridXcompile/src/models/ProductsModel.as
@@@ -50,4 -50,4 +50,4 @@@ package model
  			// ignore
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/org/apache/flex/core/IDataGridPresentationModel.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/org/apache/flex/core/IDataGridPresentationModel.as
index 34a5d84,34a5d84..84f5364
--- a/manualtests/DataGridXcompile/src/org/apache/flex/core/IDataGridPresentationModel.as
+++ b/manualtests/DataGridXcompile/src/org/apache/flex/core/IDataGridPresentationModel.as
@@@ -28,4 -28,4 +28,4 @@@ package org.apache.flex.cor
  		function get rowHeight():Number;
  		function set rowHeight(value:Number):void;
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/DataGrid.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/DataGrid.as
index b4ded72,b4ded72..5c0d5cb
--- a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/DataGrid.as
+++ b/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/DataGrid.as
@@@ -57,4 -57,4 +57,4 @@@ package org.apache.flex.html.customCont
  			return IDataGridModel(model).selectedIndex;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataGridView.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataGridView.as
index 2b1bf61,2b1bf61..99f9bc9
--- a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataGridView.as
+++ b/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataGridView.as
@@@ -24,4 -24,4 +24,4 @@@ package org.apache.flex.html.customCont
  	{
  		
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataProviderItemRendererMapper.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataProviderItemRendererMapper.as
index 8a406de,8a406de..77e98f8
--- a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataProviderItemRendererMapper.as
+++ b/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/IDataProviderItemRendererMapper.as
@@@ -31,4 -31,4 +31,4 @@@ package org.apache.flex.html.customCont
          function get itemRendererFactory():IItemRendererClassFactory;
          function set itemRendererFactory(value:IItemRendererClassFactory):void;
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/models/DataGridPresentationModel.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/models/DataGridPresentationModel.as
index de24473,de24473..b959306
--- a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/models/DataGridPresentationModel.as
+++ b/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/models/DataGridPresentationModel.as
@@@ -62,4 -62,4 +62,4 @@@ package org.apache.flex.html.customCont
  			_strand = value;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/DataGridXcompile/src/products/Product.as
----------------------------------------------------------------------
diff --cc manualtests/DataGridXcompile/src/products/Product.as
index 34abf6b,34abf6b..637b56f
--- a/manualtests/DataGridXcompile/src/products/Product.as
+++ b/manualtests/DataGridXcompile/src/products/Product.as
@@@ -38,4 -38,4 +38,4 @@@ package product
  			return title;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_HTML5/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_HTML5/src/StockDataJSONItemConverter.as
index 8f219d5,8f219d5..8dee7df
--- a/manualtests/FlexJSTest_HTML5/src/StockDataJSONItemConverter.as
+++ b/manualtests/FlexJSTest_HTML5/src/StockDataJSONItemConverter.as
@@@ -33,4 -33,4 +33,4 @@@ packag
              return obj.query.results.quote.Ask;
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_HTML5/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_HTML5/src/controllers/MyController.as
index b06af1d,b06af1d..bb6594c
--- a/manualtests/FlexJSTest_HTML5/src/controllers/MyController.as
+++ b/manualtests/FlexJSTest_HTML5/src/controllers/MyController.as
@@@ -89,4 -89,4 +89,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_HTML5/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_HTML5/src/models/MyModel.as
index 1dc23e6,1dc23e6..2b4c276
--- a/manualtests/FlexJSTest_HTML5/src/models/MyModel.as
+++ b/manualtests/FlexJSTest_HTML5/src/models/MyModel.as
@@@ -56,4 -56,4 +56,4 @@@ package model
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/controllers/MyController.as
index bacd10d,bacd10d..5fb619b
--- a/manualtests/FlexJSTest_SVG/src/controllers/MyController.as
+++ b/manualtests/FlexJSTest_SVG/src/controllers/MyController.as
@@@ -49,4 -49,4 +49,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/models/MyModel.as
index eeb5af3,eeb5af3..42ad5ee
--- a/manualtests/FlexJSTest_SVG/src/models/MyModel.as
+++ b/manualtests/FlexJSTest_SVG/src/models/MyModel.as
@@@ -44,4 -44,4 +44,4 @@@ package model
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/BrandColorEnum.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/BrandColorEnum.as
index e57cb7d,e57cb7d..97ce62f
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/BrandColorEnum.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/BrandColorEnum.as
@@@ -27,4 -27,4 +27,4 @@@ package skins.flatspark.enum
  		public static const Info:int = 6;
  		public static const Danger:int = 7;
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonColorEnum.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonColorEnum.as
index 640d721,640d721..f36f774
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonColorEnum.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonColorEnum.as
@@@ -56,4 -56,4 +56,4 @@@ package skins.flatspark.enum
  		public static const DangerDown:uint = 0xC44133;
  		public static const DangerDisabled:uint = ColorUtils.Alizarin;
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonSizeEnum.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonSizeEnum.as
index 1836ced,1836ced..9b2924a
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonSizeEnum.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ButtonSizeEnum.as
@@@ -28,4 -28,4 +28,4 @@@ package skins.flatspark.enum
  		{
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ColorSwatchEnum.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ColorSwatchEnum.as
index 2a7a1dc,2a7a1dc..fc37477
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ColorSwatchEnum.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/ColorSwatchEnum.as
@@@ -37,4 -37,4 +37,4 @@@ package skins.flatspark.enum
  			_colorSwatch = colorSwatch;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/SizeEnum.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/SizeEnum.as
index c2c22c0,c2c22c0..e1aacb7
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/SizeEnum.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/SizeEnum.as
@@@ -29,4 -29,4 +29,4 @@@ package skins.flatspark.enum
  			_size = size;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/TextInputSizeEnum.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/TextInputSizeEnum.as
index ab7377b,ab7377b..36167dc
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/TextInputSizeEnum.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/enums/TextInputSizeEnum.as
@@@ -27,4 -27,4 +27,4 @@@ package skins.flatspark.enum
  		{
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/AwesomeUtils.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/AwesomeUtils.as
index ec7fb78,ec7fb78..a7ac685
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/AwesomeUtils.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/AwesomeUtils.as
@@@ -396,4 -396,4 +396,4 @@@ package skins.flatspark.util
  		public static const fa_plus_square_o:String = "\uf196";
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/ColorUtils.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/ColorUtils.as
index fed416f,fed416f..8b68795
--- a/manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/ColorUtils.as
+++ b/manualtests/FlexJSTest_SVG/src/skins/flatspark/utils/ColorUtils.as
@@@ -86,4 -86,4 +86,4 @@@ package skins.flatspark.util
  			return cores[posicao];
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_basic/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_basic/src/StockDataJSONItemConverter.as
index 35f1b78,35f1b78..8c618b2
--- a/manualtests/FlexJSTest_basic/src/StockDataJSONItemConverter.as
+++ b/manualtests/FlexJSTest_basic/src/StockDataJSONItemConverter.as
@@@ -35,4 -35,4 +35,4 @@@ packag
              return obj['query']['results']['quote']['Ask'];
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_basic/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_basic/src/controllers/MyController.as
index 636ed30,636ed30..759988d
--- a/manualtests/FlexJSTest_basic/src/controllers/MyController.as
+++ b/manualtests/FlexJSTest_basic/src/controllers/MyController.as
@@@ -89,4 -89,4 +89,4 @@@ package controller
  		}
  		
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_basic/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_basic/src/models/MyModel.as
index 1dc23e6,1dc23e6..2b4c276
--- a/manualtests/FlexJSTest_basic/src/models/MyModel.as
+++ b/manualtests/FlexJSTest_basic/src/models/MyModel.as
@@@ -56,4 -56,4 +56,4 @@@ package model
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_createjs/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_createjs/src/controllers/MyController.as
index 666a249,666a249..da4c806
--- a/manualtests/FlexJSTest_createjs/src/controllers/MyController.as
+++ b/manualtests/FlexJSTest_createjs/src/controllers/MyController.as
@@@ -54,4 -54,4 +54,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_createjs/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_createjs/src/models/MyModel.as
index f79667b,f79667b..e9c4c58
--- a/manualtests/FlexJSTest_createjs/src/models/MyModel.as
+++ b/manualtests/FlexJSTest_createjs/src/models/MyModel.as
@@@ -50,4 -50,4 +50,4 @@@ package model
  		}
  		
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_jquery/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_jquery/src/StockDataJSONItemConverter.as
index 35f1b78,35f1b78..8c618b2
--- a/manualtests/FlexJSTest_jquery/src/StockDataJSONItemConverter.as
+++ b/manualtests/FlexJSTest_jquery/src/StockDataJSONItemConverter.as
@@@ -35,4 -35,4 +35,4 @@@ packag
              return obj['query']['results']['quote']['Ask'];
          }
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_jquery/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_jquery/src/controllers/MyController.as
index 3e78a2f,3e78a2f..07bed93
--- a/manualtests/FlexJSTest_jquery/src/controllers/MyController.as
+++ b/manualtests/FlexJSTest_jquery/src/controllers/MyController.as
@@@ -89,4 -89,4 +89,4 @@@ package controller
  		}
  		
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/FlexJSTest_jquery/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/FlexJSTest_jquery/src/models/MyModel.as
index 1dc23e6,1dc23e6..2b4c276
--- a/manualtests/FlexJSTest_jquery/src/models/MyModel.as
+++ b/manualtests/FlexJSTest_jquery/src/models/MyModel.as
@@@ -56,4 -56,4 +56,4 @@@ package model
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/LanguageTests.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/LanguageTests.as
index 8ed9c38,8ed9c38..76bc61f
--- a/manualtests/LanguageTests/src/LanguageTests.as
+++ b/manualtests/LanguageTests/src/LanguageTests.as
@@@ -176,4 -176,4 +176,4 @@@ namespace my_ns = "http://www.apache.or
  dynamic class MyDynamicClass
  {
      my_ns var my_namespaced_property:String;    
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/classes/B.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/classes/B.as
index d8bd2c7,d8bd2c7..6852b9c
--- a/manualtests/LanguageTests/src/classes/B.as
+++ b/manualtests/LanguageTests/src/classes/B.as
@@@ -22,4 -22,4 +22,4 @@@ package classe
      {
          public function B() {}
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/classes/C.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/classes/C.as
index fe49eb5,fe49eb5..4d40d52
--- a/manualtests/LanguageTests/src/classes/C.as
+++ b/manualtests/LanguageTests/src/classes/C.as
@@@ -24,4 -24,4 +24,4 @@@ package classe
      {
          public function C() {}
      }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/interfaces/IA.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/interfaces/IA.as
index 5fbd6c2,5fbd6c2..5c9eca9
--- a/manualtests/LanguageTests/src/interfaces/IA.as
+++ b/manualtests/LanguageTests/src/interfaces/IA.as
@@@ -19,4 -19,4 +19,4 @@@
  package interfaces
  {
    public interface IA extends IC {}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/interfaces/IB.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/interfaces/IB.as
index a995635,a995635..e2ee31a
--- a/manualtests/LanguageTests/src/interfaces/IB.as
+++ b/manualtests/LanguageTests/src/interfaces/IB.as
@@@ -19,4 -19,4 +19,4 @@@
  package interfaces
  {
      public interface IB {}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/interfaces/IC.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/interfaces/IC.as
index 9183bac,9183bac..f1229c4
--- a/manualtests/LanguageTests/src/interfaces/IC.as
+++ b/manualtests/LanguageTests/src/interfaces/IC.as
@@@ -19,4 -19,4 +19,4 @@@
  package interfaces
  {
    public interface IC extends ID {}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/interfaces/ID.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/interfaces/ID.as
index d5e9543,d5e9543..29f1dec
--- a/manualtests/LanguageTests/src/interfaces/ID.as
+++ b/manualtests/LanguageTests/src/interfaces/ID.as
@@@ -19,4 -19,4 +19,4 @@@
  package interfaces
  {
      public interface ID {}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/interfaces/IE.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/interfaces/IE.as
index ae1848a,ae1848a..168c5c4
--- a/manualtests/LanguageTests/src/interfaces/IE.as
+++ b/manualtests/LanguageTests/src/interfaces/IE.as
@@@ -19,4 -19,4 +19,4 @@@
  package interfaces
  {
      public interface IE {}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/LanguageTests/src/interfaces/IF.as
----------------------------------------------------------------------
diff --cc manualtests/LanguageTests/src/interfaces/IF.as
index f62be45,f62be45..05e4480
--- a/manualtests/LanguageTests/src/interfaces/IF.as
+++ b/manualtests/LanguageTests/src/interfaces/IF.as
@@@ -19,4 -19,4 +19,4 @@@
  package interfaces
  {
      public interface IF {}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ListsTest/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --cc manualtests/ListsTest/src/models/ProductsModel.as
index 9807ee0,9807ee0..46277fc
--- a/manualtests/ListsTest/src/models/ProductsModel.as
+++ b/manualtests/ListsTest/src/models/ProductsModel.as
@@@ -39,4 -39,4 +39,4 @@@ package model
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ListsTest/src/products/Product.as
----------------------------------------------------------------------
diff --cc manualtests/ListsTest/src/products/Product.as
index b4854a3,b4854a3..2f30c48
--- a/manualtests/ListsTest/src/products/Product.as
+++ b/manualtests/ListsTest/src/products/Product.as
@@@ -40,4 -40,4 +40,4 @@@ package product
  			return title;
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ProxyTest/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/ProxyTest/src/controllers/MyController.as
index 0d72c69,0d72c69..1435689
--- a/manualtests/ProxyTest/src/controllers/MyController.as
+++ b/manualtests/ProxyTest/src/controllers/MyController.as
@@@ -49,4 -49,4 +49,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ProxyTest/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/ProxyTest/src/models/MyModel.as
index 5a16d02,5a16d02..8798300
--- a/manualtests/ProxyTest/src/models/MyModel.as
+++ b/manualtests/ProxyTest/src/models/MyModel.as
@@@ -122,4 -122,4 +122,4 @@@ package model
          }
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ReflectionTest/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/ReflectionTest/src/controllers/MyController.as
index 81eb963,81eb963..fa66cc7
--- a/manualtests/ReflectionTest/src/controllers/MyController.as
+++ b/manualtests/ReflectionTest/src/controllers/MyController.as
@@@ -49,4 -49,4 +49,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/ReflectionTest/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/ReflectionTest/src/models/MyModel.as
index 5a16d02,5a16d02..8798300
--- a/manualtests/ReflectionTest/src/models/MyModel.as
+++ b/manualtests/ReflectionTest/src/models/MyModel.as
@@@ -122,4 -122,4 +122,4 @@@ package model
          }
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/RollEventsTest/src/RollEvent.as
----------------------------------------------------------------------
diff --cc manualtests/RollEventsTest/src/RollEvent.as
index 7aa3ca0,7aa3ca0..c81b06c
--- a/manualtests/RollEventsTest/src/RollEvent.as
+++ b/manualtests/RollEventsTest/src/RollEvent.as
@@@ -30,4 -30,4 +30,4 @@@ packag
  		
  		public var rollEventType:String;
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/RollEventsTest/src/RollEventController.as
----------------------------------------------------------------------
diff --cc manualtests/RollEventsTest/src/RollEventController.as
index 09b80cb,09b80cb..3f3e4fd
--- a/manualtests/RollEventsTest/src/RollEventController.as
+++ b/manualtests/RollEventsTest/src/RollEventController.as
@@@ -76,4 -76,4 +76,4 @@@ packag
  			dispatchEvent(new RollEvent("mouseUp"));
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/VanillaSDK_POC/src/Example.as
----------------------------------------------------------------------
diff --cc manualtests/VanillaSDK_POC/src/Example.as
index 39195f9,39195f9..eada8e2
--- a/manualtests/VanillaSDK_POC/src/Example.as
+++ b/manualtests/VanillaSDK_POC/src/Example.as
@@@ -80,4 -80,4 +80,4 @@@ public class Example extends Grou
  	}
  	
  }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/XMLTest/src/controllers/MyController.as
----------------------------------------------------------------------
diff --cc manualtests/XMLTest/src/controllers/MyController.as
index 679d638,679d638..f050ea6
--- a/manualtests/XMLTest/src/controllers/MyController.as
+++ b/manualtests/XMLTest/src/controllers/MyController.as
@@@ -49,4 -49,4 +49,4 @@@ package controller
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/manualtests/XMLTest/src/models/MyModel.as
----------------------------------------------------------------------
diff --cc manualtests/XMLTest/src/models/MyModel.as
index 5a16d02,5a16d02..8798300
--- a/manualtests/XMLTest/src/models/MyModel.as
+++ b/manualtests/XMLTest/src/models/MyModel.as
@@@ -122,4 -122,4 +122,4 @@@ package model
          }
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestClass.as
----------------------------------------------------------------------
diff --cc mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestClass.as
index e1c51a7,e1c51a7..a851c57
--- a/mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestClass.as
+++ b/mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestClass.as
@@@ -116,4 -116,4 +116,4 @@@ package spark.views.styleTes
  		}
  
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestEvent.as
----------------------------------------------------------------------
diff --cc mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestEvent.as
index cd29cb5,cd29cb5..f14f70b
--- a/mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestEvent.as
+++ b/mustella/tests/basicTests/spark/views/styleTest/ADVStyleTestEvent.as
@@@ -39,4 -39,4 +39,4 @@@ package spark.views.styleTes
  			return new ADVStyleTestEvent(type, bubbles, cancelable);
  		}
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as
index 6f54db5,6f54db5..932fc4c
--- a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/Utils.as
@@@ -41,4 -41,4 +41,4 @@@ public final class Util
  	public function Utils() {}
  	
  }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as
index 25149bb,25149bb..06fd66d
--- a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/Clazz.as
@@@ -486,4 -486,4 +486,4 @@@ public final class Claz
  	
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as
index da2223c,da2223c..a46d42c
--- a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/ClazzMemberTypeLists.as
@@@ -8,4 -8,4 +8,4 @@@ public final class ClazzMemberTypeList
  	
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as
index 750111b,750111b..160ba89
--- a/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/nl/ixms/vo/JSDoc.as
@@@ -108,4 -108,4 +108,4 @@@ public final class JSDo
  	public function JSDoc() {}
  	
  }
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as
index 5fd7821,5fd7821..2f7a1b4
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObject.as
@@@ -24,4 -24,4 +24,4 @@@ public interface IDisplayObjec
  	function set scaleY(value:Number):void;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as
index de2298c,de2298c..60778de
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IDisplayObjectContainer.as
@@@ -9,4 -9,4 +9,4 @@@ public interface IDisplayObjectContaine
  	function addChildAt(child:DisplayObject, index:int):DisplayObject;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as
index 490355c,490355c..755ea34
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IInteractiveObject.as
@@@ -5,4 -5,4 +5,4 @@@ public interface IInteractiveObjec
  {
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as
index c38f38e,c38f38e..9cdfbf2
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ILoaderInfo.as
@@@ -18,4 -18,4 +18,4 @@@ public interface ILoaderInf
  	function dispatchEvent(event:Event):void;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as
index 61c1b28,61c1b28..a97d029
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IMovieClip.as
@@@ -14,4 -14,4 +14,4 @@@ public interface IMovieCli
  	function stop():void;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as
index cab5c41,cab5c41..2b6563b
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/ISprite.as
@@@ -5,4 -5,4 +5,4 @@@ public interface ISprit
  {
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as
index c8c783e,c8c783e..814ca99
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/display/IStage.as
@@@ -23,4 -23,4 +23,4 @@@ public interface IStag
  	function hasEventListener(type:String):Boolean;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as
index d3a5bc4,d3a5bc4..f89d850
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEvent.as
@@@ -12,4 -12,4 +12,4 @@@ public interface IEven
  	function toString():String;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as
index 620320a,620320a..9ecd34b
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IEventDispatcher.as
@@@ -12,4 -12,4 +12,4 @@@ public interface IEventDispatche
  	function toString():String;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as
index 6780d93,6780d93..565f0a4
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/IProgressEvent.as
@@@ -6,4 -6,4 +6,4 @@@ public interface IProgressEven
  	function toString():String;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as
index 1404cd5,1404cd5..4627664
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/events/ITimerEvent.as
@@@ -6,4 -6,4 +6,4 @@@ public interface ITimerEven
  	function toString():String;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as
index 6fc8d3c,6fc8d3c..811462f
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/IApplicationDomain.as
@@@ -7,4 -7,4 +7,4 @@@ public interface IApplicationDomai
  	function hasDefinition(name:String):Boolean;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as
index 0e71876,0e71876..eae2642
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/system/ICapabilities.as
@@@ -14,4 -14,4 +14,4 @@@ public interface ICapabilitie
  	function get version():String;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as
index 28f830e,28f830e..1d2d6a4
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/ITimer.as
@@@ -11,4 -11,4 +11,4 @@@ public interface ITime
  	function stop():void;
  }
  
--}
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as
----------------------------------------------------------------------
diff --cc vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as
index 409a77f,409a77f..b25e492
--- a/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as
+++ b/vf2js/utils/PlayerGlobalToJS/src/vf2js/utils/IgetDefinitionByName.as
@@@ -5,4 -5,4 +5,4 @@@ public interface IgetDefinitionByNam
  {
  }
  
--}
++}


[27/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
index 342e7ca,0000000..ba6ea3f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
@@@ -1,1078 -1,0 +1,1078 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.styles
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;				
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;		
 +}
 +import flex.system.DefinitionManager;
 +import org.apache.flex.reflection.getQualifiedClassName;
 +import org.apache.flex.reflection.getQualifiedSuperclassName;
 +
 +import mx.core.FlexGlobals;
 +import mx.core.IFlexDisplayObject;
 +import mx.core.IFlexModule;
 +COMPILE::LATER
 +{
 +	import mx.core.IFlexModuleFactory;
 +	import mx.effects.EffectManager;
 +	import mx.managers.SystemManager;
 +	import mx.modules.IModule;
 +	import mx.modules.ModuleManager;		
 +}
 +import mx.core.IFontContextComponent;
 +import mx.core.IInvalidating;
 +import mx.core.IUITextField;
 +import mx.core.IVisualElement;
 +import mx.core.IUIComponent;
 +import mx.core.UIComponent;
 +import mx.core.mx_internal;
 +import mx.utils.NameUtil;
 +import mx.utils.OrderedObject;
 +import mx.utils.object_proxy;
 +
 +use namespace mx_internal;
 +use namespace object_proxy;
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  This is an all-static class with methods for building the protochains
 + *  that Flex uses to look up CSS style properties.
 + *  @flexjsignoreimport mx.core.UIComponent
 + */
 +public class StyleProtoChain
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class constants
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  The inheritingStyles and nonInheritingStyles properties
 +     *  are initialized to this empty Object.
 +     *  This allows the getStyle() and getStyle()
 +     *  methods to simply access inheritingStyles[] and nonInheritingStyles[]
 +     *  without needing to first check whether those objects exist.
 +     *  If they were simply initialized to {}, we couldn't determine
 +     *  whether the style chain has already been built or not.
 +     */
 +    public static var STYLE_UNINITIALIZED:Object = {};
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Implements the getClassStyleDeclarations() logic
 +     *  for UIComponent and TextBase.
 +     *  The 'object' parameter will be one or the other.
 +     */
 +    public static function getClassStyleDeclarations(object:IStyleClient):Array
 +    {
 +        var styleManager:IStyleManager2 = getStyleManager(object);
 +        var qualified:Boolean = styleManager.qualifiedTypeSelectors;
 +        var className:String = qualified ? getQualifiedClassName(object) : object.className;
 +        var advancedObject:IAdvancedStyleClient = object as IAdvancedStyleClient;
 +
 +        var typeHierarchy:OrderedObject = getTypeHierarchy(object, styleManager, qualified);
 +        var types:Array = typeHierarchy.propertyList;
 +        var typeCount:int = types.length;
 +        var classDecls:Array = null;
 +
 +        if (!styleManager.hasAdvancedSelectors())
 +        {
 +            classDecls = styleManager.typeSelectorCache[className];
 +            if (classDecls)
 +                return classDecls;
 +        }
 +
 +        classDecls = [];
 +
 +        // Loop over the type hierarhcy starting at the base type and work
 +        // down the chain of subclasses.
 +        for (var i:int = typeCount - 1; i >= 0; i--)
 +        {
 +            var type:String = types[i].toString();
 +            if (styleManager.hasAdvancedSelectors() && advancedObject != null)
 +            {
 +                var decls:Object = styleManager.getStyleDeclarations(type);
 +                if (decls)
 +                {
 +                    var matchingDecls:Array = matchStyleDeclarations(decls, advancedObject);
 +                    classDecls = classDecls.concat(matchingDecls);
 +                }
 +            }
 +            else
 +            {
 +                var decl:CSSStyleDeclaration = styleManager.getMergedStyleDeclaration(type);
 +                if (decl)
 +                    classDecls.push(decl);
 +            }
 +        }
 +
 +        if (styleManager.hasAdvancedSelectors() && advancedObject != null)
 +        {                   
 +            // Advanced selectors may result in more than one match per type so
 +            // we sort based on specificity, but we preserve the declaration
 +            // order for equal selectors.
 +            classDecls = sortOnSpecificity(classDecls);
 +        }
 +        else
 +        {
 +            // Cache the simple type declarations for this class 
 +            styleManager.typeSelectorCache[className] = classDecls;
 +        }
 +
 +        return classDecls;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Implements the initProtoChain() logic for UIComponent and TextBase.
 +     *  The 'object' parameter will be one or the other.
 +	 *  @flexjsignorecoercion mx.core.UIComponent
 +     */
 +    public static function initProtoChain(object:IStyleClient, inheritPopUpStylesFromOwner:Boolean=true):void
 +    {
 +        var styleManager:IStyleManager2 = getStyleManager(object);
 +        var n:int;
 +        var i:int;
 +
 +        var uicObject:UIComponent = object as UIComponent;
 +        var advancedObject:IAdvancedStyleClient = object as IAdvancedStyleClient;
 +        var styleDeclaration:CSSStyleDeclaration = null;
 +
 +        var universalSelectors:Array = [];
 +        var hasStyleName:Boolean = false;
 +        var styleName:Object = object.styleName;
 +        if (styleName)
 +        {
 +            if (styleName is CSSStyleDeclaration)
 +            {
 +                // Get the styles referenced by the styleName property.
 +                universalSelectors.push(CSSStyleDeclaration(styleName));
 +            }
 +            else if (styleName is IFlexDisplayObject || styleName is IStyleClient)
 +            {
 +                // If the styleName property is a UIComponent, then there's a
 +                // special search path for that case.
 +                StyleProtoChain.initProtoChainForUIComponentStyleName(object);
 +                return;
 +            }
 +            else if (styleName is String)
 +            {
 +                hasStyleName = true;
 +            }
 +        }
 +
 +        // To build the proto chain, we start at the end and work forward.
 +        // Referring to the list at the top of this function, we'll start
 +        // by getting the tail of the proto chain, which is:
 +        //  - for non-inheriting styles, the global style sheet
 +        //  - for inheriting styles, my parent's style object
 +        var nonInheritChain:Object = styleManager.stylesRoot;
 +
 +        if (nonInheritChain && nonInheritChain.effects)
 +            object.registerEffects(nonInheritChain.effects);
 +
 +        var p:IStyleClient = null;
 +        if (object is IVisualElement)
 +            p = IVisualElement(object).parent as IStyleClient;
 +        else if (object is IAdvancedStyleClient) 
 +            p = IAdvancedStyleClient(object).styleParent as IStyleClient;
 +			
 +        if (p)
 +        {
 +            var inheritChain:Object = p.inheritingStyles;
 +            if (inheritChain == StyleProtoChain.STYLE_UNINITIALIZED)
 +                inheritChain = nonInheritChain;
 +
 +			COMPILE::LATER
 +			{
 +		        // If this object is a module then add its global styles to the 
 +		        // inheritChain. If we don't have global styles in this style manager
 +		        // then the user didn't declare a global style in the module and the
 +		        // compiler didn't add a duplicate default style. In that case don't 
 +		        // add global styles to the chain because the parent style manager's
 +		        // global styles are already on the chain.
 +		        if (object is IModule)
 +		        {
 +		            styleDeclaration = styleManager.getStyleDeclaration("global");
 +		            if (styleDeclaration)
 +		                inheritChain = styleDeclaration.addStyleToProtoChain(inheritChain, DisplayObject(object));
 +		        }
 +			}
 +        }
 +        else
 +        {
 +            // Pop ups inheriting chain starts at Application instead of global.
 +            // This allows popups to grab styles like themeColor that are
 +            // set on Application.
 +            if (uicObject && uicObject.isPopUp)
 +            {
 +                var owner:DisplayObjectContainer = uicObject._owner;
 +                if (inheritPopUpStylesFromOwner && owner && (owner is IStyleClient))
 +                {
 +                    inheritChain = IStyleClient(owner).inheritingStyles;
 +                }
 +                else
 +                {
 +                    inheritChain = FlexGlobals.topLevelApplication.inheritingStyles;
 +                }
 +            }
 +            else
 +            {
 +                inheritChain = styleManager.stylesRoot;
 +            }
 +        }
 +
 +        var styleDeclarations:Array = null;
 +
 +        // If we have an advanced style client, we handle this separately
 +        // because of the considerably more complex selector matches...
 +        if (styleManager.hasAdvancedSelectors() && advancedObject != null)
 +        {
 +            styleDeclarations = getMatchingStyleDeclarations(advancedObject, universalSelectors);
 +
 +            n = styleDeclarations != null ? styleDeclarations.length : 0;
 +            for (i = 0; i < n; i++)
 +            {
 +                styleDeclaration = styleDeclarations[i];
 +                inheritChain = styleDeclaration.addStyleToProtoChain(inheritChain, uicObject);
 +                nonInheritChain = styleDeclaration.addStyleToProtoChain(nonInheritChain, uicObject);
 +
 +                if (styleDeclaration.effects)
 +                    advancedObject.registerEffects(styleDeclaration.effects);
 +            }
 +        }
 +        // Otherwise we use the legacy Flex 3 logic for simple selectors.
 +        else
 +        {
 +            // Get the styles referenced by the styleName property
 +            if (hasStyleName)
 +            {             
 +                var styleNames:Array = styleName.split(/\s+/);
 +                n = styleNames.length;
 +                for (i = 0; i < n; i++)
 +                {
 +                    if (styleNames[i].length)
 +                    {
 +                        styleDeclaration = styleManager.getMergedStyleDeclaration("." + styleNames[i]);
 +                        if (styleDeclaration)
 +                            universalSelectors.push(styleDeclaration);
 +                    }
 +                }
 +            }
 +
 +            // Working backwards up the list, the next element in the
 +            // search path is the type selector
 +            styleDeclarations = object.getClassStyleDeclarations();
 +            n = styleDeclarations != null ? styleDeclarations.length : 0;
 +            for (i = 0; i < n; i++)
 +            {
 +                styleDeclaration = styleDeclarations[i];
 +                inheritChain = styleDeclaration.addStyleToProtoChain(inheritChain, uicObject);
 +                nonInheritChain = styleDeclaration.addStyleToProtoChain(nonInheritChain, uicObject);
 +
 +                if (styleDeclaration.effects)
 +                    object.registerEffects(styleDeclaration.effects);
 +            }
 +
 +            // Next are the class selectors
 +            n = universalSelectors.length;
 +            for (i = 0; i < n; i++)
 +            {
 +                styleDeclaration = universalSelectors[i];
 +                if (styleDeclaration)
 +                {
 +                    inheritChain =
 +                        styleDeclaration.addStyleToProtoChain(inheritChain, uicObject);
 +    
 +                    nonInheritChain =
 +                        styleDeclaration.addStyleToProtoChain(nonInheritChain, uicObject);
 +    
 +                    if (styleDeclaration.effects)
 +                        object.registerEffects(styleDeclaration.effects);
 +                }
 +            }
 +        }
 +
 +        // Finally, we'll add the in-line styles
 +        // to the head of the proto chain.
 +        
 +        styleDeclaration = object.styleDeclaration;
 +
 +        object.inheritingStyles =
 +            styleDeclaration ?
 +            styleDeclaration.addStyleToProtoChain(inheritChain, uicObject) :
 +            inheritChain;
 +
 +        object.nonInheritingStyles =
 +            styleDeclaration ?
 +            styleDeclaration.addStyleToProtoChain(nonInheritChain, uicObject) :
 +            nonInheritChain;
 +    }
 +
 +    /**
 +     *  @private
 +     *  If the styleName property points to a UIComponent, then we search
 +     *  for stylable properties in the following order:
 +     *  
 +     *  1) Look for inline styles on this object
 +     *  2) Look for inline styles on the styleName object
 +     *  3) Look for class selectors on the styleName object
 +     *  4) Look for type selectors on the styleName object
 +     *  5) Look for type selectors on this object
 +     *  6) Follow the usual search path for the styleName object
 +     *  
 +     *  If this object doesn't have any type selectors, then the
 +     *  search path can be simplified to two steps:
 +     *  
 +     *  1) Look for inline styles on this object
 +     *  2) Follow the usual search path for the styleName object
 +     */
 +    public static function initProtoChainForUIComponentStyleName(
 +                                    obj:IStyleClient):void
 +    {
 +        var styleManager:IStyleManager2 = getStyleManager(obj);
 +        var styleName:IStyleClient = IStyleClient(obj.styleName);
 +        var target:DisplayObject = obj as DisplayObject;
 +        
 +        // Push items onto the proto chain in reverse order, beginning with
 +        // 6) Follow the usual search path for the styleName object
 +        var nonInheritChain:Object = styleName.nonInheritingStyles;
 +        if (!nonInheritChain ||
 +            nonInheritChain == StyleProtoChain.STYLE_UNINITIALIZED)
 +        {
 +            nonInheritChain = styleManager.stylesRoot;
 +
 +            if (nonInheritChain.effects)
 +                obj.registerEffects(nonInheritChain.effects);
 +        }
 +
 +        var inheritChain:Object = styleName.inheritingStyles;
 +        if (!inheritChain ||
 +            inheritChain == StyleProtoChain.STYLE_UNINITIALIZED)
 +        {
 +            inheritChain = styleManager.stylesRoot;
 +        }
 +
 +        // If there's no type selector on this object, then we can collapse
 +        // 6 steps to 2 (see above)
 +        var typeSelectors:Array = obj.getClassStyleDeclarations();
 +        var n:int = typeSelectors.length;
 +        
 +        // If we are a StyleProxy and we aren't building the protochain from
 +        // our type selectors, then we need to build the protochain from
 +        // the styleName since styleName.nonInheritingStyles is always null.
 +        if (styleName is StyleProxy)
 +        {   
 +            if (n == 0)
 +            {   
 +                // 4) Look for type selectors on the styleName object
 +                // 3) Look for class selectors on the styleName object
 +                // 2) Look for inline styles on the styleName object
 +                nonInheritChain = addProperties(nonInheritChain, styleName, false);
 +            }
 +            target = StyleProxy(styleName).source as DisplayObject;
 +        }
 +        
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var typeSelector:CSSStyleDeclaration = typeSelectors[i];
 +
 +            // If there's no *inheriting* type selector on this object, then we
 +            // can still collapse 6 steps to 2 for the inheriting properties.
 +
 +            // 5) Look for type selectors on this object
 +            inheritChain = typeSelector.addStyleToProtoChain(inheritChain, target); 
 +
 +            // 4) Look for type selectors on the styleName object
 +            // 3) Look for class selectors on the styleName object
 +            // 2) Look for inline styles on the styleName object
 +            inheritChain = addProperties(inheritChain, styleName, true);
 +
 +            // 5) Look for type selectors on this object
 +            nonInheritChain = typeSelector.addStyleToProtoChain(nonInheritChain, target);   
 +
 +            // 4) Look for type selectors on the styleName object
 +            // 3) Look for class selectors on the styleName object
 +            // 2) Look for inline styles on the styleName object
 +            nonInheritChain = addProperties(nonInheritChain, styleName, false);
 +
 +            if (typeSelector.effects)
 +                obj.registerEffects(typeSelector.effects);
 +        }
 +        
 +        // 1) Look for inline styles on this object
 +        
 +        obj.inheritingStyles =
 +            obj.styleDeclaration ? 
 +            obj.styleDeclaration.addStyleToProtoChain(inheritChain, target) :
 +            inheritChain;
 +        
 +        obj.nonInheritingStyles =
 +            obj.styleDeclaration ? 
 +            obj.styleDeclaration.addStyleToProtoChain(nonInheritChain, target) :
 +            nonInheritChain;
 +    }
 +    
 +    /**
 +     *  See the comment for the initProtoChainForUIComponentStyleName
 +     *  function. The comment for that function includes a six-step
 +     *  sequence. This sub-function implements the following pieces
 +     *  of that sequence:
 +     *  
 +     *  2) Look for inline styles on the styleName object
 +     *  3) Look for class selectors on the styleName object
 +     *  4) Look for type selectors on the styleName object
 +     *  
 +     *   This piece is broken out as a separate function so that it
 +     *  can be called recursively when the styleName object has a
 +     *  styleName property is itself another UIComponent.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    private static function addProperties(chain:Object, obj:IStyleClient,
 +                                          bInheriting:Boolean):Object
 +    {
 +        // Only use a filter map if styleName is a StyleProxy and we are building the nonInheritingStyles chain
 +        var filterMap:Object = obj is StyleProxy && !bInheriting ? StyleProxy(obj).filterMap : null;
 +        
 +        // StyleProxy's usually have sources that are DisplayObject's, but a StyleProxy can also have 
 +        // another StyleProxy as it's source (Example: CalendarLayout's source is a StyleProxy for DateChooser, 
 +        // whose style is a StyleProxy for DateField)
 +        
 +        // The way we use target is a bit hacky, but we always assume that styles (if pointed to DisplayObjects)
 +        // are the parent (or atleast an ancestor), and we rely on this down the line (such as in 
 +        // DataGridColumn.addStyleToProtoChain)
 +        var curObj:IStyleClient = obj;
 +        while (curObj is StyleProxy)
 +        {
 +            curObj = StyleProxy(curObj).source;
 +        }
 +        var target:DisplayObject = curObj as DisplayObject;
 +
 +        var advancedObject:IAdvancedStyleClient = obj as IAdvancedStyleClient;
 +        var styleName:Object = obj.styleName;
 +        var styleDeclarations:Array;
 +        var decl:CSSStyleDeclaration;
 +        var styleManager:IStyleManager2 = getStyleManager(target);
 +        
 +        // If we have an advanced style client, we handle this separately
 +        // because of the considerably more complex selector matches...
 +        if (advancedObject != null && styleManager.hasAdvancedSelectors())
 +        {
 +            // Handle special case of styleName as a CSSStyleDeclaration
 +            if (styleName is CSSStyleDeclaration)
 +            {
 +                styleDeclarations = [CSSStyleDeclaration(styleName)];
 +            }
 +
 +            // Find matching style declarations, sorted by specificity
 +            styleDeclarations = getMatchingStyleDeclarations(advancedObject, styleDeclarations);
 +
 +            // Then apply matching selectors to the proto chain
 +            for (i = 0; i < styleDeclarations.length; i++)
 +            {
 +                decl = styleDeclarations[i];
 +                if (decl)
 +                {
 +                    chain = decl.addStyleToProtoChain(chain, target, filterMap);
 +                    if (decl.effects)
 +                        obj.registerEffects(decl.effects);
 +                }
 +            }
 +
 +            // Finally, handle special case of styleName as an IStyleClient
 +            // which overrides any of the selectors above
 +            if (styleName is IStyleClient)
 +            {
 +                // If the styleName property is another UIComponent, then
 +                // recursively add type selectors, class selectors, and
 +                // inline styles for that UIComponent
 +                chain = addProperties(chain, IStyleClient(styleName),
 +                                      bInheriting);
 +            }
 +        }
 +        else
 +        {
 +            // 4) Add type selectors 
 +            styleDeclarations = obj.getClassStyleDeclarations();
 +            var n:int = styleDeclarations.length;
 +            for (var i:int = 0; i < n; i++)
 +            {
 +                decl = styleDeclarations[i];
 +                chain = decl.addStyleToProtoChain(chain, target, filterMap);
 +    
 +                if (decl.effects)
 +                    obj.registerEffects(decl.effects);
 +            }
 +
 +            // 3) Add class selectors
 +            if (styleName)
 +            {
 +                styleDeclarations = [];
 +                if (typeof(styleName) == "object")
 +                {
 +                    if (styleName is CSSStyleDeclaration)
 +                    {
 +                        // Get the style sheet referenced by the styleName property.
 +                        styleDeclarations.push(CSSStyleDeclaration(styleName));
 +                    }
 +                    else
 +                    {               
 +                        // If the styleName property is another UIComponent, then
 +                        // recursively add type selectors, class selectors, and
 +                        // inline styles for that UIComponent
 +                        chain = addProperties(chain, IStyleClient(styleName),
 +                                              bInheriting);
 +                    }
 +                }
 +                else
 +                {
 +                    // Get the style sheets referenced by the styleName property             
 +                    var styleNames:Array = styleName.split(/\s+/);
 +                    for (var c:int=0; c < styleNames.length; c++)
 +                    {
 +                        if (styleNames[c].length)
 +                        {
 +                            styleDeclarations.push(styleManager.getMergedStyleDeclaration("." + styleNames[c]));
 +                        }
 +                    }
 +                }
 +
 +                for (i = 0; i < styleDeclarations.length; i++)
 +                {
 +                    decl = styleDeclarations[i];
 +                    if (decl)
 +                    {
 +                        chain = decl.addStyleToProtoChain(chain, target, filterMap);
 +                        if (decl.effects)
 +                            obj.registerEffects(decl.effects);
 +                    }
 +                }
 +            }
 +        }
 +
 +        // 2) Add inline styles 
 +        if (obj.styleDeclaration)
 +            chain = obj.styleDeclaration.addStyleToProtoChain(chain, target, filterMap);
 +
 +        return chain;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function initTextField(obj:IUITextField):void
 +    {
 +        // TextFields never have any inline styles or type selector, so
 +        // this is an optimized version of the initObject function (above)
 +        var styleManager:IStyleManager2 = StyleManager.getStyleManager(obj.moduleFactory);
 +        var styleName:Object = obj.styleName;
 +        var classSelectors:Array = [];
 +        
 +        if (styleName)
 +        {
 +            if (typeof(styleName) == "object")
 +            {
 +                if (styleName is CSSStyleDeclaration)
 +                {
 +                    // Get the style sheet referenced by the styleName property.
 +                    classSelectors.push(CSSStyleDeclaration(styleName));
 +                }
 +                else if (styleName is StyleProxy)
 +                {
 +                    obj.inheritingStyles =
 +                        IStyleClient(styleName).inheritingStyles;
 +                        
 +                    obj.nonInheritingStyles = addProperties(styleManager.stylesRoot, IStyleClient(styleName), false);
 +                    
 +                    return;
 +                }
 +                else
 +                {               
 +                    // styleName points to a UIComponent, so just set
 +                    // this TextField's proto chains to be the same
 +                    // as that UIComponent's proto chains.          
 +                    obj.inheritingStyles =
 +                        IStyleClient(styleName).inheritingStyles;
 +                    obj.nonInheritingStyles =
 +                        IStyleClient(styleName).nonInheritingStyles;
 +                    return;
 +                }
 +            }
 +            else
 +            {                   
 +                // Get the style sheets referenced by the styleName property             
 +                var styleNames:Array = styleName.split(/\s+/);
 +                for (var c:int=0; c < styleNames.length; c++)
 +                {
 +                    if (styleNames[c].length) {
 +                        classSelectors.push(styleManager.getMergedStyleDeclaration("." + 
 +                            styleNames[c]));
 +                    }
 +                }    
 +            }
 +        }
 +        
 +        // To build the proto chain, we start at the end and work forward.
 +        // We'll start by getting the tail of the proto chain, which is:
 +        //  - for non-inheriting styles, the global style sheet
 +        //  - for inheriting styles, my parent's style object
 +        var inheritChain:Object = IStyleClient(obj.parent).inheritingStyles;
 +        var nonInheritChain:Object = styleManager.stylesRoot;
 +        if (!inheritChain)
 +            inheritChain = styleManager.stylesRoot;
 +                
 +        // Next are the class selectors
 +        for (var i:int = 0; i < classSelectors.length; i++)
 +        {
 +            var classSelector:CSSStyleDeclaration = classSelectors[i];
 +            if (classSelector)
 +            {
 +                inheritChain =
 +                    classSelector.addStyleToProtoChain(inheritChain, DisplayObject(obj));
 +
 +                nonInheritChain =
 +                    classSelector.addStyleToProtoChain(nonInheritChain, DisplayObject(obj));
 +            }
 +        }
 +        
 +        obj.inheritingStyles = inheritChain;
 +        obj.nonInheritingStyles = nonInheritChain;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Implements the setStyle() logic for UIComponent and TextBase.
 +     *  The 'object' parameter will be one or the other.
 +     */
 +    public static function setStyle(object:IStyleClient, styleProp:String,
 +                                    newValue:*):void
 +    {
 +        var styleManager:IStyleManager2 = getStyleManager(object);
 +        
 +        if (styleProp == "styleName")
 +        {
 +            // Let the setter handle this one, see UIComponent.
 +            object.styleName = newValue;
 +
 +            // Short circuit, because styleName isn't really a style.
 +            return;
 +        }
 +
 +		COMPILE::LATER
 +		{
 +        if (EffectManager.getEventForEffectTrigger(styleProp) != "")
 +            EffectManager.setStyle(styleProp, object);
 +		}
 +		
 +        // If this object didn't previously have any inline styles,
 +        // then regenerate its proto chain
 +        // (and the proto chains of its descendants).
 +        var isInheritingStyle:Boolean =
 +            styleManager.isInheritingStyle(styleProp);
 +        var isProtoChainInitialized:Boolean =
 +            object.inheritingStyles != StyleProtoChain.STYLE_UNINITIALIZED;
 +        var valueChanged:Boolean = object.getStyle(styleProp) != newValue;
 +        
 +        if (!object.styleDeclaration)
 +        {
 +            object.styleDeclaration = new CSSStyleDeclaration(null, styleManager);
 +           
 +            object.styleDeclaration.setLocalStyle(styleProp, newValue);
 +
 +            // If inheritingStyles is undefined, then this object is being
 +            // initialized and we haven't yet generated the proto chain.  To
 +            // avoid redundant work, don't bother to create the proto chain here.
 +            if (isProtoChainInitialized)
 +                object.regenerateStyleCache(isInheritingStyle);
 +        }
 +        else
 +        {
 +            object.styleDeclaration.setLocalStyle(styleProp, newValue);
 +        }
 +
 +        if (isProtoChainInitialized && valueChanged)
 +        {
 +            object.styleChanged(styleProp);
 +            object.notifyStyleChangeInChildren(styleProp, isInheritingStyle);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Implements the styleChanged() logic for UIComponent and TextBase.
 +     *  The 'object' parameter will be one or the other.
 +     */
 +    public static function styleChanged(object:IInvalidating, styleProp:String):void
 +    {
 +        var styleManager:IStyleManager2 = getStyleManager(object);
 +       
 +        // If font changed, then invalidateProperties so
 +        // we can re-create the text field in commitProperties
 +        // TODO (gosmith): Should hasFontContextChanged() be added to IFontContextComponent?
 +        if (object is IFontContextComponent &&
 +            "hasFontContextChanged" in object &&
 +            object["hasFontContextChanged"]())
 +        {
 +            object.invalidateProperties();
 +        }
 +        
 +        if (!styleProp || 
 +            styleProp == "styleName" ||
 +            styleProp == "layoutDirection")
 +        {
 +            object.invalidateProperties();
 +        }        
 +        
 +        // Check to see if this is one of the style properties
 +        // that is known to affect layout.
 +        if (!styleProp ||
 +            styleProp == "styleName" ||
 +            styleManager.isSizeInvalidatingStyle(styleProp))
 +        {
 +            // This style property change may affect the layout of this
 +            // object. Signal the LayoutManager to re-measure the object.
 +            object.invalidateSize();
 +        }
 +
 +        // TODO (gosmith): Should initThemeColor() be in some interface?
 +        if (!styleProp || 
 +            styleProp == "styleName" ||
 +            styleProp == "themeColor")
 +        {
 +        	if (object is IUIComponent)
 +                object["initThemeColor"]();
 +        }
 +        
 +        object.invalidateDisplayList();
 +        
 +        var parent:IInvalidating;
 +        if (object is IVisualElement)
 +            parent = IVisualElement(object).parent as IInvalidating;
 +
 +        if (parent)
 +        {
 +            if (styleProp == "styleName" || styleManager.isParentSizeInvalidatingStyle(styleProp))
 +                parent.invalidateSize();
 +
 +            if (styleProp == "styleName" || styleManager.isParentDisplayListInvalidatingStyle(styleProp))
 +                parent.invalidateDisplayList();
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public static function matchesCSSType(object:IAdvancedStyleClient, cssType:String):Boolean
 +    {
 +        var styleManager:IStyleManager2 = getStyleManager(object);
 +        var qualified:Boolean = styleManager.qualifiedTypeSelectors;
 +        var typeHierarchy:OrderedObject = getTypeHierarchy(object, styleManager, qualified);
 +        return typeHierarchy.object_proxy::getObjectProperty(cssType) != null;
 +    }
 +
 +    /**
 +     *  @private  
 +     *  Find all matching style declarations for an IAdvancedStyleClient
 +     *  component. The result is sorted in terms of specificity, but the
 +     *  declaration order is preserved.
 +     *
 +     *  @param object - an IAdvancedStyleClient instance of the component to
 +     *  match.
 +     *  @param styleDeclarations - an optional Array of additional
 +     *  CSSStyleDeclarations to be included in the sorted matches.
 +     *
 +     *  @return An Array of matching style declarations sorted by specificity.
 +     */
 +    public static function getMatchingStyleDeclarations(object:IAdvancedStyleClient,
 +            styleDeclarations:Array=null):Array // of CSSStyleDeclaration
 +    {
 +        var styleManager:IStyleManager2 = getStyleManager(object);
 +        
 +        if (styleDeclarations == null)
 +            styleDeclarations = [];
 +
 +        // First, look for universal selectors
 +        var universalDecls:Object = styleManager.getStyleDeclarations("*");
 +        styleDeclarations = matchStyleDeclarations(universalDecls, object).concat(styleDeclarations);
 +
 +        // Next, look for type selectors (includes ActionScript supertype matches)
 +        // If we also had universal selectors, concatenate them with our type
 +        // selectors and then resort by specificity...
 +        if (styleDeclarations.length > 0)
 +        {
 +            styleDeclarations = object.getClassStyleDeclarations().concat(styleDeclarations);
 +            styleDeclarations = sortOnSpecificity(styleDeclarations);
 +        }
 +        else
 +        {
 +            // Otherwise, we only have type selectors (which are already sorted)
 +            styleDeclarations = object.getClassStyleDeclarations();
 +        }
 +        return styleDeclarations;
 +    }
 +
 +    /**
 +     *  @private
 +     *  @param object - the IStyleClient to be introspected  
 +     *  @param qualified - whether qualified type names should be used
 +     *  @return an ordered map of class names, starting with the object's class
 +     *  name and then each super class name until we hit a stop class, such as
 +     *  mx.core::UIComponent.
 +     */
 +    private static function getTypeHierarchy(object:IStyleClient, styleManager:IStyleManager2, qualified:Boolean=true):OrderedObject
 +    {
 +        var className:String = getQualifiedClassName(object);
 +        var hierarchy:OrderedObject = styleManager.typeHierarchyCache[className] as OrderedObject;
 +        if (hierarchy == null)
 +        {
 +            hierarchy = new OrderedObject();
 +
 +			var myApplicationDomain:DefinitionManager = new DefinitionManager();
 +			COMPILE::LATER
 +			{
 +			var myApplicationDomain:DefinitionManager;
 +            var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(object);
 +            if (factory != null)
 +            {
 +                myApplicationDomain = new DefinitionManager(factory.info()["currentDomain"]);
 +            }
 +            else
 +            {
 +                var myRoot:DisplayObject = SystemManager.getSWFRoot(object);
 +                if (!myRoot)
 +                    return hierarchy;
 +                myApplicationDomain = new DefinitionManager(myRoot.loaderInfo.applicationDomain);
 +            }
 +			}
 +
 +            styleManager.typeHierarchyCache[className] = hierarchy;
 +            while (!isStopClass(className))
 +            {
 +                try
 +                {
 +                    var type:String;
 +                    if (qualified)
 +                        type = className.replace("::", ".");
 +                    else
 +                        type = NameUtil.getUnqualifiedClassName(className);
 +
 +                    hierarchy.object_proxy::setObjectProperty(type, true);
 +                    className = getQualifiedSuperclassName(
 +                        myApplicationDomain.getDefinition(className));
 +                }
 +                catch(e:ReferenceError)
 +                {
 +                    className = null;
 +                }
 +            }
 +        }
 +        return hierarchy;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Our style type hierarhcy stops at UIComponent, UITextField or
 +     *  GraphicElement, not Object.
 +     */  
 +    private static function isStopClass(value:String):Boolean
 +    {
 +        return value == null ||
 +               value == "mx.core::UIComponent" ||
 +               value == "mx.core::UITextField" ||
 +               value == "mx.graphics.baseClasses::GraphicElement";
 +    }
 +
 +    /**
 +     *  @private  
 +     *  Find all matching style declarations for an IAdvancedStyleClient
 +     *  component. The result is unsorted in terms of specificity, but the
 +     *  declaration order is preserved.
 +     *
 +     *  @param declarations - a map of declarations to be searched for matches.
 +     *  @param object - an instance of the component to match.
 +     *
 +     *  @return An unsorted Array of matching style declarations for the given
 +     *  subject.
 +     */
 +    private static function matchStyleDeclarations(declarations:Object,
 +            object:IAdvancedStyleClient):Array // of CSSStyleDeclaration
 +    {
 +        var matchingDecls:Array = [];
 +        var pseudos:Array = declarations["pseudo"];
 +        var classes:Array = declarations["class"];
 +        var ids:Array = declarations["id"];
 +        var unconditionals:Array = declarations["unconditional"];
 +        
 +        var decl:CSSStyleDeclaration;
 +        
 +        // Find the subset of declarations that match this component
 +        for each (decl in unconditionals)
 +        {
 +            if (decl.matchesStyleClient(object))
 +                matchingDecls.push(decl);
 +        }
 +        
 +        if (object.styleName is String)
 +        {
 +            // Find the subset of declarations that match this component
 +            for each (decl in classes)
 +            {
 +                if (decl.matchesStyleClient(object))
 +                    matchingDecls.push(decl);
 +            }
 +        }
 +        
 +        if (object.hasCSSState())
 +        {
 +            // Find the subset of declarations that match this component
 +            for each (decl in pseudos)
 +            {
 +                if (decl.matchesStyleClient(object))
 +                    matchingDecls.push(decl);
 +            }            
 +        }
 +
 +        if (object.id)
 +        {
 +            // Find the subset of declarations that match this component
 +            for each (decl in ids)
 +            {
 +                if (decl.matchesStyleClient(object))
 +                    matchingDecls.push(decl);
 +            }
 +        }
 +
 +        if (matchingDecls.length > 1)
 +            matchingDecls.sortOn("selectorIndex", Array.NUMERIC);
 +        
 +        // if there are declarations from the parent StyleManager, match them in their own
 +        // order, then prepend them.  Parent styles go on the chain before child styles.
 +        if (declarations.parent)
 +            matchingDecls = matchStyleDeclarations(declarations.parent, object).concat(matchingDecls);
 +        
 +        return matchingDecls;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Sort algorithm to order style declarations by specificity. Note that 
 +     *  Array.sort() is not used as it does not employ a stable algorithm and
 +     *  CSS requires the order of equal style declaration to be preserved.
 +     */ 
 +    private static function sortOnSpecificity(decls:Array):Array // of CSSStyleDeclaration 
 +    {
 +        // TODO (pfarland): Copied algorithm from Group.sortOnLayer as the
 +        // number of declarations to be sorted is usually small. We may consider
 +        // replacing this insertion sort with an efficient but stable merge sort
 +        // or the like if many style declarations need to sorted.
 +        var len:Number = decls.length;
 +        var tmp:CSSStyleDeclaration;
 +
 +        if (len <= 1)
 +            return decls;
 +
 +        for (var i:int = 1; i < len; i++)
 +        {
 +            for (var j:int = i; j > 0; j--)
 +            {
 +                if (decls[j].specificity < decls[j-1].specificity)
 +                {
 +                    tmp = decls[j];
 +                    decls[j] = decls[j-1];
 +                    decls[j-1] = tmp;
 +                }
 +                else
 +                {
 +                    break;
 +                }
 +            }
 +        }
 +
 +        return decls; 
 +    }
 +    
 +    /**
 +     *  @private
 +     *  Get the style manager of any object. If the object does not implement IFlexModule or
 +     *  is not of type StyleProxy, then the top-level style manager will be returned.
 +     * 
 +     *  @param object - Typed as Object because various interfaces are passed here.
 +     *  @return a style manager, will not be null.
 +     */ 
 +    private static function getStyleManager(object:Object):IStyleManager2
 +    {
 +        if (object is IFlexModule)
 +            return StyleManager.getStyleManager(IFlexModule(object).moduleFactory);
 +        else if (object is StyleProxy)
 +            return getStyleManagerFromStyleProxy(StyleProxy(object));
 +        else
 +            return StyleManager.getStyleManager(null);
 +    }
 +
 +    /**
 +     *  @private
 +     *  Get the style manager for a given StyleProxy object.
 +     * 
 +     *  @return a style manager, will not be null.
 +     */ 
 +    private static function getStyleManagerFromStyleProxy(obj:StyleProxy):IStyleManager2
 +    {
 +        // StyleProxy's usually have sources that are DisplayObject's, but a StyleProxy can also have 
 +        // another StyleProxy as it's source (Example: CalendarLayout's source is a StyleProxy for DateChooser, 
 +        // whose style is a StyleProxy for DateField)
 +        var curObj:IStyleClient = obj;
 +        while (curObj is StyleProxy)
 +        {
 +            curObj = StyleProxy(curObj).source;
 +        }
 +
 +        if (curObj is IFlexModule)
 +            return StyleManager.getStyleManager(IFlexModule(curObj).moduleFactory);
 +        
 +        return StyleManager.getStyleManager(null);
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/styles/metadata/ContainerBackgroundStyles.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/styles/metadata/ContainerBackgroundStyles.as
index 7da71d7,0000000..adbe785
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/metadata/ContainerBackgroundStyles.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/metadata/ContainerBackgroundStyles.as
@@@ -1,65 -1,0 +1,65 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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.
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/**
 + *  Alpha level of the color defined by the <code>backgroundColor</code>
 + *  property, of the image or SWF file defined by the <code>backgroundImage</code>
 + *  style.
 + *  Valid values range from 0.0 to 1.0. For most controls, the default value is 1.0, 
 + *  but for ToolTip controls, the default value is 0.95 and for Alert controls, the default value is 0.9.
 + *  
 + *  @default 1.0
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Style(name="backgroundAlpha", type="Number", inherit="no", theme="halo, spark, mobile")]
 +
 +/**
 + *  Background color of a component.
 + *  You can have both a <code>backgroundColor</code> and a
 + *  <code>backgroundImage</code> set.
 + *  Some components do not have a background.
 + *  The DataGrid control ignores this style.
 + *  The default value is <code>undefined</code>, which means it is not set.
 + *  If both this style and the <code>backgroundImage</code> style
 + *  are <code>undefined</code>, the component has a transparent background.
 + *
 + *  <p>For the Application container, this style specifies the background color
 + *  while the application loads, and a background gradient while it is running. 
 + *  Flex calculates the gradient pattern between a color slightly darker than 
 + *  the specified color, and a color slightly lighter than the specified color.</p>
 + * 
 + *  <p>The default skins of most Flex controls are partially transparent. As a result, the background color of 
 + *  a container partially "bleeds through" to controls that are in that container. You can avoid this by setting the 
 + *  alpha values of the control's <code>fillAlphas</code> property to 1, as the following example shows:
 + *  <pre>
 + *  &lt;mx:<i>Container</i> backgroundColor="0x66CC66"/&gt;
 + *      &lt;mx:<i>ControlName</i> ... fillAlphas="[1,1]"/&gt;
 + *  &lt;/mx:<i>Container</i>&gt;</pre>
 + *  </p>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
- [Style(name="backgroundColor", type="uint", format="Color", inherit="no", theme="halo, spark, mobile")]
++[Style(name="backgroundColor", type="uint", format="Color", inherit="no", theme="halo, spark, mobile")]

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/DensityUtil.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/DensityUtil.as
index e80bad5,0000000..7fb27e0
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/DensityUtil.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/DensityUtil.as
@@@ -1,98 -1,0 +1,98 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +import mx.core.DPIClassification;
 +import mx.core.RuntimeDPIProvider;
 +import mx.core.Singleton;
 +
 +[ExcludeClass]
 +
 +/**
 + *  The <code>DensityUtil</code> class is an all-static class with methods for working with
 + *  density within Flex.
 + * 
 + *  Flex uses this class to calculate the scaling factor when automatic density
 + *  scaling is enabled for the <code>Application</code>.
 + *
 + *  @see mx.core.DPIClassification
 + *  @see spark.components.Application#applicationDPI 
 + */
 +public class DensityUtil
 +{
 +    /**
 +     *  Cached runtimeDPI value, which is computed from the runtimeDPIProvider class.
 +     */
 +    private static var runtimeDPI:Number;
 +    
 +    /**
 +     *  Returns the current runtimeDPI value which is calculated by 
 +     *  an instance of the runtimeDPIProvider class.
 +     *  If a runtimeDPIProvider class is not provided to the Application,
 +     *  Flex uses the default class, RuntimeDPIProvider.
 +     *
 +     *  @see #getDPIScale 
 +     *  @see mx.core.RuntimeDPIProvider
 +     */
 +    public static function getRuntimeDPI():Number
 +    {
 +        if (!isNaN(runtimeDPI))
 +            return runtimeDPI;
 +        
 +        var runtimeDPIProviderClass:Class = Singleton.getClass("mx.core::RuntimeDPIProvider");
 +        
 +        // Default to RuntimeDPIProvider
 +        if (!runtimeDPIProviderClass)
 +            runtimeDPIProviderClass = RuntimeDPIProvider;
 +        
 +        var instance:RuntimeDPIProvider = RuntimeDPIProvider(new runtimeDPIProviderClass());
 +        runtimeDPI = instance.runtimeDPI;
 +        
 +        return runtimeDPI;
 +    }
 +    
 +    /**
 +     *  Calculates a scale factor to be used when element authored for 
 +     *  <code>sourceDPI</code> is rendered at <code>targetDPI</code>.
 +     *  
 +     *  @param sourceDPI The <code>DPIClassification</code> dpi value for which
 +     *  a resource is optimized.
 +     * 
 +     *  @param targetDPI The <code>DPIClassification</code> dpi value at
 +     *  which a resource is rendered.
 +     * 
 +     *  @return The scale factor to be applied to the resource at render time.
 +     *
 +     *  @see #getRuntimeDPI
 +     *  @see mx.core.DPIClassification
 +     */
 +    public static function getDPIScale(sourceDPI:Number, targetDPI:Number):Number
 +    {
 +        // Unknown dpi returns NaN
 +        if ((sourceDPI != DPIClassification.DPI_120 && sourceDPI != DPIClassification.DPI_160 && sourceDPI != DPIClassification.DPI_240 && sourceDPI != DPIClassification.DPI_320 && sourceDPI != DPIClassification.DPI_480 && sourceDPI != DPIClassification.DPI_640) ||
 +            (targetDPI != DPIClassification.DPI_120 && targetDPI != DPIClassification.DPI_160 && targetDPI != DPIClassification.DPI_240 && targetDPI != DPIClassification.DPI_320 && targetDPI != DPIClassification.DPI_480 && targetDPI != DPIClassification.DPI_640))
 +        {
 +            return NaN;
 +        }
 +
 +        return targetDPI / sourceDPI;
 +    }
 +}
- }
++}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCacheRecord.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCacheRecord.as
index 5572500,0000000..26ad70b
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCacheRecord.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCacheRecord.as
@@@ -1,164 -1,0 +1,164 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils 
 +{
 +
 +import org.apache.flex.utils.Proxy;
 +import org.apache.flex.reflection.TypeDefinition;
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.utils.flash_proxy;
 +use namespace flash_proxy;
 +}
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  This class represents a single cache entry, this gets created
 + *  as part of the <code>describeType</code> method call on the 
 + *  <code>DescribeTypeCache</code>  class.
 + *  @flexjsignoreimport mx.utils.DescribeTypeCache
 + */
 +
 +public dynamic class DescribeTypeCacheRecord extends Proxy
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private var cache:Object = {};
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  typeDescription
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var typeDescription:TypeDefinition;
 +    
 +    //----------------------------------
 +    //  typeName
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var typeName:String;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public function DescribeTypeCacheRecord()
 +    {
 +        super();
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Overridden methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function getProperty(name:*):*
 +    {
 +        var result:* = cache[name];
 +        
 +        if (result === undefined)
 +        {
 +            result = DescribeTypeCache.extractValue(name, this);
 +            cache[name] = result;
 +        }
 +        
 +        return result;
 +    }
 +	COMPILE::JS
 +	override public function getProperty(name:String):*
 +	{
 +		var result:* = cache[name];
 +		
 +		if (result === undefined)
 +		{
 +			result = DescribeTypeCache.extractValue(name, this);
 +			cache[name] = result;
 +		}
 +		
 +		return result;
 +	}
 +	
 +
 +    /**
 +     *  @private
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override flash_proxy function hasProperty(name:*):Boolean
 +    {
 +        if (name in cache)
 +            return true;
 +        
 +        var value:* = DescribeTypeCache.extractValue(name, this);       
 +        
 +        if (value === undefined)
 +            return false;
 +        
 +        cache[name] = value;
 +        
 +        return true;
 +    }
 +	COMPILE::JS
 +	override public function hasProperty(name:String):Boolean
 +	{
 +		if (name in cache)
 +			return true;
 +		
 +		var value:* = DescribeTypeCache.extractValue(name, this);       
 +		
 +		if (value === undefined)
 +			return false;
 +		
 +		cache[name] = value;
 +		
 +		return true;
 +	}
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/GraphicsUtil.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/GraphicsUtil.as
index c366553,0000000..e1be742
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/GraphicsUtil.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/GraphicsUtil.as
@@@ -1,305 -1,0 +1,305 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.Graphics;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.Graphics;		
 +}
 +
 +/**
 + *  The Graphics class is an all-static class with utility methods
 + *  related to the Graphics class.
 + *  You do not create instances of GraphicsUtil;
 + *  instead you simply call methods such as the
 + *  <code>GraphicsUtil.drawRoundRectComplex()</code> method.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class GraphicsUtil
 +{
 +	include "../core/Version.as";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Class methods
 +	//
 +	//--------------------------------------------------------------------------
 +    
 +    /**
 +     * Draws a rounded rectangle using the size of a radius to draw the rounded corners. 
 +     * You must set the line style, fill, or both 
 +     * on the Graphics object before 
 +     * you call the <code>drawRoundRectComplex()</code> method 
 +     * by calling the <code>linestyle()</code>, 
 +     * <code>lineGradientStyle()</code>, <code>beginFill()</code>, 
 +     * <code>beginGradientFill()</code>, or 
 +     * <code>beginBitmapFill()</code> method.
 +     * 
 +     * @param graphics The Graphics object that draws the rounded rectangle.
 +     *
 +     * @param x The horizontal position relative to the 
 +     * registration point of the parent display object, in pixels.
 +     * 
 +     * @param y The vertical position relative to the 
 +     * registration point of the parent display object, in pixels.
 +     * 
 +     * @param width The width of the round rectangle, in pixels.
 +     * 
 +     * @param height The height of the round rectangle, in pixels.
 +     * 
 +     * @param topLeftRadius The radius of the upper-left corner, in pixels.
 +     * 
 +     * @param topRightRadius The radius of the upper-right corner, in pixels.
 +     * 
 +     * @param bottomLeftRadius The radius of the bottom-left corner, in pixels.
 +     * 
 +     * @param bottomRightRadius The radius of the bottom-right corner, in pixels.
 +     *
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function drawRoundRectComplex(graphics:Graphics, x:Number, y:Number, 
 +                                                width:Number, height:Number, 
 +                                                topLeftRadius:Number, topRightRadius:Number, 
 +                                                bottomLeftRadius:Number, bottomRightRadius:Number):void
 +    {
 +        var xw:Number = x + width;
 +        var yh:Number = y + height;
 +        
 +        // Make sure none of the radius values are greater than w/h.
 +        // These are all inlined to avoid function calling overhead
 +        var minSize:Number = width < height ? width * 2 : height * 2;
 +        topLeftRadius = topLeftRadius < minSize ? topLeftRadius : minSize;
 +        topRightRadius = topRightRadius < minSize ? topRightRadius : minSize;
 +        bottomLeftRadius = bottomLeftRadius < minSize ? bottomLeftRadius : minSize;
 +        bottomRightRadius = bottomRightRadius < minSize ? bottomRightRadius : minSize;
 +        
 +        // Math.sin and Math,tan values for optimal performance.
 +        // Math.rad = Math.PI / 180 = 0.0174532925199433
 +        // r * Math.sin(45 * Math.rad) =  (r * 0.707106781186547);
 +        // r * Math.tan(22.5 * Math.rad) = (r * 0.414213562373095);
 +        //
 +        // We can save further cycles by precalculating
 +        // 1.0 - 0.707106781186547 = 0.292893218813453 and
 +        // 1.0 - 0.414213562373095 = 0.585786437626905
 +        
 +        // bottom-right corner
 +        var a:Number = bottomRightRadius * 0.292893218813453;		// radius - anchor pt;
 +        var s:Number = bottomRightRadius * 0.585786437626905; 	// radius - control pt;
 +        graphics.moveTo(xw, yh - bottomRightRadius);
 +        graphics.curveTo(xw, yh - s, xw - a, yh - a);
 +        graphics.curveTo(xw - s, yh, xw - bottomRightRadius, yh);
 +        
 +        // bottom-left corner
 +        a = bottomLeftRadius * 0.292893218813453;
 +        s = bottomLeftRadius * 0.585786437626905;
 +        graphics.lineTo(x + bottomLeftRadius, yh);
 +        graphics.curveTo(x + s, yh, x + a, yh - a);
 +        graphics.curveTo(x, yh - s, x, yh - bottomLeftRadius);
 +        
 +        // top-left corner
 +        a = topLeftRadius * 0.292893218813453;
 +        s = topLeftRadius * 0.585786437626905;
 +        graphics.lineTo(x, y + topLeftRadius);
 +        graphics.curveTo(x, y + s, x + a, y + a);
 +        graphics.curveTo(x + s, y, x + topLeftRadius, y);
 +        
 +        // top-right corner
 +        a = topRightRadius * 0.292893218813453;
 +        s = topRightRadius * 0.585786437626905;
 +        graphics.lineTo(xw - topRightRadius, y);
 +        graphics.curveTo(xw - s, y, xw - a, y + a);
 +        graphics.curveTo(xw, y + s, xw, y + topRightRadius);
 +        graphics.lineTo(xw, yh - bottomRightRadius);
 +    }
 +    
 +    /**
 +     * Draws a rounded rectangle using the size of individual x and y radii to 
 +     * draw the rounded corners. 
 +     * You must set the line style, fill, or both 
 +     * on the Graphics object before 
 +     * you call the <code>drawRoundRectComplex2()</code> method 
 +     * by calling the <code>linestyle()</code>, 
 +     * <code>lineGradientStyle()</code>, <code>beginFill()</code>, 
 +     * <code>beginGradientFill()</code>, or 
 +     * <code>beginBitmapFill()</code> method.
 +     * 
 +     * @param graphics The Graphics object that draws the rounded rectangle.
 +     *
 +     * @param x The horizontal position relative to the 
 +     * registration point of the parent display object, in pixels.
 +     * 
 +     * @param y The vertical position relative to the 
 +     * registration point of the parent display object, in pixels.
 +     * 
 +     * @param width The width of the round rectangle, in pixels.
 +     * 
 +     * @param height The height of the round rectangle, in pixels.
 +     * 
 +     * @param radiusX The default radiusX to use, if corner-specific values are not specified.
 +     * This value must be specified.
 +     * 
 +     * @param radiusY The default radiusY to use, if corner-specific values are not specified. 
 +     * If 0, the value of radiusX is used.
 +     * 
 +     * @param topLeftRadiusX The x radius of the upper-left corner, in pixels. If NaN, 
 +     * the value of radiusX is used.
 +     * 
 +     * @param topLeftRadiusY The y radius of the upper-left corner, in pixels. If NaN,
 +     * the value of topLeftRadiusX is used.
 +     * 
 +     * @param topRightRadiusX The x radius of the upper-right corner, in pixels. If NaN,
 +     * the value of radiusX is used.
 +     * 
 +     * @param topRightRadiusY The y radius of the upper-right corner, in pixels. If NaN,
 +     * the value of topRightRadiusX is used.
 +     * 
 +     * @param bottomLeftRadiusX The x radius of the bottom-left corner, in pixels. If NaN,
 +     * the value of radiusX is used.
 +     * 
 +     * @param bottomLeftRadiusY The y radius of the bottom-left corner, in pixels. If NaN,
 +     * the value of bottomLeftRadiusX is used.
 +     * 
 +     * @param bottomRightRadiusX The x radius of the bottom-right corner, in pixels. If NaN,
 +     * the value of radiusX is used.
 +     * 
 +     * @param bottomRightRadiusY The y radius of the bottom-right corner, in pixels. If NaN,
 +     * the value of bottomRightRadiusX is used.
 +     * 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    public static function drawRoundRectComplex2(graphics:Graphics, x:Number, y:Number, 
 +                                                width:Number, height:Number, 
 +                                                radiusX:Number, radiusY:Number,
 +                                                topLeftRadiusX:Number, topLeftRadiusY:Number,
 +                                                topRightRadiusX:Number, topRightRadiusY:Number,
 +                                                bottomLeftRadiusX:Number, bottomLeftRadiusY:Number,
 +                                                bottomRightRadiusX:Number, bottomRightRadiusY:Number):void
 +    {
 +        var xw:Number = x + width;
 +        var yh:Number = y + height;
 +        var maxXRadius:Number = width / 2;
 +        var maxYRadius:Number = height / 2;
 +        
 +        // Rules for determining radius for each corner:
 +        //  - If explicit nnnRadiusX value is set, use it. Otherwise use radiusX.
 +        //  - If explicit nnnRadiusY value is set, use it. Otherwise use corresponding nnnRadiusX.
 +        if (radiusY == 0)
 +            radiusY = radiusX;
 +        if (isNaN(topLeftRadiusX))
 +            topLeftRadiusX = radiusX;
 +        if (isNaN(topLeftRadiusY))
 +            topLeftRadiusY = topLeftRadiusX;
 +        if (isNaN(topRightRadiusX))
 +            topRightRadiusX = radiusX;
 +        if (isNaN(topRightRadiusY))
 +            topRightRadiusY = topRightRadiusX;
 +        if (isNaN(bottomLeftRadiusX))
 +            bottomLeftRadiusX = radiusX;
 +        if (isNaN(bottomLeftRadiusY))
 +            bottomLeftRadiusY = bottomLeftRadiusX;
 +        if (isNaN(bottomRightRadiusX))
 +            bottomRightRadiusX = radiusX;
 +        if (isNaN(bottomRightRadiusY))
 +            bottomRightRadiusY = bottomRightRadiusX;
 +        
 +        // Pin radius values to half of the width/height
 +        if (topLeftRadiusX > maxXRadius)
 +            topLeftRadiusX = maxXRadius;
 +        if (topLeftRadiusY > maxYRadius)
 +            topLeftRadiusY = maxYRadius;
 +        if (topRightRadiusX > maxXRadius)
 +            topRightRadiusX = maxXRadius;
 +        if (topRightRadiusY > maxYRadius)
 +            topRightRadiusY = maxYRadius;
 +        if (bottomLeftRadiusX > maxXRadius)
 +            bottomLeftRadiusX = maxXRadius;
 +        if (bottomLeftRadiusY > maxYRadius)
 +            bottomLeftRadiusY = maxYRadius;
 +        if (bottomRightRadiusX > maxXRadius)
 +            bottomRightRadiusX = maxXRadius;
 +        if (bottomRightRadiusY > maxYRadius)
 +            bottomRightRadiusY = maxYRadius;
 +        
 +        // Math.sin and Math,tan values for optimal performance.
 +        // Math.rad = Math.PI / 180 = 0.0174532925199433
 +        // r * Math.sin(45 * Math.rad) =  (r * 0.707106781186547);
 +        // r * Math.tan(22.5 * Math.rad) = (r * 0.414213562373095);
 +        //
 +        // We can save further cycles by precalculating
 +        // 1.0 - 0.707106781186547 = 0.292893218813453 and
 +        // 1.0 - 0.414213562373095 = 0.585786437626905
 +        
 +        // bottom-right corner
 +        var aX:Number = bottomRightRadiusX * 0.292893218813453;		// radius - anchor pt;
 +        var aY:Number = bottomRightRadiusY * 0.292893218813453;		// radius - anchor pt;
 +        var sX:Number = bottomRightRadiusX * 0.585786437626905; 	// radius - control pt;
 +        var sY:Number = bottomRightRadiusY * 0.585786437626905; 	// radius - control pt;
 +        graphics.moveTo(xw, yh - bottomRightRadiusY);
 +        graphics.curveTo(xw, yh - sY, xw - aX, yh - aY);
 +        graphics.curveTo(xw - sX, yh, xw - bottomRightRadiusX, yh);
 +        
 +        // bottom-left corner
 +        aX = bottomLeftRadiusX * 0.292893218813453;
 +        aY = bottomLeftRadiusY * 0.292893218813453;
 +        sX = bottomLeftRadiusX * 0.585786437626905;
 +        sY = bottomLeftRadiusY * 0.585786437626905;
 +        graphics.lineTo(x + bottomLeftRadiusX, yh);
 +        graphics.curveTo(x + sX, yh, x + aX, yh - aY);
 +        graphics.curveTo(x, yh - sY, x, yh - bottomLeftRadiusY);
 +        
 +        // top-left corner
 +        aX = topLeftRadiusX * 0.292893218813453;
 +        aY = topLeftRadiusY * 0.292893218813453;
 +        sX = topLeftRadiusX * 0.585786437626905;
 +        sY = topLeftRadiusY * 0.585786437626905;
 +        graphics.lineTo(x, y + topLeftRadiusY);
 +        graphics.curveTo(x, y + sY, x + aX, y + aY);
 +        graphics.curveTo(x + sX, y, x + topLeftRadiusX, y);
 +        
 +        // top-right corner
 +        aX = topRightRadiusX * 0.292893218813453;
 +        aY = topRightRadiusY * 0.292893218813453;
 +        sX = topRightRadiusX * 0.585786437626905;
 +        sY = topRightRadiusY * 0.585786437626905;
 +        graphics.lineTo(xw - topRightRadiusX, y);
 +        graphics.curveTo(xw - sX, y, xw - aX, y + aY);
 +        graphics.curveTo(xw, y + sY, xw, y + topRightRadiusY);
 +        graphics.lineTo(xw, yh - bottomRightRadiusY);
 +    }
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/utils/IXMLNotifiable.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/utils/IXMLNotifiable.as
index 0ca48bc,0000000..8826dd0
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/IXMLNotifiable.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/IXMLNotifiable.as
@@@ -1,43 -1,0 +1,43 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.utils
 +{
 +
 +/**
 + *  The IXMLNotifiable interface.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IXMLNotifiable
 +{
 +    /**
 +    *  @private
 +    */
 +    function xmlNotification(currentTarget:Object,
 +                             type:String,
 +                             target:Object,
 +                             value:Object,
 +                             detail:Object):void;
 +}
 +
- }
++}


[02/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - add named configs for jquery, node, and createjs, and use named configs in more places

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/node-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/node-config-template.xml b/frameworks/node-config-template.xml
new file mode 100644
index 0000000..89263db
--- /dev/null
+++ b/frameworks/node-config-template.xml
@@ -0,0 +1,340 @@
+<?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.
+
+-->
+
+
+<flex-config>
+    <!-- Specifies the minimum player version that will run the compiled SWF. -->
+   <target-player>@playerversion@</target-player>
+
+    <!-- Specifies the version of the compiled SWF -->
+   <swf-version>@swfversion@</swf-version>
+
+   <compiler>
+
+      <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+      <!-- not set -->
+      <!--
+      <source-path>
+         <path-element>string</path-element>
+      </source-path>
+      -->
+
+     <!-- Allow the source-path to have path-elements which contain other path-elements -->
+     <allow-source-path-overlap>false</allow-source-path-overlap>
+
+      <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+      <!-- code.                                                                       -->
+      <show-actionscript-warnings>true</show-actionscript-warnings>
+
+      <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+      <!-- but true by default for compc. -->
+      <!--
+      <debug>true</debug>
+      -->
+
+      <!-- List of SWC files or directories to compile against but to omit from -->
+      <!-- linking.                                                             -->
+      <external-library-path>
+          <path-element>../js/libs/js.swc</path-element>
+          <path-element>../js/libs/node.swc</path-element>
+      </external-library-path>
+
+      <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
+      <!-- the compiler during mxml translation and are helpful with understanding and   -->
+      <!-- debugging Flex applications.                                                  -->
+      <keep-generated-actionscript>false</keep-generated-actionscript>
+
+      <!-- not set -->
+      <!--
+      <include-libraries>
+         <library>string</library>
+      </include-libraries>
+      -->
+
+      <!-- List of SWC files or directories that contain SWC files. -->
+      <library-path>
+         <path-element>../js/libs/GCL.swc</path-element>
+      </library-path>
+
+      <mxml>
+          <children-as-data>true</children-as-data>
+          <imports>
+            <implicit-import>org.apache.flex.events.*</implicit-import>
+            <implicit-import>org.apache.flex.geom.*</implicit-import>
+            <implicit-import>org.apache.flex.core.ClassFactory</implicit-import>
+            <implicit-import>org.apache.flex.core.IFactory</implicit-import>
+        </imports>
+      </mxml>
+      <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+      <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+      <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+      <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+      <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
+      <states-class>org.apache.flex.states.State</states-class>
+      <states-instance-override-class>org.apache.flex.states.AddItems</states-instance-override-class>
+      <states-property-override-class>org.apache.flex.states.SetProperty</states-property-override-class>
+      <states-event-override-class>org.apache.flex.states.SetEventHandler</states-event-override-class>
+      <component-factory-class>org.apache.flex.core.ClassFactory</component-factory-class>
+      <component-factory-interface>org.apache.flex.core.IFactory</component-factory-interface>
+        
+      <namespaces>
+      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
+      <!-- elements.                                                                -->
+      </namespaces>
+
+      <!-- Enable post-link SWF optimization. -->
+      <optimize>true</optimize>
+
+      <!-- Enable trace statement omission. -->
+      <omit-trace-statements>true</omit-trace-statements>
+
+      <!-- Keep the following AS3 metadata in the bytecodes.                                             -->
+      <!-- Warning: For the data binding feature in the Flex framework to work properly,                 -->
+      <!--          the following metadata must be kept:                                                 -->
+      <!--          1. Bindable                                                                          -->
+      <!--          2. Managed                                                                           -->
+      <!--          3. ChangeEvent                                                                       -->
+      <!--          4. NonCommittingChangeEvent                                                          -->
+      <!--          5. Transient                                                                         -->
+      <!--
+      <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+      </keep-as3-metadata>
+      -->
+
+      <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
+      <!-- will not be able to detect assignments to "foo".                               -->
+      <show-binding-warnings>true</show-binding-warnings>
+
+      <!-- toggle whether warnings generated from unused type selectors are displayed -->
+      <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
+
+      <!-- Run the AS3 compiler in strict error checking mode. -->
+      <strict>true</strict>
+
+      <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
+      <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
+      <!-- (-strict is recommended, but not required, for earlier errors) -->
+      <as3>true</as3>
+
+      <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
+      <!-- properties. In the prototype based object model built-in functions are implemented as dynamic      -->
+      <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for         -->
+      <!-- references to dynamic properties) -->
+      <es>false</es>
+
+      <!-- List of CSS or SWC files to apply as a theme. -->
+      <theme>
+      </theme>
+
+      <!-- Turns on the display of stack traces for uncaught runtime errors. -->
+      <verbose-stacktraces>false</verbose-stacktraces>
+
+      <!-- Defines the AS3 file encoding. -->
+      <!-- not set -->
+      <!--
+      <actionscript-file-encoding></actionscript-file-encoding>
+      -->
+
+      <fonts>
+
+          <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
+          <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
+          <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
+          <advanced-anti-aliasing>true</advanced-anti-aliasing>
+
+          <!-- The number of embedded font faces that are cached. -->
+          <max-cached-fonts>20</max-cached-fonts>
+
+          <!-- The number of character glyph outlines to cache for each font face. -->
+          <max-glyphs-per-face>1000</max-glyphs-per-face>
+
+          <!-- Defines ranges that can be used across multiple font-face declarations. -->
+          <!-- See flash-unicode-table.xml for more examples. -->
+          <!-- not set -->
+          <!--
+          <languages>
+              <language-range>
+                  <lang>englishRange</lang>
+                  <range>U+0020-007E</range>
+              </language-range>
+          </languages>
+          -->
+
+          <!-- Compiler font manager classes, in policy resolution order -->
+          <!-- NOTE: For Apache Flex -->
+          <!-- AFEFontManager and CFFFontManager both use proprietary technology.  -->
+          <!-- You must install the optional font jars if you wish to use embedded fonts  -->
+          <!-- directly or you can use fontswf to precompile the font as a swf.  -->
+          <managers>
+              <manager-class>flash.fonts.JREFontManager</manager-class>
+              <manager-class>flash.fonts.BatikFontManager</manager-class>
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+              <manager-class>flash.fonts.CFFFontManager</manager-class>
+          </managers>
+
+          <!-- File containing cached system font licensing information produced via
+               java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
+               Will default to winFonts.ser on Windows XP and
+               macFonts.ser on Mac OS X, so is commented out by default.
+
+          <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
+          -->
+
+      </fonts>
+      
+      <!-- Array.toString() format has changed. -->
+      <warn-array-tostring-changes>false</warn-array-tostring-changes>
+
+      <!-- Assignment within conditional. -->
+      <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+      <!-- Possibly invalid Array cast operation. -->
+      <warn-bad-array-cast>true</warn-bad-array-cast>
+
+      <!-- Non-Boolean value used where a Boolean value was expected. -->
+      <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
+
+      <!-- Invalid Date cast operation. -->
+      <warn-bad-date-cast>true</warn-bad-date-cast>
+
+      <!-- Unknown method. -->
+      <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
+
+      <!-- Unknown property. -->
+      <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
+
+      <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+      <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+      <!-- Impossible assignment to null. -->
+      <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+      <!-- Illogical comparison with null. -->
+      <warn-bad-null-comparison>true</warn-bad-null-comparison>
+
+      <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+      <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+      <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
+      <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
+
+      <!-- __resolve is no longer supported. -->
+      <warn-changes-in-resolve>false</warn-changes-in-resolve>
+
+      <!-- Class is sealed. It cannot have members added to it dynamically. -->
+      <warn-class-is-sealed>true</warn-class-is-sealed>
+
+      <!-- Constant not initialized. -->
+      <warn-const-not-initialized>true</warn-const-not-initialized>
+
+      <!-- Function used in new expression returns a value. Result will be what the -->
+      <!-- function returns, rather than a new instance of that function.           -->
+      <warn-constructor-returns-value>false</warn-constructor-returns-value>
+
+      <!-- EventHandler was not added as a listener. -->
+      <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
+
+      <!-- Unsupported ActionScript 2.0 function. -->
+      <warn-deprecated-function-error>true</warn-deprecated-function-error>
+
+      <!-- Unsupported ActionScript 2.0 property. -->
+      <warn-deprecated-property-error>true</warn-deprecated-property-error>
+
+      <!-- More than one argument by the same name. -->
+      <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
+
+      <!-- Duplicate variable definition -->
+      <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+      <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
+      <warn-for-var-in-changes>false</warn-for-var-in-changes>
+
+      <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
+      <warn-import-hides-class>true</warn-import-hides-class>
+
+      <!-- Use of the instanceof operator. -->
+      <warn-instance-of-changes>true</warn-instance-of-changes>
+
+      <!-- Internal error in compiler. -->
+      <warn-internal-error>true</warn-internal-error>
+
+      <!-- _level is no longer supported. For more information, see the flash.display package. -->
+      <warn-level-not-supported>true</warn-level-not-supported>
+
+      <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+      <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+      <!-- Negative value will become a large positive value when assigned to a uint data type. -->
+      <warn-negative-uint-literal>true</warn-negative-uint-literal>
+
+      <!-- Missing constructor. -->
+      <warn-no-constructor>false</warn-no-constructor>
+
+      <!-- The super() statement was not called within the constructor. -->
+      <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
+
+      <!-- Missing type declaration. -->
+      <warn-no-type-decl>true</warn-no-type-decl>
+
+      <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
+      <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space.      -->
+      <warn-number-from-string-changes>false</warn-number-from-string-changes>
+
+      <!-- Change in scoping for the this keyword. Class methods extracted from an  -->
+      <!-- instance of a class will always resolve this back to that instance. In   -->
+      <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
+      <!-- is invoked from.                                                         -->
+      <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
+
+      <!-- Inefficient use of += on a TextField.-->
+      <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
+
+      <!-- Possible missing parentheses. -->
+      <warn-unlikely-function-value>true</warn-unlikely-function-value>
+
+      <!-- Possible usage of the ActionScript 2.0 XML class. -->
+      <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
+
+   </compiler>
+
+
+   <!-- target-player: specifies the version of the player the application is targeting.
+                       Features requiring a later version will not be compiled into the application.
+                       The minimum value supported is "9.0.0".-->
+   <!-- target-player usage:
+   <target-player>version</target-player>
+   -->
+
+   <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+   <metadata>
+      <title>Apache FlexJS Application</title>
+      <description>http://flex.apache.org/</description>
+      <publisher>Apache Software Foundation</publisher>
+      <creator>unknown</creator>
+      <language>EN</language>
+   </metadata>
+   
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/frameworks/node-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/node-config.xml b/frameworks/node-config.xml
new file mode 100644
index 0000000..5af742f
--- /dev/null
+++ b/frameworks/node-config.xml
@@ -0,0 +1,340 @@
+<?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.
+
+-->
+
+
+<flex-config>
+    <!-- Specifies the minimum player version that will run the compiled SWF. -->
+   <target-player>11.1</target-player>
+
+    <!-- Specifies the version of the compiled SWF -->
+   <swf-version>14</swf-version>
+
+   <compiler>
+
+      <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+      <!-- not set -->
+      <!--
+      <source-path>
+         <path-element>string</path-element>
+      </source-path>
+      -->
+
+     <!-- Allow the source-path to have path-elements which contain other path-elements -->
+     <allow-source-path-overlap>false</allow-source-path-overlap>
+
+      <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+      <!-- code.                                                                       -->
+      <show-actionscript-warnings>true</show-actionscript-warnings>
+
+      <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+      <!-- but true by default for compc. -->
+      <!--
+      <debug>true</debug>
+      -->
+
+      <!-- List of SWC files or directories to compile against but to omit from -->
+      <!-- linking.                                                             -->
+      <external-library-path>
+          <path-element>../js/libs/js.swc</path-element>
+          <path-element>../js/libs/node.swc</path-element>
+      </external-library-path>
+
+      <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
+      <!-- the compiler during mxml translation and are helpful with understanding and   -->
+      <!-- debugging Flex applications.                                                  -->
+      <keep-generated-actionscript>false</keep-generated-actionscript>
+
+      <!-- not set -->
+      <!--
+      <include-libraries>
+         <library>string</library>
+      </include-libraries>
+      -->
+
+      <!-- List of SWC files or directories that contain SWC files. -->
+      <library-path>
+         <path-element>../js/libs/GCL.swc</path-element>
+      </library-path>
+
+      <mxml>
+          <children-as-data>true</children-as-data>
+          <imports>
+            <implicit-import>org.apache.flex.events.*</implicit-import>
+            <implicit-import>org.apache.flex.geom.*</implicit-import>
+            <implicit-import>org.apache.flex.core.ClassFactory</implicit-import>
+            <implicit-import>org.apache.flex.core.IFactory</implicit-import>
+        </imports>
+      </mxml>
+      <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+      <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+      <binding-value-change-event-type>valueChange</binding-value-change-event-type>
+      <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+      <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
+      <states-class>org.apache.flex.states.State</states-class>
+      <states-instance-override-class>org.apache.flex.states.AddItems</states-instance-override-class>
+      <states-property-override-class>org.apache.flex.states.SetProperty</states-property-override-class>
+      <states-event-override-class>org.apache.flex.states.SetEventHandler</states-event-override-class>
+      <component-factory-class>org.apache.flex.core.ClassFactory</component-factory-class>
+      <component-factory-interface>org.apache.flex.core.IFactory</component-factory-interface>
+        
+      <namespaces>
+      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
+      <!-- elements.                                                                -->
+      </namespaces>
+
+      <!-- Enable post-link SWF optimization. -->
+      <optimize>true</optimize>
+
+      <!-- Enable trace statement omission. -->
+      <omit-trace-statements>true</omit-trace-statements>
+
+      <!-- Keep the following AS3 metadata in the bytecodes.                                             -->
+      <!-- Warning: For the data binding feature in the Flex framework to work properly,                 -->
+      <!--          the following metadata must be kept:                                                 -->
+      <!--          1. Bindable                                                                          -->
+      <!--          2. Managed                                                                           -->
+      <!--          3. ChangeEvent                                                                       -->
+      <!--          4. NonCommittingChangeEvent                                                          -->
+      <!--          5. Transient                                                                         -->
+      <!--
+      <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+      </keep-as3-metadata>
+      -->
+
+      <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
+      <!-- will not be able to detect assignments to "foo".                               -->
+      <show-binding-warnings>true</show-binding-warnings>
+
+      <!-- toggle whether warnings generated from unused type selectors are displayed -->
+      <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
+
+      <!-- Run the AS3 compiler in strict error checking mode. -->
+      <strict>true</strict>
+
+      <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
+      <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
+      <!-- (-strict is recommended, but not required, for earlier errors) -->
+      <as3>true</as3>
+
+      <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
+      <!-- properties. In the prototype based object model built-in functions are implemented as dynamic      -->
+      <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for         -->
+      <!-- references to dynamic properties) -->
+      <es>false</es>
+
+      <!-- List of CSS or SWC files to apply as a theme. -->
+      <theme>
+      </theme>
+
+      <!-- Turns on the display of stack traces for uncaught runtime errors. -->
+      <verbose-stacktraces>false</verbose-stacktraces>
+
+      <!-- Defines the AS3 file encoding. -->
+      <!-- not set -->
+      <!--
+      <actionscript-file-encoding></actionscript-file-encoding>
+      -->
+
+      <fonts>
+
+          <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
+          <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
+          <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
+          <advanced-anti-aliasing>true</advanced-anti-aliasing>
+
+          <!-- The number of embedded font faces that are cached. -->
+          <max-cached-fonts>20</max-cached-fonts>
+
+          <!-- The number of character glyph outlines to cache for each font face. -->
+          <max-glyphs-per-face>1000</max-glyphs-per-face>
+
+          <!-- Defines ranges that can be used across multiple font-face declarations. -->
+          <!-- See flash-unicode-table.xml for more examples. -->
+          <!-- not set -->
+          <!--
+          <languages>
+              <language-range>
+                  <lang>englishRange</lang>
+                  <range>U+0020-007E</range>
+              </language-range>
+          </languages>
+          -->
+
+          <!-- Compiler font manager classes, in policy resolution order -->
+          <!-- NOTE: For Apache Flex -->
+          <!-- AFEFontManager and CFFFontManager both use proprietary technology.  -->
+          <!-- You must install the optional font jars if you wish to use embedded fonts  -->
+          <!-- directly or you can use fontswf to precompile the font as a swf.  -->
+          <managers>
+              <manager-class>flash.fonts.JREFontManager</manager-class>
+              <manager-class>flash.fonts.BatikFontManager</manager-class>
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+              <manager-class>flash.fonts.CFFFontManager</manager-class>
+          </managers>
+
+          <!-- File containing cached system font licensing information produced via
+               java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
+               Will default to winFonts.ser on Windows XP and
+               macFonts.ser on Mac OS X, so is commented out by default.
+
+          <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
+          -->
+
+      </fonts>
+      
+      <!-- Array.toString() format has changed. -->
+      <warn-array-tostring-changes>false</warn-array-tostring-changes>
+
+      <!-- Assignment within conditional. -->
+      <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+      <!-- Possibly invalid Array cast operation. -->
+      <warn-bad-array-cast>true</warn-bad-array-cast>
+
+      <!-- Non-Boolean value used where a Boolean value was expected. -->
+      <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
+
+      <!-- Invalid Date cast operation. -->
+      <warn-bad-date-cast>true</warn-bad-date-cast>
+
+      <!-- Unknown method. -->
+      <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
+
+      <!-- Unknown property. -->
+      <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
+
+      <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+      <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+      <!-- Impossible assignment to null. -->
+      <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+      <!-- Illogical comparison with null. -->
+      <warn-bad-null-comparison>true</warn-bad-null-comparison>
+
+      <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+      <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+      <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
+      <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
+
+      <!-- __resolve is no longer supported. -->
+      <warn-changes-in-resolve>false</warn-changes-in-resolve>
+
+      <!-- Class is sealed. It cannot have members added to it dynamically. -->
+      <warn-class-is-sealed>true</warn-class-is-sealed>
+
+      <!-- Constant not initialized. -->
+      <warn-const-not-initialized>true</warn-const-not-initialized>
+
+      <!-- Function used in new expression returns a value. Result will be what the -->
+      <!-- function returns, rather than a new instance of that function.           -->
+      <warn-constructor-returns-value>false</warn-constructor-returns-value>
+
+      <!-- EventHandler was not added as a listener. -->
+      <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
+
+      <!-- Unsupported ActionScript 2.0 function. -->
+      <warn-deprecated-function-error>true</warn-deprecated-function-error>
+
+      <!-- Unsupported ActionScript 2.0 property. -->
+      <warn-deprecated-property-error>true</warn-deprecated-property-error>
+
+      <!-- More than one argument by the same name. -->
+      <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
+
+      <!-- Duplicate variable definition -->
+      <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+      <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
+      <warn-for-var-in-changes>false</warn-for-var-in-changes>
+
+      <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
+      <warn-import-hides-class>true</warn-import-hides-class>
+
+      <!-- Use of the instanceof operator. -->
+      <warn-instance-of-changes>true</warn-instance-of-changes>
+
+      <!-- Internal error in compiler. -->
+      <warn-internal-error>true</warn-internal-error>
+
+      <!-- _level is no longer supported. For more information, see the flash.display package. -->
+      <warn-level-not-supported>true</warn-level-not-supported>
+
+      <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+      <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+      <!-- Negative value will become a large positive value when assigned to a uint data type. -->
+      <warn-negative-uint-literal>true</warn-negative-uint-literal>
+
+      <!-- Missing constructor. -->
+      <warn-no-constructor>false</warn-no-constructor>
+
+      <!-- The super() statement was not called within the constructor. -->
+      <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
+
+      <!-- Missing type declaration. -->
+      <warn-no-type-decl>true</warn-no-type-decl>
+
+      <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
+      <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space.      -->
+      <warn-number-from-string-changes>false</warn-number-from-string-changes>
+
+      <!-- Change in scoping for the this keyword. Class methods extracted from an  -->
+      <!-- instance of a class will always resolve this back to that instance. In   -->
+      <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
+      <!-- is invoked from.                                                         -->
+      <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
+
+      <!-- Inefficient use of += on a TextField.-->
+      <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
+
+      <!-- Possible missing parentheses. -->
+      <warn-unlikely-function-value>true</warn-unlikely-function-value>
+
+      <!-- Possible usage of the ActionScript 2.0 XML class. -->
+      <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
+
+   </compiler>
+
+
+   <!-- target-player: specifies the version of the player the application is targeting.
+                       Features requiring a later version will not be compiled into the application.
+                       The minimum value supported is "9.0.0".-->
+   <!-- target-player usage:
+   <target-player>version</target-player>
+   -->
+
+   <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+   <metadata>
+      <title>Apache FlexJS Application</title>
+      <description>http://flex.apache.org/</description>
+      <publisher>Apache Software Foundation</publisher>
+      <creator>unknown</creator>
+      <language>EN</language>
+   </metadata>
+   
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/js/bin/asnodec
----------------------------------------------------------------------
diff --git a/js/bin/asnodec b/js/bin/asnodec
index 78497b1..7225cbf 100755
--- a/js/bin/asnodec
+++ b/js/bin/asnodec
@@ -67,4 +67,4 @@ fi
 
 VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
 
-java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=node -external-library-path="$SCRIPT_HOME/../libs/js.swc" -external-library-path="$SCRIPT_HOME/../libs/node.swc" "$@"
+java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=node +configname=node "$@"

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/js/bin/asnodec.bat
----------------------------------------------------------------------
diff --git a/js/bin/asnodec.bat b/js/bin/asnodec.bat
index 67742cf..8dc90e5 100644
--- a/js/bin/asnodec.bat
+++ b/js/bin/asnodec.bat
@@ -26,4 +26,4 @@ if "x%FALCON_HOME%"=="x"  (set "FALCON_HOME=%~dp0..\..") else echo Using Falcon
 
 if "x%FLEX_HOME%"=="x" (set "FLEX_HOME=%~dp0..\..") else echo Using Flex SDK: %FLEX_HOME%
 
-@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\mxmlc.jar" -js-output-type=node -external-library-path="%FLEX_HOME%\js\libs\js.swc" -external-library-path="%FLEX_HOME%\js\libs\node.swc" %*
\ No newline at end of file
+@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\mxmlc.jar" -js-output-type=node +configname=node %*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/js/bin/jquery
----------------------------------------------------------------------
diff --git a/js/bin/jquery b/js/bin/jquery
index 64300b4..d93d56f 100755
--- a/js/bin/jquery
+++ b/js/bin/jquery
@@ -67,4 +67,4 @@ fi
 
 VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
 
-java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=jsc -external-library-path="$SCRIPT_HOME/../libs/js.swc" -external-library-path+="$SCRIPT_HOME/../libs/jquery.swc" "$@"
+java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=jsc +configname=jquery "$@"

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a47cadf3/js/bin/jquery.bat
----------------------------------------------------------------------
diff --git a/js/bin/jquery.bat b/js/bin/jquery.bat
index e37c5ad..10aaecd 100644
--- a/js/bin/jquery.bat
+++ b/js/bin/jquery.bat
@@ -26,4 +26,4 @@ if "x%FALCON_HOME%"=="x"  (set "FALCON_HOME=%~dp0..\..") else echo Using Falcon
 
 if "x%FLEX_HOME%"=="x" (set "FLEX_HOME=%~dp0..\..") else echo Using Flex SDK: %FLEX_HOME%
 
-@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\mxmlc.jar" -js-output-type=jsc -external-library-path="%FLEX_HOME%\js\libs\js.swc" -external-library-path+="%FLEX_HOME%\js\libs\jquery.swc" %*
\ No newline at end of file
+@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -Dflexlib="%FLEX_HOME%\frameworks" -jar "%FALCON_HOME%\js\lib\mxmlc.jar" -js-output-type=jsc +configname=jquery %*
\ No newline at end of file


[36/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/FocusManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/FocusManager.as
index d641b83,0000000..47ee771
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/FocusManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/FocusManager.as
@@@ -1,2453 -1,0 +1,2453 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.display.DisplayObject;
 +import flash.display.DisplayObjectContainer;
 +import flash.display.InteractiveObject;
 +import flash.display.Stage;
 +import flash.events.Event;
 +import flash.events.EventDispatcher;
 +import flash.events.FocusEvent;
 +import flash.events.KeyboardEvent;
 +import flash.events.MouseEvent;
 +import flash.system.Capabilities;
 +import flash.system.IME;
 +import flash.text.TextField;
 +import flash.ui.Keyboard;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;
 +	import flex.display.InteractiveObject;	
 +	import org.apache.flex.events.EventDispatcher;
 +	import flex.events.Event;
 +	import flex.events.FocusEvent;
 +	import flex.ui.Keyboard;
 +	import flex.text.TextField;
 +}
 +COMPILE::LATER
 +{
 +import mx.core.FlexSprite;
 +import mx.core.ISWFLoader;
 +import mx.core.IVisualElement;
 +}
 +import mx.core.IButton;
 +import mx.core.IChildList;
 +import mx.core.IIMESupport;
 +import mx.core.IRawChildrenContainer;
 +import mx.core.IToggleButton;
 +import mx.core.IUIComponent;
 +import mx.core.mx_internal;
 +import mx.events.FlexEvent;
 +import mx.utils.Platform;
 +
 +import flex.display.Sprite;
 +
 +import org.apache.flex.core.IUIBase;
 +
 +use namespace mx_internal;
 +
 +/**
 + *  The FocusManager class manages the focus on components in response to mouse
 + *  activity or keyboard activity (Tab key).  There can be several FocusManager
 + *  instances in an application.  Each FocusManager instance 
 + *  is responsible for a set of components that comprise a "tab loop".  If you
 + *  hit Tab enough times, focus traverses through a set of components and
 + *  eventually get back to the first component that had focus.  That is a "tab loop"
 + *  and a FocusManager instance manages that loop.  If there are popup windows
 + *  with their own set of components in a "tab loop" those popup windows will have
 + *  their own FocusManager instances.  The main application always has a
 + *  FocusManager instance.
 + *
 + *  <p>The FocusManager manages focus from the "component level".
 + *  In Flex, a UITextField in a component is the only way to allow keyboard entry
 + *  of text. To the Flash Player or AIR, that UITextField has focus. However, from the 
 + *  FocusManager's perspective the component that parents the UITextField has focus.
 + *  Thus there is a distinction between component-level focus and player-level focus.
 + *  Application developers generally only have to deal with component-level focus while
 + *  component developers must understand player-level focus.</p>
 + *
 + *  <p>All components that can be managed by the FocusManager must implement
 + *  mx.managers.IFocusManagerComponent, whereas objects managed by player-level focus do not.</p>  
 + *
 + *  <p>The FocusManager also managers the concept of a defaultButton, which is
 + *  the Button on a form that dispatches a click event when the Enter key is pressed
 + *  depending on where focus is at that time.</p>
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public class FocusManager extends EventDispatcher implements IFocusManager
 +{
 +    include "../core/Version.as";
 +
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Class constants
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 * @private
 +	 * 
 +	 * Default value of parameter, ignore. 
 +	 */
 +	private static const FROM_INDEX_UNSPECIFIED:int = -2;
 +	
 +	//--------------------------------------------------------------------------
 +	//
 +	//  Class variables
 +	//
 +	//--------------------------------------------------------------------------
 +
 +	/**
 +	 * @private
 +	 * 
 +	 * Place to hook in additional classes
 +	 */
 +	public static var mixins:Array;
 +
 +    // flag to turn on/off some ie specific behavior
 +    mx_internal static var ieshifttab:Boolean = true;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  <p>A FocusManager manages the focus within the children of an IFocusManagerContainer.
 +     *  It installs itself in the IFocusManagerContainer during execution
 +     *  of the constructor.</p>
 +     *
 +     *  @param container An IFocusManagerContainer that hosts the FocusManager.
 +     *
 +     *  @param popup If <code>true</code>, indicates that the container
 +     *  is a popup component and not the main application.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function FocusManager(container:IFocusManagerContainer, popup:Boolean = false)
 +    {
 +        super();
 +
 +		this.popup = popup;
 +
 +        IMEEnabled = true;
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +		// Only <= IE8 supported focus cycling out of the SWF
 +        browserMode = Capabilities.playerType == "ActiveX" && !popup;
 +		desktopMode = Platform.isAir && !popup;
 +		}
 +        // Flash main windows come up activated, AIR main windows don't
 +        windowActivated = !desktopMode;
 +    
 +        container.focusManager = this; // this property name is reserved in the parent
 +
 +        // trace("FocusManager constructor " + container + ".focusManager");
 +        
 +        _form = container;
 +        
 +        focusableObjects = [];
 +
 +        focusPane = new Sprite();
 +        focusPane.name = "focusPane";
 +
 +        addFocusables(DisplayObject(container));
 +        
 +        // Listen to the stage so we know when the root application is loaded.
 +        container.addEventListener(Event.ADDED, addedHandler);
 +        container.addEventListener(Event.REMOVED, removedHandler);
 +        container.addEventListener(FlexEvent.SHOW, showHandler);
 +        container.addEventListener(FlexEvent.HIDE, hideHandler);
 +        container.addEventListener(FlexEvent.HIDE, childHideHandler, true);
 +        container.addEventListener("_navigationChange_",viewHideHandler, true);
 +        
 +        //special case application and window
 +        if (container.systemManager is SystemManager)
 +        {
 +            // special case application.  It shouldn't need to be made
 +            // active and because we defer appCreationComplete, this 
 +            // would steal focus back from any popups created during
 +            // instantiation
 +            if (container != SystemManager(container.systemManager).application)
 +                container.addEventListener(FlexEvent.CREATION_COMPLETE,
 +                                       creationCompleteHandler);
 +        }
 +        
 +		if (mixins)
 +		{
 +			var n:int = mixins.length;
 +			for (var i:int = 0; i < n; i++)
 +			{
 +				new mixins[i](this);
 +			}
 +		}
 +
 +        // Make sure the SystemManager is running so it can tell us about
 +        // mouse clicks and stage size changes.
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +		try
 +		{
 +			var awm:IActiveWindowManager = 
 +				IActiveWindowManager(container.systemManager.getImplementation("mx.managers::IActiveWindowManager"));
 +			if (awm)
 +        		awm.addFocusManager(container); // build a message that does the equal
 +
 +            if (hasEventListener("initialize"))
 +		    	dispatchEvent(new Event("initialize"));
 +
 +		}
 +		catch (e:Error)
 +		{
 +			// ignore null pointer errors caused by container using a 
 +			// systemManager from another sandbox.
 +		}
 +		}
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    private var LARGE_TAB_INDEX:int = 99999;
 +
 +    mx_internal var calculateCandidates:Boolean = true;
 +
 +	/**
 +	 * @private
 +	 * 
 +	 * True if this focus manager is a popup, false if it is a main application.
 +	 * 
 +	 */
 +	mx_internal var popup:Boolean;
 +
 +    /**
 +     * @private
 +     * 
 +     * True if this focus manager will try to enable/disable the IME based on
 +     * whether the focused control uses IME.  Leaving this as a backdoor just in case.
 +     * 
 +     */
 +    mx_internal var IMEEnabled:Boolean;
 +
 +    /**
 +     *  @private
 +     *  We track whether we've been last activated or saw a TAB
 +     *  This is used in browser tab management
 +     */
 +    mx_internal var lastAction:String;
 +
 +    /**
 +     *  @private
 +     *  Tab management changes based on whether were in a browser or not
 +     *  This value is also affected by whether you are a modal dialog or not
 +     */
 +    public var browserMode:Boolean;
 +
 +    /**
 +     *  @private
 +     *  Activation changes depending on whether we're running in AIR or not
 +     */
 +    public var desktopMode:Boolean;
 +
 +    /**
 +     *  @private
 +     *  Tab management changes based on whether were in a browser or not
 +     *  If non-null, this is the object that will
 +     *  lose focus to the browser
 +     */
 +    private var browserFocusComponent:InteractiveObject;
 +
 +    /**
 +     *  @private
 +     *  Total set of all objects that can receive focus
 +     *  but might be disabled or invisible.
 +     */
 +    mx_internal var focusableObjects:Array;
 +    
 +    /**
 +     *  @private
 +     *  Filtered set of objects that can receive focus right now.
 +     */
 +    private var focusableCandidates:Array;
 +
 +    /**
 +     *  @private
 +     */
 +    private var activated:Boolean;
 +    /**
 +     *  @private
 +     */
 +    private var windowActivated:Boolean;
 +    
 +    /**
 +     * 	@private
 +     * 
 +     * 	true if focus was changed to one of focusable objects. False if focus passed to 
 +     * 	the browser.
 +     */
 +	mx_internal var focusChanged:Boolean;
 +
 +    /**
 +	 * 	@private
 +	 * 
 +	 * 	if non-null, the location to move focus from instead of the object 
 +	 *  that has focus in the stage.
 +	 */
 +	mx_internal var fauxFocus:DisplayObject;
 +	 
 +	 
 +	//--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  showFocusIndicator
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the showFocusIndicator property.
 +     */
 +    mx_internal var _showFocusIndicator:Boolean = false;
 +    
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get showFocusIndicator():Boolean
 +    {
 +        return _showFocusIndicator;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set showFocusIndicator(value:Boolean):void
 +    {
 +        var changed:Boolean = _showFocusIndicator != value;
 +        // trace("FM " + this + " showFocusIndicator = " + value);
 +        _showFocusIndicator = value;
 +
 +        if (hasEventListener("showFocusIndicator"))
 +            dispatchEvent(new Event("showFocusIndicator"));
 +    }
 +
 +    //----------------------------------
 +    //  defaultButton
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  The current default button.
 +     */
 +    private var defButton:IButton;
 +
 +    /**
 +     *  @private
 +     */
 +    private var _defaultButton:IButton;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get defaultButton():IButton
 +    {
 +		return _defaultButton;
 +    }
 +
 +    /**
 +     *  @private
 +     *  We don't type the value as Button for dependency reasons
 +     */
 +    public function set defaultButton(value:IButton):void
 +    {
 +		var button:IButton = value ? IButton(value) : null;
 +
 +        if (button != _defaultButton)
 +        {
 +            if (_defaultButton)
 +                _defaultButton.emphasized = false;
 +            
 +            if (defButton)  
 +                defButton.emphasized = false;
 +            
 +            _defaultButton = button;
 +            
 +            if (defButton != _lastFocus || _lastFocus == _defaultButton)
 +            {
 +            	defButton = button;
 +            
 +           		if (button)
 +                	button.emphasized = true;
 +        	}
 +    	}
 +    }
 +
 +    //----------------------------------
 +    //  defaultButtonEnabled
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the defaultButtonEnabled property.
 +     */
 +    private var _defaultButtonEnabled:Boolean = true;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get defaultButtonEnabled():Boolean
 +    {
 +        return _defaultButtonEnabled;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set defaultButtonEnabled(value:Boolean):void
 +    {
 +        _defaultButtonEnabled = value;
 +        
 +        // Synchronize with the new value. We ensure that our 
 +        // default button is de-emphasized if defaultButtonEnabled
 +        // is false.
 +        if (defButton)
 +            defButton.emphasized = value;
 +    }
 +    
 +    //----------------------------------
 +    //  focusPane
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the focusPane property.
 +     */
 +    private var _focusPane:Sprite;
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get focusPane():Sprite
 +    {
 +        return _focusPane;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set focusPane(value:Sprite):void
 +    {
 +        _focusPane = value;
 +    }
 +
 +    //----------------------------------
 +    //  form
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the form property.
 +     */
 +    private var _form:IFocusManagerContainer;
 +    
 +    /**
 +     *  @private
 +     *  The form is the property where we store the IFocusManagerContainer
 +     *  that hosts this FocusManager.
 +     */
 +    mx_internal function get form():IFocusManagerContainer
 +    {
 +        return _form;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    mx_internal function set form (value:IFocusManagerContainer):void
 +    {
 +        _form = value;
 +    }
 +
 +
 +    //----------------------------------
 +    //  _lastFocus
 +    //----------------------------------
 +    
 +    /**
 +     *  @private
 +     *  the object that last had focus
 +     */
 +    private var _lastFocus:IFocusManagerComponent;
 +
 +
 +	/**
 +	 * 	@private
 +	 */
 +	mx_internal function get lastFocus():IFocusManagerComponent
 +	{
 +		return _lastFocus;
 +	}
 +	 
 +	/**
 +	 * 	@private
 +	 */
 +	mx_internal function set lastFocus(value:IFocusManagerComponent):void
 +	{
 +		_lastFocus = value;
 +	}
 +
 +    //----------------------------------
 +    //  nextTabIndex
 +    //----------------------------------
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get nextTabIndex():int
 +    {
 +        return getMaxTabIndex() + 1;
 +    }
 +
 +    /**
 +     *  Gets the highest tab index currently used in this Focus Manager's form or subform.
 +     *
 +     *  @return Highest tab index currently used.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    private function getMaxTabIndex():int
 +    {
 +        var z:Number = 0;
 +
 +        var n:int = focusableObjects.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var t:Number = focusableObjects[i].tabIndex;
 +            if (!isNaN(t))
 +                z = Math.max(z, t);
 +        }
 +        
 +        return z;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +	 *  @flexjsignorecoercion flex.display.InteractiveObject;
 +	 *  @flexjsignorecoercion org.apache.flex.core.IUIBase;
 +     */
 +    public function getFocus():IFocusManagerComponent
 +    {
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        var stage:Stage = form.systemManager.stage;
 +        
 +        if (!stage)
 +            return null;
 +            
 +        var o:InteractiveObject = stage.focus;
 +		}
 +		COMPILE::JS
 +		{
 +			var o:InteractiveObject = document.activeElement as InteractiveObject;			
 +		}
 +		var i:IUIBase;
 +		while (o != null)
 +		{
 +			if (o is IUIBase)
 +			{
 +				i = o as IUIBase;
 +				break;
 +			}
 +			o = o.parent;
 +		}
 +        
 +        // If a Stage* object (such as StageText or StageWebView) has focus,
 +        // stage.focus will be set to null. Much of the focus framework is not
 +        // set up to handle this. So, if stage.focus is null, we return the last
 +        // IFocusManagerComponent that had focus.  In ADL, focus works slightly
 +        // different than it does on device when using StageText.  In ADL, when
 +        // the focus is a StageText component, a TextField whose parent is the 
 +        // stage is assigned focus.  
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        if ((!o && _lastFocus) || (o is TextField && o.parent == stage))
 +            return _lastFocus;
 +		}
 +        
 +        return findFocusManagerComponent(i);
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function setFocus(o:IFocusManagerComponent):void
 +    {
 +        // trace("FM " + this + " setting focus to " + o);
 +
 +        o.setFocus();
 +        
 +        if (hasEventListener("setFocus"))
 +    		dispatchEvent(new Event("setFocus"));
 +        // trace("FM set focus");
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function focusInHandler(event:FocusEvent):void
 +    {
 +        var target:InteractiveObject = InteractiveObject(event.target);
 +        // trace("FocusManager focusInHandler in  = " + this._form.systemManager.loaderInfo.url);
 +        // trace("FM " + this + " focusInHandler " + target);
 +
 +		// dispatch cancelable FocusIn to see if Marshal Plan mixin wants it
 +        if (hasEventListener(FocusEvent.FOCUS_IN))
 +    		if (!dispatchEvent(new FocusEvent(FocusEvent.FOCUS_IN, false, true, target)))
 +    			return;
 +
 +        if (isParent(DisplayObjectContainer(form), target))
 +        {
 +            if (_defaultButton)
 +            {
 +                if (target is IButton && target != _defaultButton 
 +                    && !(target is IToggleButton))
 +                    _defaultButton.emphasized = false;
 +                else if (_defaultButtonEnabled)
 +                    _defaultButton.emphasized = true;
 +            }
 + 
 +			var o:InteractiveObject = target;
 +			var i:IUIBase;
 +			while (o != null)
 +			{
 +				if (o is IUIBase)
 +				{
 +					i = o as IUIBase;
 +					break;
 +				}
 +				o = o.parent;
 +			}
 +            // trace("FM " + this + " setting last focus " + target);
 +            _lastFocus = findFocusManagerComponent(i);
 +            
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +			if (Capabilities.hasIME)
 +            {
 +                var usesIME:Boolean;
 +                if (_lastFocus is IIMESupport)
 +                {
 +                    var imeFocus:IIMESupport = IIMESupport(_lastFocus);
 +                    if (imeFocus.enableIME)
 +                        usesIME = true;
 +                }
 +                if (IMEEnabled)
 +                    IME.enabled = usesIME;
 +            }
 +			}
 +			
 +			// handle default button here
 +			// we can't check for Button because of cross-versioning so
 +			// for now we just check for an emphasized property
 +            if (_lastFocus is IButton && !(_lastFocus is IToggleButton))
 +			{
 +                defButton = _lastFocus as IButton;
 +			}
 +			else
 +			{
 +				// restore the default button to be the original one
 +				if (defButton && defButton != _defaultButton)
 +					defButton = _defaultButton;
 +			}
 +		}
 +	}
 +
 +    /**
 +     *  @private  Useful for debugging
 +     */
 +    private function focusOutHandler(event:FocusEvent):void
 +    {
 +        var target:InteractiveObject = InteractiveObject(event.target);
 +        // trace("FocusManager focusOutHandler in  = " + this._form.systemManager.loaderInfo.url);
 +        // trace("FM " + this + " focusOutHandler " + target);
 +    }
 +
 +    /**
 +     *  @private
 +     *  restore focus to whoever had it last
 +     */
 +    private function activateHandler(event:Event):void
 +    {
 +//        var target:InteractiveObject = InteractiveObject(event.target);
 +        // trace("FM " + this + " activateHandler ", _lastFocus);
 +		
 +        // if we were the active FM when we were deactivated
 +        // and we're not running in AIR, then dispatch the event now
 +        // otherwise wait for the AIR events to fire
 +        if (activated && !desktopMode)
 +        {
 +            dispatchEvent(new FlexEvent(FlexEvent.FLEX_WINDOW_ACTIVATE));
 +		    // restore focus if this focus manager had last focus
 +            if (_lastFocus && (!browserMode || ieshifttab))
 +	    	    _lastFocus.setFocus();
 +	        lastAction = "ACTIVATE";
 +        }
 +    }
 +
 +    /**
 +     *  @private  
 +     *  Dispatch event if we're not running in AIR.  AIR will
 +     *  dispatch windowDeactivate that we respond to instead
 +     */
 +    private function deactivateHandler(event:Event):void
 +    {
 +        // var target:InteractiveObject = InteractiveObject(event.target);
 +        // trace("FM " + this + " deactivateHandler ", _lastFocus);
 +
 +        // if we are the active FM when we were deactivated
 +        // and we're not running in AIR, then dispatch the event now
 +        // otherwise wait for the AIR events to fire
 +        if (activated && !desktopMode)
 +        {
 +            dispatchEvent(new FlexEvent(FlexEvent.FLEX_WINDOW_DEACTIVATE));
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  restore focus to whoever had it last
 +     */
 +    private function activateWindowHandler(event:Event):void
 +    {
 +//        var target:InteractiveObject = InteractiveObject(event.target);
 +        // trace("FM " + this + " activateWindowHandler ", _lastFocus);
 +		
 +        windowActivated = true;
 +
 +        if (activated)
 +        {
 +            dispatchEvent(new FlexEvent(FlexEvent.FLEX_WINDOW_ACTIVATE));
 +		    // restore focus if this focus manager had last focus
 +	        if (_lastFocus && !browserMode)
 +	    	    _lastFocus.setFocus();
 +	        lastAction = "ACTIVATE";
 +        }
 +    }
 +
 +    /**
 +     *  @private  
 +     *  If we're responsible for the focused control, remove focus from it
 +     *  so it gets the same events as it would if the whole app lost focus
 +     */
 +    private function deactivateWindowHandler(event:Event):void
 +    {
 +        // var target:InteractiveObject = InteractiveObject(event.target);
 +        // trace("FM " + this + " deactivateWindowHandler ", _lastFocus);
 +
 +        windowActivated = false;
 +
 +        if (activated)
 +        {
 +            dispatchEvent(new FlexEvent(FlexEvent.FLEX_WINDOW_DEACTIVATE));
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +            if (form.systemManager.stage)
 +                form.systemManager.stage.focus = null;
 +			}
 +        }
 +    }   
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function showFocus():void
 +    {
 +        if (!showFocusIndicator)
 +        {
 +            showFocusIndicator = true;
 +            if (_lastFocus)
 +                _lastFocus.drawFocus(true);
 +        }
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function hideFocus():void
 +    {
 +        // trace("FOcusManger " + this + " Hide Focus");
 +        if (showFocusIndicator)
 +        {
 +            showFocusIndicator = false;
 +            if (_lastFocus)
 +                _lastFocus.drawFocus(false);
 +        }
 +        // trace("END FOcusManger Hide Focus");
 +    }
 +    
 +    /**
 +     *  The SystemManager activates and deactivates a FocusManager
 +     *  if more than one IFocusManagerContainer is visible at the same time.
 +     *  If the mouse is clicked in an IFocusManagerContainer with a deactivated
 +     *  FocusManager, the SystemManager will call 
 +     *  the <code>activate()</code> method on that FocusManager.
 +     *  The FocusManager that was activated will have its <code>deactivate()</code> method
 +     *  called prior to the activation of another FocusManager.
 +     *
 +     *  <p>The FocusManager adds event handlers that allow it to monitor
 +     *  focus related keyboard and mouse activity.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function activate():void
 +    {
 +        // we can get a double activation if we're popping up and becoming visible
 +        // like the second time a menu appears
 +        if (activated)
 +        {
 +        	// trace("FocusManager is already active " + this);
 +            return;
 +        }
 +
 +        // trace("FocusManager activating = " + this._form.systemManager.loaderInfo.url);
 +        // trace("FocusManager activating " + this);
 +
 +        // listen for focus changes, use weak references for the stage
 +		// form.systemManager can be null if the form is created in a sandbox and 
 +		// added as a child to the root system manager.
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +		var sm:ISystemManager = form.systemManager;
 +		if (sm)
 +		{
 +			if (sm.isTopLevelRoot())
 +			{
 +		        sm.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
 +		        sm.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
 +	    	    sm.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
 +	        	sm.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
 +	  		}
 +	  		else
 +	  		{
 +		        sm.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
 +		        sm.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
 +	    	    sm.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
 +	        	sm.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);	  			
 +	  		}
 +		}      
 +	        
 +        form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
 +        form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
 +        form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); 
 +        form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownCaptureHandler, true); 
 +        form.addEventListener(KeyboardEvent.KEY_DOWN, defaultButtonKeyHandler);
 +        form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
 +        if (sm)
 +        {
 +            // AIR Window events, but don't want to link in AIREvent
 +            // use capture phase because these get sent by the main Window
 +            // and we might be managing a popup in that window
 +            sm.addEventListener("windowActivate", activateWindowHandler, true, 0, true);
 +            sm.addEventListener("windowDeactivate", deactivateWindowHandler, true, 0, true);
 +        }
 +		}
 +        activated = true;
 +        dispatchEvent(new FlexEvent(FlexEvent.FLEX_WINDOW_ACTIVATE));
 +        
 +        // Restore focus to the last control that had it if there was one.
 +        if (_lastFocus)
 +            setFocus(_lastFocus);
 +
 +        if (hasEventListener("activateFM"))
 +    		dispatchEvent(new Event("activateFM"));
 +
 +    }
 +
 +    /**
 +     *  The SystemManager activates and deactivates a FocusManager
 +     *  if more than one IFocusManagerContainer is visible at the same time.
 +     *  If the mouse is clicked in an IFocusManagerContainer with a deactivated
 +     *  FocusManager, the SystemManager will call 
 +     *  the <code>activate()</code> method on that FocusManager.
 +     *  The FocusManager that was activated will have its <code>deactivate()</code> method
 +     *  called prior to the activation of another FocusManager.
 +     *
 +     *  <p>The FocusManager removes event handlers that allow it to monitor
 +     *  focus related keyboard and mouse activity.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function deactivate():void
 +    {
 +        // trace("FocusManager deactivating " + this);
 +        // trace("FocusManager deactivating = " + this._form.systemManager.loaderInfo.url);
 +         
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        // listen for focus changes
 +		var sm:ISystemManager = form.systemManager;
 +        if (sm)
 +        {
 +			if (sm.isTopLevelRoot())
 +			{
 +		        sm.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
 +		        sm.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
 +	    	    sm.stage.removeEventListener(Event.ACTIVATE, activateHandler);
 +	        	sm.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
 +	  		}
 +	  		else
 +	  		{
 +		        sm.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
 +		        sm.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
 +	    	    sm.removeEventListener(Event.ACTIVATE, activateHandler);
 +	        	sm.removeEventListener(Event.DEACTIVATE, deactivateHandler);	  			
 +	  		}
 +        }
 +
 +        form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
 +        form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
 +        form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); 
 +        form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownCaptureHandler, true); 
 +        form.removeEventListener(KeyboardEvent.KEY_DOWN, defaultButtonKeyHandler);
 +        // stop listening for default button in Capture phase
 +        form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
 +		}
 +        activated = false;
 +        dispatchEvent(new FlexEvent(FlexEvent.FLEX_WINDOW_DEACTIVATE));
 +
 +        if (hasEventListener("deactivateFM"))
 +    		dispatchEvent(new Event("deactivateFM"));
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function findFocusManagerComponent(
 +                            o:IUIBase):IFocusManagerComponent
 +    {
 +    	return findFocusManagerComponent2(o as InteractiveObject) as IFocusManagerComponent;
 +    }
 +    
 +    
 +    /**
 +    * @private
 +    * 
 +    * This version of the method differs from the old one to support SWFLoader
 +    * being in the focusableObjects list but not being a component that
 +    * gets focus. SWFLoader is in the list of focusable objects so
 +    * focus may be passed over a bridge to the components on the other
 +    * side of the bridge.
 +    */
 +    private function findFocusManagerComponent2(
 +                            o:InteractiveObject):DisplayObject
 +
 +    {
 +    	try
 +    	{
 +	        while (o)
 +	        {
 +				COMPILE::LATER
 +				{
 +	            if ((o is IFocusManagerComponent && IFocusManagerComponent(o).focusEnabled) ||
 +	            	 o is ISWFLoader)
 +	                return o;
 +				}
 +				if (o is IFocusManagerComponent && IFocusManagerComponent(o).focusEnabled)
 +					return o as DisplayObject;
 +				
 +	            o = o.parent;
 +	        }
 +	    }
 +	    catch (error:Error)
 +	    {
 +	    	// can happen in a loaded child swf
 +	    	// trace("findFocusManagerComponent: handling security error");
 +	    }
 +
 +        // tab was set somewhere else
 +        return null;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Returns true if p is a parent of o.
 +     */
 +    private function isParent(p:DisplayObjectContainer, o:DisplayObject):Boolean
 +    {
 +        if (p == o)
 +            return false;
 +        
 +        if (p is IRawChildrenContainer)
 +            return IRawChildrenContainer(p).rawChildren.contains(o);
 +        
 +        return p.contains(o);
 +    }
 +    
 +    private function isEnabledAndVisible(o:DisplayObject):Boolean
 +    {
 +        var formParent:DisplayObjectContainer = DisplayObjectContainer(form);
 +        
 +        while (o != formParent)
 +        {
 +            if (o is IUIComponent)
 +                if (!IUIComponent(o).enabled)
 +                    return false;
 +            
 +			COMPILE::LATER
 +			{
 +            if (o is IVisualElement)
 +                if (IVisualElement(o).designLayer && !IVisualElement(o).designLayer.effectiveVisibility)
 +                    return false;
 +			}
 +			
 +            if (!o.visible) 
 +                return false;
 +            o = o.parent;
 +
 +            // if no parent, then not on display list
 +            if (!o)
 +                return false;
 +        }
 +        return true;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function sortByTabIndex(a:InteractiveObject, b:InteractiveObject):int
 +    {
 +        var aa:int = a.tabIndex;
 +        var bb:int = b.tabIndex;
 +
 +        if (aa == -1)
 +            aa = int.MAX_VALUE;
 +        if (bb == -1)
 +            bb = int.MAX_VALUE;
 +
 +        return (aa > bb ? 1 :
 +                aa < bb ? -1 : sortByDepth(DisplayObject(a), DisplayObject(b)));
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function sortFocusableObjectsTabIndex():void
 +    {
 +        // trace("FocusableObjectsTabIndex");
 +        
 +        focusableCandidates = [];
 +        
 +        var n:int = focusableObjects.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var c:IFocusManagerComponent = focusableObjects[i] as IFocusManagerComponent;
 +			COMPILE::LATER
 +			{
 +				if ((c && c.tabIndex && !isNaN(Number(c.tabIndex))) ||
 +					focusableObjects[i] is ISWFLoader)
 +				{
 +					// if we get here, it is a candidate
 +					focusableCandidates.push(focusableObjects[i]);
 +				}
 +			}
 +			if (c && c.tabIndex && !isNaN(Number(c.tabIndex)))
 +			{
 +				// if we get here, it is a candidate
 +				focusableCandidates.push(focusableObjects[i]);
 +			}
 +        }
 +        
 +        focusableCandidates.sort(sortByTabIndex);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function sortByDepth(aa:DisplayObject, bb:DisplayObject):Number
 +    {
 +        var val1:String = "";
 +        var val2:String = "";
 +        var index:int;
 +        var tmp:String;
 +        var tmp2:String;
 +        var zeros:String = "0000";
 +
 +        var a:DisplayObject = DisplayObject(aa);
 +        var b:DisplayObject = DisplayObject(bb);
 +
 +		// TODO (egreenfi):  If a component lives inside of a group, we care about not its display object index, but
 +		// its index within the group. See SDK-25144
 +		
 +        while (a != DisplayObject(form) && a.parent)
 +        {
 +            index = getChildIndex(a.parent, a);
 +            tmp = index.toString(16);
 +            if (tmp.length < 4)
 +            {
 +                tmp2 = zeros.substring(0, 4 - tmp.length) + tmp;
 +            }
 +            val1 = tmp2 + val1;
 +            a = a.parent;
 +        }
 +        
 +        while (b != DisplayObject(form) && b.parent)
 +        {
 +            index = getChildIndex(b.parent, b);
 +            tmp = index.toString(16);
 +            if (tmp.length < 4)
 +            {
 +                tmp2 = zeros.substring(0, 4 - tmp.length) + tmp;
 +            }
 +            val2 = tmp2 + val2;
 +            b = b.parent;
 +        }
 +
 +        return val1 > val2 ? 1 : val1 < val2 ? -1 : 0;
 +    }
 +
 +    private function getChildIndex(parent:DisplayObjectContainer, child:DisplayObject):int
 +    {
 +        try 
 +        {
 +            return parent.getChildIndex(child);
 +        }
 +        catch(e:Error)
 +        {
 +            if (parent is IRawChildrenContainer)
 +                return IRawChildrenContainer(parent).rawChildren.getChildIndex(child);
 +            throw e;
 +        }
 +        throw new Error("FocusManager.getChildIndex failed");   // shouldn't ever get here
 +    }
 +
 +    /**
 +     *  @private
 +     *  Calculate what focusableObjects are valid tab candidates.
 +     */
 +    private function sortFocusableObjects():void
 +    {
 +        // trace("FocusableObjects " + focusableObjects.length.toString());
 +        focusableCandidates = [];
 +        
 +        var n:int = focusableObjects.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var c:InteractiveObject = focusableObjects[i];
 +            // trace("  " + c);
 +            if (c.tabIndex && !isNaN(Number(c.tabIndex)) && c.tabIndex > 0)
 +            {
 +                sortFocusableObjectsTabIndex();
 +                return;
 +            }
 +            focusableCandidates.push(c);
 +        }
 +        
 +        focusableCandidates.sort(sortByDepth);
 +    }
 +
 +    /**
 +     *  Call this method to make the system
 +     *  think the Enter key was pressed and the defaultButton was clicked
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    mx_internal function sendDefaultButtonEvent():void
 +    {
 +        // trace("FocusManager.sendDefaultButtonEvent " + defButton);
 +        defButton.dispatchEvent(new MouseEvent("click"));
 +    }
 +
 +    /**
 +     *  @private
 +     *  Do a tree walk and add all children you can find.
 +     */
 +    mx_internal function addFocusables(o:DisplayObject, skipTopLevel:Boolean = false):void
 +    {
 +        // trace(">>addFocusables " + o);
 +        if ((o is IFocusManagerComponent) && !skipTopLevel)
 +        {
 +			
 +			var addToFocusables:Boolean = false;
 +        	if (o is IFocusManagerComponent)
 +        	{
 +	            var focusable:IFocusManagerComponent = IFocusManagerComponent(o);
 +	            if (focusable.focusEnabled)
 +	            {
 +	                if (focusable.tabFocusEnabled && isTabVisible(o))
 +	                {
 +						addToFocusables = true;	                	
 +	                }
 +                }
 +            }
 +
 +			if (addToFocusables)
 +			{            
 +               	if (focusableObjects.indexOf(o) == -1)
 +            	{
 +                    focusableObjects.push(o);
 +	                calculateCandidates = true;
 +    	            // trace("FM added " + o);
 +    	        }
 +   			}
 +            o.addEventListener("tabFocusEnabledChange", tabFocusEnabledChangeHandler);
 +            o.addEventListener("tabIndexChange", tabIndexChangeHandler);
 +
 +        }
 +        
 +        if (o is DisplayObjectContainer)
 +        {
 +            var doc:DisplayObjectContainer = DisplayObjectContainer(o);
 +            // Even if they aren't focusable now,
 +            // listen in case they become later.
 +            var checkChildren:Boolean;
 +
 +            if (o is IFocusManagerComponent)
 +            {
 +                o.addEventListener("hasFocusableChildrenChange", hasFocusableChildrenChangeHandler);
 +                checkChildren = IFocusManagerComponent(o).hasFocusableChildren;
 +            }
 +            else
 +            {
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +                o.addEventListener("tabChildrenChange", tabChildrenChangeHandler);
 +                checkChildren = doc.tabChildren;
 +	            }
 +			}
 +            if (checkChildren)
 +            {
 +                if (o is IRawChildrenContainer)
 +                {
 +                    // trace("using view rawChildren");
 +                    var rawChildren:IChildList = IRawChildrenContainer(o).rawChildren;
 +                    // recursively visit and add children of components
 +                    // we don't do this for containers because we get individual
 +                    // adds for the individual children
 +                    var i:int;
 +                    for (i = 0; i < rawChildren.numChildren; i++)
 +                    {
 +                        try
 +                        {
 +                            addFocusables(rawChildren.getChildAt(i));
 +                        }
 +                        catch(error:Error)
 +                        {
 +                            // Ignore this child if we can't access it
 +                            // trace("addFocusables: ignoring security error getting child from rawChildren: " + error);
 +                        }
 +                    }
 +
 +                }
 +                else
 +                {
 +                    // trace("using container's children");
 +                    // recursively visit and add children of components
 +                    // we don't do this for containers because we get individual
 +                    // adds for the individual children
 +                    for (i = 0; i < doc.numChildren; i++)
 +                    {
 +                        try
 +                        {
 +                            addFocusables(doc.getChildAt(i));
 +                        }
 +                        catch(error:Error)
 +                        {
 +                            // Ignore this child if we can't access it
 +                            // trace("addFocusables: ignoring security error getting child at document." + error);
 +                        }
 +                    }
 +                }
 +            }
 +        }
 +        // trace("<<addFocusables " + o);
 +    }
 +
 +    /**
 +     *  @private
 +     *  is it really tabbable?
 +     */
 +    private function isTabVisible(o:DisplayObject):Boolean
 +    {
 +        var s:DisplayObject = DisplayObject(form.systemManager);
 +        if (!s) return false;
 +
 +        var p:DisplayObjectContainer = o.parent;
 +        while (p && p != s)
 +        {
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +            if (!p.tabChildren)
 +                return false;
 +			}
 +            if (p is IFocusManagerComponent && !(IFocusManagerComponent(p).hasFocusableChildren))
 +                return false;
 +            p = p.parent;
 +        }
 +        return true;
 +    }
 +
 +    private function isValidFocusCandidate(o:DisplayObject, g:String):Boolean
 +    {
 +        if (o is IFocusManagerComponent)
 +            if (!IFocusManagerComponent(o).focusEnabled)
 +                return false;
 +
 +        if (!isEnabledAndVisible(o))
 +            return false;
 +
 +        if (o is IFocusManagerGroup)
 +        {
 +            // reject if it is in the same tabgroup
 +            var tg:IFocusManagerGroup = IFocusManagerGroup(o);
 +            if (g == tg.groupName) return false;
 +        }
 +        return true;
 +    }
 +    
 +    private function getIndexOfFocusedObject(o:DisplayObject):int
 +    {
 +        if (!o)
 +            return -1;
 +
 +        var n:int = focusableCandidates.length;
 +        // trace(" focusableCandidates " + n);
 +        var i:int = 0;
 +        for (i = 0; i < n; i++)
 +        {
 +            // trace(" comparing " + focusableCandidates[i]);
 +            if (focusableCandidates[i] == o)
 +                return i;
 +        }
 +
 +        // no match?  try again with a slower match for certain
 +        // cases like DG editors
 +        for (i = 0; i < n; i++)
 +        {
 +            var iui:IUIComponent = focusableCandidates[i] as IUIComponent;
 +            if (iui && iui.owns(o))
 +                return i;
 +        }
 +
 +        return -1;
 +    }
 +
 +
 +    private function getIndexOfNextObject(i:int, shiftKey:Boolean, bSearchAll:Boolean, groupName:String):int
 +    {
 +        var n:int = focusableCandidates.length;
 +        var start:int = i;
 +
 +        while (true)
 +        {
 +            if (shiftKey)
 +                i--;
 +            else
 +                i++;
 +            if (bSearchAll)
 +            {
 +                if (shiftKey && i < 0)
 +                    break;
 +                if (!shiftKey && i == n)
 +                    break;
 +            }
 +            else
 +            {
 +                i = (i + n) % n;
 +                // came around and found the original
 +                if (start == i)
 +                    break;
 +                // if start is -1, set start to first valid value of i
 +                if (start == -1)
 +                    start = i;
 +            }
 +            // trace("testing " + focusableCandidates[i]);
 +            if (isValidFocusCandidate(focusableCandidates[i], groupName))
 +            {
 +                // trace(" stopped at " + i);
 +                var o:DisplayObject = DisplayObject(findFocusManagerComponent2(focusableCandidates[i]));     
 +                if (o is IFocusManagerGroup)
 +                {
 +                    
 +                    // when landing on an element that is part of group, try to
 +                    // advance selection to the selected group element
 +                    var j:int;
 +                    var obj:DisplayObject;
 +                    var tg1:IFocusManagerGroup = IFocusManagerGroup(o);
 +                    var tg2:IFocusManagerGroup;
 +                    
 +                    // normalize the "no selected group element" case
 +                    // to the "first group element selected" case
 +                    // (respecting the tab direction)
 +                    var groupElementToFocus:IFocusManagerGroup = null;
 +                    for (j = 0; j < focusableCandidates.length; j++)
 +                    {
 +                        obj = focusableCandidates[j];
 +                        if (obj is IFocusManagerGroup)
 +                        {
 +                            tg2 = IFocusManagerGroup(obj);
 +                            if (tg2.groupName == tg1.groupName && isEnabledAndVisible(obj) &&
 +                                tg2["document"] == tg1["document"])
 +                            {
 +                                if (tg2.selected) 
 +                                {
 +                                    groupElementToFocus = tg2;
 +                                    break;
 +                                }
 +                                if ((!shiftKey && groupElementToFocus == null) || shiftKey)
 +                                    groupElementToFocus = tg2;
 +                            }
 +                        }
 +                    }
 +                    
 +                    if (tg1 != groupElementToFocus)
 +                    {
 +                        var foundAnotherGroup:Boolean = false;
 +                        // cycle the entire focusable candidates array forward or backward,
 +                        // wrapping around boundaries, searching for our focus candidate
 +                        j = i;
 +                        for (var k:int = 0; k < focusableCandidates.length - 1; k++)
 +                        {
 +                            
 +                            if (!shiftKey) 
 +                            {
 +                                j++;
 +                                if (j == focusableCandidates.length)
 +                                    j = 0;
 +                            }
 +                            else
 +                            {
 +                                j--;
 +                                if (j == -1)
 +                                    j = focusableCandidates.length - 1;
 +                            }
 +                            
 +                            obj = focusableCandidates[j];
 +                            if (isEnabledAndVisible(obj))
 +                            {
 +                                if (foundAnotherGroup)
 +                                {
 +                                    // we're now just trying to find a selected member of this group
 +                                    if (obj is IFocusManagerGroup)
 +                                    {
 +                                        tg2 = IFocusManagerGroup(obj);
 +                                        if (tg2.groupName == tg1.groupName && tg2["document"] == tg1["document"])
 +                                        {
 +                                            if (tg2.selected)
 +                                            {
 +                                                i = j;
 +                                                break;
 +                                            }
 +                                        }
 +                                    }
 +                                }
 +                                else if (obj is IFocusManagerGroup)
 +                                {
 +                                    tg2 = IFocusManagerGroup(obj);
 +                                    if (tg2.groupName == tg1.groupName && tg2["document"] == tg1["document"])
 +                                    {
 +                                        if (tg2 == groupElementToFocus)
 +                                        {
 +                                            // if objects of same group have different tab index
 +                                            // skip you aren't selected.
 +                                            if (InteractiveObject(obj).tabIndex != InteractiveObject(o).tabIndex && !tg1.selected)
 +                                                return getIndexOfNextObject(i, shiftKey, bSearchAll, groupName);
 +                                            i = j;
 +                                            break;
 +                                        }
 +                                    }
 +                                    else
 +                                    {
 +                                        // switch to new group and hunt for selected item
 +                                        tg1 = tg2;
 +                                        i = j;
 +                                        // element is part of another group, stop if selected
 +                                        if (tg2.selected)
 +                                            break;
 +                                        else
 +                                            foundAnotherGroup = true;
 +                                    }
 +                                }
 +                                else
 +                                {
 +                                    // element isn't part of any group, stop
 +                                    i = j;
 +                                    break;
 +                                }
 +                            }
 +                        }
 +                    }
 +                }
 +                return i;
 +            }
 +        }
 +        return i;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function setFocusToNextObject(event:FocusEvent):void
 +    {
 +     	focusChanged = false;
 +        if (focusableObjects.length == 0)
 +            return;
 +
 +		var focusInfo:FocusInfo = getNextFocusManagerComponent2(event.shiftKey, fauxFocus);
 +		// trace("winner = ", focusInfo.displayObject);
 +
 +		// If we are about to wrap focus around, send focus back to the parent.
 +		if (!popup && (focusInfo.wrapped || !focusInfo.displayObject))
 +		{
 +            if (hasEventListener("focusWrapping"))
 +	    		if (!dispatchEvent(new FocusEvent("focusWrapping", false, true, null, event.shiftKey)))
 +		    		return;
 +		}
 +		
 +		if (!focusInfo.displayObject)
 +		{
 +			event.preventDefault();
 +			return;
 +		}
 +
 +		setFocusToComponent(focusInfo.displayObject, event.shiftKey);		
 +	}
 +
 +	private function setFocusToComponent(o:Object, shiftKey:Boolean):void
 +	{
 +		focusChanged = false;
 +		if (o)
 +		{
 +            if (hasEventListener("setFocusToComponent"))
 +    			if (!dispatchEvent(new FocusEvent("setFocusToComponent", false, true, InteractiveObject(o), shiftKey)))
 +	    			return;
 +
 +			if (o is IFocusManagerComplexComponent)
 +			{
 +				IFocusManagerComplexComponent(o).assignFocus(shiftKey ? "bottom" : "top");
 +				focusChanged = true;
 +			}
 +			else if (o is IFocusManagerComponent)
 +			{
 +				setFocus(IFocusManagerComponent(o));
 +				focusChanged = true;
 +			}
 +				
 +		}
 +		
 +	}
 +
 +	/**
 +	 *  @private
 +	 */
 +	mx_internal function setFocusToNextIndex(index:int, shiftKey:Boolean):void
 +	{
 +		if (focusableObjects.length == 0)
 +			return;
 +			
 +        // I think we'll have time to do this here instead of at creation time
 +        // this makes and orders the focusableCandidates array
 +        if (calculateCandidates)
 +        {
 +            sortFocusableObjects();
 +            calculateCandidates = false;
 +        }
 +
 +		var focusInfo:FocusInfo = getNextFocusManagerComponent2(shiftKey, null, index);			
 +
 +		// If we are about to wrap focus around, send focus back to the parent.
 +		if (!popup && focusInfo.wrapped)
 +		{
 +            if (hasEventListener("setFocusToNextIndex"))
 +    			if (!dispatchEvent(new FocusEvent("setFocusToNextIndex", false, true, null, shiftKey)))
 +	    			return;
 +		}
 +		
 +		setFocusToComponent(focusInfo.displayObject, shiftKey);
 +	}
 +	
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getNextFocusManagerComponent(
 +                            backward:Boolean = false):IFocusManagerComponent
 +	{
 +        const focusInfo:FocusInfo = getNextFocusManagerComponent2(backward, fauxFocus); 
 +        return focusInfo ? focusInfo.displayObject as IFocusManagerComponent : null; 
 +	}
 +	
 +	/**
 +	 * Find the next object to set focus to.
 +	 * 
 +	 * @param backward true if moving in the backwards in the tab order, false if moving forward.
 +	 * @param fromObject object to move focus from, if null move from the current focus.
 +	 * @param formIndex index to move focus from, if specified use fromIndex to find the 
 +	 * 		   			object, not fromObject.
 +	 *  
 +	 *  @langversion 3.0
 +	 *  @playerversion Flash 9
 +	 *  @playerversion AIR 1.1
 +	 *  @productversion Flex 3
 +	 *  @flexjsignorecoercion flex.display.InteractiveObject
 +	 */
 +	private function getNextFocusManagerComponent2(
 +                            backward:Boolean = false, 
 +                            fromObject:DisplayObject = null,
 +                            fromIndex:int = FROM_INDEX_UNSPECIFIED):FocusInfo
 +                            
 +    {
 +        if (focusableObjects.length == 0)
 +            return null;
 +
 +        // I think we'll have time to do this here instead of at creation time
 +        // this makes and orders the focusableCandidates array
 +        if (calculateCandidates)
 +        {
 +            sortFocusableObjects();
 +            calculateCandidates = false;
 +        }
 +
 +        // trace("focus was at " + fromObject);
 +        // trace("focusableObjects " + focusableObjects.length);
 +        var i:int = fromIndex;
 +        if (fromIndex == FROM_INDEX_UNSPECIFIED)
 +        {
 +	        // if there is no passed in object, then get the object that has the focus
 +    	    var o:DisplayObject = fromObject; 
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +        	if (!o)
 +        		o = form.systemManager.stage.focus;
 +            else if (o == form.systemManager.stage)
 +                o == null;
 +			}
 +			COMPILE::JS
 +			{
 +				o = document.activeElement as InteractiveObject;
 +			}
 +	        o = DisplayObject(findFocusManagerComponent2(InteractiveObject(o)));
 +	
 +	        var g:String = "";
 +	        if (o is IFocusManagerGroup)
 +	        {
 +	            var tg:IFocusManagerGroup = IFocusManagerGroup(o);
 +	            g = tg.groupName;
 +	        }
 +	        i = getIndexOfFocusedObject(o);
 +        }
 +        
 +        // trace(" starting at " + i);
 +        var bSearchAll:Boolean = false;
 +        var start:int = i;
 +        if (i == -1) // we didn't find it
 +        {
 +            if (backward)
 +                i = focusableCandidates.length;
 +            bSearchAll = true;
 +            // trace("search all " + i);
 +        }
 +
 +        var j:int = getIndexOfNextObject(i, backward, bSearchAll, g);
 +
 +        // if we wrapped around, get if we have a parent we should pass
 +        // focus to.
 +        var wrapped:Boolean = false;
 +        if (backward)
 +        {
 +        	if (j >= i)
 +        		wrapped = true;
 +        }
 +        else if (j <= i)
 +      		wrapped = true;
 +
 +		var focusInfo:FocusInfo = new FocusInfo();
 +		
 +		focusInfo.displayObject = findFocusManagerComponent2(focusableCandidates[j]);
 +		focusInfo.wrapped = wrapped;
 +		
 +        return focusInfo;
 +    }
 +
 +
 +    /**
 +     *  @private
 +     */
 +    private function getTopLevelFocusTarget(o:InteractiveObject):InteractiveObject
 +    {
 +        while (o != InteractiveObject(form))
 +        {
 +            if (o is IFocusManagerComponent &&
 +                IFocusManagerComponent(o).focusEnabled &&
 +                IFocusManagerComponent(o).mouseFocusEnabled &&
 +                (o is IUIComponent ? IUIComponent(o).enabled : true))
 +                return o;
 +
 +            if (hasEventListener("getTopLevelFocusTarget"))
 +    			if (!dispatchEvent(new FocusEvent("getTopLevelFocusTarget", false, true, o.parent)))
 +			    	return null;
 +
 +            o = o.parent;
 +
 +            if (o == null)
 +                break;
 +        }
 +
 +        return null;
 +    }
 +
 +    /**
 +     *  Returns a String representation of the component hosting the FocusManager object, 
 +     *  with the String <code>".focusManager"</code> appended to the end of the String.
 +     *
 +     *  @return Returns a String representation of the component hosting the FocusManager object, 
 +     *  with the String <code>".focusManager"</code> appended to the end of the String.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    override public function toString():String
 +    {
 +        return Object(form).toString() + ".focusManager";
 +    }
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  Clear the browser focus component and undo any tab index we may have set.
 +     */
 +    private function clearBrowserFocusComponent():void
 +    {
 +        if (browserFocusComponent)
 +        {
 +            if (browserFocusComponent.tabIndex == LARGE_TAB_INDEX)
 +                browserFocusComponent.tabIndex = -1;
 +            
 +            browserFocusComponent = null;
 +        }
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Listen for children being added
 +     *  and see if they are focus candidates.
 +     */
 +    private function addedHandler(event:Event):void
 +    {
 +        var target:DisplayObject = DisplayObject(event.target);
 +        
 +        // trace("FM: addedHandler: got added for " + target);
 +        
 +        // if it is truly parented, add it, otherwise it will get added when the top of the tree
 +        // gets parented.
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        if (target.stage)
 +        {
 +            // trace("FM: addedHandler: adding focusables");
 +            addFocusables(DisplayObject(event.target));
 +        }
 +		}
 +		COMPILE::JS
 +		{
 +			// trace("FM: addedHandler: adding focusables");
 +			addFocusables(DisplayObject(event.target));			
 +		}
 +    }
 +
 +    /**
 +     *  @private
 +     *  Listen for children being removed.
 +     */
 +    private function removedHandler(event:Event):void
 +    {
 +        var i:int;
 +        var o:DisplayObject = DisplayObject(event.target);
 +        var focusPaneParent:DisplayObject = focusPane ? focusPane.parent : null;
 +
 +        // Remove the focusPane to allow the focusOwner to be garbage collected.
 +        // Avoid recursion by not processing the removal of the focusPane itself.        
 +        if (focusPaneParent && o != focusPane)
 +        {
 +            if (o is DisplayObjectContainer && 
 +                isParent(DisplayObjectContainer(o), focusPane))
 +            {
 +                if (focusPaneParent is ISystemManager)
 +                    ISystemManager(focusPaneParent).focusPane = null;
 +                else
 +                    IUIComponent(focusPaneParent).focusPane = null;
 +            }
 +        }
 +            
 +        // trace("FM got added for " + event.target);
 +
 +        if (o is IFocusManagerComponent)
 +        {
 +            for (i = 0; i < focusableObjects.length; i++)
 +            {
 +                if (o == focusableObjects[i])
 +                {
 +                    if (o == _lastFocus)
 +                    {
 +                        _lastFocus.drawFocus(false);
 +                        _lastFocus = null;
 +                    }
 +                    // trace("FM removed " + o);
 +                    focusableObjects.splice(i, 1);
 +                    focusableCandidates = [];
 +                    calculateCandidates = true;                 
 +                    break;
 +                }
 +            }
 +            o.removeEventListener("tabFocusEnabledChange", tabFocusEnabledChangeHandler);
 +            o.removeEventListener("tabIndexChange", tabIndexChangeHandler);
 +        }
 +        removeFocusables(o, false);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function removeFocusables(o:DisplayObject, dontRemoveTabChildrenHandler:Boolean):void
 +    {
 +        var i:int;
 +        if (o is DisplayObjectContainer)
 +        {
 +            if (!dontRemoveTabChildrenHandler)
 +            {
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +                o.removeEventListener("tabChildrenChange", tabChildrenChangeHandler);
 +				}
 +                o.removeEventListener("hasFocusableChildrenChange", hasFocusableChildrenChangeHandler);
 +            }
 +
 +            for (i = 0; i < focusableObjects.length; i++)
 +            {
 +                if (isParent(DisplayObjectContainer(o), focusableObjects[i]))
 +                {
 +                    if (focusableObjects[i] == _lastFocus)
 +                    {
 +                        _lastFocus.drawFocus(false);
 +                        _lastFocus = null;
 +                    }
 +                    // trace("FM removed " + focusableObjects[i]);
 +                    focusableObjects[i].removeEventListener(
 +                        "tabFocusEnabledChange", tabFocusEnabledChangeHandler);
 +                    focusableObjects[i].removeEventListener(
 +                        "tabIndexChange", tabIndexChangeHandler);
 +                    focusableObjects.splice(i, 1);
 +                    i = i - 1;  // because increment would skip one
 +                    
 +                    focusableCandidates = [];
 +                    calculateCandidates = true;                 
 +                }
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function showHandler(event:Event):void
 +    {
 +		var awm:IActiveWindowManager = 
 +			IActiveWindowManager(form.systemManager.getImplementation("mx.managers::IActiveWindowManager"));
 +		if (awm)
 +        	awm.activate(form); // build a message that does the equal
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function hideHandler(event:Event):void
 +    {
 +		var awm:IActiveWindowManager = 
 +			IActiveWindowManager(form.systemManager.getImplementation("mx.managers::IActiveWindowManager"));
 +		if (awm)
 +        	awm.deactivate(form); // build a message that does the equal
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function childHideHandler(event:Event):void
 +    {
 +        var target:DisplayObject = DisplayObject(event.target);
 +        // trace("FocusManager focusInHandler in  = " + this._form.systemManager.loaderInfo.url);
 +        // trace("FM " + this + " focusInHandler " + target);
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +        if (lastFocus && !isEnabledAndVisible(DisplayObject(lastFocus)) && DisplayObject(form).stage)
 +        {
 +            DisplayObject(form).stage.focus = null;
 +            lastFocus = null;
 +        }
 +		}
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    private function viewHideHandler(event:Event):void
 +    {
 +        // Target is the active view that is about to be hidden
 +        var target:DisplayObjectContainer = event.target as DisplayObjectContainer;
 +        var lastFocusDO:DisplayObject = lastFocus as DisplayObject;
 +       
 +        // If the lastFocus is in the view about to be hidden, clear focus
 +        if (target && lastFocusDO && target.contains(lastFocusDO))
 +            lastFocus = null;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function creationCompleteHandler(event:FlexEvent):void
 +    {
 +        var o:DisplayObject = DisplayObject(form);
 +        if (o.parent && o.visible && !activated)
 +		{
 +			var awm:IActiveWindowManager = 
 +				IActiveWindowManager(form.systemManager.getImplementation("mx.managers::IActiveWindowManager"));
 +			if (awm)
 +	        	awm.activate(form); // build a message that does the equal
 +		}
 +    }
 +
 +    /**
 +     *  @private
 +     *  Add or remove if tabbing properties change.
 +     */
 +    private function tabIndexChangeHandler(event:Event):void
 +    {
 +        calculateCandidates = true;
 +    }
 +
 +    /**
 +     *  @private
 +     *  Add or remove if tabbing properties change.
 +     */
 +    private function tabFocusEnabledChangeHandler(event:Event):void
 +    {
 +        calculateCandidates = true;
 +
 +        var o:IFocusManagerComponent = IFocusManagerComponent(event.target);
 +        var n:int = focusableObjects.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            if (focusableObjects[i] == o)
 +                break;
 +        }
 +        if (o.tabFocusEnabled)
 +        {
 +            if (i == n && isTabVisible(DisplayObject(o)))
 +            {
 +                // trace("FM tpc added " + o);
 +                // add it if were not already
 +               	if (focusableObjects.indexOf(o) == -1)
 +	                focusableObjects.push(o);
 +            }
 +        }
 +        else
 +        {
 +            // remove it
 +            if (i < n)
 +            {
 +                // trace("FM tpc removed " + o);
 +                focusableObjects.splice(i, 1);
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Add or remove if tabbing properties change.
 +     */
- 	COMPILE::AS3
++	COMPILE::SWF
 +    private function tabChildrenChangeHandler(event:Event):void
 +    {
 +        if (event.target != event.currentTarget)
 +            return;
 +
 +        calculateCandidates = true;
 +
 +        var o:DisplayObjectContainer = DisplayObjectContainer(event.target);
 +        if (o.tabChildren)
 +        {
 +            addFocusables(o, true);
 +        }
 +        else
 +        {
 +            removeFocusables(o, true);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Add or remove if tabbing properties change.
 +     */
 +    private function hasFocusableChildrenChangeHandler(event:Event):void
 +    {
 +        if (event.target != event.currentTarget)
 +            return;
 +
 +        calculateCandidates = true;
 +
 +        var o:IFocusManagerComponent = IFocusManagerComponent(event.target);
 +        if (o.hasFocusableChildren)
 +        {
 +            addFocusables(DisplayObject(o), true);
 +        }
 +        else
 +        {
 +            removeFocusables(DisplayObject(o), true);
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  This gets called when mouse clicks on a focusable object.
 +     *  We block player behavior
 +     */
 +    private function mouseFocusChangeHandler(event:FocusEvent):void
 +    {
 +        // trace("FocusManager: mouseFocusChangeHandler  in  = " + this._form.systemManager.loaderInfo.url);
 +    	// trace("FocusManager: mouseFocusChangeHandler " + event);
 +        
 +        if (event.isDefaultPrevented())
 +            return;
 +
 +        // If relatedObject is null because we don't have access to the 
 +        // object getting focus then allow the Player to set focus
 +        // to the object. The isRelatedObjectInaccessible property is 
 +        // Player 10 only so we have to test if it is available. We
 +        // will only see isRelatedObjectInaccessible if we are a version "10" swf
 +        // (-target-player=10). Version "9" swfs will not see the property
 +        // even if running in Player 10.
 +        if (event.relatedObject == null && 
 +            "isRelatedObjectInaccessible" in event &&
 +            event["isRelatedObjectInaccessible"] == true)
 +        {
 +            // lost focus to a control in different sandbox.
 +            return;
 +        }
 +        
 +        if (event.relatedObject is TextField)
 +        {
 +            var tf:TextField = event.relatedObject as TextField;
 +            if (tf.type == "input" || tf.selectable)
 +            {
 +                return; // pass it on
 +            }
 +        }
 +
 +        event.preventDefault();
 +    }
 +
 +    /**
 +     *  @private
 +     *  This gets called when the tab key is hit.
 +     */
 +    mx_internal function keyFocusChangeHandler(event:FocusEvent):void
 +    {
 +        // trace("keyFocusChangeHandler handled by " + this);
 +    	// trace("keyFocusChangeHandler event = " + event);
 +    	
 +    	var sm:ISystemManager = form.systemManager;
 +
 +        if (hasEventListener("keyFocusChange"))
 +    		if (!dispatchEvent(new FocusEvent("keyFocusChange", false, true, InteractiveObject(event.target))))
 +	    		return;
 +
 +        showFocusIndicator = true;
 +		focusChanged = false;
 +
 +        var haveBrowserFocusComponent:Boolean = (browserFocusComponent != null);
 +        if (browserFocusComponent)
 +            clearBrowserFocusComponent();
 +        
 +        // see if we got here from a tab.  We also need to check for 
 +        // keyCode == 0 because in IE sometimes the first time you tab 
 +        // in to the flash player, you get keyCode == 0 instead of TAB.
 +        // Flash Player bug #2295688.
 +        if ((event.keyCode == Keyboard.TAB || (browserMode && event.keyCode == 0)) 
 +                && !event.isDefaultPrevented())
 +        {
 +            if (haveBrowserFocusComponent)
 +            {
 +                if (hasEventListener("browserFocusComponent"))
 +	    			dispatchEvent(new FocusEvent("browserFocusComponent", false, false, InteractiveObject(event.target)));
 +				
 +                return;
 +            }
 +
 +            if (ieshifttab && lastAction == "ACTIVATE")
 +            {
 +                // IE seems to now require that we set focus to something during activate
 +                // but then we get this keyFocusChange event.  I think we used to not
 +                // need to set focus on activate and we still got the keyFocusChange
 +                // and then stage.focus was null and we'd use the keyFocusChange event
 +                // to determine which control (first or last) got focus based on
 +                // the shift key.
 +                // If we set focus on activate, then we get this keyFocusChange which moves
 +                // the focus somewhere else, so we set fauxFocus to the stage as a signal
 +                // to the setFocusToNextObject logic that it shouldn't use the stage.focus
 +                // as the starting point.
- 				COMPILE::AS3
++				COMPILE::SWF
 +				{
 +                fauxFocus = sm.stage;
 +				}
 +            }
 +            // trace("tabHandled by " + this);
 +            setFocusToNextObject(event);
 +            if (ieshifttab && lastAction == "ACTIVATE")
 +            {
 +                fauxFocus = null;
 +            }
 +
 +            // if we changed focus or if we're the main app
 +            // eat the event
 +			if (focusChanged || sm == sm.getTopLevelRoot())
 +            	event.preventDefault();
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Watch for TAB keys.
 +	 *  @flexjsignorecoercion flex.display.InteractiveObject
 +     */
 +    mx_internal function keyDownHandler(event:KeyboardEvent):void
 +    {
 +        // trace("onKeyDown handled by " + this);
 +    	// trace("onKeyDown event = " + event);
 +		// if the target is in a bridged application, let it handle the click.
 +		var sm:ISystemManager = form.systemManager;
 +
 +        if (hasEventListener("keyDownFM"))
 +    		if (!dispatchEvent(new FocusEvent("keyDownFM", false, true, InteractiveObject(event.target))))
 +   	    		return;
 +
 +        if (sm is SystemManager)
 +            SystemManager(sm).idleCounter = 0;
 +
 +        if (event.keyCode == Keyboard.TAB)
 +        {
 +            lastAction = "KEY";
 +
 +            // I think we'll have time to do this here instead of at creation time
 +            // this makes and orders the focusableCandidates array
 +            if (calculateCandidates)
 +            {
 +                sortFocusableObjects();
 +                calculateCandidates = false;
 +            }
 +        }
 +
 +        if (browserMode)
 +        {
 +            if (browserFocusComponent)
 +                clearBrowserFocusComponent();
 +            
 +            if (event.keyCode == Keyboard.TAB && focusableCandidates.length > 0)
 +            {
 +                // get the object that has the focus
 +                var o:DisplayObject = fauxFocus;
 +				if (!o)
 +				{
- 					COMPILE::AS3
++					COMPILE::SWF
 +					{
 +					o = form.systemManager.stage.focus;
 +					}
 +					COMPILE::JS
 +					{
 +					o = document.activeElement as InteractiveObject;
 +					}
 +				}
 +				
 +                // trace("focus was at " + o);
 +                // trace("focusableObjects " + focusableObjects.length);
 +                o = DisplayObject(findFocusManagerComponent2(InteractiveObject(o)));
 +                var g:String = "";
 +                if (o is IFocusManagerGroup)
 +                {
 +                    var tg:IFocusManagerGroup = IFocusManagerGroup(o);
 +                    g = tg.groupName;
 +                }
 +
 +                var i:int = getIndexOfFocusedObject(o);
 +                var j:int = getIndexOfNextObject(i, event.shiftKey, false, g);
 +                if (event.shiftKey)
 +                {
 +                    if (j >= i)
 +                    {
 +                        // we wrapped so let browser have it
 +                        browserFocusComponent = getBrowserFocusComponent(event.shiftKey);
 +                        if (browserFocusComponent.tabIndex == -1)
 +                            browserFocusComponent.tabIndex = 0;
 +                    }
 +                }
 +                else
 +                {
 +                    if (j <= i)
 +                    {
 +                        // we wrapped so let browser have it
 +                        browserFocusComponent = getBrowserFocusComponent(event.shiftKey);
 +                        if (browserFocusComponent.tabIndex == -1)
 +                            browserFocusComponent.tabIndex = LARGE_TAB_INDEX;
 +                    }
 +                }
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     *  Watch for ENTER key.
 +     */
 +    private function defaultButtonKeyHandler(event:KeyboardEvent):void
 +    {        
 +        var sm:ISystemManager = form.systemManager;
 +        if (hasEventListener("defaultButtonKeyHandler"))
 +    		if (!dispatchEvent(new FocusEvent("defaultButtonKeyHandler", false, true)))
 +	    		return;
 +            
 +        if (defaultButtonEnabled && event.keyCode == Keyboard.ENTER &&
 +			defButton && defButton.enabled)
 +        {
 +            sendDefaultButtonEvent();
 +    	}
 +    }
 +
 +    /**
 +     *  @private
 +     *  This gets called when the focus changes due to a mouse click.
 +     *
 +     *  Note: If the focus is changing to a TextField, we don't call
 +     *  setFocus() on it because the player handles it;
 +     *  calling setFocus() on a TextField which has scrollable text
 +     *  causes the text to autoscroll to the end, making the
 +     *  mouse click set the insertion point in the wrong place.
 +     */
 +    private function mouseDownCaptureHandler(event:MouseEvent):void
 +    {
 +        // trace("FocusManager mouseDownCaptureHandler in  = " + this._form.systemManager.loaderInfo.url);
 +        // trace("FocusManager mouseDownCaptureHandler target " + event.target);
 +        showFocusIndicator = false;
 +    }
 +
 +    /**
 +     *  @private
 +     *  This gets called when the focus changes due to a mouse click.
 +     *
 +     *  Note: If the focus is changing to a TextField, we don't call
 +     *  setFocus() on it because the player handles it;
 +     *  calling setFocus() on a TextField which has scrollable text
 +     *  causes the text to autoscroll to the end, making the
 +     *  mouse click set the insertion point in the wrong place.
 +     */
 +    private function mouseDownHandler(event:MouseEvent):void
 +    {
 +        // trace("FocusManager mouseDownHandler in  = " + this._form.systemManager.loaderInfo.url);
 +        // trace("FocusManager mouseDownHandler target " + event.target);
 +        
 +		// if the target is in a bridged application, let it handle the click.
 +		var sm:ISystemManager = form.systemManager;
 +        var o:DisplayObject = getTopLevelFocusTarget(
 +            InteractiveObject(event.target));
 +
 +        if (!o)
 +            return;
 +
 +        // trace("FocusManager mouseDownHandler on " + o);
 +        
 +        // Make sure the containing component gets notified.
 +        // As the note above says, we don't set focus to a TextField ever
 +        // because the player already did and took care of where
 +        // the insertion point is, and we also don't call setfocus
 +        // on a component that last the last focused object unless
 +        // the last action was just to activate the player and didn't
 +        // involve tabbing or clicking on a component
 +        if ((o != _lastFocus || lastAction == "ACTIVATE") && !(o is TextField))
 +            setFocus(IFocusManagerComponent(o));
 +		else if (_lastFocus)
 +		{
 +			// trace("FM: skipped setting focus to " + _lastFocus);
 +		}
 +		
 +        if (hasEventListener("mouseDownFM"))
 +    		dispatchEvent(new FocusEvent("mouseDownFM", false, false, InteractiveObject(o)));
 +
 +        lastAction = "MOUSEDOWN";
 +	
 +    }
 +	
 +	/**
 +	 * @flexjsignorecoercion flex.display.InteractiveObject
 +	 */
 +	private function getBrowserFocusComponent(shiftKey:Boolean):InteractiveObject
 +	{
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +    	var focusComponent:InteractiveObject = form.systemManager.stage.focus;
 +		}
 +		COMPILE::JS
 +		{
 +			var focusComponent:InteractiveObject = document.activeElement as InteractiveObject;			
 +		}
 +		
 +		// if the focus is null it means focus is in an application we
 +		// don't have access to. Use either the last object or the first
 +		// object in this focus manager's list.
 +		if (!focusComponent)
 +		{
 +			var index:int = shiftKey ? 0 : focusableCandidates.length - 1;
 +			focusComponent = focusableCandidates[index];
 +		}
 +		
 +		return focusComponent;
 +	}	
 +}
 +
 +}
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +import flash.display.DisplayObject;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;	
 +}
 +
 +/** 
 + * @private
 + * 
 + *  Plain old class to return multiple items of info about the potential
 + *  change in focus.
 + */
 +class FocusInfo
 +{
 +	public var displayObject:DisplayObject;	// object to get focus
 +	public var wrapped:Boolean;				// true if focus wrapped around
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManagerContainer.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/IFocusManagerContainer.as
index 8091645,0000000..4b1d230
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManagerContainer.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManagerContainer.as
@@@ -1,137 -1,0 +1,137 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.managers
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;		
 +}
 +import org.apache.flex.events.IEventDispatcher;
 +import mx.core.IFlexDisplayObject;
 +import mx.managers.IFocusManager;
 +import mx.managers.ISystemManager;
 +
 +/**
 + *  The IFocusManagerContainer interface defines the interface that 
 + *  containers implement to host a FocusManager.
 + *  The PopUpManager automatically installs a FocusManager
 + *  in any IFocusManagerContainer it pops up.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IFocusManagerContainer extends IEventDispatcher 
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  focusManager
 +    //----------------------------------
 +
 +    /**
 +     *  The FocusManager for this component. 
 +     *  The FocusManager must be in a <code>focusManager</code> property.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get focusManager():IFocusManager;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set focusManager(value:IFocusManager):void;
 +
 +    //----------------------------------
 +    //  defaultButton
 +    //----------------------------------
 +    
 +    /**
 +     *  The Button control designated as the default button
 +     *  for the container.
 +     *  When controls in the container have focus, pressing the
 +     *  Enter key is the same as clicking this Button control.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     *  @default null
 +     */
 +    function get defaultButton():IFlexDisplayObject;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set defaultButton(value:IFlexDisplayObject):void;
 +    
 +    //----------------------------------
 +    //  systemManager
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#systemManager
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get systemManager():ISystemManager;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Determines whether the specified display object is a child 
 +     *  of the container instance or the instance itself. 
 +     *  The search includes the entire display list including this container instance. 
 +     *  Grandchildren, great-grandchildren, and so on each return <code>true</code>.
 +     *
 +     *  @param child The child object to test.
 +     *
 +     *  @return <code>true</code> if the child object is a child of the container 
 +     *  or the container itself; otherwise <code>false</code>.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function contains(child:DisplayObject):Boolean;
 +}
 +
 +}


[31/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
index ff6f91a,0000000..cfb5245
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
@@@ -1,1441 -1,0 +1,1441 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.resources
 +{
 +
 +import mx.events.FocusEvent;
 +
 +import org.apache.flex.core.CallLaterBead;
 +import org.apache.flex.events.Event;
 +import org.apache.flex.events.EventDispatcher;
 +import flex.system.DefinitionManager;
 +import flex.system.I18NManager;
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.system.ApplicationDomain;		
 +}
 +COMPILE::LATER
 +{
 +	import org.apache.flex.events.IEventDispatcher;
 +	import flex.events.TimerEvent;
 +	import flash.system.Capabilities;
 +	import flash.system.SecurityDomain;
 +	import flash.utils.Dictionary;		
 +	import mx.core.IFlexModuleFactory;
 +	import mx.core.Singleton;
 +	import mx.events.ModuleEvent;
 +	import mx.events.ResourceEvent;
 +	import mx.modules.IModuleInfo;
 +	import mx.modules.ModuleManager;
 +}
 +import mx.core.mx_internal;
 +import mx.events.FlexEvent;
 +import mx.managers.SystemManagerGlobals;
 +import mx.utils.StringUtil;
 +import org.apache.flex.core.UIBase;
 +
 +use namespace mx_internal;
 +
 +/**
 + *  @copy mx.resources.IResourceManager#change
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +[Event(name="change", type="flash.events.Event")]
 +
 +[ExcludeClass]
 +
 +/**
 + *  @private
 + *  This class provides an implementation of the IResourceManager interface.
 + *  The IResourceManager and IResourceBundle interfaces work together
 + *  to provide internationalization support for Flex applications.
 + *
 + *  <p>A single instance of this class manages all localized resources
 + *  for a Flex application.</p>
 + *  
 + *  @see mx.resources.IResourceManager
 + *  @see mx.resources.IResourceBundle
 + */
 +public class ResourceManagerImpl extends EventDispatcher implements IResourceManager
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  The sole instance of the ResourceManager.
 +     */
 +    private static var instance:IResourceManager;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Class methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Gets the single instance of the ResourceManagerImpl class.
 +     *  This object manages all localized resources for a Flex application.
 +     *  
 +     *  @return An object implementing IResourceManager.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public static function getInstance():IResourceManager
 +    {
 +        if (!instance)
 +            instance = new ResourceManagerImpl();
 +
 +        return instance;
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function ResourceManagerImpl()
 +    {
 +        super();
 +
 +        if (SystemManagerGlobals.topLevelSystemManagers.length)
 +        {
 +            if (SystemManagerGlobals.topLevelSystemManagers[0].currentFrame == 1)
 +            {
 +                ignoreMissingBundles = true;
 +				inFrame1 = true;
 +				var topSM:UIBase = SystemManagerGlobals.topLevelSystemManagers[0] as UIBase;
 +                if (topSM.getBeadByType(CallLaterBead) == null)
 +					topSM.addBead(new CallLaterBead());
 +				var clb:CallLaterBead = topSM.getBeadByType(CallLaterBead) as CallLaterBead;
 +				clb.callLater(enterFrameHandler, null, this);
 +            }
 +        }
 +        
 +        var info:Object = SystemManagerGlobals.info;
 +		// Falcon injects this property and it is always false
 +		// We ignore missing bundles because Falcon doesn't
 +		// generate fallback bundles like MXMLC;
 +		if (!inFrame1)
 +			ignoreMissingBundles = info && info.hasOwnProperty("isMXMLC");
 +		
 +        if (info)
 +            processInfo(info, false);
 +
 +        ignoreMissingBundles = info && info.hasOwnProperty("isMXMLC");
 +        
 +        if (SystemManagerGlobals.topLevelSystemManagers.length)
 +		    SystemManagerGlobals.topLevelSystemManagers[0].
 +			    addEventListener(FlexEvent.NEW_CHILD_APPLICATION, newChildApplicationHandler);
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +	/**
 +	 *  @private
 +	 * 
 +	 *  Whether or ignoreMissingBundles was set in frame 1
 +	 */
 +	private var inFrame1:Boolean = false;
 +	
 +    /**
 +     *  @private
 +     * 
 +     *  Whether or not to throw an error.
 +     */
 +    private var ignoreMissingBundles:Boolean = false;
 +    
 +    /**
 +     *  @private
 +     * 
 +     *  The dictionary to hold all of the weak reference resource bundles.
 +     */
 +	COMPILE::LATER
 +    private var bundleDictionary:Dictionary;
 +    
 +    /**
 +     *  @private
 +     *  A map whose keys are locale strings like "en_US"
 +     *  and whose values are "bundle maps".
 +     *  A bundle map is a map whose keys are bundle names
 +     *  like "SharedResources" and whose values are ResourceBundle instances.
 +     *  You can get to an individual resource value like this:
 +     *  localeMap["en_US"]["SharedResources"].content["currencySymbol"]
 +     */
 +    private var localeMap:Object = {};
 +    
 +    /**
 +     *  @private
 +     *  A map whose keys are URLs for resource modules that have been loaded
 +     *  and whose values are ResourceModuleInfo instances for those modules.
 +     */
 +    private var resourceModules:Object = {};
 +
 +    /**
 +     *  @private
 +     */
 +    private var initializedForNonFrameworkApp:Boolean = false;
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  localeChain
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the localeChain property.
 +     */
 +    private var _localeChain:Array /* of String */;
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#localeChain
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get localeChain():Array /* of String */
 +    {
 +        return _localeChain;
 +    }
 +    
 +    /**
 +     *  @private
 +     */
 +    public function set localeChain(value:Array /* of String */):void
 +    {
 +        _localeChain = value;
 +        
 +        update();
 +    }
 +    
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     *  This method is called by the SystemManager class of an Application
 +     *  when the application starts.
 +     *  It is also called by the FlexModuleFactory class of a code module
 +     *  when that module gets loaded.
 +     *
 +     *  The MXML compiler autogenerated code which set the
 +     *  "compiledLocales" and "compiledResourceBundleNames" properties
 +     *  of the info() Object required by the IFlexModuleFactory
 +     *  interface that these classes implement.
 +     *  These two properties together indicate which resource bundle
 +     *  classes the MXML compiler autogenerated and linked into the
 +     *  application or module.
 +     *
 +     *  The "compiledLocales" property has been set to the locales
 +     *  which were specified at compile time using the -locale option.
 +     *  For example, if you compile with -locale=en_US,ja_JP
 +     *  then the "compiledLocales" property is the array [ "en_US", "ja_JP" ].
 +     *
 +     *  The "compiledResourceBundleNames" property has been set
 +     *  to the names of the resource bundles which are used by
 +     *  the application or module, as determined by the compiler
 +     *  from [ResourceBundle] metadata and ~~Resource() directives.
 +     *  For example, if the classes in the application or module
 +     *  declare that they use resource bundles named "core" and "MyApp",
 +     *  then the "compiledResourceBundleNames" property is the array
 +     *  [ "core", "MyApp" ].
 +     *
 +     *  The compiler autogenerated a ResourceBundle subclass for each
 +     *  (locale, bundle name) pair.
 +     *  For example, with the above locales and bundle names,
 +     *  there would be four classes:
 +     *    en_US$core_properties
 +     *    en_US$MyApp_properties
 +     *    ja_JP$core_properties
 +     *    ja_JP$MyApp_properties
 +     *
 +     *  This method creates one instance of each such class
 +     *  and installs it into the ResourceManager with addResourceBundle().
 +     *  If a bundle for a given locale and bundle name already exists
 +     *  in the ResourceManager already exists, it does not get replaced.
 +     *  This can happen when a code module gets loaded into an application.
 +     * 
 +     *  When sub-applications and modules install their resource bundles 
 +     *  they set useWeakReference = true. Any new resource bundles they 
 +     *  create will be weak referenced by the ResourceManager. The 
 +     *  sub-application or module will then provide a hard reference
 +     *  to the returned Array of resource bundles to keep them from 
 +     *  being garbage collected.
 +     */
 +    public function installCompiledResourceBundles(
 +                                applicationDomain:DefinitionManager,
 +                                locales:Array /* of String */,
 +                                bundleNames:Array /* of String */,
 +                                useWeakReference:Boolean = false):Array
 +    {
 +        //trace("locales", locales);
 +        //trace("bundleNames", bundleNames);
 +        var bundles:Array = [];
 +        var bundleCount:uint = 0;
 +        var n:int = locales ? locales.length : 0;
 +        var m:int = bundleNames ? bundleNames.length : 0;
 +
 +        // Loop over the locales.
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var locale:String = locales[i];
 +            
 +            // Loop over the bundle names.
 +            for (var j:int = 0; j < m; j++)
 +            {
 +                var bundleName:String = bundleNames[j];
 +                
 +                var bundle:IResourceBundle = installCompiledResourceBundle(
 +                    applicationDomain, locale, bundleName, 
 +                    useWeakReference);
 +                
 +                if (bundle)
 +                    bundles[bundleCount++] = bundle;
 +            }
 +        }
 +        
 +        return bundles;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function installCompiledResourceBundle(
 +                                applicationDomain:DefinitionManager,
 +                                locale:String, bundleName:String,
 +                                useWeakReference:Boolean = false):IResourceBundle
 +    {
 +        var packageName:String = null;
 +        var localName:String = bundleName;
 +        var colonIndex:int = bundleName.indexOf(":");
 +        if (colonIndex != -1)
 +        {
 +            packageName = bundleName.substring(0, colonIndex);
 +            localName = bundleName.substring(colonIndex + 1);
 +        }
 +
 +        // If a bundle with that locale and bundle name already exists
 +        // in the ResourceManager, don't replace it.
 +        // If we want to install a  weakReferenceDictionary then don't rely on
 +        // a weak reference dictionary because it may go way when the 
 +        // application goes away.
 +        var resourceBundle:IResourceBundle = getResourceBundleInternal(locale,
 +                                                    bundleName, 
 +                                                    useWeakReference);
 +        if (resourceBundle)
 +            return resourceBundle;
 +        
 +        // The autogenerated resource bundle classes produced by the
 +        // mxmlc and compc compilers have names that incorporate
 +        // the locale and bundle name, such as "en_US$core_properties".
 +        var resourceBundleClassName:String =
 +            locale + "$" + localName + "_properties";
 +        if (packageName != null)
 +            resourceBundleClassName = packageName + "." + resourceBundleClassName;
 +                
 +        // Find the bundle class by its name.
 +        // We do a hasDefinition() check before calling getDefinition()
 +        // because getDefinition() will throw an RTE
 +        // if the class doesn't exist.
 +        var bundleClass:Class = null;
 +        if (applicationDomain.hasDefinition(resourceBundleClassName))
 +        {
 +            bundleClass = Class(applicationDomain.getDefinition(
 +                                    resourceBundleClassName));
 +        }
 +
 +        if (!bundleClass)
 +        {
 +            resourceBundleClassName = bundleName;
 +            if (applicationDomain.hasDefinition(resourceBundleClassName))
 +            {
 +                bundleClass = Class(applicationDomain.getDefinition(
 +                                        resourceBundleClassName));
 +            }
 +        }
 +        
 +        // In case we linked against a Flex 2 SWC, look for the old
 +        // class name.
 +        if (!bundleClass)
 +        {
 +            resourceBundleClassName = bundleName + "_properties";
 +            if (applicationDomain.hasDefinition(resourceBundleClassName))
 +            {
 +                bundleClass = Class(applicationDomain.getDefinition(
 +                                        resourceBundleClassName));
 +            }
 +        }
 +        
 +        if (!bundleClass)
 +        {
 +            if (ignoreMissingBundles)
 +                return null;
 +            
 +            throw new Error(
 +                "Could not find compiled resource bundle '" + bundleName +
 +                "' for locale '" + locale + "'.");
 +        }
 +        
 +        // Create a proxy
 +        var proxy:ResourceBundleProxy = new ResourceBundleProxy();
 +        
 +		proxy.bundleClass = bundleClass;
 +		proxy.useWeakReference = useWeakReference;
 +
 +        // In case we just created a ResourceBundle from a Flex 2 SWC,
 +        // set its locale and bundleName, because the old constructor
 +        // didn't used to do this.
 +        proxy.locale = locale;
 +        proxy.bundleName = bundleName;
 +                
 +        // Add that resource bundle instance to the ResourceManager.
 +        resourceBundle = proxy;
 +        addResourceBundle(resourceBundle, useWeakReference);
 +        
 +        return resourceBundle;
 +    }
 +    
 +    // FocusEvent is used just so we can add a relatedObject
 +	private function newChildApplicationHandler(event:FocusEvent):void
 +	{
 +		var info:Object = event.relatedObject["info"]();
 +        var weakReference:Boolean = false;
 +        if ("_resourceBundles" in event.relatedObject)
 +            weakReference = true;
 +        
 +        // If the application has a "_resourceBundles" object for us to put
 +        // the bundles into then we will. Otherwise have the ResourceManager
 +        // create a hard reference to the resources.
 +        var bundles:Array = processInfo(info, weakReference);
 +        if (weakReference)
 +            event.relatedObject["_resourceBundles"] = bundles;
 +    }
 +		
 +    private function processInfo(info:Object, useWeakReference:Boolean):Array
 +    {
 +		var compiledLocales:Array = info["compiledLocales"];
 +
 +		ResourceBundle.locale =
 +			compiledLocales != null && compiledLocales.length > 0 ?
 +			compiledLocales[0] :
 +			"en_US";
 +
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +			var applicationDomain:DefinitionManager = new DefinitionManager(info["currentDomain"]);				
 +		}
 +		COMPILE::JS
 +		{
 +			var applicationDomain:DefinitionManager = new DefinitionManager();				
 +		}
 +
 +		var compiledResourceBundleNames:Array /* of String */ =
 +			info["compiledResourceBundleNames"];
 +		
 +		var bundles:Array = installCompiledResourceBundles(
 +			applicationDomain, compiledLocales, compiledResourceBundleNames,
 +            useWeakReference);
 +
 +		// If the localeChain wasn't specified in the FlashVars of the SWF's
 +		// HTML wrapper, or in the query parameters of the SWF URL,
 +		// then initialize it to the list of compiled locales,
 +        // sorted according to the system's preferred locales as reported by
 +        // Capabilities.languages or Capabilities.language.
 +		// For example, if the applications was compiled with, say,
 +		// -locale=en_US,ja_JP and Capabilities.languages reports [ "ja-JP" ],
 +        // set the localeChain to [ "ja_JP" "en_US" ].
 +		if (!localeChain)
 +			initializeLocaleChain(compiledLocales);
 +
 +        return bundles;
 +	}
 +
 +    /**
 +     *  @copy mx.resources.IResourceManager#initializeLocaleChain()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function initializeLocaleChain(compiledLocales:Array):void
 +    {
 +        localeChain = LocaleSorter.sortLocalesByPreference(
 +            compiledLocales, getSystemPreferredLocales(), null, true);
 +    }
 +
 +    /**
 +     *  @copy mx.resources.IResourceManager#loadResourceModule()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function loadResourceModule(url:String, updateFlag:Boolean = true,
 +                                       applicationDomain:ApplicationDomain = null,
 +                                       securityDomain:SecurityDomain = null):
 +                                       IEventDispatcher
 +    {
 +        var moduleInfo:IModuleInfo = ModuleManager.getModule(url);
 +
 +        // Create the per-load IEventDispatcher that we'll return.
 +        var resourceEventDispatcher:ResourceEventDispatcher =
 +            new ResourceEventDispatcher(moduleInfo);
 +
 +        // Set up a handler for the "ready" event from the module.
 +        // We use a local Function rather than a method
 +        // so that it can access the 'update' argument.
 +        var readyHandler:Function = function(event:ModuleEvent):void
 +        {
 +            //trace("readyHandler");
 +
 +            var resourceModule:* = // IResourceModule
 +                event.module.factory.create();
 +        
 +            //dumpResourceModule(resourceModule);
 +        
 +            resourceModules[event.module.url].resourceModule = resourceModule;
 +
 +            if (updateFlag)
 +                update();
 +        }
 +        moduleInfo.addEventListener(ModuleEvent.READY, readyHandler,
 +                                    false, 0, true);
 +
 +        // Set up a handler for the "error" event from the module.
 +        // We use a local Function rather than a method
 +        // for symmetry with the readyHandler.
 +        var errorHandler:Function = function(event:ModuleEvent):void
 +        {
 +            var message:String = "Unable to load resource module from " + url;
 +
 +            if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR))
 +            {
 +                var resourceEvent:ResourceEvent = new ResourceEvent(
 +                    ResourceEvent.ERROR, event.bubbles, event.cancelable);
 +                resourceEvent.bytesLoaded = 0;
 +                resourceEvent.bytesTotal = 0;
 +                resourceEvent.errorText = message;
 +                resourceEventDispatcher.dispatchEvent(resourceEvent);
 +            }
 +            else
 +            {
 +                throw new Error(message);
 +            }
 +        }
 +        moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler,
 +                                    false, 0, true);
 +
 +        resourceModules[url] =
 +            new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
 +
 +        // This Timer gives the loadResourceModules() caller a chance
 +        // to add event listeners to the return value, before the module
 +        // is loaded.
 +        // We use a local Function for the timerHandler rather than a method
 +        // so that it can access the 'moduleInfo' local var.
 +        var timer:Timer = new Timer(0);
 +        var timerHandler:Function = function(event:TimerEvent):void
 +        {
 +            timer.removeEventListener(TimerEvent.TIMER, timerHandler);
 +            timer.stop();
 +            
 +            //trace("loading");
 +
 +            // Start loading the module.
 +            moduleInfo.load(applicationDomain, securityDomain);
 +        }
 +        timer.addEventListener(TimerEvent.TIMER, timerHandler,
 +                               false, 0, true);
 +        timer.start();
 +        
 +        return resourceEventDispatcher;
 +    }
 +
 +    /**
 +     *  @copy mx.resources.IResourceManager#unloadResourceModule()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +	COMPILE::LATER
 +    public function unloadResourceModule(url:String, update:Boolean = true):void
 +    {
 +        // Get the resource module info.
 +        var rmi:ResourceModuleInfo = resourceModules[url];        
 +        if (!rmi)
 +            return;
 +        
 +        if (rmi.resourceModule)
 +        {
 +            // Get the bundles in this module.
 +            var bundles:Array = rmi.resourceModule.resourceBundles;
 +            if (bundles)
 +            {
 +               var n:int = bundles.length;
 +               for (var i:int = 0; i < n; i++)
 +               {
 +                   // Remove each bundle.
 +                   var locale:String = bundles[i].locale;
 +                   var bundleName:String = bundles[i].bundleName;
 +                   removeResourceBundle(locale, bundleName);
 +               }
 +            }
 +        }
 +
 +        // Remove all links to the module.
 +        resourceModules[url] = null;
 +        delete resourceModules[url];
 +        
 +        // Unload the module.
 +        rmi.moduleInfo.unload();
 +        
 +        // Update if necessary.
 +        if (update)
 +            this.update();
 +    }
 + 
 +    /**
 +     *  @copy mx.resources.IResourceManager#addResourceBundle()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function addResourceBundle(resourceBundle:IResourceBundle, 
 +                                      useWeakReference:Boolean = false):void
 +    {
 +        var locale:String = resourceBundle.locale;
 +        var bundleName:String = resourceBundle.bundleName;
 +        
 +        if (!localeMap[locale])
 +            localeMap[locale] = {};
 +         
 +		COMPILE::LATER
 +		{
 +	        if (useWeakReference)
 +	        {
 +	            if (!bundleDictionary)
 +	            {
 +	                bundleDictionary = new Dictionary(true);
 +	            }
 +	            
 +	            bundleDictionary[resourceBundle] = locale + bundleName;
 +	            localeMap[locale][bundleName] = bundleDictionary;
 +	        }
 +		}
 +        //else
 +        //{
 +            localeMap[locale][bundleName] = resourceBundle;
 +        //}
 +    }
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getResourceBundle()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getResourceBundle(locale:String,
 +                                      bundleName:String):IResourceBundle
 +    {
 +        return getResourceBundleInternal(locale, bundleName, false);
 +    }
 +    
 +    /**
 +     *  @private
 +     *  
 +     *  @param ignoreWeakReferenceBundles if true, do not search weak
 +     *  reference bundles.
 +     * 
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    private function getResourceBundleInternal(locale:String,
 +                                      bundleName:String,
 +                                      ignoreWeakReferenceBundles:Boolean):IResourceBundle
 +    {
 +        var bundleMap:Object = localeMap[locale];
 +        if (!bundleMap)
 +            return null;
 +           
 +        var bundle:IResourceBundle = null;
 +        var bundleObject:Object = bundleMap[bundleName];
 +		COMPILE::LATER
 +		{
 +			if (bundleObject is Dictionary)
 +			{
 +				if (ignoreWeakReferenceBundles)
 +					return null;
 +				
 +				var localeBundleNameString:String = locale + bundleName;
 +				for (var obj:Object in bundleObject)
 +				{
 +					if (bundleObject[obj] == localeBundleNameString)
 +					{
 +						if (obj is ResourceBundleProxy)
 +							bundle = loadResourceBundleProxy(ResourceBundleProxy(obj));
 +						else 
 +							bundle = obj as IResourceBundle;
 +						break;
 +					}
 +				}
 +			}				
 +		}
 +        /* else */if (bundleObject is ResourceBundleProxy)
 +        {
 +        	bundle = loadResourceBundleProxy(ResourceBundleProxy(bundleObject));
 +        }
 +        else 
 +        {
 +            bundle = bundleObject as IResourceBundle;
 +        }
 +        
 +        return bundle;
 +    }
 +    
 +    private function loadResourceBundleProxy(proxy:ResourceBundleProxy):ResourceBundle {
 +    	var proxyClass:Class = proxy.bundleClass;
 +        var resourceBundle:ResourceBundle = ResourceBundle(new proxyClass());
 +   		resourceBundle._locale = proxy.locale;
 +    	resourceBundle._bundleName = proxy.bundleName;
 +    	
 +    	addResourceBundle(resourceBundle, proxy.useWeakReference);
 +    	
 +    	return resourceBundle;
 +    }
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#removeResourceBundle()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function removeResourceBundle(locale:String, bundleName:String):void
 +    {
 +        // Remove the specified bundle.
 +        delete localeMap[locale][bundleName];
 +
 +        // If that leaves a locale node with no bundles,
 +        // delete the locale node.
 +        if (getBundleNamesForLocale(locale).length == 0)
 +            delete localeMap[locale];
 +    }
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#removeResourceBundlesForLocale()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function removeResourceBundlesForLocale(locale:String):void
 +    {
 +        delete localeMap[locale];
 +    }
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#update()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function update():void
 +    {
 +        dispatchEvent(new Event(Event.CHANGE));
 +    }
 +
 +    /**
 +     *  @copy mx.resources.IResourceManager#getLocales()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getLocales():Array /* of String */
 +    {
 +        var locales:Array = [];
 +        for (var p:String in localeMap)
 +        {
 +            locales.push(p);
 +        }
 +        return locales;
 +    }
 +
 +    /**
 +     *  @copy mx.resources.IResourceManager#getPreferredLocaleChain()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getPreferredLocaleChain():Array /* of String */
 +    {
 +        return LocaleSorter.sortLocalesByPreference(
 +            getLocales(), getSystemPreferredLocales(), null, true);
 +    }
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getBundleNamesForLocale()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getBundleNamesForLocale(locale:String):Array /* of String */
 +    {
 +        var bundleNames:Array = [];
 +        for (var p:String in localeMap[locale])
 +        {
 +            bundleNames.push(p);
 +        }
 +        return bundleNames;
 +    }
 +
 +    /**
 +     *  @copy mx.resources.findResourceBundleWithResource
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function findResourceBundleWithResource(
 +                        bundleName:String, resourceName:String):IResourceBundle
 +    {
 +        if (!_localeChain)
 +            return null;
 +        
 +        var n:int = _localeChain.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +            var locale:String = localeChain[i];
 +            
 +            var bundleMap:Object = localeMap[locale];
 +            if (!bundleMap)
 +                continue;
 +            
 +            var bundleObject:Object = bundleMap[bundleName];
 +            if (!bundleObject)
 +                continue;
 +                
 +            var bundle:IResourceBundle = null;
 +            
 +			COMPILE::LATER
 +			{
 +				if (bundleObject is Dictionary)
 +				{
 +					var localeBundleNameString:String = locale + bundleName;
 +					for (var obj:Object in bundleObject)
 +					{
 +						if (bundleObject[obj] == localeBundleNameString)
 +						{
 +							if (obj is ResourceBundleProxy)
 +								bundle = loadResourceBundleProxy(ResourceBundleProxy(obj));
 +							else 
 +								bundle = obj as IResourceBundle;
 +							break;
 +						}
 +					}
 +				}					
 +			}
 +            /* else*/ if (bundleObject is ResourceBundleProxy)
 +            {
 +        		bundle = loadResourceBundleProxy(ResourceBundleProxy(bundleObject));
 +            }
 +            else 
 +            {
 +                bundle = bundleObject as IResourceBundle;
 +            }
 +                
 +            if (bundle && resourceName in bundle.content)
 +                return bundle;
 +        }
 +
 +        return null;
 +    }
 +
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getObject()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getObject(bundleName:String, resourceName:String,
 +                              locale:String = null):*
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return undefined;
 +
 +        return resourceBundle.content[resourceName];
 +    }
 +    
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getString()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getString(bundleName:String, resourceName:String,
 +                              parameters:Array = null,
 +                              locale:String = null):String
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return null;
 +        
 +        if(!(resourceName in resourceBundle.content))
 +            return null;
 +
 +        var value:String = String(resourceBundle.content[resourceName]);
 +        
 +        if (parameters)
 +            value = StringUtil.substitute(value, parameters);
 +            
 +        return value;
 +    }
 +    
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getStringArray()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getStringArray(bundleName:String,
 +                                   resourceName:String,
 +                                   locale:String = null):Array /* of String */
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return null;
 +
 +        var value:* = resourceBundle.content[resourceName];
 +        
 +        var array:Array = String(value).split(",");
 +        
 +        var n:int = array.length;
 +        for (var i:int = 0; i < n; i++)
 +        {
 +             array[i] = StringUtil.trim(array[i]);
 +        }  
 +        
 +        return array;
 +    }
 +    
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getNumber()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getNumber(bundleName:String, resourceName:String,
 +                              locale:String = null):Number
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return NaN;
 +
 +        var value:* = resourceBundle.content[resourceName];
 +        
 +        return Number(value);
 +    }
 +    
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getInt()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getInt(bundleName:String, resourceName:String,
 +                           locale:String = null):int
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return 0;
 +
 +        var value:* = resourceBundle.content[resourceName];
 +
 +        return int(value);
 +    }
 +    
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getUint()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getUint(bundleName:String, resourceName:String,
 +                            locale:String = null):uint
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return 0;
 +
 +        var value:* = resourceBundle.content[resourceName];
 +
 +        return uint(value);
 +    }
 +    
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getBoolean()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getBoolean(bundleName:String, resourceName:String,
 +                               locale:String = null):Boolean
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return false;
 +
 +        var value:* = resourceBundle.content[resourceName];
 +
 +        return String(value).toLowerCase() == "true";
 +    }
 +    
 +    [Bindable("change")]
 +    
 +    /**
 +     *  @copy mx.resources.IResourceManager#getClass()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function getClass(bundleName:String, resourceName:String,
 +                             locale:String = null):Class
 +    {
 +        var resourceBundle:IResourceBundle =
 +            findBundle(bundleName, resourceName, locale);
 +        if (!resourceBundle)
 +            return null;
 +
 +        var value:* = resourceBundle.content[resourceName];
 +
 +        return value as Class;
 +    }
 +
 +    /**
 +     *  @private.
 +     */
 +    private function findBundle(bundleName:String, resourceName:String,
 +                                locale:String):IResourceBundle
 +    {
 +        supportNonFrameworkApps();
 +
 +        return locale != null ?
 +               getResourceBundle(locale, bundleName) :
 +               findResourceBundleWithResource(bundleName, resourceName);
 +
 +    }
 +
 +    /**
 +     *  @private.
 +     */
 +    private function supportNonFrameworkApps():void
 +    {
 +        if (initializedForNonFrameworkApp)
 +            return;
 +        initializedForNonFrameworkApp = true;
 +
 +        if (getLocales().length > 0)
 +            return;
 +        
- 		COMPILE::AS3
++		COMPILE::SWF
 +		{
 +	        var applicationDomain:DefinitionManager =
 +	            new DefinitionManager(ApplicationDomain.currentDomain);
 +		}
 +		COMPILE::JS
 +		{
 +			var applicationDomain:DefinitionManager =
 +				new DefinitionManager();			
 +		}
 +		
 +        if (!applicationDomain.hasDefinition("_CompiledResourceBundleInfo"))
 +            return;
 +        var c:Class = Class(applicationDomain.getDefinition(
 +                                "_CompiledResourceBundleInfo"));
 +
 +        var locales:Array /* of String */ = c["compiledLocales"];
 +        var bundleNames:Array /* of String */ = c["compiledResourceBundleNames"];
 +
 +        installCompiledResourceBundles(
 +            applicationDomain, locales, bundleNames);
 +
 +        localeChain = locales;
 +    }
 +    
 +    /**
 +     *  @private
 +     */  
 +    private function getSystemPreferredLocales():Array /* of String */
 +    {
 +        return I18NManager.languages;
 +    }
 +    
 +    /**
 +     *  @private.
 +     */
 +    private function dumpResourceModule(resourceModule:*):void
 +    {
 +        for each (var bundle:ResourceBundle in resourceModule.resourceBundles)
 +        {
 +            trace(bundle.locale, bundle.bundleName);
 +            for (var p:String in bundle.content)
 +            {
 +                //trace(p, bundle.getObject(p));
 +            }
 +        }
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function enterFrameHandler():void
 +    {
 +        if (SystemManagerGlobals.topLevelSystemManagers.length)
 +        {
 +            if (SystemManagerGlobals.topLevelSystemManagers[0].currentFrame == 2)
 +            {
 +				inFrame1 = false;
 +            }
 +            else
 +			{
 +				var topSM:UIBase = SystemManagerGlobals.topLevelSystemManagers[0] as UIBase;
 +				if (topSM.getBeadByType(CallLaterBead) == null)
 +					topSM.addBead(new CallLaterBead());
 +				var clb:CallLaterBead = topSM.getBeadByType(CallLaterBead) as CallLaterBead;
 +				clb.callLater(enterFrameHandler, null, this);
 +                return;
 +			}
 +        }
 +        
 +        var info:Object = SystemManagerGlobals.info;
 +        if (info)
 +            processInfo(info, false);
 +    }
 +}
 +
 +}
 +
 +COMPILE::LATER
 +{
 +import flash.events.EventDispatcher;
 +import mx.events.ModuleEvent;
 +import mx.events.ResourceEvent;
 +import mx.modules.IModuleInfo;
 +import mx.resources.IResourceModule;
 +}
 +import mx.resources.IResourceBundle;
 +	
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: ResourceModuleInfo
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/**
 + *  @private
 + */
 +COMPILE::LATER
 +class ResourceModuleInfo
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function ResourceModuleInfo(moduleInfo:IModuleInfo,
 +                                       readyHandler:Function,
 +                                       errorHandler:Function)
 +    {
 +        super();
 +
 +        this.moduleInfo = moduleInfo;
 +        this.readyHandler = readyHandler;
 +        this.errorHandler = errorHandler;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  errorHandler
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var errorHandler:Function;
 +    
 +    //----------------------------------
 +    //  moduleInfo
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var moduleInfo:IModuleInfo
 +    
 +    //----------------------------------
 +    //  readyHandler
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var readyHandler:Function;
 +    
 +    //----------------------------------
 +    //  resourceModule
 +    //----------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    public var resourceModule:IResourceModule;
 +}
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: ResourceEventDispatcher
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/**
 + *  @private
 + */
 +COMPILE::LATER
 +class ResourceEventDispatcher extends EventDispatcher
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function ResourceEventDispatcher(moduleInfo:IModuleInfo)
 +    {
 +        super();
 +
 +        moduleInfo.addEventListener(
 +            ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
 +
 +        moduleInfo.addEventListener(
 +            ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
 +        
 +        moduleInfo.addEventListener(
 +            ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Event handlers
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    private function moduleInfo_errorHandler(event:ModuleEvent):void
 +    {
 +        var resourceEvent:ResourceEvent = new ResourceEvent(
 +            ResourceEvent.ERROR, event.bubbles, event.cancelable);
 +        resourceEvent.bytesLoaded = event.bytesLoaded;
 +        resourceEvent.bytesTotal = event.bytesTotal;
 +        resourceEvent.errorText = event.errorText;
 +        dispatchEvent(resourceEvent);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function moduleInfo_progressHandler(event:ModuleEvent):void
 +    {
 +        var resourceEvent:ResourceEvent = new ResourceEvent(
 +            ResourceEvent.PROGRESS, event.bubbles, event.cancelable);
 +        resourceEvent.bytesLoaded = event.bytesLoaded;
 +        resourceEvent.bytesTotal = event.bytesTotal;
 +        dispatchEvent(resourceEvent);
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    private function moduleInfo_readyHandler(event:ModuleEvent):void
 +    {
 +        var resourceEvent:ResourceEvent =
 +            new ResourceEvent(ResourceEvent.COMPLETE);
 +        dispatchEvent(resourceEvent);
 +    }
 +}
 +
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  Helper class: ResourceBundleProxy
 +//
 +////////////////////////////////////////////////////////////////////////////////
 +
 +/**
 + *  @private
 + */
 +class ResourceBundleProxy implements IResourceBundle
 +{
 +	public var bundleClass:Class;
 +	public var useWeakReference:Boolean;
 +	
 +	private var _bundleName:String;
 +	private var _locale:String;
 + 
 +    public function ResourceBundleProxy()
 +	{
 +	}
 +       
 +	public function get bundleName():String {
 +		return _bundleName;
 +	}
 +	
 +	public function set bundleName(value:String):void {
 +		_bundleName = value;
 +	}
 +       
 +    public function get content():Object {
 +    	return null;
 +    }
 +        
 +	public function get locale():String {
 +		return _locale;
 +	}
 +	
 +	public function set locale(value:String):void {
 +		_locale = value;
 +	}
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/states/AddChild.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/states/AddChild.as
index 68b17a6,0000000..07c9418
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/states/AddChild.as
+++ b/frameworks/projects/MX/src/main/flex/mx/states/AddChild.as
@@@ -1,536 -1,0 +1,536 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.states
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;		
 +}
 +import mx.core.ContainerCreationPolicy;
 +import mx.core.IDeferredInstance;
 +import mx.core.mx_internal;
 +import mx.core.UIComponent;
 +import mx.resources.IResourceManager;
 +import mx.resources.ResourceManager;
 +
 +use namespace mx_internal;
 +
 +[DefaultProperty("targetFactory")]
 +
 +[ResourceBundle("states")]
 +    
 +/**
 + *  The AddChild class adds a child display object, such as a component, 
 + *  to a container as part of a view state. 
 + *  You use this class in the <code>overrides</code> property of the State class.
 + *  Use the <code>creationPolicy</code> property to specify to create the child 
 + *  at application startup or when you change to a view state. 
 + *  
 + *  <p>The child does not dispatch the <code>creationComplete</code> event until 
 + *  it is added to a container. For example, the following code adds a 
 + *  Button control as part of a view state change:</p>
 + * 
 + *  <pre>
 + *  &lt;mx:AddChild relativeTo="{v1}"&gt;
 + *      &lt;mx:Button id="b0" label="New Button"/&gt;
 + *  &lt;/mx:AddChild&gt; </pre>
 + *
 + *  <p>In the previous example, the Button control does not dispatch 
 + *  the <code>creationComplete</code> event until you change state and the 
 + *  Button control is added to a container. 
 + *  If the AddChild class defines both the Button and a container, such as a Canvas container, 
 + *  then the Button control dispatches the creationComplete event when it is created. 
 + *  For example, if the <code>creationPolicy</code> property is set to <code>all</code>, 
 + *  the Button control dispatches the event at application startup. 
 + *  If the <code>creationPolicy</code> property is set to <code>auto</code>,
 + *  the Button control dispatches the event when you change to the view state. </p>
 + *
 + *  @mxml
 + *
 + *  <p>The <code>&lt;mx:AddChild&gt;</code> tag
 + *  has the following attributes:</p>
 + *  
 + *  <pre>
 + *  &lt;mx:AddChild
 + *  <b>Properties</b>
 + *  target="null"
 + *  targetFactory="null"
 + *  creationPolicy="auto"
 + *  position="lastChild"
 + *  relativeTo="<i>parent of the State object</i>"
 + *  /&gt;
 + *  </pre>
 + *
 + *  @see mx.states.State
 + *  @see mx.states.RemoveChild
 + *  @see mx.states.Transition 
 + *  @see mx.effects.AddChildAction
 + *
 + *  @includeExample examples/StatesExample.mxml
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 + public class AddChild extends OverrideBase 
 +{
 +    include "../core/Version.as";
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Constructor
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @param relativeTo The component relative to which child is added.
 +     *
 +     *  @param target The child object.
 +     *  All Flex components are subclasses of the DisplayObject class.
 +     *
 +     *  @param position the location in the display list of the <code>target</code>
 +     *  relative to the <code>relativeTo</code> component. Must be one of the following:
 +     *  "firstChild", "lastChild", "before" or "after".
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function AddChild(relativeTo:UIComponent = null,
 +                             target:DisplayObject = null,
 +                             position:String = "lastChild")
 +    {
 +        super();
 +
 +        this.relativeTo = relativeTo;
 +        this.target = target;
 +        this.position = position;
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Variables
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var added:Boolean = false;
 +
 +    /**
 +     *  @private
 +     */
 +    mx_internal var instanceCreated:Boolean = false;
 +
 +    /**
 +     *  @private
 +     *  Used for accessing localized Error messages.
 +     */
 +    private var resourceManager:IResourceManager =
 +                                    ResourceManager.getInstance();
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //------------------------------------
 +    //  creationPolicy
 +    //------------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the creationPolicy property.
 +     */
 +    private var _creationPolicy:String = ContainerCreationPolicy.AUTO;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The creation policy for this child.
 +     *  This property determines when the <code>targetFactory</code> will create 
 +     *  the instance of the child.
 +     *  Flex uses this properthy only if you specify a <code>targetFactory</code> property.
 +     *  The following values are valid:
 +     * 
 +     *  <p></p>
 +     * <table class="innertable">
 +     *     <tr><th>Value</th><th>Meaning</th></tr>
 +     *     <tr><td><code>auto</code></td><td>(default)Create the instance the 
 +     *         first time it is needed.</td></tr>
 +     *     <tr><td><code>all</code></td><td>Create the instance when the 
 +     *         application started up.</td></tr>
 +     *     <tr><td><code>none</code></td><td>Do not automatically create the instance. 
 +     *         You must call the <code>createInstance()</code> method to create 
 +     *         the instance.</td></tr>
 +     * </table>
 +     *
 +     *  @default "auto"
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get creationPolicy():String
 +    {
 +        return _creationPolicy;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set creationPolicy(value:String):void
 +    {
 +        _creationPolicy = value;
 +
 +        if (_creationPolicy == ContainerCreationPolicy.ALL)
 +            createInstance();
 +    }
 +
 +    //------------------------------------
 +    //  position
 +    //------------------------------------
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The position of the child in the display list, relative to the
 +     *  object specified by the <code>relativeTo</code> property.
 +     *  Valid values are <code>"before"</code>, <code>"after"</code>, 
 +     *  <code>"firstChild"</code>, and <code>"lastChild"</code>.
 +     *
 +     *  @default "lastChild"
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var position:String;
 +
 +    //------------------------------------
 +    //  relativeTo
 +    //------------------------------------
 +    
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *  The object relative to which the child is added. This property is used
 +     *  in conjunction with the <code>position</code> property. 
 +     *  This property is optional; if
 +     *  you omit it, Flex uses the immediate parent of the <code>State</code>
 +     *  object, that is, the component that has the <code>states</code>
 +     *  property, or <code>&lt;mx:states&gt;</code>tag that specifies the State
 +     *  object.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public var relativeTo:Object;
 +
 +    //------------------------------------
 +    //  target
 +    //------------------------------------
 +
 +    /**
 +     *  @private
 +     *  Storage for the target property
 +     */
 +    private var _target:DisplayObject;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *
 +     *  The child to be added.
 +     *  If you set this property, the child instance is created at app startup.
 +     *  Setting this property is equivalent to setting a <code>targetFactory</code>
 +     *  property with a <code>creationPolicy</code> of <code>"all"</code>.
 +     *
 +     *  <p>Do not set this property if you set the <code>targetFactory</code>
 +     *  property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get target():DisplayObject
 +    {
 +        if (!_target && creationPolicy != ContainerCreationPolicy.NONE)
 +            createInstance();
 +
 +        return _target;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set target(value:DisplayObject):void
 +    {
 +        _target = value;
 +    }
 +
 +    //------------------------------------
 +    //  targetFactory
 +    //------------------------------------
 +    
 +    /**
 +     *  @private
 +     *  Storage for the targetFactory property.
 +     */
 +    private var _targetFactory:IDeferredInstance;
 +
 +    [Inspectable(category="General")]
 +
 +    /**
 +     *
 +     * The factory that creates the child. You can specify either of the following items:
 +     *  <ul>
 +     *      <li>A factory class that implements the IDeferredInstance
 +     *          interface and creates the child instance or instances.
 +     *      </li>
 +     *      <li>A Flex component, (that is, any class that is a subclass
 +     *          of the UIComponent class), such as the Button contol.
 +     *          If you use a Flex component, the Flex compiler automatically
 +     *          wraps the component in a factory class.
 +     *      </li>
 +     *  </ul>
 +     *
 +     *  <p>If you set this property, the child is instantiated at the time
 +     *  determined by the <code>creationPolicy</code> property.</p>
 +     *  
 +     *  <p>Do not set this property if you set the <code>target</code>
 +     *  property.
 +     *  This propety is the <code>AddChild</code> class default property.
 +     *  Setting this property with a <code>creationPolicy</code> of "all"
 +     *  is equivalent to setting a <code>target</code> property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function get targetFactory():IDeferredInstance
 +    {
 +        return _targetFactory;
 +    }
 +
 +    /**
 +     *  @private
 +     */
 +    public function set targetFactory(value:IDeferredInstance):void
 +    {
 +        _targetFactory = value;
 +
 +        if (creationPolicy == ContainerCreationPolicy.ALL)
 +            createInstance();
 +    }
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Creates the child instance from the factory.
 +     *  You must use this method only if you specify a <code>targetFactory</code>
 +     *  property and a <code>creationPolicy</code> value of <code>"none"</code>.
 +     *  Flex automatically calls this method if the <code>creationPolicy</code>
 +     *  property value is <code>"auto"</code> or <code>"all"</code>.
 +     *  If you call this method multiple times, the child instance is
 +     *  created only on the first call.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    public function createInstance():void
 +    {
 +        if (!instanceCreated && !_target && targetFactory)
 +        {
 +            instanceCreated = true;
 +            var instance:Object = targetFactory.getInstance();
 +            if (instance is DisplayObject)
 +                _target = DisplayObject(instance);
 +        }
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function initialize():void
 +    {
 +        if (creationPolicy == ContainerCreationPolicy.AUTO)
 +            createInstance();
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function apply(parent:UIComponent):void
 +    {
 +        var obj:* = getOverrideContext(relativeTo, parent);
 +
 +        parentContext = parent;
 +        added = false;
 +        
 +        // Early exit if child is null or not a valid container.
 +        if (!target || !(obj is DisplayObjectContainer))
 +        {
 +            if (relativeTo != null && !applied)
 +            {
 +                // Our destination context is unavailable so we attempt to register
 +                // a listener on our parent document to detect when/if it becomes
 +                // valid.
 +                addContextListener(relativeTo);
 +            }
 +            applied = true;
 +            return;
 +        }
 +
 +        applied = true;
 +        relativeTo = obj;
 +        
 +        // Can't reparent. Must remove before adding.
 +        if (target.parent)
 +        {
 +            var message:String = resourceManager.getString(
 +                "states", "alreadyParented");
 +            throw new Error(message);
 +            return;
 +        }
 +
 +        switch (position)
 +        {
 +            case "before":
 +            {
 +                obj.parent.addChildAt(target,
 +                    obj.parent.getChildIndex(obj));
 +                break;
 +            }
 +
 +            case "after":
 +            {
 +                obj.parent.addChildAt(target,
 +                    obj.parent.getChildIndex(obj) + 1);
 +                break;
 +            }
 +
 +            case "firstChild":
 +            {
 +                obj.addChildAt(target, 0);
 +                break;
 +            }
 +
 +            case "lastChild":
 +            default:
 +            {
 +                obj.addChild(target);
 +                break;
 +            }
 +        }
 +
 +        added = true;
 +    }
 +
 +    /**
 +     *  @inheritDoc
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    override public function remove(parent:UIComponent):void
 +    {
 +        var obj:* = getOverrideContext(relativeTo, parent);
 +                
 +        if (!added || !(obj is DisplayObjectContainer))
 +        {
 +            if (obj == null)
 +            {
 +                // It seems our override is no longer active, but we were never
 +                // able to successfully apply ourselves, so remove our context
 +                // listener if applicable.
 +                removeContextListener();
 +                applied = false;
 +                parentContext = null;
 +            }
 +            return;
 +        }
 +
 +        switch (position)
 +        {
 +            case "before":
 +            case "after":
 +            {
 +                obj.parent.removeChild(target);
 +                break;
 +            }
 +
 +            case "firstChild":
 +            case "lastChild":
 +            default:
 +            {
 +                if (obj == target.parent)
 +                {
 +                    obj.removeChild(target);
 +                }
 +                break;
 +            }
 +        }
 +
 +        // Clear our flags and override context.
 +        added = false;
 +        applied = false;
 +        parentContext = null;
 +    }
 +}
 +
 +}


[09/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - didn't mean to commit this file

Posted by ah...@apache.org.
didn't mean to commit this file


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

Branch: refs/heads/spark
Commit: dfd4704f38b7ba3f3ff423434c102ad4af73087b
Parents: 4018788
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jun 9 13:10:45 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Jun 9 13:26:27 2016 -0700

----------------------------------------------------------------------
 frameworks/projects/HTML/readpom.xml | 26 --------------------------
 1 file changed, 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dfd4704f/frameworks/projects/HTML/readpom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/readpom.xml b/frameworks/projects/HTML/readpom.xml
deleted file mode 100644
index 5311d47..0000000
--- a/frameworks/projects/HTML/readpom.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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="readpom" default="main" basedir=".">
-
-     <xmlproperty file="pom.xml" collapseattributes="true"/>
-     <echoproperties />
-</project>


[42/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge branch 'develop' into spark

Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
index e234b3d,0000000..215c9de
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
@@@ -1,574 -1,0 +1,574 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.display.DisplayObjectContainer;
 +//	import flash.display.Sprite;
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.display.DisplayObjectContainer;
 +}
 +import flex.display.Sprite;
 +import mx.managers.ISystemManager;
 +
 +/**
 + *  The IUIComponent interface defines the basic set of APIs
 + *  that you must implement to create a child of a Flex container or list.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IUIComponent extends IFlexDisplayObject
 +{
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Properties
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    //----------------------------------
 +    //  baselinePosition
 +    //----------------------------------
 +
 +    /**
 +     *  The y-coordinate of the baseline
 +     *  of the first line of text of the component.
 +     * 
 +     *  <p>This property is used to implement
 +     *  the <code>baseline</code> constraint style.
 +     *  It is also used to align the label of a FormItem
 +     *  with the controls in the FormItem.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get baselinePosition():Number;
 +
 +    
 +    //----------------------------------
 +    //  document
 +    //----------------------------------
 +
 +    /**
 +     *  A reference to the document object associated with this component. 
 +     *  A document object is an Object at the top of the hierarchy
 +     *  of a Flex application, MXML component, or ActionScript component.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get document():Object
 +
 +    /**
 +     *  @private
 +     */
 +    function set document(value:Object):void
 +
 +    //----------------------------------
 +    //  enabled
 +    //----------------------------------
 +
 +    /**
 +     *  Whether the component can accept user interaction. After setting the <code>enabled</code>
 +     *  property to <code>false</code>, some components still respond to mouse interactions such 
 +     *  as mouseOver. As a result, to fully disable UIComponents,
 +     *  you should also set the value of the <code>mouseEnabled</code> property to <code>false</code>.
 +     *  If you set the <code>enabled</code> property to <code>false</code>
 +     *  for a container, Flex dims the color of the container and of all
 +     *  of its children, and blocks user input to the container
 +     *  and to all of its children.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get enabled():Boolean;
 +
 +    /**
 +     *  @private
 +     */
 +    function set enabled(value:Boolean):void;
 +
 +    //----------------------------------
 +    //  explicitHeight
 +    //----------------------------------
 +
 +    /**
 +     *  The explicitly specified height for the component, 
 +     *  in pixels, as the component's coordinates.
 +     *  If no height is explicitly specified, the value is <code>NaN</code>.
 +     *
 +     *  @see mx.core.UIComponent#explicitHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get explicitHeight():Number;
 +
 +    /**
 +     *  @private
 +     */
 +    function set explicitHeight(value:Number):void;
 +
 +    //----------------------------------
 +    //  explicitMaxHeight
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the maximum height of the component, 
 +     *  in pixels, as the component's coordinates. 
 +     *
 +     *  @see mx.core.UIComponent#explicitMaxHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get explicitMaxHeight():Number;
 +
 +    //----------------------------------
 +    //  explicitMaxWidth
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the maximum width of the component, 
 +     *  in pixels, as the component's coordinates. 
 +     *
 +     *  @see mx.core.UIComponent#explicitMaxWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get explicitMaxWidth():Number;
 +
 +    //----------------------------------
 +    //  explicitMinHeight
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the minimum height of the component, 
 +     *  in pixels, as the component's coordinates. 
 +     *
 +     *  @see mx.core.UIComponent#explicitMinHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get explicitMinHeight():Number;
 +
 +    //----------------------------------
 +    //  explicitMinWidth
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the minimum width of the component, 
 +     *  in pixels, as the component's coordinates. 
 +     *
 +     *  @see mx.core.UIComponent#explicitMinWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get explicitMinWidth():Number;
 +
 +    //----------------------------------
 +    //  explicitWidth
 +    //----------------------------------
 +
 +    /**
 +     *  The explicitly specified width for the component, 
 +     *  in pixels, as the component's coordinates.
 +     *  If no width is explicitly specified, the value is <code>NaN</code>.
 +     *
 +     *  @see mx.core.UIComponent#explicitWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get explicitWidth():Number;
 +
 +    /**
 +     *  @private
 +     */
 +    function set explicitWidth(value:Number):void;
 +    
 +    //----------------------------------
 +    //  focusPane
 +    //----------------------------------
 +
 +    /**
 +     *  A single Sprite object that is shared among components
 +     *  and used as an overlay for drawing the focus indicator.
 +     *  Components share this object if their parent is a focused component,
 +     *  not if the component implements the IFocusManagerComponent interface.
 +     *
 +     *  @see mx.core.UIComponent#focusPane
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get focusPane():Sprite;
 +
 +    /**
 +     *  @private
 +     */
 +    function set focusPane(value:Sprite):void;
 +
 +    //----------------------------------
 +    //  includeInLayout
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#includeInLayout
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get includeInLayout():Boolean;
 +
 +    /**
 +     *  @private
 +     */
 +    function set includeInLayout(value:Boolean):void;
 +
 +    //----------------------------------
 +    //  isPopUp
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#isPopUp
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get isPopUp():Boolean;
 +
 +    /**
 +     *  @private
 +     */
 +    function set isPopUp(value:Boolean):void;
 +
 +    //----------------------------------
 +    //  maxHeight
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the maximum height of the component, 
 +     *  in pixels, as the component's coordinates.
 +     *
 +     *  @see mx.core.UIComponent#maxHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get maxHeight():Number;
 +
 +    //----------------------------------
 +    //  maxWidth
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the maximum width of the component, 
 +     *  in pixels, as the component's coordinates.
 +     *
 +     *  @see mx.core.UIComponent#maxWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get maxWidth():Number;
 +
 +    //----------------------------------
 +    //  measuredMinHeight
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#measuredMinHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get measuredMinHeight():Number;
 +
 +    /**
 +     *  @private
 +     */
 +    function set measuredMinHeight(value:Number):void;
 +
 +    //----------------------------------
 +    //  measuredMinWidth
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.UIComponent#measuredMinWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get measuredMinWidth():Number;
 +
 +    /**
 +     *  @private
 +     */
 +    function set measuredMinWidth(value:Number):void;
 +
 +    //----------------------------------
 +    //  minHeight
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the minimum height of the component, 
 +     *  in pixels, as the component's coordinates. 
 +     *
 +     *  @see mx.core.UIComponent#minHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get minHeight():Number;
 +
 +    //----------------------------------
 +    //  minWidth
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the minimum width of the component, 
 +     *  in pixels, as the component's coordinates. 
 +     *
 +     *  @see mx.core.UIComponent#minWidth
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get minWidth():Number;
 +
 +    //----------------------------------
 +    //  owner
 +    //----------------------------------
 +
 +    /**
 +     *  @copy mx.core.IVisualElement#owner
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get owner():DisplayObjectContainer;
 +
 +    /**
 +     *  @private
 +     */
 +    function set owner(value:DisplayObjectContainer):void;
 +
 +    //----------------------------------
 +    //  percentHeight
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the height of a component as a 
 +     *  percentage of its parent's size.
 +     *  Allowed values are 0 to 100.     
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get percentHeight():Number;
 +
 +    /**
 +     *  @private
 +     */
 +    function set percentHeight(value:Number):void;
 +
 +    //----------------------------------
 +    //  percentWidth
 +    //----------------------------------
 +
 +    /**
 +     *  Number that specifies the width of a component as a 
 +     *  percentage of its parent's size.
 +     *  Allowed values are 0 to 100.     
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get percentWidth():Number;
 +
 +    /**
 +     *  @private
 +     */
 +    function set percentWidth(value:Number):void;
 +
 +    //----------------------------------
 +    //  systemManager
 +    //----------------------------------
 +
 +    /**
 +     *  A reference to the SystemManager object for this component.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get systemManager():ISystemManager;
 +
 +    /**
 +     *  @private
 +     */
 +    function set systemManager(value:ISystemManager):void;
 +    
 +    //----------------------------------
 +    //  tweeningProperties
 +    //----------------------------------
 +
 +    /**
 +     *  Used by EffectManager.
 +     *  Returns non-null if a component
 +     *  is not using the EffectManager to execute a Tween.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get tweeningProperties():Array;
 +
 +    /**
 +     *  @private
 +     */
 +    function set tweeningProperties(value:Array):void;
 +
 +    //--------------------------------------------------------------------------
 +    //
 +    //  Methods
 +    //
 +    //--------------------------------------------------------------------------
 +
 +    /**
 +     *  Initialize the object.
 +     *
 +     *  @see mx.core.UIComponent#initialize()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function initialize():void;
 +    
 +    /**
 +     *  @copy mx.core.UIComponent#parentChanged()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function parentChanged(p:DisplayObjectContainer):void;
 +    
 +    /**
 +     *  @copy mx.core.UIComponent#getExplicitOrMeasuredWidth()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getExplicitOrMeasuredWidth():Number;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#getExplicitOrMeasuredHeight()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getExplicitOrMeasuredHeight():Number;
 +    
 +    /**
 +     *  @copy mx.core.UIComponent#setVisible() 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function setVisible(value:Boolean, noEvent:Boolean = false):void;
 +
 +    /**
 +     *  @copy mx.core.UIComponent#owns() 
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function owns(displayObject:DisplayObject):Boolean;
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
index e1a2735,0000000..f8f7b75
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
@@@ -1,165 -1,0 +1,165 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObject;
 +	import flash.geom.Rectangle;
 +	import flash.text.StyleSheet;
 +	import flash.text.TextFormat;
 +	import flash.text.TextLineMetrics;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObject;
 +	import flex.text.TextFormat;
 +	import flex.text.TextLineMetrics;		
 +	import org.apache.flex.geom.Rectangle;
 +}
 +import mx.managers.IToolTipManagerClient;
 +import mx.styles.ISimpleStyleClient;
 +
 +/**
 + *  The IUITextField interface defines the basic set of APIs
 + *  for UITextField instances.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 9
 + *  @playerversion AIR 1.1
 + *  @productversion Flex 3
 + */
 +public interface IUITextField extends IIMESupport,
 +                         IFlexModule,
 +                         IInvalidating, ISimpleStyleClient,
 +                         IToolTipManagerClient, IUIComponent
 +{
 +
 +	include "ITextFieldInterface.as"
 +	include "IInteractiveObjectInterface.as"
 +
 +    /**
 +     *  @copy mx.core.UITextField#ignorePadding
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get ignorePadding():Boolean;
 +    function set ignorePadding(value:Boolean):void;
 +
 +    /**
 +     *  @copy mx.core.UITextField#inheritingStyles
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get inheritingStyles():Object;
 +    function set inheritingStyles(value:Object):void;
 +
 +    /**
 +     *  @copy mx.core.UITextField#nestLevel
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get nestLevel():int;
 +    function set nestLevel(value:int):void;
 +
 +    /**
 +     *  @copy mx.core.UITextField#nonInheritingStyles
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get nonInheritingStyles():Object;
 +    function set nonInheritingStyles(value:Object):void;
 +
 +    /**
 +     *  @copy mx.core.UITextField#nonZeroTextHeight
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function get nonZeroTextHeight():Number;
 +
 +    /**
 +     *  @copy mx.core.UITextField#getStyle()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getStyle(styleProp:String):*;
 +
 +    /**
 +     *  @copy mx.core.UITextField#getUITextFormat()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function getUITextFormat():UITextFormat
 +
 +    /**
 +     *  @copy mx.core.UITextField#setColor()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function setColor(color:uint):void;
 +
 +    /**
 +     *  @copy mx.core.UITextField#setFocus()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function setFocus():void;
 +
 +    /**
 +     *  @copy mx.core.UITextField#truncateToFit()
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 9
 +     *  @playerversion AIR 1.1
 +     *  @productversion Flex 3
 +     */
 +    function truncateToFit(truncationIndicator:String = null):Boolean;
 +
 +}
 +
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
index 065f15f,0000000..407d254
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
@@@ -1,294 -1,0 +1,294 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.display.DisplayObjectContainer;		
 +}
 +COMPILE::JS
 +{
 +	import flex.display.DisplayObjectContainer;		
 +}
 +COMPILE::LATER
 +{
 +import mx.geom.TransformOffsets;
 +}
 +
 +/**
 + *  The IVisualElement interface defines the minimum properties and methods 
 + *  required for a visual element to be laid out and displayed in a Spark container.
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 1.5
 + *  @productversion Flex 4
 + */
 +public interface IVisualElement extends ILayoutElement, ILayoutDirectionElement
 +{
 +
 +    /**
 +     *  The owner of this IVisualElement object. 
 +     *  By default, it is the parent of this IVisualElement object.
 +     *  However, if this IVisualElement object is a child component that is
 +     *  popped up by its parent, such as the drop-down list of a ComboBox control,
 +     *  the owner is the component that popped up this IVisualElement object.
 +     *
 +     *  <p>This property is not managed by Flex, but by each component.
 +     *  Therefore, if you use the <code>PopUpManger.createPopUp()</code> or
 +     *  <code>PopUpManger.addPopUp()</code> method to pop up a child component,
 +     *  you should set the <code>owner</code> property of the child component
 +     *  to the component that popped it up.</p>
 +     *
 +     *  <p>The default value is the value of the <code>parent</code> property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get owner():DisplayObjectContainer;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set owner(value:DisplayObjectContainer):void;
 +    
 +    /**
 +     *  The parent container or component for this component.
 +     *  Only visual elements should have a <code>parent</code> property.
 +     *  Non-visual items should use another property to reference
 +     *  the object to which they belong.
 +     *  By convention, non-visual objects use an <code>owner</code>
 +     *  property to reference the object to which they belong.
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get parent():DisplayObjectContainer;
 +    
 +    /**
 +     *  Determines the order in which items inside of containers
 +     *  are rendered. 
 +     *  Spark containers order their items based on their 
 +     *  <code>depth</code> property, with the lowest depth in the back, 
 +     *  and the higher in the front.  
 +     *  Items with the same depth value appear in the order
 +     *  they are added to the container.
 +     * 
 +     *  @default 0
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get depth():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set depth(value:Number):void;
 +
 +    /**
 +     *  Controls the visibility of this visual element. 
 +     *  If <code>true</code>, the object is visible.
 +     * 
 +     *  <p>If an object is not visible, but the <code>includeInLayout</code> 
 +     *  property is set to <code>true</code>, then the object 
 +     *  takes up space in the container, but is invisible.</p>
 +     * 
 +     *  <p>If <code>visible</code> is set to <code>true</code>, the object may not
 +     *  necessarily be visible due to its size and whether container clipping 
 +     *  is enabled.</p>
 +     * 
 +     *  <p>Setting <code>visible</code> to <code>false</code>, 
 +     *  prevents the component from getting focus.</p>
 +     * 
 +     *  @default true
 +     *  @see ILayoutElement#includeInLayout
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get visible():Boolean;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set visible(value:Boolean):void;
 +    
 +    /**
 +     *  @copy flash.display.DisplayObject#alpha
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get alpha():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set alpha(value:Number):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#width
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get width():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set width(value:Number):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#height
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get height():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set height(value:Number):void;
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#x
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get x():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set x(value:Number):void;
 +
 +
 +    /**
 +     *  @copy flash.display.DisplayObject#y
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get y():Number;
 +    
 +    /**
 +     *  @private
 +     */
 +    function set y(value:Number):void;
 +    
 +    /**
 +     *  Specifies the optional DesignLayer instance associated with this visual 
 +     *  element.  
 +     *
 +     *  <p>When a DesignLayer is assigned, a visual element must consider the  
 +     *  visibility and alpha of its parent layer when ultimately committing its  
 +     *  own effective visibility or alpha to its backing DisplayObject 
 +     *  (if applicable).</p>
 +     *
 +     *  <p>A visual element must listen for <code>layerPropertyChange</code>
 +     *  notifications from the associated layer parent.  When the 
 +     *  <code>effectiveAlpha</code> or <code>effectiveVisibility</code> of the 
 +     *  layer changes, the element must then compute its own effective visibility 
 +     *  (or alpha) and apply it accordingly.</p>
 +     *
 +     *  <p>This property should not be set within MXML directly.</p>
 +     *  
 +     *  <p>The <code>designLayer</code> property is not used for z-order control, 
 +     *  please see <code>depth</code>.</p>
 +     *
 +     *  @see #depth
 +     *  @default null
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +	COMPILE::LATER
 +    function get designLayer():DesignLayer;
 +    
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    function set designLayer(value:DesignLayer):void;
 +
 +    /**
 +     *  Defines a set of adjustments that can be applied to the object's 
 +     *  transform in a way that is invisible to its parent's layout. 
 +     *  
 +     *  <p>For example, if you want a layout to adjust for an object 
 +     *  that is rotated 90 degrees, set the object's 
 +     *  <code>rotation</code> property. If you want the layout to <i>not</i> 
 +     *  adjust for the object being rotated, 
 +     *  set its <code>postLayoutTransformOffsets.rotationZ</code> property.</p>
 +     *  
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +	COMPILE::LATER
 +    function get postLayoutTransformOffsets():TransformOffsets;
 +    
 +    /**
 +     *  @private
 +     */
 +	COMPILE::LATER
 +    function set postLayoutTransformOffsets(value:TransformOffsets):void;
 +	    
 +    /**
 +     *  Contains <code>true</code> when the element is in 3D. 
 +     *  The element can be in 3D either because
 +     *  it has 3D transform properties or it has 3D post layout transform offsets or both.
 +     *
 +     *  @see #postLayoutTransformOffsets
 +     *  @see mx.core.ILayoutElement#hasLayoutMatrix3D
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 1.5
 +     *  @productversion Flex 4
 +     */
 +    function get is3D():Boolean;
 +}
 +}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
index 3b5555c,0000000..ec046b1
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
@@@ -1,193 -1,0 +1,193 @@@
 +////////////////////////////////////////////////////////////////////////////////
 +//
 +//  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 mx.core
 +{
 +COMPILE::LATER
 +{
 +import flash.display.Stage;
 +}
 +
- COMPILE::AS3
++COMPILE::SWF
 +{
 +	import flash.system.Capabilities;
 +	import flash.display.DisplayObject;
 +	import mx.managers.SystemManager;
 +}
 +import org.apache.flex.utils.Display;
 +
 +import mx.core.mx_internal;
 +import mx.utils.Platform;
 +
 +use namespace mx_internal;
 +
 +/**
 + *  The RuntimeDPIProvider class provides the default mapping of
 + *  similar device DPI values into predefined DPI classes.
 + *  An Application may have its runtimeDPIProvider property set to a
 + *  subclass of RuntimeDPIProvider to override Flex's default mappings.
 + *  Overriding Flex's default mappings will cause changes in the Application's
 + *  automatic scaling behavior.
 + * 
 + *  <p>Overriding Flex's default mappings is usually only necessary for devices
 + *  that incorrectly report their screenDPI and for devices that may scale better
 + *  in a different DPI class.</p>
 + * 
 + *  <p>Flex's default mappings are:
 + *     <table class="innertable">
 + *        <tr><td>160 DPI</td><td>&lt;140 DPI</td></tr>
 + *        <tr><td>160 DPI</td><td>&gt;=140 DPI and &lt;=200 DPI</td></tr>
 + *        <tr><td>240 DPI</td><td>&gt;=200 DPI and &lt;=280 DPI</td></tr>
 + *        <tr><td>320 DPI</td><td>&gt;=280 DPI and &lt;=400 DPI</td></tr>
 + *        <tr><td>480 DPI</td><td>&gt;=400 DPI and &lt;=560 DPI</td></tr>
 + *        <tr><td>640 DPI</td><td>&gt;=640 DPI</td></tr>
 + *     </table>
 + *  </p>
 + *
 + *
 + * 
 + *  <p>Subclasses of RuntimeDPIProvider should only depend on runtime APIs
 + *  and should not depend on any classes specific to the Flex framework except
 + *  <code>mx.core.DPIClassification</code>.</p>
 + *  
 + *  @includeExample examples/RuntimeDPIProviderApp.mxml -noswf
 + *  @includeExample examples/RuntimeDPIProviderExample.as -noswf
 + *  @includeExample examples/views/RuntimeDPIProviderAppView.mxml -noswf
 + *  
 + *  @see mx.core.DPIClassification
 + *  @see spark.components.Application#applicationDPI
 + *  
 + *  @langversion 3.0
 + *  @playerversion Flash 10
 + *  @playerversion AIR 2.5
 + *  @productversion Flex 4.5
 + */
 +public class RuntimeDPIProvider
 +{
 +
 +    mx_internal static const IPAD_MAX_EXTENT:int = 1024;
 +    mx_internal static const IPAD_RETINA_MAX_EXTENT: int = 2048;
 +
 +    /**
 +     *  Constructor.
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 2.5
 +     *  @productversion Flex 4.5
 +     */
 +    public function RuntimeDPIProvider()
 +    {
 +    }
 +
 +    /**
 +     *  Returns the runtime DPI of the current device by mapping its
 +     *  <code>flash.system.Capabilities.screenDPI</code> to one of several DPI
 +     *  values in <code>mx.core.DPIClassification</code>.
 +     *
 +     *  A number of devices can have slightly different DPI values and Flex maps these
 +     *  into the several DPI classes.
 +     *
 +     *  Flex uses this method to calculate the current DPI value when an Application
 +     *  authored for a specific DPI is adapted to the current one through scaling.
 +     *
 +     *  <p> Exceptions: </p>
 +     *  <ul>
 +     *      <li>All non-retina iPads  receive 160 DPI </li>
 +     *      <li>All retina iPads  receive 320 DPI </li>
 +     *   </ul>
 +     *
 +     *  @param dpi The DPI value.
 +     *  @return The corresponding <code>DPIClassification</code> value.
 +     *                                                                               isI
 +     *  @see flash.system.Capabilities
 +     *  @see mx.core.DPIClassification
 +     *
 +     *  @langversion 3.0
 +     *  @playerversion Flash 10
 +     *  @playerversion AIR 2.5
 +     *  @productversion Flex 4.5
 +     */
 +
 +    public function get runtimeDPI():Number
 +	{
 +		if (Platform.isIOS) // as isIPad returns false in the simulator
 +		{
 +			var scX:Number = Display.width;
 +			var scY:Number = Display.height;
 +					
- 			COMPILE::AS3
++			COMPILE::SWF
 +			{
 +			// Use the stage width/height only when debugging, because Capabilities reports the computer resolution
 +			if (Capabilities.isDebugger)
 +			{
 +				var root:DisplayObject = SystemManager.getSWFRoot(this);
 +				if (root && root.stage)
 +				{
 +					scX = root.stage.fullScreenWidth;
 +					scY = root.stage.fullScreenHeight;
 +				}
 +			}
 +			}
 +					
 +			/*  as of Dec 2013,  iPad (resp. iPad retina) are the only iOS devices to have 1024 (resp. 2048) screen width or height
 +			cf http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density#Apple
 +			* */
 +			if (scX == IPAD_MAX_EXTENT || scY == IPAD_MAX_EXTENT)
 +				return DPIClassification.DPI_160;
 +			else if ((scX == IPAD_RETINA_MAX_EXTENT || scY == IPAD_RETINA_MAX_EXTENT))
 +				return DPIClassification.DPI_320;
 +		}
 +				
 +		return classifyDPI(Display.dpi);
 +	}
 +    
 +    /**
 +     *  @private
 +     *  Matches the specified DPI to a <code>DPIClassification</code> value.
 +     *  A number of devices can have slightly different DPI values and classifyDPI
 +     *  maps these into the several DPI classes.
 +     * 
 +     *  This method is specifically kept for Design View. Flex uses RuntimeDPIProvider
 +     *  to calculate DPI classes.
 +     *  
 +     *  @param dpi The DPI value.  
 +     *  @return The corresponding <code>DPIClassification</code> value.
 +     */
 +    mx_internal static function classifyDPI(dpi:Number):Number
 +    {
 +		if (dpi <= 140)
 +			return DPIClassification.DPI_120;
 +		
 +        if (dpi <= 200)
 +            return DPIClassification.DPI_160;
 +        
 +        if (dpi <= 280)
 +            return DPIClassification.DPI_240;
 +		
 +		if (dpi <= 400)
 +			return DPIClassification.DPI_320;
 +		
 +		if (dpi <= 560)
 +			return DPIClassification.DPI_480;
 +        
 +        return DPIClassification.DPI_640;
 +    }
 +}
- }
++}


[11/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - change from ViewBase to View

Posted by ah...@apache.org.
change from ViewBase to View


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

Branch: refs/heads/spark
Commit: f7afff2547a0a9b2d702ff962974df93491fe639
Parents: 324ce85
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jun 9 15:56:05 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Jun 9 15:56:05 2016 -0700

----------------------------------------------------------------------
 mustella/tests/basicTests/BasicTests.css  | 2 +-
 mustella/tests/basicTests/BasicTests.mxml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f7afff25/mustella/tests/basicTests/BasicTests.css
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/BasicTests.css b/mustella/tests/basicTests/BasicTests.css
index 2c75af3..7b59f2b 100644
--- a/mustella/tests/basicTests/BasicTests.css
+++ b/mustella/tests/basicTests/BasicTests.css
@@ -34,7 +34,7 @@
     font-size:16px;
 }
 
-mx|ViewBase {
+mx|View {
 /*	background-image: "";
     theme-color:#CC6600;   */
     selection-color:#D0DFE6;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f7afff25/mustella/tests/basicTests/BasicTests.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/BasicTests.mxml b/mustella/tests/basicTests/BasicTests.mxml
index 2f8b636..60eb360 100644
--- a/mustella/tests/basicTests/BasicTests.mxml
+++ b/mustella/tests/basicTests/BasicTests.mxml
@@ -17,7 +17,7 @@
   limitations under the License.
 
 -->
-<js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
     xmlns:js="library://ns.apache.org/flexjs/basic" 
     xmlns:mx="library://ns.adobe.com/flex/mx"
     xmlns:haloviews="halo.views.*"
@@ -208,4 +208,4 @@
         <mx:TextInput id="newStateInput" text="" enter="{currentState=newStateInput.text}" />
     </s:Group>    
     -->    
-</js:ViewBase>
+</js:View>