Transferred from the Adobe Open Source Subversion Repository

Revision: 2600
Author:   gosmith@adobe.com
Date:     2008-07-23T23:39:38.725848Z

Log Message:
-----------
The text attributes on a TextFlow used as the content of a TextGraphic or TextView are now applied after those on the TextGraphic or TextView.

Reviewer: Deepa
Bugs: MXMLG-203
QA: We should have a compile-time test case for this.
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -21,6 +21,9 @@

 import text.importExport.TextFilter;
 import text.model.FlowElement;
+import text.model.ICharacterAttributes;
+import text.model.IContainerAttributes;
+import text.model.IParagraphAttributes;
 import text.model.Paragraph;
 import text.model.Span;
 import text.model.TextFlow;
@@ -689,33 +692,67 @@
  		contentChanged = false;
 		textChanged = false;

-        textFlow.blockProgression = blockProgression;
-        textFlow.color = color;
-        textFlow.direction = direction;
-		textFlow.fontFamily = fontFamily;
-		textFlow.fontSize = fontSize;
-		textFlow.fontStyle = fontStyle;
-		textFlow.fontWeight = fontWeight;
-		textFlow.kerning = kerning;
-		textFlow.lineHeight = lineHeight;
-		textFlow.lineBreak = lineBreak;
-		textFlow.lineThrough = lineThrough;
-		textFlow.marginBottom = marginBottom;
-		textFlow.marginLeft = marginLeft;
-		textFlow.marginRight = marginRight;
-		textFlow.marginTop = marginTop;
-		textFlow.paddingBottom = paddingBottom;
-		textFlow.paddingLeft = paddingLeft;
-		textFlow.paddingRight = paddingRight;
-		textFlow.paddingTop = paddingTop;
-		textFlow.textAlign = textAlign;
-		textFlow.textAlignLast = textAlignLast;
-		textFlow.textAlpha = textAlpha;
-		textFlow.textDecoration = textDecoration;
-		textFlow.textIndent = textIndent;
-		textFlow.trackingRight = tracking; // what about trackingLeft?
-		textFlow.verticalAlign = verticalAlign;
-		textFlow.whitespaceCollapse = whiteSpaceCollapse; // different case
+        var containerAttributes:IContainerAttributes =
+            textFlow.containerAttributes;
+        var paragraphAttributes:IParagraphAttributes =
+            textFlow.paragraphAttributes;
+        var characterAttributes:ICharacterAttributes =
+            textFlow.characterAttributes;
+
+        if (!containerAttributes || containerAttributes.blockProgression == null)
+            textFlow.blockProgression = blockProgression;
+        if (!characterAttributes || characterAttributes.color == null)
+            textFlow.color = color;
+        if (!paragraphAttributes || paragraphAttributes.direction == null)
+            textFlow.direction = direction;
+		if (!characterAttributes || characterAttributes.fontFamily == null)
+            textFlow.fontFamily = fontFamily;
+		if (!characterAttributes || characterAttributes.fontSize == null)
+            textFlow.fontSize = fontSize;
+		if (!characterAttributes || characterAttributes.fontStyle == null)
+		    textFlow.fontStyle = fontStyle;
+		if (!characterAttributes || characterAttributes.fontWeight == null)
+		    textFlow.fontWeight = fontWeight;
+		if (!characterAttributes || characterAttributes.kerning == null)
+		    textFlow.kerning = kerning;
+		if (!characterAttributes || characterAttributes.lineHeight == null)
+		    textFlow.lineHeight = lineHeight;
+		if (!containerAttributes || containerAttributes.lineBreak == null)
+		    textFlow.lineBreak = lineBreak;
+		if (!characterAttributes || characterAttributes.lineThrough == null)
+		    textFlow.lineThrough = lineThrough;
+        if (!paragraphAttributes || paragraphAttributes.marginBottom == null)
+		    textFlow.marginBottom = marginBottom;
+        if (!paragraphAttributes || paragraphAttributes.marginLeft == null)
+		    textFlow.marginLeft = marginLeft;
+        if (!paragraphAttributes || paragraphAttributes.marginRight == null)
+		    textFlow.marginRight = marginRight;
+        if (!paragraphAttributes || paragraphAttributes.marginTop == null)
+		    textFlow.marginTop = marginTop;
+        if (!containerAttributes || containerAttributes.paddingBottom == null)
+		    textFlow.paddingBottom = paddingBottom;
+        if (!containerAttributes || containerAttributes.paddingLeft == null)
+		    textFlow.paddingLeft = paddingLeft;
+        if (!containerAttributes || containerAttributes.paddingRight == null)
+		    textFlow.paddingRight = paddingRight;
+        if (!containerAttributes || containerAttributes.paddingTop == null)
+		    textFlow.paddingTop = paddingTop;
+        if (!paragraphAttributes || paragraphAttributes.textAlign == null)
+		    textFlow.textAlign = textAlign;
+        if (!paragraphAttributes || paragraphAttributes.textAlignLast == null)
+		    textFlow.textAlignLast = textAlignLast;
+		if (!characterAttributes || characterAttributes.textAlpha == null)
+		    textFlow.textAlpha = textAlpha;
+		if (!characterAttributes || characterAttributes.textDecoration == null)
+		    textFlow.textDecoration = textDecoration;
+        if (!paragraphAttributes || paragraphAttributes.textIndent == null)
+		    textFlow.textIndent = textIndent;
+		if (!characterAttributes || characterAttributes.trackingRight == null)
+		    textFlow.trackingRight = tracking; // what about trackingLeft?
+        if (!containerAttributes || containerAttributes.verticalAlign == null)
+		    textFlow.verticalAlign = verticalAlign;
+		if (!characterAttributes || characterAttributes.whitespaceCollapse == null)
+		    textFlow.whitespaceCollapse = whiteSpaceCollapse; // different case

 		return textFlow;
 	}


FLEX-34213 - allow adjustment of maxDragRate (patch contributed by 'after24')

Replaced the private static const MAX_DRAG_RATE by the public static property maxDragRate. This allows the value to be manually set to > 30, smoothing the apparent performace of mobile lists.

Note: the patch suggested a default value of 90; I decided to keep the previous default of 30, in order to minimise the chance of side effects.
Signed-off-by: Erik de Bruin <c195b508e6f0c57aeafdb5e96947e2b79e6a4b40@ixsoftware.nl>

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -519,13 +519,6 @@

     /**
      *  @private
-     *  Maximum number of times per second we will change the scroll position
-     *  and update the display while dragging.
-     */
-    private static const MAX_DRAG_RATE:Number = 30;
-
-    /**
-     *  @private
      *  The name of the viewport's horizontal scroll position property
      */
     private static const HORIZONTAL_SCROLL_POSITION:String = "horizontalScrollPosition";
@@ -1352,8 +1345,39 @@
         }
     }

-
-
+	//----------------------------------
+	//  maxDragRate
+	//----------------------------------
+
+	private static var _maxDragRate:Number = 30;
+
+	[Inspectable(category="General", defaultValue="30")]
+
+	/**
+	 *
+	 *  Maximum number of times per second the scroll position
+	 *  and the display will be updated while dragging.
+	 *
+	 *  @default 30
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+
+	public static function get maxDragRate():Number
+	{
+		return _maxDragRate;
+	}
+
+	public static function set maxDragRate(value:Number):void
+	{
+		_maxDragRate = value;
+	}
+
+
+
     //--------------------------------------------------------------------------
     //
     // Methods
@@ -3328,7 +3352,7 @@
                         canScrollHorizontally,
                         canScrollVertically,
                         Math.round(minSlopInches * Capabilities.screenDPI),
-                        dragEventThinning ? MAX_DRAG_RATE : NaN);
+                        dragEventThinning ? _maxDragRate : NaN);
                     event.stopImmediatePropagation();
                 }
                 else
@@ -3381,7 +3405,7 @@
             canScrollHorizontally,
             canScrollVertically,
             Math.round(minSlopInches * Capabilities.screenDPI),
-            dragEventThinning ? MAX_DRAG_RATE : NaN);
+            dragEventThinning ? _maxDragRate : NaN);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5347
Author:   cframpto@adobe.com
Date:     2009-03-17T17:34:54.805989Z

Log Message:
-----------
1.  Implement autoSize in TextView (default=true), FxTextInput (defalt=false) and FxTextArea.as (default=false).  If linesBreaks are toFit, maxWidth and percentWidth can be used to control the width.  height, minHeight, maxHeight, percentHeight, width and minWidth are ignored.
2.  widthInChars changed to be width in ems (size of "M" in default font) even though the property hasn't been renamed yet. The default was changed from 20 to 15 for TextView, FxTextInput and FxTextArea.
3.  The heightInLines calculation was improved so it is much closer to what it would be if you actually measured the text.
4.  Removed showSelection/hideSelection from focusIn/Out handlers since they were no longer needed.  We've implemented the various selection formats now.

This will break a few mustella tests.

QE Notes: sent Peter D. notes on how autoSize works
Doc Notes:
Bugs: SDK-19110, SDK-19034, SDK-19395, SDK-16359
Reviewers: Gordon and some testing by Peter D.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>

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

--- frameworks/projects/spark/src/spark/components/TextArea.as
+++ frameworks/projects/spark/src/spark/components/TextArea.as
@@ -350,7 +350,7 @@
 	/**
 	 *  @private
 	 */
-	private var _widthInChars:Number = 20;
+	private var _widthInChars:Number = 15;

 	/**
 	 *  @private
@@ -456,6 +456,7 @@
 			// that change.
 			textView.heightInLines = 10;
 			textView.multiline = true;
+            textView.autoSize = false;

             textView.addEventListener("textInvalid",
 									  textView_textInvalidHandler);


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

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

 package mx.controls.advancedDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22057
Author:   cframpto@adobe.com
Date:     2011-08-17T19:23:31.306738Z

Log Message:
-----------
Last batch of ASdoc edits for StageText.

QE notes:
Doc notes: Matt review TextArea/TextInput/SkinnableTextBase and StyleableStageText particularly the intros and the styles (had to change the format again).
Bugs: SDK-31078, SDK-31205, SDK-31109, SDK-31015
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -1360,7 +1360,7 @@
      *  spark.components.RichEditableText.text

      *
      *
For the Mobile theme, see
-     *  spark.components.supportClasses.StyleableStageText.text

+     *  spark.components.supportClasses.StyleableStageText#text

      *
      *  @see spark.components.RichEditableText#text
      *  @see spark.components.supportClasses.StyleableStageText#text


Transferred from the Adobe Open Source Subversion Repository

Revision: 18888
Author:   jasonsj@adobe.com
Date:     2010-12-01T03:06:49.588124Z

Log Message:
-----------
Broke the build. Removing uncommitted StyleableTextField changes.

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

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as
@@ -455,8 +455,8 @@
 		{
 			// commit styles to get an accurate measurement
 			StyleableTextField(element).commitStyles();
-
-            return StyleableTextField(element).measuredTextSize.x;
+
+			return StyleableTextField(element).measuredWidth;
 		}
 		else
 		{
@@ -495,7 +495,7 @@
 			// commit styles to get an accurate measurement
 			StyleableTextField(element).commitStyles();

-			return StyleableTextField(element).measuredTextSize.y;
+			return StyleableTextField(element).measuredHeight;
 		}
 		else
 		{


Transferred from the Adobe Open Source Subversion Repository

Revision: 18561
Author:   klin@adobe.com
Date:     2010-11-12T19:56:05.261580Z

Log Message:
-----------
Add down state to IGridItemRenderer. Added down state support in GridColumnHeaderGroup for UI feedback. Also, fixed various bugs relating to the header renderers.

IGridItemRenderer.as, GridItemRenderer.as, TextFieldGridItemRendererInclude.as
-Add down property

DefaultGridColumnHeaderRenderer.mxml (Both spark and wireframe)
-Add back missing showTruncationTip property.
-Modified the states to be GridItemRenderer states. This gives us the UI feedback like a Button
-Only include the sort indicator in the layout when its visible so that the sort indicator doesn’t overlap the header text.

GridColumnHeaderGroup.as
-Added downColumnIndex, hoverColumnIndex to support the header renderer states. I modified the mouse handlers to handle these cases.

GridColumnHeaderGroupLayout.as
-Added initalizeItemRenderer to set the properties on the header renderers using the down/hoverColumnIndex from GCHG.
-Fixed a bug in getHeaderIndex() so that we return the correct header if the x is past the end of the grid but still over the vertical scroll bar.

QE notes: No
Doc notes: No
Bugs: SDK-28299, SDK-28431, SDK-28442, SDK-28450
Reviewer: Hans
Tests run: cyclone, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultGridHeaderRenderer.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
+++ frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
@@ -68,14 +68,12 @@
      */
     private var enableValidateNow:Boolean = true;

-
     /**
      *  @private
      *  Used to prevent changes to width,height caused by calling setLayoutBoundsSize()
      *  from updating explicitWidth,Height.
      */
     private var inSetLayoutBoundsSize:Boolean = false;
-

     //--------------------------------------------------------------------------
     //
@@ -157,6 +155,39 @@
             dispatchEvent(new FlexEvent(eventType));
     }

+    //----------------------------------
+    //  down
+    //----------------------------------
+
+    private var _down:Boolean = false;
+
+    [Bindable("downChanged")]
+
+    /**
+     *  @inheritDoc
+     *
+     *
The Grid's updateDisplayList() method sets this property
+     *  before calling prepare()
.
+     *
+     *  @default false
+     */
+    public function get down():Boolean
+    {
+        return _down;
+    }
+
+    /**
+     *  @private
+     */
+    public function set down(value:Boolean):void
+    {
+        if (_down == value)
+            return;
+
+        _down = value;
+        dispatchChangeEvent("downChanged");
+    }
+
     //----------------------------------
     //  hovered
     //----------------------------------
@@ -265,7 +296,7 @@
      *  @inheritDoc
      *
      *
The Grid's updateDisplayList() method sets this property
-     *  before calling preprare()
.
+     *  before calling prepare()
.
      *
      *  @default false
      */
@@ -800,7 +831,6 @@
         inSetLayoutBoundsSize = false;
     }

-
     /**
      *  @private
      */
@@ -852,7 +882,6 @@
                                     invalidateLayout:Boolean = true):void
     {
     }
-

     //--------------------------------------------------------------------------
     //
@@ -1009,7 +1038,6 @@
             nonInheritChain;
     }

-
     /**
      *  @private
      */
@@ -1061,7 +1089,6 @@
     {
         _styleDeclaration = value;
     }
-

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


dispatch error in case hls.stage is not set related to https://github.com/mangui/flashls/issues/127

--- src/org/mangui/hls/stream/FragmentLoader.as
+++ src/org/mangui/hls/stream/FragmentLoader.as
@@ -466,7 +466,17 @@
                     Log.debug("MPEG2-TS found");
                 }
                 fragData.video_expected = true;
-                return new TSDemuxer(_hls.stage, _fragParsingAudioSelectionHandler, _fragParsingProgressHandler, _fragParsingCompleteHandler, _fragParsingVideoMetadataHandler);
+                if (_hls.stage) {
+                    return new TSDemuxer(_hls.stage, _fragParsingAudioSelectionHandler, _fragParsingProgressHandler, _fragParsingCompleteHandler, _fragParsingVideoMetadataHandler);
+                } else {
+                    var err : String = "hls.stage not set, cannot parse TS data !!!";
+                    CONFIG::LOGGING {
+                        Log.error(err);
+                    }
+                    var hlsError : HLSError = new HLSError(HLSError.OTHER_ERROR, _frag_current.url, err);
+                    _hls.dispatchEvent(new HLSEvent(HLSEvent.ERROR, hlsError));
+                    return null;
+                }
             } else {
                 CONFIG::LOGGING {
                     Log.debug("probe fails");


OFC-528 User with role DATA_ENTRY can edit records in phase 2 and 3. He can even reject the record\!\!\!

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/CodeInputFieldPresenter.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/CodeInputFieldPresenter.as
@@ -93,7 +93,7 @@
 			}
 			PopUpManager.addPopUp(_popUp, FlexGlobals.topLevelApplication as DisplayObject, true);
 			PopUpManager.centerPopUp(_popUp);
-			_popUp.editable = Application.activeRecord.step != CollectRecord$Step.ANALYSIS;
+			_popUp.editable = Application.activeRecordEditable;
 			_popUp.multiple = _view.attributeDefinition.multiple;
 			_popUp.maxSpecified = _view.attributeDefinition.maxCount;
 			_popUp.title = _view.attributeDefinition.getLabelText();


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Normalize parameter names to allow hyphen/underscore-style.

--- src/goplayer/ConfigurationParser.as
+++ src/goplayer/ConfigurationParser.as
@@ -7,36 +7,62 @@
     public static const DEFAULT_SKIN_URL : String = "goplayer-skin.swf"
     public static const DEFAULT_TRACKER_ID : String = "global"

+    public static const VALID_PARAMETERS : Array = [
+      "api", "tracker", "skin", "movie", "bitrate",
+      "enablertmp", "enableautoplay", "enablelooping",
+      "enablechrome", "enableupperpanel" ]
+
     private const result : Configuration = new Configuration

     private var parameters : Object
+    private var originalParameterNames : Object

-    public function ConfigurationParser(parameters : Object)
-    { this.parameters = parameters }
+    public function ConfigurationParser
+      (parameters : Object, originalParameterNames : Object)
+    {
+      this.parameters = parameters
+      this.originalParameterNames = originalParameterNames
+    }

     public function execute() : void
     {
       result.apiURL = getString("api", DEFAULT_API_URL)
+      result.trackerID = getString("tracker", DEFAULT_TRACKER_ID)
       result.skinURL = getString("skin", DEFAULT_SKIN_URL)
       result.movieID = getString("movie", null)
-      result.trackerID = getString("tracker", DEFAULT_TRACKER_ID)
       result.bitratePolicy = getBitratePolicy("bitrate", BitratePolicy.BEST)
-      result.enableRTMP = getBoolean("enableRtmp", true)
-      result.enableAutoplay = getBoolean("enableAutoplay", false)
-      result.enableLooping = getBoolean("enableLooping", false)
-      result.enableChrome = getBoolean("enableChrome", true)
-      result.enableUpperPanel = getBoolean("enableUpperPanel", true)
+      result.enableRTMP = getBoolean("enablertmp", true)
+      result.enableAutoplay = getBoolean("enableautoplay", false)
+      result.enableLooping = getBoolean("enablelooping", false)
+      result.enableChrome = getBoolean("enablechrome", true)
+      result.enableUpperPanel = getBoolean("enableupperpanel", true)
     }

     public static function parse(parameters : Object) : Configuration
     {
-      const parser : ConfigurationParser
-        = new ConfigurationParser(parameters)
+      const normalizedParameters : Object = {}
+      const originalParameterNames : Object = {}
+
+      for (var name : String in parameters)
+        if (VALID_PARAMETERS.indexOf(normalize(name)) == -1)
+          reportUnknownParameter(name)
+        else
+          normalizedParameters[normalize(name)] = parameters[name],
+            originalParameterNames[normalize(name)] = name
+
+      const parser : ConfigurationParser = new ConfigurationParser
+        (normalizedParameters, originalParameterNames)

       parser.execute()

       return parser.result
     }
+
+    private static function normalize(name : String) : String
+    { return name.toLowerCase().replace(/[^a-z]/g, "") }
+
+    private static function reportUnknownParameter(name : String) : void
+    { debug("Error: Unknown parameter: " + name) }

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

@@ -60,6 +86,7 @@
       catch (error : Error)
         {
           reportInvalidParameter(name, value, ["true", "false"])
+
           return fallback
         }

@@ -96,6 +123,7 @@
       catch (error : Error)
         {
           reportInvalidParameter(name, value, BITRATE_POLICY_VALUES)
+
           return fallback
         }

@@ -124,7 +152,8 @@
     private function reportInvalidParameter
       (name : String, value : String, validValues : Array) : void
     {
-      debug("Error: Invalid parameter: “" + name + "=" + value + "”; " +
+      debug("Error: Invalid parameter: " +
+            "“" + originalParameterNames[name] + "=" + value + "”; " +
             getInvalidParameterHint(validValues) + ".")
     }


Rename each boolean parameter to enableFoo.

--- src/goplayer/ConfigurationParser.as
+++ src/goplayer/ConfigurationParser.as
@@ -18,11 +18,11 @@
       result.movieID = parameters.movieId
       result.trackerID = parameters.trackerId || "global"
       result.bitratePolicy = getBitratePolicy("bitrate", BitratePolicy.BEST)
-      result.enableRTMP = getBoolean("rtmp", true)
-      result.enableAutoplay = getBoolean("autoplay", false)
-      result.enableLooping = getBoolean("loop", false)
-      result.enableChrome = getBoolean("chrome", true)
-      result.enableUpperPanel = getBoolean("upperPanel", true)
+      result.enableRTMP = getBoolean("enableRtmp", true)
+      result.enableAutoplay = getBoolean("enableAutoplay", false)
+      result.enableLooping = getBoolean("enableLooping", false)
+      result.enableChrome = getBoolean("enableChrome", true)
+      result.enableUpperPanel = getBoolean("enableUpperPanel", true)
     }

     public static function parse(parameters : Object) : Configuration


Transferred from the Adobe Open Source Subversion Repository

Revision: 17130
Author:   jasonsj@adobe.com
Date:     2010-07-30T00:55:05.428457Z

Log Message:
-----------
- Fix null-ing out of ActionBar titleContent
- PARB API changes for ActionBar layout properties

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
@@ -1,5 +1,7 @@
 package spark.components
 {
+import flash.events.Event;
+
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
 import mx.utils.BitFlagUtil;
@@ -21,6 +23,18 @@
  *  @productversion Flex 4.5
  */
 [Style(name="backgroundAlpha", type="Number", inherit="no")]
+
+//--------------------------------------
+//  Skin states
+//--------------------------------------
+
+/*
+* Skin states to support ViewNavigator
+*/
+[SkinState("portrait")]
+[SkinState("landscape")]
+[SkinState("portraitAndOverlay")]
+[SkinState("landscapeAndOverlay")]

 /**
  *  @langversion 3.0
@@ -89,6 +103,7 @@
     public function ActionBar()
     {
         super();
+        _titleChanged = false;
     }

     //--------------------------------------------------------------------------
@@ -134,16 +149,6 @@
      *  @productversion Flex 4.5
      */
     public var actionGroup:Group;
-
-    [SkinPart(required="false")]
-
-    /**
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public var backButton:ButtonBase;

     [SkinPart(required="false")]

@@ -161,37 +166,6 @@
     public var titleDisplay:Label; // TODO fix after Text spec is drafted

     //----------------------------------
-    //  backButtonLabel
-    //----------------------------------
-
-    private var _backButtonLabel:String;
-
-    /**
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get backButtonLabel():String
-    {
-        return _backButtonLabel;
-    }
-
-    /**
-     * @private
-     */
-    public function set backButtonLabel(value:String):void
-    {
-        if (value == _backButtonLabel)
-            return;
-
-        _backButtonLabel = value;
-
-        if (backButton)
-            backButton.label = value;
-    }
-
-    //----------------------------------
     //  title
     //----------------------------------

@@ -265,7 +239,7 @@
     }

     //----------------------------------
-    //  navigationGroupLayout
+    //  navigationLayout
     //----------------------------------

     /**
@@ -278,7 +252,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function get navigationGroupLayout():LayoutBase
+    public function get navigationLayout():LayoutBase
     {
         return (navigationGroup) ? navigationGroup.layout : contentGroupProperties[NAVIGATION_GROUP_PROPERTIES_INDEX].layout;
     }
@@ -286,7 +260,7 @@
     /**
      *  @private
      */
-    public function set navigationGroupLayout(value:LayoutBase):void
+    public function set navigationLayout(value:LayoutBase):void
     {
         if (navigationGroup)
         {
@@ -314,9 +288,16 @@
     public function get titleContent():Array
     {
         if (titleGroup)
-            return titleGroup.getMXMLContent();
-        else
-            return contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX].content
+        {
+            if (BitFlagUtil.isSet(contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX], CONTENT_PROPERTY_FLAG))
+                return titleGroup.getMXMLContent();
+            else
+                return null;
+        }
+        else
+        {
+            return contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX].content;
+        }
     }

     /**
@@ -326,6 +307,8 @@
     {
         if (titleGroup)
         {
+            _titleChanged = true;
+
             if (value)
             {
                 titleGroup.mxmlContent = value;
@@ -333,7 +316,6 @@
             else
             {
                 titleGroup.mxmlContent = titleDisplay ? [titleDisplay] : null;
-                _titleChanged = true;
                 invalidateProperties();
             }

@@ -342,13 +324,15 @@
                     CONTENT_PROPERTY_FLAG, value != null);
         }
         else
+        {
             contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX].content = value;
+        }

         invalidateSkinState();
     }

     //----------------------------------
-    //  titleGroupLayout
+    //  titleLayout
     //----------------------------------

     /**
@@ -361,7 +345,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function get titleGroupLayout():LayoutBase
+    public function get titleLayout():LayoutBase
     {
         return (titleGroup) ? titleGroup.layout : contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX].layout;
     }
@@ -369,7 +353,7 @@
     /**
      *  @private
      */
-    public function set titleGroupLayout(value:LayoutBase):void
+    public function set titleLayout(value:LayoutBase):void
     {
         if (titleGroup)
         {
@@ -421,7 +405,7 @@
     }

     //----------------------------------
-    //  actionGroupLayout
+    //  actionLayout
     //----------------------------------

     /**
@@ -434,7 +418,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function get actionGroupLayout():LayoutBase
+    public function get actionLayout():LayoutBase
     {
         return (actionGroup) ? actionGroup.layout : contentGroupProperties[ACTION_GROUP_PROPERTIES_INDEX].layout;
     }
@@ -442,7 +426,7 @@
     /**
      *  @private
      */
-    public function set actionGroupLayout(value:LayoutBase):void
+    public function set actionLayout(value:LayoutBase):void
     {
         if (actionGroup)
         {
@@ -479,7 +463,7 @@
     {
         super.partAdded(partName, instance);

-        var defaultContent:IVisualElement;
+        var defaultContent:Array; /*IVisualElement*/
         var group:Group;
         var index:int = -1;

@@ -492,7 +476,15 @@
         {
             group = titleGroup;
             index = TITLE_GROUP_PROPERTIES_INDEX;
-            defaultContent = titleDisplay;
+
+            // use titleContent if provided
+            defaultContent = contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX].content;
+
+            // if no titleContent, use titleDisplay
+            if (defaultContent == null)
+            {
+                defaultContent = (titleDisplay) ? [titleDisplay] : null;
+            }

             _titleChanged = true;
         }
@@ -504,6 +496,11 @@
         else if (instance == titleDisplay)
         {
             titleDisplay.text = title;
+
+			if (titleGroup && !titleContent)
+			{
+				titleGroup.mxmlContent = [titleDisplay];
+			}
         }

         if (index > -1)
@@ -526,7 +523,7 @@

             if (defaultContent)
             {
-                group.mxmlContent = [defaultContent];
+                group.mxmlContent = defaultContent;
             }

             contentGroupProperties[index] = newContentGroupProperties;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 9996
Author:   hmuller@adobe.com
Date:     2009-09-03T18:34:55.050478Z

Log Message:
-----------
Range/nearestValidValue() now temporarily scales its values if
interval is non-integral to avoid floating point approximation
problems.

QE Notes: Cyclone passed
Doc Notes:
Bugs: sdk-22618
Reviewer: Jason

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/Range.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Range.as
@@ -395,25 +395,35 @@
     {
         if (interval == 0)
             return Math.max(minimum, Math.min(maximum, value));
-
-        var lower:Number = Math.max(minimum, Math.floor(value / interval) * interval);
-        var upper:Number = Math.min(maximum, Math.floor((value + interval) / interval) * interval);
-        var validValue:Number = ((value - lower) >= ((upper - lower) / 2)) ? upper : lower;
-
-        // If interval isn't an integer, there's a possibility that the
-        // floating point approximation of validValue will be slightly larger
-        // or smaller than what one would expect.  For example if value=6 and interval=0.1
-        // then validValue=0.6000000000000001.  This confuses code which converts Range
-        // values to/from strings, so we limit the number of significant decimals to the
-        // number present in interval.
+
+        var minValue:Number = minimum;
+        var maxValue:Number = maximum;
+        var scale:Number = 1;
+
+        // If interval isn't an integer, there's a possibility that the floating point
+        // approximation of value or value/interval will be slightly larger or smaller
+        // than the real value.  This can lead to errors in calculations like
+        // floor(value/interval)*interval, which one might expect to just equal value,
+        // when value is an exact multiple of interval.  Not so if value=0.58 and
+        // interval=0.01, in that case the calculation yields 0.57!  To avoid problems,
+        // we scale by the implicit precision of the interval and then round.  For
+        // example if interval=0.01, then we scale by 100.
+
         if (interval != Math.round(interval))
         {
-            var parts:Array = (new String(1 + interval)).split(".");
-            var scale:Number = Math.pow(10, parts[1].length);
-            validValue = Math.round(validValue * scale) / scale;
-        }
-
-        return validValue;
+            const parts:Array = (new String(1 + interval)).split(".");
+            scale = Math.pow(10, parts[1].length);
+            minValue *= scale;
+            maxValue *= scale;
+            value = Math.round(value * scale);
+            interval = Math.round(interval * scale);
+        }
+
+        var lower:Number = Math.max(minValue, Math.floor(value / interval) * interval);
+        var upper:Number = Math.min(maxValue, Math.floor((value + interval) / interval) * interval);
+        var validValue:Number = ((value - lower) >= ((upper - lower) / 2)) ? upper : lower;
+
+        return validValue / scale;
     }

     /**


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

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

 package spark.skins.spark
 {


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

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -0,0 +1,1007 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-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.managers
+{
+
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.Graphics;
+import flash.display.InteractiveObject;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import mx.automation.IAutomationObject;
+import mx.core.ApplicationGlobals;
+import mx.core.FlexSprite;
+import mx.core.IChildList;
+import mx.core.IFlexDisplayObject;
+import mx.core.IInvalidating;
+import mx.core.IUIComponent;
+import mx.core.UIComponentGlobals;
+import mx.core.mx_internal;
+import mx.effects.Blur;
+import mx.effects.IEffect;
+import mx.effects.Fade;
+import mx.events.EffectEvent;
+import mx.events.FlexEvent;
+import mx.events.FlexMouseEvent;
+import mx.styles.IStyleClient;
+import flash.display.Stage;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+/**
+ *  @private
+ *  The PopUpManager singleton class creates new top-level windows and
+ *  places or removes those windows from the layer on top of all other
+ *  visible windows.  See the SystemManager for a description of the layering.
+ *  It is used for popup dialogs, menus, and dropdowns in the ComboBox control
+ *  and in similar components.
+ *
+ *
The PopUpManager also provides modality, so that windows below the popup
+ *  cannot receive mouse events, and also provides an event if the user clicks
+ *  the mouse outside the window so the developer can choose to dismiss
+ *  the window or warn the user.

+ *
+ *  @see PopUpManagerChildList
+ */
+public class PopUpManagerImpl implements IPopUpManager
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static var instance:IPopUpManager;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public static function getInstance():IPopUpManager
+    {
+        if (!instance)
+            instance = new PopUpManagerImpl();
+
+        return instance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public function PopUpManagerImpl()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The class used to create the shield that makes a window appear modal.
+     */
+    mx_internal var modalWindowClass:Class;
+
+    /**
+     *  @private
+     *  An array of information about currently active popups
+     */
+    private var popupInfo:Array;
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Creates a top-level window and places it above other windows in the
+     *  z-order.
+     *  It is good practice to call the removePopUp() method
+     *  to remove popups created by using the createPopUp() method.
+     *
+     *  If the class implements IFocusManagerContainer, the window will have its
+     *  own FocusManager so that, if the user uses the TAB key to navigate between
+     *  controls, only the controls in the window will be accessed.
+     *
+     *
Example

+     *
+     *
pop = mx.managers.PopUpManager.createPopUp(pnl, TitleWindow, false);

+     *
+     *
Creates a popup window based on the TitleWindow class, using pnl as the MovieClip
+     *  for determining where to place the popup. It is defined to be a non-modal window
+     *  meaning that other windows can receive mouse events

+     *
+     *  @param parent DisplayObject to be used for determining which SystemManager's layers
+     *  to use and optionally the reference point for centering the new
+     *  top level window.  It may not be the actual parent of the popup as all popups
+     *  are parented by the SystemManager.
+     *
+     *  @param className Class of object that is to be created for the popup.
+     *  The class must implement IFlexDisplayObject.
+     *
+     *  @param modal If true, the window is modal which means that
+     *  the user will not be able to interact with other popups until the window
+     *  is removed.
+     *
+     *  @param childList The child list in which to add the popup.
+     *  One of PopUpManagerChildList.APPLICATION,
+     *  PopUpManagerChildList.POPUP,
+     *  or PopUpManagerChildList.PARENT (default).
+     *
+     *  @return Reference to new top-level window.
+     *
+     *  @see PopUpManagerChildList
+     */
+    public function createPopUp(parent:DisplayObject,
+                                className:Class,
+                                modal:Boolean = false,
+                                childList:String = null):IFlexDisplayObject
+    {
+        const window:IUIComponent = new className();
+        addPopUp(window, parent, modal, childList);
+        return window;
+    }
+
+    /**
+     *  Pops up a top-level window.
+     *  It is good practice to call removePopUp() to remove popups
+     *  created by using the createPopUp() method.
+     *  If the class implements IFocusManagerContainer, the window will have its
+     *  own FocusManager so that, if the user uses the TAB key to navigate between
+     *  controls, only the controls in the window will be accessed.
+     *
+     *
Example

+     *
+     *
var tw = new TitleWindow();
+     *    tw.title = "My Title";
+     *    mx.managers.PopUpManager.addPopUp(tw, pnl, false);

+     *
+     *
Creates a popup window using the tw instance of the
+     *  TitleWindow class and pnl as the Sprite for determining
+     *  where to place the popup.
+     *  It is defined to be a non-modal window.

+     *
+     *  @param window The IFlexDisplayObject to be popped up.
+     *
+     *  @param parent DisplayObject to be used for determining which SystemManager's layers
+     *  to use and optionally  the reference point for centering the new
+     *  top level window.  It may not be the actual parent of the popup as all popups
+     *  are parented by the SystemManager.
+     *
+     *  @param modal If true, the window is modal which means that
+     *  the user will not be able to interact with other popups until the window
+     *  is removed.
+     *
+     *  @param childList The child list in which to add the pop-up.
+     *  One of PopUpManagerChildList.APPLICATION,
+     *  PopUpManagerChildList.POPUP,
+     *  or PopUpManagerChildList.PARENT (default).
+     *
+     *  @see PopUpManagerChildList
+     */
+    public function addPopUp(window:IFlexDisplayObject,
+                             parent:DisplayObject,
+                             modal:Boolean = false,
+                             childList:String = null):void
+    {
+        // trace("POPUP: window is " + window);
+        // All popups go on the local root.
+        // trace("POPUP: root is " + parent.root);
+        // trace("POPUP: initial parent is " + parent);
+
+        const visibleFlag:Boolean = window.visible;
+
+        var localRoot:DisplayObjectContainer = DisplayObjectContainer(parent.root);
+
+        var sm:ISystemManager;
+        var children:IChildList;
+        var topMost:Boolean;
+
+        // If the parent isn't rooted yet,
+        // Or the root is the stage (which is the case in a second AIR window)
+        // use the global system manager instance.
+        if ((!localRoot || localRoot is Stage) && parent is IUIComponent)
+            localRoot = DisplayObjectContainer(IUIComponent(parent).systemManager);
+        if (localRoot is ISystemManager)
+        {
+            sm = ISystemManager(localRoot);
+            if (!sm.isTopLevel())
+                sm = sm.topLevelSystemManager;
+        }
+        else
+        {
+            //trace("error: popup root was not SystemManager");
+            return; // and maybe a nice error message
+        }
+
+        if (window is IUIComponent)
+            IUIComponent(window).isPopUp = true;
+
+        if (!childList || childList == PopUpManagerChildList.PARENT)
+            topMost = sm.popUpChildren.contains(parent);
+        else
+            topMost = (childList == PopUpManagerChildList.POPUP);
+
+        children = topMost ? sm.popUpChildren : sm;
+        children.addChild(DisplayObject(window));
+        window.visible = false;
+
+        if (!popupInfo)
+            popupInfo = [];
+
+        const o:PopUpData = new PopUpData();
+        o.owner = DisplayObject(window);
+        o.topMost = topMost;
+        popupInfo.push(o);
+
+        if (window is IFocusManagerContainer)
+        {
+            if (IFocusManagerContainer(window).focusManager)
+                sm.addFocusManager(IFocusManagerContainer(window));
+            else
+                // Popups get their own focus loop
+                IFocusManagerContainer(window).focusManager =
+                    new FocusManager(IFocusManagerContainer(window), true);
+        }
+
+        // force into automation hierarchy
+        if (window is IAutomationObject)
+            IAutomationObject(window).showInAutomationHierarchy = true;
+
+        if (window is ILayoutManagerClient )
+            UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient (window), true);
+
+        o.parent = parent;
+
+        if (window is IUIComponent)
+        {
+            IUIComponent(window).setActualSize(
+                IUIComponent(window).getExplicitOrMeasuredWidth(),
+                IUIComponent(window).getExplicitOrMeasuredHeight());
+        }
+
+        if (modal)
+        {
+            // create a modal window shield which blocks input and sets up mouseDownOutside logic
+            this.createModalWindow(parent, o, children, visibleFlag);
+        }
+        else
+        {
+            o._mouseDownOutsideHandler  = nonmodalMouseDownOutsideHandler;
+            o._mouseWheelOutsideHandler = nonmodalMouseWheelOutsideHandler;
+
+            sm.addEventListener(MouseEvent.MOUSE_DOWN,  o.mouseDownOutsideHandler);
+            sm.addEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
+
+            window.visible = visibleFlag;
+        }
+
+        // Listen for unload so we know to kill the window (and the modalWindow if modal)
+        // this handles _all_ cleanup
+        window.addEventListener(Event.REMOVED, popupRemovedHandler);
+
+        if (window is IFocusManagerContainer && visibleFlag)
+            sm.activate(IFocusManagerContainer(window));
+
+        // trace("END POPUP: addPopUp" + parent);
+    }
+
+    /**
+     *  Centers a popup window over whatever window was used in the call
+     *  to the createPopUp() or addPopUp() method.
+     *
+     *
Note that the position of the popup window may not
+     *  change immediately after this call since Flex may wait to measure and layout the
+     *  popup window before centering it.

+     *
+     *  @param The IFlexDisplayObject representing the popup.
+     */
+    public function centerPopUp(popUp:IFlexDisplayObject):void
+    {
+        if (popUp is IInvalidating)
+            IInvalidating(popUp).validateNow();
+
+        const o:PopUpData = findPopupInfoByOwner(popUp);
+        if (o && o.parent)
+        {
+            var pt:Point = new Point(0, 0);
+            pt = o.parent.localToGlobal(pt);
+            pt = popUp.parent.globalToLocal(pt);
+            popUp.move(Math.round((o.parent.width - popUp.width) / 2) + pt.x,
+                       Math.round((o.parent.height - popUp.height) / 2) + pt.y);
+        }
+    }
+
+    /**
+     *  Removes a popup window popped up by
+     *  the createPopUp() or addPopUp() method.
+     *
+     *  @param window The IFlexDisplayObject representing the popup window.
+     */
+    public function removePopUp(popUp:IFlexDisplayObject):void
+    {
+        // all we want to do here is verify that this popup is one of ours
+        // and remove it from the display list; the REMOVED handler will do the rest
+        // (this is so that we never leak memory, popups will self-manage even if
+        //  removePopUp is not called).
+        if (popUp && popUp.parent)
+        {
+            const o:PopUpData = findPopupInfoByOwner(popUp);
+            if (o)
+            {
+                var sm:ISystemManager = popUp.parent as ISystemManager;
+                if (!sm)
+				{
+					var iui:IUIComponent = popUp as IUIComponent;
+					// cross-versioning error sometimes returns wrong parent
+					if (iui)
+						sm = iui.systemManager;
+					else
+						return;
+				}
+
+                if (o.topMost)
+                    sm.popUpChildren.removeChild(DisplayObject(popUp));
+                else
+                    sm.removeChild(DisplayObject(popUp));
+            }
+        }
+    }
+
+    /**
+     *  Makes sure a popup window is higher than other objects in its child list
+     *  The SystemManager does this automatically if the popup is a top level window
+     *  and is moused on,
+     *  but otherwise you have to take care of this yourself.
+     *
+     *  @param The IFlexDisplayObject representing the popup.
+     */
+    public function bringToFront(popUp:IFlexDisplayObject):void
+    {
+        if (popUp && popUp.parent)
+        {
+            const o:PopUpData = findPopupInfoByOwner(popUp);
+            if (o)
+            {
+                const sm:ISystemManager = ISystemManager(popUp.parent);
+                if (o.topMost)
+                    sm.popUpChildren.setChildIndex(DisplayObject(popUp), sm.popUpChildren.numChildren - 1);
+                else
+                    sm.setChildIndex(DisplayObject(popUp), sm.numChildren - 1);
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Create the modal window.
+     */
+    private function createModalWindow(parentReference:DisplayObject,
+                                       o:PopUpData,
+                                       childrenList:IChildList,
+                                       visibleFlag:Boolean):void
+    {
+        const popup:IFlexDisplayObject = IFlexDisplayObject(o.owner);
+
+        const popupStyleClient:IStyleClient = popup as IStyleClient;
+        var duration:Number = 0;
+
+        // Create a modalWindow the size of the stage
+        // that eats all mouse clicks.
+        var modalWindow:Sprite;
+        if (modalWindowClass)
+        {
+            modalWindow = new modalWindowClass();
+        }
+        else
+        {
+            modalWindow = new FlexSprite();
+            modalWindow.name = "modalWindow";
+        }
+
+        const sm:ISystemManager = IUIComponent(parentReference).systemManager;
+        sm.numModalWindows++;
+
+        // Add it to the collection just below the popup
+        childrenList.addChildAt(modalWindow,
+            childrenList.getChildIndex(DisplayObject(popup)));
+
+        // force into the automation hierarchy
+        if (popup is IAutomationObject)
+            IAutomationObject(popup).showInAutomationHierarchy = true;
+
+        // set alpha of the popup and get it out of the focus loop
+        if (popupStyleClient)
+            modalWindow.alpha = popupStyleClient.getStyle("modalTransparency");
+		else
+			modalWindow.alpha = 0;
+
+        modalWindow.tabEnabled = false;
+
+        const s:Rectangle = sm.screen;
+        const g:Graphics = modalWindow.graphics;
+
+        var c:Number = 0xFFFFFF;
+        if (popupStyleClient)
+            c = popupStyleClient.getStyle("modalTransparencyColor");
+
+        g.clear();
+        g.beginFill(c, 100);
+        g.drawRect(s.x, s.y, s.width, s.height);
+        g.endFill();
+
+        o.modalWindow = modalWindow;
+
+        // a modal mousedownoutside handler just dispatches the event
+        o._mouseDownOutsideHandler  = dispatchMouseDownOutsideEvent;
+        o._mouseWheelOutsideHandler = dispatchMouseWheelOutsideEvent;
+
+        // the following handlers all get removed in REMOVED on the popup
+
+        // Because it listens to the modal window
+        modalWindow.addEventListener(MouseEvent.MOUSE_DOWN,  o.mouseDownOutsideHandler);
+        modalWindow.addEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
+
+        // Set the resize handler so the modal can stay the size of the screen
+        sm.addEventListener(Event.RESIZE, o.resizeHandler);
+
+        // Listen for show so we know to show the modal window
+        popup.addEventListener(FlexEvent.SHOW, popupShowHandler);
+
+        // Listen for hide so we know to hide the modal window
+        popup.addEventListener(FlexEvent.HIDE, popupHideHandler);
+
+        if (visibleFlag)
+            showModalWindow(o);
+        else
+            popup.visible = visibleFlag;
+
+    }
+
+    /**
+     *  @private
+     *  Set by PopUpManager on modal windows so they show when the parent shows
+     */
+    private function popupShowHandler(event:FlexEvent):void
+    {
+        const o:PopUpData = findPopupInfoByOwner(event.target);
+        if (o)
+            showModalWindow(o);
+    }
+
+    /**
+     *  @private
+     *  Set by PopUpManager on modal windows so they hide when the parent hide
+     */
+    private function popupHideHandler(event:FlexEvent):void
+    {
+        const o:PopUpData = findPopupInfoByOwner(event.target);
+        if (o)
+            hideModalWindow(o);
+    }
+
+    /**
+     *  @private
+     */
+    private function endEffects(o:PopUpData):void
+    {
+        if (o.fade)
+        {
+            o.fade.end();
+            o.fade = null;
+        }
+
+        if (o.blur)
+        {
+            o.blur.end();
+            o.blur = null;
+        }
+    }
+
+    /**
+     *  @private
+     *  Show the modal transparency blocker, playing effects if needed.
+     */
+    private function showModalWindow(o:PopUpData):void
+    {
+        const popUpStyleClient:IStyleClient = o.owner as IStyleClient;
+        var duration:Number = 0;
+
+        if (popUpStyleClient)
+            duration = popUpStyleClient.getStyle("modalTransparencyDuration");
+
+        // End any effects that are currently playing for this popup.
+        endEffects(o);
+
+        if (duration)
+        {
+            // Fade effect on the modal transparency blocker
+            const fade:Fade = new Fade(o.modalWindow);
+
+            fade.alphaFrom = 0;
+            fade.alphaTo = popUpStyleClient.getStyle("modalTransparency");
+            fade.duration = duration;
+            fade.addEventListener(EffectEvent.EFFECT_END, fadeInEffectEndHandler);
+
+            o.modalWindow.alpha = 0;
+            o.modalWindow.visible = true;
+            o.fade = fade;
+            IUIComponent(o.owner).setVisible(false, true);
+
+            fade.play();
+
+            // Blur effect on the application
+            const blurAmount:Number = popUpStyleClient.getStyle("modalTransparencyBlur");
+
+            if (blurAmount)
+            {
+                // Ensure we blur the appropriate top level document.
+                var parentApp:Object = ("parentApplication" in o.owner) ?
+                    (Object(o.owner).parentApplication) : null;
+
+                const blur:Blur = new Blur(parentApp ? parentApp : ApplicationGlobals.application);
+                blur.blurXFrom = blur.blurYFrom = 0;
+                blur.blurXTo = blur.blurYTo = blurAmount;
+                blur.duration = duration;
+                blur.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
+                o.blur = blur;
+
+                blur.play();
+            }
+        }
+        else
+        {
+            IUIComponent(o.owner).setVisible(true, true);
+            o.modalWindow.visible = true;
+        }
+    }
+
+    /**
+     *  @private
+     *  Hide the modal transparency blocker, playing effects if needed.
+     */
+    private function hideModalWindow(o:PopUpData, destroy:Boolean = false):void
+    {
+        const popUpStyleClient:IStyleClient = o.owner as IStyleClient;
+
+        var duration:Number = 0;
+        if (popUpStyleClient)
+            duration = popUpStyleClient.getStyle("modalTransparencyDuration");
+
+        // end any effects that are current playing for this popup
+        endEffects(o);
+
+        if (duration)
+        {
+            // Fade effect on the modal transparency blocker
+            const fade:Fade = new Fade(o.modalWindow);
+
+            fade.alphaFrom = o.modalWindow.alpha;
+            fade.alphaTo = 0;
+            fade.duration = duration;
+            fade.addEventListener(EffectEvent.EFFECT_END,
+                destroy ? fadeOutDestroyEffectEndHandler : fadeOutCloseEffectEndHandler);
+
+            o.modalWindow.visible = true;
+            o.fade = fade;
+            fade.play();
+
+            // Blur effect on the application
+            const blurAmount:Number = popUpStyleClient.getStyle("modalTransparencyBlur");
+
+            if (blurAmount)
+            {
+                // Ensure we blur the appropriate top level document.
+                var parentApp:Object = ("parentApplication" in o.owner) ?
+                    (Object(o.owner).parentApplication) : null;
+
+                const blur:Blur = new Blur(parentApp ? parentApp : ApplicationGlobals.application);
+                blur.blurXFrom = blur.blurYFrom = blurAmount;
+                blur.blurXTo = blur.blurYTo = 0;
+                blur.duration = duration;
+                blur.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
+                o.blur = blur;
+
+                blur.play();
+            }
+        }
+        else
+        {
+            o.modalWindow.visible = false;
+        }
+    }
+
+    /**
+     *  @private
+     *  Returns the PopUpData (or null) for a given popupInfo.owner
+     */
+    private function findPopupInfoByOwner(owner:Object):PopUpData
+    {
+        const n:int = popupInfo.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var o:PopUpData = popupInfo[i];
+            if (o.owner == owner)
+                return o;
+        }
+        return null;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Set by PopUpManager on modal windows to monitor when the parent window gets killed.
+     *  PopUps self-manage their memory -- when they are removed using removePopUp OR
+     *  manually removed with removeChild, they will clean themselves up when they leave the
+     *  display list (including all references to PopUpManager).
+     */
+    private function popupRemovedHandler(event:Event):void
+    {
+        const n:int = popupInfo.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var o:PopUpData               = popupInfo[i],
+                popUp:DisplayObject       = o.owner;
+
+            if (popUp == event.target)
+            {
+                var popUpParent:DisplayObject = o.parent,
+                    modalWindow:DisplayObject = o.modalWindow,
+                    sm:ISystemManager         = (popUpParent is ISystemManager)
+                                                    ? ISystemManager(popUpParent)
+                                                    : IUIComponent(popUpParent).systemManager;
+
+				if (!sm.isTopLevel())
+					sm = sm.topLevelSystemManager;
+
+                if (popUp is IUIComponent)
+                    IUIComponent(popUp).isPopUp = false;
+
+                if (popUp is IFocusManagerContainer)
+                    sm.removeFocusManager(IFocusManagerContainer(popUp));
+
+                popUp.removeEventListener(Event.REMOVED,  popupRemovedHandler);
+
+                // modal
+                if (modalWindow)
+                {
+                    // clean up all handlers
+                    modalWindow.removeEventListener(MouseEvent.MOUSE_DOWN,  o.mouseDownOutsideHandler);
+                    modalWindow.removeEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
+
+                    sm.removeEventListener(Event.RESIZE, o.resizeHandler);
+
+                    popUp.removeEventListener(FlexEvent.SHOW, popupShowHandler);
+                    popUp.removeEventListener(FlexEvent.HIDE, popupHideHandler);
+
+                    hideModalWindow(o, true);
+                    sm.numModalWindows--;
+                }
+
+                // non-modal
+                else
+                {
+                    sm.removeEventListener(MouseEvent.MOUSE_DOWN,  o.mouseDownOutsideHandler);
+                    sm.removeEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
+                }
+
+                popupInfo.splice(i, 1);
+                break;
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Show the modal window after the fade effect finishes
+     */
+    private function fadeInEffectEndHandler(event:EffectEvent):void
+    {
+        effectEndHandler(event);
+
+        const n:int = popupInfo.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var o:PopUpData = popupInfo[i];
+            if (o.modalWindow == event.effectInstance.target)
+            {
+                IUIComponent(o.owner).setVisible(true, true);
+                break;
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Remove the modal window after the fade effect finishes
+     */
+    private function fadeOutDestroyEffectEndHandler(event:EffectEvent):void
+    {
+        effectEndHandler(event);
+        const obj:DisplayObject = DisplayObject(event.effectInstance.target);
+        if (obj.parent is ISystemManager)
+        {
+            const sm:ISystemManager = ISystemManager(obj.parent)
+            if (sm.popUpChildren.contains(obj))
+                sm.popUpChildren.removeChild(obj);
+            else
+                sm.removeChild(obj);
+        }
+        else
+		{
+			if (obj.parent)	// Mustella can already take you off stage
+				obj.parent.removeChild(obj);
+		}
+    }
+
+    /**
+     *  @private
+     *  Remove the modal window after the fade effect finishes
+     */
+    private function fadeOutCloseEffectEndHandler(event:EffectEvent):void
+    {
+        effectEndHandler(event);
+        DisplayObject(event.effectInstance.target).visible = false;
+    }
+
+    /**
+     *  @private
+     */
+    private function effectEndHandler(event:EffectEvent):void
+    {
+        const n:int = popupInfo.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var o:PopUpData = popupInfo[i];
+            var e:IEffect = event.effectInstance.effect;
+
+            if (e == o.fade)
+                o.fade = null;
+            else if (e == o.blur)
+                o.blur = null;
+        }
+    }
+
+    /**
+     *  @private
+     *  If not modal, use this kind of mouseDownOutside logic
+     */
+    private static function nonmodalMouseDownOutsideHandler(owner:DisplayObject, evt:MouseEvent):void
+    {
+        // shapeFlag is false here for performance reasons
+        if (owner.hitTestPoint(evt.stageX, evt.stageY, true))
+		{
+		}
+        else
+		{
+			if (owner is IUIComponent)
+				if (IUIComponent(owner).owns(DisplayObject(evt.target)))
+					return;
+
+            dispatchMouseDownOutsideEvent(owner, evt);
+		}
+    }
+
+    /**
+     *  @private
+     *  If not modal, use this kind of mouseWheelOutside logic
+     */
+    private static function nonmodalMouseWheelOutsideHandler(owner:DisplayObject, evt:MouseEvent):void
+    {
+        // shapeFlag is false here for performance reasons
+        if (owner.hitTestPoint(evt.stageX, evt.stageY, true))
+        {
+		}
+        else
+		{
+			if (owner is IUIComponent)
+				if (IUIComponent(owner).owns(DisplayObject(evt.target)))
+					return;
+
+            dispatchMouseWheelOutsideEvent(owner, evt);
+		}
+    }
+
+    /**
+     *  @private
+     *  This mouseWheelOutside handler just dispatches the event.
+     */
+    private static function dispatchMouseWheelOutsideEvent(owner:DisplayObject, evt:MouseEvent):void
+    {
+        const event:MouseEvent = new FlexMouseEvent(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE);
+        const pt:Point = owner.globalToLocal(new Point(evt.stageX, evt.stageY));
+        event.localX = pt.x;
+        event.localY = pt.y;
+        event.buttonDown = evt.buttonDown;
+        event.shiftKey = evt.shiftKey;
+        event.altKey = evt.altKey;
+        event.ctrlKey = evt.ctrlKey;
+        event.delta = evt.delta;
+        event.relatedObject = InteractiveObject(evt.target);
+        owner.dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     *  This mouseDownOutside handler just dispatches the event.
+     */
+    private static function dispatchMouseDownOutsideEvent(owner:DisplayObject, evt:MouseEvent):void
+    {
+        const event:MouseEvent = new FlexMouseEvent(FlexMouseEvent.MOUSE_DOWN_OUTSIDE);
+        const pt:Point = owner.globalToLocal(new Point(evt.stageX, evt.stageY));
+        event.localX = pt.x;
+        event.localY = pt.y;
+        event.buttonDown = evt.buttonDown;
+        event.shiftKey = evt.shiftKey;
+        event.altKey = evt.altKey;
+        event.ctrlKey = evt.ctrlKey;
+        event.delta = evt.delta;
+        event.relatedObject = InteractiveObject(evt.target);
+        owner.dispatchEvent(event);
+    }
+
+}
+
+}
+
+import flash.display.DisplayObject;
+import flash.geom.Rectangle;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import mx.core.IUIComponent;
+import mx.effects.Effect;
+import mx.managers.ISystemManager;
+import flash.display.Stage;
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Helper class: PopUpData
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  @private
+ */
+class PopUpData
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function PopUpData()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public var owner:DisplayObject;
+
+    /**
+     *  @private
+     */
+    public var parent:DisplayObject;
+
+    /**
+     *  @private
+     */
+    public var topMost:Boolean;
+
+    /**
+     *  @private
+     */
+    public var modalWindow:DisplayObject;
+
+    /**
+     *  @private
+     */
+    public var _mouseDownOutsideHandler:Function;
+
+    /**
+     *  @private
+     */
+    public var _mouseWheelOutsideHandler:Function;
+
+    /**
+     *  @private
+     */
+    public var fade:Effect;
+
+    /**
+     *  @private
+     */
+    public var blur:Effect;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public function mouseDownOutsideHandler(event:MouseEvent):void
+    {
+        _mouseDownOutsideHandler(owner, event);
+    }
+
+    /**
+     *  @private
+     */
+    public function mouseWheelOutsideHandler(event:MouseEvent):void
+    {
+        _mouseWheelOutsideHandler(owner, event);
+    }
+
+    /**
+     *  @private
+     *  Set by PopUpManager on modal windows to make sure they cover the whole screen
+     */
+    public function resizeHandler(event:Event):void
+    {
+        var s:Rectangle = ISystemManager(event.target).screen;
+
+        if (modalWindow && owner.stage == DisplayObject(event.target).stage)
+        {
+            modalWindow.width = s.width;
+            modalWindow.height = s.height;
+            modalWindow.x = s.x;
+            modalWindow.y = s.y;
+        }
+    }
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 13125
Author:   smgilson@adobe.com
Date:     2009-12-21T20:40:37.345444Z

Log Message:
-----------
ASDoc L10N fixes

QE notes: -
Doc notes: -
Bugs: - FLEXDOCS-885, FLEXDOCS-841,FLEXDOCS-839, FLEXDOCS-769, FLEXDOCS-545, FLEXDOCS-540
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Canvas.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.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/containers/VBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

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

--- frameworks/projects/spark/src/spark/components/BorderContainer.as
+++ frameworks/projects/spark/src/spark/components/BorderContainer.as
@@ -176,11 +176,11 @@
  *
  *  @mxml
  *
- *
The <mx:BorderContainer> tag inherits all the tag attributes
+ *
The <s:BorderContainer> tag inherits all the tag attributes
  *  of its superclass, and adds the following tag attributes:

  *
  *

- *  <mx:BorderContainer
+ *  <s:BorderContainer
  *    Properties
  *    backgroundFill="null"
  *    borderStroke="null"


CylinderGeometry constructor now takes an optional argument for the streams usage

--- src/aerys/minko/scene/node/mesh/geometry/primitive/CylinderGeometry.as
+++ src/aerys/minko/scene/node/mesh/geometry/primitive/CylinderGeometry.as
@@ -4,36 +4,36 @@
 	import aerys.minko.scene.node.mesh.geometry.Geometry;
 	import aerys.minko.type.stream.IVertexStream;
 	import aerys.minko.type.stream.IndexStream;
+	import aerys.minko.type.stream.StreamUsage;
 	import aerys.minko.type.stream.VertexStream;
+	import aerys.minko.type.stream.format.VertexFormat;

 	/**
 	 * The CylinderGeometry class represents the 3D geometry of a cylinder.
 	 */
 	public class CylinderGeometry extends Geometry
 	{
+		private static const DEFAULT_NUM_COLS	: uint	= 8;
+		private static const DEFAULT_NUM_ROWS	: uint	= 2;
+
 		private static var _instance	: CylinderGeometry	= null;

 		public static function get cylinderGeometry() : CylinderGeometry
 		{
 			return _instance || (_instance = new CylinderGeometry());
 		}
-
-		private static const DEFAULT_NUM_COLS	: uint	= 8;
-		private static const DEFAULT_NUM_ROWS	: uint	= 2;

 		/**
 		 * Creates a new CylinderMesh object.
-		 * @param	myNumCols
-		 * @param	myNumRows
 		 */
-		public function CylinderGeometry(numCols		: uint	= DEFAULT_NUM_COLS,
-										 numRows		: uint	= DEFAULT_NUM_ROWS,
-										 streamsUsage	: uint	= 0)
+		public function CylinderGeometry(numCols		: uint		= DEFAULT_NUM_COLS,
+										 numRows		: uint		= DEFAULT_NUM_ROWS,
+										 generateUVs	: Boolean	= true,
+										 streamsUsage	: uint		= StreamUsage.STATIC)
 		{
-			var vb	: Vector.<Number>	= new Vector.<Number>();
-			var ib	: Vector.<uint>		= new Vector.<uint>();
-			var uv	: Vector.<Number>	= new Vector.<Number>();
-			var ii  : int 				= 0;
+			var xyzUv	: Vector.<Number>	= new <Number>[];
+			var indices	: Vector.<uint>		= new <uint>[];
+			var ii  	: int 				= 0;

 			for (var i : uint = 0; i < numCols; ++i)
 			{
@@ -43,8 +43,14 @@
 				{
 					var iy : Number = j / (numRows - 1) - 0.5;

-					vb.push(0.5 * Math.cos(ix), iy, 0.5 * Math.sin(ix));
-					uv.push(i / (numCols - 1), 1. - j / (numRows - 1));
+					xyzUv.push(
+						0.5 * Math.cos(ix),
+						iy,
+						0.5 * Math.sin(ix)
+					);
+
+					if (generateUVs)
+						xyzUv.push(i / (numCols - 1), 1. - j / (numRows - 1));
 				}
 			}

@@ -52,17 +58,19 @@
 			{
 				for (var jk : int = 0; jk != numRows - 1; jk++)
 				{
-					ib.push(ii, ii + numRows + 1, ii + 1,
-							ii + numRows, ii + numRows + 1, ii++);
+					indices.push(
+						ii, ii + numRows + 1, ii + 1,
+						ii + numRows, ii + numRows + 1, ii++
+					);
 				}
 				++ii;
 			}
+
+			var format : VertexFormat = generateUVs ? VertexFormat.XYZ_UV : VertexFormat.XYZ;

 			super(
-				new <IVertexStream>[
-					VertexStream.fromPositionsAndUVs(vb, uv, streamsUsage)
-				],
-				new IndexStream(streamsUsage, ib)
+				new <IVertexStream>[new VertexStream(streamsUsage, format, xyzUv)],
+				new IndexStream(streamsUsage, indices)
 			);
 		}


remove _isNewLoad var, not needed anymore

--- plugins/statisticsPlugin/src/com/kaltura/kdpfl/plugin/component/StatisticsMediator.as
+++ plugins/statisticsPlugin/src/com/kaltura/kdpfl/plugin/component/StatisticsMediator.as
@@ -109,12 +109,6 @@
 		 * Parameter holds the Id of the last entry played by the KDP.
 		 */
 		private var _lastId:String = "";
-
-		/**
-		 * Flag indicating whether the entry that was loaded is a new one, and not a change in the same entry's flavor and not
-		 * the result if intelligent seeking.
-		 */
-		private var _isNewLoad:Boolean = false;

 		private var _kc : KalturaClient;

@@ -371,11 +365,9 @@
 								_played = false;
 								_lastId = kse.entryId;
 								_hasSeeked = false;
-								_isNewLoad = true;
 								kse.eventType = com.kaltura.types.KalturaStatsEventType.MEDIA_LOADED;
 							}
 							else {
-								_isNewLoad = false;
 								_lastSeek = 0;
 							}
 						}


Rename callback methods for relay SWF. TODO: build this and commit.

git-svn-id: 84334937b86421baa0e582c4ab1a9d358324cbeb@1049774 13f79535-47bb-0310-9956-ffa450edef68

--- features/src/main/flex/Main.as
+++ features/src/main/flex/Main.as
@@ -63,7 +63,7 @@
       var sending_lc:LocalConnection = new LocalConnection();
       receiving_lc.receiveMessage = function(to:String, from:String, channel:String, message:String) {
         if ((to === "*" || to === origin) && channel === this_channel) {
-          ExternalInterface.call("gadgets.rpctx.flash.receiveMessage", channel, message, from, to);
+          ExternalInterface.call("gadgets.rpctx.flash._receiveMessage", channel, message, from, to);
         }
       }

@@ -73,7 +73,7 @@
       } );
       receiving_lc.connect(this_channel + "_" + role);
     } );
-    ExternalInterface.call("ready");
+    ExternalInterface.call("gadgets.rpctx.flash._ready");
   }

   public function Main() {


Renamed unique and uniqueValues to distinct and distinctValues

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

--- flare.util/flare/util/Stats.as
+++ flare.util/flare/util/Stats.as
@@ -20,7 +20,7 @@
 		private var _comp:Function = null;

 		private var _num:Number = 0;
-		private var _uniq:Number = 0;
+		private var _distinct:Number = 0;
 		private var _elm:Array = null;

 		private var _minObject:Object = null;
@@ -36,17 +36,17 @@
 		/** A sorted array of all the values. */
 		public function get values():Array { return _elm; }
 		/** A sorted array of all unique values in the collection. */
-		public function get uniqueValues():Array {
+		public function get distinctValues():Array {
 			// get array with only unique items
-			var uniqs:Array = [];
-			if (_elm==null || _elm.length == 0) return uniqs;
-			uniqs.push(_elm[0]);
+			var dists:Array = [];
+			if (_elm==null || _elm.length == 0) return dists;
+			dists.push(_elm[0]);
 			for (var i:int=1, j:int=0; i<_num; ++i) {
-				if (!equal(_elm[i], uniqs[j])) {
-					uniqs.push(_elm[i]); ++j;
+				if (!equal(_elm[i], dists[j])) {
+					dists.push(_elm[i]); ++j;
 				}
 			}
-			return uniqs;
+			return dists;
 		}
 		/** The minimum value (for numerical data). */
 		public function get minimum():Number { return _min; }
@@ -62,8 +62,8 @@
 		public function get stderr():Number { return stddev / Math.sqrt(_num); }
 		/** The total number of values. */
 		public function get count():Number { return _num; }
-		/** The total number of unique values. */
-		public function get unique():Number { return _uniq; }
+		/** The total number of distinct values. */
+		public function get distinct():Number { return _distinct; }

 		/** The minimum value (for date/time values). */
 		public function get minDate():Date { return _minObject as Date; }
@@ -135,9 +135,9 @@
 			if (_comp==null) _elm.sort(opt); else _elm.sort(_comp, opt);

 			// count unique values
-			_uniq = 1; var j:uint = 0;
+			_distinct = 1; var j:uint = 0;
 			for (i=1; i<_num; ++i) {
-				if (!equal(_elm[i], _elm[j])) { ++_uniq; j=i;	}
+				if (!equal(_elm[i], _elm[j])) { ++_distinct; j=i;	}
 			}

 			// populate stats


Oh actionscript, you vex me so.

Oh actionscript, you vex me so.

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

--- src/as/com/threerings/parlor/game/client/GameController.as
+++ src/as/com/threerings/parlor/game/client/GameController.as
@@ -171,18 +171,13 @@

     /**
      * Returns the persistent user id for the supplied player name.
-     */
-    public function getPlayerPersistentId (name :Name) :int
-    {
-        return (_userIder == null) ? 0 : _userIder.getUserId(name);
-    }
-
-    /**
-     * Returns the persistent user id for the supplied occupant info.
-     */
-    public function getPlayerPersistentId (occInfo :OccupantInfo) :int
-    {
-        return getPlayerPersistentId(occInfo.username);
+     *
+     * @param spec a Name or OccupantInfo.
+     */
+    public function getPlayerPersistentId (spec :*) :int
+    {
+        return (_userIder == null) ? 0 :
+            _userIder.getUserId((spec is OccupantInfo) ? OccupantInfo(spec).username : Name(spec));
     }

     /**


Updating about text.

Updating about text.

--- src/com/epolyakov/linkreportanalyzer/ui/strings/Strings.as
+++ src/com/epolyakov/linkreportanalyzer/ui/strings/Strings.as
@@ -41,7 +41,7 @@
 		public static const aboutAppName:String = "ActionScript Link Report Analyzer";
 		public static const aboutVersion:String = "version " + version;
 		public static const aboutContent:String = "" +
-				"The application is a tool for examining ActionScript link reports. " +
+				"The application is a tool for examining ActionScript link reports and SWC catalogs. " +
 				"It allows to get detailed info on each definition and package, " +
 				"search and filter definitions, investigate definition dependencies.

" +
 				"Create link report of your build and open it with the tool. " +


Transferred from the Adobe Open Source Subversion Repository

Revision: 22564
Author:   tkraikit@adobe.com
Date:     2011-09-14T19:50:07.656843Z

Log Message:
-----------
Update ASDoc "@productversion Flex 4.5.2" => "@productversion Flex 4.6"

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/OnDemandDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/FlexVersion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ArrowDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/calendarClasses/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/NumericDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateSpinnerItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as
@@ -21,7 +21,7 @@
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
- *  @productversion Flex 4.5.2
+ *  @productversion Flex 4.6
  */
 public class DefaultBeveledBackButtonSkin extends BeveledBackButtonSkin
 {
@@ -36,7 +36,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public function DefaultBeveledBackButtonSkin()
     {