Transferred from the Adobe Open Source Subversion Repository

Revision: 1262
Author:   jimurphy@adobe.com
Date:     2008-04-16T18:53:40.899270Z

Log Message:
-----------
Merged revisions 1219,1241,1261 via svnmerge from
http://opensource.adobe.com/svn/opensource/flex/sdk/branches/3.0.x

........
  r1219 | gosmith@adobe.com | 2008-04-15 14:00:39 -0400 (Tue, 15 Apr 2008) | 1 line

  Fixed a problem with the bin/asdoc tool. asDocHelper and asDocHelper.linux in asdoc/templates need to have the svn:executable property set.
........
  r1241 | genovese@adobe.com | 2008-04-15 21:55:32 -0400 (Tue, 15 Apr 2008) | 1 line

  ASDoc updates, added missing parameter descriptions, etc.
........
  r1261 | mhorn@adobe.com | 2008-04-16 14:38:28 -0400 (Wed, 16 Apr 2008) | 1 line

  bug fix FlexDocs-420
........

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/asdoc/templates/asDocHelper.linux</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/asdoc/templates/asDocHelper</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/AbstractTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ActionEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as
+++ frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as
@@ -307,6 +307,9 @@
         return msg;
     }

+    /**
+     * @private
+     */
     override protected function internalSend(message:IMessage, waitForClientId:Boolean = true):void
     {
         // If there is nothing to do with this message, do not send it - instead throw
@@ -333,7 +336,9 @@
                 setSubscribed(true);
         }
     }
-
+    /**
+     * @private
+     */
     override protected function setSubscribed(value:Boolean):void
     {
         /*


Transferred from the Adobe Open Source Subversion Repository

Revision: 3042
Author:   smgilson@adobe.com
Date:     2008-08-29T16:06:20.180689Z

Log Message:
-----------
Fix invalid HTML in ASDoc comments

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
+++ frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
@@ -53,10 +53,10 @@
      * in the Operation's argumentNames array and the values are the values of the parameters.
      * When using the default implementation, you must set argumentNames to have the same number
      * of elements as the parameters array.
-     *

-     * Note that this method is not used if you invoke the HTTP operation using the sendBody
+     *
+     *
Note that this method is not used if you invoke the HTTP operation using the sendBody
      * method which just takes a single object.  In that case, this step is skipped and only
-     * the serializeBody method is called.
+     * the serializeBody method is called.

      */
     public function serializeParameters(operation:AbstractOperation, params:Array):Object
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11625
Author:   rfrishbe@adobe.com
Date:     2009-11-10T20:03:43.934666Z

Log Message:
-----------
The last few cleanups for the OSMF video player.  Hooking up the videoObject property in VideoDisplay to return the flash.media.Video object.  Also, when pauseWhenHidden is set to false, we'll detach all the event listeners on the parents because they are no longer needed.

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

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

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -480,7 +480,15 @@
      */
     public function set pauseWhenHidden(value:Boolean):void
     {
+        if (_pauseWhenHidden == value)
+            return;
+
         _pauseWhenHidden = value;
+
+        if (_pauseWhenHidden)
+            addVisibilityListeners();
+        else
+            removeVisibilityListeners();

         changePlayback();
     }
@@ -775,7 +783,7 @@
      */
     public function get videoObject():Video
     {
-        return videoPlayer as Video;
+        return videoPlayer.view as Video;
     }

     //----------------------------------
@@ -1191,6 +1199,20 @@
         _isOnDisplayList = true;

         // add listeners to current parents to see if their visibility has changed
+        if (pauseWhenHidden)
+            addVisibilityListeners();
+
+        computeEffectiveVisibility();
+        changePlayback();
+    }
+
+    /**
+     *  @private
+     *  Add event listeners for SHOW and HIDE on all the ancestors up the parent chain.
+     *  Adding weak event listeners just to be safe.
+     */
+    private function addVisibilityListeners():void
+    {
         var current:IVisualElement = this;
         while (current)
         {
@@ -1199,19 +1221,14 @@

             current = current.parent as IVisualElement;
         }
-
-        computeEffectiveVisibility();
-        changePlayback();
-    }
-
-    /**
-     *  @private
-     */
-    private function removedFromStageHandler(event:Event):void
-    {
-        _isOnDisplayList = false;
-
-        // remove listeners from old parents
+    }
+
+    /**
+     *  @private
+     *  Remove event listeners for SHOW and HIDE on all the ancestors up the parent chain.
+     */
+    private function removeVisibilityListeners():void
+    {
         var current:IVisualElement = this;
         while (current)
         {
@@ -1220,6 +1237,18 @@

             current = current.parent as IVisualElement;
         }
+    }
+
+    /**
+     *  @private
+     */
+    private function removedFromStageHandler(event:Event):void
+    {
+        _isOnDisplayList = false;
+
+        // remove listeners from old parents
+        if (pauseWhenHidden)
+            removeVisibilityListeners();

         changePlayback();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 13062
Author:   smgilson@adobe.com
Date:     2009-12-17T19:26:46.231078Z

Log Message:
-----------
add complete event to MXML syntax

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

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

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -198,6 +198,7 @@
  *
  *    Events
  *    bytesLoadedChange="No default"
+ *    complete="No default"
  *    currentTimeChange="No default"
  *    durationChange="No default"
  *    mediaPlayerStateChange="No default"


updated Inflector inline doc

updated Inflector inline doc

--- vendor/ras3r/ras3r/Inflector.as
+++ vendor/ras3r/ras3r/Inflector.as
@@ -31,8 +31,13 @@
 			}
 		}

-		// capitalize first letter of first word
-		// lowercase all other letters
+		/**
+		*	capitalize()
+		*	Converts the first character to uppercase and the remainder to lowercase.
+		*
+		*	Example:
+		*		Inflector.capitalize('washington') #=> "Washington"
+		**/
 		public static function capitalize (word:String) :String
 		{
 			if (word.length > 0)
@@ -50,6 +55,15 @@
 			return qualifiedClassName.replace(/^.*::/, '');
 		}

+		/**
+		*	Inflector.humanize(lower_case_and_underscored_word)
+		*	Capitalizes the first word and turns underscores into spaces and strips a trailing "_id", if any.
+		*	Like titleize, this is meant for creating pretty output.
+		*
+		*	Examples:
+		* 		Inflector.humanize("employee_salary") # => "Employee salary"
+ 		*		Inflector.humanize("author_id")       # => "Author"
+ 		**/
 		public static function humanize (word:String) :String
 		{
 			return capitalize(word.replace(/_id$/, '').replace(/_/g, ' '));
@@ -79,6 +93,16 @@
 			return word.replace(/(.+)ries$/i, '$1ry').replace(/(.+)s$/i, '$1');
 		}

+		/**
+		*	titleize(word)
+		*	Capitalizes all the words and replaces some characters in the string to create a nicer looking title.
+		*	titleize is meant for creating pretty output.
+		*	titleize is also aliased as as titlecase.
+		*
+		*	Examples:
+		*		Inflector.titleize("man from the boondocks") # => "Man From The Boondocks"
+		*		Inflector.titleize("x-men: the last stand")  # => "X Men: The Last Stand"
+		**/
 		public static function titleize (word:String) :String
 		{
 			var f:Function = function (...args) :String
@@ -87,6 +111,7 @@
 			}
 			return humanize(underscore(word)).replace(/\b([a-z])/g, f);
 		}
+		public static var titlecase:Function = titleize;

 		public static function underscore (CamelCaseWord:String) :String
 		{


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/skins/halo/AdvancedDataGridColumnWrongDropIndicator.as
+++ frameworks/projects/advancedgrids/src/mx/skins/halo/AdvancedDataGridColumnWrongDropIndicator.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.skins.halo
+{
+
+import flash.display.Graphics;
+import mx.skins.ProgrammaticSkin;
+import mx.utils.ColorUtil;
+
+/**
+ *  The skin for the column drop indicator in an AdvancedDataGrid control
+ *  when the drop is not allowed.
+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class AdvancedDataGridColumnWrongDropIndicator extends ProgrammaticSkin
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AdvancedDataGridColumnWrongDropIndicator()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(w:Number, h:Number):void
+    {
+        super.updateDisplayList(w, h);
+
+        var g:Graphics = graphics;
+
+        g.clear();
+
+        g.lineStyle(1, 0xFFE1B2);
+        g.moveTo(0, 0);
+        g.lineTo(0, h);
+
+        g.lineStyle(1, ColorUtil.adjustBrightness(getStyle("themeColor"), -75));
+        g.moveTo(1, 0);
+        g.lineTo(1, h);
+
+        g.lineStyle(1, 0xFFE1B2);
+        g.moveTo(2, 0);
+        g.lineTo(2, h);
+    }
+}
+
+}


Do not disable interval after vimp

Do not disable interval after vimp

DoubleVerify uses logging to create their pixels.

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -448,7 +448,7 @@
             _intervalsInView = (results.viewabilityState == OVVCheck.VIEWABLE && results.focus == true) ? _intervalsInView + 1 : 0;

             if (_impressionEventRaised == false && _intervalsInView >= VIEWABLE_IMPRESSION_THRESHOLD) {
-				_intervalTimer.removeEventListener(TimerEvent.TIMER, onIntervalCheck);
+				//_intervalTimer.removeEventListener(TimerEvent.TIMER, onIntervalCheck);
                 raiseImpression(results);
             }
             else if (_impressionUnmeasurableEventRaised == false && _intervalsUnMeasurable >= UNMEASURABLE_IMPRESSION_THRESHOLD) {
@@ -626,14 +626,14 @@
 		private function raiseImpression(ovvData:*):void
 		{
 			dispatchEvent(new OVVEvent(OVVEvent.OVVImpression, ovvData));
-			_intervalTimer.removeEventListener(TimerEvent.TIMER, onIntervalCheck);
+			//_intervalTimer.removeEventListener(TimerEvent.TIMER, onIntervalCheck);
 			_impressionEventRaised = true;
 		}

 		private function raiseImpressionUnmeasurable(ovvData:*):void
 		{
 			dispatchEvent(new OVVEvent(OVVEvent.OVVImpressionUnmeasurable, ovvData));
-			_intervalTimer.removeEventListener(TimerEvent.TIMER, onIntervalCheck);
+			//_intervalTimer.removeEventListener(TimerEvent.TIMER, onIntervalCheck);
 			_impressionUnmeasurableEventRaised = true;
 		}


- change: Added getter for validation state to UIObject

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@573 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/ui/UIObject.as
+++ src/reprise/ui/UIObject.as
@@ -654,6 +654,14 @@
 		}

 		/**
+		 * Returns the UIObjects' validation state
+		 */
+		public function isValid() : Boolean
+		{
+			return m_isInvalidated;
+		}
+
+		/**
 		 * Returns all descentant elements that have the supplied tag name
 		 *
 		 * @param tagName The CSS tag name to match descendant elements against


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

--- frameworks/projects/mx/src/mx/containers/Canvas.as
+++ frameworks/projects/mx/src/mx/containers/Canvas.as
@@ -0,0 +1,368 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.containers
+{
+
+import flash.display.DisplayObject;
+import flash.geom.Rectangle;
+
+import mx.containers.utilityClasses.ConstraintColumn;
+import mx.containers.utilityClasses.ConstraintRow;
+import mx.containers.utilityClasses.CanvasLayout;
+import mx.containers.utilityClasses.IConstraintLayout;
+import mx.core.Container;
+import mx.core.EdgeMetrics;
+import mx.core.IUIComponent;
+import mx.core.mx_internal;
+import mx.styles.IStyleClient;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="focusIn", kind="event")]
+[Exclude(name="focusOut", kind="event")]
+
+[Exclude(name="focusBlendMode", kind="style")]
+[Exclude(name="focusSkin", kind="style")]
+[Exclude(name="focusThickness", kind="style")]
+[Exclude(name="paddingBottom", kind="style")]
+[Exclude(name="paddingLeft", kind="style")]
+[Exclude(name="paddingRight", kind="style")]
+[Exclude(name="paddingTop", kind="style")]
+
+[Exclude(name="focusInEffect", kind="effect")]
+[Exclude(name="focusOutEffect", kind="effect")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("Canvas.png")]
+
+/**
+ *  A Canvas layout container defines a rectangular region
+ *  in which you place child containers and controls.
+ *  It is the only container that lets you explicitly specify the location
+ *  of its children within the container by using the x and
+ *  y properties of each child.
+ *
+ *
Flex sets the children of a Canvas layout container to their
+ *  preferred width and preferred height.
+ *  You may override the value for a child's
+ *  preferred width by setting its width property to either
+ *  a fixed pixel value or a percentage of the container size.
+ *  You can set the preferred height in a similar manner.

+ *
+ *
If you use percentage sizing inside a Canvas container,
+ *  some of your components may overlap.
+ *  If this is not the effect you want, plan your component positions
+ *  and sizes carefully.

+ *
+ *
The Canvas container has the following default sizing characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Default size
+ *           Large enough to hold all its children at the default sizes of the children
+ *

+ *

+ *           Default padding
+ *           0 pixels for the top, bottom, left, and right values
+ *

+ *

+ *
+ *  @mxml
+ *
+ *
The <mx:Canvas> tag inherits all the tag attributes
+ *  of its superclass. Use the following syntax:

+ *
+ *

+ *

+ *  <mx:Canvas>
+ *    ...
+ *      child tags
+ *    ...
+ *  </mx:Canvas>
+ *

+ *

+ *
+ *  @includeExample examples/SimpleCanvasExample.mxml
+ */
+public class Canvas extends Container implements IConstraintLayout
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function Canvas()
+	{
+		super();
+
+		layoutObject.target = this;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var layoutObject:CanvasLayout = new CanvasLayout();
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  usePadding
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override mx_internal function get usePadding():Boolean
+	{
+		// We never use padding.
+		return false;
+	}
+
+	//--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  constraintColumns
+	//----------------------------------
+
+    [ArrayElementType("mx.containers.utilityClasses.ConstraintColumn")]
+	[Inspectable(arrayType="mx.containers.utilityClasses.ConstraintColumn")]
+
+	/**
+     *  @private
+     *  Storage for the constraintColumns property.
+     */
+    private var _constraintColumns:Array = [];
+
+	/**
+	 *  @copy mx.containers.utilityClasses.IConstraintLayout#constraintColumns
+	 */
+	public function get constraintColumns():Array
+    {
+        return _constraintColumns;
+    }
+
+    /**
+     *  @private
+     */
+    public function set constraintColumns(value:Array):void
+    {
+    	if (value != _constraintColumns)
+    	{
+	    	var n:int = value.length;
+	    	for (var i:int = 0; i < n; i++)
+	    	{
+	    		ConstraintColumn(value[i]).container = this;
+	    	}
+	       _constraintColumns = value;
+
+	       invalidateSize();
+	       invalidateDisplayList();
+     	}
+    }
+
+	//----------------------------------
+	//  constraintRows
+	//----------------------------------
+
+	[ArrayElementType("mx.containers.utilityClasses.ConstraintRow")]
+	[Inspectable(arrayType="mx.containers.utilityClasses.ConstraintRow")]
+
+	/**
+     *  @private
+     *  Storage for the constraintRows property.
+     */
+    private var _constraintRows:Array = [];
+
+	/**
+	 *  @copy mx.containers.utilityClasses.IConstraintLayout#constraintRows
+	 */
+	public function get constraintRows():Array
+    {
+        return _constraintRows;
+    }
+
+    /**
+     *  @private
+     */
+    public function set constraintRows(value:Array):void
+    {
+    	if (value != _constraintRows)
+    	{
+	    	var n:int = value.length;
+	    	for (var i:int = 0; i < n; i++)
+    		{
+    			ConstraintRow(value[i]).container = this;
+    		}
+			_constraintRows = value;
+
+			invalidateSize();
+	       	invalidateDisplayList();
+     	}
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Calculates the preferred minimum and preferred maximum sizes
+	 *  of the Canvas.
+	 *
+	 *
The measuredWidth of the Canvas is just large enough
+	 *  to display all of its children at their preferred widths
+	 *  without clipping them.
+	 *  This measure() method calculates the position of the
+	 *  right-most child, calculates the position of that child's right edge,
+	 *  and then adds room for the thickness of the Canvas container's border
+	 *  and the right padding.
+	 *  The measuredHeight is calculated similarly.

+	 *
+	 *
The Canvas container's minWidth and
+	 *  minHeight properties are not calculated,
+	 *  so Flex uses a default value of 0.

+	 *
+	 *
The Canvas container's maxWidth and
+	 *  maxHeight properties are not calculated.
+	 *  The container is assumed to have an infinite maximum
+	 *  width and height.

+	 *
+	 *
All of the values described previously are the measured widths
+	 *  and heights of Canvas.
+	 *  The user can override the measured values by calling the
+	 *  explicitly supplying a value
+	 *  for the following properties:

+	 *
+	 *

+	 *
width

+	 *
height

+	 *
minWidth

+	 *
minHeight

+	 *
maxWidth

+	 *
maxHeight

+	 *

+	 *
+	 *
You should not call this method directly.
+	 *  The Flex LayoutManager calls it at the appropriate time.
+	 *  At application startup, the Flex LayoutManager attempts to measure
+	 *  all components from the children to the parents before setting them
+	 *  to their final sizes.

+	 *
+	 *
This is an advanced method for use in subclassing.
+	 *  If you override this method, your implementation must either
+	 *  call the super.measure() method or set the
+	 *  measuredHeight and
+	 *  measuredWidth properties.
+	 *  You may also optionally set the following properties:
+	 *

+	 *
measuredMinWidth

+	 *
measuredMinHeight

+	 *

+	 *  These properties correspond to the layout properties listed previously
+	 *  and, therefore, are not documented separately.

+	 */
+	override protected function measure():void
+	{
+		super.measure();
+
+		layoutObject.measure();
+	}
+
+	/**
+	 *  Sets the size of each child of the container.
+	 *
+	 *
Canvas does not change the positions of its children.
+	 *  Each child is positioned according to the values of its
+	 *  x and y properties.

+	 *
+	 *
Canvas does set each child's width and height to be equal
+	 *  to that child's measuredWidth and
+	 *  measuredHeight if no width
+	 *  and height values are supplied.
+	 *  The child can also be made resizable by setting
+	 *  width and/or height to a percent value.
+	 *  Resizable children are bound by the right and bottom edges
+	 *  of the Canvas container.
+	 *  In this case, the child's minWidth,
+	 *  minHeight, maxWidth, and
+	 *  maxHeight values are honored.

+	 *
+	 *
You should not call this method directly.
+	 *  The Flex LayoutManager calls it at the appropriate time.
+	 *  At application startup, the Flex LayoutManager calls
+	 *  updateDisplayList() method on every component,
+	 *  starting with the Application object and working downward.

+	 *
+	 *
This is an advanced method for use in subclassing.
+	 *  If you override this method, your implementation should call the
+	 *  super.updateDisplayList() method and call the
+	 *  move() and setActualSize() methods
+	 *  on each of the children.
+	 *  For the purposes of performing layout, you should get the size
+	 *  of this container from the unscaledWidth and
+	 *  unscaledHeight properties, not the width
+	 *  and height properties.
+	 *  The width and height properties
+	 *  do not take into account the value of the scaleX
+	 *  and scaleY properties for this container.

+	 *
+     *  @param unscaledWidth Specifies the width of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleX property of the component.
+     *
+     *  @param unscaledHeight Specifies the height of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleY property of the component.
+	 *
+	 */
+	override protected function updateDisplayList(unscaledWidth:Number,
+												  unscaledHeight:Number):void
+	{
+		super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+		layoutObject.updateDisplayList(unscaledWidth, unscaledHeight);
+	}
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 9309
Author:   jimurphy@adobe.com
Date:     2009-08-14T12:57:06.648526Z

Log Message:
-----------
Merged 3.x revisions 8758,8762-8763,8765,8844-8845,8906,8970,9030,9049,9055,9096-9097,9191,9208,9221,9228,9242,9278 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.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/events/RSLEvent.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/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/LocaleSorter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLSchemaInstance.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ComboBox.as
+++ frameworks/projects/mx/src/mx/controls/ComboBox.as
@@ -17,12 +17,12 @@
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
-import flash.events.TextEvent;
+import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;
 import flash.text.TextLineMetrics;
 import flash.ui.Keyboard;
-import flash.utils.getTimer;
+
 import mx.collections.ArrayCollection;
 import mx.collections.CursorBookmark;
 import mx.controls.dataGridClasses.DataGridListData;
@@ -32,8 +32,8 @@
 import mx.controls.listClasses.ListBase;
 import mx.controls.listClasses.ListData;
 import mx.core.ClassFactory;
+import mx.core.EdgeMetrics;
 import mx.core.FlexVersion;
-import mx.core.EdgeMetrics;
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
 import mx.core.ScrollPolicy;
@@ -55,7 +55,6 @@
 import mx.managers.PopUpManager;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.StyleManager;
-import mx.styles.StyleProxy;

 use namespace mx_internal;

@@ -873,10 +872,8 @@
         selectionChanged = true;

         super.dataProvider = value;
-
+
         destroyDropdown();
-
-        _showingDropdown = false;

         invalidateProperties();
         invalidateSize();
@@ -1732,9 +1729,10 @@
             // weak reference to stage
             systemManager.addEventListener(Event.RESIZE, stage_resizeHandler, false, 0, true);
         }
-
-        _dropdown.scaleX = scaleX;
-        _dropdown.scaleY = scaleY;
+
+		var m:Matrix = transform.concatenatedMatrix;
+		_dropdown.scaleX = m.a; //scale x
+		_dropdown.scaleY = m.d; //scale y

         return _dropdown;
     }
@@ -1742,7 +1740,7 @@
     /**
      *  @private
      */
-    private function displayDropdown(show:Boolean, trigger:Event = null):void
+    private function displayDropdown(show:Boolean, trigger:Event = null, playEffect:Boolean = true):void
     {
         if (!initialized || show == _showingDropdown)
             return;
@@ -1859,6 +1857,8 @@
             _dropdown.enabled = false;

         duration = Math.max(1, duration);
+        if (!playEffect)
+            duration = 1;
         tween = new Tween(this, initY, endY, duration);

         if (easingFunction != null && tween)
@@ -1888,18 +1888,11 @@
      */
     private function destroyDropdown():void
     {
-        if (_dropdown && !_showingDropdown)
-        {
-            if (inTween)
-            {
-                tween.endTween();
-            }
-            else
-            {
-                PopUpManager.removePopUp(_dropdown);
-                _dropdown = null;
-            }
-        }
+        if (inTween)
+            tween.endTween();
+
+        displayDropdown(false, null, false);
+
     }

     //--------------------------------------------------------------------------
@@ -1985,14 +1978,7 @@
             invalidateDisplayList();

             destroyDropdown();
-
-            _showingDropdown = false;
-        }
-    }
-
-    private function popup_moveHandler(event:Event):void
-    {
-        destroyDropdown();
+        }
     }

     /**
@@ -2092,11 +2078,7 @@

     private function stage_resizeHandler(event:Event):void
     {
-        if (_dropdown)
-        {
-            _dropdown.$visible = false;
-            _showingDropdown = false;
-        }
+        destroyDropdown();
     }

     /**


Reverted TestSceneOld.as modifications.

Reverted TestSceneOld.as modifications.

--- Bin/Data/Scripts/TestSceneOld.as
+++ Bin/Data/Scripts/TestSceneOld.as
@@ -1,10 +1,10 @@
 // GraphicsTest rewrite from Urho3D 1.0

-const uint NUM_OBJECTS = 2500;
+const uint NUM_OBJECTS = 250;
 const uint NUM_LIGHTS = 20;
 const uint NUM_INSTANCENODES = 20;
 const uint NUM_INSTANCES = 50;
-const uint NUM_BILLBOARDNODES = 0;
+const uint NUM_BILLBOARDNODES = 20;
 const uint NUM_BILLBOARDS = 15;

 Scene@ testScene;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3684
Author:   jimurphy@adobe.com
Date:     2008-10-16T17:13:04.230817Z

Log Message:
-----------
Merged 3.0.x revisions 3614,3631,3643 -> trunk

Modified Paths:
--------------
<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/in/air/air_version.txt</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLLoader.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ComboBox.as
+++ frameworks/projects/mx/src/mx/controls/ComboBox.as
@@ -1943,6 +1943,10 @@
      */
     override protected function keyDownHandler(event:KeyboardEvent):void
     {
+        // If the combo box is disabled, don't do anything
+        if(!enabled)
+            return;
+
         // If a the editable field currently has focus, it is handling
         // all arrow keys. We shouldn't also scroll this selection.
         if (event.target == textInput)


ReactiveResource support for UUIDs as IDs

--- src/ras3r/ReactiveResource.as
+++ src/ras3r/ReactiveResource.as
@@ -145,7 +145,7 @@
 			return rr;
 		}

-		static private function find_single (self:Class, id:int, args:Hash = null) :*
+		static private function find_single (self:Class, id:String, args:Hash = null) :*
 		{
 			// assemble from: path
 			args.from = element_path(self, id, args);


Added a comment

Added a comment

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -542,6 +542,7 @@

 		/**
 		 * Handle VPAID event by publishing it to JavaScript.
+		 * In case when the event is AdVideoStart the internal interval that measures the asset will be started
 		 * In case when the event is AdVideoComplete the internal interval that measures the asset will be stopped
 		 * @param	event the VPAID event to handle
 		 */


Round and clamp volume.

Round and clamp volume.

--- src/goplayer/Player.as
+++ src/goplayer/Player.as
@@ -316,7 +316,7 @@

     public function set volume(value : Number) : void
     {
-      _volume = value
+      _volume = Math.round(clamp(value, 0, 1) * 100) / 100

       if (stream)
         stream.volume = value


Transferred from the Adobe Open Source Subversion Repository

Revision: 4246
Author:   clucier@adobe.com
Date:     2008-12-05T22:24:43.108525Z

Log Message:
-----------
Reverting revision 4240 and going with a more localized solution.
Reviewer: Ryan
QE Notes: This should address a pair of Mustella issues.
Doc Notes: None

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -8146,18 +8146,12 @@
             IRawChildrenContainer(this).rawChildren :
             IChildList(this);

-        var elementContainer:Boolean = childList is IVisualElementContainer;
-
         // Recursively call this method on each child.
-        var n:int = elementContainer ?
-            IVisualElementContainer(childList).numElements :
-            childList.numChildren;
+        var n:int = childList.numChildren;

         for (var i:int = 0; i < n; i++)
         {
-            var child:Object = elementContainer ?
-                IVisualElementContainer(childList).getElementAt(i) :
-                childList.getChildAt(i);
+            var child:Object = childList.getChildAt(i);

             if (child is IStyleClient)
             {
@@ -8264,13 +8258,11 @@
                         styleProp:String, recursive:Boolean):void
     {
         cachedTextFormat = null;
-        var elementContainer:Boolean = this is IVisualElementContainer;
-        var n:int = elementContainer ? IVisualElementContainer(this).numElements : numChildren;
+
+        var n:int = numChildren;
         for (var i:int = 0; i < n; i++)
         {
-            var child:ISimpleStyleClient = elementContainer ?
-                IVisualElementContainer(this).getElementAt(i) as ISimpleStyleClient :
-                getChildAt(i) as ISimpleStyleClient;
+            var child:ISimpleStyleClient = getChildAt(i) as ISimpleStyleClient;

             if (child)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11189
Author:   clucier@adobe.com
Date:     2009-10-27T19:33:04.160990Z

Log Message:
-----------
Adding better support for deferred instantiation and states. State overrides can now correctly override targets that are instantiated after a state change.  Moving the commitment of the initial state to earlier (during commit properties), this should avoid the secondary layout pass that used to occur after applicationComplete.  Removed creationComplete handler in UIComponent as it is no longer needed.  Fixing an issue in Group that was causing blendMode to be stuck as 'layered' when setting alpha to 0 then resetting it to a non zero value.

QE notes: None
Doc notes: None
Bugs: SDK-23105, SDK-23470, SDK-23790
Reviewer: Deepa, Glenn
Tests run: Full Cyclone, Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/OverrideBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetEventHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/RemoveChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -7507,9 +7507,18 @@
                 _currentStateDeferred = null;
                 currentState = newState;
             }
-
+
             oldScaleX = scaleX;
             oldScaleY = scaleY;
+        }
+
+        // Typically state changes occur immediately, but during
+        // component initialization we defer until commitProperties to
+        // reduce a bit of the startup noise.
+        if (_currentStateChanged && !initialized)
+        {
+            _currentStateChanged = false;
+            commitCurrentState();
         }

         if (x != oldX || y != oldY)
@@ -7527,7 +7536,6 @@
             errorStringChanged = false;
             setBorderColorForErrorString();
         }
-
     }

     //--------------------------------------------------------------------------
@@ -9279,13 +9287,7 @@
             else
             {
                 _currentStateChanged = true;
-
-                // We need to wait until we're fully initialized before commiting
-                // the current state. Otherwise children may not be created
-                // (if we're inside a deferred instantiation container), or
-                // bindings may not be fired yet.
-                addEventListener(FlexEvent.CREATION_COMPLETE,
-                                 creationCompleteHandler);
+                invalidateProperties();
             }
         }
     }
@@ -10915,34 +10917,6 @@
         }

         // trace("  <<calllaterdispatcher2 " + this);
-    }
-
-    /**
-     *  @private
-     *  Event handler called when creation is complete and we have a pending
-     *  current state change. We commit the current state change here instead
-     *  of inside commitProperties since the state may have bindings to children
-     *  that have not been created yet if we are inside a deferred instantiation
-     *  container.
-     */
-    private function creationCompleteHandler(event:FlexEvent):void
-    {
-        if (_currentStateChanged)
-        {
-            _currentStateChanged = false;
-            commitCurrentState();
-
-            // Need to call validateNow() to avoid screen flicker. This handler
-            // is called immediately before the component is displayed, and
-            // changing states takes a frame to commit the changes, which
-            // results in the base state flashing quickly on the screen before
-            // the desired state is entered.
-            var newState:State = getState(currentState);
-            if (newState && newState.overrides.length > 0)
-                validateNow();
-        }
-
-        removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
     }

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


Fixes FLEX-18697.  Check-in tests run, mustella passes.

--- frameworks/projects/framework/src/mx/utils/ObjectUtil.as
+++ frameworks/projects/framework/src/mx/utils/ObjectUtil.as
@@ -1312,7 +1312,7 @@
                 key += flag;
                 var value:String = options[flag] as String;
                 if (value != null)
-                    key += value;
+					key += options[flag].toString();
             }
         }
         return key;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2464
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:50:33.449468Z

Log Message:
-----------
add flex 4 to trunk

Modified Paths:
--------------
134 paths were modified

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -0,0 +1,513 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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 flex.component
+{
+
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.events.TimerEvent;
+import flash.ui.Keyboard;
+import flash.utils.Timer;
+
+import flex.core.Flags32;
+import flex.core.SkinnableComponent;
+
+import mx.events.FlexEvent;
+import mx.managers.IFocusManagerComponent;
+
+/**
+ *  Dispatched when the user presses the Button control.
+ *  If the autoRepeat property is true,
+ *  this event is dispatched repeatedly as long as the button stays down.
+ *
+ *  @eventType mx.events.FlexEvent.BUTTON_DOWN
+ */
+[Event(name="buttonDown", type="mx.events.FlexEvent")]
+
+/**
+ *  Number of milliseconds to wait after the first buttonDown
+ *  event before repeating buttonDown events at each
+ *  repeatInterval.
+ *
+ *  @default 500
+ */
+[Style(name="repeatDelay", type="Number", format="Time", inherit="no")]
+
+/**
+ *  Number of milliseconds between buttonDown events
+ *  if the user presses and holds the mouse on a button.
+ *
+ *  @default 35
+ */
+[Style(name="repeatInterval", type="Number", format="Time", inherit="no")]
+
+/**
+ *  The built-in set of states for the Button component.
+ */
+[SkinStates("up", "over", "down", "disabled")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[DefaultTriggerEvent("click")]
+
+[DefaultProperty("content")]
+
+/**
+ *  Documentation is not currently available.
+ */
+public class Button extends SkinnableComponent implements IFocusManagerComponent
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+	public function Button()
+	{
+		super();
+
+		// DisplayObjectContainer properties.
+		// Setting mouseChildren to false ensures that mouse events
+		// are dispatched from the Button itself,
+		// not from its skins, icons, or TextField.
+		// One reason for doing this is that if you press the mouse button
+		// while over the TextField and release the mouse button while over
+		// a skin or icon, we want the player to dispatch a "click" event.
+		// Another is that if mouseChildren were true and someone uses
+		// Sprites rather than Shapes for the skins or icons,
+		// then we we wouldn't get a click because the current skin or icon
+		// changes between the mouseDown and the mouseUp.
+		// (This doesn't happen even when mouseChildren is true if the skins
+		// and icons are Shapes, because Shapes never dispatch mouse events;
+		// they are dispatched from the Button in this case.)
+		mouseChildren = false;
+	}
+
+	[Bindable("labelChanged")]
+	public function set label(value:String):void
+	{
+		content = value;
+		dispatchEvent(new Event("labelChanged"));
+	}
+	public function get label():String
+	{
+		return (content != null) ? content.toString():"";
+	}
+
+	[Bindable]
+	public var content:*
+
+	// -----------------------------------------------------------------------
+	//
+	// Public properties defining the state of the button.
+	//
+	// -----------------------------------------------------------------------
+
+	/**
+	 *  @return Returns true when the mouse cursor is over the button.
+	 */
+	public function get isHoveredOver():Boolean
+	{
+		return flags.isSet(isHoveredOverFlag);
+	}
+
+	/**
+	 *  Sets the flag indicating whether the mouse cursor
+	 *  is over the button.
+	 */
+	protected function setHoveredOver(value:Boolean):void
+	{
+		if (!flags.update(isHoveredOverFlag, value))
+			return;
+
+		invalidateSkinState();
+	}
+
+	/**
+	 *  @return Returns true when the mouse button is down and it was pressed
+	 *  while cursor was over the button.
+	 */
+	public function get isMouseCaptured():Boolean
+	{
+		return flags.isSet(isMouseCapturedFlag);
+	}
+
+	/**
+	 *  Sets the flag indicating whether the mouse has been pressed
+	 *  while cursor was over the button.
+	 */
+	protected function setMouseCaptured(value:Boolean):void
+	{
+		if (!flags.update(isMouseCapturedFlag, value))
+			return;
+
+		invalidateSkinState();
+
+		// System mouse handlers are not needed when the button is not mouse captured
+		if (!value)
+			removeSystemMouseHandlers();
+	}
+
+	/**
+	 *  @return Returns true when the button is enabled.
+	 */
+	public function get isEnabled():Boolean { return enabled; }
+
+    /**
+     *  @inheritDoc
+     */
+	override public function set enabled(value:Boolean):void
+	{
+		if (isEnabled == value)
+			return;
+		super.enabled = value;
+		invalidateSkinState();
+	}
+
+	/**
+	 *  @return Returns true when key has been pressed
+	 *  while button is in focus.
+	 */
+	public function get isKeyboardPressed():Boolean
+	{
+		return flags.isSet(isKeyboardPressedFlag);
+	}
+
+	/**
+	 *  Sets the flag indicating whether key has been pressed while
+	 *  button is in focus.
+	 */
+	protected function setKeyboardPressed(value:Boolean):void
+	{
+		if (!flags.update(isKeyboardPressedFlag, value))
+			return;
+		invalidateSkinState();
+	}
+
+    /**
+     *  If false, the Button displays its down skin
+     *  when the user presses it but changes to its over skin when
+     *  the user drags the mouse off of it.
+     *  If true, the Button displays its down skin
+     *  when the user presses it, and continues to display this skin
+     *  when the user drags the mouse off of it.
+     *
+     *
Button subclasses, such as the SliderThumb and ScrollThumb classes
+     *  or the up and down arrows of a ScrollBar, set
+     *  this property to true.

+     *
+     *  @default false
+     */
+    public function get stickyHighlighting():Boolean
+    {
+    	return flags.isSet(stickyHighlightingFlag);
+    }
+    public function set stickyHighlighting(value:Boolean):void
+    {
+    	if (!flags.update(stickyHighlightingFlag, value))
+    		return;
+
+    	invalidateSkinState();
+    }
+
+	protected static const isHoveredOverFlag:uint 		= 1 << 0;
+	protected static const isMouseCapturedFlag:uint 	= 1 << 1;
+	protected static const isKeyboardPressedFlag:uint	= 1 << 2;
+	protected static const autoRepeatFlag:uint			= 1 << 3;
+	protected static const stickyHighlightingFlag:uint	= 1 << 4;
+	protected static const downEventFiredFlag:uint		= 1 << 5;
+	protected static const lastFlag:uint				= 1 << 5;
+
+	protected var flags:Flags32 = new Flags32();
+
+	//--------------------------------------------------------------------------
+	//
+	//  States
+	//
+	//--------------------------------------------------------------------------
+
+	private function isDown():Boolean
+	{
+		if (!isEnabled)
+			return false;
+
+		if (isKeyboardPressed)
+			return true;
+
+		if (isMouseCaptured && (isHoveredOver || stickyHighlighting))
+			return true;
+		return false;
+	}
+
+	// GetState returns a string representation of the component's state as
+	// a combination of some of its public properties
+	protected override function getUpdatedSkinState():String
+	{
+		if (!isEnabled)
+			return "disabled";
+
+		if (isDown())
+			return "down";
+
+		if (isHoveredOver || isMouseCaptured )
+			return "over";
+
+		return "up";
+	}
+
+	override protected function commitSkinState(newState:String):void
+	{
+		super.commitSkinState(newState);
+
+		// Our state has changed, see whether we need to start/stop dispatching buttonDown
+		checkDownEventConditions();
+	}
+
+	private function checkDownEventConditions():void
+	{
+		var isCurrentlyDown:Boolean = isDown();
+
+		// If down state hasn't changed, simply return
+		if (!flags.update(downEventFiredFlag, isCurrentlyDown))
+			return;
+
+		if( isCurrentlyDown )
+			dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
+
+		checkAutoRepeatTimerConditions( isCurrentlyDown );
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Event handling
+	//
+	//--------------------------------------------------------------------------
+
+	override protected function attachBehaviors():void
+	{
+		super.attachBehaviors();
+
+		addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler);
+		addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler);
+		addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler);
+		addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler);
+		// TODO EGeorgie: should revisit, we are handling the CLICK during capture phase,
+		// since instance handlers are registered before base class handlers.
+		addEventListener(MouseEvent.CLICK, mouseEventHandler, true /*useCapture*/);
+		addEventListener("enabledChanged", enableChangedHandler);
+	}
+
+	override protected function removeBehaviors():void
+	{
+		removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler);
+		removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler);
+		removeEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler);
+		removeEventListener(MouseEvent.MOUSE_UP, mouseEventHandler);
+		removeEventListener(MouseEvent.CLICK, mouseEventHandler, true);
+		removeEventListener("enabledChanged", enableChangedHandler);
+	}
+
+	private function addSystemMouseHandlers():void
+	{
+		systemManager.addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, true /*useCapture*/);
+		systemManager.stage.addEventListener(Event.MOUSE_LEAVE, mouseEventHandler);
+	}
+
+	private function removeSystemMouseHandlers():void
+	{
+		systemManager.removeEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, true /*useCapture*/);
+		systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, mouseEventHandler);
+	}
+
+	protected function enableChangedHandler(event:Event):void
+	{
+		// Since enabled is part of our state, we need to invalidate it on changes.
+		invalidateSkinState();
+	}
+
+	protected function mouseEventHandler(event:Event):void
+	{
+		var mouseEvent:MouseEvent = event as MouseEvent;
+		switch (event.type)
+		{
+			case MouseEvent.ROLL_OVER:
+			{
+				// if the user rolls over while holding the mouse button
+				if (mouseEvent.buttonDown && !isMouseCaptured)
+					return;
+					setHoveredOver(true);
+				break;
+			}
+
+			case MouseEvent.ROLL_OUT:
+			{
+				setHoveredOver(false);
+				break;
+			}
+
+			case MouseEvent.MOUSE_DOWN:
+			{
+				// When the button is down we need to listen for mouse events outsied the button so that
+				// we update the state appropriately on mouse up.  Whenever isMouseCaptured changes to false,
+				// it will take care to remove those handlers.
+				addSystemMouseHandlers();
+				setMouseCaptured(true);
+				break;
+			}
+
+			case MouseEvent.MOUSE_UP:
+			{
+				if (event.currentTarget == this)
+					setHoveredOver(true);
+			} //fallthrough:
+			case Event.MOUSE_LEAVE:
+			{
+				setMouseCaptured(false);
+				break;
+			}
+
+			// Prevent the propagation of click from a disabled Button.
+			// This is conceptually a higher-level event and
+			// developers will expect their click handlers not to fire
+			// if the Button is disabled.
+			case MouseEvent.CLICK:
+			{
+				if(!isEnabled )
+					event.stopImmediatePropagation();
+				return;
+			}
+		}
+		if (mouseEvent)
+            mouseEvent.updateAfterEvent();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden event handlers: UIComponent
+	//
+	//--------------------------------------------------------------------------
+
+	override protected function focusOutHandler(event:FocusEvent):void
+	{
+		// Most of the time the system sends a rollout, but there are
+		// situations where the mouse is over something else
+		// that you don't get one so we force one on FOCUS_OUT.
+		super.focusOutHandler(event);
+
+		setMouseCaptured(false);
+		setKeyboardPressed(false);
+	}
+
+	override protected function keyDownHandler(event:KeyboardEvent):void
+	{
+		if( event.keyCode != Keyboard.SPACE )
+			return;
+		setKeyboardPressed(true);
+		event.updateAfterEvent();
+	}
+
+	override protected function keyUpHandler(event:KeyboardEvent):void
+	{
+		if( event.keyCode != Keyboard.SPACE )
+			return;
+		setKeyboardPressed(false);
+
+		if( isEnabled )
+			dispatchEvent(new MouseEvent(MouseEvent.CLICK));
+		event.updateAfterEvent();
+	}
+
+    //----------------------------------
+    //  autoRepeat
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Timer for doing auto-repeat.
+     */
+	private var autoRepeatTimer:Timer;
+
+    [Inspectable(defaultValue="false")]
+
+    /**
+     *  Specifies whether to dispatch repeated buttonDown
+     *  events if the user holds down the mouse button.
+     *
+     *  @default false
+     */
+    public function get autoRepeat():Boolean
+    {
+        return flags.isSet(autoRepeatFlag);
+    }
+    public function set autoRepeat(value:Boolean):void
+    {
+    	if (!flags.update(autoRepeatFlag, value))
+    		return;
+
+    	checkAutoRepeatTimerConditions( isDown() );
+    }
+
+	private function checkAutoRepeatTimerConditions(isButtonDown:Boolean):void
+	{
+		var needsTimer:Boolean = autoRepeat && isButtonDown;
+		var hasTimer:Boolean = autoRepeatTimer != null;
+
+		if (needsTimer == hasTimer)
+			return;
+
+		if (needsTimer)
+			startTimer();
+		else
+			stopTimer();
+	}
+
+	private function startTimer():void
+	{
+		autoRepeatTimer = new Timer(1);
+		autoRepeatTimer.delay = getStyle("repeatDelay");
+		autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeat_timerDelayHandler);
+		autoRepeatTimer.start();
+	}
+
+	private function stopTimer():void
+	{
+		autoRepeatTimer.stop();
+		autoRepeatTimer = null;
+	}
+
+	private function autoRepeat_timerDelayHandler(event:TimerEvent):void
+	{
+        autoRepeatTimer.reset();
+	    autoRepeatTimer.removeEventListener( TimerEvent.TIMER, autoRepeat_timerDelayHandler);
+
+	    autoRepeatTimer.delay = getStyle("repeatInterval");
+	    autoRepeatTimer.addEventListener( TimerEvent.TIMER, autoRepeat_timerHandler);
+	    autoRepeatTimer.start();
+	}
+
+	private function autoRepeat_timerHandler(event:TimerEvent):void
+	{
+		dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18550
Author:   egeorgie@adobe.com
Date:     2010-11-12T00:59:06.859716Z

Log Message:
-----------
Add SkinnablePopUpContainer

- Add SkinnablePopUpContainer
- Add two new events on UIComponent - state transition complete & interrupted
- Switch ViewMenut to extend SkinnablePopUpContainer

QE notes: Testing can begin, do a pass on ViewMenu as well
Doc notes:
Bugs:
Reviewer: Corey, Jason
Tests run: manual
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/PopUpCloseEvent.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/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/events/PopUpEvent.as
+++ frameworks/projects/spark/src/spark/events/PopUpEvent.as
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events
+{
+
+import flash.events.Event;
+
+/**
+ *  Dispatched by SkinnablePopUpContainer to single closing.
+ *
+ *
The event provides a mechanism to pass commit information from the container to
+ *  a listener.  One typical usage scenario is building a multiple-choice dialog with a
+ *  cancel button.  When a valid option is selected, the developer closes the dialog
+ *  with a call to the SkinnablePopUpContainer.close() method, passing
+ *  true to the commit parameter and optionally passing in
+ *  any relevant data.  When the SkinnablePopUpContainer has completed closing,
+ *  it will dispatch this event.  Then, in the listener, the developer can check
+ *  the commit parameter and perform the appropriate action.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+public class PopUpCloseEvent extends Event
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *
+     *  @eventType popUpClose
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public static const CLOSE:String = "close";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param commit Indicates whether the listener should commit the data from the PopUp.
+     *  @param data The PopUp data to commit.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function PopUpCloseEvent(commit:Boolean = false, data:* = undefined)
+    {
+        super(CLOSE);
+        this.commit = commit;
+        this.data = data;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  commit
+    //----------------------------------
+
+    /**
+     *  Whether the listener should commit the PopUp data.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public var commit:Boolean;
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  The PopUp data to commit.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public var data:*;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function clone():Event
+    {
+        return new PopUpCloseEvent(commit, data);
+    }
+}
+
+}


if no ILayoutParent, assume strand is ContentView

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.as
@@ -75,7 +75,7 @@
 		private function changeHandler(event:Event):void
 		{
 			var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
-			var contentView:IParentIUIBase = layoutParent.contentView;
+			var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(_strand);

 			var n:int = contentView.numElements;
 			var hasHorizontalFlex:Boolean;


fixed syntax error

fixed syntax error

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@433 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/media/SWFPlayer.as
+++ src/reprise/media/SWFPlayer.as
@@ -163,7 +163,7 @@

 		protected function framerate():uint
 		{
-			return m_loader.content ? m_loader.contentLoaderInfo.frameRate || 25;
+			return m_loader.content ? m_loader.contentLoaderInfo.frameRate : 25;
 		}


added comments

added comments

Change-Id: Ibcc9d6b58c19948c660ac4ce3a0492426fa10cf5

--- WeaveData/src/weave/data/KeySets/SortedKeySet.as
+++ WeaveData/src/weave/data/KeySets/SortedKeySet.as
@@ -90,6 +90,7 @@
 		private var _dependencies:ICallbackCollection = newDisposableChild(this, CallbackCollection);
 		private var _keySet:IKeySet;
 		private var _compare:Function;
+		// Note: not using newLinkableChild for _asyncSort because we do not trigger if sorting does not affect order
 		private var _asyncSort:AsyncSort = newDisposableChild(this, AsyncSort);
 		private var _sortedKeys:Array = [];
 		private var _prevSortedKeys:Array = [];
@@ -109,6 +110,7 @@

 		private function _handleSorted():void
 		{
+			// only trigger callbacks if sorting changes order
 			if (StandardLib.arrayCompare(_prevSortedKeys, _sortedKeys) != 0)
 				getCallbackCollection(this).triggerCallbacks();
 		}


BaseScrollContainer: fixed issue with Windows 10 and Edge browser incorrectly using the TouchEvent branch

--- source/feathers/controls/supportClasses/BaseScrollContainer.as
+++ source/feathers/controls/supportClasses/BaseScrollContainer.as
@@ -307,11 +307,11 @@
 		protected function baseScrollContainer_mousedownHandler(event:createjs.MouseEvent):void
 		{
 			var nativeEvent:UIEvent = event.nativeEvent;
-			if(createjs.Touch.isSupported())
+			if("ontouchstart" in window) //TouchEvent
 			{
 				var touches:Object = TouchEvent(nativeEvent).touches;
 			}
-			else
+			else //MouseEvent and PointerEvent
 			{
 				touches = [nativeEvent];
 			}
@@ -326,11 +326,11 @@
 		protected function baseScrollContainer_stage_stagemousemoveHandler(event:createjs.MouseEvent):void
 		{
 			var nativeEvent:UIEvent = event.nativeEvent;
-			if(createjs.Touch.isSupported())
+			if("ontouchstart" in window) //TouchEvent
 			{
 				var touches:Object = TouchEvent(nativeEvent).touches;
 			}
-			else
+			else //MouseEvent and PointerEvent
 			{
 				touches = [nativeEvent];
 			}


Remove duplications from founded copyable fields list.

--- dolly-framework/src/main/actionscript/dolly/Copier.as
+++ dolly-framework/src/main/actionscript/dolly/Copier.as
@@ -2,6 +2,8 @@

 import dolly.core.dolly_internal;
 import dolly.core.metadata.MetadataName;
+
+import flash.utils.Dictionary;

 import org.as3commons.reflect.Accessor;
 import org.as3commons.reflect.AccessorAccess;
@@ -14,7 +16,7 @@

 public class Copier {

-	private static function getCopyableFieldsOfType(type:Type):Vector.<Field> {
+	private static function getCopyableFieldsOfType(type:Type, foundFieldsMap:Dictionary):Vector.<Field> {
 		const result:Vector.<Field> = new Vector.<Field>();

 		var variable:Variable;
@@ -23,12 +25,16 @@
 		const isTypeCloneable:Boolean = type.hasMetadata(MetadataName.COPYABLE);
 		if (isTypeCloneable) {
 			for each(variable in type.variables) {
-				if (!variable.isStatic) {
+				if (!foundFieldsMap[variable.name] && !variable.isStatic) {
+					foundFieldsMap[variable.name] = variable;
 					result.push(variable);
 				}
 			}
 			for each(accessor in type.accessors) {
-				if (!accessor.isStatic && accessor.access == AccessorAccess.READ_WRITE) {
+				if (!foundFieldsMap[accessor.name]
+						&& !accessor.isStatic
+						&& accessor.access == AccessorAccess.READ_WRITE) {
+					foundFieldsMap[accessor.name] = accessor;
 					result.push(accessor);
 				}
 			}
@@ -37,14 +43,19 @@
 			for each(var metadataContainer:IMetadataContainer in metadataContainers) {
 				if (metadataContainer is Variable) {
 					variable = metadataContainer as Variable;
-					if (!variable.isStatic && variable.hasMetadata(MetadataName.COPYABLE)) {
+					if (!foundFieldsMap[variable.name]
+							&& !variable.isStatic
+							&& variable.hasMetadata(MetadataName.COPYABLE)) {
+						foundFieldsMap[variable.name] = variable;
 						result.push(variable);
 					}
 				} else if (metadataContainer is Accessor) {
 					accessor = metadataContainer as Accessor;
-					if (!accessor.isStatic
+					if (!foundFieldsMap[accessor.name]
+							&& !accessor.isStatic
 							&& accessor.access == AccessorAccess.READ_WRITE
 							&& accessor.hasMetadata(MetadataName.COPYABLE)) {
+						foundFieldsMap[accessor.name] = accessor;
 						result.push(accessor);
 					}
 				}
@@ -55,14 +66,15 @@
 	}

 	dolly_internal static function findCopyableFieldsForType(type:Type):Vector.<Field> {
-		var result:Vector.<Field> = getCopyableFieldsOfType(type);
+		var foundFields:Dictionary = new Dictionary();
+		var result:Vector.<Field> = getCopyableFieldsOfType(type, foundFields);

 		var superType:Type;
 		var superTypeCopyableFields:Vector.<Field>;

 		for each(var superTypeName:String in type.extendsClasses) {
 			superType = Type.forName(superTypeName);
-			superTypeCopyableFields = getCopyableFieldsOfType(superType);
+			superTypeCopyableFields = getCopyableFieldsOfType(superType, foundFields);
 			if (superTypeCopyableFields.length > 0) {
 				result = result.concat(superTypeCopyableFields);
 			}


Fixed repeat issue by setting timeout instead of using a flag

git-svn-id: 00225d326fbeb9978ee2ea3564602c0fe18eb5d2@1445848 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/ButtonAutoRepeatController.as
+++ frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/ButtonAutoRepeatController.as
@@ -53,21 +53,18 @@

         private var timeout:uint;
         private var repeater:uint;
-		private var stop:Boolean = false;

         private function mouseDownHandler(event:MouseEvent):void
         {
             event.target.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
             event.target.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
-			stop = false;
-            setTimeout(sendFirstRepeat, delay);
+            timeout = setTimeout(sendFirstRepeat, delay);
         }

         private function mouseOutHandler(event:MouseEvent):void
         {
             event.target.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
             event.target.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
-			stop = true;
             if (repeater > 0)
                 clearInterval(repeater);
             repeater = 0;
@@ -79,8 +76,7 @@
         private function mouseUpHandler(event:MouseEvent):void
         {
             event.target.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
-            event.target.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
-			stop = true;
+            event.target.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
             if (repeater > 0)
                 clearInterval(repeater);
             repeater = 0;
@@ -93,22 +89,13 @@
         {
             clearTimeout(timeout);
             timeout = 0;
-			if (!stop) {
-            	repeater = setInterval(sendRepeats, interval);
-            	IEventDispatcher(_strand).dispatchEvent(new Event("buttonRepeat"));
-			}
+        	repeater = setInterval(sendRepeats, interval);
+        	IEventDispatcher(_strand).dispatchEvent(new Event("buttonRepeat"));
         }

         private function sendRepeats():void
         {
-			if( stop ) {
-				if (repeater > 0 )
-					clearInterval(repeater);
-				repeater = 0;
-			}
-			else {
-        	    IEventDispatcher(_strand).dispatchEvent(new Event("buttonRepeat"));
-			}
+       	    IEventDispatcher(_strand).dispatchEvent(new Event("buttonRepeat"));
         }
 	}
 }


Rendering optimization.

Rendering optimization.

--- src/MorningStroll.as
+++ src/MorningStroll.as
@@ -21,6 +21,7 @@
       super(416, 600, MenuState, 1, 24, 24);
       FlxG.framerate = 30;
       FlxG.flashFramerate = 30;
+      FlxG.useBufferLocking = true;
       ViewSource.addMenuItem(this, "srcview/index.html");
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableContainerTabularData.as
+++ frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableContainerTabularData.as
@@ -0,0 +1,230 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.automation.tabularData
+{
+
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationTabularData;
+	import mx.core.Repeater;
+	import mx.core.mx_internal;
+
+	use namespace mx_internal;
+
+	/**
+	 * @private
+	 */
+	public class SkinnableContainerTabularData
+		implements IAutomationTabularData
+	{
+		include "../../core/Version.as";
+
+		/**
+		 *  Constructor
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function SkinnableContainerTabularData(container:IAutomationObject)
+		{
+			super();
+
+			this.containerDelegate = container;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		private var containerDelegate:IAutomationObject;
+
+		/**
+		 *  @private
+		 */
+		private var _values:Array;
+
+		/**
+		 *  @private
+		 */
+		private var oldStart:uint;
+
+		/**
+		 *  @private
+		 */
+		private var oldEnd:int;
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get firstVisibleRow():int
+		{
+			return 0;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get lastVisibleRow():int
+		{
+			return Math.max(numRows - 1, 0);
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get numRows():int
+		{
+			var visibleChildren:int = 0;
+			// code modified to avoid the usage of numAutomationChildren and
+			// getAutomationChildAt in a loop
+			var childList:Array  =  Automation.automationManager2.getAutomationChildrenArray(containerDelegate);
+
+			var n:int = childList?childList.length:0;
+			for (var i:int = 0; i < n; ++i)
+			{
+				var ao:IAutomationObject = childList[i] as IAutomationObject;
+				if (ao)
+				{
+					var disp:DisplayObject = ao as DisplayObject;
+					if (disp.visible && !(disp is Repeater))
+						++visibleChildren;
+				}
+			}
+			return visibleChildren;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get numColumns():int
+		{
+			var a:Array = _values || getValues(0, numRows);
+			return a && a.length > 0 ? a[0].length : 0;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get columnNames():Array
+		{
+			var result:Array = new Array(numColumns);
+			var n:int = result.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				result[i] = "";
+			}
+			return result;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getValues(start:uint = 0, end:uint = 0):Array
+		{
+			if (_values && oldStart == start && oldEnd == end)
+				return _values;
+
+			var longestRow:int = 1;
+			_values = [ ];
+			var k:int = 0;
+			// code modified to avoid the usage of numAutomationChildren and
+			// getAutomationChildAt in a loop
+			var childList:Array  =  Automation.automationManager2.getAutomationChildrenArray(containerDelegate);
+
+			var n:int = childList? childList.length:0;
+			for (var i:int = 0; i < n && k <= end; i++)
+			{
+				var ao:IAutomationObject = childList[i] as IAutomationObject ;
+				if (ao)
+				{
+					var disp:DisplayObject = ao  as DisplayObject;
+					if (disp.visible && !(disp is Repeater))
+					{
+						if (k >=start && k <= end)
+						{
+							var av:Array = flattenArray(ao.automationValue);
+							_values.push(av);
+							longestRow = Math.max(longestRow, av.length);
+						}
+						++k;
+					}
+				}
+			}
+
+			n = _values.length;
+			// normalize the grid so all rows have the same number of columns
+			for (i = 0; i < n; i++)
+			{
+				for (var j:int = _values[i].length; j < longestRow; j++)
+				{
+					_values[i].push("");
+				}
+			}
+			oldStart = start;
+			oldEnd = end;
+			return _values;
+		}
+
+		/**
+		 *  @private
+		 */
+		private static function flattenArray(a:Array):Array
+		{
+			if (!a)
+				return [];
+			var n:int =  a.length;
+			for (var i:int = 0; i < n; ++i)
+			{
+				if (a[i] is Array)
+				{
+					var tmp:Array = [];
+
+					if (i > 0)
+						tmp = a.slice(0, i);
+
+					tmp = tmp.concat(a[i]);
+
+					if (i < a.length - 1)
+						tmp = tmp.concat(a.slice(i + 1));
+
+					a = tmp;
+					i = -1;
+				}
+			}
+			return a;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getAutomationValueForData(data:Object):Array
+		{
+			return [];
+		}
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
@@ -0,0 +1,273 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.advancedDataGridClasses
+{
+import flash.events.Event;
+
+[DefaultProperty("children")]
+
+/**
+ *  Use the AdvancedDataGridColumnGroup class to specify column groups for
+ *  the AdvancedDataGrid control.
+ *  You can specify one or more AdvancedDataGridColumn classes as children of
+ *  the AdvancedDataGridColumnGroup class, or nest AdvancedDataGridColumnGroup classes
+ *  to create nested column groups.
+ *  The AdvancedDataGrid.columnGroup property
+ *  takes an Array of AdvancedDataGridColumnGroup instances to specify the column groups.
+ *
+ *
The following example uses the AdvancedDataGridColumnGroup class to define
+ *  a column group named Revenues that contains two columns: Actual and Estimate.

+ *
+ *

+ *  <mx:AdvancedDataGrid id="myADG"
+ *       dataProvider="{dpFlat}"
+ *       width="100%" height="100%">
+ *       <mx:groupedColumns>
+ *           <mx:AdvancedDataGridColumn dataField="Region"/>
+ *           <mx:AdvancedDataGridColumn dataField="Territory"/>
+ *           <mx:AdvancedDataGridColumn dataField="Territory_Rep"
+ *               headerText="Territory Rep"/>
+ *           <mx:AdvancedDataGridColumnGroup headerText="Revenues">
+ *               <mx:AdvancedDataGridColumn dataField="Actual"/>
+ *               <mx:AdvancedDataGridColumn dataField="Estimate"/>
+ *           </mx:AdvancedDataGridColumnGroup>
+ *       </mx:groupedColumns>
+ *  </mx:AdvancedDataGrid>

+ *
+ *  @mxml
+ *
+ *
You use the <mx.AdvancedDataGridColumnGroup> tag to configure a column
+ *  group of a AdvancedDataGrid control.
+ *  You specify the <mx.AdvancedDataGridColumnGroup> tag as a child
+ *  of the groupedColumns property in MXML.
+ *  The <mx.AdvancedDataGridcolumn> tag defines the following tag attributes:

+ *
+ *

+ *  <mx:AdvancedDataGridColumn
+ *  Properties
+ *    children="No default"
+ *    childrenDragEnabled="true|false"
+ *  />
+ *

+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *  @see mx.controls.AdvancedDataGrid#columnGroup
+ *
+*
+*  @langversion 3.0
+*  @playerversion Flash 9
+*  @playerversion AIR 1.1
+*  @productversion Flex 3
+*/
+public class AdvancedDataGridColumnGroup extends AdvancedDataGridColumn
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param columnName The name of the field in the data provider
+     *  associated with the column group, and the text for the header cell of this
+     *  column.  This is equivalent to setting the dataField
+     *  and headerText properties.
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AdvancedDataGridColumnGroup(columnName:String = null)
+    {
+        super(columnName);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // children
+    //----------------------------------
+
+    /**
+     *  An Array of AdvancedDataGridColumn instances that define the columns
+     *  of the column group.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var children:Array = [];
+
+    //----------------------------------
+    // childrenDragEnabled
+    //----------------------------------
+
+    /**
+     *  Specifies whether the child columns can be dragged to reposition them in the group.
+     *  If false, child columns cannot be reordered even if
+     *  the AdvancedDataGridColumn.dragEnabled property is set
+     *  to true for a child column.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var childrenDragEnabled:Boolean = true;
+
+    //----------------------------------
+    // width
+    //----------------------------------
+
+    private var _width:Number = 100;
+
+    /**
+     *  @private
+     */
+    override public function get width():Number
+    {
+        if(this.children && this.children.length > 0)
+            return _width;
+        else
+            return super.width;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set width(value:Number):void
+    {
+        if(this.children && this.children.length > 0)
+        {
+            _width = value;
+            dispatchEvent(new Event("widthChanged"));
+        }
+        else
+        {
+            super.width = value;
+        }
+    }
+    //--------------------------------------------------------------------------
+    //
+    //  Overriden Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function copyProperties(col:AdvancedDataGridColumn):void
+    {
+    	super.copyProperties(col);
+
+    	// copy the remaining properties
+    	AdvancedDataGridColumnGroup(col).childrenDragEnabled = childrenDragEnabled;
+    }
+
+    /**
+     *  @private
+     */
+    override public function clone():AdvancedDataGridColumn
+    {
+    	// make a new column group
+    	var col:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
+
+    	// copy the properties
+    	copyProperties(col);
+
+    	// check the children property and clone the columns and column groups
+    	var n:int = children.length;
+    	for (var i:int = 0; i < n; i++)
+    	{
+    		col.children[i] = children[i].clone();
+    	}
+    	return col;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Returns the data from the data provider for the specified Object.
+     *
+     *
This method is useful when the data for a row contains nested Objects.
+     *  For example, a row is defined by the following data in the data provider:

+     *

+     *  row = { name:"Adobe", address : {
+     *                                    street  : "345 Park Avenue",
+     *                                    city    : "San Jose",
+     *                                    state   : "CA 95110",
+     *                                    country : "USA"
+     *                                  }
+     *                   }

+     *
+     *
You then assign the "address" field to the dataField property
+     *  of the AdvancedDataGridColumnGroup instance. A call to  itemToData(row)
+     *  then returns the address object.

+     *
+     *
This method is similar to the
+     *  AdvancedDataGridColumn.itemToLabel() method.

+     *
+     *  @param data The data provider element.
+     *
+     *  @return The data from the data provider for the specified Object.
+     *
+     *  @see mx.controls.advancedDataGridClasses.AdvancedDataGridColumn
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function itemToData(data:Object):*
+    {
+       if (!data)
+          return null;
+
+       if (labelFunction != null)
+       {
+          data = labelFunction(data, this);
+          return data;
+       }
+       if (typeof(data) == "object" || typeof(data) == "xml")
+       {
+        try
+        {
+            if(dataField !=null)
+                data = data[dataField];
+        }
+        catch(e:Error)
+        {
+           data = null;
+        }
+       }
+       return data;
+    }
+}
+
+}


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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.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.components.supportClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22448
Author:   build@adobe.com
Date:     2011-09-08T19:26:12.465737Z

Log Message:
-----------
Version update to 4.6.0

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/flex-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark_dmv/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mx/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/build.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/airframework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/advancedgrids/src/mx/core/Version.as</path>

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

--- frameworks/projects/automation/src/mx/core/Version.as
+++ frameworks/projects/automation/src/mx/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.5.2.0";
+mx_internal static const VERSION:String = "4.6.0.0";