Transferred from the Adobe Open Source Subversion Repository

Revision: 22608
Author:   smgilson@adobe.com
Date:     2011-09-16T17:19:03.985309Z

Log Message:
-----------
- Add ViewMenu example, add image to ViewMenu.as

- fix typos in ASDoc comments

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

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/ViewMenuExampleHome.mxml</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/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/ViewMenuExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewMenuItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.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/mobilecomponents/src/spark/components/ViewMenu.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/ActionBar.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/mobilecomponents/src/spark/components/ToggleSwitch.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as
@@ -80,7 +80,7 @@
  *  The transparency of this component can be modified using the alpha property,
  *  but the alpha value of each spoke cannot be modified.
  *
- *
The following images shows the BusyIndicator at the bottom of the screen next
+ *
The following image shows the BusyIndicator at the bottom of the screen next
  *  to the Submit button:

  *
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 21721
Author:   betravis@adobe.com
Date:     2011-07-26T20:18:34.702264Z

Log Message:
-----------
Visual review changes to ToggleSwitch / ToggleSwitchSkin.
Adding checkin tests and additional documentation for ToggleSwitch.
Additional bug fixes.

QE notes: None
Doc notes: None
Bugs:
SDK-30866 - Change event not fired
SDK-30856 - Setting selected=true in MXML doesn't work
SDK-30855 - ToggleSwitch doesn't update correctly with custom height setting
Reviewer: Jason San Jose
Tests run: checkintests, asdoc, mustella-mobile
Is noteworthy for integration: Yes. Bugfixes to ToggleSwitch, along with updated skin.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/airMobileBasicTests-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</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="A">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/scripts/ToggleSwitchTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/views/TestToggleSwitch.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/ToggleSwitchExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
@@ -20,17 +20,11 @@
 import mx.core.DPIClassification;
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
-import mx.graphics.GradientEntry;
-import mx.graphics.LinearGradient;
-import mx.graphics.SolidColor;
 import mx.utils.ColorUtil;

-import spark.components.Group;
 import spark.components.ToggleSwitch;
 import spark.components.supportClasses.StyleableTextField;
-import spark.core.IDisplayText;
 import spark.core.SpriteVisualElement;
-import spark.primitives.Rect;
 import spark.skins.mobile.supportClasses.MobileSkin;
 import spark.skins.mobile160.assets.ToggleSwitch_contentShadow;
 import spark.skins.mobile240.assets.ToggleSwitch_contentShadow;
@@ -72,6 +66,7 @@
                 layoutThumbWidth = 94;
                 layoutThumbHeight = 56;
                 layoutStrokeWeight = 2;
+                layoutOuterStrokeWeight = 2;
                 layoutTextShadowOffset = -2;
                 layoutInnerPadding = 14;
                 layoutOuterPadding = 22;
@@ -83,6 +78,7 @@
                 layoutThumbWidth = 70;
                 layoutThumbHeight = 42;
                 layoutStrokeWeight = 2;
+                layoutOuterStrokeWeight = 1;
                 layoutTextShadowOffset = -1;
                 layoutInnerPadding = 10;
                 layoutOuterPadding = 17;
@@ -95,6 +91,7 @@
                 layoutThumbWidth = 47;
                 layoutThumbHeight = 28;
                 layoutStrokeWeight = 1;
+                layoutOuterStrokeWeight = 1;
                 layoutTextShadowOffset = -1;
                 layoutInnerPadding = 7;
                 layoutOuterPadding = 11;
@@ -104,6 +101,8 @@
         }

         layoutCornerRadius = layoutThumbHeight / 2;
+        selectedLabelText = resourceManager.getString("components","toggleSwitchSelectedLabel");
+        unselectedLabelText =  resourceManager.getString("components","toggleSwitchUnselectedLabel");
     }

     //----------------------------------------------------------------------------------------------
@@ -149,6 +148,15 @@
     protected var layoutStrokeWeight:Number;

     /**
+     *  The stroke weight outlining the component
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    protected var layoutOuterStrokeWeight:Number;
+
+	/**
      * The padding between the labels and the thumb
      *
      *  @langversion 3.0
@@ -190,11 +198,20 @@
     /**
      *  The content clipped by the track that slides to match the thumb's
      *  position. Contents include a background and the (un)selected labels.
-     */
-    private var slidingContent:SpriteVisualElement;
+     *  The sliding content is stacked, from back to front, as background,
+     *  shadow, foreground.
+     */
+    private var slidingContentBackground:SpriteVisualElement;
+    private var slidingContentForeground:SpriteVisualElement;
     private var slidingContentOverlayClass:Class;
     private var slidingContentOverlay:DisplayObject;

+	/**
+	 *  The contents inside the skin, not including the outline
+	 *  stroke
+	 */
+	private var contents:SpriteVisualElement;
+
     //----------------------------------------------------------------------------------------------
     //
     //  Skin parts
@@ -279,32 +296,46 @@
     //  selectedLabelText
     //----------------------------------

-    /**
-     *  The text of the label showing when the component is selected
+    private var _selectedLabelText:String;
+    /**
+     *  The text of the label showing when the component is selected.
+     *  Subclasses can override this to customize the selected label.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
-    private function get selectedLabelText():String
-    {
-        return resourceManager.getString("components","toggleSwitchSelectedLabel");
+    protected function get selectedLabelText():String
+    {
+        return _selectedLabelText;
+    }
+
+    protected function set selectedLabelText(value:String):void
+    {
+        _selectedLabelText = value;
     }

     //----------------------------------
     //  unselectedLabelText
     //----------------------------------

-    /**
-     *  The text of the label showing when the component is not selected
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    private function get unselectedLabelText():String
-    {
-        return resourceManager.getString("components", "toggleSwitchUnselectedLabel");
+    private var _unselectedLabelText:String;
+    /**
+     *  The text of the label showing when the component is not selected.
+     *  Subclasses can override this to customize the unselected label.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    protected function get unselectedLabelText():String
+    {
+        return _unselectedLabelText;
+    }
+
+    protected function set unselectedLabelText(value:String):void
+    {
+        _unselectedLabelText = value;
     }

     //----------------------------------------------------------------------------------------------
@@ -321,14 +352,25 @@
     {
         super.drawBackground(unscaledWidth, unscaledHeight);

-        // calculate skin dimensions
-        var calculatedSkinWidth:Number = Math.max(unscaledWidth, getElementPreferredWidth(thumb));
-        var calculatedSkinHeight:Number = Math.max(unscaledHeight, getElementPreferredHeight(thumb));
-
-        drawSlidingContent(calculatedSkinWidth, calculatedSkinHeight);
-        drawTrack(calculatedSkinWidth, calculatedSkinHeight);
-        drawThumb(calculatedSkinWidth, calculatedSkinHeight);
-        drawMask(calculatedSkinWidth, calculatedSkinHeight);
+        // calculate skin dimensions - outer stroke
+        var calculatedContentWidth:Number = Math.max(unscaledWidth - 2 * layoutOuterStrokeWeight,
+            getElementPreferredWidth(thumb));
+        var calculatedContentHeight:Number = Math.max(unscaledHeight - 2 * layoutOuterStrokeWeight,
+            getElementPreferredHeight(thumb));
+
+        drawSlidingContent(calculatedContentWidth, calculatedContentHeight);
+        drawTrack(calculatedContentWidth, calculatedContentHeight);
+        drawThumb(calculatedContentWidth, calculatedContentHeight);
+        drawMask(calculatedContentWidth, calculatedContentHeight);
+
+		// simulate outer stroke using a larger filled rounded rect
+        graphics.clear();
+        graphics.beginFill(0xffffff, 0.3);
+		graphics.drawRoundRect(0, (calculatedContentHeight - layoutThumbHeight) / 2,
+            calculatedContentWidth + 2 * layoutOuterStrokeWeight,
+            layoutThumbHeight + 2 * layoutOuterStrokeWeight,
+            2 * layoutCornerRadius + layoutOuterStrokeWeight);
+		graphics.endFill();
     }

     /**
@@ -339,14 +381,21 @@
     {
         super.layoutContents(unscaledWidth, unscaledHeight);

-        // calculate skin dimensions
-        var calculatedSkinWidth:Number = Math.max(unscaledWidth, getElementPreferredWidth(thumb));
-        var calculatedSkinHeight:Number = Math.max(unscaledHeight, getElementPreferredHeight(thumb));
-
-        layoutSlidingContent(calculatedSkinWidth, calculatedSkinHeight);
-        layoutTrack(calculatedSkinWidth, calculatedSkinHeight);
-        layoutThumb(calculatedSkinWidth, calculatedSkinHeight);
-        layoutMask(calculatedSkinWidth, calculatedSkinHeight);
+        // calculate skin dimensions - outer stroke
+        var calculatedContentWidth:Number = Math.max(unscaledWidth - 2 * layoutOuterStrokeWeight,
+            getElementPreferredWidth(thumb));
+        var calculatedContentHeight:Number = Math.max(unscaledHeight - 2 * layoutOuterStrokeWeight,
+            getElementPreferredHeight(thumb));
+
+		setElementSize(contents, calculatedContentWidth, layoutThumbHeight);
+		setElementPosition(contents, layoutOuterStrokeWeight,
+            layoutOuterStrokeWeight + (calculatedContentHeight - layoutThumbHeight) / 2);
+
+        layoutTrack(calculatedContentWidth, layoutThumbHeight);
+        // Sliding content must be positioned after the track has been sized
+        layoutSlidingContent(calculatedContentWidth, layoutThumbHeight);
+        layoutThumb(calculatedContentWidth, layoutThumbHeight);
+        layoutMask(calculatedContentWidth, layoutThumbHeight);
     }

     /**
@@ -360,26 +409,36 @@
             unselectedLabel.text = unselectedLabelText;
         }

-        // The skin must be at least as large as the thumb
-        measuredMinWidth = layoutThumbWidth;
-        measuredMinHeight = layoutThumbWidth;
+        // The skin must be at least as large as the thumb + outer stroke
+        measuredMinWidth = layoutThumbWidth + 2 * layoutOuterStrokeWeight;
+        measuredMinHeight = layoutThumbWidth + 2 * layoutOuterStrokeWeight;

         // The preferred size will display all label text
         var labelWidth:Number = Math.max(getElementPreferredWidth(selectedLabel),
             getElementPreferredWidth(unselectedLabel));

-        measuredWidth = layoutThumbWidth + labelWidth + layoutInnerPadding + layoutOuterPadding;
-        measuredHeight = layoutThumbHeight;
+        measuredWidth = layoutThumbWidth + labelWidth + layoutInnerPadding +
+            layoutOuterPadding + 2 * layoutOuterStrokeWeight;
+        measuredHeight = layoutThumbHeight + 2 * layoutOuterStrokeWeight;
     }

     /**
      *  @private
      */
-    override protected function commitCurrentState():void {
+    override protected function commitCurrentState():void
+    {
         if (currentState && currentState.indexOf("disabled") >= 0)
+        {
             alpha = 0.5;
+            selectedLabelShadow.visible = false;
+            unselectedLabelShadow.visible = false;
+        }
         else
+        {
             alpha = 1.0;
+            selectedLabelShadow.visible = true;
+            unselectedLabelShadow.visible = true;
+        }
     }

     /**
@@ -389,46 +448,58 @@
     {
         super.createChildren();

-        // SlidingContent: background, overlay, labels
-        slidingContent = new SpriteVisualElement();
+		contents = new SpriteVisualElement();
+		addChild(contents);
+
+		// SlidingContent: background, overlay, labels
+        slidingContentBackground = new SpriteVisualElement();
+        contents.addChild(slidingContentBackground);
+
         slidingContentOverlay = new slidingContentOverlayClass();
-        slidingContent.addChild(slidingContentOverlay);
+        contents.addChild(slidingContentOverlay);
+
+        slidingContentForeground = new SpriteVisualElement();
+        contents.addChild(slidingContentForeground);

         selectedLabelShadow = StyleableTextField(createInFontContext(StyleableTextField));
         selectedLabelShadow.styleName = this;
         selectedLabelShadow.colorName = "textShadowColor";
         selectedLabelShadow.text = selectedLabelText;
-        slidingContent.addChild(selectedLabelShadow);
+        slidingContentForeground.addChild(selectedLabelShadow);

         selectedLabel = StyleableTextField(createInFontContext(StyleableTextField));
         selectedLabel.styleName = this;
         selectedLabel.text = selectedLabelText;
-        slidingContent.addChild(selectedLabel);
+        slidingContentForeground.addChild(selectedLabel);

         unselectedLabelShadow = StyleableTextField(createInFontContext(StyleableTextField));
         unselectedLabelShadow.styleName = this;
         unselectedLabelShadow.colorName = "textShadowColor";
         unselectedLabelShadow.text = unselectedLabelText;
-        slidingContent.addChild(unselectedLabelShadow);
+        slidingContentForeground.addChild(unselectedLabelShadow);

         unselectedLabel = StyleableTextField(createInFontContext(StyleableTextField));
         unselectedLabel.styleName = this;
         unselectedLabel.text = unselectedLabelText;
-        slidingContent.addChild(unselectedLabel);
-
-        addChild(slidingContent);
+        slidingContentForeground.addChild(unselectedLabel);

         // Track
         track = new SpriteVisualElement();
-        addChild(SpriteVisualElement(track));
+        contents.addChild(SpriteVisualElement(track));

         // Thumb
         thumb = new SpriteVisualElement();
-        addChild(SpriteVisualElement(thumb));
-
-        // Clipping Mask
-        mask = new SpriteVisualElement();
-        addChild(mask);
+        contents.addChild(SpriteVisualElement(thumb));
+
+        // Thumb clipping mask
+        var thumbMask:Sprite = new Sprite();
+        SpriteVisualElement(thumb).mask = thumbMask;
+        SpriteVisualElement(thumb).addChild(thumbMask);
+
+        // Content clipping mask
+        var contentMask:Sprite = new SpriteVisualElement();
+        contents.mask = contentMask;
+        contents.addChild(contentMask);
     }

     //----------------------------------------------------------------------------------------------
@@ -444,25 +515,19 @@
      */
     private function drawSlidingContent(skinWidth:Number, skinHeight:Number):void
     {
-        slidingContent.graphics.clear();
+        slidingContentBackground.graphics.clear();

         // selected side of the sliding content
-        slidingContent.graphics.beginFill(getStyle("accentColor"));
-        slidingContent.graphics.drawRect(layoutThumbWidth - skinWidth, 0, skinWidth - layoutThumbWidth / 2,
+        slidingContentBackground.graphics.beginFill(getStyle("accentColor"));
+        slidingContentBackground.graphics.drawRect(layoutThumbWidth - skinWidth, 0, skinWidth - layoutThumbWidth / 2,
             layoutThumbHeight);
-        slidingContent.graphics.endFill();
+        slidingContentBackground.graphics.endFill();

         // unselected side of the sliding content
-        slidingContent.graphics.beginFill(ColorUtil.adjustBrightness2(getStyle("chromeColor"), -25));
-        slidingContent.graphics.drawRect(layoutThumbWidth / 2, 0, skinWidth - layoutThumbWidth / 2,
+        slidingContentBackground.graphics.beginFill(ColorUtil.adjustBrightness2(getStyle("chromeColor"), -25));
+        slidingContentBackground.graphics.drawRect(layoutThumbWidth / 2, 0, skinWidth - layoutThumbWidth / 2,
             layoutThumbHeight);
-        slidingContent.graphics.endFill();
-
-        // clear the thumb area
-        slidingContent.graphics.beginFill(getStyle("chromeColor"));
-        slidingContent.graphics.drawRoundRect(0, 0, layoutThumbWidth, layoutThumbHeight,
-            layoutCornerRadius * 2);
-        slidingContent.graphics.endFill();
+        slidingContentBackground.graphics.endFill();
     }

     /**
@@ -471,7 +536,8 @@
      *  The origin of SlidingContent overlaps the origin of the thumb, and the
      *  positioning is handled by thumbPositionChanged_handler.
      */
-    private function layoutSlidingContent(skinWidth:Number, skinHeight:Number):void {
+    private function layoutSlidingContent(skinWidth:Number, skinHeight:Number):void
+    {
         var visibleTrackArea:Number = skinWidth - layoutThumbWidth;

         layoutLabels(selectedLabel, selectedLabelShadow, (-visibleTrackArea + layoutOuterPadding), 0,
@@ -481,9 +547,10 @@
             (visibleTrackArea - layoutInnerPadding - layoutOuterPadding), layoutThumbHeight,
             layoutTextShadowOffset);

-        setElementSize(slidingContentOverlay, 2 * skinWidth - layoutThumbWidth, layoutThumbHeight);
-        setElementPosition(slidingContentOverlay, layoutThumbWidth - skinWidth,
-            (skinHeight - layoutThumbHeight) / 2);
+        setElementSize(slidingContentOverlay, skinWidth, layoutThumbHeight);
+        setElementPosition(slidingContentOverlay, 0, (skinHeight - layoutThumbHeight) / 2);
+
+        moveSlidingContent();
     }

     /**
@@ -518,7 +585,8 @@
     /**
      *  Draw the track and its shadow
      */
-    private function drawTrack(skinWidth:Number, skinHeight:Number):void {
+    private function drawTrack(skinWidth:Number, skinHeight:Number):void
+    {
         var graphics:Graphics = SpriteVisualElement(track).graphics;
         graphics.clear();
         graphics.lineStyle(layoutStrokeWeight, 0, .3);
@@ -541,7 +609,8 @@
      * Draw the thumb. The thumb has an outer border, inner gradient, and
      * inner highlight stroke.
      */
-    private function drawThumb(skinWidth:Number, skinHeight:Number):void {
+    private function drawThumb(skinWidth:Number, skinHeight:Number):void
+    {
         var graphics:Graphics = SpriteVisualElement(thumb).graphics;
         var colors:Array = [];
         var alphas:Array = [];
@@ -592,7 +661,7 @@
         colors[1] = 0xffffff;
         colors[2] = 0x0;

-        alphas[0] = 1;
+        alphas[0] = .9;
         alphas[1] = 0;
         alphas[2] = .2;

@@ -608,6 +677,14 @@
             layoutThumbWidth - layoutStrokeWeight * 3, layoutThumbHeight - layoutStrokeWeight * 3,
             layoutCornerRadius * 2 - layoutStrokeWeight * 3);
         graphics.lineStyle();
+
+        // When alpha is set, we do not want the thumb to show through to the track
+        var thumbMask:Sprite = Sprite(SpriteVisualElement(thumb).mask);
+        thumbMask.graphics.clear();
+        thumbMask.graphics.beginFill(0xffffff);
+        thumbMask.graphics.drawRoundRect(0, 0, layoutThumbWidth, layoutThumbHeight, 2 * layoutCornerRadius);
+        thumbMask.graphics.endFill();
+        SpriteVisualElement(thumb).opaqueBackground = baseColor;
     }

     /**
@@ -624,11 +701,11 @@
      */
     private function drawMask(skinWidth:Number, skinHeight:Number):void
     {
-            var graphics:Graphics = SpriteVisualElement(mask).graphics;
-            graphics.clear();
-            graphics.beginFill(0x0);
-            graphics.drawRoundRect(0, 0, skinWidth, layoutThumbHeight, layoutCornerRadius * 2);
-            graphics.endFill();
+        var graphics:Graphics = SpriteVisualElement(contents.mask).graphics;
+        graphics.clear();
+        graphics.beginFill(0x0);
+        graphics.drawRoundRect(0, 0, skinWidth, layoutThumbHeight, layoutCornerRadius * 2);
+        graphics.endFill();
     }

     /**
@@ -636,27 +713,37 @@
      */
     private function layoutMask(skinWidth:Number, skinHeight:Number):void
     {
-        setElementSize(mask, skinWidth, layoutThumbHeight);
-        setElementPosition(mask, 0, (skinHeight - layoutThumbHeight) / 2);
-    }
-
-    //----------------------------------------------------------------------------------------------
-    //
-    //  Event handlers
-    //
-    //----------------------------------------------------------------------------------------------
-
-    /**
-     *  When the thumb position changes, reposition the sliding content. The
-     *  version here assumes the thumb and track share the same coordinate system.
-     */
-    private function thumbPositionChanged_handler(event:Event):void
+        setElementSize(contents.mask, skinWidth, layoutThumbHeight);
+        setElementPosition(contents.mask, 0, (skinHeight - layoutThumbHeight) / 2);
+    }
+
+	/**
+     *  Move the sliding content to line up with thumbPosition.
+	 *  This version assumes the thumb and track share the same coordinate system.
+	 */
+	private function moveSlidingContent():void
     {
         if (!hostComponent)
             return;
         var x:Number = (track.getLayoutBoundsWidth() - thumb.getLayoutBoundsWidth()) *
-            hostComponent.thumbPosition;
-        setElementPosition(slidingContent, x, thumb.getLayoutBoundsY());
+            hostComponent.thumbPosition + track.getLayoutBoundsX();
+        var y:Number = thumb.getLayoutBoundsY();
+        setElementPosition(slidingContentBackground, x, y);
+        setElementPosition(slidingContentForeground, x, y);
+	}
+
+	//----------------------------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //----------------------------------------------------------------------------------------------
+
+    /**
+     *  When the thumb position changes, reposition the sliding content.
+     */
+    private function thumbPositionChanged_handler(event:Event):void
+    {
+		moveSlidingContent();
     }
 }
 }


Bug in current ToggleSwitchSkin (needs to be merged back to develop asap)

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
@@ -86,7 +86,7 @@
 				layoutTextShadowOffset = -2;
 				layoutInnerPadding = 14;
 				layoutOuterPadding = 22;
-				slidingContentOverlayClass = spark.skins.mobile320.assets.ToggleSwitch_contentShadow;
+				slidingContentOverlayClass = spark.skins.mobile640.assets.ToggleSwitch_contentShadow;
 				break;
 			}
 			case DPIClassification.DPI_480:


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/menuClasses/IMenuBarItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/menuClasses/IMenuBarItemRenderer.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.controls.menuClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19795
Author:   rfrishbe@adobe.com
Date:     2011-01-18T19:15:14.349353Z

Log Message:
-----------
Bunch of small, mostly ASDoc cleanups:

1) Cleaning up ASDoc around alternatingItemColors (after SVN 19684) and mis-spelling "Destroy"

2) Cleaning up an un-needed style in defaults.css since it's set in Scroller.

3) In Spark ListBase, removing an un-needed FIXME, but fixing up the documentation since we were actually doing it correctly before, but the documentation was just wrong.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -66,7 +66,7 @@

 /**
  *  The colors to use for the backgrounds of the items in the list.
- *  The value is an array of two or more colors.
+ *  The value is an array of one or more colors.
  *  The backgrounds of the list items alternate among the colors in the array.
  *
  *  @default undefined


Transferred from the Adobe Open Source Subversion Repository

Revision: 7115
Author:   jszeto@adobe.com
Date:     2009-05-20T05:39:23.225806Z

Log Message:
-----------
Changed how components are disabled

SDK-20196 Re-work disabled logic in Spark components
SDK-20197 Remove enableSkinParts() from TrackBase and Spinner

Changed the way that components, in particular, composite components, are disabled. Moved the enabled/disabled logic from SkinnableContainerBase down to SkinnableComponent. Disabled components now prevent mouse interaction with the component and its children. The skin handles the appearance of the component in the disabled state. The Spark skins currently set their alpha to .5.

Composite components like Spinner, and TrackBase no longer disabled their component skin parts.

QE Notes: None
Doc Notes: None
Bugs: SDK-20196, 20197
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -208,41 +208,9 @@

     //--------------------------------------------------------------------------
     //
-    //  Overridden properties: UIComponent, Range
-    //
-    //--------------------------------------------------------------------------
-
-    //---------------------------------
-    // enabled
-    //---------------------------------
-
-    /**
-     *  Enable (true) or disable (false) this component.
-     *  This property also enables and disables any of the
-     *  skin parts for this component.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    override public function get enabled():Boolean
-    {
-        return super.enabled;
-    }
-
-    /**
-     *  @private
-     */
-    override public function set enabled(value:Boolean):void
-    {
-        if (value == super.enabled)
-            return;
-
-        super.enabled = value;
-        enableSkinParts(value);
-        invalidateSkinState();
-    }
+    //  Overridden properties: Range
+    //
+    //--------------------------------------------------------------------------

     //---------------------------------
     // maximum
@@ -486,8 +454,6 @@
                                    track_updateCompleteHandler);

         }
-
-        enableSkinParts(enabled);
     }

     /**
@@ -508,25 +474,6 @@
                                       track_updateCompleteHandler);
             tempTrackSize = NaN;
         }
-    }
-
-    /**
-     *  Set the enabled property of the skins parts.
-     *
-     *  @param value true to enable the skin parts,
-     *  and false to disable them.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function enableSkinParts(value:Boolean):void
-    {
-        if (thumb)
-            thumb.enabled = value;
-        if (track)
-            track.enabled = value;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 6484
Author:   chaase@adobe.com
Date:     2009-05-02T03:37:37.611207Z

Log Message:
-----------
Fixed bug where Fades would happen incorrectly when combined with transform effects.

QE Notes: None
Doc Notes: None
Bugs: SDK-20258
Reviewer: Jason
tests: checkintests

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
@@ -113,19 +113,22 @@
         // If nobody assigned a value, make this a "show" effect.
         if (isNaN(alphaFrom) && isNaN(alphaTo))
         {
-            if (propChanges && propChanges.end["alpha"] !== undefined)
+            if (propChanges && propChanges.end["alpha"] !== undefined &&
+                propChanges.end["alpha"] != propChanges.start["alpha"])
             {
                 alphaFrom = origAlpha;
                 alphaTo = propChanges.end["alpha"];
             }
-            else if (propChanges && propChanges.end["visible"] !== undefined)
+            else if (propChanges && propChanges.end["visible"] !== undefined &&
+                propChanges.end["visible"] != propChanges.start["visible"])
             {
                 alphaFrom = propChanges.start["visible"] ? origAlpha : 0;
                 alphaTo = propChanges.end["visible"] ? origAlpha : 0;
                 // Force target to be visible at effect start
                 restoreAlpha = true;
             }
-            else if (propChanges && propChanges.end["parent"] !== undefined)
+            else if (propChanges && propChanges.end["parent"] !== undefined &&
+                propChanges.end["parent"] != propChanges.start["parent"])
             {
                 alphaFrom = propChanges.start["parent"] ? origAlpha : 0;
                 alphaTo = propChanges.end["parent"] ? origAlpha : 0;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3057
Author:   jimurphy@adobe.com
Date:     2008-09-02T15:18:38.819662Z

Log Message:
-----------
Merged 3.0.x revisions [2966,2969,2995,3004,3018-3019,3023,3029-3030,3046,3049,3052] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ModalWindowRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/PopUpRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/SliderThumb.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SizeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterManagerRequest.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/dividedBoxClasses/BoxDivider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootDragEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>

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

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -51,14 +51,10 @@
 import mx.core.Window;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
-import mx.events.FocusRequest;
-import mx.events.ModalWindowRequest;
-import mx.events.PopUpRequest;
-import mx.events.SizeRequest;
 import mx.events.EventListenerRequest;
 import mx.events.InvalidateRequestData;
-import mx.events.SandboxRootRequest;
-import mx.events.SandboxRootMouseEvent;
+import mx.events.InterManagerRequest;
+import mx.events.SandboxMouseEvent;
 import mx.events.SWFBridgeRequest;
 import mx.events.SWFBridgeEvent;
 import mx.managers.systemClasses.RemotePopUp;
@@ -1224,16 +1220,16 @@

 		// every SM has to have this listener in case it is the SM for some child AD that contains a manager
 		// and the parent ADs don't have that manager.
-		getSandboxRoot().addEventListener(SandboxRootRequest.INIT_MANAGER_REQUEST, initManagerHandler, false, 0, true);
+		getSandboxRoot().addEventListener(InterManagerRequest.INIT_MANAGER_REQUEST, initManagerHandler, false, 0, true);
 		// once managers get initialized, they bounce things off the sandbox root
 		if (getSandboxRoot() == this)
 		{
-			addEventListener(SandboxRootRequest.SYSTEM_MANAGER_REQUEST, systemManagerHandler);
-
-			addEventListener(PopUpRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
-			addEventListener(PopUpRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
-			addEventListener(SWFBridgeEvent.NOTIFY_WINDOW_ACTIVATED, activateFormSandboxEventHandler);
-			addEventListener(SWFBridgeEvent.NOTIFY_WINDOW_DEACTIVATED, deactivateFormSandboxEventHandler);
+			addEventListener(InterManagerRequest.SYSTEM_MANAGER_REQUEST, systemManagerHandler);
+
+			addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
+			addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
+			addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
+			addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
 			addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
 			addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
 			addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
@@ -1581,18 +1577,18 @@
 			return;
 		}

-		bridge.addEventListener(PopUpRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
-		bridge.addEventListener(PopUpRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
-		bridge.addEventListener(PopUpRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
-		bridge.addEventListener(PopUpRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
-		bridge.addEventListener(SWFBridgeEvent.NOTIFY_WINDOW_ACTIVATED, activateFormSandboxEventHandler);
-		bridge.addEventListener(SWFBridgeEvent.NOTIFY_WINDOW_DEACTIVATED, deactivateFormSandboxEventHandler);
-		bridge.addEventListener(SWFBridgeEvent.NOTIFY_APPLICATION_ACTIVATED, activateApplicationSandboxEventHandler);
+		bridge.addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
+		bridge.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
+		bridge.addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
+		bridge.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
+		bridge.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
+		bridge.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
+		bridge.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
 		bridge.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
 		bridge.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
-        bridge.addEventListener(ModalWindowRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
-        bridge.addEventListener(ModalWindowRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
-        bridge.addEventListener(ModalWindowRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
+        bridge.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
+        bridge.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
+        bridge.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
         bridge.addEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
         bridge.addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
         bridge.addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
@@ -1612,18 +1608,18 @@
 			return;
 		}

-		bridge.removeEventListener(PopUpRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
-		bridge.removeEventListener(PopUpRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
-		bridge.removeEventListener(PopUpRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
-		bridge.removeEventListener(PopUpRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
-		bridge.removeEventListener(SWFBridgeEvent.NOTIFY_WINDOW_ACTIVATED, activateFormSandboxEventHandler);
-		bridge.removeEventListener(SWFBridgeEvent.NOTIFY_WINDOW_DEACTIVATED, deactivateFormSandboxEventHandler);
-		bridge.removeEventListener(SWFBridgeEvent.NOTIFY_APPLICATION_ACTIVATED, activateApplicationSandboxEventHandler);
+		bridge.removeEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
+		bridge.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
+		bridge.removeEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
+		bridge.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
+		bridge.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
+		bridge.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
+		bridge.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
 		bridge.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
 		bridge.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
-        bridge.removeEventListener(ModalWindowRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
-        bridge.removeEventListener(ModalWindowRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
-        bridge.removeEventListener(ModalWindowRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
+        bridge.removeEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
+        bridge.removeEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
+        bridge.removeEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
         bridge.removeEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
         bridge.removeEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
         bridge.removeEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
@@ -1645,8 +1641,8 @@
 		}

 		var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
-		bridge.addEventListener(SizeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
-		bridge.addEventListener(SizeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
+		bridge.addEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
+		bridge.addEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);

 		// need to listener to parent system manager to get broadcast messages.
 		bridge.addEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST,
@@ -1674,8 +1670,8 @@
 		}

 		var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
-		bridge.removeEventListener(SizeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
-		bridge.removeEventListener(SizeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
+		bridge.removeEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
+		bridge.removeEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);

 		// need to listener to parent system manager to get broadcast messages.
 		bridge.removeEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST,
@@ -1887,7 +1883,7 @@
     */
     public function deployMouseShields(deploy:Boolean):void
     {
-        var me:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.DRAG_MANAGER_REQUEST, false, false,
+        var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST, false, false,
                                     "mouseShield", deploy);
         getSandboxRoot().dispatchEvent(me);
     }
@@ -1907,7 +1903,7 @@
 		{
 			var sbRoot:DisplayObject = getSandboxRoot();
 			var sendToSbRoot:Boolean = sbRoot != this;
-			var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.NOTIFY_WINDOW_ACTIVATED,
+			var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE,
 																	    false, false,
 	       																sendToSbRoot ? window :
 	       																NameUtil.displayObjectToString(window));
@@ -1934,7 +1930,7 @@
 		{
 			var sbRoot:DisplayObject = getSandboxRoot();
 			var sendToSbRoot:Boolean = sbRoot != this;
-			var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.NOTIFY_WINDOW_DEACTIVATED,
+			var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE,
 																	    false,
 																	    false,
 	       																sendToSbRoot ? window :
@@ -1960,7 +1956,7 @@
 		var bridge:IEventDispatcher = swfBridgeGroup ? swfBridgeGroup.parentBridge : null;
 		if (bridge)
 		{
-			var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.NOTIFY_APPLICATION_ACTIVATED,
+			var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE,
 																		false, false,
 																		bridge);
 			bridge.dispatchEvent(bridgeEvent);
@@ -2027,10 +2023,75 @@
 	private var currentSandboxEvent:Event;

 	/**
+	 * request the parent to add an event listener.
+	 */
+	private function addEventListenerToOtherSystemManagers(type:String, listener:Function, useCapture:Boolean = false,
+				priority:int=0, useWeakReference:Boolean=false):void
+	{
+		var arr:Array = SystemManagerGlobals.topLevelSystemManagers;
+		if (arr.length < 2)
+			return;
+
+		SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
+		var n:int = arr.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			if (arr[i] != this)
+			{
+				arr[i].addEventListener(type, listener, useCapture, priority, useWeakReference);
+			}
+		}
+		SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
+	}
+
+	/**
+	 * request the parent to remove an event listener.
+	 */
+	private function removeEventListenerFromOtherSystemManagers(type:String, listener:Function,
+	                                                  useCapture:Boolean = false):void
+	{
+		var arr:Array = SystemManagerGlobals.topLevelSystemManagers;
+		if (arr.length < 2)
+			return;
+
+		SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
+		var n:int = arr.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			if (arr[i] != this)
+			{
+				arr[i].removeEventListener(type, listener, useCapture);
+			}
+		}
+		SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
+	}
+
+	private var dispatchingToSystemManagers:Boolean = false;
+
+	/**
 	 *  dispatch the event to all sandboxes except the specified one
 	 */
-	public function dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null, trackClones:Boolean = false):void
-	{
+	public function dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null,
+						trackClones:Boolean = false, toOtherSystemManagers:Boolean = false):void
+	{
+		if (toOtherSystemManagers)
+		{
+			dispatchingToSystemManagers = true;
+			var arr:Array = SystemManagerGlobals.topLevelSystemManagers;
+			var n:int = arr.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				if (arr[i] != this)
+				{
+					arr[i].dispatchEvent(event);
+				}
+			}
+			dispatchingToSystemManagers = false;
+		}
+
+		if (!swfBridgeGroup)
+			return;
+
 		var clone:Event;
 		// trace(">>dispatchEventFromSWFBridges", this, event.type);
 		clone = event.clone();
@@ -2043,7 +2104,7 @@
 		}

 		var children:Array = swfBridgeGroup.getChildBridges();
-		for (var i:int = 0; i < children.length; i++)
+		for (i = 0; i < children.length; i++)
 		{
 			if (children[i] != skip)
 			{
@@ -2064,6 +2125,9 @@
 	private function addEventListenerToSandboxes(type:String, listener:Function, useCapture:Boolean = false,
 				priority:int=0, useWeakReference:Boolean=false, skip:IEventDispatcher = null):void
 	{
+		if (!swfBridgeGroup)
+			return;
+
 		// trace(">>addEventListenerToSandboxes", this, type);

 		var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, false, false,
@@ -2073,16 +2137,16 @@
 													useWeakReference);

 		var parentBridge:IEventDispatcher = swfBridgeGroup.parentBridge;
-		if (parentBridge)
-		{
+		if (parentBridge && parentBridge != skip)
 			parentBridge.addEventListener(type, listener, false, priority, useWeakReference);
-		}

 		var children:Array = swfBridgeGroup.getChildBridges();
 		for (var i:int; i < children.length; i++)
 		{
 		 	var childBridge:IEventDispatcher = IEventDispatcher(children[i]);
-			childBridge.addEventListener(type, listener, false, priority, useWeakReference);
+
+		 	if (childBridge != skip)
+			   childBridge.addEventListener(type, listener, false, priority, useWeakReference);
 		}

 		dispatchEventFromSWFBridges(request, skip);
@@ -2096,18 +2160,22 @@
 	                                                  useCapture:Boolean = false,
 	                                                  skip:IEventDispatcher = null):void
 	{
+		if (!swfBridgeGroup)
+			return;
+
 		// trace(">>removeEventListenerToSandboxes", this, type);
 		var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, false, false,
 																				type,
 																				useCapture);
 		var parentBridge:IEventDispatcher = swfBridgeGroup.parentBridge;
-		if (parentBridge)
+		if (parentBridge && parentBridge != skip)
 			parentBridge.removeEventListener(type, listener, useCapture);

 		var children:Array = swfBridgeGroup.getChildBridges();
 		for (var i:int; i < children.length; i++)
 		{
-			IEventDispatcher(children[i]).removeEventListener(type, listener, useCapture);
+		    if (children[i] != skip)
+			   IEventDispatcher(children[i]).removeEventListener(type, listener, useCapture);
 		}

 		dispatchEventFromSWFBridges(request, skip);
@@ -2121,16 +2189,16 @@
      *   @return true if the message should be processed, false if
      *   no other action is required.
      */
-    private function preProcessModalWindowRequest(request:ModalWindowRequest,
+    private function preProcessModalWindowRequest(request:SWFBridgeRequest,
                                                   sm:ISystemManager,
                                                   sbRoot:DisplayObject):Boolean
     {
         // should we process this message?
-        if (request.skip)
+        if (request.data.skip)
         {
             // skipping this sandbox,
             // but don't skip the next one.
-            request.skip = false;
+            request.data.skip = false;

             if (sm.useSWFBridge())
             {
@@ -2147,16 +2215,16 @@
             var forwardRequest:Boolean = false;

             // convert exclude component into a rectangle and forward to parent bridge.
-            if (request.type == ModalWindowRequest.CREATE_MODAL_WINDOW_REQUEST ||
-                request.type == ModalWindowRequest.SHOW_MODAL_WINDOW_REQUEST)
+            if (request.type == SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST ||
+                request.type == SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST)
             {
                 var exclude:ISWFLoader = sm.swfBridgeGroup.getChildBridgeProvider(request.requestor)
                                                  as ISWFLoader;
                 var excludeRect:Rectangle = ISWFLoader(exclude).getVisibleApplicationRect();
-                request.data = excludeRect;
+                request.data.excludeRect = excludeRect;
                 forwardRequest = true;
             }
-            else if (request.type == ModalWindowRequest.HIDE_MODAL_WINDOW_REQUEST)
+            else if (request.type == SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST)
                 forwardRequest = true;

             if (forwardRequest)
@@ -2166,7 +2234,7 @@

                 // The HIDE request does not need to be processed by each
                 // application, so dispatch it directly to the sandbox root.
-                if (request.type == ModalWindowRequest.HIDE_MODAL_WINDOW_REQUEST)
+                if (request.type == SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST)
                     sbRoot.dispatchEvent(request);
                 else
                     bridge.dispatchEvent(request);
@@ -2175,30 +2243,49 @@
         }

         // skip aftering sending the message over a bridge.
-        request.skip = false;
+        request.data.skip = false;

         return true;
     }

-	private function sandboxMouseListener(event:Event):void
-	{
-		// trace("sandboxMouseListener", this);
-		if (event is SandboxRootMouseEvent)
+	private function otherSystemManagerMouseListener(event:SandboxMouseEvent):void
+	{
+		if (dispatchingToSystemManagers)
 			return;

-		var marshaledEvent:Event = SandboxRootMouseEvent.marshal(event);
-		dispatchEventFromSWFBridges(marshaledEvent, event.target as IEventDispatcher);
+		dispatchEventFromSWFBridges(event);

 		// ask the sandbox root if it was the original dispatcher of this event
 		// if it was then don't dispatch to ourselves because we could have
 		// got this event by listening to sandboxRoot ourselves.
-		var me:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST);
+		var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
 		me.name = "sameSandbox";
 		me.value = event;
 		getSandboxRoot().dispatchEvent(me);

 		if (!me.value)
+			dispatchEvent(event);
+	}
+
+	private function sandboxMouseListener(event:Event):void
+	{
+		// trace("sandboxMouseListener", this);
+		if (event is SandboxMouseEvent)
+			return;
+
+		var marshaledEvent:Event = SandboxMouseEvent.marshal(event);
+		dispatchEventFromSWFBridges(marshaledEvent, event.target as IEventDispatcher);
+
+		// ask the sandbox root if it was the original dispatcher of this event
+		// if it was then don't dispatch to ourselves because we could have
+		// got this event by listening to sandboxRoot ourselves.
+		var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
+		me.name = "sameSandbox";
+		me.value = event;
+		getSandboxRoot().dispatchEvent(me);
+
+		if (!me.value)
 			dispatchEvent(marshaledEvent);
 	}

@@ -2208,7 +2295,7 @@
 			return;

         var actualType:String;
-		var eventObj:Object = event;
+		var request:EventListenerRequest = EventListenerRequest.marshal(event);
 		if (event.type == EventListenerRequest.ADD_EVENT_LISTENER_REQUEST)
 		{
 			if (!eventProxy)
@@ -2216,32 +2303,36 @@
 				eventProxy = new EventProxy(this);
 			}

-			// trace(">>eventListenerRequestHandler ADD ", this, eventObj.userType);
-
-			actualType = EventUtil.sandboxRootMouseEventMap[eventObj.userType];
+			actualType = EventUtil.sandboxMouseEventMap[request.eventType];
 			if (actualType)
 			{
-				addEventListenerToSandboxes(eventObj.userType, sandboxMouseListener,
-							eventObj.useCapture, eventObj.priority, eventObj.useWeakReference, event.target as IEventDispatcher);
+				if (isTopLevelRoot())
+				{
+					stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
+				}
+				else
+				{
+					super.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
+				}
+
+				addEventListenerToSandboxes(request.eventType, sandboxMouseListener,
+							request.useCapture, request.priority, request.useWeakReference, event.target as IEventDispatcher);
 				if (getSandboxRoot() == this)
                     super.addEventListener(actualType, eventProxy.marshalListener,
-                            eventObj.useCapture, eventObj.priority, eventObj.useWeakReference);
-			}
-			// trace("<<eventListenerRequestHandler ADD ", this, eventObj.userType);
+                            request.useCapture, request.priority, request.useWeakReference);
+			}
 		}
 		else if (event.type == EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST)
         {
-            // trace(">>eventListenerRequestHandler REMOVE ", this, eventObj.userType);
-            actualType = EventUtil.sandboxRootMouseEventMap[eventObj.userType];
+            actualType = EventUtil.sandboxMouseEventMap[request.eventType];
             if (actualType)
             {
-                removeEventListenerFromSandboxes(eventObj.userType, sandboxMouseListener,
-                            eventObj.useCapture, event.target as IEventDispatcher);
+                removeEventListenerFromSandboxes(request.eventType, sandboxMouseListener,
+                            request.useCapture, event.target as IEventDispatcher);
                 if (getSandboxRoot() == this)
                     super.removeEventListener(actualType, eventProxy.marshalListener,
-                            eventObj.useCapture);
+                            request.useCapture);
             }
-            // trace("<<eventListenerRequestHandler REMOVE ", this, eventObj.userType);
         }
 	}

@@ -2590,20 +2681,20 @@
 			}
 		}

-		if (hasSWFBridges())
+		if (hasSWFBridges() || SystemManagerGlobals.topLevelSystemManagers.length > 1)
 		{
 			if (!eventProxy)
 			{
 				eventProxy = new EventProxy(this);
 			}

-			var actualType:String = EventUtil.sandboxRootMouseEventMap[type];
+			var actualType:String = EventUtil.sandboxMouseEventMap[type];
 			if (actualType)
 			{
 				if (isTopLevelRoot())
 				{
 					stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
-					addEventListenerToSandboxes(SandboxRootMouseEvent.MOUSE_MOVE_SOMEWHERE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
+					addEventListenerToSandboxes(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
 				}
 				else
 				{
@@ -2611,6 +2702,11 @@
 				}

 				addEventListenerToSandboxes(type, sandboxMouseListener, useCapture, priority, useWeakReference);
+				if (!SystemManagerGlobals.changingListenersInOtherSystemManagers)
+					addEventListenerToOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture, priority, useWeakReference)
+				if (getSandboxRoot() == this)
+                    super.addEventListener(actualType, eventProxy.marshalListener,
+                            useCapture, priority, useWeakReference);

 				// Set useCapture to false because we will never see an event
 				// marshalled in the capture phase.
@@ -2691,11 +2787,16 @@
 			}
 		}

-		if (hasSWFBridges())
-		{
-			var actualType:String = EventUtil.sandboxRootMouseEventMap[type];
+		if (hasSWFBridges() || SystemManagerGlobals.topLevelSystemManagers.length > 1)
+		{
+			var actualType:String = EventUtil.sandboxMouseEventMap[type];
 			if (actualType)
 			{
+				if (getSandboxRoot() == this)
+                    super.removeEventListener(actualType, eventProxy.marshalListener,
+                            useCapture);
+				if (!SystemManagerGlobals.changingListenersInOtherSystemManagers)
+					removeEventListenerFromOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture);
 				removeEventListenerFromSandboxes(type, sandboxMouseListener, useCapture);
 				super.removeEventListener(type, listener, false);
 				return;
@@ -3073,10 +3174,10 @@
 	 */
 	private function addPopupRequestHandler(event:Event):void
 	{
-		if (event.target != this && event is PopUpRequest)
+		if (event.target != this && event is SWFBridgeRequest)
 			return;

-		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
+		var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);

 		// If there is not for mutual trust between us an the child that wants the
 		// popup, then don't host the pop up.
@@ -3100,30 +3201,30 @@
 		}

 		// add popup as a child of this system manager
-        if (!popUpRequest.childList || popUpRequest.childList == PopUpManagerChildList.PARENT)
-            topMost = popUpRequest.parent && popUpChildren.contains(popUpRequest.parent);
+        if (!popUpRequest.data.childList || popUpRequest.data.childList == PopUpManagerChildList.PARENT)
+            topMost = popUpRequest.data.parent && popUpChildren.contains(popUpRequest.data.parent);
         else
-            topMost = (popUpRequest.childList == PopUpManagerChildList.POPUP);
+            topMost = (popUpRequest.data.childList == PopUpManagerChildList.POPUP);

         var children:IChildList;
         children = topMost ? popUpChildren : this;
-        children.addChild(DisplayObject(popUpRequest.window));
+        children.addChild(DisplayObject(popUpRequest.data.window));

-        if (popUpRequest.modal)
+        if (popUpRequest.data.modal)
 	        numModalWindows++;

 		// add popup to the list of managed forms
-		var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.window, popUpRequest.requestor);
+		var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.data.window, popUpRequest.requestor);
 		forms.push(remoteForm);

 		if (!isTopLevelRoot() && swfBridgeGroup)
 		{
 			// We've added the popup as far as it can go.
 			// Add a placeholder to the top level root application
-			var request:PopUpRequest = new PopUpRequest(PopUpRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false,
-			                                            popUpRequest.window);
+			var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, null,
+													{ window: popUpRequest.data.window});
 			request.requestor = popUpRequest.requestor;
-			request.placeHolderId = NameUtil.displayObjectToString(DisplayObject(popUpRequest.window));
+			request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(popUpRequest.data.window));
 			dispatchEvent(request);
 		}
 	}
@@ -3137,7 +3238,7 @@
 	 */
 	private function removePopupRequestHandler(event:Event):void
 	{
-		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
+		var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);

         if (swfBridgeGroup.parentBridge &&
             SecurityUtil.hasMutualTrustBetweenParentAndChild(this))
@@ -3147,23 +3248,23 @@
 			return;
 		}

-        if (popUpChildren.contains(popUpRequest.window))
-            popUpChildren.removeChild(popUpRequest.window);
+        if (popUpChildren.contains(popUpRequest.data.window))
+            popUpChildren.removeChild(popUpRequest.data.window);
         else
-            removeChild(DisplayObject(popUpRequest.window));
+            removeChild(DisplayObject(popUpRequest.data.window));

-        if (popUpRequest.modal)
+        if (popUpRequest.data.modal)
 			numModalWindows--;

-		removeRemotePopUp(new RemotePopUp(popUpRequest.window, popUpRequest.requestor));
+		removeRemotePopUp(new RemotePopUp(popUpRequest.data.window, popUpRequest.requestor));

 		if (!isTopLevelRoot() && swfBridgeGroup)
 		{
 			// if we got here we know the parent is untrusted, so remove placeholders
-			var request:PopUpRequest = new PopUpRequest(PopUpRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false,
+			var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false,
 														null);
 			request.requestor = swfBridgeGroup.parentBridge;
-			request.placeHolderId = NameUtil.displayObjectToString(popUpRequest.window);
+			request.data.placeHolderId = NameUtil.displayObjectToString(popUpRequest.data.window);
 			dispatchEvent(request);
 		}
 	}
@@ -3177,15 +3278,15 @@
 	 */
 	 private function addPlaceholderPopupRequestHandler(event:Event):void
 	 {
-		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
-
-		if (event.target != this && event is PopUpRequest)
+		var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
+
+		if (event.target != this && event is SWFBridgeRequest)
 			return;

 		if (!forwardPlaceholderRequest(popUpRequest, true))
 		{
 			// Create a RemotePopUp and add it.
-			var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.placeHolderId, popUpRequest.requestor);
+			var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.data.placeHolderId, popUpRequest.requestor);
 			forms.push(remoteForm);
 		}

@@ -3200,7 +3301,7 @@
 	 */
 	 private function removePlaceholderPopupRequestHandler(event:Event):void
 	 {
-		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
+		var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);

 		if (!forwardPlaceholderRequest(popUpRequest, false))
 		{
@@ -3210,7 +3311,7 @@
 			{
 				if (isRemotePopUp(forms[i]))
 				{
-					if (forms[i].window == popUpRequest.placeHolderId &&
+					if (forms[i].window == popUpRequest.data.placeHolderId &&
 					    forms[i].bridge == popUpRequest.requestor)
 					{
 						forms.splice(i, 1);
@@ -3237,7 +3338,6 @@
 		if (bridge)
 		{
 			var sbRoot:DisplayObject = getSandboxRoot();
-			eObj.sender =  bridge;
 			if (sbRoot == this)
 			{
 				if (!(eObj.data is String))
@@ -3278,26 +3378,26 @@
 		// stop on the way up the parent chain.
 		var refObj:Object = null;
 		var oldId:String = null;
-		if (eObj.window)
-		{
-			refObj = eObj.window;
+		if (eObj.data.window)
+		{
+			refObj = eObj.data.window;

 			// null this ref out so untrusted parent cannot see
-			eObj.window = null;
+			eObj.data.window = null;
 		}
 		else
 		{
 			refObj = eObj.requestor;

 			// prefix the existing id with the id of this object
-			oldId = eObj.placeHolderId;
-			eObj.placeHolderId = NameUtil.displayObjectToString(this) + "." + eObj.placeHolderId;
+			oldId = eObj.data.placeHolderId;
+			eObj.data.placeHolderId = NameUtil.displayObjectToString(this) + "." + eObj.data.placeHolderId;
 		}

 		if (addPlaceholder)
-			addPlaceholderId(eObj.placeHolderId, oldId, eObj.requestor, refObj);
+			addPlaceholderId(eObj.data.placeHolderId, oldId, eObj.requestor, refObj);
 		else
-			removePlaceholderId(eObj.placeHolderId);
+			removePlaceholderId(eObj.data.placeHolderId);

@@ -3331,7 +3431,7 @@
 			// deactivate the form
 			if (isRemotePopUp(form) &&
 				RemotePopUp(form).window == eObj.data &&
-				RemotePopUp(form).bridge == eObj.sender)
+				RemotePopUp(form).bridge == eObj.target)
 				deactivateForm(form);
 		}
 	}
@@ -3350,7 +3450,7 @@

 		if (!forwardFormEvent(eObj))
 			// just call activate on the remote form.
-			activateForm(new RemotePopUp(eObj.data, eObj.sender));
+			activateForm(new RemotePopUp(eObj.data, eObj.target));
 	}

 	/**
@@ -3381,10 +3481,10 @@
      */
     private function modalWindowRequestHandler(event:Event):void
     {
-        if (event is ModalWindowRequest)
+        if (event is SWFBridgeRequest)
             return;

-        var request:ModalWindowRequest = ModalWindowRequest.marshal(event);
+        var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);

         if (!preProcessModalWindowRequest(request, this, getSandboxRoot()))
             return;
@@ -3458,7 +3558,7 @@
             bridge.dispatchEvent(request);
         }
 		else if (eventProxy)
-			showMouseCursor = false;
+			SystemManagerGlobals.showMouseCursor = false;
 	}

     /**
@@ -3483,7 +3583,7 @@
 	        Object(event).data = request.data;           // update request
         }
 		else if (eventProxy)
-	        Object(event).data = showMouseCursor;
+	        Object(event).data = SystemManagerGlobals.showMouseCursor;

     }

@@ -3508,19 +3608,17 @@
             bridge.dispatchEvent(request);
         }
 		else if (eventProxy)
-	        showMouseCursor = true;
+	        SystemManagerGlobals.showMouseCursor = true;

     }

-	private var showMouseCursor:Boolean = true;
-
 	private function resetMouseCursorTracking(event:Event):void
 	{
 		if (isTopLevelRoot())
 		{
-			showMouseCursor = true;
-		}
-		else
+			SystemManagerGlobals.showMouseCursor = true;
+		}
+		else if (swfBridgeGroup.parentBridge)
 		{
 			var cursorRequest:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST);
 			var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
@@ -3676,8 +3774,7 @@
 	 * Is the child in event.data this system manager or a child of this
 	 * system manager?
 	 *
-	 * If the display object is a child event.preventDefault is called,
-	 * otherwise nothing is done.
+	 * Set the data property to indicate if the display object is a child
 	 */
 	private function isBridgeChildHandler(event:Event):void
 	{
@@ -3688,18 +3785,14 @@

 		var eObj:Object = Object(event);

-		if (eObj.data && rawChildren.contains(eObj.data as DisplayObject))
-		{
-			event.preventDefault();
-		}
+		eObj.data = eObj.data && rawChildren.contains(eObj.data as DisplayObject);
 	}

 	/**
 	 * Can this form be activated. The current test is if the given pop up
 	 * is visible and is enabled.
 	 *
-	 * If the can be activated event.preventDefault is called,
-	 * otherwise nothing is done.
+	 * Set the data proeprty to indicate if can be activated
 	 */
 	private function canActivateHandler(event:Event):void
 	{
@@ -3732,8 +3825,7 @@
 				 	if (popUp.bridge)
 				 	{
 				 		popUp.bridge.dispatchEvent(request);
-				 		if (request.isDefaultPrevented())
-				 			event.preventDefault();
+				 		eObj.data = true;
 				 	}
 					return;
 				}
@@ -3744,13 +3836,11 @@
 		{
 			var smp:SystemManagerProxy = SystemManagerProxy(child);
 			var f:IFocusManagerContainer = findFocusManagerContainer(smp);
-			if (smp && f && canActivateLocalComponent(f))
-				event.preventDefault();
+			eObj.data = smp && f && canActivateLocalComponent(f);
 		}
 		else if (child is IFocusManagerContainer)
 		{
-			if (canActivateLocalComponent(child))
-				event.preventDefault();
+			eObj.data = canActivateLocalComponent(child);
 		}
 		else if (child is IEventDispatcher)
 		{
@@ -3763,8 +3853,7 @@
 			if (bridge)
 			{
 				bridge.dispatchEvent(request);
-				if (request.isDefaultPrevented())
-					event.preventDefault();
+				eObj.data = true;
 			}
 		}
 		else
@@ -3796,7 +3885,7 @@
 				var bp:ISWFBridgeProvider = swfBridgeGroup.getChildBridgeProvider(childBridge);
 				childBridge.dispatchEvent(request);
 				if (SecurityUtil.hasMutualTrustBetweenParentAndChild(bp) &&
-					request.data == false)
+					request.data == true)
 					return true;
 			}
 		}
@@ -3811,12 +3900,18 @@
 	{
 		// if we are broadcasting messages, ignore the messages
 		// we send to ourselves.
-		if (event is SandboxRootRequest)
+		if (event is InterManagerRequest)
 			return;

 		// initialize the registered manager implementation
 		var name:String = event["name"];
-		Singleton.getInstance(name);
+		try
+		{
+			Singleton.getInstance(name);
+		}
+		catch (e:Error)
+		{
+		}
 	}

 	/**
@@ -3831,7 +3926,7 @@
 		else
 		{
 			addingChild(child);
-			var me:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST);
+			var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
 			me.name = layer + ".addChild";
 			me.value = child;
 			getSandboxRoot().dispatchEvent(me);
@@ -3851,7 +3946,7 @@
 		else
 		{
 			removingChild(child);
-			var me:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST);
+			var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
 			me.name = layer + ".removeChild";
 			me.value = child;
 			getSandboxRoot().dispatchEvent(me);
@@ -3873,7 +3968,7 @@

 		// if we are broadcasting messages, ignore the messages
 		// we send to ourselves.
-		if (event is SandboxRootRequest)
+		if (event is InterManagerRequest)
 			return;

 		// initialize the registered manager implementation


Transferred from the Adobe Open Source Subversion Repository

Revision: 8309
Author:   aharui@adobe.com
Date:     2009-06-26T15:41:04.510261Z

Log Message:
-----------
Fix bugs in WindowedSystemManager related to drag-drop, off-screen mouse events, performance when lots of windows are up, and some cleanup

QE Notes: None
Doc Notes: None
Bugs: SDK-21507, SDK-20619, SDK-21453, SDK-21539
Reviewer: darrell
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/StageEventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>

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

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -46,6 +46,7 @@
 import mx.core.Singleton;
 import mx.core.IWindow;
 import mx.core.mx_internal;
+import mx.events.SandboxMouseEvent;
 import mx.events.DynamicEvent;
 import mx.events.FlexEvent;
 import mx.events.EventListenerRequest;
@@ -54,7 +55,6 @@
 import mx.styles.IStyleClient;
 import mx.utils.NameUtil;
 import mx.utils.ObjectUtil;
-

 use namespace mx_internal;

@@ -176,7 +176,6 @@
 	 */
 	private var mouseCatcher:Sprite;

-
     //----------------------------------
     //  applicationIndex
     //----------------------------------
@@ -1517,9 +1516,57 @@
 											  priority:int = 0,
 											  useWeakReference:Boolean = false):void
 	{
-		if (!dispatchEvent(new EventListenerRequest(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, false, true,
-						type, listener, useCapture, priority, useWeakReference)))
-			return;
+		if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN
+				|| type == Event.ACTIVATE || type == Event.DEACTIVATE)
+		{
+			// also listen to stage if allowed
+			try
+			{
+				if (stage)
+				{
+                    // Use weak listener because we don't always know when we
+                    // no longer need this listener
+					stage.addEventListener(type, stageEventHandler, false, 0, true);
+				}
+			}
+			catch (error:SecurityError)
+			{
+			}
+		}
+
+        if (hasEventListener("addEventListener"))
+        {
+            var request:DynamicEvent = new DynamicEvent("addEventListener", false, true);
+            request.eventType = type;
+            request.listener = listener;
+            request.useCapture = useCapture;
+            request.priority = priority;
+            request.useWeakReference = useWeakReference;
+		    if (!dispatchEvent(request))
+			    return;
+        }
+
+        if (type == SandboxMouseEvent.MOUSE_UP_SOMEWHERE)
+        {
+            // If someone wants this event, also listen for mouseLeave.
+            // Use weak listener because we don't always know when we
+            // no longer need this listener
+            try
+            {
+			    if (stage)
+			    {
+				    stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
+                }
+                else
+                {
+					super.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
+                }
+			}
+			catch (error:SecurityError)
+			{
+				super.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
+			}
+        }

 		// These two events will dispatched to applications in sandboxes.
 		if (type == FlexEvent.RENDER || type == FlexEvent.ENTER_FRAME)
@@ -1565,9 +1612,15 @@
 	override public function removeEventListener(type:String, listener:Function,
 												 useCapture:Boolean = false):void
 	{
-		if (!dispatchEvent(new EventListenerRequest(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, false, true,
-						type, listener, useCapture)))
-			return;
+        if (hasEventListener("removeEventListener"))
+        {
+            var request:DynamicEvent = new DynamicEvent("removeEventListener", false, true);
+            request.eventType = type;
+            request.listener = listener;
+            request.useCapture = useCapture;
+		    if (!dispatchEvent(request))
+			    return;
+        }

 		// These two events will dispatched to applications in sandboxes.
 		if (type == FlexEvent.RENDER || type == FlexEvent.ENTER_FRAME)
@@ -1579,22 +1632,60 @@

 			try
 			{
-			    // Remove both listeners in case the system manager was added
-			    // or removed from the stage after the listener was added.
 				if (stage)
 					stage.removeEventListener(type, listener, useCapture);
-
-					super.removeEventListener(type, listener, useCapture);
             }
             catch (error:SecurityError)
             {
-                super.removeEventListener(type, listener, useCapture);
             }
+			// Remove both listeners in case the system manager was added
+			// or removed from the stage after the listener was added.
+            super.removeEventListener(type, listener, useCapture);

             return;
         }

         super.removeEventListener(type, listener, useCapture);
+
+		if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN
+				|| type == Event.ACTIVATE || type == Event.DEACTIVATE)
+		{
+            if (!hasEventListener(type))
+            {
+			    // also listen to stage if allowed
+			    try
+			    {
+				    if (stage)
+				    {
+					    stage.removeEventListener(type, stageEventHandler, false);
+				    }
+			    }
+			    catch (error:SecurityError)
+			    {
+			    }
+            }
+		}
+
+        if (type == SandboxMouseEvent.MOUSE_UP_SOMEWHERE)
+        {
+            if (!hasEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE))
+            {
+                // nobody wants this event any more for now
+                try
+                {
+			        if (stage)
+			        {
+				        stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
+                    }
+			    }
+			    catch (error:SecurityError)
+			    {
+			    }
+			    // Remove both listeners in case the system manager was added
+			    // or removed from the stage after the listener was added.
+			    super.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
+            }
+        }
 	}

     //--------------------------------------------------------------------------
@@ -2029,5 +2120,24 @@
         myWindow = win;
         myWindow.nativeWindow.addEventListener(Event.CLOSE, cleanup);
     }
+
+    /**
+     *  @private
+     *  dispatch certain stage events from sandbox root
+     */
+    private function stageEventHandler(event:Event):void
+    {
+        if (event.target is Stage)
+            dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     *  convert MOUSE_LEAVE to MOUSE_UP_SOMEWHERE
+     */
+    private function mouseLeaveHandler(event:Event):void
+    {
+        dispatchEvent(new SandboxMouseEvent(SandboxMouseEvent.MOUSE_UP_SOMEWHERE));
+    }
 }
 }


FLEX-33655 Stop RTE inside SkinnablePopUpContainer

--- frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as
@@ -1170,9 +1170,11 @@
         // the size and position are snapped.
         uninstallActiveResizeListener();

-		var topLevelApp:Application = FlexGlobals.topLevelApplication as Application;
-        var softKeyboardRect:Rectangle = topLevelApp.softKeyboardRect;
-        var isKeyboardOpen:Boolean = isOpen && (softKeyboardRect.height > 0);
+        var softKeyboardRect:Rectangle;
+		if ("softKeyboardRect" in FlexGlobals.topLevelApplication)
+			softKeyboardRect = FlexGlobals.topLevelApplication.softKeyboardRect;
+
+		var isKeyboardOpen:Boolean = isOpen && softKeyboardRect && (softKeyboardRect.height > 0);

         // Capture start values if not set
         if (isNaN(softKeyboardEffectCachedYPosition))


Transferred from the Adobe Open Source Subversion Repository

Revision: 16679
Author:   rfrishbe@adobe.com
Date:     2010-06-25T21:09:29.726791Z

Log Message:
-----------
Check-in for touch lists so that List item renderers don't highlight immediately, and they are cancellable after a scroll starts.  In addition, in touch mode, we don't get a select event until mouse up.

QE notes: None
Doc notes: None
Bugs: -
Reviewer: None - this will get reviewed later
Tests run: checkintests, full mustella run (some tests failed and were off by a few pixels)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -947,7 +947,7 @@

         // Set any new properties on the renderer now that it's going to
         // come back into use.
-        itemSelected(itemIndex, isItemIndexSelected(itemIndex));
+        itemSelected(itemIndex, shouldItemAppearSelected(itemIndex));
 	/*
         if (isItemIndexSelected(itemIndex))
             itemSelected(itemIndex, true);
@@ -1042,6 +1042,19 @@
     mx_internal function isItemIndexSelected(index:int):Boolean
     {
         return index == selectedIndex;
+    }
+
+    /**
+     *  @private
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    mx_internal function shouldItemAppearSelected(index:int):Boolean
+    {
+        return isItemIndexSelected(index);
     }

     /**


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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


fix bug that allows NaN to be sent for VISIT_COUNT ("vid") on payloads

--- snowplow-as3-tracker/src/com/snowplowanalytics/snowplow/tracker/Tracker.as
+++ snowplow-as3-tracker/src/com/snowplowanalytics/snowplow/tracker/Tracker.as
@@ -831,7 +831,7 @@
 			// Build out the rest of the request
 			payload.add(Parameter.VIEWPORT, detectViewport());
 			payload.add(Parameter.DOCUMENT_SIZE, detectDocumentSize());
-			payload.add(Parameter.VISIT_COUNT, cookieVisitCount.toString());
+			payload.add(Parameter.VISIT_COUNT, isNaN(cookieVisitCount) ? 0 :  cookieVisitCount.toString());
 			payload.add(Parameter.DOMAIN_USER_ID, cookieDomainUserId); // Set to our local variable
 			payload.add(Parameter.USER_FINGERPRINT, cookieUserFingerprint.toString());
 			payload.add(Parameter.UID, businessUserId);


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

--- frameworks/projects/spark/src/spark/components/gridClasses/IGridItemEditor.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/IGridItemEditor.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


FIX: compiler error in AsynchronousHTTPServiceTestCase. Changed superclass to AsynchronousTestCase.

--- as3/src/asunit/framework/AsynchronousHTTPServiceTestCase.as
+++ as3/src/asunit/framework/AsynchronousHTTPServiceTestCase.as
@@ -14,7 +14,7 @@
      * Extend this class if you have a TestCase that requires the
      * asynchronous load of external data.
      */
-    public class AsynchronousHTTPServiceTestCase extends TestCase implements Test {
+    public class AsynchronousHTTPServiceTestCase extends AsynchronousTestCase implements Test {

         public function AsynchronousHTTPServiceTestCase(testMethod:String = null) {
             super(testMethod);