Transferred from the Adobe Open Source Subversion Repository

Revision: 13099
Author:   egeorgie@adobe.com
Date:     2009-12-18T02:58:52.185083Z

Log Message:
-----------
Minor updates to the drag and drop protected APIs.

- LayoutBase calculateDragScrollDelta now takes only two parameters, the timeInterval parameter was removed while the timeElapsed interval was renamed to elapsedTime and its type was changed from int to Number.
- The drag and drop data format descriptors were renamed from "orderedItems" and "orderedItemsCaretIndex" to "itemsByIndex" and "caretIndex" respectively.
- Fixed a default value for the VerticalLayout requestedMinRowCount property to be -1 (was 0).

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Jason
Tests run: checkintests, mustella tests/gumbo/components/ListDragDrop
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.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/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
@@ -8381,10 +8381,10 @@
 		dragSource.addHandler(copySelectedItems, "items");

 		// The Spark drag drop data format
-		dragSource.addHandler(copySelectedItemsForDragDrop, "orderedItems");
+		dragSource.addHandler(copySelectedItemsForDragDrop, "itemsByIndex");

 		// Calculate the index of the focus item within the vector
-		// of ordered items returned for the "orderedItems" format.
+		// of ordered items returned for the "itemsByIndex" format.
 		var caretIndex:int = 0;
 		var draggedIndices:Array = selectedIndices;
 		var count:int = draggedIndices.length;
@@ -8393,7 +8393,7 @@
 			if (mouseDownIndex > draggedIndices[i])
 				caretIndex++;
 		}
-		dragSource.addData(caretIndex, "orderedItemsCaretIndex");
+		dragSource.addData(caretIndex, "caretIndex");
     }

 	/**
@@ -10370,7 +10370,7 @@
         lastDragEvent = event;

         if (enabled && iteratorValid &&
-            (event.dragSource.hasFormat("items") || event.dragSource.hasFormat("orderedItems")))
+            (event.dragSource.hasFormat("items") || event.dragSource.hasFormat("itemsByIndex")))
         {
             DragManager.acceptDragDrop(this);
             DragManager.showFeedback(event.ctrlKey ? DragManager.COPY : DragManager.MOVE);
@@ -10403,7 +10403,7 @@
         lastDragEvent = event;

         if (enabled && iteratorValid &&
-            (event.dragSource.hasFormat("items") || event.dragSource.hasFormat("orderedItems")))
+            (event.dragSource.hasFormat("items") || event.dragSource.hasFormat("itemsByIndex")))
         {
             DragManager.showFeedback(event.ctrlKey ? DragManager.COPY : DragManager.MOVE);
             showDropFeedback(event);
@@ -10473,7 +10473,7 @@
             return;

         var dragSource:DragSource = event.dragSource;
-        if (!dragSource.hasFormat("items") && !dragSource.hasFormat("orderedItems"))
+        if (!dragSource.hasFormat("items") && !dragSource.hasFormat("itemsByIndex"))
             return;

         if (!dataProvider)
@@ -10485,22 +10485,22 @@
         if (dragSource.hasFormat("items"))
             insertItems(dropIndex, dragSource, event);
         else
-            insertOrderedItems(dropIndex, dragSource, event);
+            insertItemsByIndex(dropIndex, dragSource, event);

         lastDragEvent = null;
     }

     /**
      *  @private
-     *  Insert for drag and drop, handles the Spark "orderedItems" data format.
-     */
-    private function insertOrderedItems(dropIndex:int, dragSource:DragSource, event:DragEvent):void
-    {
-        var items:Vector.<Object> = dragSource.dataForFormat("orderedItems") as Vector.<Object>;
+     *  Insert for drag and drop, handles the Spark "itemsByIndex" data format.
+     */
+    private function insertItemsByIndex(dropIndex:int, dragSource:DragSource, event:DragEvent):void
+    {
+        var items:Vector.<Object> = dragSource.dataForFormat("itemsByIndex") as Vector.<Object>;

         // Copy or move the items. No need to check whether the operation is
         // reorder within this list, as ListBase never creates the
-        // "orderedItems" data format. This is a new data format from Spark List only.
+        // "itemsByIndex" data format. This is a new data format from Spark List only.
         collectionIterator.seek(CursorBookmark.FIRST, dropIndex);
         var count:int = items.length;
         for (var i:int = 0; i < count; i++)


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.events
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListData.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListData.as
@@ -29,6 +29,11 @@
  *  Changing these values can lead to unexpected results.

  *
  *  @see mx.controls.listClasses.IDropInListItemRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ListData extends BaseListData
 {
@@ -61,6 +66,11 @@
 	 *  @param columnIndex The index of the column in the currently visible columns of the
      *  control.
 	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ListData(text:String, icon:Class, labelField:String,
 							 uid:String, owner:IUIComponent, rowIndex:int = 0,
@@ -85,6 +95,11 @@
 	/**
 	 *  A Class representing the icon for the item in the List control computed
 	 *  from the list class's itemToIcon() method
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var icon:Class;

@@ -105,6 +120,11 @@
 	 *  and the itemRenderer property
 	 *  can be set to DateField. The DateField control then uses the hiredDate
 	 *  property.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var labelField:String;
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/skins/halo/ScrollTrackSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/ScrollTrackSkin.as
@@ -20,6 +20,11 @@

 /**
  *  The skin for the track in a ScrollBar.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ScrollTrackSkin extends Border
 {
@@ -33,6 +38,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ScrollTrackSkin()
 	{


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

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

 package mx.core
 {


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

--- frameworks/projects/mx/src/mx/styles/metadata/TextStyles.as
+++ frameworks/projects/mx/src/mx/styles/metadata/TextStyles.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-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: 3890
Author:   rfrishbe@adobe.com
Date:     2008-10-24T22:24:17.938205Z

Log Message:
-----------
Various renames for FxComponent, mostly based on PARB recommendations.  Most were just simple name changes or removal of methods.  Because commitSkinState() no longer exists, Button had to be modified pretty extensively so that it didn't key off of that method.

QE Notes: Joann's updated the tests and excluded them pending this checkin
Doc Notes: None
Bugs: SDK-17116
Reviewer: Hans, Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>

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

--- frameworks/projects/spark/src/spark/components/ToggleButton.as
+++ frameworks/projects/spark/src/spark/components/ToggleButton.as
@@ -106,7 +106,7 @@
             return;

         dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
-        invalidateSkinState();
+        invalidateButtonState();
     }

     //--------------------------------------------------------------------------
@@ -118,12 +118,12 @@
     /**
      *  @inheritDoc
      */
-    protected override function getUpdatedSkinState():String
+    protected override function getCurrentSkinState():String
     {
         if( !selected )
-            return super.getUpdatedSkinState();
+            return super.getCurrentSkinState();
         else
-            return super.getUpdatedSkinState() + "AndSelected";
+            return super.getCurrentSkinState() + "AndSelected";
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5115
Author:   rfrishbe@adobe.com
Date:     2009-02-27T21:27:41.731597Z

Log Message:
-----------
Adding SpriteVisualElement, a light-weight, Sprited-based implementation of IVisualElement.  This will be used for some FXG compiler optimizations.

Added setter for includeInLayout into IVisualElement so that DataGroup's virtualization code can use this, rather than cast it to a UIComponent.  I also removed an unused method in DataGroup: _removeChild.  We needed this before to remove children on a previously parented DataGroup, but now that we do the cleanup pro-actively, this is no longer needed.

Also a few ASDoc cleanups in IVisualElement, ILayoutElement, and FxDataContainer.

QE Notes: -
Doc Notes: -
Bugs: -
Reviewer: Chet, Evtim
tests: checkintests, mustella list, datagroup, fxdatacontainer, buttonbar.  Some mustella were failing, but I think it's just a mac thing.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -720,8 +720,7 @@
             {
                 IDataRenderer(elt).data = null;  // reduce probability of leaks
                 elt.visible = false;
-                if (elt is UIComponent)
-                    UIComponent(elt).includeInLayout = false;
+                elt.includeInLayout = false;
                 freeRenderers.push(elt);
             }
             else
@@ -854,8 +853,7 @@
                 {
                     elt = freeRenderers.pop();
                     elt.visible = true;
-                    if (elt is UIComponent)
-                        UIComponent(elt).includeInLayout = true;
+                    elt.includeInLayout = true;
                     if (elt is IDataRenderer)
                         IDataRenderer(elt).data = item;
                     recycledIR = true;
@@ -1052,10 +1050,6 @@

             return child;
         }
-        else if (child.parent && child.parent is DataGroup)
-        {
-            DataGroup(child.parent)._removeChild(child);
-        }

         if ((_layeringFlags & LAYERING_ENABLED) ||
             (child is IVisualElement && (child as IVisualElement).layer != 0))
@@ -1199,20 +1193,6 @@
     //  Methods: Access to overridden methods of base classes
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  This method allows access to the base class's implementation
-     *  of removeChild() (UIComponent's version), which can be useful since components
-     *  can override removeChild() and thereby hide the native implementation.  For
-     *  instance, we override removeChild() here to throw an RTE to discourage people
-     *  from using this method.  We need this method so we can remove children
-     *  that were previously attached to another DataGroup (see addItemToDisplayList).
-     */
-    private function _removeChild(child:DisplayObject):DisplayObject
-    {
-        return super.removeChild(child);
-    }

     /**
      *  @inheritDoc


Transferred from the Adobe Open Source Subversion Repository

Revision: 12973
Author:   hmuller@adobe.com
Date:     2009-12-15T23:59:25.427033Z

Log Message:
-----------
Added DataGroup/getItemIndicesInView() method and fixed a DataGroup virtual ItemRenderer leak.

Removed an obsolete FIXME from Spinner.

QE notes:
Doc notes:
Bugs: sdk-24702, sdk-24704
Reviewer: Evtim
Tests run: DataGroup
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -14,6 +14,8 @@
 import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.IEventDispatcher;
+import flash.geom.PerspectiveProjection;
+import flash.geom.Rectangle;

 import mx.collections.IList;
 import mx.core.IDataRenderer;
@@ -25,6 +27,7 @@
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.PropertyChangeEvent;
+import mx.utils.MatrixUtil;

 import spark.components.supportClasses.GroupBase;
 import spark.events.RendererExistenceEvent;
@@ -666,6 +669,79 @@
         return " ";
     }

+    /**
+     *  Return the indices of the item renderers visible within this DataGroup.
+     *
+     *
If clipAndEnableScrolling=true, return the indices of the visible=true
+     *  ItemRenderers that overlap this DataGroup's scrollRect, i.e. the ItemRenders
+     *  that are at least partially visible relative to this DataGroup.  If
+     *  clipAndEnableScrolling=false, return a list of integers from
+     *  0 to dataProvider.length - 1.  Note that if this DataGroup's owner is a
+     *  Scroller, then clipAndEnableScrolling has been set to true.

+     *
+     *
The corresponding item renderer for each returned index can be
+     *  retrieved with getElementAt(), even if the layout is virtual

+     *
+     *
The order of the items in the returned Vector is not guaranteed.

+     *
+     *
Note that the VerticalLayout and HorizontalLayout classes provide bindable
+     *  firstIndexInView and lastIndexInView properties which convey the same information
+     *  as this method.

+     *
+     *  @return The indices of the visible item renderers.
+     */
+    public function getItemIndicesInView():Vector.<int>
+    {
+        if (layout && layout.useVirtualLayout)
+            return (virtualRendererIndices) ? virtualRendererIndices.concat() : new Vector.<int>(0);
+
+        const scrollR:Rectangle = scrollRect;
+        const dataProviderLength:int = dataProvider.length;
+
+        if (scrollR)
+        {
+            const visibleIndices:Vector.<int> = new Vector.<int>();
+            const eltR:Rectangle = new Rectangle();
+            const perspectiveProjection:PerspectiveProjection = transform.perspectiveProjection;
+
+            for (var index:int = 0; index < dataProviderLength; index++)
+            {
+                var elt:IVisualElement = getElementAt(index);
+                if (!elt || !elt.visible)
+                    continue;
+
+                // TODO (egeorgie): provide a generic getElementBounds() utility function
+                if (elt.hasLayoutMatrix3D && perspectiveProjection)
+                {
+                    eltR.x = 0;
+                    eltR.y = 0;
+                    eltR.width = elt.getLayoutBoundsWidth(false);
+                    eltR.height = elt.getLayoutBoundsHeight(false);
+                    MatrixUtil.projectBounds(eltR, elt.getLayoutMatrix3D(), perspectiveProjection);
+                }
+                else
+                {
+                    eltR.x = elt.getLayoutBoundsX();
+                    eltR.y = elt.getLayoutBoundsY();
+                    eltR.width = elt.getLayoutBoundsWidth();
+                    eltR.height = elt.getLayoutBoundsHeight();
+                }
+
+                if (scrollR.intersects(eltR))
+                    visibleIndices.push(index);
+            }
+
+            return visibleIndices;
+        }
+        else
+        {
+            const allIndices:Vector.<int> = new Vector.<int>(dataProviderLength);
+            for (index = 0; index < dataProviderLength; index++)
+                allIndices[index] = index;
+            return allIndices;
+        }
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Item -> Renderer mapping
@@ -1059,6 +1135,16 @@

     /**
      *  @private
+     *  True if it's OK to recycle virtual item renderers.   More about
+     *  the conditions under which recyling can work at getVirtualElementAt().
+     */
+    private function isRecyclingOK():Boolean
+    {
+        return (itemRendererFunction == null) && (itemRenderer != null);
+    }
+
+    /**
+     *  @private
      *  Called before super.updateDisplayList() if layout.useVirtualLayout=true.
      *  Copies virtualRendererIndices to oldRendererIndices, clears virtualRendererIndices
      *  (which will be repopulated by subsequence getVirtualElementAt() calls), and
@@ -1106,8 +1192,10 @@
         if (oldVirtualRendererIndices.length == 0)
             return;

-        // Remove the old ItemRenderers that aren't new ItemRenderers and
-        // add them to the freeRenderers list.
+        // Remove the old ItemRenderers that aren't new ItemRenderers and if
+        // recycling is possible, add them to the freeRenderers list.
+
+        const recyclingOK:Boolean = isRecyclingOK();

         for each (var vrIndex:int in oldVirtualRendererIndices)
         {
@@ -1121,7 +1209,7 @@

             // Free or remove the IR.
             var item:Object = (dataProvider.length > vrIndex) ? dataProvider.getItemAt(vrIndex) : null;
-            if ((item != elt) && (elt is IDataRenderer))
+            if (recyclingOK && (item != elt) && (elt is IDataRenderer))
             {
                 // IDataRenderer(elt).data = null;  see https://bugs.adobe.com/jira/browse/SDK-20962
                 elt.includeInLayout = false;
@@ -1291,10 +1379,9 @@
                 setUpItemRenderer(elt, index, dataProvider.getItemAt(index));
             else
             {
-                var item:Object = dataProvider.getItemAt(index);
-                var recyclingOK:Boolean = (itemRendererFunction == null) && (itemRenderer != null);
+                const item:Object = dataProvider.getItemAt(index);

-                if (recyclingOK && (freeRenderers.length > 0))
+                if (isRecyclingOK() && (freeRenderers.length > 0))
                 {
                     elt = freeRenderers.pop();
                     elt.visible = true;


Transferred from the Adobe Open Source Subversion Repository

Revision: 7543
Author:   gosmith@adobe.com
Date:     2009-06-04T07:41:31.426059Z

Log Message:
-----------
Various changes to obscure Spark text styles.

The default for the 'dominantBaseline' style, as set in the global selector, is now "auto", as it is now in TLF, instead of "roman". In TLF, a value of "auto" means "ideographicCenter" if the 'locale' is Japanese (i.e., starts with "ja") or Chinese (i.e., starts with "zh"), and "roman" otherwise. SimpleText now implements this same logic.

The default for the 'firstBaselineOffset' style, as set in the global selector, is now "auto", as it is now in TLF, instead of "ascent". SimpleText does not support 'firstBaselineOffset'.

The default for the 'justificationRule' style, as set in the global selector, is now "auto" as it is now in TLF, instead of "space". In TLF, a value of "auto" means "eastAsian" if the 'locale' is Japanese or Chinese, and "space" otherwise. SimpleText now implements this same logic.

The default for the 'justificationStyle' style, as set in the global selector, is now "auto", as it is now in TLF, instead of "pushInKinsoku". In TLF, a value of "auto" means "pushInKinsoku" regardless of the locale. (I guess "auto" just sounds like a nicer default.) SimpleText now implements this same logic.

The default for the 'tabStops' style, as set in the global selector, is now null. Previously it was omitted from the global selector and the default value was therefore undefined.

The 'tracking' style has been removed. (The 'trackingLeft' and 'trackingRight' styles remain.) A 'tracking' attribute was defined in FXG 1.0 but FTE instead implemented trackingLeft and trackingRight properties. So when compiling FXG 1.0, the compiler will (soon) map 'tracking' to 'trackingRight', and 'tracking' will not be supported in MXML. SimpleText no longer pays any attention to a 'tracking' style.

The 'leadingModel' style can now be set to "ascentDescentUp", as in TLF. The default remains "auto".

The metadata for the 'backgroundAlpha' style in TextGraphicElement and RichEditableText no longer says theme="halo".

I also fixed some [Event] metadata and @eventType comments in RichEditableText.

Finally, RichEditableText now has an mx_internal createTextContainerManager() method. You can override this if you need to subclass our RichEditableTextContainerManager.

QE Notes: Some tests may need updating due to these changes.
Doc Notes: None
Bugs: SDK-21594
Reviewer: Carol

Modified Paths:
--------------
<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/defaults.css</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/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/TextInput.as
+++ frameworks/projects/spark/src/spark/components/TextInput.as
@@ -38,12 +38,8 @@
 [Event(name="enter", type="mx.events.FlexEvent")]

 //--------------------------------------
-//  Other metadata
+//  Skin states
 //--------------------------------------
-
-[DefaultProperty("text")]
-
-[IconFile("TextInput.png")]

 /**
  *  Normal State
@@ -64,6 +60,14 @@
  *  @productversion Flex 4
  */
 [SkinState("disabled")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[DefaultProperty("text")]
+
+[IconFile("TextInput.png")]

 /**
  *  A text field that lets users enter and edit a single line


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

--- frameworks/projects/spark/src/spark/effects/easing/Power.as
+++ frameworks/projects/spark/src/spark/effects/easing/Power.as
@@ -0,0 +1,89 @@
+package flex.effects.easing
+{
+/**
+ * Provides easing functionality using a polynomial expression, where the
+ * instance is created with a power parameter describing the
+ * behavior of the expression.
+ */
+public class Power implements IEaser
+{
+    /**
+     * Storage for the exponent property
+     */
+    private var _exponent:int;
+    /**
+     * The exponent that will be used in the easing calculation. For example,
+     * to get quadratic behavior, set exponent equal to 2. To get cubic
+     * behavior, set exponent equal to 3. A value of 1 represents linear
+     * motion, while a value of 0 simply returns 1 from the ease
+     * method.
+     *
+     * @default 2
+     */
+    public function get exponent():int
+    {
+        return _exponent;
+    }
+    public function set exponent(value:int):void
+    {
+        _exponent = value;
+    }
+
+    /**
+     * Storage for the easeIn property
+     */
+    private var _easeIn:Number;
+    /**
+     * The percentage of an animation that should be spent accelerating
+     * according to the power formula. This factor sets an implicit
+     * "easeOut" parameter, equal to (1 - easeIn), so that any time not
+     * spent easing in is spent easing out. For example, to have an easing
+     * equation that spends half the time easing in and half easing out,
+     * set easeIn equal to .5.
+     *
+     * @default .5
+     */
+    public function get easeIn():Number
+    {
+        return _easeIn;
+    }
+    public function set easeIn(value:Number):void
+    {
+        _easeIn = value;
+    }
+
+    /**
+     * Constructs a Power instance with optional easeIn and exponent
+     * values
+     */
+    public function Power(easeIn:Number = .5, exponent:Number = 2)
+    {
+        this.easeIn = easeIn;
+        this.exponent = exponent;
+    }
+
+    /**
+     * @inheritDoc
+     *
+     * Calculates the eased fraction value based on the easeIn and
+     * exponent properties. If the fraction is in the easeIn
+     * phase of the animation, this result is equal to
+     * x^^exponent, where x is the percentage elapsed in the
+     * easeIn phase. Otherwise, the motion is in the easing-out phase
+     * (1 - easeIn), and the result is equal to 1 - (1-x)^^exponent.
+     *
+     * @param fraction The elapsed fraction of the animation
+     * @return The eased fraction of the animation
+     */
+    public function ease(fraction:Number):Number
+    {
+        var easeOut:Number = 1 - easeIn;
+
+        if (fraction <= easeIn)
+            return Math.pow(fraction/easeIn, _exponent)*easeIn;
+        else
+            return 1 - Math.pow((1 - fraction)/easeOut, _exponent)*easeOut;
+    }
+
+}
+}


qnd: "switchingMediaElementsCompleted" and "switchingMediaelementsFailed" notifications weren't sent

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@87737 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- kdp3Lib/src/com/kaltura/kdpfl/model/MediaProxy.as
+++ kdp3Lib/src/com/kaltura/kdpfl/model/MediaProxy.as
@@ -799,6 +799,8 @@
 					sequenceVo.mainMediaVO = null;
 				//add event listener for a switch between the main and secondary elements in the KSwitcingProxyElement.
 				vo.media.addEventListener(KSwitchingProxyEvent.ELEMENT_SWITCH_PERFORMED, onSwitchPerformed );
+				vo.media.addEventListener(KSwitchingProxyEvent.ELEMENT_SWITCH_COMPLETED, onSwitchCompleted );
+				vo.media.addEventListener(KSwitchingProxyEvent.ELEMENT_SWITCH_FAILED, onSwitchFailed );

 			}


Fix documentation error.

Fix documentation error.

--- src/org/flintparticles/common/initializers/MouseEventHandlers.as
+++ src/org/flintparticles/common/initializers/MouseEventHandlers.as
@@ -51,12 +51,9 @@
 		private var _clickHandler:Function;

 		/**
-		 * The constructor creates a MassInit initializer for use by
-		 * an emitter. To add a MassInit to all particles created by an emitter, use the
+		 * The constructor creates a MouseEventHandlers initializer for use by
+		 * an emitter. To add a MouseEventHandlers to all particles created by an emitter, use the
 		 * emitter's addInitializer method.
-		 *
-		 * @param mass the mass for particles
-		 * initialized by the instance.
 		 *
 		 * @see org.flintparticles.common.emitters.Emitter#addInitializer()
 		 */


Transferred from the Adobe Open Source Subversion Repository

Revision: 9328
Author:   rfrishbe@adobe.com
Date:     2009-08-15T00:02:35.436187Z

Log Message:
-----------
Fixing SDK-22462: Event dispatched is not as expected in Tree

For this, the issue is really that TreeItemRenderers assume that no click event can occur on the disclosureIcon.  This is because the discolsureIcon is added and removed each time it goes through invalidation in commitProperties(), so a new discolsureIcon gets created and replaces the old one after they mouseDown (meaning no click event actually occurs).  Automation replays some mouse events on one disclosureIcon only (which is an automation bug because that’s not how it actually works in the real world) and when a “click” occurs, that causes an itemClick on the Tree, when it shouldn’t.  For Flex 3, this wasn’t a problem because the IR was getting invalidated through a different codepath because openDuration did not default to 0.  If you set it to 0, you’d see the same problem in Flex 3.  Anyways, the fix is just to block all click events that occur on the disclosureIcon.

QE notes: -
Doc notes: -
Bugs: SDK-22462
Reviewer: Alex
Tests run: checkintests, mustella Tree
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as

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

--- frameworks/projects/mx/src/mx/controls/treeClasses/TreeItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/treeClasses/TreeItemRenderer.as
@@ -99,29 +99,29 @@
  *  @productversion Flex 3
  */
 public class TreeItemRenderer extends UIComponent
-	   implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer,
-	   		      IFontContextComponent
+       implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer,
+                     IFontContextComponent
 {
     include "../../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Constructor.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function TreeItemRenderer()
-	{
-		super();
-	}
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function TreeItemRenderer()
+    {
+        super();
+    }

     //--------------------------------------------------------------------------
     //
@@ -129,10 +129,10 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
-	private var listOwner:Tree;
+    /**
+     *  @private
+     */
+    private var listOwner:Tree;

     //--------------------------------------------------------------------------
     //
@@ -151,13 +151,13 @@
      */
     override public function get baselinePosition():Number
     {
-		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-			super.baselinePosition;
-
-		if (!validateBaselinePosition())
-			return NaN;
-
-		return label.y + label.baselinePosition;
+        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+            super.baselinePosition;
+
+        if (!validateBaselinePosition())
+            return NaN;
+
+        return label.y + label.baselinePosition;
     }

     //--------------------------------------------------------------------------
@@ -167,60 +167,60 @@
     //--------------------------------------------------------------------------

     //----------------------------------
-	//  data
-    //----------------------------------
-
-	/**
-	 *  @private
-	 *  Storage for the data property.
-	 */
-	private var _data:Object;
-
-	[Bindable("dataChange")]
-
-	/**
-	 *  The implementation of the data property as
-	 *  defined by the IDataRenderer interface.
-	 *
-	 *  @see mx.core.IDataRenderer
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get data():Object
-	{
-		return _data;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set data(value:Object):void
-	{
-		_data = value;
-
-		invalidateProperties();
-
-		dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
-	}
-
-    //----------------------------------
-	//  disclosureIcon
-    //----------------------------------
-
-	/**
-	 *  The internal IFlexDisplayObject that displays the disclosure icon
-	 *  in this renderer.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	protected var disclosureIcon:IFlexDisplayObject;
-
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the data property as
+     *  defined by the IDataRenderer interface.
+     *
+     *  @see mx.core.IDataRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        _data = value;
+
+        invalidateProperties();
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  disclosureIcon
+    //----------------------------------
+
+    /**
+     *  The internal IFlexDisplayObject that displays the disclosure icon
+     *  in this renderer.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected var disclosureIcon:IFlexDisplayObject;
+
     //----------------------------------
     //  fontContext
     //----------------------------------
@@ -242,70 +242,70 @@
     }

     //----------------------------------
-	//  icon
-    //----------------------------------
-
-	/**
-	 *  The internal IFlexDisplayObject that displays the icon in this renderer.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	protected var icon:IFlexDisplayObject;
-
-    //----------------------------------
-	//  label
-    //----------------------------------
-
-	/**
-	 *  The internal UITextField that displays the text in this renderer.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	protected var label:IUITextField;
-
-    //----------------------------------
-	//  listData
-    //----------------------------------
-
-	/**
-	 *  @private
-	 *  Storage for the listData property.
-	 */
-	private var _listData:TreeListData;
-
-	[Bindable("dataChange")]
-
-	/**
-	 *  The implementation of the listData property as
-	 *  defined by the IDropInListItemRenderer interface.
-	 *
-	 *  @see mx.controls.listClasses.IDropInListItemRenderer
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get listData():BaseListData
-	{
-		return _listData;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set listData(value:BaseListData):void
-	{
-		_listData = TreeListData(value);
-
-		invalidateProperties();
-	}
+    //  icon
+    //----------------------------------
+
+    /**
+     *  The internal IFlexDisplayObject that displays the icon in this renderer.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected var icon:IFlexDisplayObject;
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    /**
+     *  The internal UITextField that displays the text in this renderer.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected var label:IUITextField;
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the listData property.
+     */
+    private var _listData:TreeListData;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the listData property as
+     *  defined by the IDropInListItemRenderer interface.
+     *
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get listData():BaseListData
+    {
+        return _listData;
+    }
+
+    /**
+     *  @private
+     */
+    public function set listData(value:BaseListData):void
+    {
+        _listData = TreeListData(value);
+
+        invalidateProperties();
+    }

     //--------------------------------------------------------------------------
     //
@@ -313,233 +313,237 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
-	override protected function createChildren():void
-	{
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
         super.createChildren();

-		createLabel(-1);
-
-		addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);
-	}
-
-	/**
-	 *  @private
-	 */
-	override protected function commitProperties():void
-	{
-		super.commitProperties();
-
-	    // if the font changed and we already created the label, we will need to
+        createLabel(-1);
+
+        addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        // if the font changed and we already created the label, we will need to
         // destory it so it can be re-created, possibly in a different swf context.
-		if (hasFontContextChanged() && label != null)
-        {
-      		var index:int = getChildIndex(DisplayObject(label));
+        if (hasFontContextChanged() && label != null)
+        {
+              var index:int = getChildIndex(DisplayObject(label));
             removeLabel();
- 			createLabel(index);
-        }
-
-		if (icon)
-		{
-			removeChild(DisplayObject(icon));
-			icon = null;
-		}
-
-		if (disclosureIcon)
-		{
-			disclosureIcon.removeEventListener(MouseEvent.MOUSE_DOWN,
-			      							   disclosureMouseDownHandler);
-			removeChild(DisplayObject(disclosureIcon));
-			disclosureIcon = null;
-		}
-
-		if (_data != null)
-		{
-			listOwner = Tree(_listData.owner);
-
-			if (_listData.disclosureIcon)
-			{
-				var disclosureIconClass:Class = _listData.disclosureIcon;
-				var disclosureInstance:* = new disclosureIconClass();
-
-				// If not already an interactive object, then we'll wrap
-				// in one so we can dispatch mouse events.
-				if (!(disclosureInstance is InteractiveObject))
-				{
-					var wrapper:SpriteAsset = new SpriteAsset();
-					wrapper.addChild(disclosureInstance as DisplayObject);
-					disclosureIcon = wrapper as IFlexDisplayObject;
-				}
-				else
-				{
-					disclosureIcon = disclosureInstance;
-				}
-
-				addChild(disclosureIcon as DisplayObject);
-				disclosureIcon.addEventListener(MouseEvent.MOUSE_DOWN,
-												disclosureMouseDownHandler);
-			}
-
-			if (_listData.icon)
-			{
-				var iconClass:Class = _listData.icon;
-				icon = new iconClass();
-
-				addChild(DisplayObject(icon));
-			}
-
-			label.text = _listData.label;
-			label.multiline = listOwner.variableRowHeight;
-			label.wordWrap = listOwner.wordWrap;
-		}
-		else
-		{
-			label.text = " ";
-			toolTip = null;
-		}
-
-		invalidateDisplayList();
-	}
-
-	/**
-	 *  @private
-	 */
-	override protected function measure():void
-	{
-		super.measure();
-
-		var w:Number = _data ? _listData.indent : 0;
-
-		if (disclosureIcon)
-			w += disclosureIcon.width;
-
-		if (icon)
-			w += icon.measuredWidth;
-
-		// guarantee that label width isn't zero because it messes up ability to measure
-		if (label.width < 4 || label.height < 4)
-		{
-			label.width = 4;
-			label.height = 16;
-		}
-
-		if (isNaN(explicitWidth))
-		{
-			w += label.getExplicitOrMeasuredWidth();
-			measuredWidth = w;
-			measuredHeight = label.getExplicitOrMeasuredHeight();
-		}
-		else
-		{
-			label.width = Math.max(explicitWidth - w, 4);
-			measuredHeight = label.getExplicitOrMeasuredHeight();
-			if (icon && icon.measuredHeight > measuredHeight)
-				measuredHeight = icon.measuredHeight;
-		}
-	}
-
-	/**
-	 *  @private
-	 */
-	override protected function updateDisplayList(unscaledWidth:Number,
-												  unscaledHeight:Number):void
-	{
-		super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-		var startx:Number = _data ? _listData.indent : 0;
-
-		if (disclosureIcon)
-		{
-			disclosureIcon.x = startx;
-
-			startx = disclosureIcon.x + disclosureIcon.width;
-
-			disclosureIcon.setActualSize(disclosureIcon.width,
-										 disclosureIcon.height);
-
-			disclosureIcon.visible = _data ?
-									 _listData.hasChildren :
-									 false;
-		}
-
-		if (icon)
-		{
-			icon.x = startx;
-			startx = icon.x + icon.measuredWidth;
-			icon.setActualSize(icon.measuredWidth, icon.measuredHeight);
-		}
-
-		label.x = startx;
-		label.setActualSize(unscaledWidth - startx, measuredHeight);
-
-		var verticalAlign:String = getStyle("verticalAlign");
-		if (verticalAlign == "top")
-		{
-			label.y = 0;
-			if (icon)
-				icon.y = 0;
-			if (disclosureIcon)
-				disclosureIcon.y = 0;
-		}
-		else if (verticalAlign == "bottom")
-		{
-			label.y = unscaledHeight - label.height + 2; // 2 for gutter
-			if (icon)
-				icon.y = unscaledHeight - icon.height;
-			if (disclosureIcon)
-				disclosureIcon.y = unscaledHeight - disclosureIcon.height;
-		}
-		else
-		{
-			label.y = (unscaledHeight - label.height) / 2;
-			if (icon)
-				icon.y = (unscaledHeight - icon.height) / 2;
-			if (disclosureIcon)
-				disclosureIcon.y = (unscaledHeight - disclosureIcon.height) / 2;
-		}
-
-		var labelColor:Number;
-
-		if (data && parent)
-		{
-			if (!enabled)
-				labelColor = getStyle("disabledColor");
-
-			else if (listOwner.isItemHighlighted(listData.uid))
-        		labelColor = getStyle("textRollOverColor");
-
-			else if (listOwner.isItemSelected(listData.uid))
-        		labelColor = getStyle("textSelectedColor");
-
-			else
-        		labelColor = getStyle("color");
-
-       		label.setColor(labelColor);
-		}
-
-		if (_data != null)
-		{
-			if (listOwner.showDataTips)
-			{
-				if (label.textWidth > label.width ||
-					listOwner.dataTipFunction != null)
-				{
-					toolTip = listOwner.itemToDataTip(_data);
-				}
-				else
-				{
-					toolTip = null;
-				}
-			}
-			else
-			{
-				toolTip = null;
-			}
-		}
-	}
-
+             createLabel(index);
+        }
+
+        if (icon)
+        {
+            removeChild(DisplayObject(icon));
+            icon = null;
+        }
+
+        if (disclosureIcon)
+        {
+            disclosureIcon.removeEventListener(MouseEvent.MOUSE_DOWN,
+                                                 disclosureIcon_mouseDownHandler);
+            disclosureIcon.removeEventListener(MouseEvent.CLICK,
+                disclosureIcon_clickHandler);
+            removeChild(DisplayObject(disclosureIcon));
+            disclosureIcon = null;
+        }
+
+        if (_data != null)
+        {
+            listOwner = Tree(_listData.owner);
+
+            if (_listData.disclosureIcon)
+            {
+                var disclosureIconClass:Class = _listData.disclosureIcon;
+                var disclosureInstance:* = new disclosureIconClass();
+
+                // If not already an interactive object, then we'll wrap
+                // in one so we can dispatch mouse events.
+                if (!(disclosureInstance is InteractiveObject))
+                {
+                    var wrapper:SpriteAsset = new SpriteAsset();
+                    wrapper.addChild(disclosureInstance as DisplayObject);
+                    disclosureIcon = wrapper as IFlexDisplayObject;
+                }
+                else
+                {
+                    disclosureIcon = disclosureInstance;
+                }
+
+                addChild(disclosureIcon as DisplayObject);
+                disclosureIcon.addEventListener(MouseEvent.MOUSE_DOWN,
+                        disclosureIcon_mouseDownHandler);
+                disclosureIcon.addEventListener(MouseEvent.CLICK,
+                    disclosureIcon_clickHandler);
+            }
+
+            if (_listData.icon)
+            {
+                var iconClass:Class = _listData.icon;
+                icon = new iconClass();
+
+                addChild(DisplayObject(icon));
+            }
+
+            label.text = _listData.label;
+            label.multiline = listOwner.variableRowHeight;
+            label.wordWrap = listOwner.wordWrap;
+        }
+        else
+        {
+            label.text = " ";
+            toolTip = null;
+        }
+
+        invalidateDisplayList();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var w:Number = _data ? _listData.indent : 0;
+
+        if (disclosureIcon)
+            w += disclosureIcon.width;
+
+        if (icon)
+            w += icon.measuredWidth;
+
+        // guarantee that label width isn't zero because it messes up ability to measure
+        if (label.width < 4 || label.height < 4)
+        {
+            label.width = 4;
+            label.height = 16;
+        }
+
+        if (isNaN(explicitWidth))
+        {
+            w += label.getExplicitOrMeasuredWidth();
+            measuredWidth = w;
+            measuredHeight = label.getExplicitOrMeasuredHeight();
+        }
+        else
+        {
+            label.width = Math.max(explicitWidth - w, 4);
+            measuredHeight = label.getExplicitOrMeasuredHeight();
+            if (icon && icon.measuredHeight > measuredHeight)
+                measuredHeight = icon.measuredHeight;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var startx:Number = _data ? _listData.indent : 0;
+
+        if (disclosureIcon)
+        {
+            disclosureIcon.x = startx;
+
+            startx = disclosureIcon.x + disclosureIcon.width;
+
+            disclosureIcon.setActualSize(disclosureIcon.width,
+                                         disclosureIcon.height);
+
+            disclosureIcon.visible = _data ?
+                                     _listData.hasChildren :
+                                     false;
+        }
+
+        if (icon)
+        {
+            icon.x = startx;
+            startx = icon.x + icon.measuredWidth;
+            icon.setActualSize(icon.measuredWidth, icon.measuredHeight);
+        }
+
+        label.x = startx;
+        label.setActualSize(unscaledWidth - startx, measuredHeight);
+
+        var verticalAlign:String = getStyle("verticalAlign");
+        if (verticalAlign == "top")
+        {
+            label.y = 0;
+            if (icon)
+                icon.y = 0;
+            if (disclosureIcon)
+                disclosureIcon.y = 0;
+        }
+        else if (verticalAlign == "bottom")
+        {
+            label.y = unscaledHeight - label.height + 2; // 2 for gutter
+            if (icon)
+                icon.y = unscaledHeight - icon.height;
+            if (disclosureIcon)
+                disclosureIcon.y = unscaledHeight - disclosureIcon.height;
+        }
+        else
+        {
+            label.y = (unscaledHeight - label.height) / 2;
+            if (icon)
+                icon.y = (unscaledHeight - icon.height) / 2;
+            if (disclosureIcon)
+                disclosureIcon.y = (unscaledHeight - disclosureIcon.height) / 2;
+        }
+
+        var labelColor:Number;
+
+        if (data && parent)
+        {
+            if (!enabled)
+                labelColor = getStyle("disabledColor");
+
+            else if (listOwner.isItemHighlighted(listData.uid))
+                labelColor = getStyle("textRollOverColor");
+
+            else if (listOwner.isItemSelected(listData.uid))
+                labelColor = getStyle("textSelectedColor");
+
+            else
+                labelColor = getStyle("color");
+
+               label.setColor(labelColor);
+        }
+
+        if (_data != null)
+        {
+            if (listOwner.showDataTips)
+            {
+                if (label.textWidth > label.width ||
+                    listOwner.dataTipFunction != null)
+                {
+                    toolTip = listOwner.itemToDataTip(_data);
+                }
+                else
+                {
+                    toolTip = null;
+                }
+            }
+            else
+            {
+                toolTip = null;
+            }
+        }
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods
@@ -551,15 +555,15 @@
      *  Creates the label and adds it as a child of this component.
      *
      *  @param childIndex The index of where to add the child.
-	 *  If -1, the text field is appended to the end of the list.
+     *  If -1, the text field is appended to the end of the list.
      */
     mx_internal function createLabel(childIndex:int):void
     {
         if (!label)
         {
-			label = IUITextField(createInFontContext(UITextField));
-			label.styleName = this;
-
+            label = IUITextField(createInFontContext(UITextField));
+            label.styleName = this;
+
             if (childIndex == -1)
                 addChild(DisplayObject(label));
             else
@@ -575,79 +579,90 @@
     {
         if (label != null)
         {
-        	removeChild(DisplayObject(label));
-        	label = null;
-        }
-    }
-
-	//--------------------------------------------------------------------------
-	//
-	//  Event handlers
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	private function toolTipShowHandler(event:ToolTipEvent):void
-	{
-		var toolTip:IToolTip = event.toolTip;
-
-		// Calculate global position of label.
+            removeChild(DisplayObject(label));
+            label = null;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function toolTipShowHandler(event:ToolTipEvent):void
+    {
+        var toolTip:IToolTip = event.toolTip;
+
+        // Calculate global position of label.
         var sm:ISystemManager = systemManager.topLevelSystemManager;
         var sbRoot:DisplayObject = sm.getSandboxRoot();
         var screen:Rectangle = sm.getVisibleApplicationRect();
-		var pt:Point = new Point(0, 0);
-		pt = label.localToGlobal(pt);
-		pt = sbRoot.globalToLocal(pt);
-
-		toolTip.move(pt.x, pt.y + (height - toolTip.height) / 2);
-
-		var screenRight:Number = screen.x + screen.width;
+        var pt:Point = new Point(0, 0);
+        pt = label.localToGlobal(pt);
+        pt = sbRoot.globalToLocal(pt);
+
+        toolTip.move(pt.x, pt.y + (height - toolTip.height) / 2);
+
+        var screenRight:Number = screen.x + screen.width;
         pt.x = toolTip.x;
         pt.y = toolTip.y;
         pt = sbRoot.localToGlobal(pt);
         if (pt.x + toolTip.width > screenRight)
             toolTip.move(toolTip.x - (pt.x + toolTip.width - screenRight), toolTip.y);
-	}
-
-	/**
-	 *  @private
-	 */
-	private function disclosureMouseDownHandler(event:Event):void
-	{
-		event.stopPropagation();
-
-		if (listOwner.isOpening || !listOwner.enabled)
-			return;
-
-		var open:Boolean = _listData.open;
-		_listData.open = !open;
-
-		listOwner.dispatchTreeEvent(TreeEvent.ITEM_OPENING,
-		                        _listData.item, //item
-                                this,  	//renderer
-                                event, 	//trigger
-                                !open, 	//opening
-    							true,  	//animate
-    							true)   //dispatch
-	}
-
-	/**
-	 *  @private
-	 */
-	mx_internal function getLabel():IUITextField
-	{
-		return label;
-	}
-
-	/**
-	 *  @private
-	 */
-	mx_internal function getDisclosureIcon():IFlexDisplayObject
-	{
-		return disclosureIcon;
-	}
+    }
+
+    /**
+     *  @private
+     */
+    private function disclosureIcon_mouseDownHandler(event:Event):void
+    {
+        event.stopPropagation();
+
+        if (listOwner.isOpening || !listOwner.enabled)
+            return;
+
+        var open:Boolean = _listData.open;
+        _listData.open = !open;
+
+        listOwner.dispatchTreeEvent(TreeEvent.ITEM_OPENING,
+                                _listData.item, //item
+                                this,      //renderer
+                                event,     //trigger
+                                !open,     //opening
+                                true,      //animate
+                                true)   //dispatch
+    }
+
+    /**
+     *  @private
+     */
+    private function disclosureIcon_clickHandler(event:Event):void
+    {
+        // stop this event from bubbling up because the click is
+        // for item selection and clicking on the disclosureIcon doesn't
+        // select the items (only expands/closes them).
+        event.stopPropagation();
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function getLabel():IUITextField
+    {
+        return label;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function getDisclosureIcon():IFlexDisplayObject
+    {
+        return disclosureIcon;
+    }

 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-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 spark.skins.spark
 {


added check for ReferencedColumn not registered under a Weave instance

--- WeaveJS/src/weavejs/data/column/ReferencedColumn.as
+++ WeaveJS/src/weavejs/data/column/ReferencedColumn.as
@@ -99,7 +99,10 @@
 		public function setColumnReference(dataSource:IDataSource, metadata:Object):void
 		{
 			delayCallbacks();
-			dataSourceName.value = Weave.getRoot(this).getName(dataSource);
+			var root:ILinkableHashMap = Weave.getRoot(this);
+			if (!root)
+				throw new Error("ReferencedColumn is not registered with an instance of Weave");
+			dataSourceName.value = root.getName(dataSource);
 			this.metadata.setSessionState(metadata);
 			resumeCallbacks();
 		}


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

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

 package mx.controls.advancedDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 15368
Author:   smgilson@adobe.com
Date:     2010-04-13T12:31:21.786591Z

Log Message:
-----------
integrate 15352: Update ASDoc version tags

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkCheckBoxAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTextAreaAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkListBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableTextBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkCheckBoxAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkCheckBoxAutomationImpl.as
@@ -12,103 +12,103 @@

 package spark.automation.delegates.components
 {
-	import flash.display.DisplayObject;
-
-	import mx.automation.Automation;
-
-	import spark.automation.delegates.components.supportClasses.SparkToggleButtonBaseAutomationImpl;
-	import spark.components.CheckBox;
-
-	[Mixin]
-	/**
-	 *
-	 *  Defines methods and properties required to perform instrumentation for the
-	 *  CheckBox control.
-	 *
-	 *  @see spark.components.CheckBox
-	 *
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public class SparkCheckBoxAutomationImpl extends SparkToggleButtonBaseAutomationImpl
-	{
-		include "../../../core/Version.as";
-
-		//--------------------------------------------------------------------------
-		//
-		//  Class methods
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Registers the delegate class for a component class with automation manager.
-		 *
-		 *  @param root The SystemManger of the application.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		public static function init(root:DisplayObject):void
-		{
-			Automation.registerDelegateClass(spark.components.CheckBox, SparkCheckBoxAutomationImpl);
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Constructor
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Constructor.
-		 * @param obj CheckBox object to be automated.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		private var _checkBox:CheckBox;
-		public function SparkCheckBoxAutomationImpl(obj:spark.components.CheckBox)
-		{
-			super(obj);
-			_checkBox = obj;
-		}
-
-		/**
-		 *  @private
-		 *  storage for the owner component
-		 */
-		protected function get chk():spark.components.CheckBox
-		{
-			return _checkBox as spark.components.CheckBox;
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Overridden properties
-		//
-		//--------------------------------------------------------------------------
-
-		//----------------------------------
-		//  automationValue
-		//----------------------------------
-
-		/**
-		 *  @private
-		 */
-		override public function get automationValue():Array
-		{
-			var result:String = chk.selected ? "[X]" : "[ ]";
-			if (chk.label || chk.toolTip)
-				result += " " + (chk.label || chk.toolTip);
-			return [ result ];
-		}
-
-	}
+    import flash.display.DisplayObject;
+
+    import mx.automation.Automation;
+
+    import spark.automation.delegates.components.supportClasses.SparkToggleButtonBaseAutomationImpl;
+    import spark.components.CheckBox;
+
+    [Mixin]
+    /**
+     *
+     *  Defines methods and properties required to perform instrumentation for the
+     *  CheckBox control.
+     *
+     *  @see spark.components.CheckBox
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public class SparkCheckBoxAutomationImpl extends SparkToggleButtonBaseAutomationImpl
+    {
+        include "../../../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Registers the delegate class for a component class with automation manager.
+         *
+         *  @param root The SystemManger of the application.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public static function init(root:DisplayObject):void
+        {
+            Automation.registerDelegateClass(spark.components.CheckBox, SparkCheckBoxAutomationImpl);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         * @param obj CheckBox object to be automated.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        private var _checkBox:CheckBox;
+        public function SparkCheckBoxAutomationImpl(obj:spark.components.CheckBox)
+        {
+            super(obj);
+            _checkBox = obj;
+        }
+
+        /**
+         *  @private
+         *  storage for the owner component
+         */
+        protected function get chk():spark.components.CheckBox
+        {
+            return _checkBox as spark.components.CheckBox;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  automationValue
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        override public function get automationValue():Array
+        {
+            var result:String = chk.selected ? "[X]" : "[ ]";
+            if (chk.label || chk.toolTip)
+                result += " " + (chk.label || chk.toolTip);
+            return [ result ];
+        }
+
+    }
 }


minor fixes

minor fixes

--- src/aerys/minko/render/shader/binding/EvalExpConstantBinder.as
+++ src/aerys/minko/render/shader/binding/EvalExpConstantBinder.as
@@ -22,10 +22,10 @@
 			return _bindingName;
 		}

-		public function EvalExpConstantBinder(bindingName		: String,
-											size			: uint,
-											masterBinding	: IBinder,
-											evalExp			: EvalExp)
+		public function EvalExpConstantBinder(bindingName	: String,
+											  size			: uint,
+											  masterBinding	: IBinder,
+											  evalExp		: EvalExp)
 		{
 			_bindingName	= bindingName;
 			_masterBinding	= masterBinding;


Transferred from the Adobe Open Source Subversion Repository

Revision: 13145
Author:   mhorn@adobe.com
Date:     2009-12-22T16:47:14.705038Z

Log Message:
-----------
asdoc updates and bug fixes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/ILogger.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.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/filters/IBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/Stroke.as</path>

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

--- frameworks/projects/framework/src/mx/logging/ILogger.as
+++ frameworks/projects/framework/src/mx/logging/ILogger.as
@@ -81,9 +81,6 @@
      *
LogEventLevel.DEBUG designates informational
      *    level messages that are fine grained and most helpful when
      *    debugging an application.

-     *
-     *
LogEventLevel.ALL intended to force a target to
-     *    process all messages.

      *

      *
      *  @param message The information to log.


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/logging/ILogger.as
+++ frameworks/projects/framework/src/mx/logging/ILogger.as
@@ -16,6 +16,11 @@

 /**
  *  All loggers within the logging framework must implement this interface.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public interface ILogger extends IEventDispatcher
 {
@@ -33,6 +38,11 @@
      *  The category value for the logger.
      *
      *  @return String containing the category for this logger.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get category():String;

@@ -97,6 +107,11 @@
      *  //   "here is some channel info 15.4 and true"
      *  </pre>
      *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function log(level:int, message:String, ... rest):void;

@@ -134,6 +149,11 @@
      *  // This will log the following String:
      *  //   "here is some channel info 15.4 and true"
      *  </pre>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function debug(message:String, ... rest):void;

@@ -170,6 +190,11 @@
      *  // This will log the following String:
      *  //   "here is some channel info 15.4 and true"
      *  </pre>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function error(message:String, ... rest):void;

@@ -206,6 +231,11 @@
      *  // This will log the following String:
      *  //   "here is some channel info 15.4 and true"
      *  </pre>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function fatal(message:String, ... rest):void;

@@ -241,6 +271,11 @@
      *  // This will log the following String:
      *  //   "here is some channel info 15.4 and true"
      *  </pre>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function info(message:String, ... rest):void;

@@ -276,6 +311,11 @@
      *  // This will log the following String:
      *  //   "here is some channel info 15.4 and true"
      *  </pre>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function warn(message:String, ... rest):void;
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20208
Author:   smgilson@adobe.com
Date:     2011-02-08T21:40:02.122057Z

Log Message:
-----------
Several ASDoc bug fixes

QE notes:
Doc notes:
Bugs: FLEXDOCS-1342, FLEXDOCS-1330, FLEXDOCS-1323
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/ScrollerExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/skins/spark/windowChrome/MacTitleBarSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/ObjectUtil.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/framework/src/mx/core/DeferredInstanceFromClass.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeferredInstanceFromFunction.as</path>

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

--- frameworks/projects/framework/src/mx/states/AddItems.as
+++ frameworks/projects/framework/src/mx/states/AddItems.as
@@ -43,44 +43,44 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  Documentation is not currently available.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+    /**
+     *  Documentation is not currently available.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public static const FIRST:String = "first";

-	/**
-	 *  Documentation is not currently available.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+    /**
+     *  Documentation is not currently available.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public static const LAST:String = "last";

-	/**
-	 *  Documentation is not currently available.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+    /**
+     *  Documentation is not currently available.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public static const BEFORE:String = "before";

-	/**
-	 *  Documentation is not currently available.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+    /**
+     *  Documentation is not currently available.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public static const AFTER:String = "after";

     //--------------------------------------------------------------------------
@@ -90,14 +90,14 @@
     //--------------------------------------------------------------------------

     /**
-	 *  Constructor.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function AddItems()
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function AddItems()
     {
         super();
     }
@@ -220,7 +220,7 @@
      *
      *  @default "never"
      *
-     *  @langversion 4.0
+     *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
@@ -674,7 +674,7 @@
             }
             else
             {
-            	// For destinations like ArrayCollection we don't want to
+                // For destinations like ArrayCollection we don't want to
                 // affect the array in-place in some cases, as ListCollectionView a
                 // attempts to compare the "before" and "after" state of the array
                 assign(dest, propertyName, new Array());


Transferred from the Adobe Open Source Subversion Repository

Revision: 19792
Author:   clucier@adobe.com
Date:     2011-01-18T13:20:31.873835Z

Log Message:
-----------
Effectively reverting changelist 19786. Unfortunately there was logic depending on the original broken behavior.

QE notes: None
Doc notes: None
Bugs: SDK-29146
Reviewer: Jason
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Scale.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Rotate3D.as
+++ frameworks/projects/spark/src/spark/effects/Rotate3D.as
@@ -289,14 +289,9 @@
         var yProp:String = applyChangesPostLayout ? "postLayoutRotationY" : "rotationY";
         var zProp:String = applyChangesPostLayout ? "postLayoutRotationZ" : "rotationZ";

-        if (!(isNaN(angleXFrom) && isNaN(angleXTo)))
-            addMotionPath(xProp, angleXFrom, angleXTo);
-
-        if (!(isNaN(angleYFrom) && isNaN(angleYTo)))
-            addMotionPath(yProp, angleYFrom, angleYTo);
-
-        if (!(isNaN(angleZFrom) && isNaN(angleZTo)))
-            addMotionPath(zProp, angleZFrom, angleZTo);
+        addMotionPath(xProp, angleXFrom, angleXTo);
+        addMotionPath(yProp, angleYFrom, angleYTo);
+        addMotionPath(zProp, angleZFrom, angleZTo);

         super.initInstance(instance);
     }


Simplified and improved liveEdgeMinueWindowDuration calculation logic.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -521,11 +521,7 @@
 						if(indexHandler.isLiveEdgeValid)
 						{
 							_timeCache_liveEdge = indexHandler.liveEdge;
-							var potentialWindowDuration:Number = indexHandler.windowDuration;
-							if(_timeCache_liveEdge > potentialWindowDuration)
-								_timeCache_liveEdgeMinusWindowDuration = _timeCache_liveEdge - indexHandler.windowDuration;
-							else
-								_timeCache_liveEdgeMinusWindowDuration = 0;
+							_timeCache_liveEdgeMinusWindowDuration = indexHandler.streamStartAbsoluteTime

 							if(enableTimeVerboseLog)
 								trace("   o Perceived live stream (" + _timeCache_liveEdge + ", " + _timeCache_liveEdgeMinusWindowDuration + ")");
@@ -602,8 +598,12 @@
 				_lastValidTimeTime = potentialNewTime;
 			}

-			if(_lastValidTimeTime > lastWrittenTime)
+			if(_lastValidTimeTime > lastWrittenTime - _timeCache_liveEdgeMinusWindowDuration)
+			{
+				if(enableTimeVerboseLog)
+					trace("Suppressing future time " + _lastValidTimeTime + " > " + (lastWrittenTime - _timeCache_liveEdgeMinusWindowDuration));
 				return 0;
+			}

 			if(enableTimeVerboseLog)
 				trace("B " + _lastValidTimeTime);


Remove spidermonkey performance test - does not belong in acceptance (r=cpeyer)

--- test/acceptance/spidermonkey/js1_5/String/regress-157334-01.as
+++ test/acceptance/spidermonkey/js1_5/String/regress-157334-01.as
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2005
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Phil Schwartau <pschwartau@meer.net>
- *                 Bob Clary <bob@bclary.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-import avmplus.*;
-startTest();
-
-var gTestfile = 'regress-157334-01.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 157334;
-var summary = 'String concat should not be O(N**2)';
-var actual = '';
-var expect = '';
-
-printBugNumber(BUGNUMBER);
-printStatus (summary);
-
-var data = {X:[], Y:[]};
-for (var size = 1000; size < 10000; size += 1000)
-{
-  data.X.push(size);
-  data.Y.push(concat(size));
-  System.forceFullCollection();
-}
-
-var order = BigO(data);
-
-var msg = '';
-for (var p = 0; p < data.X.length; p++)
-{
-  msg += '(' + data.X[p] + ', ' + data.Y[p] + '); ';
-}
-
-// printStatus(msg);
-//printStatus('Order: ' + order);
-AddTestCase( 'BigO < 2', true, order < 2);
-
-function concat(size)
-{
-  var c='qwertyuiop';
-  var x='';
-  var y='';
-  var loop;
-
-  for (loop = 0; loop < size; loop++)
-  {
-    x += c;
-  }
-
-  y = x + 'y';
-  x = x + 'x';
-
-  var start = new Date();
-  for (loop = 0; loop < 1000; loop++)
-  {
-    var z = x + y + loop.toString();
-  }
-  var stop = new Date();
-  return stop - start;
-}
-
-test();


fix EnterFrameController to avoid listening to the Scene.enterFrame signal multiple times for the same scene

--- src/aerys/minko/scene/controller/EnterFrameController.as
+++ src/aerys/minko/scene/controller/EnterFrameController.as
@@ -29,42 +29,44 @@
 		{
 			super(targetType);

-            _numTargetsInScene = new Dictionary(true);
-
-			targetAdded.add(targetAddedHandler);
-			targetRemoved.add(targetRemovedHandler);
+            initialize();
 		}

+        private function initialize() : void
+        {
+            _numTargetsInScene = new Dictionary(true);
+
+            targetAdded.add(targetAddedHandler);
+            targetRemoved.add(targetRemovedHandler);
+        }
+
 		protected function targetAddedHandler(ctrl		: EnterFrameController,
 											  target	: ISceneNode) : void
 		{
-			if (target.root is Scene)
-				targetAddedToSceneHandler(target, target.root as Scene);
-			else
-				target.addedToScene.add(targetAddedToSceneHandler);
+            if (target.scene)
+                targetAddedToSceneHandler(target, target.scene);
+
+            target.addedToScene.add(targetAddedToSceneHandler);
+            target.removedFromScene.add(targetRemovedFromSceneHandler);
 		}

 		protected function targetRemovedHandler(ctrl	: EnterFrameController,
 												target	: ISceneNode) : void
 		{
-			if (target.root is Scene)
-				target.removedFromScene.remove(targetRemovedFromSceneHandler);
-			else
-				target.addedToScene.remove(targetAddedToSceneHandler);
+            if (target.scene)
+                targetRemovedFromSceneHandler(target, target.scene);
+
+            target.addedToScene.remove(targetAddedToSceneHandler);
+            target.removedFromScene.remove(targetRemovedFromSceneHandler);
 		}

 		protected function targetAddedToSceneHandler(target	: ISceneNode,
 													 scene	: Scene) : void
 		{
-			if (target.addedToScene.hasCallback(targetAddedToSceneHandler))
-				target.addedToScene.remove(targetAddedToSceneHandler);
-
-			target.removedFromScene.add(targetRemovedFromSceneHandler);
-
             if (!_numTargetsInScene.hasOwnProperty(scene))
             {
                 _numTargetsInScene[scene] = 1;
-				scene.enterFrame.add(sceneEnterFrameHandler);
+                scene.enterFrame.add(sceneEnterFrameHandler);
             }
             else
                 _numTargetsInScene[scene]++;
@@ -73,17 +75,14 @@
 		protected function targetRemovedFromSceneHandler(target	: ISceneNode,
 														 scene	: Scene) : void
 		{
-			target.removedFromScene.remove(targetRemovedFromSceneHandler);
-			target.addedToScene.add(targetAddedToSceneHandler);
-
             _numTargetsInScene[scene]--;
-			if (_numTargetsInScene[scene] == 0)
+            if (_numTargetsInScene[scene] == 0)
             {
                 delete _numTargetsInScene[scene];
-				scene.enterFrame.remove(sceneEnterFrameHandler);
+                scene.enterFrame.remove(sceneEnterFrameHandler);
             }
 		}
-
+
 		protected function sceneEnterFrameHandler(scene			: Scene,
 												  viewport		: Viewport,
 												  destination	: BitmapData,