Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/mx/src/mx/containers/ViewStack.as
+++ frameworks/projects/mx/src/mx/containers/ViewStack.as
@@ -0,0 +1,1308 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.containers
+{
+
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.events.Event;
+import mx.automation.IAutomationObject;
+import mx.core.Container;
+import mx.core.ContainerCreationPolicy;
+import mx.core.EdgeMetrics;
+import mx.managers.IHistoryManagerClient;
+import mx.core.IInvalidating;
+import mx.core.IUIComponent;
+import mx.core.ScrollPolicy;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.effects.Effect;
+import mx.effects.EffectManager;
+import mx.events.ChildExistenceChangedEvent;
+import mx.events.EffectEvent;
+import mx.events.FlexEvent;
+import mx.events.IndexChangedEvent;
+import mx.graphics.RoundedRectangle;
+import mx.managers.HistoryManager;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the selected child container changes.
+ *
+ *  @eventType mx.events.IndexChangedEvent.CHANGE
+ */
+[Event(name="change", type="mx.events.IndexChangedEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../styles/metadata/GapStyles.as"
+
+/**
+ *  Number of pixels between the container's bottom border and its content area.
+ *  The default value is 0.
+ */
+[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between the container's top border and its content area.
+ *  The default value is 0.
+ */
+[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="autoLayout", kind="property")]
+[Exclude(name="defaultButton", kind="property")]
+[Exclude(name="horizontalLineScrollSize", kind="property")]
+[Exclude(name="horizontalPageScrollSize", kind="property")]
+[Exclude(name="horizontalScrollBar", kind="property")]
+[Exclude(name="horizontalScrollPolicy", kind="property")]
+[Exclude(name="horizontalScrollPosition", kind="property")]
+[Exclude(name="maxHorizontalScrollPosition", kind="property")]
+[Exclude(name="maxVerticalScrollPosition", kind="property")]
+[Exclude(name="verticalLineScrollSize", kind="property")]
+[Exclude(name="verticalPageScrollSize", kind="property")]
+[Exclude(name="verticalScrollBar", kind="property")]
+[Exclude(name="verticalScrollPolicy", kind="property")]
+[Exclude(name="verticalScrollPosition", kind="property")]
+
+[Exclude(name="focusIn", kind="event")]
+[Exclude(name="focusOut", kind="event")]
+[Exclude(name="scroll", kind="event")]
+
+[Exclude(name="focusBlendMode", kind="style")]
+[Exclude(name="focusSkin", kind="style")]
+[Exclude(name="focusThickness", kind="style")]
+[Exclude(name="horizontalScrollBarStyleName", kind="style")]
+[Exclude(name="verticalScrollBarStyleName", kind="style")]
+
+[Exclude(name="focusInEffect", kind="effect")]
+[Exclude(name="focusOutEffect", kind="effect")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("ViewStack.png")]
+
+/**
+ *  A ViewStack navigator container consists of a collection of child
+ *  containers stacked on top of each other, where only one child
+ *  at a time is visible.
+ *  When a different child container is selected, it seems to replace
+ *  the old one because it appears in the same location.
+ *  However, the old child container still exists; it is just invisible.
+ *
+ *
A ViewStack container does not provide a user interface
+ *  for selecting which child container is currently visible.
+ *  Typically, you set its selectedIndex or
+ *  selectedChild property in ActionScript in response to
+ *  some user action. Alternately, you can associate a LinkBar, TabBar or ToggleButtonBar
+ *  container with a ViewStack container to provide a navigation interface.
+ *  To do so, specify the ViewStack container as the value of the
+ *  dataProvider property of the LinkBar, TabBar or
+ *  ToggleButtonBar container.

+ *
+ *
You might decide to use a more complex navigator container than the
+ *  ViewStack container, such as a TabNavigator container or Accordion
+ *  container. In addition to having a collection of child containers,
+ *  these containers provide their own user interface controls
+ *  for navigating between their children.

+ *
+ *
When you change the currently visible child container,
+ *  you can use the hideEffect property of the container being
+ *  hidden and the showEffect property of the newly visible child
+ *  container to apply an effect to the child containers.
+ *  The ViewStack container waits for the hideEffect of the child
+ *  container being hidden  to complete before it reveals the new child
+ *  container.
+ *  You can interrupt a currently playing effect if you change the
+ *  selectedIndex property of the ViewStack container
+ *  while an effect is playing.

+ *
+ *
The ViewStack container has the following default sizing characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Default size
+ *           The width and height of the initial active child.
+ *

+ *

+ *           Container resizing rules
+ *           By default, ViewStack containers are sized only once to fit the size of the
+ *               first child container. They do not resize when you navigate to other child
+ *               containers. To force ViewStack containers to resize when you navigate
+ *               to a different child container, set the resizeToContent property to true.
+ *

+ *

+ *           Child sizing rules
+ *           Children are sized to their default size. If the child is larger than the ViewStack
+ *               container, it is clipped. If the child is smaller than the ViewStack container,
+ *               it is aligned to the upper-left corner of the ViewStack container.
+ *

+ *

+ *           Default padding
+ *           0 pixels for top, bottom, left, and right values.
+ *

+ *

+ *
+ *  @mxml
+ *
+ *
The <mx:ViewStack> tag inherits the
+ *  tag attributes of its superclass, with the exception of scrolling-related
+ *  attributes, and adds the following tag attributes:

+ *
+ *

+ *  <mx:ViewStack
+ *    Properties
+ *    historyManagementEnabled="false|true"
+ *    resizeToContent="false|true"
+ *    selectedIndex="0"
+ *
+ *    Styles
+ *    horizontalGap="8"
+ *    paddingBottom="0"
+ *    paddingTop="0"
+ *    verticalGap="6"
+ *
+ *    Events
+ *    change="No default"
+ *    >
+ *      ...
+ *      child tags
+ *      ...
+ *  </mx:ViewStack>
+ *

+ *
+ *  @includeExample examples/ViewStackExample.mxml
+ *
+ *  @see mx.controls.LinkBar
+ *  @see mx.managers.HistoryManager
+ *  @see mx.managers.LayoutManager
+ */
+public class ViewStack extends Container implements IHistoryManagerClient
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function ViewStack()
+	{
+		super();
+
+		addEventListener(ChildExistenceChangedEvent.CHILD_ADD, childAddHandler);
+		addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE,
+						 childRemoveHandler);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var needToInstantiateSelectedChild:Boolean = false;
+
+	/**
+	 *  @private
+	 *  This flag gets set when selectedIndex is set.
+	 *  Later, when measure()
+	 *  is called, it causes the HistoryManager to save the state.
+	 */
+	private var bSaveState:Boolean = false;
+
+	/**
+	 *  @private
+	 *  This flag gets set by loadState().
+	 *  It prevents the newly restored state from being saved.
+	 */
+	private var bInLoadState:Boolean = false;
+
+	/**
+	 *  @private
+	 *  True until commitProperties has been called at least once.
+	 */
+	private var firstTime:Boolean = true;
+
+	/**
+	 *  @private
+	 *  We'll measure ourselves once and then store the results here
+	 *  for the lifetime of the ViewStack
+	 */
+	mx_internal var vsMinWidth:Number;
+	mx_internal var vsMinHeight:Number;
+	mx_internal var vsPreferredWidth:Number;
+	mx_internal var vsPreferredHeight:Number;
+
+	/**
+	 *  @private
+	 *  Remember which child has an overlay mask, if any.
+	 */
+	private var overlayChild:Container;
+
+	/**
+	 *  @private
+	 *  Keep track of the overlay's targetArea
+	 */
+	private var overlayTargetArea:RoundedRectangle;
+
+	/**
+	 *  @private
+	 *  Store the last selectedIndex
+	 */
+	private var lastIndex:int = -1;
+
+	/**
+	 *  @private
+	 *  Whether a change event has to be dispatched in commitProperties()
+	 */
+	private var dispatchChangeEventPending:Boolean = false;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  autoLayout
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  autoLayout is always true for ViewStack.
+	 */
+	override public function get autoLayout():Boolean
+	{
+		return true;
+	}
+
+	/**
+	 *  @private
+	 *  autoLayout is always true for ViewStack
+	 *  and can't be changed by this setter.
+	 *
+	 *  We can probably find a way to make autoLayout work with Accordion
+	 *  and ViewStack, but right now there are problems if deferred
+	 *  instantiation runs at the same time as an effect. (Bug 79174)
+	 */
+	override public function set autoLayout(value:Boolean):void
+	{
+	}
+
+	//----------------------------------
+	//  horizontalScrollPolicy
+	//----------------------------------
+
+	[Inspectable(environment="none")]
+
+	/**
+	 *  @private
+	 *  horizontalScrollPolicy is always OFF for ViewStack.
+	 */
+	override public function get horizontalScrollPolicy():String
+	{
+		return ScrollPolicy.OFF;
+	}
+
+	/**
+	 *  @private
+	 *  horizontalScrollPolicy is always OFF for ViewStack
+	 *  and can't be changed by this setter.
+	 */
+	override public function set horizontalScrollPolicy(value:String):void
+	{
+	}
+
+	//----------------------------------
+	//  verticalScrollPolicy
+	//----------------------------------
+
+	[Inspectable(environment="none")]
+
+	/**
+	 *  @private
+	 *  verticalScrollPolicy is always OFF for ViewStack.
+	 */
+	override public function get verticalScrollPolicy():String
+	{
+		return ScrollPolicy.OFF;
+	}
+
+	/**
+	 *  @private
+	 *  verticalScrollPolicy is always OFF for ViewStack
+	 *  and can't be changed by this setter.
+	 */
+	override public function set verticalScrollPolicy(value:String):void
+	{
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  contentHeight
+	//----------------------------------
+
+	/**
+	 *  The height of the area, in pixels, in which content is displayed.
+	 *  You can override this getter if your content
+	 *  does not occupy the entire area of the ViewStack container.
+	 */
+	protected function get contentHeight():Number
+	{
+		var vm:EdgeMetrics = viewMetricsAndPadding;
+		return unscaledHeight - vm.top - vm.bottom;
+	}
+
+	//----------------------------------
+	//  contentWidth
+	//----------------------------------
+
+	/**
+	 *  The width of the area, in pixels, in which content is displayed.
+	 *  You can override this getter if your content
+	 *  does not occupy the entire area of the ViewStack container.
+	 */
+	protected function get contentWidth():Number
+	{
+		var vm:EdgeMetrics = viewMetricsAndPadding;
+		return unscaledWidth - vm.left - vm.right;
+	}
+
+	//----------------------------------
+	//  contentX
+	//----------------------------------
+
+	/**
+	 *  The x coordinate of the area of the ViewStack container
+	 *  in which content is displayed, in pixels.
+	 *  The default value is equal to the value of the
+	 *  paddingLeft style property,
+	 *  which has a default value of 0.
+	 *
+	 *  Override the get() method if you do not want
+	 *  your content to start layout at x = 0.
+	 */
+	protected function get contentX():Number
+	{
+		return getStyle("paddingLeft");
+	}
+
+	//----------------------------------
+	//  contentY
+	//----------------------------------
+
+	/**
+	 *  The y coordinate of the area of the ViewStack container
+	 *  in which content is displayed, in pixels.
+	 *  The default value is equal to the value of the
+	 *  paddingTop style property,
+	 *  which has a default value of 0.
+	 *
+	 *  Override the get() method if you do not want
+	 *  your content to start layout at y = 0.
+	 */
+	protected function get contentY():Number
+	{
+		return getStyle("paddingTop");
+	}
+
+	//----------------------------------
+	//  historyManagementEnabled
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the historyManagementEnabled property.
+	 */
+	mx_internal var _historyManagementEnabled:Boolean = false;
+
+	/**
+	 *  @private
+	 */
+	private var historyManagementEnabledChanged:Boolean = false;
+
+	[Inspectable(defaultValue="true")]
+
+	/**
+	 *  If true, enables history management
+	 *  within this ViewStack container.
+	 *  As the user navigates from one child to another,
+	 *  the browser remembers which children were visited.
+	 *  The user can then click the browser's Back and Forward buttons
+	 *  to move through this navigation history.
+	 *
+	 *  @default false
+	 *
+	 *  @see mx.managers.HistoryManager
+	 */
+	public function get historyManagementEnabled():Boolean
+	{
+		return _historyManagementEnabled;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set historyManagementEnabled(value:Boolean):void
+	{
+		if (value != _historyManagementEnabled)
+		{
+			_historyManagementEnabled = value;
+			historyManagementEnabledChanged = true;
+
+			invalidateProperties();
+		}
+	}
+
+	//----------------------------------
+	//  resizeToContent
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the resizeToContent property.
+	 */
+	private var _resizeToContent:Boolean = false;
+
+	/**
+	 *  If true, the ViewStack container automatically
+	 *  resizes to the size of its current child.
+	 *
+	 *  @default false
+	 */
+	public function get resizeToContent():Boolean
+	{
+		return _resizeToContent;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set resizeToContent(value:Boolean):void
+	{
+		if (value != _resizeToContent)
+		{
+			_resizeToContent = value;
+
+			if (value)
+				invalidateSize();
+		}
+	}
+
+	//----------------------------------
+	//  selectedChild
+	//----------------------------------
+
+	[Bindable("valueCommit")]
+
+	/**
+	 *  A reference to the currently visible child container.
+	 *  The default is a reference to the first child.
+	 *  If there are no children, this property is null.
+	 *
+	 *
Note: You can only set this property in an
+	 *  ActionScript statement, not in MXML.

+	 */
+	public function get selectedChild():Container
+	{
+		if (selectedIndex == -1)
+			return null;
+
+		return Container(getChildAt(selectedIndex));
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set selectedChild(
+							value:Container):void
+	{
+		var newIndex:int = getChildIndex(DisplayObject(value));
+
+		if (newIndex >= 0 && newIndex < numChildren)
+			selectedIndex = newIndex;
+	}
+
+	//----------------------------------
+	//  selectedIndex
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the selectedIndex property.
+	 */
+	private var _selectedIndex:int = -1;
+
+	/**
+	 *  @private
+	 */
+	private var proposedSelectedIndex:int = -1;
+
+	/**
+	 *  @private
+	 */
+	private var initialSelectedIndex:int = -1;
+
+	[Bindable("change")]
+	[Bindable("valueCommit")]
+	[Inspectable(category="General")]
+
+	/**
+	 *  The zero-based index of the currently visible child container.
+	 *  Child indexes are in the range 0, 1, 2, ..., n - 1,
+	 *  where n is the number of children.
+	 *  The default value is 0, corresponding to the first child.
+	 *  If there are no children, the value of this property is -1.
+	 *
+	 *
Note: When you add a new child to a ViewStack
+	 *  container, the selectedIndex property is automatically
+	 *  adjusted, if necessary, so that the selected child remains selected.

+	 */
+	public function get selectedIndex():int
+	{
+		return proposedSelectedIndex == -1 ?
+			   _selectedIndex :
+			   proposedSelectedIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set selectedIndex(value:int):void
+	{
+		// Bail if the index isn't changing.
+		if (value == selectedIndex)
+			return;
+
+		// Propose the specified value as the new value for selectedIndex.
+		// It gets applied later when measure() calls commitSelectedIndex().
+		// The proposed value can be "out of range", because the children
+		// may not have been created yet, so the range check is handled
+		// in commitSelectedIndex(), not here. Other calls to this setter
+		// can change the proposed index before it is committed. Also,
+		// childAddHandler() proposes a value of 0 when it creates the first
+		// child, if no value has yet been proposed.
+		proposedSelectedIndex = value;
+		invalidateProperties();
+
+		// Set a flag which will cause the HistoryManager to save state
+		// the next time measure() is called.
+		if (historyManagementEnabled && _selectedIndex != -1 && !bInLoadState)
+			bSaveState = true;
+
+		dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: UIComponent
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function commitProperties():void
+	{
+		super.commitProperties();
+
+		if (historyManagementEnabledChanged)
+		{
+			if (historyManagementEnabled)
+				HistoryManager.register(this);
+			else
+				HistoryManager.unregister(this);
+
+			historyManagementEnabledChanged = false;
+		}
+
+		if (proposedSelectedIndex != -1)
+		{
+			commitSelectedIndex(proposedSelectedIndex);
+			proposedSelectedIndex = -1;
+		}
+
+		if (needToInstantiateSelectedChild)
+		{
+			instantiateSelectedChild();
+			needToInstantiateSelectedChild = false;
+		}
+
+		// Dispatch the change event only after the child has been
+		// instantiated.
+		if (dispatchChangeEventPending)
+		{
+			dispatchChangeEvent(lastIndex, selectedIndex);
+			dispatchChangeEventPending = false;
+		}
+
+		if (firstTime)
+		{
+			firstTime = false;
+
+			// Add "added" and "removed" listeners to the system manager so we can
+			// register/un-register from the history manager when this component is
+			// added or removed from the display list.
+			systemManager.addEventListener(Event.ADDED, systemManager_addedHandler,
+					false, 0, true);
+			systemManager.addEventListener(Event.REMOVED, systemManager_removedHandler,
+					false, 0, true);
+		}
+
+	}
+
+	/**
+	 *  Calculates the default sizes and minimum and maximum values of the
+	 *  ViewStack container.
+	 *  For more information about the measure() method,
+	 *  see the UIComponent.measure() method.
+	 *
+	 *
The default size of a ViewStack container is the default size
+	 *  of its currently selected child, plus the padding and borders.
+	 *  If the ViewStack container has no children, its default size
+	 *  is just large enough for its padding and borders.

+	 *
+	 *
The minimum size of a ViewStack container is the minimum size
+	 *  of its currently selected child, plus the padding and borders.
+	 *  If the ViewStack container has no children, its minimum size
+	 *  is just large enough for its padding and borders.

+	 *
+	 *
This method does not change the maximum size of a ViewStack
+	 *  container - it remains unbounded.

+	 *
+	 *  @see mx.core.UIComponent#measure()
+	 */
+	override protected function measure():void
+	{
+		super.measure();
+
+		// A ViewStack measures itself based only on its selectedChild.
+		// The minimum, maximum, and preferred sizes are those of the
+		// selected child, plus the borders and margins.
+		var minWidth:Number = 0;
+		var minHeight:Number = 0;
+		var preferredWidth:Number = 0;
+		var preferredHeight:Number = 0;
+
+		// Only measure once.  Thereafter, we'll just use cached values.
+		//
+		// We need to copy the cached values into the measured fields
+		// again to handle the case where scaleX or scaleY is not 1.0.
+		// When the ViewStack is zoomed, code in UIComponent.measureSizes
+		// scales the measuredWidth/Height values every time that
+		// measureSizes is called.  (bug 100749)
+		if (vsPreferredWidth && !_resizeToContent)
+		{
+			measuredMinWidth = vsMinWidth;
+			measuredMinHeight = vsMinHeight;
+			measuredWidth = vsPreferredWidth;
+			measuredHeight = vsPreferredHeight;
+			return;
+		}
+
+		if (numChildren > 0 && selectedIndex != -1)
+		{
+			var child:Container =
+				Container(getChildAt(selectedIndex));
+
+			minWidth = child.minWidth;
+			preferredWidth = child.getExplicitOrMeasuredWidth();
+
+			minHeight = child.minHeight;
+			preferredHeight = child.getExplicitOrMeasuredHeight();
+		}
+
+		var vm:EdgeMetrics = viewMetricsAndPadding;
+
+		var wPadding:Number = vm.left + vm.right;
+		minWidth += wPadding;
+		preferredWidth += wPadding;
+
+		var hPadding:Number = vm.top + vm.bottom;
+		minHeight += hPadding;
+		preferredHeight += hPadding;
+
+		measuredMinWidth = minWidth;
+		measuredMinHeight = minHeight;
+		measuredWidth = preferredWidth;
+		measuredHeight = preferredHeight;
+
+		// If we're called before instantiateSelectedChild, then bail.
+		// We'll be called again later (instantiateSelectedChild calls
+		// invalidateSize), and we don't want to load values into the
+		// cache until we're fully initialized.  (bug 102639)
+		// This check was moved from the beginning of this function to
+		// here to fix bug 103665.
+		if (selectedChild && Container(selectedChild).numChildrenCreated == -1)
+			return;
+
+		// Don't remember sizes if we don't have any children
+		if (numChildren == 0)
+			return;
+
+		vsMinWidth = minWidth;
+		vsMinHeight = minHeight;
+		vsPreferredWidth = preferredWidth;
+		vsPreferredHeight = preferredHeight;
+	}
+
+	/**
+	 *  Responds to size changes by setting the positions and sizes
+	 *  of this container's children.
+	 *  For more information about the updateDisplayList() method,
+	 *  see the UIComponent.updateDisplayList() method.
+	 *
+	 *
Only one of its children is visible at a time, therefore,
+	 *  a ViewStack container positions and sizes only that child.

+	 *
+	 *
The selected child is positioned in the ViewStack container's
+	 *  upper-left corner, and allows for the ViewStack container's
+	 *  padding and borders.

+	 *
+	 *
If the selected child has a percentage width or
+	 *  height value, it is resized in that direction
+	 *  to fill the specified percentage of the ViewStack container's
+	 *  content area (i.e., the region inside its padding).

+	 *
+     *  @param unscaledWidth Specifies the width of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleX property of the component.
+     *
+     *  @param unscaledHeight Specifies the height of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleY property of the component.
+	 *
+	 *  @see mx.core.UIComponent#updateDisplayList()
+	 */
+	override protected function updateDisplayList(unscaledWidth:Number,
+												  unscaledHeight:Number):void
+	{
+		super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+		var nChildren:int = numChildren;
+		var w:Number = contentWidth;
+		var h:Number = contentHeight;
+		var left:Number = contentX;
+		var top:Number = contentY;
+
+		// Stretch the selectedIndex to fill our size
+		if (selectedIndex != -1)
+		{
+			var child:Container =
+				Container(getChildAt(selectedIndex));
+
+			var newWidth:Number = w;
+			var newHeight:Number = h;
+
+			if (!isNaN(child.percentWidth))
+			{
+				if (newWidth > child.maxWidth)
+					newWidth = child.maxWidth;
+			}
+			else
+			{
+				if (newWidth > child.explicitWidth)
+					newWidth = child.explicitWidth;
+			}
+
+			if (!isNaN(child.percentHeight))
+			{
+				if (newHeight > child.maxHeight)
+					newHeight = child.maxHeight;
+			}
+			else
+			{
+				if (newHeight > child.explicitHeight)
+					newHeight = child.explicitHeight;
+			}
+
+			// Don't send events for the size/move. The set visible below
+			if (child.width != newWidth || child.height != newHeight)
+				child.setActualSize(newWidth, newHeight);
+			if (child.x != left || child.y != top)
+				child.move(left, top);
+
+			// Now that the child is properly sized and positioned it
+			// can be shown.
+			child.visible = true;
+		}
+	}
+
+	/**
+	 *  @private
+	 *  When asked to create an overlay mask, create it on the selected child
+	 *  instead. That way, the chrome around the edge of the ViewStack
+	 *  (e.g. the tabs in a TabNavigator) is not occluded by the overlay mask
+	 *  (Bug 99029)
+	 */
+	override mx_internal function addOverlay(color:uint,
+										targetArea:RoundedRectangle = null):void
+	{
+		// As we're switching the currently-selected child, don't
+		// allow two children to both have an overlay at the same time.
+		// This is done because it makes accounting a headache.  If there's
+		// a legitimate reason why two children both need overlays, this
+		// restriction could be relaxed.
+		if (overlayChild)
+			removeOverlay();
+
+		// Remember which child has an overlay, so that we don't inadvertently
+		// create an overlay on one child and later try to remove the overlay
+		// of another child. (bug 100731)
+		overlayChild = selectedChild;
+		if (!overlayChild)
+			return;
+
+		overlayColor = color;
+		overlayTargetArea = targetArea;
+
+		if (selectedChild &&
+			selectedChild.numChildrenCreated == -1)
+			// No children have been created
+		{
+			// Wait for the childrenCreated event before creating the overlay
+			selectedChild.addEventListener(FlexEvent.INITIALIZE,
+										   initializeHandler);
+		}
+		else // Children already exist
+		{
+			initializeHandler(null);
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override mx_internal function removeOverlay():void
+	{
+		if (overlayChild)
+		{
+			UIComponent(overlayChild).removeOverlay();
+			overlayChild = null;
+		}
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: Container
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override mx_internal function setActualCreationPolicies(policy:String):void
+	{
+		super.setActualCreationPolicies(policy);
+
+		// If the creation policy is switched to ContainerCreationPolicy.ALL
+		// and our createComponentsFromDescriptors() method has already been
+		// called (we've created our children but not all our grandchildren),
+		// then create all our grandchildren now. (Bug 99160)
+		if (policy == ContainerCreationPolicy.ALL && numChildren > 0)
+		{
+			for (var i:int = 0; i < numChildren; i++)
+			{
+				var containerChild:Container =
+					getChildAt(i) as Container;
+
+				if (containerChild && containerChild.numChildrenCreated == -1)
+					containerChild.createComponentsFromDescriptors();
+			}
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function createComponentsFromDescriptors(
+									recurse:Boolean = true):void
+	{
+		// The easiest way to handle the ContainerCreationPolicy.ALL policy
+		// is to let Container's implementation of
+		// createComponentsFromDescriptors() handle it.
+		if (actualCreationPolicy == ContainerCreationPolicy.ALL)
+		{
+			super.createComponentsFromDescriptors();
+			return;
+		}
+
+		// If the policy is ContainerCreationPolicy.AUTO, ViewStack
+		// instantiates its children immediately, but not any grandchildren.
+		// The children of the selected child will get created in
+		// instantiateSelectedChild().
+		// Why not create the grandchildren of the selected child by calling
+		//    createComponentFromDescriptor(childDescriptors[i],
+		//                                  i == selectedIndex);
+		// in the loop below? Because one of this ViewStacks's childDescriptors
+		// may be for a Repeater, in which case the following loop over the
+		// childDescriptors is not the same as a loop over the children.
+		// In particular, selectedIndex is supposed to specify the nth
+		// child, not the nth childDescriptor, and the 2nd parameter of
+		// createComponentFromDescriptor() should make the recursion happen
+		// on the nth child, not the nth childDescriptor.
+		var numChildrenBefore:int = numChildren;
+		var n:int = childDescriptors ? childDescriptors.length : 0;
+		for (var i:int = 0; i < n; i++)
+		{
+			createComponentFromDescriptor(childDescriptors[i], false);
+		}
+
+		numChildrenCreated = numChildren - numChildrenBefore;
+
+		processedDescriptors = true;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: IHistoryManagerClient
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @copy mx.managers.IHistoryManagerClient#saveState()
+	 */
+	public function saveState():Object
+	{
+		var index:int = _selectedIndex == -1 ? 0 : _selectedIndex;
+		return { selectedIndex: index };
+	}
+
+	/**
+	 *  @copy mx.managers.IHistoryManagerClient#loadState()
+	 */
+	public function loadState(state:Object):void
+	{
+		var newIndex:int = state ? int(state.selectedIndex) : 0;
+
+		if (newIndex == -1)
+			newIndex = initialSelectedIndex;
+
+		if (newIndex == -1)
+			newIndex = 0;
+
+		if (newIndex != _selectedIndex)
+		{
+			// When loading a new state, we don't want to
+			// save our current state in the history stack.
+			bInLoadState = true;
+			selectedIndex = newIndex;
+			bInLoadState = false;
+		}
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Commits the selected index. This function is called during the commit
+	 *  properties phase when the selectedIndex (or selectedItem) property
+	 *  has changed.
+	 */
+	protected function commitSelectedIndex(newIndex:int):void
+	{
+		// The selectedIndex must be -1 if there are no children,
+		// even if a selectedIndex has been proposed.
+		if (numChildren == 0)
+		{
+			_selectedIndex = -1;
+			return;
+		}
+
+		// If there are children, ensure that the new index is in bounds.
+		if (newIndex < 0)
+			newIndex = 0;
+		else if (newIndex > numChildren - 1)
+			newIndex = numChildren - 1;
+
+		// Stop all currently playing effects
+		if (lastIndex != -1 && lastIndex < numChildren)
+			Container(getChildAt(lastIndex)).endEffectsStarted();
+
+		if (_selectedIndex != -1)
+			selectedChild.endEffectsStarted();
+
+		// Remember the old index.
+		lastIndex = _selectedIndex;
+
+		// Bail if the index isn't changing.
+		if (newIndex == lastIndex)
+			return;
+
+		// Commit the new index.
+		_selectedIndex = newIndex;
+
+		// Remember our initial selected index so we can
+		// restore to our default state when the history
+		// manager requests it.
+		if (initialSelectedIndex == -1)
+			initialSelectedIndex = _selectedIndex;
+
+		// Only dispatch a change event if we're going to and from
+		// a valid index
+		if (lastIndex != -1 && newIndex != -1)
+			dispatchChangeEventPending = true;
+
+		var listenForEffectEnd:Boolean = false;
+
+		if (lastIndex != -1 && lastIndex < numChildren)
+		{
+			var currentChild:Container = Container(getChildAt(lastIndex));
+
+			currentChild.setVisible(false); // Hide the current child
+
+			if (currentChild.getStyle("hideEffect"))
+			{
+				var hideEffect:Effect = EffectManager.lastEffectCreated; // This should be the hideEffect
+
+				if (hideEffect)
+				{
+					hideEffect.addEventListener(EffectEvent.EFFECT_END, hideEffectEndHandler);
+					listenForEffectEnd = true;
+				}
+			}
+		}
+
+		// If we don't have to wait for a hide effect to finish
+		if (!listenForEffectEnd)
+			hideEffectEndHandler(null);
+	}
+
+	private function hideEffectEndHandler(event:EffectEvent):void
+	{
+		if (event)
+			event.currentTarget.removeEventListener(EffectEvent.EFFECT_END, hideEffectEndHandler);
+
+		// Give any change handlers a chance to act before we
+		// instantiate our pane (which eats up all the processing cycles)
+		needToInstantiateSelectedChild = true;
+		invalidateProperties();
+
+		if (bSaveState)
+		{
+			HistoryManager.save();
+			bSaveState = false;
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	private function instantiateSelectedChild():void
+	{
+		if (!selectedChild)
+			return;
+
+		// Performance optimization: don't call createComponents if we know
+		// that createComponents has already been called.
+		if (selectedChild && selectedChild.numChildrenCreated == -1)
+		{
+			if (initialized)  // Only listen if the ViewStack has already been initialized.
+				selectedChild.addEventListener(FlexEvent.CREATION_COMPLETE,childCreationCompleteHandler);
+			selectedChild.createComponentsFromDescriptors(true);
+		}
+
+		// Do the initial measurement/layout pass for the
+		// newly-instantiated descendants.
+
+		if (selectedChild is IInvalidating)
+			IInvalidating(selectedChild).invalidateSize();
+
+		invalidateSize();
+		invalidateDisplayList();
+	}
+
+	/**
+	 *  @private
+	 */
+	private function dispatchChangeEvent(oldIndex:int, newIndex:int):void
+	{
+		var event:IndexChangedEvent =
+			new IndexChangedEvent(IndexChangedEvent.CHANGE);
+		event.oldIndex = oldIndex;
+		event.newIndex = newIndex;
+		event.relatedObject = getChildAt(newIndex);
+        dispatchEvent(event);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Event handlers
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Handles "added" event from system manager
+	 */
+	private function systemManager_addedHandler(event:Event):void
+	{
+		if (event.target is DisplayObjectContainer &&
+				DisplayObjectContainer(event.target).contains(this))
+		{
+			if (historyManagementEnabled)
+				HistoryManager.register(this);
+		}
+	}
+
+	/**
+	 *  @private
+	 *  Handles "removed" event from system manager
+	 */
+	private function systemManager_removedHandler(event:Event):void
+	{
+		if (event.target is DisplayObjectContainer &&
+				DisplayObjectContainer(event.target).contains(this))
+			HistoryManager.unregister(this);
+	}
+
+	/**
+	 *  @private
+	 *  Called when we are running a Dissolve effect
+	 *  and the initialize event has been dispatched
+	 *  or the children already exist
+	 */
+	private function initializeHandler(event:FlexEvent):void
+	{
+		overlayChild.removeEventListener(FlexEvent.INITIALIZE,
+										 initializeHandler);
+
+		UIComponent(overlayChild).addOverlay(overlayColor, overlayTargetArea);
+	}
+
+	/**
+	 *  @private
+	 *  Handles when the new selectedChild has finished being created.
+	 */
+	private function childCreationCompleteHandler(event:FlexEvent):void
+	{
+		event.target.removeEventListener(FlexEvent.CREATION_COMPLETE,childCreationCompleteHandler);
+		event.target.dispatchEvent(new FlexEvent(FlexEvent.SHOW));
+
+	}
+
+	/**
+	 *  @private
+	 */
+    private function childAddHandler(event:ChildExistenceChangedEvent):void
+	{
+		var child:DisplayObject = event.relatedObject;
+		var index:int = getChildIndex(child);
+
+		if (child is IUIComponent)
+		{
+			var uiChild:IUIComponent = IUIComponent(child);
+			// ViewStack creates all of its children initially invisible.
+			// They are made as they become the selected child.
+			uiChild.visible = false;
+		}
+
+		// If we just created the first child and no selected index has
+		// been proposed, then propose this child to be selected.
+		if (numChildren == 1 && proposedSelectedIndex == -1)
+		{
+			proposedSelectedIndex = 0;
+			invalidateProperties();
+		}
+		else if (index <= _selectedIndex && numChildren > 1)
+		{
+			selectedIndex++;
+		}
+
+		if (child as IAutomationObject);
+			IAutomationObject(child).showInAutomationHierarchy = true;
+
+	}
+
+	/**
+	 *  @private
+	 *  When a child is removed, adjust the selectedIndex such that the current
+	 *  child remains selected; or if the current child was removed, then the
+	 *  next (or previous) child gets automatically selected; when the last
+	 *  remaining child is removed, the selectedIndex is set to -1.
+	 */
+	private function childRemoveHandler(event:ChildExistenceChangedEvent):void
+	{
+		var child:DisplayObject = event.relatedObject;
+		var index:int = getChildIndex(child);
+
+		// Handle the simple case.
+		if (index > selectedIndex)
+			return;
+
+		var currentSelectedIndex:int = selectedIndex;
+
+		// This matches one of the two conditions:
+		// 1. a view before the current was deleted, or
+		// 2. the current view was deleted and it was also
+		//    at the end of the stack.
+		// In both cases, we need to decrement selectedIndex.
+		if (index < currentSelectedIndex ||
+			currentSelectedIndex == (numChildren - 1))
+		{
+			// If the selectedIndex was already 0, it should go to -1.
+			// -1 is a special value; in order to avoid runtime errors
+			// in various methods, we need to skip the range checking in
+			// commitSelectedIndex() and set _selectedIndex explicitly here.
+			if (currentSelectedIndex == 0)
+			{
+				selectedIndex = -1;
+				_selectedIndex = -1;
+			}
+			else
+			{
+				selectedIndex--;
+			}
+		}
+		else if (index == currentSelectedIndex)
+		{
+			// If we're deleting the currentSelectedIndex and there is another
+			// child after it, it will become the new selected child so we
+			// need to make sure it is instantiated.
+			needToInstantiateSelectedChild = true;
+			invalidateProperties();
+		}
+	}
+}
+
+}


before commiting delete

before commiting delete

--- Arguments/src/Model/ArgumentTypeModel.as
+++ Arguments/src/Model/ArgumentTypeModel.as
@@ -366,7 +366,5 @@
 			argumentTypeModel.ID = obj.connID;
 			return argumentTypeModel;
 		}
-
-
 	}
 }


lock hand

lock hand


prefBitrate, maxBitrate, minBitrate support added

--- KalturaHLSPlugin/src/KalturaHLSPlugin.as
+++ KalturaHLSPlugin/src/KalturaHLSPlugin.as
@@ -33,6 +33,11 @@
 		private var _initialBufferTime:int = -1; // initial buffer length till the moment the video starts playing
 		private var _expandedBufferTime:int = -1; // acctual buffer length while the video is playing
 		private var _maxBufferTime:int = -1; // maximum buffer length while the video is playing
+
+		private var _minBitrate:int = -1; // minimum bitrate allowed for ABR while the video is playing (will be passed by JS at initial state)
+		private var _maxBitrate:int = -1; // maximum bitrate allowed for ABR while the video is playing (will be passed by JS at initial state)
+		private var _prefBitrate:int = -1; // prefared bitrate - the video will start playing on this bitrate and stay fixed on it (will be passed by JS at initial state)
+
 		private var _sendLogs:Boolean = false;

         public function KalturaHLSPlugin()
@@ -77,6 +82,30 @@

 		public function set maxBufferTime(value:int):void{
 			_maxBufferTime = value;
+		}
+
+		public function get minBitrate():int{
+			return _minBitrate;
+		}
+
+		public function set minBitrate(value:int):void{
+			_minBitrate = value;
+		}
+
+		public function get maxBitrate():int{
+			return _maxBitrate;
+		}
+
+		public function set maxBitrate(value:int):void{
+			_maxBitrate = value;
+		}
+
+		public function get prefBitrate():int{
+			return _prefBitrate;
+		}
+
+		public function set prefBitrate(value:int):void{
+			_prefBitrate = value;
 		}

 		public function get sendLogs():Boolean{
@@ -128,6 +157,16 @@
 				if (maxBufferTime != -1){
 					HLSManifestParser.MAX_BUFFER_AMOUNT = maxBufferTime; //How many seconds of video data should we keep in the buffer before giving up on downloading for a while
 				}
+				if (minBitrate != -1){
+					HLSManifestParser.MIN_BITRATE = minBitrate; // minimum bitrate allowed for ABR while the video is playing
+				}
+				if (maxBitrate != -1){
+					HLSManifestParser.MAX_BITRATE = maxBitrate; // maximum bitrate allowed for ABR while the video is playing
+				}
+				if (prefBitrate != -1){
+					HLSManifestParser.PREF_BITRATE = prefBitrate; // prefared bitrate - the video will start playing on this bitrate and stay fixed on it
+				}
+
 				if (sendLogs){
 					M2TSFileHandler.SEND_LOGS = true;
 					HLSManifestParser.SEND_LOGS = true;


don't require models to implement IBead

don't require models to implement IBead

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
@@ -125,8 +125,8 @@

         private function initHandler(event:flash.events.Event):void
         {
-			if (model) addBead(model as IBead);
-			if (controller) addBead(controller as IBead);
+			if (model is IBead) addBead(model as IBead);
+			if (controller is IBead) addBead(controller as IBead);

             MouseEventConverter.setupAllConverters(stage);


Transferred from the Adobe Open Source Subversion Repository

Revision: 17033
Author:   chiedozi@adobe.com
Date:     2010-07-23T07:27:59.569540Z

Log Message:
-----------
Fixed a RTE that occurred when a slide transition was run when no ActionBar was visible
Fixed a RTE that occurred when the slide transition failed to generated valid bitmaps
Fixed a bug in ActionBarSkin and ViewNavigatorSkin where content groups could have negative sizes

QE notes:
Doc notes:
Bugs: SDK-26996, SDK-26997
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

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/effects/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -86,6 +86,8 @@
         var right:Number = unscaledWidth;

         // Position groups
+		// FIXME (chiedozi): Prevent measurements from being negative.  Figure out
+		// minimums for each group.
         if (navigationGroup.numElements > 0 && navigationGroup.includeInLayout)
         {
             left += navigationGroup.measuredWidth;
@@ -99,8 +101,12 @@
             actionGroup.setLayoutBoundsSize(unscaledWidth - right, unscaledHeight);
         }

+		var titleGroupWidth:Number = right - left;
+		if (titleGroupWidth < 0)
+			titleGroupWidth = 0;
+
         titleGroup.setLayoutBoundsPosition(left, 0);
-        titleGroup.setLayoutBoundsSize(right - left, unscaledHeight);
+        titleGroup.setLayoutBoundsSize(titleGroupWidth, unscaledHeight);

         // Draw background
         var g:Graphics = backgroundFill.graphics;


Transferred from the Adobe Open Source Subversion Repository

Revision: 20097
Author:   jasonsj@adobe.com
Date:     2011-02-03T17:48:25.773740Z

Log Message:
-----------
Remove use of minWidth and minHeight where possible from mobile skins to fix constraint use cases. Replace usage of minWidth/minHeight and layoutMeasuredWidth/layoutMeasuredHeight with MobileSkin property measuredDefaultWidth/measuredDefaultHeight.

Use minWidth/minHeight for skins that do not scale down: Beveled buttons, CheckBox, RadioButton, and scroll bars.

Doc notes:
Bugs:
SDK-28715 Cannot size and position button correctly in i4 build.
Reviewer: egeorgie
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/BeveledActionButtonSkin.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/ButtonBarFirstButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.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/ButtonBarMiddleButtonSkin.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/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TabbedViewNavigatorTabBarTabSkinBase.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/ButtonBarLastButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ImageSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.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/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.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/HSliderThumbSkin.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/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
@@ -61,9 +61,8 @@
             {
                 borderClass = spark.skins.mobile320.assets.TextInput_border;
                 layoutCornerEllipseSize = 24;
-                layoutMeasuredWidth = 600;
-                minWidth = 48;
-                minHeight = 66;
+                measuredDefaultWidth = 600;
+                measuredDefaultHeight = 66;
                 layoutBorderSize = 2;

                 break;
@@ -72,9 +71,8 @@
             {
                 borderClass = spark.skins.mobile240.assets.TextInput_border;
                 layoutCornerEllipseSize = 12;
-                layoutMeasuredWidth = 440;
-                minWidth = 24;
-                minHeight = 50;
+                measuredDefaultWidth = 440;
+                measuredDefaultHeight = 50;
                 layoutBorderSize = 1;

                 break;
@@ -83,9 +81,8 @@
             {
                 borderClass = spark.skins.mobile160.assets.TextInput_border;
                 layoutCornerEllipseSize = 12;
-                layoutMeasuredWidth = 300;
-                minWidth = 24;
-                minHeight = 33;
+                measuredDefaultWidth = 300;
+                measuredDefaultHeight = 33;
                 layoutBorderSize = 1;

                 break;
@@ -98,12 +95,6 @@
     //  Variables
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Default width per DPI.
-     */
-    private var layoutMeasuredWidth:Number;

     /**
      *  @copy spark.skins.spark.ApplicationSkin#hostComponent
@@ -156,10 +147,6 @@
             measuredWidth =  (characterWidth * hostComponent.maxChars) +
                 paddingLeft + paddingRight + StyleableTextField.TEXT_WIDTH_PADDING;
         }
-        else
-        {
-            measuredWidth = layoutMeasuredWidth;
-        }

         measuredHeight = paddingTop + textHeight + paddingBottom;
     }


Remove unused method.

Remove unused method.

--- src/com/esri/builder/controllers/ApplicationCompleteController.as
+++ src/com/esri/builder/controllers/ApplicationCompleteController.as
@@ -320,12 +320,6 @@
         errorPopUp.open(FlexGlobals.topLevelApplication as DisplayObjectContainer, true);
     }

-    private function setStatusAndAlert(text:String):void
-    {
-        Model.instance.status = text;
-        BuilderAlert.show(text, ResourceManager.getInstance().getString('BuilderStrings', 'error'));
-    }
-
     protected function widgetTypeLoader_completeHandler(event:Event):void
     {
         (event.currentTarget as StartupWidgetTypeLoader).removeEventListener(Event.COMPLETE, widgetTypeLoader_completeHandler);


CSV export now uses raw data and removes duplicate columns.

Change-Id: I44d302f1d69cdf3166d4826c751eca90e11def2d

--- WeaveData/src/weave/utils/ColumnUtils.as
+++ WeaveData/src/weave/utils/ColumnUtils.as
@@ -39,7 +39,6 @@
 	import weave.api.getLinkableDescendants;
 	import weave.api.getLinkableOwner;
 	import weave.compiler.StandardLib;
-	import weave.core.LinkableHashMap;
 	import weave.data.AttributeColumns.DynamicColumn;
 	import weave.data.AttributeColumns.ExtendedDynamicColumn;
 	import weave.data.AttributeColumns.SecondaryKeyNumColumn;
@@ -405,49 +404,47 @@
 			SecondaryKeyNumColumn.allKeysHack = true; // dimension slider hack

 			var records:Array = [];
-			// get the list of column titles
-			var definedAttrCols:Array = [];
-			var columnTitles:Array = [];
-			var i:int;
-			var item:*;
-			for (i = 0; i < attrCols.length; i++)
-			{
-				item = attrCols[i];
-				// to make sure undefined attributes are not exported
-				if ((item is IColumnWrapper) && (item as IColumnWrapper).getInternalColumn())
-				{
-					columnTitles.push(ColumnUtils.getTitle(item));
-					definedAttrCols.push(item);
-				}
-				if (item is LinkableHashMap)
-				{
-					var hashMapColumns:Array = (item as LinkableHashMap).getObjects();
-					for (var j:int = 0; j < hashMapColumns.length; j++)
-					{
-						if ((hashMapColumns[j] as  IColumnWrapper).getInternalColumn())
-						{
-							columnTitles.push(ColumnUtils.getTitle(hashMapColumns[j]));
-							definedAttrCols.push(hashMapColumns[j]);
-						}
-					}
-				}
-			}
+			var columnLookup:Dictionary = new Dictionary(true);
+			attrCols = attrCols.map(
+				function(item:Object, i:int, a:Array):* {
+					return item is ILinkableHashMap
+						? (item as ILinkableHashMap).getObjects(IAttributeColumn)
+						: item as IAttributeColumn;
+				}
+			);
+			attrCols = VectorUtils.flatten(attrCols);
+			attrCols = attrCols.map(
+				function(column:IAttributeColumn, i:int, a:Array):IAttributeColumn {
+					return hack_findNonWrapperColumn(column);
+				}
+			).filter(
+				function(column:IAttributeColumn, i:int, a:Array):Boolean {
+					if (!column || columnLookup[column])
+						return false;
+					columnLookup[column] = true;
+					return true;
+				}
+			);
+			var columnTitles:Array = attrCols.map(
+				function(column:IAttributeColumn, i:int, a:Array):String {
+					return getTitle(column);
+				}
+			);
 			if (!keys)
-				keys = getAllKeys(definedAttrCols);
+				keys = getAllKeys(attrCols);

 			var keyTypeMap:Object = {};
 			// create the data for each column in each selected row
-			for each (item in keys)
-			{
-				var key:IQualifiedKey = item as IQualifiedKey;
+			for each (var key:IQualifiedKey in keys)
+			{
 				var record:Object = {};
 				// each record has a property named after the keyType equal to the key value
 				record[key.keyType] = key.localName;
 				keyTypeMap[key.keyType] = true;

-				for (i = 0; i < definedAttrCols.length; i++)
+				for (var i:int = 0; i < attrCols.length; i++)
 				{
-					var value:Object = (definedAttrCols[i] as IAttributeColumn).getValueFromKey(key, dataType);
+					var value:Object = (attrCols[i] as IAttributeColumn).getValueFromKey(key, dataType);
 					if (!isNaN(value as Number))
 						record[columnTitles[i]] = value;
 				}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12568
Author:   gruehle@adobe.com
Date:     2009-12-05T00:33:54.244586Z

Log Message:
-----------
Fix the theme attribute for cornerRadius metadata on mx components. This required moving the metadata out of BorderStyles.as and into each file that includes BorderStyle.as

QE notes: -
Doc notes: -
Bugs: SDK-24437
Reviewer: Kevin
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.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/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/mx/src/mx/controls/TextInput.as
+++ frameworks/projects/mx/src/mx/controls/TextInput.as
@@ -152,6 +152,18 @@
  *  @productversion Flex 4
  */
 [Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+/**
+ *  Radius of component corners.
+ *
+ *  @default 0
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo")]

 /**
  *  Color of focus ring when the component is in focus


Transferred from the Adobe Open Source Subversion Repository

Revision: 4486
Author:   chaase@adobe.com
Date:     2009-01-12T18:41:56.497953Z

Log Message:
-----------
Bitmap/shader transition feature, along with FxWipe and FxCrossFade, the two concrete effects based on this new shader-based transition infrastructure.

QE Notes: None
Doc Notes: None
Bugs:
Reviewer: Corey
Tests: checkintests, Mustella: Effects, gumbo/effects, ListDataEffects

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxCrossFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxWipe.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxWipe.pbk</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateShaderTransitionInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateShaderTransition.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxCrossFade.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxCrossFade.pbk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxWipeInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxWipe.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/WipeDirection.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Wipe.as
+++ frameworks/projects/spark/src/spark/effects/Wipe.as
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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.effects
+{
+import flash.display.Shader;
+import flash.utils.ByteArray;
+
+import mx.effects.effectClasses.FxWipeInstance;
+
+/**
+ * This class performs a bitmap transition effect by running a
+ * directional 'wipe' between the first and second bitmaps.
+ * This wipe exposes the second bitmap over the course of the
+ * animation in a direction indicated by the direction
+ * property.
+ *
+ *
The underlying bitmap effect is run by a Pixel Bender shader
+ * that is loaded by the effect. There is no need to supply a shader
+ * to this effect since it uses its own by default. However, if
+ * a different Wipe behavior is desired, a different shader may be
+ * supplied, as long as it adheres to the following constraints:
+ * obey the constraints specified for the shaderCode
+ * property of FxAnimateShaderTransition, and supply three additional
+ * parameters. The extra parameters required by the FxWipe shader
+ * are an int direction parameter,
+ * whose values mean the same as the related String properties
+ * in the FxWipe class, and floating point parameters
+ * imageWidth and imageHeight. All of these
+ * parameters will be set on the shader when the effect starts playing,
+ * so the parameters need to exist and do something appropriate in
+ * order for the effect to function correctly.

+ *
+ * @see mx.effects.FxAnimateShaderTransition#shaderCode
+ */
+public class FxWipe extends FxAnimateShaderTransition
+{
+    [Embed(source="FxWipe.pbj", mimeType="application/octet-stream")]
+    private static var WipeShaderClass:Class;
+    private static var wipeShaderCode:ByteArray = new WipeShaderClass();
+
+
+    [Inspectable(enumeration="left,right,up,down", defaultValue="right")]
+    /**
+     * The direction that the wipe will move during the animation,
+     * one of RIGHT, LEFT, UP, or DOWN. Other values will result in
+     * undefined behavior. If no direction is supplied, a default
+     * of RIGHT will be assumed;
+     * @see WipeDirection#RIGHT
+     * @see WipeDirection#UP
+     * @see WipeDirection#LEFT
+     * @see WipeDirection#DOWN
+     */
+    public var direction:String = WipeDirection.RIGHT;
+
+    public function FxWipe(target:Object=null)
+    {
+        super(target);
+        instanceClass = FxWipeInstance;
+        shaderCode = wipeShaderCode;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function initInstance(instance:IEffectInstance):void
+    {
+        super.initInstance(instance);
+
+        var wipeInstance:FxWipeInstance = FxWipeInstance(instance);
+        wipeInstance.direction = direction;
+    }
+
+}
+}


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

--- frameworks/projects/rpc/src/mx/rpc/xml/QualifiedResourceManager.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/QualifiedResourceManager.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-2007 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 3448
Author:   chaase@adobe.com
Date:     2008-10-01T23:50:40.097700Z

Log Message:
-----------
Adding new SetAction effect, plus minor improvements to effects overall. This new effect combines the old SetPropertyAction and SetStyleAction effects, figuring out for the named property whether it is a property or a style of the target object. Also, added new capabilities to Animation class and fixed some problems with easing default values.

Reviewed by Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/NewEffects.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/SetActionInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -38,7 +38,7 @@
  *
  * @eventType flex.events.AnimationEvent.ANIMATION_UPDATE
  */
-[Event(name="animationUpdate", type="mx.events.AnimationEvent")]
+[Event(name="animationUpdate", type="flex.events.AnimationEvent")]

 /**
  * Dispatched when the animation begins a new repetition, for
@@ -155,7 +155,7 @@
     private var numRepeats:Number;

     private var easingFunction:Function;
-    private var defaultEaser:IEaser = new Sine(.5);
+    private static var defaultEaser:IEaser = new Sine(.5);

     //--------------------------------------------------------------------------
     //
@@ -184,7 +184,7 @@
      * is supplied to the Animation to handle calculating intermediate
      * values.
      *
-     * @see interpolator
+     * @see #interpolator
      */
     public var startValue:Object;

@@ -198,7 +198,7 @@
      * is supplied to the Animation to handle calculating intermediate
      * values.
      *
-     * @see interpolator
+     * @see #interpolator
      */
     public var endValue:Object;

@@ -287,7 +287,7 @@
      * each new cycle. This parameter is used starting with the first repetition,
      * not the first cycle. For a delay before the initial start, use
      * the startDelay property. Must be a value >= 0.
-     * @see startDelay
+     * @see #startDelay
      *
      * @default 0
      */
@@ -433,7 +433,7 @@
      * @private
      * Storage for the easer property.
      */
-    private var _easer:IEaser;
+    private var _easer:IEaser = defaultEaser;
     /**
      * Sets the easing behavior for this Animation. This IEaser
      * object will be used to convert the elapsed fraction of
@@ -456,7 +456,7 @@
     {
         if (!value)
         {
-            easer = Linear.getInstance();
+            value = Linear.getInstance();
         }
         _easer = value;
     }
@@ -712,22 +712,16 @@
         startTime = clockTime - playheadTime;

         _doSeek = true;
-    }
-
-    /**
-     * @private
-     *
-     * Utility method for setting up easing for this Animation. If
-     * no easing is set, or the easer variable is null,
-     * easing will default to the private defaultEasier
-     * value.
-     */
-    private function setupEasing():void
-    {
-        if (!easer)
-            easer = defaultEaser;
-    }
-
+
+        if (!_isPlaying)
+        {
+            setupInterpolation();
+            _intervalTime = getTimer();
+            startTime = _intervalTime - playheadTime;
+            doInterval();
+        }
+    }
+
     /**
      * Sets up interpolation for the animation. If there is no interpolator
      * set on the animation, then it figures out whether it should use
@@ -877,7 +871,6 @@
     {
         numRepeats = 1;
         setupInterpolation();
-        setupEasing();
         var value:Object = getCurrentValue(0);
         sendAnimationEvent(AnimationEvent.ANIMATION_START, value);


Commented out unneeded client code.

Commented out unneeded client code.

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

--- src/as/com/threerings/crowd/data/OccupantInfo.as
+++ src/as/com/threerings/crowd/data/OccupantInfo.as
@@ -118,10 +118,11 @@
     // from interface Streamable
     override public function writeObject (out :ObjectOutputStream) :void
     {
-        super.writeObject(out);
-        out.writeObject(new Integer(bodyOid));
-        out.writeObject(username);
-        out.writeByte(status);
+        throw new Error();
+//        super.writeObject(out);
+//        out.writeObject(new Integer(bodyOid));
+//        out.writeObject(username);
+//        out.writeByte(status);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18747
Author:   rfrishbe@adobe.com
Date:     2010-11-19T21:49:23.290523Z

Log Message:
-----------
A few MobileSkin changes

1) Added new protected methods to MobileSkin (getElementPreferredWidth(), getElementPreferredHeight())
2) Renamed MobileSkin resizePart(), positionPart() to resizeElement, positionElement().  This matches MobileItemRenderer but still needs to be PARBed
3) Fixed up multi-line resize in TextAreaSkin

QE notes:
Doc notes:
Bugs: -
Reviewer: Evtim
Tests run: checkintests, mustella cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<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/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/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/VScrollBarSkin.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/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as
@@ -92,7 +92,7 @@

     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        resizePart(track, unscaledWidth, unscaledHeight);
+        resizeElement(track, unscaledWidth, unscaledHeight);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 17505
Author:   klin@adobe.com
Date:     2010-08-28T00:02:59.530168Z

Log Message:
-----------
Fixes and some code clean up for DataGrid. These fix issues with how the DataGrid looks when different indicators and separators are null. It also improves the look when the dataProvider is cleared.

GridLayout.as - Fix bug in layoutLinearElements() where we were allowing null values to stay in newVisibleElements. We should shorten the vector instead. Also, I fixed layoutSelectionIndicators() and layoutIndicator() to remove previously cached indicators when the factory is null. Lastly, fixed up layoutRow/ColumnSeparator to return the correct bounds when no item renderer exists. This is used in the case that we clear the dataProvider.
GridDimensions.as - Fix getPadRowBounds() so that it only never uses a negative index when calling getCellX and getColumnWidth.
DataGrid.as - use Grid's clearGridLayoutCache instead of manually clearing the caches.

QE notes: No
Doc notes: No
Bugs: SDK-27602, SDK-27606, SDK-27612
Reviewer: Hans
Tests run: checkintests, DataGrid
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -115,9 +115,7 @@

         freeItemRenderers(visibleItemRenderers);

-        freeGridElements(visibleSelectionIndicators);
-        visibleRowSelectionIndices.length = 0;
-        visibleColumnSelectionIndices.length = 0;
+        clearSelectionIndicators();

         freeGridElement(hoverIndicator)
         hoverIndicator = null;
@@ -1035,14 +1033,17 @@

         for (var index:int = 0; index < newVisibleElementCount; index++)
         {
-            var newEltIndex:int = (index < newVisibleIndices.length) ? newVisibleIndices[index] : index;
+            var newEltIndex:int = newVisibleIndices[index];
             if (newEltIndex == lastIndex)
+            {
+                newVisibleElements.length = index;
                 break;
+            }

             // If an element already exists for visibleIndex then use it, otherwise create one

             var eltOffset:int = oldVisibleIndices.indexOf(newEltIndex);
-            var elt:IVisualElement = (eltOffset != -1) ? oldVisibleElements[eltOffset] : null;
+            var elt:IVisualElement = (eltOffset != -1 && eltOffset < oldVisibleElements.length) ? oldVisibleElements[eltOffset] : null;
             if (elt == null)
                 elt = allocateGridElement(factory);

@@ -1246,10 +1247,7 @@

     private function layoutRowSeparator(separator:IVisualElement, rowIndex:int):void
     {
-        const r:Rectangle = visibleItemRenderersBounds;
-        const width:Number = r.width;
         const height:Number = separator.getPreferredBoundsHeight();
-        const x:Number = r.x;
         const rowCount:int = gridDimensions.rowCount;
         const bounds:Rectangle = (rowIndex < rowCount)
             ? gridDimensions.getRowBounds(rowIndex)
@@ -1258,6 +1256,8 @@
         if (!bounds)
             return;

+        const x:Number = bounds.x;
+        const width:Number = bounds.width;
         const y:Number = bounds.bottom; // TBD: should center on gap here.
         layoutGridElement(separator, x, y, width, height);
     }
@@ -1267,12 +1267,7 @@
         const r:Rectangle = visibleItemRenderersBounds;
         const width:Number = separator.getPreferredBoundsWidth();
         const height:Number = Math.max(r.height, visibleGridBounds.height);
-        const bounds:Rectangle = gridDimensions.getColumnBounds(columnIndex);
-
-        if (!bounds)
-            return;
-
-        const x:Number = bounds.right; // TBD: should center on gap here.
+        const x:Number = gridDimensions.getCellX(0, columnIndex) + gridDimensions.getColumnWidth(columnIndex); // TBD: should center on gap here.
         const y:Number = r.y;
         layoutGridElement(separator, x, y, width, height);
     }
@@ -1321,20 +1316,20 @@
     {
         const selectionIndicatorFactory:IFactory = grid.selectionIndicator;

+        if (!selectionIndicatorFactory)
+        {
+            clearSelectionIndicators();
+            return;
+        }
+
         // layout and update visibleSelectionIndicators,Indices

         if (isRowSelectionMode())
         {
             // Selection is row-based so if there are existing cell selections,
             // free them since they can't be reused.
-            // TBD: this check won't work with column selections.
             if (visibleColumnSelectionIndices.length > 0)
-            {
-                freeGridElements(visibleSelectionIndicators);
-                visibleSelectionIndicators.length = 0;
-                visibleRowSelectionIndices.length = 0;
-                visibleColumnSelectionIndices.length = 0;
-            }
+                clearSelectionIndicators();

             var oldVisibleRowSelectionIndices:Vector.<int> =
                 visibleRowSelectionIndices;
@@ -1364,13 +1359,10 @@

         // Selection is not row-based so if there are existing row selections,
         // free them since they can't be reused.
-        // TBD: this check won't work with column selections.
         if (visibleRowSelectionIndices.length > 0 &&
             visibleColumnSelectionIndices.length == 0)
         {
-            freeGridElements(visibleSelectionIndicators);
-            visibleSelectionIndicators.length = 0;
-            visibleRowSelectionIndices.length = 0;
+            clearSelectionIndicators();
         }

         if (isCellSelectionMode())
@@ -1410,14 +1402,8 @@

         // If there are existing cell selections,
         // free them since there is no selection.
-        // TBD: this check won't work with column selections.
         if (visibleColumnSelectionIndices.length > 0)
-        {
-            freeGridElements(visibleSelectionIndicators);
-            visibleSelectionIndicators.length = 0;
-            visibleRowSelectionIndices.length = 0;
-            visibleColumnSelectionIndices.length = 0;
-        }
+            clearSelectionIndicators();
     }

     private function layoutRowSelectionIndicator(indicator:IVisualElement, rowIndex:int):void
@@ -1432,6 +1418,13 @@
         layoutGridElementR(indicator, gridDimensions.getCellBounds(rowIndex, columnIndex));
     }

+    private function clearSelectionIndicators():void
+    {
+        freeGridElements(visibleSelectionIndicators);
+        visibleRowSelectionIndices.length = 0;
+        visibleColumnSelectionIndices.length = 0;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Indicators: hover, caret
@@ -1448,6 +1441,13 @@
         rowIndex:int,
         columnIndex:int):IVisualElement
     {
+        if (!indicatorFactory)
+        {
+            freeGridElement(indicator);
+            indicator = null;
+            return indicator;
+        }
+
         if (rowIndex == -1 || grid.selectionMode == GridSelectionMode.NONE)
         {
             if (indicator)
@@ -1466,7 +1466,7 @@
                 layoutGridElementR(indicator, bounds);
                 container.addElement(indicator);  // add or move to the top
                 indicator.visible = true;
-            }
+        }

         return indicator;
     }


Removed trace statements

Removed trace statements

--- src/org/mangui/hls/controller/LevelController.as
+++ src/org/mangui/hls/controller/LevelController.as
@@ -314,15 +314,10 @@
             var max_level:Number = Math.min(_maxLevel, current_level+HLSSettings.maxUpSwitchLimit, getMaxLevelForBandwidth());
             var min_level:Number = Math.max(0, current_level-HLSSettings.maxDownSwitchLimit);
             var switch_to_level:int = current_level;
-
-            CONFIG::LOGGING {
-                Log.info(this+" rsft: " + rsft);
-                Log.info(this+" sftm: " + sftm);
-            }
-
-			trace(this, "getNextLevel >>> CURRENT_LEVEL="+current_level+", MAX_LEVEL="+max_level+", MIN_LEVEL="+min_level);
-			trace("+-->", _maxLevel, current_level+HLSSettings.maxUpSwitchLimit, getMaxLevelForBandwidth());
-
+            //CONFIG::LOGGING {
+            //    Log.info(this+" rsft: " + rsft);
+            //    Log.info(this+" sftm: " + sftm);
+            //}
             // to switch level up :
             // rsft should be greater than switch up condition
             if (current_level < max_level && sftm > 1+_switchup[current_level]) {


Flash: From now on, fire events on mOxie.EventTarget.instance instead of mOxie.eventTarget.

--- src/flash/src/Moxie.as
+++ src/flash/src/Moxie.as
@@ -148,7 +148,7 @@
 		 */
 		private function _fireEvent(evt:*, obj:Object = null):void {
 			try {
-				ExternalInterface.call("mOxie.eventTarget.dispatchEvent", evt, obj);
+				ExternalInterface.call("mOxie.EventTarget.instance.dispatchEvent", evt, obj);
 			} catch(err:*) {
 				//_fireEvent("Exception", { name: 'RuntimeError', message: 4 });


Transferred from the Adobe Open Source Subversion Repository

Revision: 154
Author:   rfrishbe@adobe.com
Date:     2008-01-10T23:43:08.826166Z

Log Message:
-----------
AIR Window's createChildren() was getting called twice.  Application/SystemManager and Window/WindowedSystemManager have some quirks when adding the base components to the displaylist.  This fixes it so addingChild and childAdded don't get called twice.

Bugs: SDK-14250
QA: Yes
Doc: No
Review: Gordon
Cyclone: Yes

[ private comments below ]

Modified Paths:
--------------
<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/airframework/src/mx/managers/WindowedSystemManager.as</path>

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

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -757,6 +757,65 @@
 	}

 	//--------------------------------------------------------------------------
+    //
+    //  Methods: Access to overridden methods of base classes
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  This method allows access to the Player's native implementation
+     *  of addChild(), which can be useful since components
+     *  can override addChild() and thereby hide the native implementation.
+     *  Note that this "base method" is final and cannot be overridden,
+     *  so you can count on it to reflect what is happening at the player level.
+     */
+    mx_internal final function $addChild(child:DisplayObject):DisplayObject
+    {
+        return super.addChild(child);
+    }
+
+    /**
+     *  @private
+     *  This method allows access to the Player's native implementation
+     *  of addChildAt(), which can be useful since components
+     *  can override addChildAt() and thereby hide the native implementation.
+     *  Note that this "base method" is final and cannot be overridden,
+     *  so you can count on it to reflect what is happening at the player level.
+     */
+    mx_internal final function $addChildAt(child:DisplayObject,
+                                           index:int):DisplayObject
+    {
+        return super.addChildAt(child, index);
+    }
+
+    /**
+     *  @private
+     *  This method allows access to the Player's native implementation
+     *  of removeChild(), which can be useful since components
+     *  can override removeChild() and thereby hide the native implementation.
+     *  Note that this "base method" is final and cannot be overridden,
+     *  so you can count on it to reflect what is happening at the player level.
+     */
+    mx_internal final function $removeChild(child:DisplayObject):DisplayObject
+    {
+        return super.removeChild(child);
+    }
+
+    /**
+     *  @private
+     *  This method allows access to the Player's native implementation
+     *  of removeChildAt(), which can be useful since components
+     *  can override removeChildAt() and thereby hide the native implementation.
+     *  Note that this "base method" is final and cannot be overridden,
+     *  so you can count on it to reflect what is happening at the player level.
+     */
+    mx_internal final function $removeChildAt(index:int):DisplayObject
+    {
+        return super.removeChildAt(index);
+    }
+
+	//--------------------------------------------------------------------------
 	//
 	//  Methods: Initialization
 	//


Transferred from the Adobe Open Source Subversion Repository

Revision: 6439
Author:   dsubrama@adobe.com
Date:     2009-04-30T21:19:14.460041Z

Log Message:
-----------
Bugfixes: SDK-20853, SDK-20506, SDK-20855

We now use the bottleneck method, updateRenderer() to let the DataGroup have first crack at setting a renderer's data, owner and labelText properties. Then the "true" owners like a List or ButtonBar which father a renderer, get a chance to come in and clean out stale properties and set new properties on the renderer (which was either created anew or recycled).

I also cleaned up some comments in LayoutBase.

Reviewer: Ryan
Checkintests: Pass
Mustella: Steve and Ella ok'ed a cyclone I gave them against List, ButtonBar, DataGroup and SkinnableDataContainer.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/IItemRendererOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -602,6 +602,26 @@

 			labelFieldOrFunctionChanged = false;
         }
+    }
+
+    /**
+     *  @private
+     */
+    override public function updateRenderer(renderer:IVisualElement):void
+    {
+        //First clean up any old, stale properties like selected
+        if (renderer is IItemRenderer && IItemRenderer(renderer).selected)
+            IItemRenderer(renderer).selected = false;
+
+        //Now run through and initialize the renderer correctly
+        super.updateRenderer(renderer);
+
+        var index:Number = dataGroup.getElementIndex(renderer);
+
+        if (isItemIndexSelected(index))
+            itemSelected(index, true);
+        if (renderer is IItemRenderer)
+            IItemRenderer(renderer).labelText = itemToLabel(IItemRenderer(renderer).data);
     }

     //--------------------------------------------------------------------------


Add mx state shims to SWC

Add mx state shims to SWC

--- frameworks/as/src/FlexJSUIClasses.as
+++ frameworks/as/src/FlexJSUIClasses.as
@@ -38,6 +38,7 @@
     import org.apache.flex.html.staticControls.beads.NumericStepperView; NumericStepperView;
     import org.apache.flex.html.staticControls.beads.PanelView; PanelView;
 	import org.apache.flex.html.staticControls.beads.RadioButtonView; RadioButtonView;
+    import org.apache.flex.html.staticControls.beads.ScrollBarView; ScrollBarView;
 	import org.apache.flex.html.staticControls.beads.SimpleAlertView; SimpleAlertView;
     import org.apache.flex.html.staticControls.beads.SpinnerView; SpinnerView;
     import org.apache.flex.html.staticControls.beads.TextButtonMeasurementBead; TextButtonMeasurementBead;
@@ -57,16 +58,24 @@
     import org.apache.flex.html.staticControls.beads.models.TitleBarModel; TitleBarModel;
 	import org.apache.flex.html.staticControls.beads.models.ToggleButtonModel; ToggleButtonModel;
 	import org.apache.flex.html.staticControls.beads.models.ValueToggleButtonModel; ValueToggleButtonModel;
+    import org.apache.flex.html.staticControls.beads.controllers.AlertController; AlertController;
     import org.apache.flex.html.staticControls.beads.controllers.DropDownListController; DropDownListController;
+    import org.apache.flex.html.staticControls.beads.controllers.ItemRendererMouseController; ItemRendererMouseController;
     import org.apache.flex.html.staticControls.beads.controllers.ListSingleSelectionMouseController; ListSingleSelectionMouseController;
-    import org.apache.flex.html.staticControls.beads.controllers.ItemRendererMouseController; ItemRendererMouseController;
+    import org.apache.flex.html.staticControls.beads.controllers.SpinnerMouseController; SpinnerMouseController;
+    import org.apache.flex.html.staticControls.beads.controllers.VScrollBarMouseController; VScrollBarMouseController;
     import org.apache.flex.html.staticControls.beads.layouts.NonVirtualVerticalScrollingLayout; NonVirtualVerticalScrollingLayout;
+    import org.apache.flex.html.staticControls.beads.layouts.VScrollBarLayout; VScrollBarLayout;
     import org.apache.flex.html.staticControls.beads.TextItemRendererFactoryForArrayData; TextItemRendererFactoryForArrayData;
     import org.apache.flex.core.ItemRendererClassFactory; ItemRendererClassFactory;
 	import org.apache.flex.events.CustomEvent; CustomEvent;
 	import org.apache.flex.events.Event; Event;
 	import org.apache.flex.utils.Timer; Timer;
     import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
+
+    import mx.states.AddItems; AddItems;
+    import mx.states.SetProperty; SetProperty;
+    import mx.states.State; State;
 }

 }


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

--- frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as
+++ frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as
@@ -1,3 +1,21 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
 package mx.core
 {
 import flash.geom.Matrix;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/FadeInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/FadeInstance.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-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.effects.effectClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22947
Author:   chiedozi@adobe.com
Date:     2011-10-10T23:19:36.382833Z

Log Message:
-----------
Fixed an issue in StageText that would cause the application to hang if two ViewTransitions were played at the same time

QE notes:
Doc notes:
Bugs: SDK-31789
Reviewer: Adam Altman
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/supportClasses/ViewTransitionUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -12,6 +12,7 @@
 package spark.components
 {
 import flash.events.Event;
+import flash.events.EventDispatcher;
 import flash.net.registerClassAlias;

 import mx.core.IVisualElement;
@@ -34,11 +35,11 @@
 import spark.effects.animation.Animation;
 import spark.effects.animation.MotionPath;
 import spark.effects.animation.SimpleMotionPath;
+import spark.events.ViewNavigatorEvent;
 import spark.layouts.supportClasses.LayoutBase;
 import spark.transitions.SlideViewTransition;
 import spark.transitions.ViewTransitionBase;
 import spark.transitions.ViewTransitionDirection;
-import spark.transitions.supportClasses.ViewTransitionUtil;

 use namespace mx_internal;

@@ -183,6 +184,12 @@
      */
     private static var classAliasesRegistered:Boolean = false;

+    /**
+     *  @private
+     */
+    private static var viewTransitonSuspendCount:int = 0;
+    private static var eventDispatcher:EventDispatcher;
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -328,6 +335,13 @@
      */
     private var emptyViewDescriptor:ViewDescriptor = null;

+    /**
+     *  @private
+     *  Variable used to count how many enterframes the navigator has
+     *  received after preparing a transition.
+     */
+    private var enterFrameCount:int = 0;
+
     /**
      *  @private
      *  This following property stores the mouseEnabled
@@ -2119,12 +2133,17 @@
             activeTransition.navigator = this;
             activeTransition.preInit();

-            ViewTransitionUtil.notifyTransitionPreparation();
-        }
-
-        if (ViewTransitionUtil.suspendCount > 0)
-        {
-            ViewTransitionUtil.instance.addEventListener("ready", completeTransitionPreparations);
+            if (stage)
+                stage.dispatchEvent(new Event("viewTransitionPrepare"));
+        }
+
+        // Only dispatch this event if the stage exists.
+        if (stage && viewTransitonSuspendCount > 0)
+        {
+           if (!eventDispatcher)
+               eventDispatcher = new EventDispatcher();
+
+           eventDispatcher.addEventListener("viewTransitionReady", completeTransitionPreparations);
         }
         else
         {
@@ -2132,10 +2151,35 @@
         }
     }

+    /**
+     *  @private
+     */
+    mx_internal static function suspendTransitions():void
+    {
+        viewTransitonSuspendCount++;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal static function resumeTransitions():void
+    {
+        if (viewTransitonSuspendCount == 0)
+            return;
+
+        viewTransitonSuspendCount--;
+
+        if (viewTransitonSuspendCount == 0)
+            eventDispatcher.dispatchEvent(new Event("viewTransitionReady"));
+    }
+
+    /**
+     *  @private
+     */
     private function completeTransitionPreparations(event:Event = null):void
     {
         if (event)
-            event.target.removeEventListener("ready", completeTransitionPreparations);
+            event.target.removeEventListener("viewTransitionReady", completeTransitionPreparations);

         var pendingView:View;
         if (pendingViewDescriptor)
@@ -2178,7 +2222,10 @@
             activeTransition.prepareForPlay();

             // Wait a frame so that any queued work can be completed by the framework
-            // and runtime before the transition starts.
+            // and runtime before the transition starts.  As of Flex 4.6, we wait 2
+            // frames to allow StageText to fully render the swapped in bitmaps.
+            // Otherwise rendering time would overlap with the first frame of the animation.
+            enterFrameCount = 0;
             addEventListener(Event.ENTER_FRAME, startViewTransition);
         }
         else
@@ -2186,8 +2233,6 @@
             navigatorActionCommitted();
         }
     }
-
-    private var enterFrameCount:int = 0;

     /**
      *  @private
@@ -2195,12 +2240,13 @@
      */
     private function startViewTransition(event:Event):void
     {
+        // Incrememnt the enterFrameCount.  ViewNavigator waits two frames
+        // before begining the animation.
         enterFrameCount++;
-
         if (enterFrameCount < 2)
             return;
-
-        enterFrameCount = 0;
+
+        // Remove the enter frame listener
         removeEventListener(Event.ENTER_FRAME, startViewTransition);

         if (hasEventListener(FlexEvent.TRANSITION_START))