Handle Viewer connection message failures.

--- src/com/esri/builder/controllers/supportClasses/LocalConnectionDelegate.as
+++ src/com/esri/builder/controllers/supportClasses/LocalConnectionDelegate.as
@@ -16,6 +16,7 @@
 package com.esri.builder.controllers.supportClasses
 {

+import flash.events.StatusEvent;
 import flash.net.LocalConnection;

 import mx.logging.ILogger;
@@ -38,10 +39,22 @@
             }

             m_localConnection = new LocalConnection();
+            m_localConnection.addEventListener(StatusEvent.STATUS, localConnection_statusHandler);
         }
         return m_localConnection;
     }

+    private function localConnection_statusHandler(event:StatusEvent):void
+    {
+        if (event.level == "error")
+        {
+            if (Log.isDebug())
+            {
+                LOG.debug("Call failed: {0}", event.toString());
+            }
+        }
+    }
+
     public function setTitles(title:String, subtitle:String):void
     {
         if (Log.isDebug())
@@ -49,7 +62,23 @@
             LOG.debug("Sending titles changes: title {0} - subtitle {1}", title, subtitle);
         }

-        localConnection.send(CNAME, 'setTitles', title, subtitle);
+        callViewerMethod('setTitles', title, subtitle);
+    }
+
+    private function callViewerMethod(methodName:String, ... values):void
+    {
+        try
+        {
+            //use Function#apply to avoid passing rest argument as Array
+            localConnection.send.apply(null, [ CNAME, methodName ].concat(values));
+        }
+        catch (error:Error)
+        {
+            if (Log.isDebug())
+            {
+                LOG.debug("Call to Viewer method {0} failed: {1}", methodName, error);
+            }
+        }
     }

     public function setLogo(value:String):void
@@ -59,7 +88,7 @@
             LOG.debug("Sending logo changes {0}", value);
         }

-        localConnection.send(CNAME, 'setLogo', value);
+        callViewerMethod('setLogo', value);
     }

     public function setTextColor(value:uint):void
@@ -69,7 +98,7 @@
             LOG.debug("Sending text color changes {0}", value);
         }

-        localConnection.send(CNAME, 'setTextColor', value);
+        callViewerMethod('setTextColor', value);
     }

     public function setBackgroundColor(value:uint):void
@@ -79,7 +108,7 @@
             LOG.debug("Sending background color changes {0}", value);
         }

-        localConnection.send(CNAME, 'setBackgroundColor', value);
+        callViewerMethod('setBackgroundColor', value);
     }

     public function setRolloverColor(value:uint):void
@@ -89,7 +118,7 @@
             LOG.debug("Sending rollover color changes {0}", value);
         }

-        localConnection.send(CNAME, 'setRolloverColor', value);
+        callViewerMethod('setRolloverColor', value);
     }

     public function setSelectionColor(value:uint):void
@@ -99,7 +128,7 @@
             LOG.debug("Sending selection color changes {0}", value);
         }

-        localConnection.send(CNAME, 'setSelectionColor', value);
+        callViewerMethod('setSelectionColor', value);
     }

     public function setTitleColor(value:uint):void
@@ -109,7 +138,7 @@
             LOG.debug("Sending title color changes {0}", value);
         }

-        localConnection.send(CNAME, 'setTitleColor', value);
+        callViewerMethod('setTitleColor', value);
     }

     public function setLocale(localeChain:String):void
@@ -119,7 +148,7 @@
             LOG.debug("Sending locale changes {0}", localeChain);
         }

-        localConnection.send(CNAME, 'setLocale', localeChain);
+        callViewerMethod('setLocale', localeChain);
     }

     public function setFontName(value:String):void
@@ -129,7 +158,7 @@
             LOG.debug("Sending font name changes {0}", value);
         }

-        localConnection.send(CNAME, 'setFontName', value);
+        callViewerMethod('setFontName', value);
     }

     public function setAppTitleFontName(value:String):void
@@ -139,7 +168,7 @@
             LOG.debug("Sending app title font name changes {0}", value);
         }

-        localConnection.send(CNAME, 'setAppTitleFontName', value);
+        callViewerMethod('setAppTitleFontName', value);
     }

     public function setSubTitleFontName(value:String):void
@@ -149,7 +178,7 @@
             LOG.debug("Sending subtitle font name changes {0}", value);
         }

-        localConnection.send(CNAME, 'setSubTitleFontName', value);
+        callViewerMethod('setSubTitleFontName', value);
     }

     public function setAlpha(value:Number):void
@@ -159,7 +188,7 @@
             LOG.debug("Sending alpha changes {0}", value);
         }

-        localConnection.send(CNAME, 'setAlpha', value);
+        callViewerMethod('setAlpha', value);
     }

     public function setPredefinedStyles(value:Object):void
@@ -169,7 +198,7 @@
             LOG.debug("Sending predefined changes {0}", value);
         }

-        localConnection.send(CNAME, 'setPredefinedStyles', value);
+        callViewerMethod('setPredefinedStyles', value);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12787
Author:   mhorn@adobe.com
Date:     2009-12-10T15:41:17.889108Z

Log Message:
-----------
asdoc updates for l10n

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/HueShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLightShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurnShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ExclusionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SaturationShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityShader.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261313 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityShader.as
+++ frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityShader.as
@@ -14,14 +14,14 @@
 import flash.display.Shader;

 /**
- *  The LuminosityShader class creates a blend shader that is equivalent to
+ *  Creates a blend shader that is equivalent to
  *  the 'Luminosity' blend mode for RGB premultiplied colors available
  *  in Adobe Creative Suite tools. This blend mode is not native to Flash,
  *  but is available in tools like Adobe Illustrator and Adobe Photoshop.
  *
- *  The 'luminosity' blend mode can be set on Flex groups and graphic
- *  elements and the visual appearance in tools like Adobe Illustrator and
- *  Adobe Photoshop will be mimicked through this blend shader.
+ *
The 'luminosity' blend mode can be set on Flex groups and graphic
+ *  elements. The visual appearance in tools like Adobe Illustrator and
+ *  Adobe Photoshop will be mimicked through this blend shader.

  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 2695
Author:   egeorgie@adobe.com
Date:     2008-07-31T20:40:32.980238Z

Log Message:
-----------
Add includeInLayout property to GraphicElement.

Reviewed by Ryan.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1285840 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -78,6 +78,41 @@
 	//  IGraphicElement properties
 	//
 	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  includeInLayout
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _includeInLayout:Boolean = true;
+
+	[Bindable("propertyChange")]
+	[Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  Specifies whether this element is included in the layout of the group.
+     *  @default true
+     */
+    public function get includeInLayout():Boolean
+    {
+        return _includeInLayout;
+    }
+
+    public function set includeInLayout(value:Boolean):void
+    {
+        if (_includeInLayout == value)
+            return;
+
+		var oldValue:Boolean = _includeInLayout;
+        _includeInLayout = value;
+		dispatchPropertyChangeEvent("includeInLayout", oldValue, value);
+
+        invalidateParentSizeAndDisplayList();
+        // TODO EGeorgie: if the displayObject is shared, we need to
+        // invalidateDisplayList();
+    }

 	//----------------------------------
 	//  measuredWidth
@@ -1739,14 +1774,6 @@
     }

     /**
-     *  Indicates whether to layout should ignore this item or not.
-     */
-    public function get includeInLayout():Boolean
-    {
-        return true;
-    }
-
-    /**
      *  @return Returns TBounds of the preferred
      *  item size. The preferred size is usually based on the default
      *  item size and any explicit size overrides.


whitespace

whitespace

--- WeaveAPI/src/weave/api/ui/IVisToolWithSelectableAttributes.as
+++ WeaveAPI/src/weave/api/ui/IVisToolWithSelectableAttributes.as
@@ -30,13 +30,13 @@
 		/**
 		 * This function should be defined with override by subclasses.
 		 * @return An Array of names corresponding to the objects returned by getSelectableAttributes().
-		 */
+		 */
 		function getSelectableAttributeNames():Array;

 		/**
 		 * This function should be defined with override by subclasses.
 		 * @return An Array of DynamicColumn and/or ILinkableHashMap objects that an AttributeSelectorPanel can link to.
-		 */
+		 */
 		function getSelectableAttributes():Array;
 	}
 }


Optimized Render2D transformation matrix generation.

--- src/engine/tetragon/view/render2d/display/DisplayObject2D.as
+++ src/engine/tetragon/view/render2d/display/DisplayObject2D.as
@@ -444,18 +444,40 @@
 			if (_orientationChanged)
 			{
 				_orientationChanged = false;
-				_transMatrix.identity();
-
-				if (_scaleX != 1.0 || _scaleY != 1.0) _transMatrix.scale(_scaleX, _scaleY);
-				if (_skewX != 0.0 || _skewY != 0.0) MatrixUtil.skew(_transMatrix, _skewX, _skewY);
-				if (_rotation != 0.0) _transMatrix.rotate(_rotation);
-				if (_x != 0.0 || _y != 0.0) _transMatrix.translate(_x, _y);
-
-				if (_pivotX != 0.0 || _pivotY != 0.0)
+				if (_skewX == 0.0 && _skewY == 0.0)
 				{
-					// prepend pivot transformation
-					_transMatrix.tx = _x - _transMatrix.a * _pivotX - _transMatrix.c * _pivotY;
-					_transMatrix.ty = _y - _transMatrix.b * _pivotX - _transMatrix.d * _pivotY;
+					// optimization: no skewing / rotation simplifies the matrix math:
+					if (_rotation == 0.0)
+					{
+						_transMatrix.setTo(_scaleX, 0.0, 0.0, _scaleY, _x - _pivotX * _scaleX,
+							_y - _pivotY * _scaleY);
+					}
+					else
+					{
+						var cos:Number = Math.cos(_rotation);
+						var sin:Number = Math.sin(_rotation);
+						var a:Number = _scaleX * cos;
+						var b:Number = _scaleX * sin;
+						var c:Number = _scaleY * -sin;
+						var d:Number = _scaleY * cos;
+						var tx:Number = _x - _pivotX * a - _pivotY * c;
+						var ty:Number = _y - _pivotX * b - _pivotY * d;
+						_transMatrix.setTo(a, b, c, d, tx, ty);
+					}
+				}
+				else
+				{
+					_transMatrix.identity();
+					_transMatrix.scale(_scaleX, _scaleY);
+					MatrixUtil.skew(_transMatrix, _skewX, _skewY);
+					_transMatrix.rotate(_rotation);
+					_transMatrix.translate(_x, _y);
+					if (_pivotX != 0.0 || _pivotY != 0.0)
+					{
+						// prepend pivot transformation
+						_transMatrix.tx = _x - _transMatrix.a * _pivotX - _transMatrix.c * _pivotY;
+						_transMatrix.ty = _y - _transMatrix.b * _pivotX - _transMatrix.d * _pivotY;
+					}
 				}
 			}
 			return _transMatrix;


DTNavMeshCreateParams now can be inited from Recast meshes.

--- as3_lib/src/recastnavigation/detour/navmeshbuilder/DTNavMeshCreateParams.as
+++ as3_lib/src/recastnavigation/detour/navmeshbuilder/DTNavMeshCreateParams.as
@@ -2,10 +2,14 @@

 	import recastnavigation.core.RNBase;
 	import recastnavigation.core.rn_internal;
+	import recastnavigation.core.utils.copyBytes;
 	import recastnavigation.core.utils.setBytes;
 	import recastnavigation.internal_api.CModule;
 	import recastnavigation.internal_api.internal_dtAlloc_dtNavMeshCreateParams;
 	import recastnavigation.internal_api.internal_dtFree;
+	import recastnavigation.recast.RCConfig;
+	import recastnavigation.recast.mesh.RCPolyMesh;
+	import recastnavigation.recast.meshdetail.RCPolyMeshDetail;

 	use namespace rn_internal;

@@ -215,6 +219,29 @@
 		public function get buildBvTree():Boolean { return CModule.read8(ptr + OFFSET_BUILD_BV_TREE); }
 		public function set buildBvTree(value:Boolean):void { CModule.write8(ptr + OFFSET_BUILD_BV_TREE, value ? 1 : 0); }

+		public function initFromRecast(cfg:RCConfig, pmesh:RCPolyMesh, dmesh:RCPolyMeshDetail):void {
+
+			CModule.write32(ptr + OFFSET_CS, CModule.read32(cfg.ptr + RCConfig.OFFSET_CS));
+			CModule.write32(ptr + OFFSET_CH, CModule.read32(cfg.ptr + RCConfig.OFFSET_CH));
+
+			CModule.write32(ptr + OFFSET_VERTS, CModule.read32(pmesh.ptr + RCPolyMesh.OFFSET_VERTS));
+			CModule.write32(ptr + OFFSET_VERT_COUNT, CModule.read32(pmesh.ptr + RCPolyMesh.OFFSET_NVERTS));
+			CModule.write32(ptr + OFFSET_POLYS, CModule.read32(pmesh.ptr + RCPolyMesh.OFFSET_POLYS));
+			CModule.write32(ptr + OFFSET_POLY_AREAS, CModule.read32(pmesh.ptr + RCPolyMesh.OFFSET_AREAS));
+			CModule.write32(ptr + OFFSET_POLY_FLAGS, CModule.read32(pmesh.ptr + RCPolyMesh.OFFSET_FLAGS));
+			CModule.write32(ptr + OFFSET_POLY_COUNT, CModule.read32(pmesh.ptr + RCPolyMesh.OFFSET_NPOLYS));
+			CModule.write32(ptr + OFFSET_NVP, CModule.read32(pmesh.ptr + RCPolyMesh.OFFSET_NVP));
+			copyBytes(pmesh.ptr + RCPolyMesh.OFFSET_BMIN, ptr + OFFSET_BMIN, 12);
+			copyBytes(pmesh.ptr + RCPolyMesh.OFFSET_BMAX, ptr + OFFSET_BMAX, 12);
+
+			CModule.write32(ptr + OFFSET_DETAIL_MESHES, CModule.read32(dmesh.ptr + RCPolyMeshDetail.OFFSET_MESHES));
+			CModule.write32(ptr + OFFSET_DETAIL_VERTS, CModule.read32(dmesh.ptr + RCPolyMeshDetail.OFFSET_VERTS));
+			CModule.write32(ptr + OFFSET_DETAIL_VERTS_COUNT, CModule.read32(dmesh.ptr + RCPolyMeshDetail.OFFSET_NVERTS));
+			CModule.write32(ptr + OFFSET_DETAIL_TRIS, CModule.read32(dmesh.ptr + RCPolyMeshDetail.OFFSET_TRIS));
+			CModule.write32(ptr + OFFSET_DETAIL_TRI_COUNT, CModule.read32(dmesh.ptr + RCPolyMeshDetail.OFFSET_NTRIS));
+
+		}
+
 		public override function alloc():void {

 			ptr = internal_dtAlloc_dtNavMeshCreateParams();


Transferred from the Adobe Open Source Subversion Repository

Revision: 3154
Author:   jimurphy@adobe.com
Date:     2008-09-09T13:55:57.617710Z

Log Message:
-----------
Merged 3.0.x revisions [3143-3144 ] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1250047 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -1858,7 +1858,7 @@
             bounds = getBounds(DisplayObject(this));

             var s:Rectangle = screen;
-            var pt:Point = new Point(bounds.x, bounds.y);
+            var pt:Point = new Point(Math.max(0, bounds.x), Math.max(0, bounds.y));
             pt = localToGlobal(pt);
             bounds.x = pt.x;
             bounds.y = pt.y;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262043 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as
+++ frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2006 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.managers.systemClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21119
Author:   chiedozi@adobe.com
Date:     2011-04-21T20:50:44.801666Z

Log Message:
-----------
Refactored the SplashScreen component to increase its extensibility.  Also added an autoAlign mx_internal property that allows iOS devices to turn off the built-in splash screen orientation logic.

QE notes:
Doc notes:
Bugs: SDK-30261
Reviewer: Evtim
Tests run: checkintests-mobile
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/trunk/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264717 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
+++ frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
@@ -13,20 +13,22 @@
 {

 import flash.display.DisplayObject;
-import flash.display.Loader;
 import flash.display.Sprite;
 import flash.display.StageOrientation;
 import flash.events.Event;
 import flash.events.StageOrientationEvent;
 import flash.geom.Matrix;
 import flash.system.Capabilities;
-import flash.system.System;
 import flash.utils.getTimer;

+import mx.core.RuntimeDPIProvider;
+import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.managers.SystemManager;
 import mx.preloaders.IPreloaderDisplay;
 import mx.preloaders.Preloader;
+
+use namespace mx_internal;

 /**
  *  The SplashScreen class is the default preloader for Mobile Flex applications.
@@ -81,20 +83,22 @@
     private var splashImage:DisplayObject;      // The splash image
     private var splashImageWidth:Number;        // original pre-transform width
     private var splashImageHeight:Number;       // original pre-transform height
+    private var SplashImageClass:Class = null;  // The class of the generated splash image

     /**
      *  @private
      *  The resize mode for the splash image
      */
+    private var info:Object = null;             // The systemManager's info object
     private var scaleMode:String = "none";      // One of "none", "stretch", "letterbox" and "zoom".

     /**
      *  @private
      *  Minimum time for the image to be visible
      */
-    private var minimumDisplayTime:Number = 1000;  // in ms
-    private var checkWaitTime:Boolean = false;  // obey minimumDisplayTime only valid if splashImage is valid
-    private var displayTimeStart:int = -1;      // the start time of the image being displayed
+    private var minimumDisplayTime:Number = 1000;   // in ms
+    private var checkWaitTime:Boolean = false;      // obey minimumDisplayTime only valid if splashImage is valid
+    private var displayTimeStart:int = -1;          // the start time of the image being displayed

     //--------------------------------------------------------------------------
     //
@@ -205,6 +209,16 @@
     //--------------------------------------------------------------------------

     //----------------------------------
+    //  autoAlign
+    //----------------------------------
+    /**
+     *  @private
+     *  Flag determines whether the SplashScreen attempts to auto orient the
+     *  splash screen image that is displayed.
+     */
+    mx_internal var autoAlign:Boolean = true;
+
+    //----------------------------------
     //  preloader
     //----------------------------------

@@ -291,39 +305,91 @@
      */
     public function initialize():void
     {
+        // autoAlign is disabled on iOS devices since the stage's width and height
+        // are properly provided at start up.  See SDK-30261.
+        if (Capabilities.version.indexOf("IOS") == 0)
+            autoAlign = false;
+
         // The preloader parameters are in the SystemManager's info() object
         var sysManager:SystemManager = this.parent.loaderInfo.content as SystemManager;
         if (!sysManager)
             return;
-        var info:Object = sysManager.info();
+
+        info = sysManager.info();
         if (!info)
             return;
-
+
+        // Add event listeners for resize.  The first render will happen
+        // after the first resize
+        this.stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false /*useCapture*/, 0, true /*useWeakReference*/);
+    }
+
+    /**
+     *  @private
+     *  Returns the class of the DisplayObject that should be instantiated
+     *  as the splash screen.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    mx_internal function getImageClass(dpi:Number, portraitOrientation:Boolean):Class
+    {
         if ("splashScreenImage" in info)
+            return info["splashScreenImage"];
+
+        return null;
+    }
+
+    private function prepareSplashScreen():void
+    {
+        // Grab the application's dpi provider class.  If one doesn't exist,
+        // use the framework's default provider
+        var dpiProvider:RuntimeDPIProvider = ("runtimeDPIProvider" in info) ?
+            new info["runtimeDPIProvider"]() : new RuntimeDPIProvider();
+
+        // Capture device dpi and orientation
+        var dpi:Number = dpiProvider.runtimeDPI;
+        var portraitOrientation:Boolean = stage.stageWidth < stage.stageHeight;
+
+        var imageClass:Class = getImageClass(dpi, portraitOrientation);
+
+        // The SplashImageClass will only be set if a splash screen image has
+        // already be generated.  If the desired imageClass differs from the
+        // current one, the splash screen should recreate the image with the
+        // new class.
+        if (imageClass && imageClass != SplashImageClass)
         {
-            var SplashImageClass:Class = info["splashScreenImage"];
+            // The first time we create a splash screen, this will be null.
+            // In this case, assign the initial splash screen properties
+            if (!SplashImageClass)
+            {
+                if ("splashScreenScaleMode" in info)
+                    this.scaleMode = info["splashScreenScaleMode"];
+
+                // Since we have a valid image being displayed, we need to obey the minimumDisplayTime
+                if ("splashScreenMinimumDisplayTime" in info)
+                    this.minimumDisplayTime = info["splashScreenMinimumDisplayTime"];
+
+                // Prepare the enterFrame handler for the minimum display time
+                checkWaitTime = minimumDisplayTime > 0;
+                if (checkWaitTime)
+                    this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
+            }
+
+            // Store the new class
+            SplashImageClass = imageClass;
+
+            // Remove the old splash image
+            if (splashImage)
+                removeChild(splashImage);
+
+            // Create the image
             this.splashImage = new SplashImageClass();
             this.splashImageWidth = splashImage.width;
             this.splashImageHeight = splashImage.height;
-            addChild(splashImage as DisplayObject);
-
-            if ("splashScreenScaleMode" in info)
-                this.scaleMode = info["splashScreenScaleMode"];
-
-            // Since we have a valid image being displayed, we need to obey the minimumDisplayTime
-            if ("splashScreenMinimumDisplayTime" in info)
-                this.minimumDisplayTime = info["splashScreenMinimumDisplayTime"];
-
-            checkWaitTime = minimumDisplayTime > 0;
-            if (checkWaitTime)
-                this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
-
-            this.stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false /*useCapture*/, 0, true /*useWeakReference*/);
-            this.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, Stage_resizeHandler, false /*useCapture*/, 0, true /*useWeakReference*/)
-
-            // Invoke explicitly to get the initial size/position
-            Stage_resizeHandler(null);
-
+            addChildAt(splashImage as DisplayObject, 0);
         }
     }

@@ -351,11 +417,15 @@
      */
     private function Stage_resizeHandler(event:Event):void
     {
+        // This method will prepare the splash screen and create a
+        // new instance if needed
+        prepareSplashScreen();
+
         if (!splashImage)
             return;

         // Current stage orientation
-        var orientation:String = stage.deviceOrientation;
+        var orientation:String = stage.orientation;

         // DPI scaling factor of the stage
         var dpiScale:Number = this.root.scaleX;
@@ -363,8 +433,9 @@
         // Get stage dimensions at default orientation
         var stageWidth:Number;
         var stageHeight:Number;
-        if (orientation == StageOrientation.ROTATED_LEFT ||
-            orientation == StageOrientation.ROTATED_RIGHT)
+
+        if (autoAlign && (orientation == StageOrientation.ROTATED_LEFT ||
+            orientation == StageOrientation.ROTATED_RIGHT))
         {
             stageWidth = stage.stageHeight / dpiScale;
             stageHeight = stage.stageWidth / dpiScale;
@@ -413,24 +484,28 @@

         // Rotate to keep aligned with StageOrientation.DEFAULT
         var rotation:Number = 0;
-        switch (stage.orientation)
+
+        if (autoAlign)
         {
-            case StageOrientation.UNKNOWN:
-            case StageOrientation.DEFAULT:
-                rotation = 0;
-            break;
-
-            case StageOrientation.ROTATED_RIGHT:
-                rotation = Math.PI * 1.5; // 270
-            break;
+            switch (stage.orientation)
+            {
+                case StageOrientation.UNKNOWN:
+                case StageOrientation.DEFAULT:
+                    rotation = 0;
+                break;
+
+                case StageOrientation.ROTATED_RIGHT:
+                    rotation = Math.PI * 1.5; // 270
+                break;

-            case StageOrientation.ROTATED_LEFT:
-                rotation = Math.PI * 0.5; // 90
-            break;
-
-            case StageOrientation.UPSIDE_DOWN:
-                rotation = Math.PI; // 180
-            break;
+                case StageOrientation.ROTATED_LEFT:
+                    rotation = Math.PI * 0.5; // 90
+                break;
+
+                case StageOrientation.UPSIDE_DOWN:
+                    rotation = Math.PI; // 180
+                break;
+            }
         }

         // Move center to (0,0):


Transferred from the Adobe Open Source Subversion Repository

Revision: 19337
Author:   mhorn@adobe.com
Date:     2010-12-13T22:01:27.841985Z

Log Message:
-----------
ASDoc updates

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1265391 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as
@@ -32,7 +32,9 @@
 import spark.skins.mobile320.assets.RadioButton_up;

 /**
- *  Actionscript based skin for RadioButton on mobile applications.
+ *  ActionScript-based skin for RadioButton controls in mobile applications.
+ *
+ * @see spark.components.RadioButton
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Regenerated ActionScript listener marshallers.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4571 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/presents/data/TimeBaseMarshaller_GotTimeBaseMarshaller.as
+++ src/as/com/threerings/presents/data/TimeBaseMarshaller_GotTimeBaseMarshaller.as
@@ -43,7 +43,7 @@
         switch (methodId) {
         case GOT_TIME_OID:
             (listener as TimeBaseService_GotTimeBaseListener).gotTimeOid(
-                (args[0] as Integer).value);
+                (args[0] as int));
             return;

         default:


Transferred from the Adobe Open Source Subversion Repository

Revision: 8590
Author:   mhorn@adobe.com
Date:     2009-07-15T18:22:10.968729Z

Log Message:
-----------
asdoc bug fixes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1258609 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -468,9 +468,9 @@
      *  Remove the item at the specified index and return it.
      *  Any items that were after this index are now one index earlier.
      *
-     *  @param index the index from which to remove the item
-     *  @return the item that was removed
-     *  @throws RangeError is index < 0 or index >= length
+     *  @param index The index from which to remove the item.
+     *  @return The item that was removed.
+     *  @throws RangeError if index < 0 or index >= length.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


FLEX-28045 Fixed odd layout and possible RTE.

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -392,12 +392,12 @@

             if (defButton != _lastFocus || _lastFocus == _defaultButton)
             {
-            defButton = button;
+            	defButton = button;

-            if (button)
-                button.emphasized = true;
-        }
-    }
+           		if (button)
+                	button.emphasized = true;
+        	}
+    	}
     }

     //----------------------------------
@@ -668,15 +668,15 @@
             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
@@ -2098,10 +2098,10 @@
 	    		return;

         if (defaultButtonEnabled && event.keyCode == Keyboard.ENTER &&
-            defaultButton && defButton.enabled)
+			defButton && defButton.enabled)
         {
             sendDefaultButtonEvent();
-    }
+    	}
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 23102
Author:   aharui@adobe.com
Date:     2011-10-24T17:53:37.759919Z

Log Message:
-----------
Fix ModuleManager Bug

Notes: None
Doc notes: None
Bugs: SDK-30326
Reviewer: Darrell
Tests run: Checkintests, cyclone full run
Is noteworthy for integration: None

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mx/src/mx/modules/ModuleLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/modules/ModuleLoader.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262113 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/modules/ModuleManager.as
+++ frameworks/projects/framework/src/mx/modules/ModuleManager.as
@@ -460,9 +460,9 @@
             applicationDomain :
             new ApplicationDomain(ApplicationDomain.currentDomain);

-        c.securityDomain = securityDomain;
-        if (securityDomain == null && Security.sandboxType == Security.REMOTE)
-            c.securityDomain = SecurityDomain.currentDomain;
+        // setting securityDomain is not allowed on non-REMOTE sandboxes
+        if (securityDomain != null && Security.sandboxType == Security.REMOTE)
+            c.securityDomain = securityDomain;

         loader = new Loader();


Transferred from the Adobe Open Source Subversion Repository

Revision: 19242
Author:   aharui@adobe.com
Date:     2010-12-09T22:27:31.442236Z

Log Message:
-----------
Disable MEASURED_SIZE_PRELIMINARY if icon not used.  All fix up propagation of estimatedSizes

QE notes: none
Doc notes: none
Bugs: SDK-28658
Reviewer: Evtim
Tests run: checkintests mustella full run
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Application.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1278231 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -1031,7 +1031,11 @@
     override public function setActualSize(w:Number, h:Number):void
     {
         if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+        {
             setEstimatedSize(w, h, false);
+            invalidateEstimatedSizesOfChildren();
+            validateEstimatedSizesOfChildren();
+        }

         super.setActualSize(w, h);
     }
@@ -1084,7 +1088,7 @@
         // 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.isTopLevel() && Capabilities.isDebugger == true)
+        if (sm.isTopLevelRoot() && Capabilities.isDebugger == true)
             setInterval(debugTickler, 1500);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20642
Author:   smgilson@adobe.com
Date:     2011-03-07T17:53:01.854031Z

Log Message:
-----------
ASDoc updates

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/TraceSelectionRanges.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1281228 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -1989,9 +1989,14 @@
      *  Formats a time value, specified in seconds, into a String that
      *  gets used for currentTime and the duration.
      *
-     *  @param value Value in seconds of the time to format
-     *
-     *  @return Formatted time value
+     *  @param value Value in seconds of the time to format.
+     *
+     *  @return Formatted time value.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function formatTimeValue(value:Number):String
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6404
Author:   rfrishbe@adobe.com
Date:     2009-04-30T00:34:09.399480Z

Log Message:
-----------
Finishing up VideoPlayer/VideoElement. Added support for streaming videos and fixed a few of the bugs.  Added the skins from XD.  These still need a little tweaking, and I'll go over them with XD. For the skins, I had to add some new sub-components, like the VideoPlayerVolumeBar and VideoPlayScrubBar.

Also added 3 new events for TrackBase (thumbDrag, thumbPress, thumbRelease).  These were in Halo's Slider, and I needed them for the VideoPlayerScrubBar.

Also fixed some other bugs, like needing to call removeDynamicPartInstance() on the Slider when the dataTip is removed.  Also fixed a bug around alternatingItemsColor for ItemRenderer.

QE Notes: -
Doc Notes: -
Bugs: SDK-19486, SDK-20105, SDK-20789
Reviewer: Glenn, Jason
tests: checkintests, some mustella tests were failing, but seemed like random 1 pixel differences in DropDownList.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBarMuteButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerPlayPauseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarTrackSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarMuteButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/StreamItem.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarMuteButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarThumbSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarThumbSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarThumbSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerMuteButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarTrackSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerScrubBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenFullScreenButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarTrackSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenPlayPauseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/templates/swfobject/index.template.html</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1281157 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -13,6 +13,7 @@
 {
 import fl.video.VideoEvent;
 import fl.video.VideoState;
+import fl.video.flvplayback_internal;

 import flash.display.StageDisplayState;
 import flash.events.Event;
@@ -21,16 +22,19 @@
 import flash.events.ProgressEvent;
 import flash.geom.Rectangle;

-import spark.components.supportClasses.SkinnableComponent;
-import spark.components.supportClasses.Range;
+import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.events.SandboxMouseEvent;
+import mx.utils.BitFlagUtil;
+
+import spark.components.supportClasses.ButtonBase;
+import spark.components.supportClasses.Range;
+import spark.components.supportClasses.SkinnableComponent;
+import spark.events.TrackBaseEvent;
+import spark.events.VideoEvent;
 import spark.primitives.VideoElement;
 import spark.primitives.supportClasses.TextGraphicElement;
-import mx.utils.BitFlagUtil;
-
-import spark.events.VideoEvent;

 //--------------------------------------
 //  Events
@@ -277,12 +281,12 @@
     /**
      *  @private
      */
-    private static const LIVE_PROPERTY_FLAG:uint = 1 << 2;
-
-    /**
-     *  @private
-     */
-    private static const MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG:uint = 1 << 3;
+    private static const MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG:uint = 1 << 2;
+
+    /**
+     *  @private
+     */
+    private static const MUTED_PROPERTY_FLAG:uint = 1 << 3;

     /**
      *  @private
@@ -293,11 +297,6 @@
      *  @private
      */
     private static const VOLUME_PROPERTY_FLAG:uint = 1 << 5;
-
-    /**
-     *  @private
-     */
-    private static const MUTED_PROPERTY_FLAG:uint = 1 << 6;

     //--------------------------------------------------------------------------
     //
@@ -358,7 +357,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var fullScreenButton:Button;
+    public var fullScreenButton:ButtonBase;

     [SkinPart(required="false")]

@@ -385,7 +384,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var pauseButton:Button;
+    public var pauseButton:ButtonBase;

     [SkinPart(required="false")]

@@ -397,7 +396,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var playButton:Button;
+    public var playButton:ButtonBase;

     [SkinPart(required="false")]

@@ -437,7 +436,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var stopButton:Button;
+    public var stopButton:ButtonBase;

     [SkinPart(required="false")]

@@ -461,7 +460,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var volumeBar:Range;
+    public var volumeBar:VideoPlayerVolumeBar;

     //--------------------------------------------------------------------------
     //
@@ -598,40 +597,6 @@
     }

     //----------------------------------
-    //  live
-    //----------------------------------
-
-    [Inspectable(category="General", defaultValue="false")]
-
-    /**
-     *  @copy spark.primitives.VideoElement#live
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get live():Boolean
-    {
-        return (videoElement) ? videoElement.live : videoElementProperties.live;
-    }
-
-    /**
-     *  @private
-     */
-    public function set live(value:Boolean):void
-    {
-        if (videoElement)
-        {
-            videoElement.live = value;
-            videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        LIVE_PROPERTY_FLAG, true);
-        }
-        else
-            videoElementProperties.live = value;
-    }
-
-    //----------------------------------
     //  maintainAspectRatio
     //----------------------------------

@@ -860,8 +825,7 @@
      */
     override protected function getCurrentSkinState():String
     {
-        if (!enabled)
-            return "disabled";
+        var state:String;

         var currentState:String;

@@ -875,20 +839,38 @@
         switch (currentState)
         {
             case VideoState.BUFFERING:
+            case VideoState.LOADING:
+                state = VideoState.LOADING;
+                break;
+            case VideoState.PAUSED:
+                state = VideoState.STOPPED;
+                break;
             case VideoState.CONNECTION_ERROR:
             case VideoState.DISCONNECTED:
-            case VideoState.LOADING:
-            case VideoState.PAUSED:
             case VideoState.PLAYING:
-            case VideoState.SEEKING:
             case VideoState.STOPPED:
             {
-                previousState = currentState;
+                state = currentState;
                 break;
             }
         }

-        return previousState;
+        if (!state)
+            state = previousState;
+        else
+            previousState = state;
+
+        // now that we have our video player's current state (atleast the one we care about)
+        // and that we've set the previous state to something we care about, let's figure
+        // out our skin's state
+
+        if (!enabled)
+            state="disabled"
+
+        if (fullScreen)
+            return "fullScreen" + state.charAt(0).toUpperCase() + state.substring(1);
+
+        return state;
     }

     /**
@@ -930,13 +912,6 @@
                                                         AUTO_REWIND_PROPERTY_FLAG, true);
             }

-            if (videoElementProperties.live !== undefined)
-            {
-                videoElement.live = videoElementProperties.live;
-                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                        LIVE_PROPERTY_FLAG, true);
-            }
-
             if (videoElementProperties.maintainAspectRatio !== undefined)
             {
                 videoElement.maintainAspectRatio = videoElementProperties.maintainAspectRatio;
@@ -957,28 +932,24 @@
             videoElement.addEventListener(spark.events.VideoEvent.COMPLETE, dispatchEvent);
             videoElement.addEventListener(spark.events.VideoEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
             videoElement.addEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
-            videoElement.addEventListener(ProgressEvent.PROGRESS, dispatchEvent);
+            videoElement.addEventListener(ProgressEvent.PROGRESS, videoElement_progressHandler);
             videoElement.addEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);

             // just strictly for binding purposes
             videoElement.addEventListener("sourceChanged", dispatchEvent);
-            videoElement.addEventListener("volumeChanged", dispatchEvent);
+            videoElement.addEventListener("volumeChanged", videoElement_volumeChangedHandler);

             if (volumeBar)
                 volumeBar.value = volume;

             if (scrubBar)
-            {
-                scrubBar.minimum = 0;
-                scrubBar.maximum = videoElement.totalTime;
-                scrubBar.value = videoElement.playheadTime;
-            }
-
+                updateScrubBar();
+
             if (playheadTimeLabel)
-                playheadTimeLabel.text = videoElement.playheadTime.toString();
+                updatePlayheadTime();

             if (totalTimeLabel)
-                totalTimeLabel.text = videoElement.totalTime.toString();
+                updateTotalTime();

             if (muteButton)
                 muteButton.selected = videoElement.muted;
@@ -1007,6 +978,8 @@
         else if (instance == volumeBar)
         {
             volumeBar.addEventListener(Event.CHANGE, volumeBar_changeHandler);
+            // TODO (rfrishbe): Need this to be a real event
+            volumeBar.addEventListener("muteButtonClick", muteButton_clickHandler);
             volumeBar.minimum = 0;
             volumeBar.maximum = 1;
             if (videoElement)
@@ -1014,29 +987,26 @@
         }
         else if (instance == scrubBar)
         {
+            if (scrubBar)
+                updateScrubBar();
+
+            scrubBar.addEventListener(TrackBaseEvent.THUMB_PRESS, scrubBar_thumbPressHandler);
+            scrubBar.addEventListener(TrackBaseEvent.THUMB_RELEASE, scrubBar_thumbReleaseHandler);
+            scrubBar.addEventListener(Event.CHANGE, scrubBar_changeHandler);
+        }
+        else if (instance == fullScreenButton)
+        {
+            fullScreenButton.addEventListener(MouseEvent.CLICK, fullScreenButton_clickHandler);
+        }
+        else if (instance == playheadTimeLabel)
+        {
             if (videoElement)
-            {
-                scrubBar.minimum = 0;
-                scrubBar.maximum = videoElement.totalTime;
-                scrubBar.value = videoElement.playheadTime;
-            }
-            scrubBar.addEventListener(MouseEvent.MOUSE_DOWN, scrubBar_mouseEventHandler);
-            scrubBar.addEventListener(FlexEvent.VALUE_COMMIT, scrubBar_valueCommitHandler);
-            scrubBar.addEventListener(Event.CHANGE, scrubBar_changeHandler);
-        }
-        else if (instance == fullScreenButton)
-        {
-            fullScreenButton.addEventListener(MouseEvent.CLICK, fullScreenButton_clickHandler);
-        }
-        else if (instance == playheadTimeLabel)
-        {
-            if (videoElement)
-                playheadTimeLabel.text = videoElement.playheadTime.toString();
+                updatePlayheadTime();
         }
         else if (instance == totalTimeLabel)
         {
             if (totalTimeLabel)
-                totalTimeLabel.text = videoElement.totalTime.toString();
+                updateTotalTime();
         }
     }

@@ -1062,9 +1032,6 @@

             if (BitFlagUtil.isSet(videoElementProperties as uint, AUTO_REWIND_PROPERTY_FLAG))
                 newVideoProperties.autoRewind = videoElement.autoRewind;
-
-            if (BitFlagUtil.isSet(videoElementProperties as uint, LIVE_PROPERTY_FLAG))
-                newVideoProperties.live = videoElement.live;

             if (BitFlagUtil.isSet(videoElementProperties as uint, MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG))
                 newVideoProperties.maintainAspectRatio = videoElement.maintainAspectRatio;
@@ -1078,12 +1045,12 @@
             videoElement.removeEventListener(spark.events.VideoEvent.COMPLETE, videoElement_completeHandler);
             videoElement.removeEventListener(spark.events.VideoEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
             videoElement.removeEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
-            videoElement.removeEventListener(ProgressEvent.PROGRESS, dispatchEvent);
+            videoElement.removeEventListener(ProgressEvent.PROGRESS, videoElement_progressHandler);
             videoElement.removeEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);

             // just strictly for binding purposes
             videoElement.removeEventListener("sourceChanged", dispatchEvent);
-            videoElement.removeEventListener("volumeChanged", dispatchEvent);
+            videoElement.removeEventListener("volumeChanged", videoElement_volumeChangedHandler);
         }
         else if (instance == playButton)
         {
@@ -1108,11 +1075,12 @@
         else if (instance == volumeBar)
         {
             volumeBar.removeEventListener(Event.CHANGE, volumeBar_changeHandler);
+            volumeBar.removeEventListener("muteButtonClick", muteButton_clickHandler);
         }
         else if (instance == scrubBar)
         {
-            scrubBar.removeEventListener(MouseEvent.MOUSE_DOWN, scrubBar_mouseEventHandler);
-            scrubBar.removeEventListener(FlexEvent.VALUE_COMMIT, scrubBar_valueCommitHandler);
+            scrubBar.removeEventListener(TrackBaseEvent.THUMB_PRESS, scrubBar_thumbPressHandler);
+            scrubBar.removeEventListener(TrackBaseEvent.THUMB_RELEASE, scrubBar_thumbReleaseHandler);
             scrubBar.removeEventListener(Event.CHANGE, scrubBar_changeHandler);
         }
         else if (instance == fullScreenButton)
@@ -1191,37 +1159,87 @@
         videoElement.stop();
     }

-    //--------------------------------------------------------------------------
-    //
-    //  Event handlers
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private function videoElement_completeHandler(event:spark.events.VideoEvent):void
-    {
-        if (totalTimeLabel)
-            totalTimeLabel.text = videoElement.totalTime.toString();
-
-        dispatchEvent(event);
-    }
-
-    /**
-     *  @private
-     */
-    private function videoElement_metaDataReceivedHandler(event:spark.events.VideoEvent):void
-    {
-        if (scrubBar)
+    /**
+     *  @private
+     */
+    private function updateScrubBar():void
+    {
+        if (!videoElement)
+            return;
+
+        if (!scrubBarMouseCaptured)
         {
             scrubBar.minimum = 0;
             scrubBar.maximum = videoElement.totalTime;
             scrubBar.value = videoElement.playheadTime;
         }

+        if (scrubBar is VideoPlayerScrubBar)
+            VideoPlayerScrubBar(scrubBar).bufferedValue = videoElement.mx_internal::videoPlayer.bytesLoaded/videoElement.mx_internal::videoPlayer.bytesTotal * videoElement.totalTime;
+    }
+
+   /**
+    *  @private
+    */
+    private function updateTotalTime():void
+    {
+        totalTimeLabel.text = formatTimeValue(totalTime);
+    }
+
+    /**
+     *  Formats a time value, given in seconds, into a string that
+     *  gets used for the playheadTimeLabel and the totalTimeLabel.
+     *
+     *  @param value Value in seconds of the time to format
+     *
+     *  @return Formatted time value
+     */
+    protected function formatTimeValue(value:Number):String
+    {
+        // default format: hours:minutes:seconds
+        var hours:uint = Math.floor(value/3600) % 24;
+        var minutes:uint = Math.floor(value/60) % 60;
+        var seconds:uint = Math.round(value) % 60;
+
+        var result:String = "";
+        if (hours != 0)
+            result = hours + ":";
+
+        if (result && minutes < 10)
+            result += "0" + minutes + ":";
+        else
+            result += minutes + ":";
+
+        if (seconds < 10)
+            result += "0" + seconds;
+        else
+            result += seconds;
+
+        return result;
+    }
+
+    /**
+     *  @private
+     */
+    private function updatePlayheadTime():void
+    {
+        playheadTimeLabel.text = formatTimeValue(playheadTime);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function videoElement_completeHandler(event:spark.events.VideoEvent):void
+    {
+        // TODO: needed??
         if (totalTimeLabel)
-            totalTimeLabel.text = videoElement.totalTime.toString();
+            updateTotalTime();

         dispatchEvent(event);
     }
@@ -1229,17 +1247,37 @@
     /**
      *  @private
      */
+    private function videoElement_metaDataReceivedHandler(event:spark.events.VideoEvent):void
+    {
+        if (scrubBar)
+            updateScrubBar();
+
+        if (totalTimeLabel)
+            updateTotalTime();
+
+        dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     */
     private function videoElement_playHeadUpdateHandler(event:spark.events.VideoEvent):void
     {
-        if (scrubBar && !scrubBarMouseCaptured)
-        {
-            scrubBar.minimum = 0;
-            scrubBar.maximum = videoElement.totalTime;
-            scrubBar.value = videoElement.playheadTime;
-        }
+        updateScrubBar();

         if (playheadTimeLabel)
-            playheadTimeLabel.text = videoElement.playheadTime.toString();
+            updatePlayheadTime();
+
+        dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     */
+    private function videoElement_progressHandler(event:ProgressEvent):void
+    {
+        if (scrubBar)
+            updateScrubBar();

         dispatchEvent(event);
     }
@@ -1251,6 +1289,7 @@
     {
         if (playPauseButton)
             playPauseButton.selected = playing;
+
         invalidateSkinState();

         // don't dispatch the event here...this is an internal event
@@ -1259,17 +1298,44 @@
     /**
      *  @private
      */
+    private function videoElement_volumeChangedHandler(event:Event):void
+    {
+        if (volumeBar)
+            volumeBar.value = volume;
+
+        dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     *  Indicates whether we are in the full screen state or not.
+     *  We use this when determining our current skin state.
+     */
+    private var fullScreen:Boolean = false;
+
+    /**
+     *  @private
+     */
     private function fullScreenButton_clickHandler(event:MouseEvent):void
     {
-        // TODO (rfrishbe): What should we do on full screen?
-        includeInLayout = false;
-        setLayoutBoundsSize(stage.fullScreenWidth, stage.fullScreenHeight);
-        videoElement.mx_internal::videoPlayer.smoothing = false;
-        videoElement.mx_internal::videoPlayer.deblocking = 0;
-        validateNow();
-        stage.fullScreenSourceRect = new Rectangle(0, 0, width, height);
-        stage.displayState = StageDisplayState.FULL_SCREEN;
-        stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
+        if (!fullScreen)
+        {
+            // TODO (rfrishbe): What should we do on full screen?
+            fullScreen = true;
+            invalidateSkinState();
+            includeInLayout = false;
+            setLayoutBoundsSize(stage.fullScreenWidth, stage.fullScreenHeight);
+            videoElement.mx_internal::videoPlayer.smoothing = false;
+            videoElement.mx_internal::videoPlayer.deblocking = 0;
+            validateNow();
+            stage.displayState = StageDisplayState.FULL_SCREEN;
+            stage.fullScreenSourceRect = new Rectangle(0, 0, width, height);
+            stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
+        }
+        else
+        {
+            stage.displayState = StageDisplayState.NORMAL;
+        }
     }

     private function fullScreenEventHandler(event:FullScreenEvent):void
@@ -1277,11 +1343,19 @@
         if (event.fullScreen)
             return;

+        fullScreen = false;
+        invalidateSkinState();
         stage.removeEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
-        setLayoutBoundsSize(NaN, NaN);
         includeInLayout = true;
         invalidateSize();
         invalidateDisplayList();
+//        var myParent:IVisualElementContainer = parent as IVisualElementContainer;
+//        if (myParent)
+//        {
+//            var index:int = myParent.getElementIndex(this);
+//            myParent.removeElement(this);
+//            myParent.addElementAt(this, index);
+//        }
     }

     /**
@@ -1349,25 +1423,34 @@

     /**
      *  @private
-     */
-    private function scrubBar_mouseEventHandler(event:MouseEvent):void
-    {
-        switch (event.type)
-        {
-            case MouseEvent.MOUSE_DOWN:
-            {
-                scrubBarMouseCaptured = true;
-                systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_UP, scrubBar_mouseEventHandler, true /*useCapture*/);
-                systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, scrubBar_mouseEventHandler);
-                break;
-            }
-            case MouseEvent.MOUSE_UP:
-            case SandboxMouseEvent.MOUSE_UP_SOMEWHERE:
-            {
-                scrubBarMouseCaptured = false;
-                break;
-            }
-
+     *  We pause the video when dragging the thumb for the scrub bar.  This
+     *  stores whether we were paused or not.
+     */
+    private var wasPlayingBeforeSeeking:Boolean;
+
+    /**
+     *  @private
+     */
+    private function scrubBar_thumbPressHandler(event:TrackBaseEvent):void
+    {
+        scrubBarMouseCaptured = true;
+        if (playing)
+        {
+            pause();
+            wasPlayingBeforeSeeking = true;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function scrubBar_thumbReleaseHandler(event:TrackBaseEvent):void
+    {
+        scrubBarMouseCaptured = false;
+        if (wasPlayingBeforeSeeking)
+        {
+            play();
+            wasPlayingBeforeSeeking = false;
         }
     }

@@ -1376,16 +1459,15 @@
      */
     private function scrubBar_changeHandler(event:Event):void
     {
-        seek(scrubBar.value);
-    }
-
-    /**
-     *  @private
-     */
-    private function scrubBar_valueCommitHandler(event:Event):void
-    {
-        //seek(scrubBar.value);
-        //play();
+        if (scrubBarMouseCaptured)
+        {
+            videoElement.mx_internal::videoPlayer.flvplayback_internal::flushQueuedCmds();
+            seek(scrubBar.value);
+        }
+        else
+        {
+            seek(scrubBar.value);
+        }
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5413
Author:   hmuller@adobe.com
Date:     2009-03-19T14:40:13.644721Z

Log Message:
-----------
Bonus round of A/B virtualization bug fixes.

QE Notes:
Doc Notes:
Bugs: sdk-19991
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1285321 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -876,8 +876,8 @@
      */
      override public function elementAdded(index:int):void
      {
-         if (useVirtualLayout)
-            llv.insert(index);
+         if ((index >= 0) && useVirtualLayout)
+            llv.insert(index);  // insert index parameter is uint
      }

     /**
@@ -885,8 +885,8 @@
      */
      override public function elementRemoved(index:int):void
      {
-         if (useVirtualLayout)
-            llv.remove(index);
+         if ((index >= 0) && useVirtualLayout)
+            llv.remove(index);  // remove index parameter is uint
      }

     /**
@@ -1112,9 +1112,10 @@
                 for (index = startIndex; index <= endIndex; index++)
                 {
                     elt = layoutTarget.getVirtualElementAt(index);
-                    w = calculateElementWidth(elt, targetWidth, containerWidth);
+                    w = calculateElementWidth(elt, targetWidth, containerWidth);  // can be NaN
+                    elt.setLayoutBoundsSize(w, elt.getLayoutBoundsHeight());
+                    w = elt.getLayoutBoundsWidth();
                     x = calculateElementX(elt, w, containerWidth);
-                    elt.setLayoutBoundsSize(w, elt.getLayoutBoundsHeight());
                     elt.setLayoutBoundsPosition(x, elt.getLayoutBoundsY());
                 }
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4531
Author:   egeorgie@adobe.com
Date:     2009-01-14T22:36:14.526244Z

Log Message:
-----------
Scrolling support for TileLayout.

QE Notes:
Doc Notes:
Bugs: None
Reviewer: Hans
tests: checkintests, mustella (layout, viewport, scroller)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1285305 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -705,106 +705,21 @@
     }

     /**
-     *  Overrides the default handling of UP/DOWN and
-     *  PAGE_UP, PAGE_DOWN.
-     *
-     *

-     *
-     *

-     *  UP
-     *  If the firstIndexInView element is partially visible then top justify
-     *  it, otherwise top justify the element at the previous index.
-     *

-     *
-     *

-     *  DOWN
-     *  If the lastIndexInView element is partially visible, then bottom justify
-     *  it, otherwise bottom justify the element at the following index.
-     *

-     *
-     *  PAGE_UP
-     *

-     *  If the firstIndexInView element is partially visible, then bottom
-     *  justify it, otherwise bottom justify element at the previous index.
-     *

-     *
-     *

-     *  PAGE_DOWN
-     *  If the lastIndexInView element is partially visible, then top
-     *  justify it, otherwise top justify element at the following index.
-     *

-     *
-     *

-     *
-     *  @see firstIndexInView
-     *  @see lastIndexInView
-     *  @see verticalScrollPosition
-     */
-    override public function getVerticalScrollPositionDelta(unit:ScrollUnit):Number
-    {
-        var g:GroupBase = target;
-        if (!g)
-            return 0;
-
-        var maxIndex:int = g.numLayoutElements -1;
-        if (maxIndex < 0)
-            return 0;
-
-        var scrollR:Rectangle = g.scrollRect;
-        if (!scrollR)
-            return 0;
-
-        var elementR:Rectangle = null;
-        switch(unit)
-        {
-            case ScrollUnit.UP:
-            case ScrollUnit.PAGE_UP:
-                elementR = findLayoutElementBounds(g, firstIndexInView, -1, scrollR);
-                break;
-
-            case ScrollUnit.DOWN:
-            case ScrollUnit.PAGE_DOWN:
-                elementR = findLayoutElementBounds(g, lastIndexInView, +1, scrollR);
-                break;
-
-            default:
-                return super.getVerticalScrollPositionDelta(unit);
-        }
-
-        if (!elementR)
-            return 0;
-
-        var delta:Number = 0;
-        switch (unit)
-        {
-            case ScrollUnit.UP:
-                delta = Math.max(-scrollR.height, elementR.top - scrollR.top);
-                break;
-
-            case ScrollUnit.DOWN:
-                delta = Math.min(scrollR.height, elementR.bottom - scrollR.bottom);
-                break;
-
-            case ScrollUnit.PAGE_UP:
-                if ((elementR.top < scrollR.top) && (elementR.bottom >= scrollR.bottom))
-                    delta = Math.max(-scrollR.height, elementR.top - scrollR.top);
-                else
-                    delta = elementR.bottom - scrollR.bottom;
-                break;
-
-            case ScrollUnit.PAGE_DOWN:
-                if ((elementR.top <= scrollR.top) && (elementR.bottom > scrollR.bottom))
-                    delta = Math.min(scrollR.height, elementR.bottom - scrollR.bottom);
-                else
-                    delta = elementR.top - scrollR.top;
-                break;
-        }
-
-        var maxDelta:Number = g.contentHeight - scrollR.height - scrollR.y;
-        var minDelta:Number = -scrollR.y;
-        return Math.min(maxDelta, Math.max(minDelta, delta));
-    }
-
+     *  @private
+     */
+    override protected function elementBoundsAboveScrollRect(scrollRect:Rectangle):Rectangle
+    {
+        return findLayoutElementBounds(target, firstIndexInView, -1, scrollRect);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function elementBoundsBelowScrollRect(scrollRect:Rectangle):Rectangle
+    {
+        return findLayoutElementBounds(target, lastIndexInView, +1, scrollRect);
+    }
+
     /**
      *  @private
      *  Compute exact values for measuredWidth,Height and  measuredMinWidth,Height.


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1250108 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as
+++ frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262164 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/preloaders/SparkDownloadProgressBar.as
+++ frameworks/projects/framework/src/mx/preloaders/SparkDownloadProgressBar.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.preloaders
 {


248 TestLayout2 -> 60fps

248 TestLayout2 -> 60fps

--- raw/src/scratch/layout2/TestLayout2.as
+++ raw/src/scratch/layout2/TestLayout2.as
@@ -10,6 +10,7 @@
 import flash.events.Event;

+[SWF(backgroundColor="#FFFFFF", frameRate="60", width="640", height="480")]
 public class TestLayout2 extends Sprite
 {
     private var a:Sprite;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1268795 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridListData.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridListData.as
@@ -26,6 +26,11 @@
  *  or item editor. Changing these values can lead to unexpected results.</p>
  *
  *  @see mx.controls.listClasses.IDropInListItemRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class DataGridListData extends BaseListData
 {
@@ -54,6 +59,11 @@
 	 *
 	 *  @param rowIndex The index of the item in the data provider
 	 *  for the DataGrid control.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function DataGridListData(text:String, dataField:String,
 									 columnIndex:int, uid:String,
@@ -72,6 +82,11 @@

 	/**
 	 *  Name of the field or property in the data provider associated with the column.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var dataField:String;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10464
Author:   rfrishbe@adobe.com
Date:     2009-09-21T17:40:30.663638Z

Log Message:
-----------
Removing support in Flex framework for compatibility version < 3.  We won't support compatibility-version 2 or 2.01 anymore.  We only keep compatibility-version for one full release, so for Flex 4, we only support compatibility-version = 3.x.

This should reduce our code-size some as we no longer need this old code.  I didn't clean up the compiler's support for compatibility-versioning as it didn't seem worth the effort.

QE notes: -
Doc notes: -
Bugs: SDK-15360
Reviewer: Kevin
Tests run: checkintests, Joan ran all mustella tests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserYearArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PanelSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1268959 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as
@@ -17,7 +17,6 @@
 import flash.geom.Point;
 import flash.geom.Rectangle;
 import flash.text.TextFieldType;
-import mx.core.FlexVersion;
 import mx.core.IDataRenderer;
 import mx.core.IFlexDisplayObject;
 import mx.core.IFlexModuleFactory;
@@ -168,9 +167,6 @@
      */
     override public function get baselinePosition():Number
     {
-        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-            super.baselinePosition;
-
         if (!validateBaselinePosition())
             return NaN;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17425
Author:   rfrishbe@adobe.com
Date:     2010-08-20T17:29:56.448841Z

Log Message:
-----------
Pretty basic refactoring for PARB (though it is a lot of files).  Renamed GestureCaptureEvent/GestureCaptureReason (these were previously TouchScrollEvent) to TouchInteractionEvent/TouchInteractionReason.  inputMode has been renamed to interactionMode and has a new enumeration class, mx.core.InteractionMode.

There's on non-PARB change that was made was in List and mobiletheme/defaults.css. I found a bug in that the item renderer wasn't highlighting on mousedown anymore. There were two issues at play. Firstly the touchDelay was set to 100 ms in the Scroller only, so I added it to List and added a FIXME comment to myself figuring out if the code in List should use scroller.getStyle("touchDelay") or itemRenderer.getStyle("touchDelay") instead of getStyle("touchDelay"). Also, I found out that the code doesn't deal with touchDelay=0 very well. Since we're planning on working on this code anyways (and possibly moving it in to ItemRenderer itself with a new downstate), I just put in a hack with a FIXME to handle this case for now.

QE notes: None
Doc notes: None
Bugs: -
Reviewer: Jason SJ, Chiedo
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureEvent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/InteractionMode.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureReason.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureEvent.as" copyfrom-rev="17393" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/TouchInteractionEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureReason.as" copyfrom-rev="17393" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/TouchInteractionReason.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1283151 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -18,10 +18,11 @@
 import flash.events.MouseEvent;
 import flash.geom.Point;

+import mx.core.InteractionMode;
 import mx.events.FlexEvent;
 import mx.events.ResizeEvent;
 import mx.events.SandboxMouseEvent;
-import mx.events.GestureCaptureEvent;
+import mx.events.TouchInteractionEvent;

 import spark.components.Button;
 import spark.events.TrackBaseEvent;
@@ -418,7 +419,7 @@
         if (instance == thumb)
         {
             thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumb_mouseDownHandler);
-            thumb.addEventListener(GestureCaptureEvent.GESTURE_CAPTURE_STARTING, thumb_gestureCaptureStartingHandler);
+            thumb.addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_STARTING, thumb_touchInteractionStartingHandler);
             thumb.addEventListener(ResizeEvent.RESIZE, thumb_resizeHandler);
             thumb.addEventListener(FlexEvent.UPDATE_COMPLETE, thumb_updateCompleteHandler);
             thumb.stickyHighlighting = true;
@@ -427,8 +428,8 @@
         {
             track.addEventListener(ResizeEvent.RESIZE, track_resizeHandler);

-            // track is only clickable if in mouse inputMode
-            if (getStyle("inputMode") == "mouse")
+            // track is only clickable if in mouse interactionMode
+            if (getStyle("interactionMode") == InteractionMode.MOUSE)
                 track.addEventListener(MouseEvent.MOUSE_DOWN, track_mouseDownHandler);
         }
     }
@@ -443,7 +444,7 @@
         if (instance == thumb)
         {
             thumb.removeEventListener(MouseEvent.MOUSE_DOWN, thumb_mouseDownHandler);
-            thumb.removeEventListener(GestureCaptureEvent.GESTURE_CAPTURE_STARTING, thumb_gestureCaptureStartingHandler);
+            thumb.removeEventListener(TouchInteractionEvent.TOUCH_INTERACTION_STARTING, thumb_touchInteractionStartingHandler);
             thumb.removeEventListener(ResizeEvent.RESIZE, thumb_resizeHandler);
             thumb.removeEventListener(FlexEvent.UPDATE_COMPLETE, thumb_updateCompleteHandler);
         }
@@ -463,12 +464,12 @@

         super.styleChanged(styleName);

-        if (allStyles || styleName == "inputMode")
+        if (allStyles || styleName == "interactionMode")
         {
             if (track)
             {
-                // track is only clickable if in mouse inputMode
-                if (getStyle("inputMode") == "mouse")
+                // track is only clickable if in mouse interactionMode
+                if (getStyle("interactionMode") == InteractionMode.MOUSE)
                     track.addEventListener(MouseEvent.MOUSE_DOWN, track_mouseDownHandler);
                 else
                     track.removeEventListener(MouseEvent.MOUSE_DOWN, track_mouseDownHandler);
@@ -618,7 +619,7 @@
     /**
      *  @private
      */
-    protected function thumb_gestureCaptureStartingHandler(event:GestureCaptureEvent):void
+    protected function thumb_touchInteractionStartingHandler(event:TouchInteractionEvent):void
     {
         // cancel this event b/c I want to control it
         event.preventDefault();