remove frameOverShootDisplay sprite

remove frameOverShootDisplay sprite

--- runtime/src/main/as/flump/display/Layer.as
+++ runtime/src/main/as/flump/display/Layer.as
@@ -55,10 +55,6 @@
             }
             _currentDisplay = _displays[0];
             _currentDisplay.visible = true;
-
-            _frameOvershootDisplay = new Sprite();
-            _frameOvershootDisplay.visible = false;
-            _movie.addChild(_frameOvershootDisplay);
         }

         _currentDisplay.name = _name;
@@ -83,13 +79,8 @@
             return;

         } else if (frame >= _numFrames) {
-            // We've overshot our final frame. Show an empty sprite.
-            if (_currentDisplay != _frameOvershootDisplay) {
-                _currentDisplay.name = null;
-                _currentDisplay.visible = false;
-                _currentDisplay = _frameOvershootDisplay;
-                _currentDisplay.name = _name;
-            }
+            // We've overshot our final frame. Hide the display
+            _currentDisplay.visible = false;
             // keep our keyframeIdx updated
             _keyframeIdx = _keyframes.length - 1;
             _needsKeyframeUpdate = true;
@@ -161,9 +152,6 @@
     protected var _numFrames :int;
     // Stores this layer's DisplayObjects indexed by keyframe.
     protected var _displays :Vector.<DisplayObject>;
-    // Created if the layer has fewer frames than its parent movie. If the layer is told to
-    // draw a frame past its last frame, it will display this empty sprite.
-    protected var _frameOvershootDisplay :Sprite;
     // The current DisplayObject being rendered for this layer
     protected var _currentDisplay :DisplayObject;
     protected var _movie :Movie; // The movie this layer belongs to


Movie +stopAt, +play

Movie +stopAt, +play

--- runtime/src/main/as/flump/display/Movie.as
+++ runtime/src/main/as/flump/display/Movie.as
@@ -119,10 +119,33 @@
     * a label on this movie.
     */
     public function playTo (position :Object) :Movie {
-       _stopFrame = extractFrame(position);
-       // don't play if we're already at the stop frame
-       _playing = (_frame != _stopFrame);
-       return this;
+       // won't play if we're already at the stop position
+       return stopAt(position).play();
+    }
+
+    /** Sets the stop frame for this Movie.
+     *
+     * @param position the int frame or String label to stop at.
+     *
+     * @return this movie for chaining
+     *
+     * @throws Error if position isn't an int or String, or if it is a String and that String isn't
+     * a label on this movie.
+     */
+    public function stopAt (position :Object) :Movie {
+        _stopFrame = extractFrame(position);
+        return this;
+    }
+
+    /** Sets the movie playing.  Movie will automatically stop at its stopFrame, if one is set,
+     *  otherwise it will loop forever.
+     *
+     * @return this movie for chaining
+     */
+    public function play () :Movie {
+        // set playing to true unless movie is at the stop frame
+        _playing = (_frame != _stopFrame) || (_stopFrame == NO_FRAME);
+        return this;
     }

     /** Stops playback if it's currently active. Doesn't alter the current frame or stop frame. */
@@ -155,7 +178,6 @@
                 if (framesElapsed >= framesRemaining) {
                     _playing = false;
                     newFrame = _stopFrame;
-                    _stopFrame = NO_FRAME;
                 }
             }
             updateFrame(newFrame, dt);


Transferred from the Adobe Open Source Subversion Repository

Revision: 21594
Author:   deeptika@adobe.com
Date:     2011-07-18T11:39:38.158141Z

Log Message:
-----------
Changing the style setting mechanism in charts (moving to defaults.css) to fix memory leak in charts.
QE notes:
Doc notes:
Bugs: FLEXDMV-2626 (Views with charts not getting GC-ed)
Reviewer:
Tests run: Mustella test suite for charts - cyclone tested by QE
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/charts.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/AreaSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/BubbleChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/ColumnChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/charts-4.X.0.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/GridLines.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/PieSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/BarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/AreaChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/AxisRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/LineSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/PieChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/BubbleSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/PlotChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/CandlestickChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/charts-3.0.0.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/HLOCChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/LineChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/BarSeries.as</path>

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as
@@ -30,13 +30,13 @@
 import mx.collections.IList;
 import mx.collections.ListCollectionView;
 import mx.collections.XMLListCollection;
+import mx.core.IFlexModuleFactory;
 import mx.core.IUIComponent;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.graphics.SolidColor;
-import mx.graphics.Stroke;
+import mx.graphics.SolidColorStroke;
 import mx.styles.CSSStyleDeclaration;
-import mx.core.IFlexModuleFactory;

 use namespace mx_internal;

@@ -784,22 +784,14 @@
     private function initStyles():Boolean
     {
         HaloDefaults.init(styleManager);
-
-        var cartesianChartStyle:CSSStyleDeclaration =
-            HaloDefaults.createSelector("mx.charts.chartClasses.CartesianChart", styleManager);
-
-        cartesianChartStyle.defaultFactory = function():void
-        {
-            this.axisColor = 0xD5DEDD;
-            this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles;
-            this.dataTipRenderer = DataTip;
-            this.fill = new SolidColor(0xFFFFFF, 0);
-            this.calloutStroke = new Stroke(0x888888,2);
-            this.fontSize = 10;
-            this.horizontalAxisStyleNames = ["blockCategoryAxis"];
-            this.verticalAxisStyleNames = ["blockNumericAxis"];
-        }
-
+
+		var cartesianChartStyle:CSSStyleDeclaration = styleManager.getStyleDeclaration("mx.charts.chartClasses.CartesianChart");
+		cartesianChartStyle.setStyle("chartSeriesStyles", HaloDefaults.chartBaseChartSeriesStyles);
+		cartesianChartStyle.setStyle("fill", new SolidColor(0xFFFFFF, 0));
+		cartesianChartStyle.setStyle("calloutStroke", new SolidColorStroke(0x888888,2));
+		cartesianChartStyle.setStyle("horizontalAxisStyleNames", ["blockCategoryAxis"]);
+		cartesianChartStyle.setStyle("verticalAxisStyleNames", ["blockNumericAxis"]);
+
         return true;
     }

@@ -833,8 +825,8 @@
         initStyles();
         styleManager.registerInheritingStyle("axisTitleStyleName");
     }
-
-
+
+
     /**
      *  @private
      */
@@ -959,7 +951,7 @@

         advanceEffectState();
     }
-
+
     /**
      *  @inheritDoc
      *
@@ -1060,7 +1052,7 @@
             g = displayedSeries[i] as IChartElement;
             if (!g)
                 continue;
-
+
 			Series(g).dataTransform = new CartesianTransform();

             Series(g).invalidateProperties();


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

--- frameworks/projects/framework/src/mx/managers/IFocusManagerContainer.as
+++ frameworks/projects/framework/src/mx/managers/IFocusManagerContainer.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.managers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17107
Author:   aharui@adobe.com
Date:     2010-07-28T22:56:52.689490Z

Log Message:
-----------
Merge 16736 from 3.x to Hero

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridDragProxy.as</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as
@@ -86,6 +86,8 @@
             var o:IListItemRenderer = ListBase(owner).createItemRenderer(items[i]);

             o.styleName = ListBase(owner);
+			addChild(DisplayObject(o));
+

             if (o is IDropInListItemRenderer)
             {
@@ -97,9 +99,9 @@
                                                       null;
             }

-            o.data = items[i];
-
-            addChild(DisplayObject(o));
+			o.data = items[i];
+			o.visible = true;
+

             var contentHolder:ListBaseContentHolder = src.parent as ListBaseContentHolder;

@@ -109,7 +111,6 @@

             measuredHeight = Math.max(measuredHeight, o.y + o.height);
             measuredWidth = Math.max(measuredWidth, o.x + o.width);
-            o.visible = true;
         }

         invalidateDisplayList();


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/List.as
+++ frameworks/projects/mx/src/mx/controls/List.as
@@ -43,7 +43,6 @@
 import mx.core.EventPriority;
 import mx.core.FlexShape;
 import mx.core.FlexSprite;
-import mx.core.FlexVersion;
 import mx.core.IChildList;
 import mx.core.IFactory;
 import mx.core.IIMESupport;
@@ -402,27 +401,6 @@
     //--------------------------------------------------------------------------

     //----------------------------------
-    //  baselinePosition
-    //----------------------------------
-
-    /**
-     *  @private
-     *  The baselinePosition of a List is calculated the same as for ListBase.
-     */
-    override public function get baselinePosition():Number
-    {
-        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-        {
-            if (listItems.length && listItems[0].length)
-                return borderMetrics.top + cachedPaddingTop + listItems[0][0].baselinePosition;
-
-            return NaN;
-        }
-
-        return super.baselinePosition;
-    }
-
-    //----------------------------------
     //  maxHorizontalScrollPosition
     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/rpc/src/mx/core/Version.as
+++ frameworks/projects/rpc/src/mx/core/Version.as
@@ -0,0 +1,16 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
+//  All Rights Reserved. The following is Source Code and is subject to all
+//  restrictions on such code as contained in the End User License Agreement
+//  accompanying this product.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+import mx.core.mx_internal;
+
+/**
+ *  @private
+ *  Version string for this class.
+ */
+mx_internal static const VERSION:String = "3.0.0.0";


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

--- frameworks/projects/automation_dmv/src/AutomationDMVClasses.as
+++ frameworks/projects/automation_dmv/src/AutomationDMVClasses.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
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/effects/SetStyleAction.as
+++ frameworks/projects/framework/src/mx/effects/SetStyleAction.as
@@ -0,0 +1,153 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects
+{
+
+import mx.effects.effectClasses.SetStyleActionInstance;
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="duration", kind="property")]
+
+/**
+ *  The SetStyleAction class defines an action effect that corresponds
+ *  to the SetStyle property of a view state definition.
+ *  You use an SetStyleAction effect within a transition definition
+ *  to control when the view state change defined by a
+ *  SetStyle property occurs during the transition.
+ *
+ *  @mxml
+ *
+ *
The <mx:SetStyleAction> tag
+ *  inherits all of the tag attributes of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:SetStyleAction
+ *    Properties
+ *    id="ID"
+ *    style=""
+ *    value=""
+ *  />
+ *

+ *
+ *  @see mx.effects.effectClasses.SetStyleActionInstance
+ *  @see mx.states.SetStyle
+ *
+ *  @includeExample ../states/examples/TransitionExample.mxml
+ */
+ public class SetStyleAction extends Effect
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param target The Object to animate with this effect.
+	 */
+	public function SetStyleAction(target:Object = null)
+	{
+		super(target);
+
+		instanceClass = SetStyleActionInstance;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  relevantStyles
+	//----------------------------------
+
+	/**
+	 *  Contains the style properties modified by this effect.
+	 *  This getter method overrides the superclass method.
+	 *
+	 *
If you create a subclass of this class to create a custom effect,
+	 *  you must override this method
+	 *  and return an Array that contains a list of the style properties
+	 *  modified by your subclass.

+	 *
+	 *  @return An Array of Strings specifying the names of the
+	 *  style properties modified by this effect.
+	 *
+	 *  @see mx.effects.Effect#getAffectedProperties()
+	 */
+	override public function get relevantStyles():Array /* of String */
+	{
+		return [ name ];
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  name
+	//----------------------------------
+
+	[Inspectable(category="General")]
+
+	/**
+	 *  The name of the style property being changed.
+	 *  By default, Flex determines this value from the SetStyle
+	 *  property definition in the view state definition.
+	 */
+	public var name:String;
+
+	//----------------------------------
+	//  value
+	//----------------------------------
+
+	[Inspectable(category="General")]
+
+	/**
+	 *  The new value for the style property.
+	 *  By default, Flex determines this value from the SetStyle
+	 *  property definition in the view state definition.
+	 */
+	public var value:*;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function initInstance(instance:IEffectInstance):void
+	{
+		super.initInstance(instance);
+
+		var actionInstance:SetStyleActionInstance =
+			SetStyleActionInstance(instance);
+		actionInstance.name = name;
+		actionInstance.value = value;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 9206
Author:   dloverin@adobe.com
Date:     2009-08-10T18:39:33.826984Z

Log Message:
-----------
Merge 3.4 changes 9109, 8949.

Also fixed a bug in the generated code for IFlexModuleFactory.allowInsecureDomain() and cleanup up SystemManager by removing unused variables rslSizes and lastSystemManager.

QE notes: None.
Doc notes: None.
Bugs: SDK-16050, SDK-22556
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IFlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/CompcPreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -33,6 +33,7 @@
 import flash.geom.Rectangle;
 import flash.system.ApplicationDomain;
 import flash.system.Capabilities;
+import flash.system.Security;
 import flash.text.Font;
 import flash.text.TextFormat;
 import flash.ui.Keyboard;
@@ -55,6 +56,7 @@
 import mx.events.DynamicEvent;
 import mx.events.FlexEvent;
 import mx.events.ResizeEvent;
+import mx.events.RSLEvent;
 import mx.events.SandboxMouseEvent;
 import mx.preloaders.Preloader;
 import mx.utils.LoaderUtil;
@@ -195,12 +197,6 @@
 	 */
 	mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);

-	/**
-	 *  @private
-	 *  The last SystemManager instance loaded as child app domains
-	 */
-	mx_internal static var lastSystemManager:SystemManager;
-
 	//--------------------------------------------------------------------------
 	//
 	//  Constructor
@@ -243,8 +239,6 @@

 		if (topLevel)
 			SystemManagerGlobals.topLevelSystemManagers.push(this);
-
-		lastSystemManager = this;

 		// Make sure to stop the playhead on the current frame.
 		stop();
@@ -360,11 +354,6 @@
      *  @productversion Flex 3
 	 */
 	mx_internal var nestLevel:int = 0;
-
-	/**
-	 *  @private
-	 */
-	private var rslSizes:Array = null;

 	/**
 	 *  @private
@@ -1006,6 +995,23 @@
         _numModalWindows = value;
     }

+    //----------------------------------
+    //  preloadedRSLs
+    //----------------------------------
+
+    /**
+     *  The RSLs loaded by this SystemManager before the application
+     *  starts. RSLs loaded by the application are not included in this list.
+     *
+     *  Information about preloadedRSLs is stored in a Dictionary. The key is
+     *  the RSL's LoaderInfo. The value is the url the RSL was loaded from.
+     */
+    public function  get preloadedRSLs():Dictionary
+    {
+        // Overriden by compiler generate code.
+        return null;
+    }
+
     //----------------------------------
     //  preloaderBackgroundAlpha
     //----------------------------------
@@ -1822,6 +1828,8 @@
 		// when the app is fully backed remove the preloader and show the app
 		preloader.addEventListener(FlexEvent.PRELOADER_DONE,
 								   preloader_preloaderDoneHandler);
+        preloader.addEventListener(RSLEvent.RSL_COMPLETE,
+                                   preloader_rslCompleteHandler);

 		// Add the preloader as a child.  Use backing variable because when loaded
 		// we redirect public API to parent systemmanager
@@ -2017,7 +2025,33 @@
 		return super.contains(child);
 	}

-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Methods: Security
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Calls Security.allowDomain() for the SWF associated with this SystemManager
+     *  plus all the SWFs assocatiated with RSLs preloaded by this SystemManager.
+     *
+     */
+    public function allowDomain(... domains):void
+    {
+        // Overridden by compiler generated code.
+    }
+
+    /**
+     *  Calls Security.allowInsecureDomain() for the SWF associated with this SystemManager
+     *  plus all the SWFs assocatiated with RSLs preloaded by this SystemManager.
+     *
+     */
+    public function allowInsecureDomain(... domains):void
+    {
+        // Overridden by compiler generated code.
+    }
+
+    //--------------------------------------------------------------------------
 	//
 	//  Methods: Measurement and Layout
 	//
@@ -2409,6 +2443,8 @@
 		// and add the application as the child
 		preloader.removeEventListener(FlexEvent.PRELOADER_DONE,
 									  preloader_preloaderDoneHandler);
+        preloader.removeEventListener(RSLEvent.RSL_COMPLETE,
+                                      preloader_rslCompleteHandler);

 		_popUpChildren.removeChild(preloader);
         preloader = null;
@@ -2438,7 +2474,17 @@
 		dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
 	}

-	/**
+    /**
+     *  @private
+     *  The preloader has completed loading an RSL.
+     */
+    private function preloader_rslCompleteHandler(event:RSLEvent):void
+    {
+        if (event.loaderInfo)
+            preloadedRSLs[event.loaderInfo] = event.url.url;
+    }
+
+    /**
 	 *  @private
 	 *  This is attached as the framescript at the end of frame 2.
 	 *  When this function is called, we know that the application


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

--- frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as
+++ frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as
@@ -32,6 +32,11 @@
 /**
  *  This class is the base class for skin elements
  *  which draw themselves programmatically.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ProgrammaticSkin extends FlexShape
 							  implements IFlexDisplayObject, IInvalidating,
@@ -59,6 +64,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ProgrammaticSkin()
 	{
@@ -159,6 +169,11 @@
 	 *  the skin.
 	 *
 	 *  @return The measured height of the object, in pixels.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get measuredHeight():Number
 	{
@@ -175,6 +190,11 @@
 	 *  the skin.
 	 *
 	 *  @return The measured width of the object, in pixels.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get measuredWidth():Number
 	{
@@ -199,6 +219,11 @@

     /**
 	 *  @copy mx.core.UIComponent#initialized
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get initialized():Boolean
 	{
@@ -225,6 +250,11 @@

 	/**
      *  @copy mx.core.UIComponent#nestLevel
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public function get nestLevel():int
 	{
@@ -255,6 +285,11 @@

     /**
      *  @copy mx.core.UIComponent#processedDescriptors
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get processedDescriptors():Boolean
 	{
@@ -282,6 +317,11 @@
     /**
 	 *  A flag that determines if an object has been through all three phases
 	 *  of layout validation (provided that any were required).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get updateCompletePendingFlag():Boolean
 	{
@@ -316,6 +356,11 @@
     /**
      *  A parent component used to obtain style values. This is typically set to the
      *  component that created this skin.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get styleName():Object
     {
@@ -346,6 +391,11 @@
      	 *  @param x The horizontal position, in pixels.
 	 *
      	 *  @param y The vertical position, in pixels.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function move(x:Number, y:Number):void
 	{
@@ -359,6 +409,11 @@
      	 *  @param newWidth The width, in pixels, of this object.
 	 *
      	 *  @param newHeight The height, in pixels, of this object.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function setActualSize(newWidth:Number, newHeight:Number):void
 	{
@@ -391,6 +446,11 @@
 	 *  can implement the ILayoutManagerClient  interface.
 	 *  Skins do not call LayoutManager.invalidateProperties(),
 	 *  which would normally trigger a call to this method.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function validateProperties():void
 	{
@@ -403,6 +463,11 @@
 	 *  which would normally trigger a call to this method.
          *
      	 *  @param recursive Determines whether children of this skin are validated.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function validateSize(recursive:Boolean = false):void
 	{
@@ -413,6 +478,11 @@
 	 *  when it's time for this control to draw itself.
 	 *  The actual drawing happens in the updateDisplayList
 	 *  function, which is called by this function.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function validateDisplayList():void
 	{
@@ -434,6 +504,11 @@
 	 *
 	 *  @param styleProp The name of the style property that changed, or null
 	 *  if all styles have changed.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function styleChanged(styleProp:String):void
 	{
@@ -448,6 +523,11 @@

 	/**
 	 *  @copy mx.core.UIComponent#invalidateDisplayList()
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function invalidateDisplayList():void
 	{
@@ -477,6 +557,11 @@
 	 *
          *  @param unscaledHeight
 	 *  The height, in pixels, of this object before any scaling.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	protected function updateDisplayList(unscaledWidth:Number,
 									     unscaledHeight:Number):void
@@ -485,6 +570,11 @@

 	/**
 	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function invalidateSize():void
 	{
@@ -492,6 +582,11 @@

 	/**
 	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function invalidateProperties():void
 	{
@@ -500,6 +595,11 @@
 	/**
 	 *  Validate and update the properties and layout of this object
 	 *  and redraw it, if necessary.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function validateNow():void
 	{
@@ -516,6 +616,11 @@
      *
      *  @return The style value. This can be any type of object that style properties can be, such as
      *  int, Number, String, etc.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getStyle(styleProp:String):*
     {
@@ -536,6 +641,11 @@
 	 *  @return The horizontal gradient matrix. This is a temporary
 	 *  object that should only be used for a single subsequent call
 	 *  to the drawRoundRect() method.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	protected function horizontalGradientMatrix(x:Number, y:Number,
 												width:Number,
@@ -558,6 +668,11 @@
 	 *  @return The horizontal gradient matrix. This is a temporary
 	 *  object that should only be used for a single subsequent call
 	 *  to the drawRoundRect() method.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	protected function verticalGradientMatrix(x:Number, y:Number,
 											  width:Number,
@@ -582,6 +697,11 @@
 	 *  @return The horizontal gradient matrix. This is a temporary
 	 *  object that should only be used for a single subsequent call
 	 *  to the drawRoundRect() method.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	protected function rotatedGradientMatrix(x:Number, y:Number,
 											 width:Number,
@@ -690,6 +810,11 @@
 	 *  { x: #, y: #, w: #, h: #, r: # or { br: #, bl: #, tl: #, tr: # } }
 	 *
 	 *  @see flash.display.Graphics#beginGradientFill()
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	protected function drawRoundRect(
 							x:Number, y:Number, width:Number, height:Number,


Transferred from the Adobe Open Source Subversion Repository

Revision: 19684
Author:   mcho@adobe.com
Date:     2011-01-10T23:28:35.118753Z

Log Message:
-----------
Allow the "alternatingItemColors" style accept a single color

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/TileBase.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/TileBase.as
@@ -22,8 +22,11 @@
 import flash.ui.Keyboard;
 import flash.utils.Dictionary;
 import flash.utils.setInterval;
+
 import mx.collections.CursorBookmark;
 import mx.collections.ItemResponder;
+import mx.collections.ItemWrapper;
+import mx.collections.ModifiedCollectionView;
 import mx.collections.errors.ItemPendingError;
 import mx.controls.scrollClasses.ScrollBar;
 import mx.core.ClassFactory;
@@ -43,8 +46,6 @@
 import mx.events.ScrollEventDetail;
 import mx.events.ScrollEventDirection;
 import mx.skins.halo.ListDropIndicator;
-import mx.collections.ItemWrapper;
-import mx.collections.ModifiedCollectionView;

 use namespace mx_internal;

@@ -2435,8 +2436,10 @@
         }

         var colors:Array;
-
-        colors = getStyle("alternatingItemColors");
+		var colorsStyle:Object = getStyle("alternatingItemColors");
+
+		if (colorsStyle)
+			colors = (colorsStyle is Array) ? (colorsStyle as Array) : [colorsStyle];

         if (!colors || colors.length == 0)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3628
Author:   smgilson@adobe.com
Date:     2008-10-14T18:30:19.526857Z

Log Message:
-----------
ASdoc edits

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxCheckBox.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/FxToggleButton.as</path>

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

--- frameworks/projects/spark/src/spark/components/ToggleButton.as
+++ frameworks/projects/spark/src/spark/components/ToggleButton.as
@@ -19,7 +19,7 @@

 /**
  *  Dispatched when the selected property
- *  changes for the ToggleButton control.
+ *  changes for the FxToggleButton control.
  *
  *  This event is dispatched only when the
  *  user interacts with the control by using the mouse.
@@ -37,7 +37,14 @@
 [DefaultBindingProperty(source="selected", destination="label")]

 /**
- *  Documentation is not currently available.
+ *  The FxToggleButton component defines a toggle button.
+ *  Clicking the button toggles it between the up and an down states.
+ *  If you click the button while it is in the up state,
+ *  it toggles to the down state. You must click the button again
+ *  to toggle it back to the up state.
+ *
+ *
You can get or set this state programmatically
+ *  by using the selected property.

  */
 public class FxToggleButton extends FxButton
 {
@@ -53,11 +60,11 @@
      *  Constructor.
      */
     public function FxToggleButton()
-	{
-		super();
-
-		addEventListener(MouseEvent.CLICK, clickHandler);
-	}
+    {
+        super();
+
+        addEventListener(MouseEvent.CLICK, clickHandler);
+    }

     // -----------------------------------------------------------------------
     //
@@ -65,18 +72,31 @@
     //
     // -----------------------------------------------------------------------

+    /**
+     *  @private
+     */
     protected static const selectedFlag:uint = FxButton.lastFlag << 1;

-	protected static const lastFlag:uint = selectedFlag;
+    /**
+     *  @private
+     */
+    protected static const lastFlag:uint = selectedFlag;

     [Bindable]

-	public function get selected():Boolean
+    /**
+     *  true if the button is in the down state,
+     *  and false if it is in the up state.
+     */
+    public function get selected():Boolean
     {
         return flags.isSet(selectedFlag);
     }

-	public function set selected(value:Boolean):void
+    /**
+     *  @private
+     */
+    public function set selected(value:Boolean):void
     {
         if (!flags.update(selectedFlag, value))
             return;
@@ -92,8 +112,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  getUpdatedSkinState returns a string representation of the component's
-     *  state as a combination of some of its public properties.
+     *  @inheritDoc
      */
     protected override function getUpdatedSkinState():String
     {
@@ -103,6 +122,9 @@
             return super.getUpdatedSkinState() + "AndSelected";
     }

+    /**
+     *  @private
+     */
     protected function clickHandler(event:MouseEvent):void
     {
         if (!isEnabled)


clicking folder hides/unhides all of its contents

--- flexEditor/src/org/arisgames/editor/components/PaletteTree.as
+++ flexEditor/src/org/arisgames/editor/components/PaletteTree.as
@@ -120,11 +120,38 @@
 		}
 		if(evt.stageX > ((level*16)+36) && evt.stageX < ((level*16)+58)) //Reeally awful code to detect whether the icon was clicked or not.
 		{
-			de = new DynamicEvent(AppConstants.DYNAMICEVENT_HIDEOBJECTPALETTEITEM);
-			this.selectedItem.isHidden = !this.selectedItem.isHidden;
-			de.objectPaletteItem = this.selectedItem;
-			AppDynamicEventManager.getInstance().dispatchEvent(de);
-
+			if(this.selectedItem.isFolder())
+			{
+				for(var i:int = 0; i < this.selectedItem.children.length; i++)
+				{
+					if(selectedItem.children[i].isFolder())
+					{
+						this.selectedItem.children[i].isHidden = !this.selectedItem.isHidden;
+						for(var j:int = 0; j < selectedItem.children[i].children.length; j++)
+						{
+							de = new DynamicEvent(AppConstants.DYNAMICEVENT_HIDEOBJECTPALETTEITEM);
+							this.selectedItem.children[i].children[j].isHidden = !this.selectedItem.isHidden;
+							de.objectPaletteItem = this.selectedItem.children[i].children[j];
+							AppDynamicEventManager.getInstance().dispatchEvent(de);
+						}
+					}
+					else
+					{
+						de = new DynamicEvent(AppConstants.DYNAMICEVENT_HIDEOBJECTPALETTEITEM);
+						this.selectedItem.children[i].isHidden = !this.selectedItem.isHidden;
+						de.objectPaletteItem = this.selectedItem.children[i];
+						AppDynamicEventManager.getInstance().dispatchEvent(de);
+					}
+				}
+				this.selectedItem.isHidden = !this.selectedItem.isHidden;
+			}
+			else
+			{
+				de = new DynamicEvent(AppConstants.DYNAMICEVENT_HIDEOBJECTPALETTEITEM);
+				this.selectedItem.isHidden = !this.selectedItem.isHidden;
+				de.objectPaletteItem = this.selectedItem;
+				AppDynamicEventManager.getInstance().dispatchEvent(de);
+			}
 		}
 		else
 		{


Transferred from the Adobe Open Source Subversion Repository

Revision: 21440
Author:   egeorgie@adobe.com
Date:     2011-06-23T00:18:43.464886Z

Log Message:
-----------
Fix for SDK-30625 RTE When Reorienting while SplashScreen is Up

In this change: check stage for null in the Application's orientation changing/change handlers.

QE notes: Regress SDK-30438
Doc notes:
Bugs: SDK-30625
Reviewer:
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Application.as

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -778,12 +778,13 @@

     /**
      *  The image class for the SplashScreen preloader.
-     *  Typically you set this property to an embedded resource.
-     *  For example:
+     *  Typically you set this property to either an embedded resource
+     *  or the name of a SplashScreenImage class defined in a separate MXML file.
+     *  Example of setting splashScreenImage to an embedded image:
      *
      *
splashScreenImage="@Embed('Default.png')"

      *
-     *
Note: The property has effect only when the preloader
+     *
Note: The property has effect only when the preloader
      *  property is set to spark.preloaders.SplashScreen.
      *  The spark.preloaders.SplashScreen class is the default preloader for Mobile Flex applications.
      *  This property cannot be set by ActionScript code; it must be set in MXML code.

@@ -1369,58 +1370,60 @@
         // Manually update orientation width and height if the application's explicit
         // sizes aren't set.  If they are, we assume the application will handle
         // orientation on their own.
-        if (isNaN(explicitWidth) && isNaN(explicitHeight))
-        {
-            if (!cachedDimensions)
-                cachedDimensions = new Dictionary();
-
-            // remember the current dimensions
-            previousWidth = width;
-            previousHeight = height;
-
-            var key:String = width + ":" + height;
-
-            // On some platforms (e.g. iOS and Playbook) if the soft keyboard is up
-            // it deactivates before orientation change and reactivates after it;
-            // the value of isSoftKeyboardActive thus changes during orientation change.
-            // We are remembering the initial value of isSoftKeyboardActivate in this
-            // situation for use in avoiding excessive resizing during the orientation change.
-            keyboardActiveInOrientationChange = isSoftKeyboardActive;
-
-            // if we're rotating 180 degrees don't do any screen resizing
-            var beforeOrientation:String = event["beforeOrientation"];
-            var afterOrientation:String = event["afterOrientation"];
-
-            if ((beforeOrientation == "default" && afterOrientation == "upsideDown") ||
-                (beforeOrientation == "upsideDown" && afterOrientation == "default") ||
-                (beforeOrientation == "rotatedLeft" && afterOrientation == "rotatedRight") ||
-                (beforeOrientation == "rotatedRight" && afterOrientation == "rotatedLeft"))
-                return;
-
-            var newWidth:Number;
-            var newHeight:Number;
-
-            // if we have a cached value, use it
-            if (cachedDimensions[key])
-            {
-                newWidth = cachedDimensions[key].width;
-                newHeight = cachedDimensions[key].height;
-            }
-            else // no cached value; just swap the numbers for now
-            {
-                // use stageHeight as the new width if you can get it
-                newWidth = stage ? stage.stageHeight / scaleFactor : height;
-                newHeight = width;
-            }
-
-            setActualSize(newWidth, newHeight);
-
-            // Indicate that the width and height have changed because of orientation
-            explicitSizingForOrientation = true;
-
-            // Force a validation
-            validateNow();
-        }
+        // SDK-30625: check stage for null since the Application may not be on-screen yet
+        // if orientation changes during start-up.
+        if (!stage || !isNaN(explicitWidth) || !isNaN(explicitHeight))
+            return;
+
+        if (!cachedDimensions)
+            cachedDimensions = new Dictionary();
+
+        // remember the current dimensions
+        previousWidth = width;
+        previousHeight = height;
+
+        var key:String = width + ":" + height;
+
+        // On some platforms (e.g. iOS and Playbook) if the soft keyboard is up
+        // it deactivates before orientation change and reactivates after it;
+        // the value of isSoftKeyboardActive thus changes during orientation change.
+        // We are remembering the initial value of isSoftKeyboardActivate in this
+        // situation for use in avoiding excessive resizing during the orientation change.
+        keyboardActiveInOrientationChange = isSoftKeyboardActive;
+
+        // if we're rotating 180 degrees don't do any screen resizing
+        var beforeOrientation:String = event["beforeOrientation"];
+        var afterOrientation:String = event["afterOrientation"];
+
+        if ((beforeOrientation == "default" && afterOrientation == "upsideDown") ||
+            (beforeOrientation == "upsideDown" && afterOrientation == "default") ||
+            (beforeOrientation == "rotatedLeft" && afterOrientation == "rotatedRight") ||
+            (beforeOrientation == "rotatedRight" && afterOrientation == "rotatedLeft"))
+            return;
+
+        var newWidth:Number;
+        var newHeight:Number;
+
+        // if we have a cached value, use it
+        if (cachedDimensions[key])
+        {
+            newWidth = cachedDimensions[key].width;
+            newHeight = cachedDimensions[key].height;
+        }
+        else // no cached value; just swap the numbers for now
+        {
+            // use stageHeight as the new width if you can get it
+            newWidth = stage ? stage.stageHeight / scaleFactor : height;
+            newHeight = width;
+        }
+
+        setActualSize(newWidth, newHeight);
+
+        // Indicate that the width and height have changed because of orientation
+        explicitSizingForOrientation = true;
+
+        // Force a validation
+        validateNow();
     }

     /**
@@ -1432,16 +1435,18 @@
      */
     private function stage_orientationChange(event:Event):void
     {
-        if (explicitSizingForOrientation)
-        {
-            // update cache if keyboard was not previously active
-            if (!keyboardActiveInOrientationChange)
-            {
-                updateScreenSizeCache(stage.stageWidth / scaleFactor, stage.stageHeight / scaleFactor);
-            }
-
-            explicitSizingForOrientation = false;
-        }
+        // SDK-30625: check stage for null since the Application may not be on-screen yet
+        // if orientation changes during start-up.
+        if (!stage || !explicitSizingForOrientation)
+            return;
+
+        // update cache if keyboard was not previously active
+        if (!keyboardActiveInOrientationChange)
+        {
+            updateScreenSizeCache(stage.stageWidth / scaleFactor, stage.stageHeight / scaleFactor);
+        }
+
+        explicitSizingForOrientation = false;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5224
Author:   jszeto@adobe.com
Date:     2009-03-10T21:06:53.989833Z

Log Message:
-----------
Flex SDK Bug Fixes

SDK-19772 Initially invisible graphic element can not be made visible

When visible is false, we were both setting the displayObject invisible and not drawing the graphics. When visible was then set to true, we changed the displayObject visibility, but didn't draw the graphics. The fix is to always draw the graphics when we are not sharing our displayObject. This way we simply toggle visibility on the displayObject on/off, instead of having to perform a redraw.

SDK-19581 BitmapFill incorrectly handle source property

Updated code to match code in BitmapGraphic. If the source is a class, we still need to check the type of the newly instantiated instance of that class.

SDK-19085 unexpected behaviour when setting scaleX < 3 on a LinearGradient

Internally, we no longer allow scaleX to be less than 2. Visually, this shouldn't have much impact.

QE Notes: n/a
Doc Notes: n/a
Bugs: SDK-19772, SDK-19581, SDK-19085
Reviewer: Evtim, Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -323,6 +323,10 @@
             {
                 tmpSprite = value as DisplayObject;
             }
+            else if (value == null)
+            {
+            	// This will set source to null
+            }
             else
             {
                 return;


#FEC-163 #time 0.5h #comment display "auto" message when needed

--- kdp3Lib/src/com/kaltura/kdpfl/view/controls/KFlavorComboBox.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/controls/KFlavorComboBox.as
@@ -1,648 +1,648 @@
-package com.kaltura.kdpfl.view.controls
-{
-	import com.kaltura.kdpfl.model.MediaProxy;
-	import com.kaltura.kdpfl.model.type.StreamerType;
-
-	import fl.data.DataProvider;
-
-	import flash.events.Event;
-	import flash.events.MouseEvent;
-	import flash.events.TimerEvent;
-	import flash.utils.Timer;
-
-	import org.puremvc.as3.patterns.facade.Facade;
-
-	/**
-	 * Class KFlavorComboBox represents the uinique Kaltura ComboBox which allows the user to toggle the
-	 * video quality. This ComboBox wil be empty of flavor bitrate values in case the media playing in the KDP is a KalturaMixEntry.
-	 * The data in the ComboBox is displayed in units of kbps (kilo-bytes per second).
-	 * @author Hila
-	 *
-	 */
-	public class KFlavorComboBox extends KComboBox
-	{
-		public static const HD_LIMIT:int = 540;
-		public static const HEIGHT_ARRAY:Array = [240, 360, 480, 540, 720, 1080];
-
-		public static const DATA_PROVIDER_CHANGE : String = "dataProviderChange";
-		/**
-		 * Property holds the value of the string displayed in the Combo Box when the player is in adaptive bitrate
-		 * mode and the bitrate changes automatically. Default value is "HD Auto".
-		 */
-		private var _autoString : String = "Auto";
-		/**
-		 * DEPRECATED
-		 * Property holds the value of the string displayed in the Combgo Box when the selected flavor
-		 * has a bitrate greater than 2500kbps.
-		 */
-		private var _hdOn : String = "HD On";
-		/**
-		 * DEPRECATED
-		 * Property holds the value of the string displayed in the Combgo Box when the selected flavor
-		 * has a bitrate smaller than 2500kbps.
-		 */
-		private var _hdOff : String = "HD Off";
-		/**
-		 * Property holds the value of the string displayed in the Combgo Box when the switch to the selected bitrate is in process
-		 */
-		private var _switchingMessage : String = "Switch in Progress..."
-		/**
-		 * The post-fix displayed in the Combo Box. For instance, if the post fix is "k" then the displayed string will be bitrate+k.
-		 */
-		public var bitratePostFix : String = "k";
-		/**
-		 * The post-fix displayed in the Combo Box. For instance, if the post fix is "p" then the displayed string will be height+p.
-		 */
-		public var pixelsPostFix : String = "p";
-
-		private var _flavorArray : Array;
-		/**
-		 * The bitrate for the user's prefered flavor.
-		 */
-		private var _preferedFlavorBR : int;
-		/**
-		 * Flag indicating whether the player is currently in adaptive streaming mode (rtmp).
-		 */
-		private var _isRtmp : Boolean = false;
-		/**
-		 * Flag indicating whether the player is currently in http streaming mode (hdnetwork).
-		 */
-		private var _isHttpStreaming : Boolean = false;
-		/**
-		 * This property stands for the current transmission mode of the KDP. Values are "http" (progressive download), "rtmp" (adaptive streaming) or "live" (live streaming media).
-		 */
-		private var _streamerType : String;
-		/**
-		 * The message displayed in the tooltip of the combo box.
-		 */
-		private var _selectedMessage : String = "";
-		/**
-		 * The tooltip for the _autoString.
-		 */
-		private var _autoMessage : String = "Automatically Switches Between Bitrates";
-
-		public var kisOpen : Boolean = false;
-
-		/**
-		 * whether the dropdown is currently displayed
-		 */
-		private var _isOnDropdown:Boolean = false;
-
-		private var _dropdownTimer:Timer;
-		/**
-		 * time in milliseconds to wait before disappearing the dropdown
-		 * */
-		static private var DROPDOWN_TIMER_DELAY:Number = 600; // ms
-
-		/**
-		 * prefix for HD bitrates
-		 */
-		public var hdPrefix:String = "HD ";
-		/**
-		 * prefix for SD bitrates
-		 */
-		public var sdPrefix:String = "SD ";
-		/**
-		 * length of bitrate prefix string
-		 */
-		public var prefixLength:int = 3;
-		/**
-		 * string that indicates adaptive switching is currently on
-		 */
-		public var adaptiveAuto:String = "Auto on";
-		/**
-		 * string that indicates adaptive switching is currently off
-		 */
-		public var adaptiveOff:String = "Auto off";
-		/**
-		 * string that indicates the flavor has low height
-		 */
-		public var lowHeight:String = "Low";
-		/**
-		 * indicate if we are autoSwitching flavors (relevant for RTMP or HDNetwork)
-		 */
-		private var _isAutoSwitch:Boolean;
-		/**
-		 * index of last item that was selected
-		 */
-		public var lastSelectedIndex:int;
-
-		public var usePixels:Boolean;
-
-		private var _bitrateDetectionMessage:String = "Detecting Your Bandwidth";
-
-		private var _switchPausedMessage:String = "Switching is Paused";
-
-
-		/**
-		 * Constructor
-		 *
-		 */
-		public function KFlavorComboBox()
-		{
-			super();
-			this.labelFunction = flavorLabelFunction;
-
-			//listeners to close dropdown on mouse rollout
-			this.addEventListener(MouseEvent.ROLL_OVER, onCBRollover);
-			this.addEventListener(MouseEvent.ROLL_OUT, onCBRollout);
-			this.dropdown.addEventListener(MouseEvent.ROLL_OVER, onDropdownRollover);
-			this.dropdown.addEventListener(MouseEvent.ROLL_OUT, onDropdownRollout);
-		}
-
-		[Bindable]
-		public function get isAutoSwitch():Boolean
-		{
-			return _isAutoSwitch;
-		}
-
-		public function set isAutoSwitch(value:Boolean):void
-		{
-			_isAutoSwitch = value;
-			if (isDynamic() && (dataProvider && dataProvider.length))
-			{
-				//replace the auto message
-				var item:Object;
-				if (_isAutoSwitch)
-					item = {label: adaptiveAuto, value: -2};
-				else
-					item = {label: adaptiveOff, value: -2};
-				dataProvider.replaceItemAt(item, dataProvider.length -1)
-			}
-		}
-
-		[Bindable]
-		public function get bitrateDetectionMessage():String
-		{
-			return _bitrateDetectionMessage;
-		}
-
-		/**
-		 * The message that will be displayd as the tooltip when bitrate detection is in progress
-		 * @param value
-		 *
-		 */
-		public function set bitrateDetectionMessage(value:String):void
-		{
-			_bitrateDetectionMessage = value;
-		}
-
-		[Bindable]
-		public function get switchPausedMessage():String
-		{
-			return _switchPausedMessage;
-		}
-
-		/**
-		 * The message that will be displayed as the tooltip when player is paused during switching process
-		 * @param value
-		 *
-		 */
-		public function set switchPausedMessage(value:String):void
-		{
-			_switchPausedMessage = value;
-		}
-
-
-		/**
-		 * On mouse rollover remove redundant listeners
-		 * @param event
-		 *
-		 */
-		protected function onCBRollover(event:MouseEvent):void {
-			_dropdownTimer.removeEventListener( TimerEvent.TIMER, hideDropdown );
-		}
-
-		/**
-		 * Wait DROPDOWN_TIMER_DELAY milliseconds and close the dropdown
-		 * @param event
-		 *
-		 */
-		protected function onCBRollout(event:MouseEvent):void {
-			_dropdownTimer.addEventListener( TimerEvent.TIMER, hideDropdown, false, 0, true );
-			_dropdownTimer.reset();
-			_dropdownTimer.start();
-		}
-
-		private function onDropdownRollover(event:MouseEvent):void {
-			_isOnDropdown = true;
-		}
-
-		private function onDropdownRollout(event:MouseEvent):void {
-			_isOnDropdown = false;
-		}
-
-		/**
-		 *  Handler for the TimerEvent indicating that the _dropdownTimer has finished counting down, and that the dropdown
-		 * needs to be closed.
-		 * @param evt - TimerEvent
-		 *
-		 */
-		public function hideDropdown( evt:TimerEvent=null ):void
-		{
-			_dropdownTimer.removeEventListener( TimerEvent.TIMER, hideDropdown );
-			_dropdownTimer.reset();
-			//close the dropdown only if we are not on the combo box or its dropdown
-			if (!_isOnDropdown) {
-				close();
-			}
-
-
-		}
-
-
-		private function flavorLabelFunction (data : Object) : String
-		{
-			var labelLength : int = data.label.length-this.bitratePostFix.length;
-			var preferedFlavorBitrate : int = parseInt(String(data.label).substr(0,labelLength));
-			if(data == this.selectedItem && !kisOpen){
-				if (!_flavorArray || !_flavorArray.length)
-				{
-					return "";
-				}
-				else if(this._streamerType != StreamerType.HTTP)
-				{
-					if (isAutoSwitch)
-					{
-						return autoString;
-					}
-				}
-
-				/*if (usePixels)
-				{
-				var labelArr:Array = (data.label as String).split(" ");
-				if (labelArr.length == 2)
-				{
-				return labelArr[0] + "\n" + labelArr[1] //prefix, new line, pixels
-				}
-				}
-				return data.label;*/
-			}
-			return data.label;
-		}
-
-
-		/////////////////////////////////////////////////////////////////
-		/////////////////////PUBLIC METHODS//////////////////////////////
-		/////////////////////////////////////////////////////////////////
-
-		override public function initialize():void
-		{
-			if (_isRtmp)
-			{
-				this.selectedMessage = autoMessage;
-			}
-
-			else if (this.selectedItem)
-			{
-				this.selectedMessage = this.selectedItem.label;
-			}
-
-			_dropdownTimer = new Timer( DROPDOWN_TIMER_DELAY );
-		}
-
-		/**
-		 * Getter function for the data provider of the ComboBox
-		 * @return - Array which is the data provuder of the Combo Box.
-		 *
-		 */
-		public function get flavorDataProvider():Array
-		{
-			return _flavorArray;
-		}
-
-		[Bindable]
-		/**
-		 * Setter function for the data provider of the Combo Box
-		 * @param arr
-		 *
-		 */
-		public function set flavorDataProvider(arr:Array):void
-		{
-			if(_flavorArray == arr) return;
-
-			_flavorArray = arr;
-
-			var newDPArray:Array = new Array();
-
-			if(_flavorArray && _flavorArray.length)
-			{
-				var sortedFlavorArray:Array = (_flavorArray.concat());
-				//descending sort of flavors according to bitrate
-				sortedFlavorArray.sortOn("bitrate", Array.NUMERIC | Array.DESCENDING);
-				var usedPixelsArr:Array;
-				// will be true if "SD Low" label was already added to flavors list
-				var usedLowHeight:Boolean = false;
-				if (usePixels)
-				{
-					//this array indicates if we already inserted the corresponding height to the data provider
-					usedPixelsArr = new Array();
-					for (var k:int = 0; k < HEIGHT_ARRAY.length; k++)
-					{
-						usedPixelsArr.push(false);
-					}
-				}
-
-				for(var i:int=0; i<sortedFlavorArray.length; i++)
-				{
-					var label:String;
-					//find proper prefix according to BR
-					var roundedBitrate : Number = (Math.round(Number(sortedFlavorArray[i].bitrate)/100))*100;
-					var heightIndex:int = -1;
-					if (usePixels)
-					{
-						//find closest pixels value:
-						var height: int = sortedFlavorArray[i].height;
-
-						for (var j:int = 0; j < HEIGHT_ARRAY.length; j++)
-						{
-							if (height == HEIGHT_ARRAY[j])
-							{
-								heightIndex = j;
-								break;
-							}
-							if (HEIGHT_ARRAY[j]>height)
-							{
-								if (j==0)
-								{
-									heightIndex = -1;
-									break;
-								}
-								if ((height - HEIGHT_ARRAY[j-1]) > (HEIGHT_ARRAY[j] - height))
-									heightIndex = j;
-								else
-									heightIndex = j-1;
-
-								break;
-							}
-							else if (j==HEIGHT_ARRAY.length-1)
-							{
-								heightIndex = j;
-							}
-						}
-
-						if (heightIndex == -1)
-						{
-							label = lowHeight;
-							//if we already inserted the "SD Low" label, don't insert another one
-							if (usedLowHeight)
-								continue;
-
-							usedLowHeight = true;
-						}
-						else
-						{
-							label = HEIGHT_ARRAY[heightIndex] + pixelsPostFix;
-							//if we already inserted such height, it was with heighest bitrate (the array is sorted), so we won't insert this value too
-							if (usedPixelsArr[heightIndex])
-								continue;
-
-							usedPixelsArr[heightIndex] = true;
-						}
-						var prefix:String = (sortedFlavorArray[i].height > HD_LIMIT) ? hdPrefix : sdPrefix;
-						label = prefix + label;
-					}
-					else
-					{
-						label = roundedBitrate + bitratePostFix;
-					}
-
-					newDPArray.push( { label: label, value: height, bitrate: roundedBitrate} );
-				}
-
-				if(isDynamic() )
-					newDPArray.push({label : isAutoSwitch ? adaptiveAuto : adaptiveOff, value: -2, bitrate: -2});
-
-				if (usePixels)
-					newDPArray.sortOn("value", Array.NUMERIC | Array.DESCENDING);
-			}
-			else
-			{
-				return;
-			}
-
-			super.dataProvider = new DataProvider(newDPArray);
-			dispatchEvent( new Event( DATA_PROVIDER_CHANGE ) );
-
-			this.selectedIndex = dataProvider.length - 1;
-			if (_preferedFlavorBR)
-			{
-				setSelectedItem(_preferedFlavorBR);
-			}
-		}
-		/**
-		 * Getter function for the _preferedFlavorBR property.
-		 * @return
-		 *
-		 */
-		public function get preferedFlavorBR() : int { return _preferedFlavorBR; }
-
-		[Bindable]
-		/**
-		 * Setter function for the _preferedFlavorBR property.
-		 * @param preferedFlavor - the value to set into the the _preferedFlavorBR property.
-		 *
-		 */
-		public function set preferedFlavorBR( preferedFlavor : int ) : void
-		{
-			if(!dataProvider || !dataProvider.length || (preferedFlavor == _preferedFlavorBR))
-				return;
-
-			_preferedFlavorBR = (Math.round(Number(preferedFlavor)/100))*100;
-			setSelectedItem(_preferedFlavorBR);
-		}
-
-		/**
-		 * finds the item with the same bitrate and set it as the selected item
-		 * @param bitrate
-		 *
-		 */
-		private function setSelectedItem(bitrate:int):void
-		{
-			var item:Object = getItemByBitrate(bitrate);
-			if (item)
-			{
-				this.selectedItem = item;
-			}
-		}
-		/**
-		 * Getter function for the _streamerType property.
-		 * @return the value of property _streamerType.
-		 *
-		 */
-		public function get streamerType() : String { return _streamerType; }
-
-		[Bindable]
-		/**
-		 * Setter function for the _streamerType property.
-		 * @param value
-		 *
-		 */
-		public function set streamerType( value : String ) :  void
-		{
-			_streamerType = value;
-			//we check if this is RTMP so we need to add the auto mode
-			_isRtmp = (_streamerType == StreamerType.RTMP || _streamerType == StreamerType.LIVE) ? true : false;
-			_isHttpStreaming = (_streamerType == StreamerType.HDNETWORK || _streamerType == StreamerType.HDNETWORK_HDS || _streamerType == StreamerType.HDS) ;
-		}
-		/**
-		 *
-		 * @return
-		 *
-		 */
-		public function get hdOn () : String { return _hdOn; }
-
-		[Bindable]
-		/**
-		 * Setter function for the _hdOn property.
-		 * @param value
-		 *
-		 */
-		public function set hdOn ( hdOnMsg : String) : void
-		{
-			_hdOn = hdOnMsg;
-		}
-
-		public function get hdOff () : String { return _hdOff; }
-
-		[Bindable]
-		/**
-		 * Setter function for the _hdOff property.
-		 * @param value
-		 *
-		 */
-		public function set hdOff ( hdOffMsg : String ) : void
-		{
-			_hdOff = hdOffMsg;
-		}
-
-		public function get selectedMessage () : String{ return _selectedMessage; }
-
-		[Bindable]
-
-		public function set selectedMessage (newMsg : String) : void
-		{
-			_selectedMessage = newMsg;
-		}
-
-		public function get autoMessage () : String{ return _autoMessage; }
-
-		[Bindable]
-		public function set autoMessage (newMsg : String) : void
-		{
-			_autoMessage = newMsg;
-		}
-
-		public function get autoString () : String{ return _autoString; }
-
-		[Bindable]
-		public function set autoString (newMsg : String) : void
-		{
-			_autoString = newMsg;
-			if(isDynamic())
-			{
-				this.dataProvider.getItemAt(0).label = _autoString;
-			}
-		}
-		[Bindable]
-		public function set notVisible (arg:Boolean) :void
-		{
-			visible = !arg;
-		}
-		public function get notVisible () : Boolean
-		{
-			return !visible;
-		}
-
-		/**
-		 *The string for the message shown when the switch between bitrates is in process.
-		 */
-		public function get switchingMessage():String
-		{
-			return _switchingMessage;
-		}
-
-		/**
-		 * @private
-		 */
-		public function set switchingMessage(value:String):void
-		{
-			_switchingMessage = value;
-		}
-
-		public function determineEnabled (isSwitching:Boolean = false) : void
-		{
-			if (!this._flavorArray || !this._flavorArray.length || isSwitching)
-			{
-				this.enabled = false;
-			}
-			else
-			{
-				this.enabled = true;
-
-				if (this.streamerType == StreamerType.RTMP)
-				{
-					this.selectedMessage = autoMessage;
-				}
-				else if (preferedFlavorBR != -1)
-				{
-					this.selectedMessage = this.selectedItem.label;
-				}
-			}
-		}
-
-		/**
-		 * return the suitable item from the data provider, according to the given bitrate
-		 * Saves the found index as "lastSelectedIndex"
-		 * @param bitrate
-		 * @return
-		 *
-		 */
-		public function getItemByBitrate(bitrate:int):Object
-		{
-			if(!dataProvider || !dataProvider.length)
-				return null;
-
-			//if we are in pixels mode represents the desired height
-			var preferedHeight:int = -1;
-			if (usePixels)
-			{
-				//find the matching height of this flavor
-				for (var j:int = 0; j< _flavorArray.length; j++)
-				{
-					if ((Math.round(Number(_flavorArray[j].bitrate)/100) * 100) == bitrate)
-					{
-						preferedHeight = _flavorArray[j].height;
-						break;
-					}
-				}
-			}
-
-			for(var i:int=0; i<dataProvider.length; i++)
-			{
-				if (usePixels)
-				{
-					if (dataProvider.getItemAt(i).value == preferedHeight)
-					{
-						lastSelectedIndex = i;
-						return dataProvider.getItemAt(i);
-					}
-
-				}
-				else if(dataProvider.getItemAt(i).bitrate == bitrate)
-				{
-					lastSelectedIndex = i;
-					return dataProvider.getItemAt(i);
-				}
-			}
-
-			return null;
-		}
-
-		private function isDynamic():Boolean
-		{
-			return (_isRtmp || _isHttpStreaming || (Facade.getInstance().retrieveProxy(MediaProxy.NAME) as MediaProxy).vo.forceDynamicStream)
-		}
-
-	}
+package com.kaltura.kdpfl.view.controls
+{
+	import com.kaltura.kdpfl.model.MediaProxy;
+	import com.kaltura.kdpfl.model.type.StreamerType;
+
+	import fl.data.DataProvider;
+
+	import flash.events.Event;
+	import flash.events.MouseEvent;
+	import flash.events.TimerEvent;
+	import flash.utils.Timer;
+
+	import org.puremvc.as3.patterns.facade.Facade;
+
+	/**
+	 * Class KFlavorComboBox represents the uinique Kaltura ComboBox which allows the user to toggle the
+	 * video quality. This ComboBox wil be empty of flavor bitrate values in case the media playing in the KDP is a KalturaMixEntry.
+	 * The data in the ComboBox is displayed in units of kbps (kilo-bytes per second).
+	 * @author Hila
+	 *
+	 */
+	public class KFlavorComboBox extends KComboBox
+	{
+		public static const HD_LIMIT:int = 540;
+		public static const HEIGHT_ARRAY:Array = [240, 360, 480, 540, 720, 1080];
+
+		public static const DATA_PROVIDER_CHANGE : String = "dataProviderChange";
+		/**
+		 * Property holds the value of the string displayed in the Combo Box when the player is in adaptive bitrate
+		 * mode and the bitrate changes automatically. Default value is "HD Auto".
+		 */
+		private var _autoString : String = "Auto";
+		/**
+		 * DEPRECATED
+		 * Property holds the value of the string displayed in the Combgo Box when the selected flavor
+		 * has a bitrate greater than 2500kbps.
+		 */
+		private var _hdOn : String = "HD On";
+		/**
+		 * DEPRECATED
+		 * Property holds the value of the string displayed in the Combgo Box when the selected flavor
+		 * has a bitrate smaller than 2500kbps.
+		 */
+		private var _hdOff : String = "HD Off";
+		/**
+		 * Property holds the value of the string displayed in the Combgo Box when the switch to the selected bitrate is in process
+		 */
+		private var _switchingMessage : String = "Switch in Progress..."
+		/**
+		 * The post-fix displayed in the Combo Box. For instance, if the post fix is "k" then the displayed string will be bitrate+k.
+		 */
+		public var bitratePostFix : String = "k";
+		/**
+		 * The post-fix displayed in the Combo Box. For instance, if the post fix is "p" then the displayed string will be height+p.
+		 */
+		public var pixelsPostFix : String = "p";
+
+		private var _flavorArray : Array;
+		/**
+		 * The bitrate for the user's prefered flavor.
+		 */
+		private var _preferedFlavorBR : int;
+		/**
+		 * Flag indicating whether the player is currently in adaptive streaming mode (rtmp).
+		 */
+		private var _isRtmp : Boolean = false;
+		/**
+		 * Flag indicating whether the player is currently in http streaming mode (hdnetwork).
+		 */
+		private var _isHttpStreaming : Boolean = false;
+		/**
+		 * This property stands for the current transmission mode of the KDP. Values are "http" (progressive download), "rtmp" (adaptive streaming) or "live" (live streaming media).
+		 */
+		private var _streamerType : String;
+		/**
+		 * The message displayed in the tooltip of the combo box.
+		 */
+		private var _selectedMessage : String = "";
+		/**
+		 * The tooltip for the _autoString.
+		 */
+		private var _autoMessage : String = "Automatically Switches Between Bitrates";
+
+		public var kisOpen : Boolean = false;
+
+		/**
+		 * whether the dropdown is currently displayed
+		 */
+		private var _isOnDropdown:Boolean = false;
+
+		private var _dropdownTimer:Timer;
+		/**
+		 * time in milliseconds to wait before disappearing the dropdown
+		 * */
+		static private var DROPDOWN_TIMER_DELAY:Number = 600; // ms
+
+		/**
+		 * prefix for HD bitrates
+		 */
+		public var hdPrefix:String = "HD ";
+		/**
+		 * prefix for SD bitrates
+		 */
+		public var sdPrefix:String = "SD ";
+		/**
+		 * length of bitrate prefix string
+		 */
+		public var prefixLength:int = 3;
+		/**
+		 * string that indicates adaptive switching is currently on
+		 */
+		public var adaptiveAuto:String = "Auto on";
+		/**
+		 * string that indicates adaptive switching is currently off
+		 */
+		public var adaptiveOff:String = "Auto off";
+		/**
+		 * string that indicates the flavor has low height
+		 */
+		public var lowHeight:String = "Low";
+		/**
+		 * indicate if we are autoSwitching flavors (relevant for RTMP or HDNetwork)
+		 */
+		private var _isAutoSwitch:Boolean;
+		/**
+		 * index of last item that was selected
+		 */
+		public var lastSelectedIndex:int;
+
+		public var usePixels:Boolean;
+
+		private var _bitrateDetectionMessage:String = "Detecting Your Bandwidth";
+
+		private var _switchPausedMessage:String = "Switching is Paused";
+
+
+		/**
+		 * Constructor
+		 *
+		 */
+		public function KFlavorComboBox()
+		{
+			super();
+			this.labelFunction = flavorLabelFunction;
+
+			//listeners to close dropdown on mouse rollout
+			this.addEventListener(MouseEvent.ROLL_OVER, onCBRollover);
+			this.addEventListener(MouseEvent.ROLL_OUT, onCBRollout);
+			this.dropdown.addEventListener(MouseEvent.ROLL_OVER, onDropdownRollover);
+			this.dropdown.addEventListener(MouseEvent.ROLL_OUT, onDropdownRollout);
+		}
+
+		[Bindable]
+		public function get isAutoSwitch():Boolean
+		{
+			return _isAutoSwitch;
+		}
+
+		public function set isAutoSwitch(value:Boolean):void
+		{
+			_isAutoSwitch = value;
+			if (isDynamic() && (dataProvider && dataProvider.length))
+			{
+				//replace the auto message
+				var item:Object;
+				if (_isAutoSwitch)
+					item = {label: adaptiveAuto, value: -2};
+				else
+					item = {label: adaptiveOff, value: -2};
+				dataProvider.replaceItemAt(item, dataProvider.length -1)
+			}
+		}
+
+		[Bindable]
+		public function get bitrateDetectionMessage():String
+		{
+			return _bitrateDetectionMessage;
+		}
+
+		/**
+		 * The message that will be displayd as the tooltip when bitrate detection is in progress
+		 * @param value
+		 *
+		 */
+		public function set bitrateDetectionMessage(value:String):void
+		{
+			_bitrateDetectionMessage = value;
+		}
+
+		[Bindable]
+		public function get switchPausedMessage():String
+		{
+			return _switchPausedMessage;
+		}
+
+		/**
+		 * The message that will be displayed as the tooltip when player is paused during switching process
+		 * @param value
+		 *
+		 */
+		public function set switchPausedMessage(value:String):void
+		{
+			_switchPausedMessage = value;
+		}
+
+
+		/**
+		 * On mouse rollover remove redundant listeners
+		 * @param event
+		 *
+		 */
+		protected function onCBRollover(event:MouseEvent):void {
+			_dropdownTimer.removeEventListener( TimerEvent.TIMER, hideDropdown );
+		}
+
+		/**
+		 * Wait DROPDOWN_TIMER_DELAY milliseconds and close the dropdown
+		 * @param event
+		 *
+		 */
+		protected function onCBRollout(event:MouseEvent):void {
+			_dropdownTimer.addEventListener( TimerEvent.TIMER, hideDropdown, false, 0, true );
+			_dropdownTimer.reset();
+			_dropdownTimer.start();
+		}
+
+		private function onDropdownRollover(event:MouseEvent):void {
+			_isOnDropdown = true;
+		}
+
+		private function onDropdownRollout(event:MouseEvent):void {
+			_isOnDropdown = false;
+		}
+
+		/**
+		 *  Handler for the TimerEvent indicating that the _dropdownTimer has finished counting down, and that the dropdown
+		 * needs to be closed.
+		 * @param evt - TimerEvent
+		 *
+		 */
+		public function hideDropdown( evt:TimerEvent=null ):void
+		{
+			_dropdownTimer.removeEventListener( TimerEvent.TIMER, hideDropdown );
+			_dropdownTimer.reset();
+			//close the dropdown only if we are not on the combo box or its dropdown
+			if (!_isOnDropdown) {
+				close();
+			}
+
+
+		}
+
+
+		private function flavorLabelFunction (data : Object) : String
+		{
+			var labelLength : int = data.label.length-this.bitratePostFix.length;
+			var preferedFlavorBitrate : int = parseInt(String(data.label).substr(0,labelLength));
+			if(data == this.selectedItem && !kisOpen){
+				if (!_flavorArray || !_flavorArray.length)
+				{
+					return "";
+				}
+				else if(isDynamic())
+				{
+					if (isAutoSwitch)
+					{
+						return autoString;
+					}
+				}
+
+				/*if (usePixels)
+				{
+				var labelArr:Array = (data.label as String).split(" ");
+				if (labelArr.length == 2)
+				{
+				return labelArr[0] + "\n" + labelArr[1] //prefix, new line, pixels
+				}
+				}
+				return data.label;*/
+			}
+			return data.label;
+		}
+
+
+		/////////////////////////////////////////////////////////////////
+		/////////////////////PUBLIC METHODS//////////////////////////////
+		/////////////////////////////////////////////////////////////////
+
+		override public function initialize():void
+		{
+			if (_isRtmp)
+			{
+				this.selectedMessage = autoMessage;
+			}
+
+			else if (this.selectedItem)
+			{
+				this.selectedMessage = this.selectedItem.label;
+			}
+
+			_dropdownTimer = new Timer( DROPDOWN_TIMER_DELAY );
+		}
+
+		/**
+		 * Getter function for the data provider of the ComboBox
+		 * @return - Array which is the data provuder of the Combo Box.
+		 *
+		 */
+		public function get flavorDataProvider():Array
+		{
+			return _flavorArray;
+		}
+
+		[Bindable]
+		/**
+		 * Setter function for the data provider of the Combo Box
+		 * @param arr
+		 *
+		 */
+		public function set flavorDataProvider(arr:Array):void
+		{
+			if(_flavorArray == arr) return;
+
+			_flavorArray = arr;
+
+			var newDPArray:Array = new Array();
+
+			if(_flavorArray && _flavorArray.length)
+			{
+				var sortedFlavorArray:Array = (_flavorArray.concat());
+				//descending sort of flavors according to bitrate
+				sortedFlavorArray.sortOn("bitrate", Array.NUMERIC | Array.DESCENDING);
+				var usedPixelsArr:Array;
+				// will be true if "SD Low" label was already added to flavors list
+				var usedLowHeight:Boolean = false;
+				if (usePixels)
+				{
+					//this array indicates if we already inserted the corresponding height to the data provider
+					usedPixelsArr = new Array();
+					for (var k:int = 0; k < HEIGHT_ARRAY.length; k++)
+					{
+						usedPixelsArr.push(false);
+					}
+				}
+
+				for(var i:int=0; i<sortedFlavorArray.length; i++)
+				{
+					var label:String;
+					//find proper prefix according to BR
+					var roundedBitrate : Number = (Math.round(Number(sortedFlavorArray[i].bitrate)/100))*100;
+					var heightIndex:int = -1;
+					if (usePixels)
+					{
+						//find closest pixels value:
+						var height: int = sortedFlavorArray[i].height;
+
+						for (var j:int = 0; j < HEIGHT_ARRAY.length; j++)
+						{
+							if (height == HEIGHT_ARRAY[j])
+							{
+								heightIndex = j;
+								break;
+							}
+							if (HEIGHT_ARRAY[j]>height)
+							{
+								if (j==0)
+								{
+									heightIndex = -1;
+									break;
+								}
+								if ((height - HEIGHT_ARRAY[j-1]) > (HEIGHT_ARRAY[j] - height))
+									heightIndex = j;
+								else
+									heightIndex = j-1;
+
+								break;
+							}
+							else if (j==HEIGHT_ARRAY.length-1)
+							{
+								heightIndex = j;
+							}
+						}
+
+						if (heightIndex == -1)
+						{
+							label = lowHeight;
+							//if we already inserted the "SD Low" label, don't insert another one
+							if (usedLowHeight)
+								continue;
+
+							usedLowHeight = true;
+						}
+						else
+						{
+							label = HEIGHT_ARRAY[heightIndex] + pixelsPostFix;
+							//if we already inserted such height, it was with heighest bitrate (the array is sorted), so we won't insert this value too
+							if (usedPixelsArr[heightIndex])
+								continue;
+
+							usedPixelsArr[heightIndex] = true;
+						}
+						var prefix:String = (sortedFlavorArray[i].height > HD_LIMIT) ? hdPrefix : sdPrefix;
+						label = prefix + label;
+					}
+					else
+					{
+						label = roundedBitrate + bitratePostFix;
+					}
+
+					newDPArray.push( { label: label, value: height, bitrate: roundedBitrate} );
+				}
+
+				if(isDynamic() )
+					newDPArray.push({label : isAutoSwitch ? adaptiveAuto : adaptiveOff, value: -2, bitrate: -2});
+
+				if (usePixels)
+					newDPArray.sortOn("value", Array.NUMERIC | Array.DESCENDING);
+			}
+			else
+			{
+				return;
+			}
+
+			super.dataProvider = new DataProvider(newDPArray);
+			dispatchEvent( new Event( DATA_PROVIDER_CHANGE ) );
+
+			this.selectedIndex = dataProvider.length - 1;
+			if (_preferedFlavorBR)
+			{
+				setSelectedItem(_preferedFlavorBR);
+			}
+		}
+		/**
+		 * Getter function for the _preferedFlavorBR property.
+		 * @return
+		 *
+		 */
+		public function get preferedFlavorBR() : int { return _preferedFlavorBR; }
+
+		[Bindable]
+		/**
+		 * Setter function for the _preferedFlavorBR property.
+		 * @param preferedFlavor - the value to set into the the _preferedFlavorBR property.
+		 *
+		 */
+		public function set preferedFlavorBR( preferedFlavor : int ) : void
+		{
+			if(!dataProvider || !dataProvider.length || (preferedFlavor == _preferedFlavorBR))
+				return;
+
+			_preferedFlavorBR = (Math.round(Number(preferedFlavor)/100))*100;
+			setSelectedItem(_preferedFlavorBR);
+		}
+
+		/**
+		 * finds the item with the same bitrate and set it as the selected item
+		 * @param bitrate
+		 *
+		 */
+		private function setSelectedItem(bitrate:int):void
+		{
+			var item:Object = getItemByBitrate(bitrate);
+			if (item)
+			{
+				this.selectedItem = item;
+			}
+		}
+		/**
+		 * Getter function for the _streamerType property.
+		 * @return the value of property _streamerType.
+		 *
+		 */
+		public function get streamerType() : String { return _streamerType; }
+
+		[Bindable]
+		/**
+		 * Setter function for the _streamerType property.
+		 * @param value
+		 *
+		 */
+		public function set streamerType( value : String ) :  void
+		{
+			_streamerType = value;
+			//we check if this is RTMP so we need to add the auto mode
+			_isRtmp = (_streamerType == StreamerType.RTMP || _streamerType == StreamerType.LIVE) ? true : false;
+			_isHttpStreaming = (_streamerType == StreamerType.HDNETWORK || _streamerType == StreamerType.HDNETWORK_HDS || _streamerType == StreamerType.HDS) ;
+		}
+		/**
+		 *
+		 * @return
+		 *
+		 */
+		public function get hdOn () : String { return _hdOn; }
+
+		[Bindable]
+		/**
+		 * Setter function for the _hdOn property.
+		 * @param value
+		 *
+		 */
+		public function set hdOn ( hdOnMsg : String) : void
+		{
+			_hdOn = hdOnMsg;
+		}
+
+		public function get hdOff () : String { return _hdOff; }
+
+		[Bindable]
+		/**
+		 * Setter function for the _hdOff property.
+		 * @param value
+		 *
+		 */
+		public function set hdOff ( hdOffMsg : String ) : void
+		{
+			_hdOff = hdOffMsg;
+		}
+
+		public function get selectedMessage () : String{ return _selectedMessage; }
+
+		[Bindable]
+
+		public function set selectedMessage (newMsg : String) : void
+		{
+			_selectedMessage = newMsg;
+		}
+
+		public function get autoMessage () : String{ return _autoMessage; }
+
+		[Bindable]
+		public function set autoMessage (newMsg : String) : void
+		{
+			_autoMessage = newMsg;
+		}
+
+		public function get autoString () : String{ return _autoString; }
+
+		[Bindable]
+		public function set autoString (newMsg : String) : void
+		{
+			_autoString = newMsg;
+			if(isDynamic())
+			{
+				this.dataProvider.getItemAt(0).label = _autoString;
+			}
+		}
+		[Bindable]
+		public function set notVisible (arg:Boolean) :void
+		{
+			visible = !arg;
+		}
+		public function get notVisible () : Boolean
+		{
+			return !visible;
+		}
+
+		/**
+		 *The string for the message shown when the switch between bitrates is in process.
+		 */
+		public function get switchingMessage():String
+		{
+			return _switchingMessage;
+		}
+
+		/**
+		 * @private
+		 */
+		public function set switchingMessage(value:String):void
+		{
+			_switchingMessage = value;
+		}
+
+		public function determineEnabled (isSwitching:Boolean = false) : void
+		{
+			if (!this._flavorArray || !this._flavorArray.length || isSwitching)
+			{
+				this.enabled = false;
+			}
+			else
+			{
+				this.enabled = true;
+
+				if (isDynamic())
+				{
+					this.selectedMessage = autoMessage;
+				}
+				else if (preferedFlavorBR != -1)
+				{
+					this.selectedMessage = this.selectedItem.label;
+				}
+			}
+		}
+
+		/**
+		 * return the suitable item from the data provider, according to the given bitrate
+		 * Saves the found index as "lastSelectedIndex"
+		 * @param bitrate
+		 * @return
+		 *
+		 */
+		public function getItemByBitrate(bitrate:int):Object
+		{
+			if(!dataProvider || !dataProvider.length)
+				return null;
+
+			//if we are in pixels mode represents the desired height
+			var preferedHeight:int = -1;
+			if (usePixels)
+			{
+				//find the matching height of this flavor
+				for (var j:int = 0; j< _flavorArray.length; j++)
+				{
+					if ((Math.round(Number(_flavorArray[j].bitrate)/100) * 100) == bitrate)
+					{
+						preferedHeight = _flavorArray[j].height;
+						break;
+					}
+				}
+			}
+
+			for(var i:int=0; i<dataProvider.length; i++)
+			{
+				if (usePixels)
+				{
+					if (dataProvider.getItemAt(i).value == preferedHeight)
+					{
+						lastSelectedIndex = i;
+						return dataProvider.getItemAt(i);
+					}
+
+				}
+				else if(dataProvider.getItemAt(i).bitrate == bitrate)
+				{
+					lastSelectedIndex = i;
+					return dataProvider.getItemAt(i);
+				}
+			}
+
+			return null;
+		}
+
+		private function isDynamic():Boolean
+		{
+			return (_isRtmp || _isHttpStreaming || (Facade.getInstance().retrieveProxy(MediaProxy.NAME) as MediaProxy).vo.forceDynamicStream)
+		}
+
+	}
 }


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

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


Allow subclasses to choose not to call handleFrame() when
ADDED_TO_STAGE is received.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@253 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/FrameSprite.as
+++ src/as/com/threerings/flash/FrameSprite.as
@@ -14,8 +14,14 @@
  */
 public class FrameSprite extends Sprite
 {
-    public function FrameSprite ()
+    /**
+     * @param renderFrameUponAdding if true, the handleFrame() method
+     *        is called whenever an ADDED_TO_STAGE event is received.
+     */
+    public function FrameSprite (renderFrameUponAdding :Boolean = true)
     {
+        _renderOnAdd = renderFrameUponAdding;
+
         addEventListener(Event.ADDED_TO_STAGE, handleAdded);
         addEventListener(Event.REMOVED_FROM_STAGE, handleRemoved);
     }
@@ -26,7 +32,9 @@
     protected function handleAdded (... ignored) :void
     {
         addEventListener(Event.ENTER_FRAME, handleFrame);
-        handleFrame(); // update immediately
+        if (_renderOnAdd) {
+            handleFrame(); // update immediately
+        }
     }

     /**
@@ -44,6 +52,9 @@
     {
         // nothing here. Override in yor subclass.
     }
+
+    /** Should we call handleFrame() when we get ADDED_TO_STAGE? */
+    protected var _renderOnAdd :Boolean;
 }

 }


Adding cast in test to keep FDT happy.

Adding cast in test to keep FDT happy.

--- test/src/org/postgresql/pegasus/functional/ConnectedTestBase.as
+++ test/src/org/postgresql/pegasus/functional/ConnectedTestBase.as
@@ -1,4 +1,5 @@
 package org.postgresql.pegasus.functional {
+    import flash.events.IEventDispatcher;
     import org.flexunit.async.Async;
     import org.postgresql.db.ConnectionFactory;
     import org.postgresql.db.IConnection;
@@ -18,7 +19,7 @@
             LOGGER.debug("Creating connection.");
             connection = new ConnectionFactory().createConnection(Credentials.url, Credentials.user, Credentials.password);
             // TODO: register failure event on Connection error
-            Async.proceedOnEvent(this, connection, ConnectionEvent.CONNECTED);
+            Async.proceedOnEvent(this, IEventDispatcher(connection), ConnectionEvent.CONNECTED);
             LOGGER.debug("Created");
         }