Transferred from the Adobe Open Source Subversion Repository

Revision: 88
Author:   open-source-svn-admin@adobe.com
Date:     2008-01-03T22:47:56.499469Z

Log Message:
-----------
Perforce Change 191925 by proberts@proberts-laptop-flex on 2008/01/03 16:47:12 Severity: ignore Details: doc additions/clean up for FlexNativeMenu. Also FLEXDOCS-320 (update documentation for FlexNativeMenuEvent.MENU_SHOW to explain that the index, label, and item properties are null) Affected files ...

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/NoChannelAvailableError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessagingError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/InvalidChannelError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessageSerializationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXContext.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/NetConnectionChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.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/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/Grammar.jj</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ConsumerMessageDispatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/InvalidDestinationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXResult.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractMessageStore.as</path>

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

--- frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as
+++ frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as
@@ -17,8 +17,8 @@
 import flash.events.Event;

 /**
- *  The FlexNativeMenuEvent class represents events that are associated with menu
- *  activities in FlexNativeMenu.
+ *  The FlexNativeMenuEvent class represents events that are associated with menu
+ *  activities in FlexNativeMenu.
  *
  *  @see mx.controls.FlexNativeMenu
  */
@@ -87,20 +87,20 @@
      *       myButton.addEventListener() to register an event listener,
      *       myButton is the value of the currentTarget.

      *
index
-     *         The index in the menu of the selected menu item.

+     *         -1. This property is not set for this type of event.

      *
item
-     *         The item in the dataProvider that was selected.

+     *         null. This property is not set for this type of event.

      *
label
-     *         The label text of the selected menu item.

+     *         null. This property is not set for this type of event.

      *
nativeMenu
      *          The specific NativeMenu instance associated with this event.

      *
nativeMenuItem
-     *          The specific NativeMenuItem instance associated with this event.

+     *          null. This property is not set for this type of event.

      *
target	The Object that dispatched the
      *             event; it is not always the Object listening for the event.
      *             Use the currentTarget property to always access the
      *             Object listening for the event.

-     *
type	FlexNativeMenuEvent.ITEM_CLICK

+     *
type	FlexNativeMenuEvent.MENU_SHOW

      *

      *
      *  @eventType menuShow
@@ -115,8 +115,8 @@

     /**
      *  Constructor.
-     *
-     *  Normally called by the FlexNativeMenu object.
+     *
+     *  Normally called by the FlexNativeMenu object.
      *
      *  @param type The event type; indicates the action that caused the event.
      *
@@ -127,17 +127,17 @@
      *  associated with the event can be prevented.
      *
      *  @param nativeMenu The specific NativeMenu instance associated with the event.
-     *
+     *
      *  @param nativeMenuItem The specific NativeMenuItem instance associated with the event.
      *
      *  @param item The item in the dataProvider of the associated menu item.
-     *
+     *
      *  @param label The label text of the associated menu item.
-     *
-     *  @param index The index in the menu of the associated menu item.
+     *
+     *  @param index The index in the menu of the associated menu item.
      */
     public function FlexNativeMenuEvent(type:String, bubbles:Boolean = false,
-                              cancelable:Boolean = true, nativeMenu:NativeMenu = null,
+                              cancelable:Boolean = true, nativeMenu:NativeMenu = null,
                               nativeMenuItem:NativeMenuItem = null, item:Object = null,
                               label:String = null, index:int = -1)
     {
@@ -149,7 +149,7 @@
         this.label = label;
         this.index = index;
     }
-
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -161,17 +161,17 @@
     //----------------------------------

     /**
-     *  The index of the associated menu item within its parent menu or submenu.
+     *  The index of the associated menu item within its parent menu or submenu.
      *  This is -1 for events that aren't associated with an individual item.
      */
     public var index:int;
-
+
     //----------------------------------
     //  item
     //----------------------------------

     /**
-     *  The specific item in the dataProvider.
+     *  The specific item in the dataProvider.
      *  This is null for events that aren't associated with an individual item.
      */
     public var item:Object;
@@ -195,14 +195,14 @@
      *  such as the menu displayed.
      */
     public var nativeMenu:NativeMenu;
-
+
     //----------------------------------
     //  nativeMenuItem
     //----------------------------------

     /**
      *  The specific NativeMenuItem instance associated with the event,
-     *  such as the item clicked.  This is null for events that aren't
+     *  such as the item clicked.  This is null for events that aren't
      *  associated with an individual item.
      */
     public var nativeMenuItem:NativeMenuItem;


Fixed data add/remove bug in Visualization
Added unit test for Data.clear()

git-svn-id: 6aa7ccb0a2048310a30f08a72aaff4ca39d980ed@223 91848ab2-c4ae-4e4f-8e6a-6a52ea0dccc3

--- flare/src/flare/vis/Visualization.as
+++ flare/src/flare/vis/Visualization.as
@@ -14,6 +14,7 @@
 	import flare.vis.operator.IOperator;
 	import flare.vis.operator.OperatorList;

+	import flash.display.DisplayObject;
 	import flash.display.Sprite;
 	import flash.events.Event;
 	import flash.geom.Rectangle;
@@ -412,10 +413,12 @@
 		 */
 		protected function dataAdded(evt:DataEvent):void
 		{
-			if (evt.node != null) {
-				_marks.addChild(evt.node);
+			if (evt.node) {
+				for each (var d:DisplayObject in evt.items)
+					_marks.addChild(d);
 			} else {
-				_marks.addChildAt(evt.item, 0);
+				for each (d in evt.items)
+					_marks.addChildAt(d, 0);
 			}
 		}

@@ -426,7 +429,8 @@
 		 */
 		protected function dataRemoved(evt:DataEvent):void
 		{
-			_marks.removeChild(evt.item);
+			for each (var d:DisplayObject in evt.items)
+				_marks.removeChild(d);
 		}

 	} // end of class Visualization


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Jayme points out that it'd be nice to see this caching in action, so let's add some traces (that are most likely not long for the world).

--- tamarin-central/thane/as3src/flash/net/CachingHttpClient.as
+++ tamarin-central/thane/as3src/flash/net/CachingHttpClient.as
@@ -19,6 +19,7 @@

     public static function cache (resource :String, data :ByteArray) :void
     {
+        trace("CachingHTTPClient: Caching resource: " + resource);
         _cached[resource] = data;
     }

@@ -41,6 +42,7 @@
             loader = new HttpLoader(resource);

             // and remember that we are
+            trace("CachingHTTPClient: Now loading resource: " + resource);
             _loading[resource] = loader;
         }


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@1252213 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkVideoDisplayAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkVideoDisplayAutomationImpl.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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 spark.automation.delegates.components
 {


reformat

reformat

--- com/segonquart/Configuration.as
+++ com/segonquart/Configuration.as
@@ -1,5 +1,12 @@
 class com.segonquart.Configuration extends MovieClip
 {
+	public var addListener:Function;
+	public var addEventListener:Function;
+	public var removeEventListener:Function;
+	static var URLAPP:String = "http://www.talking-wear.com";
+	static var POLICY:String = "http://segonquart.net/crossdomain.xml";
+
+
 	public function Configuration ()
 	{
 		Stage.addListener (this);
@@ -12,8 +19,8 @@
 	}
 	static function config ():Void
 	{
-		System.security.allowDomain ("http://www.talking-wear.com");
-		System.security.loadPolicyFile ("http://segonquart.net/crossdomain.xml");
+		System.security.allowDomain (URLAPP);
+		System.security.loadPolicyFile (POLICY);
 		Stage.showMenu = false;
 		Stage.scaleMode = "noScale";
 		_global.showRedrawRegions (false);


Adjust buffer size for smaller minimum and higher maximum.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -345,7 +345,7 @@
 		{
 			if(_state != HTTPStreamingState.HALT)
 			{
-				value = HLSManifestParser.MAX_SEG_BUFFER * 7.5;
+				value = HLSManifestParser.MAX_SEG_BUFFER * 5.0;

 				// Try a better guess.
 				if(indexHandler)
@@ -353,7 +353,7 @@
 					var lastMan:HLSManifestParser = indexHandler.getLastSequenceManifest();
 					if(lastMan && lastMan.targetDuration > 0.0)
 					{
-						value = HLSManifestParser.MAX_SEG_BUFFER * lastMan.targetDuration * 0.9;
+						value = 1.75 * lastMan.targetDuration;
 					}
 				}

@@ -371,7 +371,10 @@
 			super.bufferTime = value;
 			trace("   o super.bufferTime = " + super.bufferTime);
 			_desiredBufferTime_Min = Math.max(OSMFSettings.hdsMinimumBufferTime, value);
-			_desiredBufferTime_Max = _desiredBufferTime_Min + OSMFSettings.hdsAdditionalBufferTime;
+			_desiredBufferTime_Max = Math.min(60, _desiredBufferTime_Min * 3);
+			trace("   o _desiredBufferTime_Min = " + _desiredBufferTime_Min);
+			trace("   o _desiredBufferTime_Max = " + _desiredBufferTime_Max);
+
 		}

 		/**


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@1249952 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as
+++ frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.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.core.windowClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/charts/src/mx/charts/series/items/BarSeriesItem.as
+++ frameworks/projects/charts/src/mx/charts/series/items/BarSeriesItem.as
@@ -0,0 +1,321 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 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.charts.series.items
+{
+
+import mx.charts.ChartItem;
+import mx.charts.series.BarSeries;
+import mx.graphics.IFill;
+import mx.controls.Label;
+
+/**
+ *  Represents the information required to render an item as part of a BarSeries. The BarSeries class passes these items to its itemRenderer when rendering.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class BarSeriesItem extends ChartItem
+{
+    include "../../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  @param  element The owning series.
+     *  @param  data    The item from the dataProvider that this ChartItem represents.
+     *  @param  index   The index of the item from the series's dataProvider.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function BarSeriesItem(element:BarSeries = null,
+                                  data:Object = null, index:uint = 0)
+    {
+        super(element, data, index);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // fill
+    //----------------------------------
+    [Inspectable(environment="none")]
+
+    /**
+     *  Holds the fill color of the item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var fill:IFill;
+
+    /**
+     *  @private
+     */
+    mx_internal var labelText:String;
+
+    /**
+     *  @private
+     */
+    mx_internal var label:Label;
+
+    /**
+     *  @private
+     */
+    mx_internal var labelX:Number;
+
+    /**
+     *  @private
+     */
+    mx_internal var labelY:Number;
+
+    /**
+     *  @private
+     */
+    mx_internal var labelWidth:Number = 1;
+
+    /**
+     *  @private
+     */
+    mx_internal var labelHeight:Number = 1;
+
+    //----------------------------------
+    //  min
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The minimum value of this item converted into screen coordinates.
+     *  The value of this field is undefined if the BarSeries is not stacked and its minField property is not set.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var min:Number;
+
+    //----------------------------------
+    //  minFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The minimum value of this item, filtered against the horizontal axis of the containing chart. This value NaN if the value lies outside the axis's range.
+     *  The value of this field is undefined if the BarSeries is not stacked and its minField property is not set.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var minFilter:Number;
+
+    //----------------------------------
+    //  minNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The minimum value of this item, converted to a number by the horizontal axis of the containing chart.
+     *  The value of this field is undefined if the BarSeries is not stacked and its minField property is not set.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var minNumber:Number;
+
+    //----------------------------------
+    //  minValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The minimum value of this item.
+     *  The value of this field is undefined if the BarSeries is not stacked and its minField property is not set.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var minValue:Object;
+
+    //----------------------------------
+    //  x
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var x:Number;
+
+    //----------------------------------
+    //  xFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, filtered against the horizontal axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xFilter:Number;
+
+    //----------------------------------
+    //  xNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, converted to a number by the horizontal axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xNumber:Number;
+
+    //----------------------------------
+    //  xValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xValue:Object;
+
+    //----------------------------------
+    //  y
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var y:Number;
+
+    //----------------------------------
+    //  yFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item, filtered against the vertical axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yFilter:Number;
+
+    //----------------------------------
+    //  yNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item, converted to a number by the vertical axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yNumber:Number;
+
+    //----------------------------------
+    //  yValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yValue:Object;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Returns a copy of this ChartItem.
+     */
+    override public function clone():ChartItem
+    {
+        var result:BarSeriesItem = new BarSeriesItem(BarSeries(element),item,index);
+        result.itemRenderer = itemRenderer;
+        return result;
+    }
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17831
Author:   jasonsj@adobe.com
Date:     2010-09-24T00:37:26.854399Z

Log Message:
-----------
Fixed ActionBar measurement, layout, padding and title bugs:

SDK-27745 ActionBar with empty title vs. empty titleContent now measure the same
SDK-27682 New titleAlign style to support center alignment
SDK-27749 Use titleLayout for paddingLeft and paddingRight, defaults to 25
SDK-27555 Include top/bottom borders in ActionBar measurement. Default height changes from 80 to 82.
SDK-27681 Update ActionButtonSkin and NavigationButtonSkin for new ActionBar measurement.

QE notes:
Doc notes:
Bugs:
SDK-27745 TitleDisplay/TitleGroup sizing is inconsistent
SDK-27682 ActionBar should have a style to change title alignment
SDK-27749 Should have default padding around titleContent
SDK-27555 Content is partially cut off by the ActionBar.
SDK-27681 ActionBar buttons do not size correctly when ActionBar has an explicit height
Reviewer: chiedozi
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<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/mobilecomponents/src/spark/components/ActionBar.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/NavigationButtonSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
@@ -25,6 +25,17 @@
 //  Styles
 //--------------------------------------

+
+/**
+ *  Alignment of the title relative to the ActionBar dimensions.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+[Style(name="titleAlign", type="String", enumeration="start,end,left,right,center", inherit="no")]
+
 /**
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -32,7 +43,6 @@
  *  @productversion Flex 4.5
  */
 [Style(name="backgroundAlpha", type="Number", inherit="no")]
-

 /**
  *  The ActionBar class defines a component that includes title, navigation
@@ -59,6 +69,7 @@
  *
  *   Styles
  *    backgroundAlpha="1.0"
+ *    titleAlign="start"
  *
  *  <
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 4866
Author:   hmuller@adobe.com
Date:     2009-02-05T22:14:08.037552Z

Log Message:
-----------
Bug fixes, notably support for "canceling" keyboard events that drive scrolling.  Added mouse-wheel scrolling to FxScroller.

QE Notes:
Doc Notes: None
Bugs: sdk-19027, sdk-19028, sdk-18903, sdk-18673
Reviewer: Evtim, Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<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/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.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@1286490 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
@@ -11,7 +11,7 @@

 -->

-<ItemRenderer xmlns="http://ns.adobe.com/mxml/2009">
+<ItemRenderer focusEnabled="false" xmlns="http://ns.adobe.com/mxml/2009">

     <states>
 		<State name="normal"/>


qnd: Fix OSMF bug: sometimes bufferChange events was sent after playback has finished.

--- kdp3Lib/src/com/kaltura/kdpfl/view/controls/BufferAnimationMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/controls/BufferAnimationMediator.as
@@ -148,7 +148,8 @@
 					break;
 				case NotificationType.BUFFER_CHANGE:
 					_bufferChangeStart = note.getBody();
-					spinner.visible = _bufferChangeStart;
+					//fix osmf bug: sometimes bufferChange was sent after playback complete
+					spinner.visible = _bufferChangeStart && !_reachedEnd;
 					break;
 				case NotificationType.PLAYER_PLAY_END:
 					_reachedEnd=true;


Added many levels

Added many levels

--- src/Levels/Level.as
+++ src/Levels/Level.as
@@ -168,16 +168,22 @@
 			cpuJMP.predecessors.push(addCPU);
 			var cpuBRANCH:Level = new ShardLevel("Branch!", "Make a CPU that does jumps... conditionally!", LevelShard.CORE.compositWith(LevelShard.JUMP, LevelShard.BRANCH));
 			cpuBRANCH.predecessors.push(cpuJMP);
-
-			levels.push(addCPU, cpuJMP, cpuBRANCH, cpuADV, cpuLD);
+			var cpuFULL:Level = new ShardLevel("Full!", "Make a CPU that does everything!", LevelShard.CORE.compositWith(LevelShard.ADV, LevelShard.LOAD, LevelShard.JUMP, LevelShard.BRANCH));
+			cpuFULL.predecessors.push(cpuADV, cpuLD, cpuBRANCH);
+
+			levels.push(addCPU, cpuJMP, cpuBRANCH, cpuADV, cpuLD, cpuFULL);

 			var delayShard:LevelShard = LevelShard.CORE.compositWith(LevelShard.DELAY);
 			var addCPU_D:Level = new ShardLevel("Add-CPU Delay", "Make a basic CPU... with propagation delay!", delayShard);
 			addCPU_D.predecessors.push(addCPU, D2_TUT);
-			var cpuADVLDD:Level = new ShardLevel("Adv/Load Delay", " ", delayShard.compositWith(LevelShard.ADV, LevelShard.LOAD));
+			var cpuADVLDD:Level = new ShardLevel("Adv/Load Delay", "TODO", delayShard.compositWith(LevelShard.ADV, LevelShard.LOAD));
 			cpuADVLDD.predecessors.push(addCPU_D, cpuADV, cpuLD);
-
-			levels.push(addCPU_D, cpuADVLDD);
+			var cpuD_BRANCH:Level = new ShardLevel("Branch Delay", "TODO", delayShard.compositWith(LevelShard.JUMP, LevelShard.BRANCH));
+			cpuD_BRANCH.predecessors.push(addCPU_D, cpuBRANCH);
+			var cpuD_FULL:Level = new ShardLevel("Full Delay", "Make a full CPU with delay!", delayShard.compositWith(LevelShard.ADV, LevelShard.LOAD, LevelShard.JUMP, LevelShard.BRANCH));
+			cpuD_FULL.predecessors.push(cpuADVLDD, cpuBRANCH);
+
+			levels.push(addCPU_D, cpuADVLDD, cpuD_BRANCH, cpuD_FULL);

 			var pipeTutorial:Level = new Level("Pipeline Tutorial", new PipelineTutorialGoal, true,
 											   [ConstIn, Adder, Latch, DataWriterT, DataReader, InstructionDecoder, SysDelayClock, And], [OpcodeValue.OP_SAVI]);
@@ -188,28 +194,32 @@
 			var pipeShard:LevelShard = delayShard.compositWith(LevelShard.SPD);
 			var pipe:Level = new ShardLevel("Efficiency!", "Make a CPU that runs fast!", pipeShard);
 			pipe.predecessors.push(addCPU_D); //dubious
-			var pipeJMP:Level = new ShardLevel("Efficient Jump", " ", pipeShard.compositWith( LevelShard.JUMP));
+			var pipeJMP:Level = new ShardLevel("Efficient Jump", "TODO", pipeShard.compositWith( LevelShard.JUMP));
 			pipeJMP.predecessors.push(pipe, cpuJMP);
-			var pipeADV:Level = new ShardLevel("Efficient Adv Op", " ", pipeShard.compositWith(LevelShard.ADV));
+			var pipeBranch:Level = new ShardLevel("Efficient Branch", "TODO", pipeShard.compositWith( LevelShard.JUMP, LevelShard.BRANCH));
+			pipeBranch.predecessors.push(pipeJMP);
+			var pipeADV:Level = new ShardLevel("Efficient Adv Op", "TODO", pipeShard.compositWith(LevelShard.ADV));
 			pipeADV.predecessors.push(pipe, cpuADVLDD);
-			var pipeLD:Level = new ShardLevel("Efficient Load", " ", pipeShard.compositWith(LevelShard.LOAD));
+			var pipeLD:Level = new ShardLevel("Efficient Load", "TODO", pipeShard.compositWith(LevelShard.LOAD));
 			pipeLD.predecessors.push(pipe, cpuADVLDD);
-			var pipeADVLDD:Level = new ShardLevel("Eff. Adv/Load", " ", pipeShard.compositWith(LevelShard.ADV, LevelShard.LOAD));
+			var pipeADVLDD:Level = new ShardLevel("Eff. Adv/Load", "TODO", pipeShard.compositWith(LevelShard.ADV, LevelShard.LOAD));
 			pipeADVLDD.predecessors.push(pipeLD, pipeADV);
-
-			levels.push(pipe, pipeJMP, pipeADV, pipeLD, pipeADVLDD);
+			var pipeFull:Level = new ShardLevel("Full Efficient", "TODO", pipeShard.compositWith(LevelShard.ADV, LevelShard.LOAD, LevelShard.JUMP, LevelShard.BRANCH));
+			pipeFull.predecessors.push(pipeBranch, pipeADVLDD);
+
+			levels.push(pipe, pipeJMP, pipeADV, pipeLD, pipeADVLDD, pipeBranch, pipeFull);

 			columns.push(makeVec([WIRE_TUT, MOD_TUT]));
 			columns.push(makeVec([SEL_TUT, COPY_TUT]));
 			columns.push(makeVec([ACC_TUT]));
 			columns.push(makeVec([INSTR_TUT, OP_TUT, ISEL_TUT]));
-			columns.push(makeVec([addCPU, cpuJMP, cpuBRANCH, cpuADV, cpuLD]));
+			columns.push(makeVec([addCPU, cpuJMP, cpuBRANCH, cpuADV, cpuLD, cpuFULL]));
 			columns.push(makeVec([D0_TUT]));
 			columns.push(makeVec([D1_TUT]));
 			columns.push(makeVec([D2_TUT]));
-			columns.push(makeVec([addCPU_D, cpuADVLDD]));
+			columns.push(makeVec([addCPU_D, cpuADVLDD, cpuD_BRANCH, cpuD_FULL]));
 			columns.push(makeVec([pipeTutorial]));
-			columns.push(makeVec([pipe, pipeJMP, pipeADV, pipeLD, pipeADVLDD]));
+			columns.push(makeVec([pipe, pipeJMP, pipeBranch, pipeADV, pipeLD, pipeADVLDD, pipeFull]));

 			return levels;
 		}


Improved ragdoll creation.

Improved ragdoll creation.

--- Bin/Data/Scripts/TestScene.as
+++ Bin/Data/Scripts/TestScene.as
@@ -438,7 +438,7 @@
     if (drawDebug == 1)
         renderer.DrawDebugGeometry(false);
     if (drawDebug == 2)
-        testScene.physicsWorld.DrawDebugGeometry(false);
+        testScene.physicsWorld.DrawDebugGeometry(true);

     IntVector2 pos = ui.cursorPosition;
     if (ui.GetElementAt(pos, true) is null && testScene.octree !is null)
@@ -470,27 +470,27 @@
     Node@ root = model.node;

     CreateRagdollBone(root, "Bip01_Pelvis", 1.0, SHAPE_BOX, Vector3(0.15, 0.2, 0.3), Vector3(0.1, 0, 0), Quaternion(0, 0, 0));
-    CreateRagdollBone(root, "Bip01_Spine1", 1.0, SHAPE_BOX, Vector3(0.35, 0.3, 0.3), Vector3(0.15, 0, 0), Quaternion(0, 0, 0));
-    CreateRagdollBone(root, "Bip01_L_Thigh", 1.0, SHAPE_CAPSULE, Vector3(0.2, 0.45, 0.2), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
-    CreateRagdollBone(root, "Bip01_R_Thigh", 1.0, SHAPE_CAPSULE, Vector3(0.2, 0.45, 0.2), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
+    CreateRagdollBone(root, "Bip01_Spine1", 1.0, SHAPE_BOX, Vector3(0.3, 0.25, 0.3), Vector3(0.15, 0, 0), Quaternion(0, 0, 0));
+    CreateRagdollBone(root, "Bip01_L_Thigh", 1.0, SHAPE_CAPSULE, Vector3(0.2, 0.5, 0.2), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
+    CreateRagdollBone(root, "Bip01_R_Thigh", 1.0, SHAPE_CAPSULE, Vector3(0.2, 0.5, 0.2), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
     CreateRagdollBone(root, "Bip01_L_Calf", 1.0, SHAPE_CAPSULE, Vector3(0.2, 0.45, 0.2), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
     CreateRagdollBone(root, "Bip01_R_Calf", 1.0, SHAPE_CAPSULE, Vector3(0.2, 0.45, 0.2), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
     CreateRagdollBone(root, "Bip01_Head", 1.0, SHAPE_SPHERE, Vector3(0.3, 0.3, 0.3), Vector3(0.1, 0, 0), Quaternion(0, 0, 0));
     CreateRagdollBone(root, "Bip01_L_UpperArm", 1.0, SHAPE_CAPSULE, Vector3(0.15, 0.3, 0.15), Vector3(0.1, 0, 0), Quaternion(0, 0, 90));
     CreateRagdollBone(root, "Bip01_R_UpperArm", 1.0, SHAPE_CAPSULE, Vector3(0.15, 0.3, 0.15), Vector3(0.1, 0, 0), Quaternion(0, 0, 90));
-    CreateRagdollBone(root, "Bip01_L_Forearm", 1.0, SHAPE_CAPSULE, Vector3(0.1, 0.3, 0.1), Vector3(0.15, 0, 0), Quaternion(0, 0, 90));
-    CreateRagdollBone(root, "Bip01_R_Forearm", 1.0, SHAPE_CAPSULE, Vector3(0.1, 0.3, 0.1), Vector3(0.15, 0, 0), Quaternion(0, 0, 90));
-
-    CreateRagdollConstraint(root, "Bip01_L_Thigh", "Bip01_Pelvis", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_R_Thigh", "Bip01_Pelvis", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_L_Calf", "Bip01_L_Thigh", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_R_Calf", "Bip01_R_Thigh", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_Spine1", "Bip01_Pelvis", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_Head", "Bip01_Spine1", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_L_UpperArm", "Bip01_Spine1", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_R_UpperArm", "Bip01_Spine1", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_L_Forearm", "Bip01_L_UpperArm", CONSTRAINT_POINT);
-    CreateRagdollConstraint(root, "Bip01_R_Forearm", "Bip01_R_UpperArm", CONSTRAINT_POINT);
+    CreateRagdollBone(root, "Bip01_L_Forearm", 1.0, SHAPE_CAPSULE, Vector3(0.1, 0.3, 0.1), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
+    CreateRagdollBone(root, "Bip01_R_Forearm", 1.0, SHAPE_CAPSULE, Vector3(0.1, 0.3, 0.1), Vector3(0.2, 0, 0), Quaternion(0, 0, 90));
+
+    CreateRagdollConstraint(root, "Bip01_L_Thigh", "Bip01_Pelvis", CONSTRAINT_CONETWIST, Vector3(0, 0, -1), Vector3(0, 0, 1), Vector2(45, 10), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_R_Thigh", "Bip01_Pelvis", CONSTRAINT_CONETWIST, Vector3(0, 0, -1), Vector3(0, 0, 1), Vector2(45, 10), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_L_Calf", "Bip01_L_Thigh", CONSTRAINT_HINGE, Vector3(0, 0, -1), Vector3(0, 0, -1), Vector2(90, 0), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_R_Calf", "Bip01_R_Thigh", CONSTRAINT_HINGE, Vector3(0, 0, -1), Vector3(0, 0, -1), Vector2(90, 0), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_Spine1", "Bip01_Pelvis", CONSTRAINT_CONETWIST, Vector3(0, 0, 1), Vector3(0, 0, 1), Vector2(25, 10), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_Head", "Bip01_Spine1", CONSTRAINT_CONETWIST, Vector3(0, 0, 1), Vector3(0, 0, 1), Vector2(45, 15), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_L_UpperArm", "Bip01_Spine1", CONSTRAINT_CONETWIST, Vector3(0, -1, 0), Vector3(0, 1, 0), Vector2(25, 45), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_R_UpperArm", "Bip01_Spine1", CONSTRAINT_CONETWIST, Vector3(0, -1, 0), Vector3(0, 1, 0), Vector2(25, 45), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_L_Forearm", "Bip01_L_UpperArm", CONSTRAINT_HINGE, Vector3(0, 0, -1), Vector3(0, 0, -1), Vector2(45, 0), Vector2(0, 0));
+    CreateRagdollConstraint(root, "Bip01_R_Forearm", "Bip01_R_UpperArm", CONSTRAINT_HINGE, Vector3(0, 0, -1), Vector3(0, 0, -1), Vector2(45, 0), Vector2(0, 0));

     // Disable animation from all bones (both physical and non-physical) to not interfere
     Skeleton@ skel = model.skeleton;
@@ -506,7 +506,7 @@

     RigidBody@ body = boneNode.CreateComponent("RigidBody", LOCAL);
     body.mass = mass;
-    body.linearDamping = 0.8;
+    body.linearDamping = 0.5;
     body.angularDamping = 0.5;

     CollisionShape@ shape = boneNode.CreateComponent("CollisionShape", LOCAL);
@@ -516,7 +516,7 @@
     shape.rotation = rotation;
 }

-void CreateRagdollConstraint(Node@ root, String boneName, String parentName, ConstraintType type)
+void CreateRagdollConstraint(Node@ root, String boneName, String parentName, ConstraintType type, Vector3 axis, Vector3 parentAxis, Vector2 highLimit, Vector2 lowLimit)
 {
     Node@ boneNode = root.GetChild(boneName, true);
     Node@ parentNode = root.GetChild(parentName, true);
@@ -525,6 +525,12 @@

     Constraint@ constraint = boneNode.CreateComponent("Constraint");
     constraint.constraintType = type;
+    constraint.disableCollision = true;
+    // The connected body must be specified before setting the world position
     constraint.otherBody = parentNode.GetComponent("RigidBody");
     constraint.worldPosition = boneNode.worldPosition;
-}
+    constraint.axis = axis;
+    constraint.otherAxis = parentAxis;
+    constraint.highLimit = highLimit;
+    constraint.lowLimit = lowLimit;
+}


Show a 'no' sign if the camera isn't working

--- src/CameraMan.as
+++ src/CameraMan.as
@@ -6,6 +6,10 @@

     import flash.external.ExternalInterface;

+    import flash.text.TextField;
+    import flash.text.TextFieldAutoSize;
+    import flash.text.TextFormat;
+    import flash.text.TextFormatAlign;
     import flash.display.Bitmap;
     import flash.display.BitmapData;
     import flash.media.Camera;
@@ -22,6 +26,7 @@

     public class CameraMan extends Sprite {

+        private var nope:TextField;
         private var videoface:Video;
         private var cam:Camera;
         private var photo:Bitmap;
@@ -51,6 +56,26 @@
         }

         public function createCamera(event:Event) : void {
+            nope = new TextField();
+            nope.autoSize = TextFieldAutoSize.CENTER;
+            nope.background = true;
+            nope.backgroundColor = 0x000000;
+            nope.textColor = 0xFFFFFF;
+            nope.text = '⃠';
+            this.addChild(nope);
+
+            var nope_fmt:TextFormat = new TextFormat();
+            nope_fmt.size = stage.stageHeight;
+            nope_fmt.align = TextFormatAlign.CENTER;
+            nope.setTextFormat(nope_fmt);
+
+            nope.x = Math.floor(stage.stageWidth / 2) - Math.floor(nope.width / 2);
+            nope.y = Math.floor(stage.stageHeight / 2) - Math.floor(nope.height / 2);
+
+            trace('Stage size is ' + stage.stageWidth + ', ' + stage.stageHeight);
+            trace('Nope size is ' + nope.width + ', ' + nope.height);
+            trace('Nope size 2 is ' + nope.width + ', ' + nope.height);
+
             cam = Camera.getCamera();

             // TODO: handle a missing camera
@@ -84,6 +109,13 @@
             if (!cam)
                 return this.createCamera(event);

+            nope.autoSize = TextFieldAutoSize.CENTER;
+            var nope_fmt:TextFormat = new TextFormat();
+            nope_fmt.size = stage.stageHeight;
+            nope.setTextFormat(nope_fmt);
+            nope.x = Math.floor(stage.stageWidth / 2) - Math.floor(nope.width / 2);
+            nope.y = Math.floor(stage.stageHeight / 2) - Math.floor(nope.height / 2);
+
             cam.setMode(stage.stageWidth, stage.stageHeight, 15);
             trace("Camera size is " + cam.width + ", " + cam.height);
             videoface.width = cam.width;


Transferred from the Adobe Open Source Subversion Repository

Revision: 7163
Author:   aharui@adobe.com
Date:     2009-05-21T02:19:55.813792Z

Log Message:
-----------
Initial checkin of frame 1 cleanup.  In an RSL linkage, more classes will now come from the RSL because they are no longer needed in frame 1, and the size of the application SWF will be smaller.

QE Notes: None
Doc Notes: Maybe.  All new classes should be undocumented, but it might be worth checking that and any changes to interfaces
Bugs:
Reviewer: darrell
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/MarshalPopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.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/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.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/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.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/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFont.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/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ResourceModuleRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IMarshalSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/ToolTipManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/MustellaResultsParser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.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/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.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/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/DragManagerMarshalMixin.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/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.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/events/FlexEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IActiveWindowManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/PopUpManagerMarshalMixin.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/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/messaging/config/LoaderConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManagerChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/CursorManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as
+++ frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as
@@ -0,0 +1,779 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-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.marshalClasses
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.IEventDispatcher;
+import flash.events.KeyboardEvent;
+import flash.ui.Keyboard;
+
+import mx.events.FocusRequestDirection;
+import mx.events.SWFBridgeEvent;
+import mx.events.SWFBridgeRequest;
+import mx.managers.FocusManager;
+import mx.managers.IMarshalSystemManager;
+import mx.managers.ISystemManager;
+import mx.managers.SystemManager;
+import mx.managers.SystemManagerProxy;
+import mx.core.IFlexModuleFactory;
+import mx.core.ISWFBridgeProvider;
+import mx.core.ISWFBridgeGroup;
+import mx.core.ISWFLoader;
+import mx.core.mx_internal;
+import mx.core.SWFBridgeGroup;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+[Mixin]
+
+/**
+ *  @private
+ *  A SystemManager has various types of children,
+ *  such as the Application, popups,
+ *  tooltips, and custom cursors.
+ *  You can access the just the custom cursors through
+ *  the cursors property,
+ *  the tooltips via toolTips, and
+ *  the popups via popUpChildren.  Each one returns
+ *  a SystemChildrenList which implements IChildList.  The SystemManager's
+ *  IChildList methods return the set of children that aren't popups, tooltips
+ *  or cursors.  To get the list of all children regardless of type, you
+ *  use the rawChildrenList property which returns this SystemRawChildrenList.
+ */
+public class FocusManagerMarshalMixin
+{
+    include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class Method
+	//
+	//--------------------------------------------------------------------------
+
+	public static function init(fbs:IFlexModuleFactory):void
+	{
+		if (!FocusManager.mixins)
+			FocusManager.mixins = [];
+        if (FocusManager.mixins.indexOf(FocusManagerMarshalMixin) == -1)
+		    FocusManager.mixins.push(FocusManagerMarshalMixin);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function FocusManagerMarshalMixin(owner:FocusManager = null)
+	{
+		super();
+
+        if (!owner)
+            return;
+
+		this.focusManager = owner;
+		marshalSystemManager =
+			IMarshalSystemManager(focusManager.form.systemManager.getImplementation("mx.managers::IMarshalSystemManager"));
+
+		focusManager.addEventListener("initialize", initializeHandler);
+		focusManager.addEventListener("showFocusIndicator", showFocusIndicatorHandler);
+		focusManager.addEventListener("setFocus", setFocusHandler);
+		focusManager.addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
+		focusManager.addEventListener(Event.ACTIVATE, activateHandler);
+		focusManager.addEventListener(Event.DEACTIVATE, deactivateHandler);
+		focusManager.addEventListener("focusWrapping", focusWrappingHandler);
+		focusManager.addEventListener("setFocusToComponent", setFocusToComponentHandler);
+		focusManager.addEventListener("setFocusToNextIndex", focusWrappingHandler); // yes, this is the same code snippet so reuse handler
+		focusManager.addEventListener("getTopLevelFocusTarget", getTopLevelFocusTargetHandler);
+		focusManager.addEventListener("keyFocusChange", keyFocusChangeHandler);
+		focusManager.addEventListener("browserFocusComponent", browserFocusComponentHandler);
+		focusManager.addEventListener("keyDownFM", keyDownHandler);
+		focusManager.addEventListener("defaultButtonKeyHandler", defaultButtonKeyHandler);
+		focusManager.addEventListener("mouseDownFM", mouseDownHandler);
+		focusManager.addEventListener("addChildBridge", addChildBridgeHandler);
+		focusManager.addEventListener("removeChildBridge", removeChildBridgeHandler);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 * @private
+	 *
+	 * Test if the focus was set locally in this focus manager (true) or
+	 * if focus was transfer to another focus manager (false)
+	 */
+	private var focusSetLocally:Boolean;
+
+	/**
+	 *  @private
+	 */
+	private var focusManager:FocusManager;
+
+	/**
+	 *  @private
+	 */
+	private var marshalSystemManager:IMarshalSystemManager;
+
+	 /**
+	  *  @private
+	  *
+	  *  The focus manager maintains its own bridges so a focus manager in a pop
+	  *  up can move focus to another focus manager in the same pop up. That is,
+	  *  A pop ups can be a collection of focus managers working together just
+	  *  as is done in the System Manager's document.
+	  */
+	 private var swfBridgeGroup:SWFBridgeGroup;
+
+	/**
+	 * @private
+	 *
+	 * bridge handle of the last active focus manager.
+	 */
+     private var lastActiveFocusManager:FocusManager;
+
+	 /**
+	 * @private
+	 *
+	 * True if this focus manager is a popup, false if it is a main application.
+	 *
+	 */
+	 private var popup:Boolean;
+
+	 /**
+	  *  @private
+	  *
+	  *  Used when a the skip parameter can't be passed into
+	  *  dispatchEventFromSWFBridges() because the caller doesn't take
+	  *  a skip parameter.
+	  */
+	 private var skipBridge:IEventDispatcher;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	public function initializeHandler(event:Event):void
+	{
+		try
+		{
+            var sm:ISystemManager = focusManager.form.systemManager;
+
+            // Set up our swfBridgeGroup. If this is a pop up then the parent
+            // bridge is empty, otherwise its the form's system manager's bridge.
+            swfBridgeGroup = new SWFBridgeGroup(sm);
+            if (!popup)
+                swfBridgeGroup.parentBridge = marshalSystemManager.swfBridgeGroup.parentBridge;
+
+			// add ourselves to our parent focus manager if this is a bridged
+			// application not a dialog or other popup.
+			if (marshalSystemManager.useSWFBridge())
+			{
+			    sm.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, removeFromParentBridge);
+
+				// have the child listen to move requests from the parent.
+				var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
+		       	if (bridge)
+	    	   	{
+	       			bridge.addEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
+                    bridge.addEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST,
+                                            setShowFocusIndicatorRequestHandler);
+	       		}
+
+	   			// add listener activate/deactivate requests
+	   			if (bridge && !(focusManager.form.systemManager is SystemManagerProxy))
+	   			{
+	   				bridge.addEventListener(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST, focusRequestActivateHandler);
+	   				bridge.addEventListener(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST, focusRequestDeactivateHandler);
+			   		bridge.addEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE,
+			   				    		    bridgeEventActivateHandler);
+	   			}
+
+	   			// listen when the container has been added to the stage so we can add the focusable
+	   			// children
+	   			focusManager.form.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
+			}
+		}
+		catch (e:Error)
+		{
+			// ignore null pointer errors caused by container using a
+			// systemManager from another sandbox.
+		}
+
+	}
+
+	/**
+	 * After the form is added to the stage, if there are no focusable objects,
+	 * add the form and its children to the list of focuable objects because
+	 * this application may have been loaded before the
+	 * top-level system manager was added to the stage.
+	 */
+	private function addedToStageHandler(event:Event):void
+	{
+		focusManager.form.removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
+		if (focusManager.focusableObjects.length == 0)
+		{
+			focusManager.addFocusables(DisplayObject(focusManager.form));
+			focusManager.calculateCandidates = true;
+		}
+	}
+
+	private function setFocusHandler(event:Event):void
+	{
+        focusSetLocally = true;
+	}
+
+	public function showFocusIndicatorHandler(event:Event):void
+	{
+        if (!popup && swfBridgeGroup)
+            dispatchSetShowFocusIndicatorRequest(focusManager.showFocusIndicator, null);
+	}
+
+	public function focusInHandler(event:FocusEvent):void
+	{
+		// if the target is in a bridged application, let it handle the click.
+   		if (marshalSystemManager.isDisplayObjectInABridgedApplication(DisplayObject(event.relatedObject)))
+   			event.preventDefault();
+	}
+
+	public function activateHandler(event:Event):void
+	{
+		// activate children in compatibility mode or in sandboxes.
+    	dispatchEventFromSWFBridges(new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST), skipBridge);
+	}
+
+	public function deactivateHandler(event:Event):void
+	{
+		// deactivate children in compatibility mode or in sandboxes.
+		dispatchEventFromSWFBridges(new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST), skipBridge);
+	}
+
+	public function focusWrappingHandler(event:FocusEvent):void
+	{
+		if (getParentBridge())
+		{
+			moveFocusToParent(event.shiftKey);
+			event.preventDefault();;
+		}
+
+	}
+
+	public function setFocusToComponentHandler(event:FocusEvent):void
+	{
+		var o:Object = event.relatedObject;
+
+		if (o is ISWFLoader && ISWFLoader(o).swfBridge)
+		{
+			// send message to child swf to move focus.
+			// trace("pass focus from " + this.form.systemManager.loaderInfo.url + " to " + DisplayObject(o).loaderInfo.url);
+	    	var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.MOVE_FOCUS_REQUEST,
+	    												false, true, null,
+	    												event.shiftKey ? FocusRequestDirection.BOTTOM :
+																   FocusRequestDirection.TOP);
+			var sandboxBridge:IEventDispatcher = ISWFLoader(o).swfBridge;
+			if (sandboxBridge)
+			{
+    			sandboxBridge.dispatchEvent(request);
+				focusManager.focusChanged = request.data;
+			}
+			event.preventDefault();
+		}
+	}
+
+	public function getTopLevelFocusTargetHandler(event:FocusEvent):void
+	{
+		var o:Object = event.relatedObject;
+
+		// if we cross a boundry into a bridged application, then return null so
+		// the target is only processed at the lowest level
+		if (o.parent is ISWFLoader)
+		{
+			if (ISWFLoader(o.parent).swfBridge)
+		   		event.preventDefault();
+		}
+	}
+
+	public function keyFocusChangeHandler(event:FocusEvent):void
+	{
+		var o:Object = event.relatedObject;
+
+		// if the target is in a bridged application, let it handle the click.
+   		if (marshalSystemManager.isDisplayObjectInABridgedApplication(DisplayObject(o)))
+   			event.preventDefault();
+
+	}
+
+	public function browserFocusComponentHandler(event:FocusEvent):void
+	{
+		if (marshalSystemManager.useSWFBridge())
+		{
+			// out of children, pass focus to parent
+			moveFocusToParent(event.shiftKey);
+
+			if (focusManager.focusChanged)
+		        event.preventDefault();
+		}
+
+	}
+
+	public function keyDownHandler(event:FocusEvent):void
+	{
+   		if (marshalSystemManager.isDisplayObjectInABridgedApplication(DisplayObject(event.relatedObject)))
+   			event.preventDefault();
+
+	}
+
+	public function defaultButtonKeyHandler(event:FocusEvent):void
+	{
+		// if the target is in a bridged application, let it handle the click.
+   		if (marshalSystemManager.isDisplayObjectInABridgedApplication(DisplayObject(event.relatedObject)))
+   			event.preventDefault();
+	}
+
+
+	public function mouseDownHandler(event:FocusEvent):void
+	{
+		var o:Object = event.relatedObject;
+
+        // if in a sandbox, create a focus-in event and dispatch.
+		if (!focusManager.lastFocus && o is IEventDispatcher &&	marshalSystemManager.useSWFBridge())
+       		IEventDispatcher(o).dispatchEvent(new FocusEvent(FocusEvent.FOCUS_IN));
+
+		dispatchActivatedFocusManagerEvent(null);
+
+		lastActiveFocusManager = focusManager;
+	}
+
+	/**
+	 * @private
+	 *
+	 * A request across a bridge from another FocusManager to change the
+	 * focus.
+	 */
+    private function focusRequestMoveHandler(event:Event):void
+    {
+    	// trace("focusRequestHandler in  = " + this._form.systemManager.loaderInfo.url);
+
+		// ignore messages we send to ourselves.
+		if (event is SWFBridgeRequest)
+		{
+			// trace("ignored focus in " + this._form.systemManager.loaderInfo.url);
+			return;
+		}
+
+		focusSetLocally = false;
+
+    	var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
+		if (request.data == FocusRequestDirection.TOP || request.data == FocusRequestDirection.BOTTOM)
+		{
+			// move focus to the top or bottom child. If there are no children then
+			// send focus back up to the parent.
+			if (focusManager.focusableObjects.length == 0)
+			{
+				// trace("focusRequestMoveHandler: no focusable objects, setting focus back to parent");
+				moveFocusToParent(request.data == FocusRequestDirection.TOP ? false : true);
+				event["data"] = focusManager.focusChanged;
+				return;
+			}
+
+			if (request.data == FocusRequestDirection.TOP)
+			{
+				setFocusToTop();
+			}
+			else
+			{
+				setFocusToBottom();
+			}
+
+			event["data"] = focusManager.focusChanged;
+		}
+		else
+		{
+			// move forward or backward
+			var startingPosition:DisplayObject =
+				DisplayObject(swfBridgeGroup.getChildBridgeProvider(IEventDispatcher(event.target)));
+			moveFocus(request.data as String, startingPosition);
+			event["data"] = focusManager.focusChanged;
+	  	}
+
+		if (focusSetLocally)
+		{
+            dispatchActivatedFocusManagerEvent(null);
+            lastActiveFocusManager = focusManager;
+		}
+    }
+
+    private function focusRequestActivateHandler(event:Event):void
+	{
+		// trace("FM focusRequestActivateHandler");
+		skipBridge = IEventDispatcher(event.target);
+		focusManager.activate();
+		skipBridge = null;
+	}
+
+    private function focusRequestDeactivateHandler(event:Event):void
+	{
+		// trace("FM focusRequestDeactivateHandler");
+        skipBridge = IEventDispatcher(event.target);
+		focusManager.deactivate();
+        skipBridge = null;
+	}
+
+    private function bridgeEventActivateHandler(event:Event):void
+	{
+		// ignore message to self
+		if (event is SWFBridgeEvent)
+			return;
+
+		//trace("FM bridgeEventActivateHandler for " + form.systemManager.loaderInfo.url);
+
+		// clear last focus if we aren't active.
+		lastActiveFocusManager = null;
+		focusManager.lastFocus = null;
+
+		dispatchActivatedFocusManagerEvent(IEventDispatcher(event.target));
+	}
+
+    /**
+     *  @private
+     *
+     *  A request across a bridge from another FocusManager to change the
+     *  value of the setShowFocusIndicator property.
+     */
+    private function setShowFocusIndicatorRequestHandler(event:Event):void
+    {
+        // ignore messages we send to ourselves.
+        if (event is SWFBridgeRequest)
+            return;
+
+        var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
+        focusManager._showFocusIndicator = request.data;
+
+        // relay the message to parent and children
+        dispatchSetShowFocusIndicatorRequest(focusManager.showFocusIndicator, IEventDispatcher(event.target));
+    }
+
+	/**
+	 * This is called on the top-level focus manager and the parent focus
+	 * manager for each new bridge of focusable content created.
+	 * When the parent focus manager of the new focusable content is
+	 * called, focusable content will become part of the tab order.
+	 * When the top-level focus manager is called the bridge becomes
+	 * one of the focus managers managed by the top-level focus manager.
+	 */
+	public function addSWFBridge(bridge:IEventDispatcher, owner:DisplayObject):void
+	{
+//    	trace("FocusManager.addFocusManagerBridge: in  = " + this._form.systemManager.loaderInfo.url);
+        if (!owner)
+            return;
+
+		var sm:ISystemManager = focusManager.form.systemManager;
+       	if (focusManager.focusableObjects.indexOf(owner) == -1)
+		{
+			focusManager.focusableObjects.push(owner);
+    	    focusManager.calculateCandidates = true;
+   		}
+
+		// listen for move requests from the bridge.
+        swfBridgeGroup.addChildBridge(bridge, ISWFBridgeProvider(owner));
+
+   		bridge.addEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
+        bridge.addEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST,
+                                setShowFocusIndicatorRequestHandler);
+  		bridge.addEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE,
+   				    		    bridgeEventActivateHandler);
+	}
+
+	/**
+	 * @inheritdoc
+	 */
+	public function removeSWFBridge(bridge:IEventDispatcher):void
+	{
+		var sm:ISystemManager = focusManager.form.systemManager;
+		var displayObject:DisplayObject = DisplayObject(swfBridgeGroup.getChildBridgeProvider(bridge));
+		if (displayObject)
+		{
+			var index:int = focusManager.focusableObjects.indexOf(displayObject);
+           	if (index != -1)
+			{
+				focusManager.focusableObjects.splice(index, 1);
+        	    focusManager.calculateCandidates = true;
+
+   			}
+
+		}
+	    else
+	    	throw new Error();		// should never get here.
+
+   		bridge.removeEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
+        bridge.removeEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST,
+                                    setShowFocusIndicatorRequestHandler);
+  		bridge.removeEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE,
+   					    		    bridgeEventActivateHandler);
+        swfBridgeGroup.removeChildBridge(bridge);
+	}
+
+	/**
+	 */
+	private function removeFromParentBridge(event:Event):void
+	{
+		// add ourselves to our parent focus manager if this is a bridged
+		// application not a dialog or other popup.
+		var sm:ISystemManager = focusManager.form.systemManager;
+		if (marshalSystemManager.useSWFBridge())
+		{
+			sm.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, removeFromParentBridge);
+
+			// have the child listen to move requests from the parent.
+			var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
+		    if (bridge)
+	    	{
+	       		bridge.removeEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
+                bridge.removeEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST,
+                                           setShowFocusIndicatorRequestHandler);
+	       	}
+
+	   		// add listener activate/deactivate requests
+	   		if (bridge && !(focusManager.form.systemManager is SystemManagerProxy))
+	   		{
+	   			bridge.removeEventListener(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST, focusRequestActivateHandler);
+	   			bridge.removeEventListener(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST, focusRequestDeactivateHandler);
+			   	bridge.removeEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE,
+			   				    		bridgeEventActivateHandler);
+	   		}
+		}
+	}
+
+	/**
+	 *  @private
+	 *
+	 *  Send a message to the parent to move focus a component in the parent.
+	 *
+	 *  @param shiftKey - if true move focus to a component
+	 *
+	 *  @return true if focus moved to parent, false otherwise.
+	 */
+    private function moveFocusToParent(shiftKey:Boolean):Boolean
+    {
+    	// trace("pass focus from " + this.form.systemManager.loaderInfo.url + " to parent ");
+		var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.MOVE_FOCUS_REQUEST,
+													false, true, null,
+													shiftKey ? FocusRequestDirection.BACKWARD :
+													  		   FocusRequestDirection.FORWARD);
+		var sandboxBridge:IEventDispatcher = marshalSystemManager.swfBridgeGroup.parentBridge;
+
+		// the handler will set the data property to whether focus changed
+		sandboxBridge.dispatchEvent(request);
+		focusManager.focusChanged = request.data;
+
+		return focusManager.focusChanged;
+    }
+
+    /**
+     *  Get the bridge to the parent focus manager.
+     *
+     *  @return parent bridge or null if there is no parent bridge.
+     */
+    private function getParentBridge():IEventDispatcher
+    {
+    	if (swfBridgeGroup)
+    		return swfBridgeGroup.parentBridge;
+
+		return null;
+    }
+
+
+    /**
+     *  @private
+     *
+     *  Send a request for all other focus managers to update
+     *  their ShowFocusIndicator property.
+     */
+    private function dispatchSetShowFocusIndicatorRequest(value:Boolean, skip:IEventDispatcher):void
+    {
+        var request:SWFBridgeRequest = new SWFBridgeRequest(
+                                            SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST,
+                                            false,
+                                            false,
+                                            null,   // bridge is set before it is dispatched
+                                            value);
+        dispatchEventFromSWFBridges(request, skip);
+    }
+
+	/**
+	 *  @private
+	 *
+	 *  Broadcast an ACTIVATED_FOCUS_MANAGER message.
+	 *
+	 *  @param eObj if a SandboxBridgeEvent, then propagate the message,
+	 * 			   if null, start a new message.
+	 */
+	private function dispatchActivatedFocusManagerEvent(skip:IEventDispatcher = null):void
+	{
+
+		// Don't send the ACTIVATED_FOCUS_MANAGER message if we are already
+		// active.
+       	if (lastActiveFocusManager == focusManager)
+       	{
+       		// trace("FM: dispatchActivatedFocusManagerEvent already active, skipping messages");
+       		return;		// already active
+       	}
+
+    	var event:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE);
+        dispatchEventFromSWFBridges(event, skip);
+	}
+
+	/**
+     *  A Focus Manager has its own set of child bridges that may be different from the child
+     *  bridges of its System Manager if the Focus Manager is managing a pop up. In the case of
+     *  a pop up don't send messages to the SM parent bridge because that will be the form. But
+     *  do send the messages to the bridges in bridgeFocusManagers dictionary.
+     */
+    private function dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null):void
+    {
+
+
+        var clone:Event;
+        // trace(">>dispatchEventFromSWFBridges", this, event.type);
+        var sm:ISystemManager = focusManager.form.systemManager;
+
+        if (!popup)
+        {
+            var parentBridge:IEventDispatcher = swfBridgeGroup.parentBridge;
+
+            if (parentBridge && parentBridge != skip)
+            {
+                // Ensure the requestor property has the correct bridge.
+                clone = event.clone();
+                if (clone is SWFBridgeRequest)
+                    SWFBridgeRequest(clone).requestor = parentBridge;
+
+                parentBridge.dispatchEvent(clone);
+            }
+        }
+
+        var children:Array = swfBridgeGroup.getChildBridges();
+        for (var i:int = 0; i < children.length; i++)
+        {
+            if (children[i] != skip)
+            {
+                // trace("send to child", i, event.type);
+                clone = event.clone();
+
+                // Ensure the requestor property has the correct bridge.
+                if (clone is SWFBridgeRequest)
+                    SWFBridgeRequest(clone).requestor = IEventDispatcher(children[i]);
+
+                IEventDispatcher(children[i]).dispatchEvent(clone);
+            }
+        }
+
+        // trace("<<dispatchEventFromSWFBridges", this, event.type);
+    }
+
+    /**
+     *  Move focus from the current control
+     *  to the previous or next control in the tab order.
+     *  The direction of the move is specified
+     *  with the direction argument.
+     *
+     *  @param direction FocusRequestDirection.FORWARD moves to
+     *  from the control that currently has focus to controls with a higher tab index.
+     *  If more than one control has the same index, the next control
+     *  in the flow of the document is visited.
+     *  FocusRequestDirection.BACKWARD moves to controls with
+     *  a lower tab index.
+     *  FocusRequestDirection.TOP move the focus to the control
+     *  with the lowest tab index. If more than one control has the same index,
+     *  focus is moved to the first control in the flow of the document.
+     *  FocusRequestDirection.BOTTOM move the focus to the control
+     *  with the highest tab index. If more than one control has the same index,
+     *  focus is moved to the last control in the flow of the document.
+     *
+     *  @param fromDisplayObject The starting point from which focus is moved.
+     *  If an object is provided, this overrides the default behavior
+     *  where focus is moved from the object that currently has focus.
+     */
+	public function moveFocus(direction:String, fromDisplayObject:DisplayObject = null):void
+	{
+	    if (direction == FocusRequestDirection.TOP)
+	    {
+	        setFocusToTop();
+	        return;
+	    }
+
+        if (direction == FocusRequestDirection.BOTTOM)
+        {
+            setFocusToBottom();
+            return;
+        }
+
+		var keyboardEvent:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN);
+		keyboardEvent.keyCode = Keyboard.TAB;
+		keyboardEvent.shiftKey = (direction == FocusRequestDirection.FORWARD) ? false : true;
+		focusManager.fauxFocus = fromDisplayObject;
+		focusManager.keyDownHandler(keyboardEvent);
+
+    	var focusEvent:FocusEvent = new FocusEvent(FocusEvent.KEY_FOCUS_CHANGE);
+    	focusEvent.keyCode = Keyboard.TAB;
+    	focusEvent.shiftKey = (direction == FocusRequestDirection.FORWARD) ? false : true;
+
+    	focusManager.keyFocusChangeHandler(focusEvent);
+
+		focusManager.fauxFocus = null;
+	}
+
+	/**
+	 *  @private
+	 */
+	private function setFocusToTop():void
+	{
+		focusManager.setFocusToNextIndex(-1, false);
+	}
+
+	/**
+	 *  @private
+	 */
+	private function setFocusToBottom():void
+	{
+		focusManager.setFocusToNextIndex(focusManager.focusableObjects.length, true);
+	}
+
+	private function addChildBridgeHandler(event:Event):void
+	{
+		var bridge:IEventDispatcher = event["bridge"];
+
+		addSWFBridge(bridge, event["owner"]);
+	}
+
+	private function removeChildBridgeHandler(event:Event):void
+	{
+		var bridge:IEventDispatcher = event["bridge"];
+
+		removeSWFBridge(bridge);
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8509
Author:   smgilson@adobe.com
Date:     2009-07-10T17:58:51.724217Z

Log Message:
-----------
- Explicitly list the default skins for Spark components as part of the fix for SDK-18639
- Fix some bad @see links

QE Notes: None
Doc Notes: None
Bugs: - SDK-18639
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

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

--- frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoItem.as
+++ frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoItem.as
@@ -17,7 +17,7 @@
  *  The StreamItem class represents a stream on the server plus a
  *  bitRate for that stream.
  *
- *  @see spark.controls.VideoPlayer
+ *  @see spark.components.VideoPlayer
  *  @see spark.primitives.VideoElement
  *
  *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 17372
Author:   gruehle@adobe.com
Date:     2010-08-18T23:23:45.776465Z

Log Message:
-----------
More mobile text feature work:
* Address all remaining TODOs in the code
* Alphabetize the properties in IEditableText and MobileTextField
* Add support for embedded fonts

QE notes: No
Doc notes: No
Bugs: SDK-27474
Reviewer: Jason Szeto
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<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/components/TextInput.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/mobilecomponents/src/spark/components/supportClasses/MobileTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/TextInput_border.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IEditableText.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/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
@@ -13,6 +13,7 @@
 {

 import flash.display.DisplayObject;
+import flash.text.TextLineMetrics;

 import spark.components.TextInput;
 import spark.components.supportClasses.MobileTextField;
@@ -36,6 +37,8 @@
     //--------------------------------------------------------------------------
     private static const HORIZONTAL_PADDING:int = 8;
     private static const VERTICAL_PADDING:int = 12;
+    private static const TEXT_WIDTH_PADDING:int = 4;
+    private static const TEXT_HEIGHT_PADDING:int = 2;

     //--------------------------------------------------------------------------
     //
@@ -99,9 +102,23 @@
     {
         super.measure();

-        // TODO: Don't use hard-coded values
-        measuredWidth = 440;
-        measuredHeight = 55;
+        // Use the size of "W" to determine measured size.
+        var textLineMetrics:TextLineMetrics = measureText("W");
+
+        // Width is based on maxChars (if set), or hard-coded to 440
+        if (hostComponent && hostComponent.maxChars)
+        {
+            // Use the width of "W" and multiply by maxChars
+            measuredWidth = textLineMetrics.width *
+                hostComponent.maxChars + HORIZONTAL_PADDING * 2
+                + TEXT_WIDTH_PADDING;
+        }
+        else
+        {
+            measuredWidth = 440;
+        }
+
+        measuredHeight = textLineMetrics.height + VERTICAL_PADDING * 2 + TEXT_HEIGHT_PADDING;
     }

     /**