Stuck upload new in between uploaded and default items in media picker

--- flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
+++ flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
@@ -145,25 +145,23 @@
 		}
 		else {
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_IMAGE + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_AUDIO + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_VIDEO + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
-		}
+		}
+
 		this.printXMLData();

 		var media:Array = obj.result.data as Array;
         trace("Number of Media Objects returned from server = '" + media.length + "'");

-		for (var k:Number = 0; k <= 1; k++)
+		//Puts media items in xml readable format
+		for (var k:Number = 0; k <= 1; k++) //Iterates over list twice; once for uploaded items, again for default
 		{
 			for (var j:Number = 0; j < media.length; j++)
 			{
 				var o:Object = media[j];

 				if((k==0 && !o.is_default) || (k==1 && o.is_default)){
-					trace(k);
 					var m:Media = new Media();

 					m.mediaId = o.media_id;
@@ -195,6 +193,13 @@
 					}
 				}
 			}
+			//Add "Upload new" in between uploaded and default pictures
+			if(k==0){
+				xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+			}
+
 		}
         trace("ItemEditorMediaPickerView: handleLoadingOfMediaIntoXML: Just finished loading Media Objects into XML.  Here's what the new XML looks like:");
         this.printXMLData();


Need to wrap this feller too.

Need to wrap this feller too.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@294 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/ezgame/client/EZGameConfigurator.as
+++ src/as/com/threerings/ezgame/client/EZGameConfigurator.as
@@ -30,6 +30,7 @@
 import com.threerings.util.Integer;
 import com.threerings.util.StreamableHashMap;
 import com.threerings.util.StringUtil;
+import com.threerings.util.langBoolean;

 import com.threerings.flex.LabeledSlider;

@@ -108,7 +109,8 @@
                     params.put(ident, new Integer((control as LabeledSlider).slider.value));

                 } else if (control is CheckBox) {
-                    params.put(ident, (control as CheckBox).selected);
+                    // ditto above
+                    params.put(ident, new langBoolean((control as CheckBox).selected));

                 } else if (control is ComboBox) {
                     params.put(ident, (control as ComboBox).value);


improved watch() by passing in target to callback

--- WeaveCore/src/weave/utils/DebugUtils.as
+++ WeaveCore/src/weave/utils/DebugUtils.as
@@ -205,7 +205,7 @@
 		{
 			if (!target)
 			{
-				weaveTrace('Usage: consoleWatch(target, optional_callbackReturnsString)');
+				weaveTrace('Usage: watch(target, optional_callbackReturnsString)');
 				return;
 			}

@@ -219,7 +219,7 @@
 				if (path.length)
 					str += " " + Compiler.stringify(path.pop());
 				if (callbackReturnsString != null)
-					str += ': ' + callbackReturnsString();
+					str += ': ' + callbackReturnsString.call(linkableTarget, linkableTarget);
 				debugTrace(linkableTarget, str);
 			};
 			watchLookup[linkableTarget] = callback;


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

--- frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 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: 16982
Author:   klin@adobe.com
Date:     2010-07-20T19:59:09.836731Z

Log Message:
-----------
The following changes apply to DataGrid only.

-Implemented syncing GridDimensions with the dataProvider.
-Made some methods public in GridRowList to allow syncing to be implemented
-Added height="100%" to the label of the GridItemRenderer. This forces the label to stay within the bounds of the cell.

QE notes: No
Doc notes: No
Bugs: SDK-26921
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -15,6 +15,7 @@

 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
+import mx.collections.IList;

 public class GridDimensions
 {
@@ -988,6 +989,9 @@
         }
     }

+    /**
+     *  Clears the typical cell for every column and row.
+     */
     public function clearTypicalCellWidthsAndHeights():void
     {
         typicalCellWidths.length = 0;
@@ -1003,25 +1007,7 @@
      */
     public function insertRows(startRow:int, count:int):void
     {
-        if (startRow < 0 || count <= 0)
-            return;
-
-        var node:GridRowNode = rowList.findNearest(startRow);
-
-        // start on the index we're inserting at.
-        if (node && node.rowIndex < startRow)
-            node = node.next;
-        while (node)
-        {
-            node.rowIndex += count;
-            node = node.next;
-        }
-
-        this.rowCount += count;
-
-        // cache is invalid now.
-        recentNode = null;
-        recentNode2 = null;
+        insertRowsAt(startRow, count);
     }

     /**
@@ -1040,6 +1026,7 @@
      */
     public function removeRows(startRow:int, count:int):void
     {
+        removeRowsAt(startRow, count);
     }

     /**
@@ -1057,6 +1044,16 @@
      */
     public function moveRows(fromRow:int, toRow:int, count:int):void
     {
+        var rows:Vector.<GridRowNode> = removeRowsAt(fromRow, count);
+
+        // Set the row indices of the nodes that are moving.
+        var diff:int = toRow - fromRow;
+        for each (var node:GridRowNode in rows)
+        {
+            node.rowIndex = node.rowIndex + diff;
+        }
+
+        insertRowsAt(toRow, count, rows);
     }

     /**
@@ -1079,22 +1076,130 @@
         this.startY = 0;
         this.startY2 = 0;
     }
+
+    /**
+     *  Inserts count number of rows starting from startRow. This will increment
+     *  rowCount. If the nodes parameter is set, the nodes will be inserted
+     *  to the rowList.
+     */
+    private function insertRowsAt(startRow:int, count:int, nodes:Vector.<GridRowNode> = null):void
+    {
+        if (startRow < 0 || count <= 0)
+            return;
+
+        var startNode:GridRowNode = rowList.findNearestLTE(startRow);
+        var node:GridRowNode;
+
+        // start on the index we're inserting at.
+        if (startNode && startNode.rowIndex < startRow)
+            startNode = startNode.next;
+
+        // first we insert the nodes before this node.
+        if (nodes)
+        {
+            for each (node in nodes)
+            {
+                rowList.insertBefore(startNode, node);
+            }
+        }
+
+        // increment the index of nodes after this node.
+        node = startNode;
+        while (node)
+        {
+            node.rowIndex += count;
+            node = node.next;
+        }
+
+        this.rowCount += count;
+
+        // cache is invalid now.
+        recentNode = null;
+        recentNode2 = null;
+    }
+
+    /**
+     *  Removes count number of rows starting from startRow. This will
+     *  decrement rowCount. Returns any removed nodes.
+     */
+    private function removeRowsAt(startRow:int, count:int):Vector.<GridRowNode>
+    {
+        var vec:Vector.<GridRowNode> = new Vector.<GridRowNode>();
+        if (startRow < 0 || count <= 0)
+            return vec;
+
+        var node:GridRowNode = rowList.findNearestLTE(startRow);
+        var endRow:int = startRow + count;
+        var oldNode:GridRowNode;
+
+        if (node && node.rowIndex < startRow)
+            node = node.next;
+
+        while (node && node.rowIndex < endRow)
+        {
+            oldNode = node;
+            vec.push(oldNode);
+            node = node.next;
+            rowList.removeNode(oldNode);
+        }
+
+        while (node)
+        {
+            node.rowIndex -= count;
+            node = node.next;
+        }
+
+        this.rowCount -= count;
+
+        // cache is invalid now.
+        recentNode = null;
+        recentNode2 = null;
+        return vec;
+    }
+
+    /**
+     *  Removes any nodes that occupy the indices between startRow
+     *  and startRow + count.
+     */
+    private function clearRows(startRow:int, count:int):void
+    {
+        if (startRow < 0 || count <= 0)
+            return;
+
+        var node:GridRowNode = rowList.findNearestLTE(startRow);
+        var endRow:int = startRow + count;
+        var oldNode:GridRowNode;
+
+        if (node && node.rowIndex < startRow)
+            node = node.next;
+
+        while (node && node.rowIndex < endRow)
+        {
+            oldNode = node;
+            node = node.next;
+            rowList.removeNode(oldNode);
+        }
+
+        // cache is invalid now.
+        recentNode = null;
+        recentNode2 = null;
+    }

     /**
      *  Handles changes in the dataProvider.
      */
     public function dataProviderCollectionChanged(event:CollectionEvent):Boolean
     {
+        // TBD (klin): don't think we need to return booleans...
         switch (event.kind)
         {
             case CollectionEventKind.ADD:    return dataProviderCollectionAdd(event);
             case CollectionEventKind.REMOVE: return dataProviderCollectionRemove(event);
-
-            case CollectionEventKind.REPLACE:
-            case CollectionEventKind.MOVE:
-            case CollectionEventKind.REFRESH:
-            case CollectionEventKind.RESET:
-            case CollectionEventKind.UPDATE:
+            case CollectionEventKind.REPLACE: return dataProviderCollectionReplace(event);
+            case CollectionEventKind.MOVE: return dataProviderCollectionMove(event);
+            case CollectionEventKind.REFRESH: return dataProviderCollectionReset(event);
+            case CollectionEventKind.RESET: return dataProviderCollectionReset(event);
+            case CollectionEventKind.UPDATE: return dataProviderCollectionReplace(event); return true;
                 break;
         }

@@ -1115,7 +1220,36 @@
      */
     private function dataProviderCollectionRemove(event:CollectionEvent):Boolean
     {
-        rowCount -= event.items.length;
+        removeRows(event.location, event.items.length);
+        return true;
+    }
+
+    /**
+     *  @private
+     */
+    private function dataProviderCollectionReplace(event:CollectionEvent):Boolean
+    {
+        clearRows(event.location, event.items.length);
+        return true;
+    }
+
+    /**
+     *  @private
+     */
+    private function dataProviderCollectionMove(event:CollectionEvent):Boolean
+    {
+        moveRows(event.oldLocation, event.location, event.items.length);
+        return true;
+    }
+
+    /**
+     *  @private
+     */
+    private function dataProviderCollectionReset(event:CollectionEvent):Boolean
+    {
+        clear();
+        clearTypicalCellWidthsAndHeights();
+        this.rowCount = IList(event.target).length;
         return true;
     }
 }


fix coding style

fix coding style

--- src/aerys/minko/scene/controller/AnimationController.as
+++ src/aerys/minko/scene/controller/AnimationController.as
@@ -152,7 +152,10 @@
 			var timeValue : uint = getAnimationTime(time);

 			if (timeValue < _loopBeginTime || timeValue > _loopEndTime)
-				throw new Error('Time value is outside of playback window. To reset playback window, call resetPlaybackWindow.');
+				throw new Error(
+                    'Time value is outside of playback window. '
+                    +'To reset playback window, call resetPlaybackWindow.'
+                );

 			_currentTime = timeValue;

@@ -270,7 +273,8 @@
 				}

 				if ((deltaT > 0 && lastCurrentTime > _currentTime)
-					|| (deltaT < 0 && (lastCurrentTime < _currentTime || _currentTime * lastCurrentTime < 0)))
+					|| (deltaT < 0 && (lastCurrentTime < _currentTime
+                        || _currentTime * lastCurrentTime < 0)))
 				{
 					if (_looping)
 						_looped.execute(this);


now using maxComputationTimePerFrame on callLater tasks with immediate priority

--- WeaveCore/src/weave/core/StageUtils.as
+++ WeaveCore/src/weave/core/StageUtils.as
@@ -33,10 +33,10 @@
 	import mx.core.mx_internal;

 	import weave.api.WeaveAPI;
+	import weave.api.reportError;
 	import weave.api.core.ICallbackCollection;
 	import weave.api.core.ILinkableObject;
 	import weave.api.core.IStageUtils;
-	import weave.api.reportError;
 	import weave.compiler.StandardLib;
 	import weave.utils.DebugTimer;
 	import weave.utils.DebugUtils;
@@ -319,11 +319,16 @@
 		 */
 		private function handleCallLater():void
 		{
+			if (UIComponentGlobals.callLaterSuspendCount > 0)
+				return;
+
 			var args:Array;
 			var stackTrace:String;
 			var i:int;
-
-			// first run the functions that cannot be delayed more than one frame.
+			var now:int;
+			var allStop:int = _currentFrameStartTime + maxComputationTimePerFrame;
+
+			// first run the functions that should be called before anything else.
 			var calls:Array = _priorityCallLaterQueues[WeaveAPI.TASK_PRIORITY_IMMEDIATE] as Array;
 			if (calls.length > 0)
 			{
@@ -338,6 +343,14 @@
 					args = calls[i] as Array;
 					stackTrace = _stackTraceMap[args];

+					now = getTimer();
+					// if max computation time was reached for this frame, queue this function for later
+					if (now > allStop)
+					{
+						(_priorityCallLaterQueues[WeaveAPI.TASK_PRIORITY_IMMEDIATE] as Array).push(args);
+						continue;
+					}
+
 //					WeaveAPI.SessionManager.unassignBusyTask(args);

 					// don't call the function if the relevantContext was disposed of.
@@ -349,11 +362,8 @@
 				}
 			}

-			if (UIComponentGlobals.callLaterSuspendCount > 0)
-				return;
 //			trace('-------');
 			var minPriority:int = WeaveAPI.TASK_PRIORITY_IMMEDIATE + 1;
-			var allStop:int = _currentFrameStartTime + maxComputationTimePerFrame;
 			var pStart:int = getTimer();
 			var pAlloc:int = int(_priorityAllocatedTimes[_activePriority]);
 			var pElapsed:int = int(_priorityElapsedTimes[_activePriority]);
@@ -364,7 +374,7 @@
 				if (debug_callLater)
 					DebugTimer.begin();

-				var now:int = getTimer();
+				now = getTimer();
 				if (now > pStop || pQueue.length == 0)
 				{
 					// keep track of elapsed time for this priority


Transferred from the Adobe Open Source Subversion Repository

Revision: 8339
Author:   dsubrama@adobe.com
Date:     2009-06-26T22:09:32.086948Z

Log Message:
-----------
http://bugs.adobe.com/jira/browse/SDK-21598 - Change SkinnableContainer default to BasicLayout instead of VerticalLayout.

QA: Yes
Doc: Yes
Checkintests: Pass
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/spark/sparkTest.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SkinnableContainerSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -516,7 +516,7 @@
     /**
      *  @copy spark.components.supportClasses.GroupBase#layout
      *
-     *  @default VerticalLayout
+     *  @default BasicLayout
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/rpc/src/mx/messaging/management/MBeanFeatureInfo.as
+++ frameworks/projects/rpc/src/mx/messaging/management/MBeanFeatureInfo.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.messaging.management
 {


HiddenInputHelper null value to empty string

--- src/metafas3/reaction_view/helpers/HiddenInputHelper.as
+++ src/metafas3/reaction_view/helpers/HiddenInputHelper.as
@@ -83,7 +83,7 @@
 			// prevent superfluous event firing
 			if (e.newValue == value) return;
 			// update display object
-			value = e.newValue.toString();
+			value = (e.newValue ? e.newValue.toString() : '');
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18173
Author:   jasonsj@adobe.com
Date:     2010-10-15T17:03:20.801634Z

Log Message:
-----------
Mobile Theme Initial check-in

* New light-look visuals from XD
* Changed airmobile-config.xml to use standalone Mobile theme instead of Spark overlay
* Added theme="spark, mobile" where spark was already white-listed and support is implemented and/or planned for Mobile/spark.css (see https://zerowing.corp.adobe.com/display/flexmobile/Mobile+Theme+Styles+Spec)
* MobileSkin has symbolColor and chromeColor support. Override beginChromeColorFill and drawChromeColor when defining custom chromeColor visuals.
* CheckBox and RadioButton now have chromeColor and symbolColor support
* Added textShadowColor and textShadowAlpha support to Button and ActionBar
* Added chromeColor support to HScrollBar and VScrollBar

QE notes: All mobile skins have been updaetd.
Doc notes: Update mobile skinning documentation for new APIs
Bugs:
SDK-28043 Investigate usage of "viewWidth", "viewHeight" for the Flex Mobile Skin Assets
SDK-27609 Mobile scroll bar skins should use chromeColor
SDK-27646 cornerradius has no effect on button in mobile application
Reviewer: gruehle
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/VScrollBarTrackSkin.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/defaults.css</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/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/ContainerBackgroundStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/TextInput_border.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.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/assets/Button_down.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/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/assets/RadioButton_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_down.fxg</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/spark/src/spark/components/Scroller.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/assets/RadioButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_downSelected.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/themes/Mobile/spark.css</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/airmobile-config.xml</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/assets/RadioButton_downSelected.fxg</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/NavigationButtonSkin.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -81,7 +81,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="accentColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="accentColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
  *  @copy spark.components.supportClasses.GroupBase#style:alternatingItemColors
@@ -91,7 +91,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="alternatingItemColors", type="Array", arrayType="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="alternatingItemColors", type="Array", arrayType="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
  *  Alpha level of the background for this component.
@@ -104,7 +104,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="backgroundAlpha", type="Number", inherit="no", theme="spark")]
+[Style(name="backgroundAlpha", type="Number", inherit="no", theme="spark, mobile")]

 /**
  *  Background color of a component.
@@ -116,7 +116,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="backgroundColor", type="uint", format="Color", inherit="no", theme="spark")]
+[Style(name="backgroundColor", type="uint", format="Color", inherit="no", theme="spark, mobile")]

 /**
  *  The alpha of the content background for this component.
@@ -126,7 +126,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="contentBackgroundAlpha", type="Number", inherit="yes", theme="spark")]
+[Style(name="contentBackgroundAlpha", type="Number", inherit="yes", theme="spark, mobile")]

 /**
  *  @copy spark.components.supportClasses.GroupBase#style:contentBackgroundColor
@@ -136,7 +136,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
  *  @copy spark.components.supportClasses.GroupBase#style:focusColor
@@ -146,7 +146,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
  * @copy spark.components.supportClasses.GroupBase#style:rollOverColor
@@ -166,7 +166,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
  *  When in touch interaction mode, the number of milliseconds to wait before showing the
@@ -187,6 +187,30 @@
  *  @productversion Flex 4.5
  */
 [Style(name="touchDelay", type="Number", format="Time", inherit="yes", minValue="0.0")]
+
+/**
+ *  Color of text shadows.
+ *
+ *  @default #FFFFFF
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textShadowColor", type="uint", format="Color", inherit="yes", theme="mobile")]
+
+/**
+ *  Alpha of text shadows.
+ *
+ *  @default 0.55
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textShadowAlpha", type="Number",inherit="yes", minValue="0.0", maxValue="1.0", theme="mobile")]

 [IconFile("SkinnableContainer.png")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 8031
Author:   egeorgie@adobe.com
Date:     2009-06-20T01:10:03.288554Z

Log Message:
-----------
Scrub the TODOs in the framework, convert to FIXMEs in the new convention and assigning an owner.

Doc Notes: N/A
Bugs: N/A
Reviewer: Deepa
tests: build, checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ModifiedCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ErrorSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.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/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<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/skins/spark/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<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/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/LineSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.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/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as
@@ -123,7 +123,7 @@
 	 */
 	public var target:Object;

-    // TODO (chaase): This flag is currently used by the transform-related
+    // FIXME (chaase): This flag is currently used by the transform-related
     // effects. We should investigate whether we really need it, or can get
     // by without it
     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 18746
Author:   rfrishbe@adobe.com
Date:     2010-11-19T21:47:15.951969Z

Log Message:
-----------
A few MobileIconItemRenderer/MobileItemRenderer checkins

1) Add more layout helper methods: getElementPreferredWidth(), getElementPreferredHeight()
2) Deal with multi-line text reflow for message
3) Have the icon use verticalAlign if there's no message around
4) Change caret index to draw background instead of border

QE notes:
Doc notes:
Bugs: SDK-28217, SDK-28509, SDK-27649, SDK-27799
Reviewer: Alex, 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/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
@@ -20,6 +20,7 @@
 import mx.controls.listClasses.*;
 import mx.core.IFlexDisplayObject;
 import mx.core.IVisualElement;
+import mx.core.UIComponentGlobals;
 import mx.core.UITextField;
 import mx.core.UITextFormat;
 import mx.core.mx_internal;
@@ -239,7 +240,7 @@
      *  The source to set iconDisplay to, after waiting an appropriate delay period
      */
     private var loadingIconSource:Object;
-
+
     //--------------------------------------------------------------------------
     //
     //  Public Properties: Overridden
@@ -1506,6 +1507,36 @@

         super.validateSize(recursive);
     }
+
+	/**
+	 *  @private
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.0
+	 *  @productversion Flex 4.5
+	 */
+	override public function setEstimatedSize(estimatedWidth:Number = NaN,
+											  estimatedHeight:Number = NaN,
+											  invalidateSizeAllowed:Boolean = true):void
+	{
+		var oldcw:Number = this.estimatedWidth;
+		var oldch:Number = this.estimatedHeight;
+
+		super.setEstimatedSize(estimatedWidth, estimatedHeight, invalidateSizeAllowed);
+
+		var sameWidth:Boolean = isNaN(estimatedWidth) && isNaN(oldcw) || estimatedWidth == oldcw;
+		var sameHeight:Boolean = isNaN(estimatedHeight) && isNaN(oldch) || estimatedHeight == oldch;
+		if (!(sameHeight && sameWidth))
+		{
+			if (!isNaN(explicitWidth) &&
+				!isNaN(explicitHeight))
+				return;
+
+			if (invalidateSizeAllowed)
+				invalidateSize();
+		}
+	}

     /**
      *  @private
@@ -1524,17 +1555,34 @@
         var myMeasuredMinHeight:Number = 0;

         // Icon is on left
+		var myIconWidth:Number = 0;
+		var myIconHeight:Number = 0;
         if (iconDisplay)
         {
-            var myIconWidth:Number = (isNaN(iconWidth) ? iconDisplay.getPreferredBoundsWidth() : iconWidth);
-            var myIconHeight:Number = (isNaN(iconHeight) ? iconDisplay.getPreferredBoundsHeight() : iconHeight);
+			myIconWidth = (isNaN(iconWidth) ? getElementPreferredWidth(iconDisplay) : iconWidth);
+			myIconHeight = (isNaN(iconHeight) ? getElementPreferredHeight(iconDisplay) : iconHeight);

             myMeasuredWidth += myIconWidth;
-            myMeasuredHeight = Math.max(myMeasuredHeight, myIconHeight);
             myMeasuredMinWidth += myIconWidth;
+			myMeasuredHeight = Math.max(myMeasuredHeight, myIconHeight);
             myMeasuredMinHeight = Math.max(myMeasuredMinHeight, myIconHeight);
         }
-
+
+		// Decorator is up next
+		var decoratorWidth:Number = 0;
+		var decoratorHeight:Number = 0;
+
+		if (decoratorDisplay)
+		{
+			decoratorWidth = getElementPreferredWidth(decoratorDisplay);
+			decoratorHeight = getElementPreferredHeight(decoratorDisplay);
+
+			myMeasuredWidth += decoratorWidth;
+			myMeasuredMinWidth += decoratorWidth;
+			myMeasuredHeight = Math.max(myMeasuredHeight, decoratorHeight);
+			myMeasuredMinHeight = Math.max(myMeasuredHeight, decoratorHeight);
+		}
+
         // Text is aligned next to icon
         var labelWidth:Number = 0;
         var labelHeight:Number = 0;
@@ -1547,69 +1595,51 @@
             if (labelDisplay.isTruncated)
                 labelDisplay.text = labelText;

-            // commit styles to get an accurate measurement
-            labelDisplay.commitStyles();
-
-            labelWidth = labelDisplay.measuredWidth;
-            labelHeight = labelDisplay.measuredHeight;
-        }
-
+            labelWidth = getElementPreferredWidth(labelDisplay);
+            labelHeight = getElementPreferredHeight(labelDisplay);
+        }
+
+
         if (messageDisplay)
         {
-            // commit styles to get an accurate measurement
-            // FIXME (rfrishbe): should take in to account constrainedWidth here
-            messageDisplay.commitStyles();
-
-            messageWidth = messageDisplay.measuredWidth;
-            messageHeight = messageDisplay.measuredHeight;
-        }
-
-        var verticalGap:Number = (labelDisplay && messageDisplay) ? getStyle("verticalGap") : 0;
-
+			// now we need to measure messageDisplay's height.  Unfortunately, this is tricky and
+			// is dependent on messageDisplay's width
+			// if we have an estimated width, use it to calculate messageDisplay's width.
+			// Otherwise, we'll keep it the same width as it was before
+			if (!isNaN(estimatedWidth))
+				messageDisplay.width = estimatedWidth - paddingAndGapWidth - decoratorWidth - myIconWidth;
+
+            messageWidth = getElementPreferredWidth(messageDisplay);
+            messageHeight = getElementPreferredHeight(messageDisplay);
+        }
+
         myMeasuredWidth += Math.max(labelWidth, messageWidth);
-        myMeasuredHeight = Math.max(myMeasuredHeight, labelHeight + messageHeight + verticalGap);
-
-        // Decorator is up next
-        if (decoratorDisplay)
-        {
-            if (decoratorDisplay is IVisualElement)
-            {
-                myMeasuredWidth += IVisualElement(decoratorDisplay).getPreferredBoundsWidth();
-                myMeasuredHeight = Math.max(myMeasuredHeight, IVisualElement(decoratorDisplay).getPreferredBoundsHeight());
-                myMeasuredMinWidth += IVisualElement(decoratorDisplay).getMinBoundsWidth();
-                myMeasuredMinHeight = Math.max(myMeasuredMinHeight, IVisualElement(decoratorDisplay).getMinBoundsHeight());
-            }
-            else if (decoratorDisplay is IFlexDisplayObject)
-            {
-                myMeasuredWidth += IFlexDisplayObject(decoratorDisplay).measuredWidth;
-                myMeasuredHeight = Math.max(myMeasuredHeight, IFlexDisplayObject(decoratorDisplay).measuredHeight);
-                myMeasuredMinWidth += IFlexDisplayObject(decoratorDisplay).measuredWidth;
-                myMeasuredMinHeight = Math.max(myMeasuredMinHeight, IFlexDisplayObject(decoratorDisplay).measuredHeight);
-            }
-        }
-
-        // now to add on padding and horizontal gap
-        // verticalGap is already handled above when there's a label
-        // and a message since that's the only place verticalGap matters
-        var numHorizontalSections:int = 0;
-        if (iconDisplay)
-            numHorizontalSections++;
-
-        if (decoratorDisplay)
-            numHorizontalSections++;
-
-        if (labelDisplay || messageDisplay)
-            numHorizontalSections++;
-
-        var extraWidth:Number = getStyle("paddingLeft") + getStyle("paddingRight");
-        if (numHorizontalSections > 0)
-            extraWidth += (getStyle("horizontalGap") * (numHorizontalSections - 1));
-        var extraHeight:Number = getStyle("paddingTop") + getStyle("paddingBottom");
-
-        myMeasuredWidth += extraWidth;
-        myMeasuredMinWidth += extraWidth;
-        myMeasuredHeight += extraHeight;
-        myMeasuredMinHeight += extraHeight;
+        myMeasuredHeight = Math.max(myMeasuredHeight, labelHeight + messageHeight);
+
+		// now to add on padding and horizontal gap
+		// verticalGap is already handled above when there's a label
+		// and a message since that's the only place verticalGap matters
+		var numHorizontalSections:int = 0;
+		if (iconDisplay)
+			numHorizontalSections++;
+
+		if (decoratorDisplay)
+			numHorizontalSections++;
+
+		if (labelDisplay || messageDisplay)
+			numHorizontalSections++;
+
+		var paddingAndGapWidth:Number = getStyle("paddingLeft") + getStyle("paddingRight");
+		if (numHorizontalSections > 0)
+			paddingAndGapWidth += (getStyle("horizontalGap") * (numHorizontalSections - 1));
+
+		var verticalGap:Number = (labelDisplay && messageDisplay) ? getStyle("verticalGap") : 0;
+		var paddingAndGapHeight:Number = getStyle("paddingTop") + getStyle("paddingBottom") + verticalGap;
+
+		myMeasuredWidth += paddingAndGapWidth;
+		myMeasuredMinWidth += paddingAndGapWidth;
+		myMeasuredHeight += paddingAndGapHeight;
+		myMeasuredMinHeight += paddingAndGapHeight;

         // now set the local variables to the member variables.  Make sure it means our
         // minimum height of 80
@@ -1619,6 +1649,55 @@
         measuredMinWidth = myMeasuredMinWidth;
         measuredMinHeight = Math.max(80, myMeasuredMinHeight);
     }
+
+	/**
+	 *  @private
+	 *  We override the setLayoutBoundsSize to determine whether to perform
+	 *  text reflow. This is a convenient place, as the layout passes NaN
+	 *  for a dimension not constrained to the parent.
+	 */
+	override public function setLayoutBoundsSize(width:Number,
+												 height:Number,
+												 postLayoutTransform:Boolean = true):void
+	{
+		var newEstimates:Boolean = false;
+		var cw:Number = estimatedWidth;
+		var ch:Number = estimatedHeight;
+		var oldcw:Number = cw;
+		var oldch:Number = ch;
+		// we got lied to, probably the constraints weren't accurate or
+		// couldn't be computed
+		if (!isNaN(width))
+		{
+			if (isNaN(estimatedWidth) || width != estimatedWidth)
+			{
+				cw = width;
+				newEstimates = true;
+			}
+		}
+		// we got lied to, probably the constraints weren't accurate or
+		// couldn't be computed
+		if (!isNaN(height))
+		{
+			if (isNaN(estimatedHeight) || height != estimatedHeight)
+			{
+				ch = height;
+				newEstimates = true;
+			}
+		}
+		if (newEstimates)
+		{
+			setEstimatedSize(cw, ch);
+
+			// re-measure with the new estimated size
+			UIComponentGlobals.layoutManager.validateClient(this, true);
+
+			// set estimated size back to what it was
+			setEstimatedSize(oldcw, oldch, false);
+		}
+
+		super.setLayoutBoundsSize(width, height, postLayoutTransform);
+	}

     /**
      *  @private
@@ -1670,28 +1749,27 @@
         if (iconDisplay)
         {
             // set the icon's position and size
-            iconDisplay.setLayoutBoundsSize(this.iconWidth, this.iconHeight);
-            iconDisplay.setLayoutBoundsPosition(paddingLeft, paddingTop);
+            resizeElement(iconDisplay, this.iconWidth, this.iconHeight);

             iconWidth = iconDisplay.getLayoutBoundsWidth();
             iconHeight = iconDisplay.getLayoutBoundsHeight();
+
+            // if there's no messageDisplay, then use vAlign to position the icon.
+            // otherwise, just position it at y = paddingTop
+            var iconDisplayY:Number;
+            if (!messageDisplay)
+                iconDisplayY = Math.round(vAlign * (viewHeight - iconHeight)) + paddingTop;
+            else
+                iconDisplayY = paddingTop;
+
+            positionElement(iconDisplay, paddingLeft, iconDisplayY);
         }

         // decorator is aligned next to icon
         if (decoratorDisplay)
         {
-            // FIXME (egeorgie): another helper method for getting the preferred size?
-            if (decoratorDisplay is IVisualElement)
-            {
-                var decoratorVisualElement:IVisualElement = IVisualElement(decoratorDisplay);
-                decoratorWidth = decoratorVisualElement.getPreferredBoundsWidth();
-                decoratorHeight = decoratorVisualElement.getPreferredBoundsHeight();
-            }
-            else if (decoratorDisplay is IFlexDisplayObject)
-            {
-                decoratorWidth = IFlexDisplayObject(decoratorDisplay).measuredWidth;
-                decoratorHeight = IFlexDisplayObject(decoratorDisplay).measuredHeight;
-            }
+            decoratorWidth = getElementPreferredWidth(decoratorDisplay);
+            decoratorHeight = getElementPreferredHeight(decoratorDisplay);

             resizeElement(decoratorDisplay, decoratorWidth, decoratorHeight);

@@ -1723,14 +1801,15 @@
             if (labelDisplay.isTruncated)
                 labelDisplay.text = labelText;

-            // commit styles to get an accurate measurement
+            // commit styles to make sure it uses updated look
             labelDisplay.commitStyles();
-            labelTextHeight = labelDisplay.textHeight + UITextField.TEXT_HEIGHT_PADDING;
+
+            labelTextHeight = getElementPreferredHeight(labelDisplay);
         }

         if (messageDisplay && messageText != "")
         {
-            // commit styles to get an accurate measurement
+            // commit styles to make sure it uses updated look
             messageDisplay.commitStyles();
         }

@@ -1765,20 +1844,28 @@
         if (messageDisplay)
         {
             // handle message
-            // don't use the measured text width or height because that only takes the first line in to account
             messageWidth = Math.max(labelComponentsViewWidth, 0);
             messageHeight = Math.max(viewHeight - labelHeight - verticalGap, 0);
-            // FIXME (rfrishbe): we should check to see if this causes textHeight to change because then we
-            // might need to remeasure
+
+            // grab old messageDisplay height before resizing it
+            var oldMessageMeasuredHeight:Number = getElementPreferredHeight(messageDisplay);
+
             resizeElement(messageDisplay, messageWidth, messageHeight);

-            // FIXME (rfrishbe): figure out if this is right with regards to multi-line text.
-            // For instance, if the text component spans to 2 lines but only shows one line, then textHeight here
-            // is the size of the two line text.  We take the minimum with messageHeight to make sure
-            // we don't position it outside of the item renderer's bounds later on, but this
-            // calculation still isn't correct.  We basically want the textHeight for the number of
-            // displayed lines.
-            messageHeight = Math.min(messageHeight, messageDisplay.textHeight + UITextField.TEXT_HEIGHT_PADDING);
+            // grab new messageDisplay height after the messageDisplay has taken its final size
+            var newMessageMeasuredHeight:Number = getElementPreferredHeight(messageDisplay);
+
+            // if the resize caused the messageDisplay's height to change (because of
+            // text reflow), then we need to remeasure ourselves with our new estimatedWidth
+            if (oldMessageMeasuredHeight != newMessageMeasuredHeight)
+            {
+				// if unscaledWidth is 0, we're in an edge case, so let's not invalidateSize() here
+				// as we're not really visible anyways, so why do an extra invalidation
+				if (unscaledWidth > 0)
+	                invalidateSize();
+            }
+
+            messageHeight = Math.max(0, Math.min(messageHeight, newMessageMeasuredHeight));

             // since it's multi-line, no need to truncate
             //if (messageDisplay.isTruncated)
@@ -1799,7 +1886,6 @@
                 positionElement(messageDisplay, labelComponentsX, labelComponentsY + labelHeight + verticalGap);
         }

-
         // see if we have an icon that needs to be validated
         if (iconDisplay &&
             iconDisplay.displayObject is ISharedDisplayObject &&


Transferred from the Adobe Open Source Subversion Repository

Revision: 19124
Author:   mcho@adobe.com
Date:     2010-12-07T23:55:59.858629Z

Log Message:
-----------
160 and 240 dpi mobile skins for VScrollbar and HScrollbar

QE notes:
Doc notes:
Bugs:
Reviewer: Jason SJ, Ryan
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/src/views/ScrollbarView.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/assets</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/src/views/MobileSkinsHomeView.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/VScrollThumb.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/VScrollThumb.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/assets/image.png</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/HScrollThumb.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/HScrollThumb.fxg</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as
@@ -12,35 +12,139 @@
 package spark.skins.mobile
 {

+import flash.display.DisplayObject;
 import flash.display.Graphics;
+
+import mx.core.DeviceDensity;

 import spark.components.Button;
 import spark.skins.mobile.supportClasses.MobileSkin;
+import spark.skins.mobile160.assets.HScrollThumb;
+import spark.skins.mobile240.assets.HScrollThumb;

 public class HScrollBarThumbSkin extends MobileSkin
 {
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
     public function HScrollBarThumbSkin()
     {
         super();
+		useChromeColor = true;
+
+		// Depending on density set asset and visible thumb height
+		switch (authorDensity)
+		{
+			case DeviceDensity.PPI_240:
+			{
+				thumbClass = spark.skins.mobile240.assets.HScrollThumb;
+				thumbHeight = 6;
+				break;
+			}
+			default:
+			{
+				thumbClass = spark.skins.mobile160.assets.HScrollThumb;
+				thumbHeight = 4;
+				break;
+			}
+		}
     }
-
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+	/**
+	 * @copy spark.skins.spark.ApplicationSkin#hostComponent
+	 */
     public var hostComponent:Button;
-
-    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+	/**
+	 *  Specifies the FXG class to use for the thumb
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	public var thumbClass:Class;
+
+	/**
+	 *  Specifies the DisplayObject to use for the thumb
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	public var thumbSkin:DisplayObject;
+
+
+	/**
+	 *  Height of the visible thumb area
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	protected var thumbHeight:int;
+
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+	/**
+	 *  @protected
+	 */
+	override protected function createChildren():void
+	{
+		if (!thumbSkin)
+		{
+			thumbSkin = new thumbClass();
+			addChild(thumbSkin);
+		}
+	}
+
+	/**
+	 *  @protected
+	 */
+	override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+	{
+		super.updateDisplayList(unscaledWidth, unscaledHeight);
+		setElementSize(thumbSkin, unscaledWidth, unscaledHeight);
+	}
+
+	/**
+	 *  @protected
+	 */
+	override protected function beginChromeColorFill(chromeColorGraphics:Graphics):void
+	{
+		var chromeColor:uint = getChromeColor();
+		chromeColorGraphics.beginFill(chromeColor, 1);
+	}
+
+	/**
+	 *  @protected
+	 */
+    override protected function drawChromeColor(chromeColorGraphics:Graphics, unscaledWidth:Number, unscaledHeight:Number):void
     {
-        var g:Graphics = graphics;
-
-        var chromeColor:uint = getChromeColor();
-        g.clear();
-
-        // solid chromeColor border, alpha=1
-        g.lineStyle(1, chromeColor);
-
-        // solid chromeColor fill, alpha=.5
-        g.beginFill(chromeColor, 0.5);
-        g.drawRoundRect(0.5, 0.5, unscaledWidth, unscaledHeight, unscaledHeight - 1, unscaledHeight - 1);
-        g.endFill();
-    }
+		chromeColorGraphics.drawRoundRect(0, 0,
+									      unscaledWidth, thumbHeight,
+										  thumbHeight, thumbHeight);
+	}

 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 spark.components.supportClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2805
Author:   chaase@adobe.com
Date:     2008-08-11T20:37:18.700675Z

Log Message:
-----------
First checkin for the "Arbitrary Type Interpolation" feature. This feature has a rewritten Tween class (now named flex.effects.Animation). This class supports the old Tween capabilities, but adds functionality such as the ability to supply alternate interpolation objects (to allow animation of non-Number types), a new Easing API, and new 'repeat behavior' that will allow terser looping or reversing animations. The existing new effects were slightly changed to use the new Animation class (instead of Tween), and the superclass of the new effects, AnimateProperties (renamed 'Animate'), is now a subclass of Effect (not TweenEffect).

Added various new interpolation and easing classes, along with the new packages flex.effects.interpolation and flex.effects.easing. Also added new color-interpolation effect, 'Tint'.

Expect slight tweaks to the API during i7, but the bulk of the functionality and API changes are being checked in now.

Reviewed by Jason S.
Testing: checkintests & mustella tests/Effects (passed)

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animation.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/.actionScriptProperties</path>
<path kind="file" action="A">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/EffectsProperties.mxml</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimatePropertiesInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/AnimateProperties.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/components/AnimationPropertiesForm.mxml</path>
<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/effectClasses/FadeInstance.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/Fade.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Constant.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Power.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/ColorInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimateInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/TintInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/IEaser.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Tint.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animate.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/NumberArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Resize.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Move.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/AnimationEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/ArrayInterpolator.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -0,0 +1,447 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flex.effects.effectClasses
+{
+import flex.effects.Animation;
+import flex.effects.IAnimationTarget;
+import flex.effects.PropertyValuesHolder;
+import flex.effects.easing.IEaser;
+import flex.effects.interpolation.IInterpolator;
+
+import mx.core.UIComponent;
+import mx.effects.EffectInstance;
+import mx.effects.EffectManager;
+
+/**
+ * The AnimateInstance class implements the instance class for the
+ * Animate effect. Flex creates an instance of this class when
+ * it plays a Animate effect; you do not create one yourself.
+ */
+public class AnimateInstance extends EffectInstance implements IAnimationTarget
+{
+    public var animation:Animation = new Animation();
+
+    public function AnimateInstance(target:Object)
+    {
+        super(target);
+        animation.addAnimationTarget(this);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  Tracks whether each property of the target is an actual
+     *  property or a style. We determine this dynamically by
+     *  simply checking whether the property is 'in' the target.
+     *  If not, we check whether it is a valid style, and otherwise
+     *  throw an error.
+     */
+    private var isStyleMap:Object = new Object();
+
+    /**
+     *  @private.
+     *  Used internally to hold the value of the new playhead position
+     *  if the tween doesn't currently exist.
+     */
+    private var _seekTime:Number = 0;
+
+    private var reverseAnimation:Boolean;
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * An array of PropertyValuesHolder objects, each of which holds the
+     * name of the property being animated and the values that the property
+     * will take on during the animation.
+     */
+    public var propertyValuesList:Array;
+
+    /**
+     * This flag indicates whether values should be rounded before set on
+     * the targets. This can be useful in situations where values resolve to
+     * pixel coordinates and snapping to pixels is desired over landing
+     * on fractional pixels.
+     */
+    protected var roundValues:Boolean;
+
+    public function set easer(value:IEaser):void
+    {
+        animation.easer = value;
+    }
+    public function get easer():IEaser
+    {
+        return animation.easer;
+    }
+
+    public function set interpolator(value:IInterpolator):void
+    {
+        animation.interpolator = value;
+    }
+    public function get interpolator():IInterpolator
+    {
+        return animation.interpolator;
+    }
+
+    public function set repeatBehavior(value:String):void
+    {
+        animation.repeatBehavior = value;
+    }
+    public function get repeatBehavior():String
+    {
+        return animation.repeatBehavior;
+    }
+
+    override public function set duration(value:Number):void
+    {
+        animation.duration = value;
+    }
+    override public function get duration():Number
+    {
+        return animation.duration;
+    }
+
+    override public function set startDelay(value:int):void
+    {
+        animation.startDelay = value;
+    }
+    override public function get startDelay():int
+    {
+        return animation.startDelay;
+    }
+
+    override public function set repeatDelay(value:int):void
+    {
+        animation.repeatDelay = value;
+    }
+    override public function get repeatDelay():int
+    {
+        return animation.repeatDelay;
+    }
+
+    override public function set repeatCount(value:int):void
+    {
+        animation.repeatCount = value;
+    }
+    override public function get repeatCount():int
+    {
+        return animation.repeatCount;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function pause():void
+    {
+        super.pause();
+
+        if (animation)
+            animation.pause();
+    }
+
+    /**
+     *  @private
+     */
+    override public function stop():void
+    {
+        super.stop();
+
+        if (animation)
+            animation.stop();
+    }
+
+    /**
+     *  @private
+     */
+    override public function resume():void
+    {
+        super.resume();
+
+        if (animation)
+            animation.resume();
+    }
+
+    /**
+     *  @private
+     */
+    override public function reverse():void
+    {
+        super.reverse();
+
+        if (animation)
+            animation.reverse();
+
+        reverseAnimation = !reverseAnimation;
+    }
+
+    /**
+     *  Advances the effect to the specified position.
+     *
+     *  @param playheadTime The position, in milliseconds, between 0
+     *  and the value of the duration property.
+     */
+    public function seek(playheadTime:Number):void
+    {
+        if (animation)
+            animation.seek(playheadTime);
+        else
+            _seekTime = playheadTime;
+    }
+
+    /**
+     *  Interrupts an effect that is currently playing,
+     *  and immediately jumps to the end of the effect.
+     *  Calls the Tween.endTween() method
+     *  on the tween property.
+     *  This method implements the method of the superclass.
+     *
+     *
If you create a subclass of TweenEffectInstance,
+     *  you can optionally override this method.

+     *
+     *
The effect dispatches the effectEnd event.

+     *
+     *  @see mx.effects.EffectInstance#end()
+     */
+    override public function end():void
+    {
+        // Jump to the end of the animation.
+        if (animation)
+        {
+            animation.end();
+            animation = null;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.effects.IEffectInstance#startEffect()
+     */
+    override public function startEffect():void
+    {
+        // This method is a copy of that in EffectInstance, but removes
+        // the startDelay functionality, as that is handled by the
+        // underlying Animation object for AnimateInstance
+
+        // Also removes EffectManager.effectStarted() to avoid use of
+        // mx_internal. New effects are not currently triggerable, so
+        // this should not matter
+
+        if (target is UIComponent)
+        {
+            UIComponent(target).effectStarted(this);
+        }
+        play();
+    }
+
+    /**
+     * Starts this effect. Performs any final setup for each property
+     * from/to values and starts an Animation that will update that property.
+     *
+     * @private
+     */
+    override public function play():void
+    {
+        // Do what effects normally do when they start, namely
+        // dispatch an 'effectStart' event from the target.
+        super.play();
+
+        if (!propertyValuesList || propertyValuesList.length == 0)
+            return;
+
+        isStyleMap = new Array(propertyValuesList.length);
+
+        // These two temporary arrays will hold the values passed into the
+        // Animation to be interpolated between during the animation. The order
+        // of the values in these arrays must match the order of the property
+        // names in the propertyValuesList array, as we will assume during update
+        // events that the interpolated values in the array are in that same order.
+        var fromVals:Array = [];
+        var toVals:Array = [];
+        for (var i:int = 0; i < propertyValuesList.length; ++i)
+        {
+            var holder:PropertyValuesHolder = PropertyValuesHolder(propertyValuesList[i]);
+            var property:String = holder.property;
+            var propValues:Array = holder.values;
+            var fromValue:Number;
+            var toValue:Number;
+
+            if (!property || (property == ""))
+                throw new Error("Illegal property value: " + property);
+
+            if (property in target)
+            {
+                isStyleMap[property] = false;
+            }
+            else
+            {
+                try {
+                    target.getStyle(property);
+                    isStyleMap[property] = true;
+                }
+                catch (err:Error)
+                {
+                    throw new Error("Property " + property + " is neither " +
+                        "a property or a style on object " + target + ": " + err);
+                }
+                // TODO: check to make sure that the throw above won't
+                // let the code flow get to here
+            }
+
+            // Set any NaN from/to values to the current values in the target
+            fromValue = isNaN(propValues[0]) ? getCurrentValue(property) :
+                propValues[0];
+            if (!isNaN(propValues[1]))
+            {
+                toValue = propValues[1];
+            }
+            else
+            {
+                if (propertyChanges &&
+                    propertyChanges.end[property] !== undefined)
+                    toValue = propertyChanges.end[property];
+                else
+                    toValue = getCurrentValue(property);
+            }
+            if (propertyValuesList.length > 1)
+            {
+                fromVals.push(fromValue);
+                toVals.push(toValue);
+            }
+        }
+
+        if (propertyValuesList.length > 1)
+        {
+            // Create the single Animation that will interpolate all properties
+            // simultaneously by interpolating the elements of the
+            // from/toVals arrays
+            animation.startValue = fromVals;
+            animation.endValue = toVals;
+        }
+        else
+        {
+            // Only one property; don't bother with the arrays
+            animation.startValue = fromValue;
+            animation.endValue = toValue;
+        }
+
+        if (_seekTime > 0)
+            animation.seek(_seekTime);
+        if (reverseAnimation)
+            animation.reverse();
+
+        animation.play();
+
+        // TODO (chaase): there may be a better way to organize the
+        // animations for each property. For example, we could use
+        // an animation of a single value from 0 to 1 and then update each
+        // property based on that elapsed fraction.
+    }
+
+    /**
+     * Set the values in the given array on the properties held in our
+     * propertyValuesList array. This is called by the update and end
+     * functions, which are called by the Animation during the animation.
+     */
+    private function setVals(value:Object):void
+    {
+        var holder:PropertyValuesHolder;
+
+        if (propertyValuesList.length == 1)
+        {
+            holder = PropertyValuesHolder(propertyValuesList[0]);
+            setValue(holder.property, value);
+        }
+        else
+        {
+            var valueArray:Array = value as Array;
+            for (var i:int = 0; i < propertyValuesList.length; ++i)
+            {
+                holder = PropertyValuesHolder(propertyValuesList[i]);
+                setValue(holder.property, valueArray[i]);
+            }
+        }
+    }
+
+    public function animationStart(animation:Animation, value:Object):void
+    {
+    }
+
+    /**
+     * Handles update events from the animation.
+     */
+    public function animationUpdate(animation:Animation, value:Object):void
+    {
+        setVals(value);
+    }
+
+    public function animationRepeat(animation:Animation, value:Object):void
+    {
+    }
+
+    /**
+     * Handles the end event from the animation. The value here is an Array of
+     * values, one for each 'property' in our propertyValuesList.
+     */
+    public function animationEnd(animation:Animation, value:Object):void
+    {
+        finishEffect();
+    }
+
+    /**
+     *  Utility function that sets the named property on the target to
+     *  the given value. Handles setting the property as either a true
+     *  property or a style.
+     *  @private
+     */
+    protected function setValue(property:String, value:Object):void
+    {
+        if (roundValues && (value is Number))
+            value = Math.round(Number(value));
+
+        if (!isStyleMap[property])
+            target[property] = value;
+        else
+            target.setStyle(property, value);
+    }
+
+    /**
+     *  Utility function that gets the value of the named property on
+     *  the target. Handles getting the value of the property as either a true
+     *  property or a style.
+     *  @private
+     */
+    protected function getCurrentValue(property:String):Number
+    {
+        if (!isStyleMap[property])
+            return target[property];
+        else
+            return target.getStyle(property);
+    }
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7836
Author:   chaase@adobe.com
Date:     2009-06-15T14:37:21.379918Z

Log Message:
-----------
PARB changes for effects. This includes various property renames, a couple of class renames, moving 3 classes to a sub-package, and various doc cleanups. This also includes changing a handful of Array properties to typed Vectors.

QE: This breaks Mustella due to the renames
Doc: Docs will need to be updated to reflect the changes as well
Bugs: None
Reviewer: Jason
Tests: checkintests, Thermo's transitionbug test

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EasingFraction.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/KeyFrame.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/RepeatBehavior.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/CallActionInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/HSBColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.pbk</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/WipeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -24,11 +24,11 @@
 import mx.resources.ResourceManager;
 import mx.styles.IStyleClient;

-import spark.effects.KeyFrame;
-import spark.effects.MotionPath;
-import spark.effects.SimpleMotionPath;
 import spark.effects.animation.Animation;
 import spark.effects.animation.IAnimationTarget;
+import spark.effects.animation.Keyframe;
+import spark.effects.animation.MotionPath;
+import spark.effects.animation.SimpleMotionPath;
 import spark.effects.easing.IEaser;
 import spark.effects.interpolation.IInterpolator;
 import spark.primitives.supportClasses.GraphicElement;
@@ -133,7 +133,7 @@
     //
     //--------------------------------------------------------------------------

-    private var _motionPaths:Array;
+    private var _motionPaths:Vector.<MotionPath>;
     /**
      *  @copy spark.effects.Animate#motionPaths
      *
@@ -142,11 +142,11 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function get motionPaths():Array
+    public function get motionPaths():Vector.<MotionPath>
     {
         return _motionPaths;
     }
-    public function set motionPaths(value:Array):void
+    public function set motionPaths(value:Vector.<MotionPath>):void
     {
         // Only set the list to the given value if we have a
         // null list to begin with. Otherwise, we've already
@@ -179,16 +179,6 @@
     protected var autoRemoveTarget:Boolean = false;

     /**
-     * @copy spark.effects.Animate#disableConstraints
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public var disableConstraints:Boolean;
-
-    /**
      * @copy spark.effects.Animate#disableLayout
      *
      *  @langversion 3.0
@@ -456,7 +446,7 @@
             // TODO (chaase): should we push this keyframe-init logic
             // into the MotionPath class instead?

-            var keyframes:Array = motionPaths[i].keyframes;
+            var keyframes:Vector.<Keyframe> = motionPaths[i].keyframes;
             if (!keyframes)
                 continue;
             if (interpolator)
@@ -554,7 +544,7 @@
                 MotionPath(motionPaths[i]);
             // set the first value (if invalid) to the current value
             // in the target
-            var keyframes:Array = motionPath.keyframes;
+            var keyframes:Vector.<Keyframe> = motionPath.keyframes;
             if (!keyframes || keyframes.length == 0)
                 continue;
             if (!isValidValue(keyframes[0].value))
@@ -576,7 +566,7 @@
             prevValue = keyframes[0].value;
             for (j = 1; j < keyframes.length; ++j)
             {
-                var kf:KeyFrame = KeyFrame(keyframes[j]);
+                var kf:Keyframe = Keyframe(keyframes[j]);
                 if (!isValidValue(kf.value))
                 {
                     if (isValidValue(kf.valueBy))
@@ -650,10 +640,11 @@
         // any startDelay) to cache constraints and disable layout. This
         // avoids problems with doing this too early and affecting other
         // effects that are running before this one.
-        if (disableConstraints)
+        if (disableLayout)
+        {
+            setupParentLayout(false);
             cacheConstraints();
-        if (disableLayout)
-            setupParentLayout(false);
+        }

         finalizeValues();

@@ -706,10 +697,11 @@

     private function animationCleanup():void
     {
-        if (disableConstraints)
+        if (disableLayout)
+        {
             reenableConstraints();
-        if (disableLayout)
             setupParentLayout(true);
+        }
     }

     /**