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

--- frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as
@@ -29,6 +29,7 @@
 import spark.effects.animation.IAnimationTarget;
 import spark.effects.animation.MotionPath;
 import spark.effects.animation.SimpleMotionPath;
+import spark.effects.easing.Linear;
 import spark.effects.easing.Sine;
 import spark.utils.MouseEventUtil;

@@ -37,12 +38,29 @@
 //--------------------------------------
 //  Styles
 //--------------------------------------
+
+/**
+ *  Color applied to highlight the selected side of the ToggleSwitch
+ *
+ *  @default #3F7FBA
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
+ */
+[Style(name="accentColor", type="uint", format="Color", inherit="yes")]

 /**
  *  The duration in milleseconds for an animating the thumb between
  *  the selected and unselected sides of the track. Animating between
  *  two arbitrary positions on the track, for example after a drag
- *  gesture, will take a proportionally shorter amount of time.
+ *  gesture, will take a proportionally shorter amount of time.
+ *
+ *  @default 125
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
  */
 [Style(name="slideDuration", type="Number", format="Time", inherit="no")]

@@ -65,8 +83,11 @@
  *  will change to be either selected or non-selected, according to the thumb's
  *  position.
  *
+ *  @langversion 3.0
  *  @playerversion AIR 3
  *  @productversion Flex 4.5.2
+ *
+ *  @includeExample examples/ToggleSwitchExample.mxml -noswf
  *
  *  @see spark.components.ToggleButton
  *  @see spark.components.HSlider
@@ -83,6 +104,7 @@
     /**
      *  Constructor.
      *
+	 *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
@@ -91,7 +113,6 @@
         super();
         stickyHighlighting = true;
         animator = new Animation();
-        animator.easer = new Sine(0);
     }

     //----------------------------------------------------------------------------------------------
@@ -103,7 +124,7 @@
     /**
      *  The last position of the mouse during a drag gesture
      */
-    private var lastMouseX:Number;
+    private var lastMouseX:Number = 0;

     /**
      *  Controls the mouse events driving a drag gesture on a
@@ -115,12 +136,12 @@
      *  Whether the mouse has moved during the current drag
      *  gesture
      */
-    private var mouseMoved:Boolean;
+    private var mouseMoved:Boolean = false;

     /**
      *  Where the thumb should be after the current animation ends
      */
-    private var slideToPosition:Number;
+    private var slideToPosition:Number = 0;

     /**
      *  The point where the current mouse gesture began
@@ -145,6 +166,7 @@
      *  current position along the track is given by
      *  thumbPosition.
      *
+	 *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
@@ -156,6 +178,7 @@
      *  A skin part that defines the bounds along which the thumb can
      *  be dragged.
      *
+	 *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
@@ -176,6 +199,8 @@
         var newValue:Number = selectedToPosition(value);
         slideToPosition = newValue;
         setThumbPosition(newValue);
+        // ToggleButtonBase issues this on buttonRelease, which we override
+        dispatchEvent(new Event(Event.CHANGE));
     }

     //----------------------------------------------------------------------------------------------
@@ -204,12 +229,12 @@

     /**
      *  @private
+	 *  additional setup is performed on mouse events, before
+	 *  we start the animation
      */
     mx_internal function set animator(value:Animation): void
     {
         _animator = value;
-        var animTarget:IAnimationTarget = new AnimationTargetHelper(animationUpdateHandler, animationEndHandler);
-        animator.animationTarget = animTarget;
     }

     //----------------------------------
@@ -227,6 +252,7 @@
      *  The thumb's current position, ranging from 0, unselected,
      *  to 1, selected.
      *
+	 *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
@@ -250,6 +276,15 @@
         updateSkinDisplayList();
     }

+	/**
+	 *  @private
+	 */
+	override protected function attachSkin():void
+	{
+		super.attachSkin();
+		skin.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
+	}
+
     /**
      *  @private
      */
@@ -284,10 +319,10 @@
     }

     /**
-     *  Specify the new position the toggle switch should animate to
-     *  at the end of the animation, selection will update
-     */
-    private function moveToPosition(newPosition:Number):void
+     *  Specify the new position the toggle switch should animate to.
+     *  At the end of the animation, selection will update.
+     */
+    private function moveToPositionAndSelect(newPosition:Number):void
     {
         var slideDuration:Number = getStyle("slideDuration");
         if (newPosition != thumbPosition && slideDuration > 0)
@@ -298,11 +333,10 @@

             // holds the final value to be set when animation ends
             slideToPosition = newPosition;
-            animator.duration = slideDuration *
+
+            var duration:Number = slideDuration *
                 (Math.abs(thumbPosition - slideToPosition));
-            animator.motionPaths = new <MotionPath>[
-                new SimpleMotionPath("position", thumbPosition, slideToPosition)];
-            animator.play();
+			animateToPosition(animator, thumbPosition, newPosition, duration);
         }
         else
         {
@@ -313,6 +347,62 @@

     }

+	/**
+	 *  Specify the new position the toggle switch should animate to
+	 *  during mouse drag.
+	 *  Selection does not update after the animation.
+	 */
+	private function moveToPosition(newPosition:Number):void
+    {
+		if (newPosition != thumbPosition)
+		{
+			// Finish any current animation before we start the next one.
+			if (animator.isPlaying)
+				stopAnimation();
+
+			animateToPosition(animator, thumbPosition, newPosition, MouseDragUtil.MAX_UPDATE_RATE);
+		}
+	}
+
+	/**
+	 *  Prepare the animator for use as a single animation to the edge of
+	 *  the track, or for use in a series of animations following mouse
+	 *  drag events.
+	 */
+	private function setupAnimator(animator:Animation, selectAtCompletion:Boolean):void
+    {
+		stopAnimation();
+
+		var animTarget:AnimationTargetHelper = animator.animationTarget as AnimationTargetHelper;
+		if (!animTarget)
+			animator.animationTarget = animTarget = new AnimationTargetHelper();
+
+		animTarget.updateFunction = animationUpdateHandler;
+		animator.motionPaths = new <MotionPath>[null];
+		if (selectAtCompletion)
+		{
+			animTarget.endFunction = animationEndHandler;
+			animator.easer = new Sine(0);
+		}
+		else
+		{
+			animTarget.endFunction = null;
+			animator.easer = new Linear();
+		}
+	}
+
+	/**
+	 *  Animate the thumb moving from startPosition to endPosition
+	 */
+	private function animateToPosition(animator:Animation, startPosition:Number, endPosition:Number, duration:Number):void
+    {
+		if (animator.isPlaying)
+			stopAnimation();
+		animator.duration = duration;
+		animator.motionPaths[0] = new SimpleMotionPath("position", startPosition, endPosition);
+		animator.play();
+	}
+
     /**
      *  Set the thumb position and update the component
      */
@@ -368,7 +458,24 @@
         return globalTrackDims.x - globalThumbDims.x;
     }

-    //----------------------------------------------------------------------------------------------
+	/**
+	 *  Is an animation running that will result in setting selected
+	 */
+	private function isSelectionAnimationRunning():Boolean
+	{
+		return animator && animator.isPlaying && (AnimationTargetHelper(animator.animationTarget).endFunction != null);
+	}
+
+	/**
+	 *  Adjust the skin when it updates
+	 */
+	private function updateCompleteHandler(event:FlexEvent):void
+	{
+		updateSkinDisplayList();
+		skin.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
+	}
+
+	//----------------------------------------------------------------------------------------------
     //
     //  Overridden Event handlers
     //
@@ -380,7 +487,7 @@
      */
     override protected function mouseEventHandler(event:Event):void
     {
-        if (animator && animator.isPlaying)
+        if (isSelectionAnimationRunning())
             return;
         super.mouseEventHandler(event);
     }
@@ -393,8 +500,10 @@
      */
     override protected function buttonReleased():void
     {
-        if (animator && animator.isPlaying)
+        if (isSelectionAnimationRunning())
             return;
+		setupAnimator(animator, true);
+
         var newPosition:Number;

         if (mouseMoved)
@@ -405,7 +514,7 @@
             // destination (not always the current value, as when animating)
             newPosition = selectedToPosition(slideToPosition < .5);

-        moveToPosition(newPosition);
+        moveToPositionAndSelect(newPosition);
         mouseMoved = false;
     }

@@ -422,8 +531,9 @@
      */
     private function mouseDownHandler(event:MouseEvent):void
     {
-        if (animator && animator.isPlaying)
+        if (isSelectionAnimationRunning())
             return;
+		setupAnimator(animator, false);
         mouseMoved = false;
         stageOffset = new Point(event.stageX, event.stageY);
         positionOffset = thumbPosition;
@@ -444,7 +554,7 @@
         {
             mouseMoved = true;
             var deltaX:Number = (lastMouseX - stageOffset.x) / getGlobalTrackRange();
-            setThumbPosition(positionOffset + deltaX);
+			moveToPosition(positionOffset + deltaX);
         }
     }

@@ -499,7 +609,7 @@
     public var updateFunction:Function;
     public var endFunction:Function;

-    public function AnimationTargetHelper(updateFunction:Function, endFunction:Function)
+    public function AnimationTargetHelper(updateFunction:Function = null, endFunction:Function = null)
     {
         this.updateFunction = updateFunction;
         this.endFunction = endFunction;
@@ -553,7 +663,7 @@
     private var dragPending:Boolean;
     private var dragTimer:Timer;

-    private static const MAX_DRAG_RATE:Number = 30;
+    public static const MAX_UPDATE_RATE:Number = 30;

     public function MouseDragUtil(target:UIComponent, handleDown:Function, handleMove:Function,
                                   handleThinnedMove:Function, handleUp:Function)
@@ -593,7 +703,7 @@

         if (!dragTimer)
         {
-            dragTimer = new Timer(1000 / MAX_DRAG_RATE, 0);
+            dragTimer = new Timer(1000 / MAX_UPDATE_RATE, 0);
             dragTimer.addEventListener(TimerEvent.TIMER, dragTimerHandler);
         }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.preloaders
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20644
Author:   mhorn@adobe.com
Date:     2011-03-07T18:49:20.181589Z

Log Message:
-----------
ASDoc updates

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarFirstTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarLastTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonBarButtonClassFactory.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as
@@ -54,6 +54,9 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     */
     static private const exclusions:Array = ["labelDisplay", "labelDisplayShadow"];

     //--------------------------------------------------------------------------
@@ -160,6 +163,9 @@
         graphics.endFill();
     }

+    /**
+     *  @private
+     */
     override protected function get focusSkinExclusions():Array
     {
         return exclusions;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/effects/animation/IAnimationTarget.as
+++ frameworks/projects/spark/src/spark/effects/animation/IAnimationTarget.as
@@ -13,9 +13,6 @@
 /**
  *  The IAnimationTarget interface is implemented by classes that support
  *  the events for an Animation instance.
- *  It is more typical to use the event listening mechanism on the Animation class,
- *  but an IAnimationTarget implementation approach can provide a lower
- *  overhead and higher performance in some situations for handling update events.
  *
  *  @see spark.effects.animation.Animation
  *


Restructured player implementation

Restructured player implementation

--- src/Player.as
+++ src/Player.as
@@ -1,38 +1,12 @@
 package {

-  import flash.display.Loader;
   import flash.display.Sprite;
   import flash.display.StageAlign;
   import flash.display.StageScaleMode;
-  import flash.events.Event;
-  import flash.events.NetStatusEvent;
   import flash.external.ExternalInterface;
-  import flash.media.SoundTransform;
-  import flash.media.Video;
-  import flash.net.NetConnection;
-  import flash.net.NetStream;
-  import flash.net.URLRequest;
   import flash.system.Security;

-  [SWF(backgroundColor="0x000000")]
   public class Player extends Sprite {
-
-    private var callbackId: String;
-
-    private var posterUrl: String;
-    private var videoUrl: String;
-    private var loop: Boolean;
-    private var muted: Boolean;
-    private var autoplay: Boolean;
-
-    private var videoPlaying: Boolean;
-
-    private var poster: Loader;
-    private var video: Video;
-    private var posterContainer: Sprite;
-
-    private var connection: NetConnection;
-    private var stream: NetStream;

     public function Player() {
       stage.align = StageAlign.TOP_LEFT;
@@ -41,142 +15,40 @@
       Security.allowDomain("*");
       Security.allowInsecureDomain("*");

-      registerExternalMethods();
+      var poster: Image = new Image(
+        loaderInfo.parameters.poster,
+        stage.stageWidth,
+        stage.stageHeight
+      );

-      posterUrl = loaderInfo.parameters.poster;
-      videoUrl = loaderInfo.parameters.video;
-      loop = loaderInfo.parameters.loop == "true";
-      muted = loaderInfo.parameters.muted == "true";
-      autoplay = loaderInfo.parameters.autoplay == "true";
+      var video: Video = new Video(
+        loaderInfo.parameters.video,
+        stage.stageWidth,
+        stage.stageHeight,
+        loaderInfo.parameters.autoplay == "true",
+        loaderInfo.parameters.loop == "true",
+        loaderInfo.parameters.muted == "true"
+      );

-      videoPlaying = autoplay;
+      addChildAt(poster, 0);
+      addChildAt(video, 1);

-      if (posterUrl) {
-        loadPoster();
-      }
+      registerJavaScriptAPI(video);

-      loadVideo();
-
-      if (allow(loaderInfo.parameters.callbackId)) {
-        callbackId = loaderInfo.parameters.callbackId;
-      }
-
-      if (callbackId) {
-        ExternalInterface.call(callback("onReady"));
-      }
+      onReady();
     }

-    private function callback(name: String): String {
-      return ["divinePlayer", name, callbackId].join("_");
+    private function onReady(): void {
+      ExternalInterface.call(["divinePlayer", ExternalInterface.objectID, "onReady"].join("_"));
     }

-    private function allow(callbackId: String): Boolean {
-      return /^[0-9]+$/i.test(callbackId);
+    private function registerJavaScriptAPI(video: Video): void {
+      ExternalInterface.addCallback("divinePlay", video.play);
+      ExternalInterface.addCallback("divinePause", video.pause);
+      ExternalInterface.addCallback("divinePaused", video.isPaused);
+      ExternalInterface.addCallback("divineMute", video.mute);
+      ExternalInterface.addCallback("divineUnmute", video.unmute);
+      ExternalInterface.addCallback("divineMuted", video.isMuted);
     }
-
-    private function play(): void {
-      videoPlaying = true;
-      stream.resume();
-    }
-
-    private function pause(): void {
-      videoPlaying = false;
-      stream.pause();
-    }
-
-    private function isPaused(): Boolean {
-      return !videoPlaying;
-    }
-
-    private function mute(): void {
-      muted = true;
-      stream.soundTransform = new SoundTransform(0);
-    }
-
-    private function unmute(): void {
-      muted = false;
-      stream.soundTransform = new SoundTransform(1);
-    }
-
-    private function isMuted(): Boolean {
-      return muted;
-    }
-
-    private function registerExternalMethods(): void {
-      ExternalInterface.addCallback("divinePlay", play);
-      ExternalInterface.addCallback("divinePause", pause);
-      ExternalInterface.addCallback("divinePaused", isPaused);
-      ExternalInterface.addCallback("divineMute", mute);
-      ExternalInterface.addCallback("divineUnmute", unmute);
-      ExternalInterface.addCallback("divineMuted", isMuted);
-    }
-
-    private function loadPoster(): void {
-      posterContainer = new Sprite();
-      posterContainer.width = stage.stageWidth;
-      posterContainer.height = stage.stageHeight;
-      addChildAt(posterContainer, 0);
-
-      poster = new Loader();
-      poster.contentLoaderInfo.addEventListener(Event.COMPLETE, function(): void {
-        posterContainer.addChild(poster);
-      });
-
-      poster.load(new URLRequest(posterUrl));
-    }
-
-    private function loadVideo(): void {
-      connection = new NetConnection();
-      connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
-      connection.connect(null);
-    }
-
-    private function netStatusHandler(e: NetStatusEvent): void {
-      switch (e.info.code) {
-        case "NetConnection.Connect.Success":
-          connectStream();
-          break;
-        case "NetStream.Play.Stop":
-          if (loop) {
-            stream.seek(0);
-          }
-          break;
-        case "NetConnection.Connect.Failed":
-        case "NetStream.Play.StreamNotFound":
-          throwError(e.info.code, e.info.description);
-          break;
-        default:
-          if (e.info.level == "error") {
-            throwError(e.info.code, e.info.description);
-          }
-      }
-    }
-
-    private function connectStream(): void {
-      video = new Video(stage.stageWidth, stage.stageHeight);
-      addChildAt(video, 1);
-
-      stream = new NetStream(connection);
-      stream.bufferTime = 0.5;
-      stream.soundTransform = new SoundTransform(muted ? 0 : 1);
-      stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
-      video.attachNetStream(stream);
-
-      stream.play(videoUrl);
-      if (autoplay) {
-        videoPlaying = true;
-      } else {
-        videoPlaying = false;
-        pause();
-      }
-    }
-
-    private function throwError(code: int, description: String): void {
-      if (callbackId) {
-        ExternalInterface.call(callback("onError"), code, description);
-      }
-    }
-
   }
-
-}+}


Fix docs, clarify.

Fix docs, clarify.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4934 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/Util.as
+++ src/as/com/threerings/util/Util.as
@@ -85,7 +85,8 @@
      * this method will protect other code from being broken by you.
      *
      * @param value the value to parse into XML.
-     * @param settings an Object containing your desired non-standard XML parsing settings.
+     * @param settings an Object containing your desired XML settings, or null (or omitted) to
+     * use the default settings.
      * @see XML#setSettings()
      */
     public static function newXML (value :Object, settings :Object = null) :XML
@@ -103,7 +104,8 @@
      * broken by you.
      *
      * @param xml the xml value to Stringify.
-     * @param settings an Object containing
+     * @param settings an Object containing your desired XML settings, or null (or omitted) to
+     * use the default settings.
      * @see XML#toString()
      * @see XML#setSettings()
      */
@@ -122,7 +124,8 @@
      * broken by you.
      *
      * @param xml the xml value to Stringify.
-     * @param settings an Object containing
+     * @param settings an Object containing your desired XML settings, or null (or omitted) to
+     * use the default settings.
      * @see XML#toXMLString()
      * @see XML#setSettings()
      */
@@ -138,7 +141,8 @@
      * restores the XML settings to their previous values.
      *
      * @param fn a function to be called with no arguments.
-     * @param settings any custom XML settings, or null to use the defaults.
+     * @param settings an Object containing your desired XML settings, or null (or omitted) to
+     * use the default settings.
      *
      * @return the return value of your function, if any.
      * @see XML#setSettings()
@@ -148,7 +152,7 @@
     {
         var oldSettings :Object = XML.settings();
         try {
-            XML.setSettings(settings);
+            XML.setSettings(settings); // setting to null resets to all the defaults
             return fn();
         } finally {
             XML.setSettings(oldSettings);


if (!isFinite(numberOfBins)) numberOfBins = 1;

--- WeaveJS/src/weavejs/data/bin/EqualIntervalBinningDefinition.as
+++ WeaveJS/src/weavejs/data/bin/EqualIntervalBinningDefinition.as
@@ -52,7 +52,8 @@
 			var maxInclusive:Boolean;
 			//var valuesPerBin:int = Math.ceil((dataMax - dataMin + 1) / dataInterval.value);
 			var numberOfBins:int = Math.ceil((dataMax - dataMin) / dataInterval.value);
-
+			if (!isFinite(numberOfBins))
+				numberOfBins = 1;
 			for (var iBin:int = 0; iBin < numberOfBins; iBin++)
 			{


I knew this was a bad idea. I just forgot.

--- tamarin-central/thane/as3src/flash/net/Socket.as
+++ tamarin-central/thane/as3src/flash/net/Socket.as
@@ -128,7 +128,7 @@

             _oPos = _oBuf.position;

-            if (read > 0) {
+            while (read > 0) {
                 _bytesTotal += read;
                 dispatchEvent(new ProgressEvent(ProgressEvent.SOCKET_DATA));
             }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/effects/interpolation/NumberInterpolator.as
+++ frameworks/projects/spark/src/spark/effects/interpolation/NumberInterpolator.as
@@ -69,20 +69,6 @@
             theInstance = new NumberInterpolator();
         return theInstance;
     }
-
-    /**
-     *  Returns Number, which is the data type of the
-     *  objects interpolated by the NumberInterpolator class.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get interpolatedType():Class
-    {
-        return Number;
-    }

     /**
      *  Interpolation for NumberInterpolator consists of a simple


Transferred from the Adobe Open Source Subversion Repository

Revision: 8535
Author:   chaase@adobe.com
Date:     2009-07-13T23:23:47.722512Z

Log Message:
-----------
Fixed some transform effects bugs plus a GraphicElement.localToGlobal() bug with the shared display object.

QE Notes: 8 failures in transform effects tests, 1 in Resize test, require changes to the test (new, correct behavior causes a change in the relevantStyles and affectedProperties return values)
Doc Notes: None
Bugs: sdk-21875, sdk-21465, sdk-21804, sdk-22165, sdk-21933
Reviewer: Jason, Glenn (for 21933)
Tests: checkintests, Mustella (spark/effects, mx/effects), Catalyst transition test

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -2510,8 +2510,8 @@
             return displayObject.localToGlobal(point);

         var returnVal:Point = displayObject.parent.localToGlobal(point);
-        returnVal.x += x;
-        returnVal.y += y;
+        returnVal.x += drawX;
+        returnVal.y += drawY;
         return returnVal;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 9360
Author:   chaase@adobe.com
Date:     2009-08-18T00:55:22.334227Z

Log Message:
-----------
Fix for shader-transition bug. Target objects inside containment hierarchy with filters (dropShadow, etc.) were not happening correctly (usually just blinking out the target during the effect). The problem was that the concatenatedMatrix for the target object is not correct in some cases, such as the case where there is a filter in the parent hierarchy. So we have to calculate our own, walking the parents and concatenating a matrix all the way up.

QE notes:  None.
Doc notes:  None.
Bugs:  sdk-19809
Reviewer:  Evtim (plus Glenn for some code that avoids importing UIComponent into MatrixUtil)
Tests run: checkintests, Mustella (spark/effects/[AnimateShaderTransition|Wipe|CrossFade])
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -2968,7 +2968,10 @@
             var bitmapData:BitmapData = new BitmapData(Math.ceil(rectBounds.width), Math.ceil(rectBounds.height), transparent, fillColor);

-            var m:Matrix = useLocalSpace ? displayObject.transform.matrix : displayObject.transform.concatenatedMatrix;
+            // Can't use target's concatenatedMatrix, as it is sometimes wrong
+            var m:Matrix = useLocalSpace ?
+                displayObject.transform.matrix :
+                MatrixUtil.getConcatenatedMatrix(displayObject);

             if (m)
                 m.translate(-rectBounds.x, -rectBounds.y);
@@ -2988,7 +2991,7 @@
             return get3DSnapshot(transparent, fillColor, useLocalSpace);
         }
     }
-
+
    /**
      *  @private
      *  Returns a bitmap snapshot of a 3D transformed displayObject. Since BitmapData.draw ignores


Transferred from the Adobe Open Source Subversion Repository

Revision: 6859
Author:   egeorgie@adobe.com
Date:     2009-05-12T21:39:54.947784Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-20353 Matrix3D is reseted unexpectedly in some test cases

Fix: Make sure that when the GraphicElement clears the matrix3D of its old DisplayObject, it does so only in the case where the matrix was set by the GE itself.

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

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

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -2277,11 +2277,13 @@

         var oldValue:DisplayObject = _displayObject;

-        //esg: matrix3D's are owned by a DO, so we need to reclaim any
-        // matrix3D we might have assigned.
-        if(oldValue != null)
+        // If we owned the old display object and we have assigned a 3D matrix,
+        // clear it from the display object so that we can set it in the new
+        // display object. A Matrix3D object can't be used simultaneously with
+        // more than one display object.
+        if (oldValue && sharedIndex == -1)
             oldValue.transform.matrix3D = null;
-
+
         _displayObject = value;
         dispatchPropertyChangeEvent("displayObject", oldValue, value);


Transferred from the Adobe Open Source Subversion Repository

Revision: 18480
Author:   egeorgie@adobe.com
Date:     2010-11-07T04:57:01.323333Z

Log Message:
-----------
Various Resizing Bugs: Ellipse, Path, Rounded Rect

In this change:

- new iterative algorithm for fitting transformed Path, Ellipse, Rounded Rect
- tweaked iterative algorithm for fitting non-transformed Path with miter limit
- fixes to calculating the bounding box of a rounded rect when radiusX != radiusY
- fix to MatrixUtil.fitBounds to take explicits into account in the case where both dimensions are specified
- fix to MatrixUtil to properly return null when no solution exists for 45 degree rotated elements when trying to fit in both dimensions
- fix to MatrixUtil to take explicit settings into account when relaxing constraints while trying to fit an element in both dimensions
- added min/max properties to SpriteVisualElement
- fix GraphicElement to avoid extra layout pass when dealing with transformations (looks like extra invalidation was added with the mirroring infrastrucutre)

QE notes: Maybe add a couple of tests for rotated ellipse, rotated path, rotated round rect, non-rotated path with stroke and miter limit joints
Doc notes:
Bugs: SDK-17269, SDK-26762, SDK-27321, SDK-27516, SDK-27589, SDK-28389
Reviewer: Kevin
Tests run: full mustella cyclone
Is noteworthy for integration: Yes, Yes, Yyyyyyyeeeeeeeeeeeees sir!!

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Rect.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -4398,7 +4398,7 @@
             if (layoutFeatures)  // mirroring transform depends on width
             {
                 layoutFeatures.layoutWidth = width;
-                invalidateTransform();
+                invalidateTransform(false /*changeInvalidatesLayering*/, false /*invalidateLayout*/);
             }

             if (width != oldWidth)


def: 1233 dont crash if overlayInterval is NaN

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

--- plugins/overlayPlugin/src/com/kaltura/kdpfl/plugin/component/OverlayMediator.as
+++ plugins/overlayPlugin/src/com/kaltura/kdpfl/plugin/component/OverlayMediator.as
@@ -159,7 +159,7 @@
 					}
 					break;

-				case "doPause":
+				case "doPause":
 					if (_overlayIntervalTimer && _overlayIntervalTimer.running) {
 						_overlayIntervalTimer.stop();
 					}
@@ -316,6 +316,9 @@
 		 *
 		 */
 		private function startOverlayIntervalTimer():void {
+			if (isNaN((viewComponent as overlayPluginCode).overlayInterval))
+				return;
+
 			if (!_overlayIntervalTimer) {
 				_overlayIntervalTimer = new Timer((viewComponent as overlayPluginCode).overlayInterval * 1000, 1);
 			}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6419
Author:   dsubrama@adobe.com
Date:     2009-04-30T15:47:21.078459Z

Log Message:
-----------
Need a null check before delegating to the layout for the next item to jump to.

Jason - DropDownList can now remove the extra keyDown handler since List no longer listens for keyDown in the capture phase.

Reviewer: Corey
Checkintests: Pass

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -712,7 +712,8 @@
             else currentIndex = selectedIndex;

 	        //Delegate to the layout to tell us what the next item is we should select.
-	        var proposedSelectedIndex:int = layout.nextItemIndex(event.keyCode, currentIndex, dataProvider.length - 1);
+	        var proposedSelectedIndex:int = (layout) ?
+	           layout.nextItemIndex(event.keyCode, currentIndex, dataProvider.length - 1) : -1;

 	        // Note that the KeyboardEvent is canceled even if the selectedIndex doesn't
             // change because we don't want another component to start handling these


add a killOnAlphaThreshold : Boolean argument to DiffuseShaderPart.getDiffuseColor() to enable/disable the kill that is sometime done at a later stage (cf. wireframe)

--- src/aerys/minko/render/shader/part/DiffuseShaderPart.as
+++ src/aerys/minko/render/shader/part/DiffuseShaderPart.as
@@ -20,7 +20,7 @@
 			super(main);
 		}

-		public function getDiffuseColor() : SFloat
+		public function getDiffuseColor(killOnAlphaThreshold : Boolean = true) : SFloat
 		{
 			var diffuseColor : SFloat	= null;

@@ -60,7 +60,7 @@
 				);
 			}

-			if (meshBindings.propertyExists(BasicProperties.ALPHA_THRESHOLD))
+			if (killOnAlphaThreshold && meshBindings.propertyExists(BasicProperties.ALPHA_THRESHOLD))
 			{
 				var alphaThreshold : SFloat = meshBindings.getParameter(
 					BasicProperties.ALPHA_THRESHOLD, 1


221 Removing uints: If passed negative numbers, the resultant quantity of 4-billion-and-something causes way too many obscure bugs

--- raw/src/org/yellcorp/string/StringUtil.as
+++ raw/src/org/yellcorp/string/StringUtil.as
@@ -25,19 +25,21 @@
     }

-    public static function repeat(str:String, times:uint):String
+    public static function repeat(str:String, times:int):String
     {
         var result:String = "";
-        do
-        {
-            if (times & 1) result += str;
-        } while ((times >>= 1) && (str += str));
-
+        if (times > 0)
+        {
+            do
+            {
+                if (times & 1) result += str;
+            } while ((times >>= 1) && (str += str));
+        }
         return result;
     }

-    public static function padLeft(value:*, totalWidth:uint,
+    public static function padLeft(value:*, totalWidth:int,
                                    padChar:String = " ",
                                    truncate:Boolean = false):String
     {
@@ -54,7 +56,7 @@
     }

-    public static function padRight(value:*, totalWidth:uint,
+    public static function padRight(value:*, totalWidth:int,
                                     padChar:String = " ",
                                     truncate:Boolean = false):String
     {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/events/ChildExistenceChangedEvent.as
+++ frameworks/projects/framework/src/mx/events/ChildExistenceChangedEvent.as
@@ -18,6 +18,11 @@
 /**
  *  Represents events that are dispatched when a the child of a control
  *  is created or destroyed.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ChildExistenceChangedEvent extends Event
 {
@@ -52,6 +57,11 @@
 	 *  </table>
 	 *
      *  @eventType childAdd
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const CHILD_ADD:String = "childAdd";

@@ -78,6 +88,11 @@
 	 *  </table>
 	 *
      *  @eventType childRemove
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const CHILD_REMOVE:String = "childRemove";

@@ -104,6 +119,11 @@
 	 *  </table>
 	 *
      *  @eventType overlayCreated
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const OVERLAY_CREATED:String = "overlayCreated";

@@ -123,6 +143,11 @@
 	 *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
 	 *
 	 *  @param relatedObject Reference to the child object that was created or destroyed.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ChildExistenceChangedEvent(
 								type:String, bubbles:Boolean = false,
@@ -146,6 +171,11 @@

 	/**
 	 *  Reference to the child object that was created or destroyed.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var relatedObject:DisplayObject;


Transferred from the Adobe Open Source Subversion Repository

Revision: 18841
Author:   cframpto@adobe.com
Date:     2010-11-29T20:43:10.671089Z

Log Message:
-----------
List classes will now dispatch valueCommit event as well as change event when selection changes.  Apps should be aware of this when setting up any data bindings.  The doc for valueCommit already says "Dispatched when values are changed programmatically or by user interaction" so this will make the code match the doc.

QE notes:
Doc notes:
Bugs:  SDK-25137
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration: yes - list classes will dispatch "value commit" event as well as change event when selection changes

Modified Paths:
--------------
<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/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1229,10 +1229,8 @@
                 dispatchEvent(e);
                 dispatchChangeAfterSelection = false;
             }
-            else
-            {
-                dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
-            }
+
+            dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));

             //Dispatch the caretChange event
             e = new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE);


Transferred from the Adobe Open Source Subversion Repository

Revision: 17136
Author:   clucier@adobe.com
Date:     2010-07-30T14:41:14.692867Z

Log Message:
-----------
Fix to disable transitions when updating recycled list item renderers.

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

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -922,39 +922,32 @@
      */
     override public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
     {
-        var transitions:Array;
-
+        // If there are transitions bound to the renderer, lets turn them
+        // off while we clear stale properties by setting ItemRenderer's
+        // mx_internal property, playTransitions, to false.
+        if (renderer is ItemRenderer)
+            ItemRenderer(renderer).playTransitions = false;
+
         // First clean up any old, stale properties like selected and caret
         if (renderer is IItemRenderer)
         {
-            // If there are transitions bound to the renderer, lets turn them
-            // off while we clear stale properties by setting ItemRenderer's
-            // mx_internal property, playTransitions, to false
-            if (renderer is ItemRenderer)
-                ItemRenderer(renderer).playTransitions = false;
-
             // TODO (dsubrama): - Go through helper methods to do this.
             // Make itemSelected()/itemShowingCaret() pass around the renderer
             // instead of index
-            //IItemRenderer(renderer).selected = false;
             IItemRenderer(renderer).showsCaret = false;
-
-            // Now turn the transitions back on by setting playTransitions
-            // back to true
-            if (renderer is ItemRenderer)
-                ItemRenderer(renderer).playTransitions = true;
         }

         // Set any new properties on the renderer now that it's going to
         // come back into use.
         itemSelected(itemIndex, shouldItemAppearSelected(itemIndex));
-	/*
-        if (isItemIndexSelected(itemIndex))
-            itemSelected(itemIndex, true);
-	*/

         if (isItemIndexShowingCaret(itemIndex))
             itemShowingCaret(itemIndex, true);
+
+        // Now turn the transitions back on by setting playTransitions
+        // back to true
+        if (renderer is ItemRenderer)
+            ItemRenderer(renderer).playTransitions = true;

         // Now run through and initialize the renderer correctly.  We
         // call super.updateRenderer() last because super.updateRenderer()


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

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

 package mx.skins.wireframe
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 14354
Author:   jimurphy@adobe.com
Date:     2010-02-23T15:05:48.761194Z

Log Message:
-----------
resetting the build number in version.as
The build automated process checked it in as 4.5.0.13964 when it should have been 4.5.0.0

QE notes: no
Doc notes: no
Bugs: https://bugs.adobe.com/jira/browse/SDK-25489
Reviewer: no
Tests run: ran version test included in the bug
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Version.as</path>

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

--- frameworks/projects/automation_spark/src/spark/core/Version.as
+++ frameworks/projects/automation_spark/src/spark/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.5.0.13964";
+mx_internal static const VERSION:String = "4.5.0.0";


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/events/CollectionEvent.as
+++ frameworks/projects/framework/src/mx/events/CollectionEvent.as
@@ -0,0 +1,232 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.events
+{
+
+import flash.events.Event;
+
+/**
+ *  The mx.events.CollectionEvent class represents an event that is
+ *  dispatched when the associated collection changes.
+ *
+ *  @see FlexEvent#CURSOR_UPDATE
+ */
+public class CollectionEvent extends Event
+{
+	include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The CollectionEvent.COLLECTION_CHANGE constant defines the value of the
+     *  type property of the event object for an event that is
+     *  dispatched when a collection has changed.
+     *
+     *
The properties of the event object have the following values.
+     *  Not all properties are meaningful for all kinds of events.
+	 *  See the detailed property descriptions for more information.

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
items	An Array of objects with
+     *       information about the items affected by the event.
+	 * 		 The contents of this field depend on the event kind;
+	 *       for details see the items property

+     *
kind	The kind of event.
+     *       The valid values are defined in the CollectionEventKind
+	 *       class as constants.

+     *
location	Location within the target collection
+     *         of the item(s) specified in the items property.

+     *
oldLocation	the previous location in the collection
+     *         of the item specified in the items property.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *
type	CollectionEvent.COLLECTION_CHANGE

+     *

+     *
+     *  @eventType collectionChange
+     */
+    public static const COLLECTION_CHANGE:String = "collectionChange";
+
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+	 *
+     *  @param type The event type; indicates the action that triggered the event.
+     *
+     *  @param bubbles Specifies whether the event can bubble
+     *  up the display list hierarchy.
+     *
+     *  @param cancelable Specifies whether the behavior
+     *  associated with the event can be prevented.
+     *
+     *  @param kind Indicates the kind of event that occured.
+     *  The parameter value can be one of the values in the CollectionEventKind
+	 *  class, or null, which indicates that the kind is unknown.
+     *
+     *  @param location When the kind is
+     *  CollectionEventKind.ADD,
+     *  CollectionEventKind.MOVE,
+     *  CollectionEventKind.REMOVE, or
+     *  CollectionEventKind.REPLACE,
+     *  this value indicates at what location the item(s) specified
+     *  in the items property can be found
+     *  within the target collection.
+     *
+     *  @param oldLocation When the kind is
+     *  CollectionEventKind.MOVE, this value indicates
+     *  the old location within the target collection
+     *  of the item(s) specified in the items property.
+      *
+     *  @param items Array of objects with information about the items
+	 *  affected by the event, as described in the items property.
+     *  When the kind is CollectionEventKind.REFRESH
+     *  or CollectionEventKind.RESET, this Array has zero length.
+     */
+    public function CollectionEvent(type:String, bubbles:Boolean = false,
+                                    cancelable:Boolean = false,
+                                    kind:String = null, location:int = -1,
+                                    oldLocation:int = -1, items:Array = null)
+    {
+        super(type, bubbles, cancelable);
+
+        this.kind = kind;
+        this.location = location;
+        this.oldLocation = oldLocation;
+        this.items = items ? items : [];
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  kind
+	//----------------------------------
+
+    /**
+     *  Indicates the kind of event that occurred.
+     *  The property value can be one of the values in the
+	 *  CollectionEventKind class,
+	 *  or null, which indicates that the kind is unknown.
+	 *
+     *  @default null
+	 *
+	 *  @see CollectionEventKind
+     */
+    public var kind:String;
+
+	//----------------------------------
+	//  items
+	//----------------------------------
+
+    /**
+	 *  When the kind is CollectionEventKind.ADD
+     *  or CollectionEventKind.REMOVE the items property
+     *  is an Array of added/removed items.
+	 *  When the kind is CollectionEventKind.REPLACE
+     *  or CollectionEventKind.UPDATE the items property
+     *  is an Array of PropertyChangeEvent objects with information about the items
+     *  affected by the event.
+     *  When a value changes, query the newValue and
+     *  oldValue fields of the PropertyChangeEvent objects
+     *  to find out what the old and new values were.
+     *  When the kind is CollectionEventKind.REFRESH
+     *  or CollectionEventKind.RESET, this array has zero length.
+     *
+     *  @default [ ]
+     *
+     *  @see PropertyChangeEvent
+     */
+    public var items:Array;
+
+	//----------------------------------
+	//  location
+	//----------------------------------
+
+    /**
+     *  When the kind value is CollectionEventKind.ADD,
+     *  CollectionEventKind.MOVE,
+     *  CollectionEventKind.REMOVE, or
+     *  CollectionEventKind.REPLACE, this property is the
+	 *  zero-base index in the collection of the item(s) specified in the
+	 *  items property.
+     *
+     *  @see CollectionEventKind
+     *
+     *  @default -1
+     */
+    public var location:int;
+
+	//----------------------------------
+	//  oldLocation
+	//----------------------------------
+
+    /**
+     *  When the kind value is CollectionEventKind.MOVE,
+     *  this property is the zero-based index in the target collection of the
+     *  previous location of the item(s) specified by the items property.
+     *
+     *  @default -1
+     */
+    public var oldLocation:int;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Object
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function toString():String
+    {
+        return formatToString("CollectionEvent", "kind", "location",
+							  "oldLocation", "type", "bubbles",
+							  "cancelable", "eventPhase");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function clone():Event
+    {
+        return new CollectionEvent(type, bubbles, cancelable, kind, location, oldLocation, items);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5998
Author:   aharui@adobe.com
Date:     2009-04-07T21:04:02.889387Z

Log Message:
-----------
DownloadProgressBar enhancements/fixes.  LayoutManager no longer validates on RENDER during phased validation so that each end-of-phase event can update the progress bar.

Exposed a property in DownloadProgressBar so that folks can property set the rate at which the bar fills.

QE Notes: None
Doc Notes: Yes.  New API on DownloadProgressBar
Bugs: sdk-19830
Reviewer: glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>

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

--- frameworks/projects/framework/src/mx/managers/LayoutManager.as
+++ frameworks/projects/framework/src/mx/managers/LayoutManager.as
@@ -11,13 +11,12 @@

 package mx.managers
 {
-
+import flash.display.DisplayObject;
 import flash.display.Sprite;
 import flash.display.Stage;
 import flash.events.Event;
 import flash.events.EventDispatcher;

-import mx.core.FlexGlobals;
 import mx.core.ILayoutElement;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
@@ -262,12 +261,12 @@
 	/**
 	 *  @private
 	 */
-	private var callLaterObject:UIComponent;
-
-	/**
-	 *  @private
-	 */
-	private var callLaterPending:Boolean = false;
+	private var waitedAFrame:Boolean = false;
+
+	/**
+	 *  @private
+	 */
+	private var listenersAttached:Boolean = false;

 	/**
 	 *  @private
@@ -347,6 +346,7 @@
 			// the frame rate.  That will cause the enterFrame and render
 			// events to fire more promptly, which improves performance.
 			try {
+                // can't use FlexGlobals here.  It may not be setup yet
 				var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0];
 				var stage:Stage = SystemManagerGlobals.topLevelSystemManagers[0].stage;
 				if (stage)
@@ -384,7 +384,8 @@
         {
             _layoutDebugHelper = new LayoutDebugHelper();
             _layoutDebugHelper.mouseEnabled = false;
-            FlexGlobals.topLevelApplication.systemManager.addChild(_layoutDebugHelper);
+            var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
+            sm.addChild(_layoutDebugHelper);
         }
         return _layoutDebugHelper;
     } */
@@ -420,26 +421,13 @@
 	 */
 	public function invalidateProperties(obj:ILayoutManagerClient ):void
 	{
-		if (!invalidatePropertiesFlag && FlexGlobals.topLevelApplication.systemManager)
+        var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
+		if (!invalidatePropertiesFlag && sm)
 		{
 			invalidatePropertiesFlag = true;

-			if (!callLaterPending)
-			{
-				if (!callLaterObject)
-				{
-					callLaterObject = new UIComponent();
-					callLaterObject.systemManager =
-						FlexGlobals.topLevelApplication.systemManager;
-					callLaterObject.callLater(waitAFrame);
-				}
-				else
-				{
-					callLaterObject.callLater(doPhasedInstantiation);
-				}
-
-				callLaterPending = true;
-			}
+			if (!listenersAttached)
+				attachListeners(sm);
 		}

 		// trace("LayoutManager adding " + Object(obj) + " to invalidatePropertiesQueue");
@@ -484,25 +472,14 @@
 	 */
 	public function invalidateSize(obj:ILayoutManagerClient ):void
 	{
-		if (!invalidateSizeFlag && FlexGlobals.topLevelApplication.systemManager)
+        var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
+		if (!invalidateSizeFlag && sm)
 		{
 			invalidateSizeFlag = true;

-			if (!callLaterPending)
-			{
-				if (!callLaterObject)
-				{
-					callLaterObject = new UIComponent();
-					callLaterObject.systemManager =
-						FlexGlobals.topLevelApplication.systemManager;
-					callLaterObject.callLater(waitAFrame);
-				}
-				else
-				{
-					callLaterObject.callLater(doPhasedInstantiation);
-				}
-
-				callLaterPending = true;
+			if (!listenersAttached)
+			{
+				attachListeners(sm);
 			}
 		}

@@ -533,30 +510,19 @@
 	 */
 	public function invalidateDisplayList(obj:ILayoutManagerClient ):void
 	{
-		if (!invalidateDisplayListFlag && FlexGlobals.topLevelApplication.systemManager)
+        var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
+		if (!invalidateDisplayListFlag && sm)
 		{
 			invalidateDisplayListFlag = true;

-			if (!callLaterPending)
-			{
-				if (!callLaterObject)
-				{
-					callLaterObject = new UIComponent();
-					callLaterObject.systemManager =
-						FlexGlobals.topLevelApplication.systemManager;
-					callLaterObject.callLater(waitAFrame);
-				}
-				else
-				{
-					callLaterObject.callLater(doPhasedInstantiation);
-				}
-
-				callLaterPending = true;
-			}
-		}
-		else if (!invalidateDisplayListFlag && !FlexGlobals.topLevelApplication.systemManager)
-		{
-			// trace("FlexGlobals.topLevelApplication.systemManager is null");
+			if (!listenersAttached)
+			{
+				attachListeners(sm);
+			}
+		}
+		else if (!invalidateDisplayListFlag && !sm)
+		{
+			// trace("systemManager is null");
 		}

 		// trace("LayoutManager adding " + Object(obj) + " to invalidateDisplayListQueue");
@@ -715,8 +681,12 @@
 	/**
 	 *  @private
 	 */
-	private function doPhasedInstantiation():void
-	{
+	private function doPhasedInstantiation(event:Event = null):void
+	{
+        var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
+		sm.removeEventListener(Event.ENTER_FRAME, doPhasedInstantiation);
+		sm.removeEventListener(Event.RENDER, doPhasedInstantiation);
+
 		// trace(">>DoPhasedInstantation");

 		// If phasing, do only one phase: validateProperties(),
@@ -728,7 +698,7 @@
 				validateProperties();

 				// The Preloader listens for this event.
-				FlexGlobals.topLevelApplication.dispatchEvent(
+				sm.document.dispatchEvent(
 					new Event("validatePropertiesComplete"));
 			}

@@ -737,7 +707,7 @@
 				validateSize();

 				// The Preloader listens for this event.
-				FlexGlobals.topLevelApplication.dispatchEvent(
+				sm.document.dispatchEvent(
 					new Event("validateSizeComplete"));
 			}

@@ -746,7 +716,7 @@
 				validateDisplayList();

 				// The Preloader listens for this event.
-				FlexGlobals.topLevelApplication.dispatchEvent(
+				sm.document.dispatchEvent(
 					new Event("validateDisplayListComplete"));
 			}
 		}
@@ -764,21 +734,21 @@
 				validateDisplayList();
 		}

-		//// trace("invalidatePropertiesFlag " + invalidatePropertiesFlag);
-		//// trace("invalidateSizeFlag " + invalidateSizeFlag);
-		//// trace("invalidateDisplayListFlag " + invalidateDisplayListFlag);
+		// trace("invalidatePropertiesFlag " + invalidatePropertiesFlag);
+		// trace("invalidateSizeFlag " + invalidateSizeFlag);
+		// trace("invalidateDisplayListFlag " + invalidateDisplayListFlag);

 		if (invalidatePropertiesFlag ||
 			invalidateSizeFlag ||
 			invalidateDisplayListFlag)
 		{
-			callLaterObject.callLater(doPhasedInstantiation);
+			attachListeners(sm);
 		}
 		else
 		{
 			usePhasedInstantiation = false;

-			callLaterPending = false;
+			listenersAttached = false;

 			var obj:ILayoutManagerClient = ILayoutManagerClient(updateCompleteQueue.removeLargest());
 			while (obj)
@@ -818,7 +788,7 @@
 		if (!usePhasedInstantiation)
 		{
 			var infiniteLoopGuard:int = 0;
-			while (callLaterPending && infiniteLoopGuard++ < 100)
+			while (listenersAttached && infiniteLoopGuard++ < 100)
 				doPhasedInstantiation();
 		}
 	}
@@ -1048,14 +1018,40 @@
 	 *  callLater() is called immediately after an object is created.
 	 *  We really want to wait one more frame before starting in.
 	 */
-	private function waitAFrame():void
+	private function waitAFrame(event:Event):void
 	{
 		// trace(">>LayoutManager:WaitAFrame");

-		callLaterObject.callLater(doPhasedInstantiation);
+        var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
+		sm.removeEventListener(Event.ENTER_FRAME, waitAFrame);
+		sm.addEventListener(Event.ENTER_FRAME, doPhasedInstantiation);
+        waitedAFrame = true;

 		// trace("<<LayoutManager:WaitAFrame");
 	}
+
+	private function attachListeners(sm:ISystemManager):void
+	{
+		if (!waitedAFrame)
+		{
+			sm.addEventListener(Event.ENTER_FRAME, waitAFrame);
+		}
+		else
+		{
+			sm.addEventListener(Event.ENTER_FRAME, doPhasedInstantiation);
+			if (!usePhasedInstantiation)
+			{
+				if (sm && (sm.stage || sm.useSWFBridge()))
+				{
+					sm.addEventListener(Event.RENDER, doPhasedInstantiation);
+					if (sm.stage)
+						sm.stage.invalidate();
+				}
+			}
+		}
+
+		listenersAttached = true;
+	}
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4931
Author:   egeorgie@adobe.com
Date:     2009-02-11T22:21:29.973417Z

Log Message:
-----------
A small fallout of the graphicsClasses -> baseClasses rename.

QE Notes: None
Doc Notes:
Bugs: None
Reviewer: Ryan
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
+++ frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
@@ -846,7 +846,7 @@
         return value == null ||
                value == "mx.core::UIComponent" ||
                value == "mx.core::UITextField" ||
-               value == "mx.graphics.graphicsClasses::GraphicElement";
+               value == "mx.graphics.baseClasses::GraphicElement";
     }

     /**


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

--- frameworks/projects/mx/src/mx/accessibility/CheckBoxAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/CheckBoxAccImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2006 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.
 //
 ////////////////////////////////////////////////////////////////////////////////