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

--- frameworks/projects/rpc/src/mx/messaging/events/MessageEvent.as
+++ frameworks/projects/rpc/src/mx/messaging/events/MessageEvent.as
@@ -0,0 +1,188 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.messaging.events
+{
+
+import flash.events.Event;
+import mx.messaging.messages.IMessage;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  The MessageEvent class is used to propagate messages within the messaging system.
+ */
+public class MessageEvent extends Event
+{
+    //--------------------------------------------------------------------------
+    //
+    // Static Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The MESSAGE event type; dispatched upon receipt of a message.
+     *
The value of this constant is "message".

+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

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

+     *
message	The message associated with this event.

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

+     *

+     *  @eventType message
+     */
+    public static const MESSAGE:String = "message";
+
+    /**
+     *  The RESULT event type; dispatched when an RPC agent receives a result from
+     *  a remote service destination.
+     *
The value of this constant is "result".

+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

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

+     *
message	The message associated with this event.

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

+     *

+     *  @eventType result
+     */
+    public static const RESULT:String = "result";
+
+    //--------------------------------------------------------------------------
+    //
+    // Static Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Utility method to create a new MessageEvent that doesn't bubble and
+     *  is not cancelable.
+     *
+     *  @param type The type for the MessageEvent.
+     *
+     *  @param message The associated message.
+     *
+     *  @return New MessageEvent.
+     */
+    public static function createEvent(type:String, msg:IMessage):MessageEvent
+    {
+        return new MessageEvent(type, false, false, msg);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructs an instance of this event with the specified type and
+     *  message.
+     *
+     *  @param type The type for the MessageEvent.
+     *
+     *  @param bubbles Specifies whether the event can bubble up the display
+     *  list hierarchy.
+     *
+     *  @param cancelable Indicates whether the behavior associated with the
+     *  event can be prevented; used by the RPC subclasses.
+     *
+     *  @param message The associated message.
+     */
+    public function MessageEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false,
+            message:IMessage = null)
+    {
+        super(type, bubbles, cancelable);
+
+        this.message = message;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The Message associated with this event.
+     */
+    public var message:IMessage;
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  messageId
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    public function get messageId():String
+    {
+        if (message != null)
+        {
+            return message.messageId;
+        }
+        return null;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Clones the MessageEvent.
+     *
+     *  @return Copy of this MessageEvent.
+     */
+    override public function clone():Event
+    {
+        return new MessageEvent(type, bubbles, cancelable, message);
+    }
+
+    /**
+     *  Returns a string representation of the MessageEvent.
+     *
+     *  @return String representation of the MessageEvent.
+     */
+    override public function toString():String
+    {
+        return formatToString("MessageEvent", "messageId", "type", "bubbles", "cancelable", "eventPhase");
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12192
Author:   egeorgie@adobe.com
Date:     2009-11-25T00:55:11.384090Z

Log Message:
-----------
Adding requestedMinRowCount, requestedMinColumnCount to VerticalLayout, HorizontalLayout.

Note that fixing bug http://bugs.adobe.com/jira/browse/SDK-23634 requires an additional change to ListSkin.mxml.

QE notes: Add tests covering these two new properties.
Doc notes: None
Bugs: In preparation for fixing http://bugs.adobe.com/jira/browse/SDK-23634
Reviewer: Hans
Tests run: checkintests + mustella (cyclone + list, horizontalLayout, verticalLayout)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -183,6 +183,12 @@

 		// Don't drag-scroll in the vertical direction
 		dragScrollRegionSizeVertical = 0;
+
+        // Virtualization defaults for cases
+        // where there are no items and no typical item.
+        // The llv defaults are the width/height of a Spark Button skin.
+        llv.defaultMinorSize = 22;
+        llv.defaultMajorSize = 71;
     }

     //--------------------------------------------------------------------------
@@ -413,19 +419,20 @@
     }

     //----------------------------------
-    //  requestedColumnCount
-    //----------------------------------
-
-    private var _requestedColumnCount:int = -1;
+    //  requestedMinColumnCount
+    //----------------------------------
+
+    private var _requestedMinColumnCount:int = -1;

     [Inspectable(category="General", minValue="-1")]
-
-    /**
-     *  The measured size of this layout is wide enough to display
-     *  the first requestedColumnCount layout elements.
-     *  If requestedColumnCount is -1, then the measured
-     *  size will be big enough for all of the layout elements.
-     *
+
+    /**
+     *  The measured width of this layout is large enough to display
+     *  at least requestedMinColumnCount layout elements.
+     *
+     *
If requestedColumnCount is set, then
+     *  this property has no effect.

+     *
      *
If the actual size of the container using this layout has been explicitly set,
      *  then this property has no effect.

      *
@@ -436,6 +443,49 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
+    public function get requestedMinColumnCount():int
+    {
+        return _requestedMinColumnCount;
+    }
+
+    /**
+     *  @private
+     */
+    public function set requestedMinColumnCount(value:int):void
+    {
+        if (_requestedMinColumnCount == value)
+            return;
+
+        _requestedMinColumnCount = value;
+
+        if (target)
+            target.invalidateSize();
+    }
+
+    //----------------------------------
+    //  requestedColumnCount
+    //----------------------------------
+
+    private var _requestedColumnCount:int = -1;
+
+    [Inspectable(category="General", minValue="-1")]
+
+    /**
+     *  The measured size of this layout is wide enough to display
+     *  the first requestedColumnCount layout elements.
+     *  If requestedColumnCount is -1, then the measured
+     *  size will be big enough for all of the layout elements.
+     *
+     *
If the actual size of the container using this layout has been explicitly set,
+     *  then this property has no effect.

+     *
+     *  @default -1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public function get requestedColumnCount():int
     {
         return _requestedColumnCount;
@@ -450,7 +500,9 @@
             return;

         _requestedColumnCount = value;
-        invalidateTargetSizeAndDisplayList();
+
+        if (target)
+            target.invalidateSize();
     }

     //----------------------------------
@@ -1002,6 +1054,40 @@

     /**
      *  @private
+     *  Fills in the result with preferred and min sizes of the element.
+     */
+    private function getElementWidth(element:ILayoutElement, fixedColumnWidth:Number, result:SizesAndLimit):void
+    {
+        // Calculate preferred width first, as it's being used to calculate min width
+        var elementPreferredWidth:Number = isNaN(fixedColumnWidth) ? Math.ceil(element.getPreferredBoundsWidth()) :
+                                                                     fixedColumnWidth;
+        // Calculate min width
+        var flexibleWidth:Boolean = !isNaN(element.percentWidth);
+        var elementMinWidth:Number = flexibleWidth ? Math.ceil(element.getMinBoundsWidth()) :
+                                                     elementPreferredWidth;
+        result.preferredSize = elementPreferredWidth;
+        result.minSize = elementMinWidth;
+    }
+
+    /**
+     *  @private
+     *  Fills in the result with preferred and min sizes of the element.
+     */
+    private function getElementHeight(element:ILayoutElement, justify:Boolean, result:SizesAndLimit):void
+    {
+        // Calculate preferred height first, as it's being used to calculate min height below
+        var elementPreferredHeight:Number = Math.ceil(element.getPreferredBoundsHeight());
+
+        // Calculate min height
+        var flexibleHeight:Boolean = !isNaN(element.percentHeight) || justify;
+        var elementMinHeight:Number = flexibleHeight ? Math.ceil(element.getMinBoundsHeight()) :
+                                                       elementPreferredHeight;
+        result.preferredSize = elementPreferredHeight;
+        result.minSize = elementMinHeight;
+    }
+
+    /**
+     *  @private
      *
      *  Compute exact values for measuredWidth,Height and  measuredMinWidth,Height.
      *
@@ -1014,56 +1100,79 @@
      */
     private function measureReal(layoutTarget:GroupBase):void
     {
-        var layoutEltCount:int = layoutTarget.numElements;
-        var reqEltCount:int = requestedColumnCount; // -1 means "all elements"
-        var eltCount:uint = Math.max(reqEltCount, layoutEltCount);
-        var eltInLayoutCount:uint = 0; // elts that have been measured
-
-        var preferredHeight:Number = 0; // max of the elt preferred heights
-        var preferredWidth:Number = 0;  // sum of the elt preferred widths
-        var minHeight:Number = 0; // max of the elt minimum heights
-        var minWidth:Number = 0;  // sum of the elt minimum widths
-
+        var size:SizesAndLimit = new SizesAndLimit();
+        var justify:Boolean = verticalAlign == VerticalAlign.JUSTIFY;
+        var numElements:int = layoutTarget.numElements; // How many elements there are in the target
+        var numElementsInLayout:int = numElements;      // How many elements have includeInLayout == true, start off with numElements.
+        var requestedColumnCount:int = this.requestedColumnCount;
+        var columnsMeasured:int = 0;                    // How many columns have been measured
+
+        var preferredHeight:Number = 0; // sum of the elt preferred heights
+        var preferredWidth:Number = 0;  // max of the elt preferred widths
+        var minHeight:Number = 0;       // sum of the elt minimum heights
+        var minWidth:Number = 0;        // max of the elt minimum widths
+
         var fixedColumnWidth:Number = NaN;
         if (!variableColumnWidth)
             fixedColumnWidth = columnWidth;  // may query typicalLayoutElement, elt at index=0
-
-        for (var i:uint = 0; i < eltCount; i++)
-        {
-            if (i < layoutEltCount) // target.numElements
-                var elt:ILayoutElement = layoutTarget.getElementAt(i);
-            else // target.numElements < requestedElementCount, so "pad"
-                elt = typicalLayoutElement;
-            if (!elt || !elt.includeInLayout)
+
+        var element:ILayoutElement;
+        for (var i:int = 0; i < numElements; i++)
+        {
+            element = layoutTarget.getElementAt(i);
+            if (!element || !element.includeInLayout)
+            {
+                numElementsInLayout--;
                 continue;
-
+            }
+
             // Consider the height of each element, inclusive of those outside
             // the requestedColumnCount range.
-            var height:Number = Math.ceil(elt.getPreferredBoundsHeight());
-            preferredHeight = Math.max(preferredHeight, height);
-            var flexibleHeight:Boolean = !isNaN(elt.percentHeight) || verticalAlign == VerticalAlign.JUSTIFY;
-            minHeight = Math.max(minHeight, flexibleHeight ? Math.ceil(elt.getMinBoundsHeight()) : height);
-
-            // If requestedColumnCount is specified, no need to consider the width
-            // of cols outside the bounds of the "requested" range. Otherwise, we
-            // consider each element.
-            if ((reqEltCount == -1) || ((reqEltCount != -1) && eltInLayoutCount < requestedColumnCount))
+            getElementHeight(element, justify, size);
+            preferredHeight = Math.max(preferredHeight, size.preferredSize);
+            minHeight = Math.max(minHeight, size.minSize);
+
+            // Can we measure the width of this column?
+            if (requestedColumnCount == -1 || columnsMeasured < requestedColumnCount)
             {
-                var width:Number = isNaN(fixedColumnWidth) ? elt.getPreferredBoundsWidth() : fixedColumnWidth;
-                width = Math.ceil(width); // Round up to give it a whole pixel.
-                preferredWidth += width;
-                minWidth += (isNaN(elt.percentWidth)) ? width : Math.ceil(elt.getMinBoundsWidth());
-                eltInLayoutCount += 1;
+                getElementWidth(element, fixedColumnWidth, size);
+                preferredWidth += size.preferredSize;
+                minWidth += size.minSize;
+                columnsMeasured++;
             }
         }
-
-        if (eltInLayoutCount > 1)
+
+        // Calculate the total number of columns to measure
+        var columnsToMeasure:int = (requestedColumnCount != -1) ? requestedColumnCount :
+                                                                  Math.max(requestedMinColumnCount, numElementsInLayout);
+        // Do we need to measure more columns?
+        if (columnsMeasured < columnsToMeasure)
+        {
+            // Use the typical element
+            element = typicalLayoutElement;
+            if (element)
+            {
+                // Height
+                getElementHeight(element, justify, size);
+                preferredHeight = Math.max(preferredHeight, size.preferredSize);
+                minHeight = Math.max(minHeight, size.minSize);
+
+                // Width
+                getElementWidth(element, fixedColumnWidth, size);
+                preferredWidth += size.preferredSize * (columnsToMeasure - columnsMeasured);
+                minWidth += size.minSize * (columnsToMeasure - columnsMeasured);
+                columnsMeasured = columnsToMeasure;
+            }
+        }
+
+        // Add gaps
+        if (columnsMeasured > 1)
         {
-            var hgap:Number = gap * (eltInLayoutCount - 1);
+            var hgap:Number = gap * (columnsMeasured - 1);
             preferredWidth += hgap;
             minWidth += hgap;
         }
-
+
         var hPadding:Number = paddingLeft + paddingRight;
         var vPadding:Number = paddingTop + paddingBottom;

@@ -1088,7 +1197,7 @@
         {
             var typicalWidth:Number = typicalElt.getPreferredBoundsWidth();
             var typicalHeight:Number = typicalElt.getPreferredBoundsHeight();
-            llv.minorSize = Math.max(llv.minorSize, typicalHeight);
+            llv.defaultMinorSize = typicalHeight;
             llv.defaultMajorSize = typicalWidth;
         }
         if (layoutTarget)
@@ -1132,7 +1241,8 @@
     private function measureVirtual(layoutTarget:GroupBase):void
     {
         var eltCount:uint = layoutTarget.numElements;
-        var measuredEltCount:int = (requestedColumnCount != -1) ? requestedColumnCount : eltCount;
+        var measuredEltCount:int = (requestedColumnCount != -1) ? requestedColumnCount :
+                                                                  Math.max(requestedMinColumnCount, eltCount);

         var hPadding:Number = paddingLeft + paddingRight;
         var vPadding:Number = paddingTop + paddingBottom;
@@ -1216,15 +1326,7 @@
         if (!layoutTarget)
             return;

-        var hPadding:Number = paddingLeft + paddingRight;
-        var vPadding:Number = paddingTop + paddingBottom;
-
-        if (layoutTarget.numElements == 0)
-        {
-            layoutTarget.measuredWidth = layoutTarget.measuredMinWidth = hPadding;
-            layoutTarget.measuredHeight = layoutTarget.measuredMinHeight = vPadding;
-        }
-        else if (useVirtualLayout)
+        if (useVirtualLayout)
             measureVirtual(layoutTarget);
         else
             measureReal(layoutTarget);
@@ -1901,3 +2003,9 @@
 {
     public var layoutElement:ILayoutElement;
 }
+
+class SizesAndLimit
+{
+    public var preferredSize:Number;
+    public var minSize:Number;
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19747
Author:   smgilson@adobe.com
Date:     2011-01-13T20:18:32.550401Z

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

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationValidatorBase.as</path>

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

--- frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as
+++ frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as
@@ -15,8 +15,8 @@
 import flash.globalization.NationalDigitsType;

 /**
- *  A utility class containing Unicode related functionality not supported in
- *  Flex or ActionScript.
+ *  GlobalizationUtils is a utility class containing Unicode related functionality not
+ *  supported directly in Flex or ActionScript.
  *
  *
This class contains the utility routines needed for all Validators.
  *  Examples of typical routines are checking for unicode white space,
@@ -95,10 +95,12 @@
     //
     //--------------------------------------------------------------------------
     /**
-     *
 Check if codepoint is a numeric digit.

-     *
-     *  @param int input codepoint
-     *  @returns Boolean true or false.
+     *  Return true if a codepoint is a numeric digit.
+     *
+     *  @param uint The input codepoint.
+     *
+     *  @return true if a codepoint is a numeric digit,
+     *  and false if not.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -116,10 +118,12 @@
     }

     /**
-     *
 Check if codepoint is a leading surrogate.

-     *
-     *  @param int input codepoint
-     *  @returns Boolean true or false.
+     *  Return true if a codepoint is a leading surrogate.
+     *
+     *  @param uint The input codepoint.
+     *
+     *  @return true if a codepoint is a leading surrogate,
+     *  and false if not.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -133,10 +137,12 @@
     }

     /**
-     *
 Check if codepoint is a trailing surrogate.

-     *
-     *  @param int input codepoint
-     *  @returns Boolean true or false.
+     *  Return true if a codepoint is a trailing surrogate.
+     *
+     *  @param uint The input codepoint.
+     *
+     *  @return true if a codepoint is a trailing surrogate,
+     *  and false if not.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -150,12 +156,14 @@
     }

     /**
-     *
 Check if codepoint is a white space.
-     *  Uses all unicode white space characters. See the list of public static
-     *  constants in this class.

-     *
-     *  @param int input codepoint
-     *  @returns Boolean true or false.
+     *  Return true if a codepoint is a white space character.
+     *  Uses all unicode white space characters.
+     *  See the list of public static constants in this class.
+     *
+     *  @param uint The input codepoint.
+     *
+     *  @return true if a codepoint is a white space character,
+     *  and false if not.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -193,11 +201,12 @@
     }

     /**
-     *
 Remove leading and trailing white space

-     *
-     *  @param String  Input string to be processed
-     *  @return String Output string after removing leading and
-     *                              trailing space
+     *  Removes leading and trailing white space characters.
+     *
+     *  @param input Input string to process.
+     *
+     *  @return String after removing leading and trailing
+     *  white space characters.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -232,11 +241,13 @@
     }

     /**
-     *
 Convert a surrogate pair to UTF32

-     *
-     *  @param int  High surrogate c0
-     *  @param int  Low surrogate c1
-     *  @return uint UTF32 equivalent
+     *  Convert a surrogate pair to UTF32.
+     *
+     *  @param c0 High surrogate.
+     *
+     *  @param c1 Low surrogate.
+     *
+     *  @return The UTF32 equivalent.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1


CHANGED:applied the collision detection and handler function;

--- src/SkBatPlayState.as
+++ src/SkBatPlayState.as
@@ -8,8 +8,11 @@
 	//--------------------------------------------------------------------------
 	import org.flixel.FlxG;
 	import org.flixel.FlxGroup;
+	import org.flixel.FlxObject;
 	import org.flixel.FlxPoint;
 	import org.flixel.FlxState;
+	import org.flixel.FlxText;
+	import org.flixel.FlxU;

 	/**
@@ -34,6 +37,9 @@
 		private var _bullets:FlxGroup;
 		private var _spawnTimer:Number;
 		private var _spawnInterval:Number = 2.5;
+		//texts
+		private var _scoreText:FlxText;
+		private var _gameOverText:FlxText;
 		//----------------------------------
 		// CONSTANTS
 		//----------------------------------
@@ -80,13 +86,21 @@
 			//
 			this.resetSpawnTimer();
 			//
+			FlxG.score = 0;
+			_scoreText = new FlxText(10, 8, 200, "0");
+			_scoreText.setFormat(null, 32, 0xFF597137, "left");
+			add(_scoreText);
+			//
 			super.create();
 		}
 		//
 		override public function update():void
 		{
+			//Collision detection
+			FlxG.overlap(this._aliens,this._bullets,overlapAlienBulletHandler);
+			FlxG.overlap(this._aliens,this._ship,overlapAlienShipHandler);
 			//
-			if(SkyBattle.gamepad.fire2.isDown )
+			if(SkyBattle.gamepad.fire2.isDown && this._ship.alive )
 			{
 				this.spawnBullets(this._ship.getBulletSpawnPosition())
 			}
@@ -96,6 +110,11 @@
 			{
 				this.spawnAlien();
 				this.resetSpawnTimer();
+			}
+			//Restart
+			if(FlxG.keys.ENTER && !this._ship.alive )
+			{
+				FlxG.switchState( new SkBatPlayState() );
 			}
 			//
 			super.update();
@@ -134,6 +153,27 @@
 			var y:Number = FlxG.height;
 			this._bullets.add(new SkBatBullet(point.x,point.y));
 		}
+		//Collision detection callback functions.
+		//
+		private function overlapAlienBulletHandler(alien:SkBatAlien, bullet:SkBatBullet):void
+		{
+			alien.kill();
+			bullet.kill();
+			FlxG.score += 1;
+			_scoreText.text = FlxG.score.toString();
+		}
+		//
+		private function overlapAlienShipHandler(alien:SkBatAlien, ship:SkBatShip):void
+		{
+			ship.kill();
+			alien.kill();
+//			FlxG.quake.start(0.02);
+
+			_gameOverText = new FlxText(0, FlxG.height / 2, FlxG.width,
+				"GAME OVER\nPRESS ENTER TO PLAY AGAIN");
+			_gameOverText.setFormat(null, 16, 0xFF597137, "center");
+			add(_gameOverText);
+		}
 	}

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 14443
Author:   sameer@adobe.com
Date:     2010-02-26T06:59:48.156260Z

Log Message:
-----------
Merge AdvancedDataGrid mirroring changes from 4.x branch to trunk - revision 14442

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/AdvancedDataGridBaseEx.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/AdvancedDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/listClasses/AdvancedListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/advancedDataGridClasses/AdvancedDataGridDragProxy.as</path>

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

--- frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
+++ frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
@@ -3440,8 +3440,6 @@
     {
         // this code is nearly duplicating UIComponent.validateDisplayList();

-		validateMatrix();
-
         if (invalidateDisplayListFlag)
         {
             // Check if our parent is the top level system manager
@@ -3456,6 +3454,9 @@
                                   getExplicitOrMeasuredHeight());
                 }
             }
+
+			// Don't validate transform.matrix until after setting actual size
+			validateMatrix();

             if (runDataEffectNextUpdate)
             {
@@ -3470,6 +3471,10 @@

             invalidateDisplayListFlag = false;
         }
+		else
+		{
+			validateMatrix();
+		}
     }

     /**
@@ -5617,6 +5622,9 @@
     protected function moveSelectionHorizontally(code:uint, shiftKey:Boolean,
                                                  ctrlKey:Boolean):void
     {
+		// For Keyboard.LEFT and Keyboard.RIGHT and maybe Keyboard.UP and Keyboard.DOWN,
+		// need to account for layoutDirection="rtl".
+
         return;
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.effects.effectClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10131
Author:   chaase@adobe.com
Date:     2009-09-10T21:25:42.980194Z

Log Message:
-----------
Fixes to several effects bugs and one styles-related bug.

QE notes: Fixes to all filed auto-center feature bugs.
Doc notes: None
Bugs: sdk-22994, sdk-22992, sdk-22990, sdk-21850, sdk-22973
Reviewer: Jason (+Glenn for RadioButton/CheckBox changes, 21850)
Tests run: checkintests, Mustella (transform effects, Slider, DataGrid - all passed last week, prior to skin/test changes)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SoundEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/SoundEffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/SoundEffectInstance.as
@@ -512,7 +512,8 @@
         resumedPosition = startTime;

         _soundChannel = sound.play(startTime, loops, transform);
-        _soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+        if (soundChannel)
+            soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
     }

     /**
@@ -526,11 +527,13 @@
             volumeTween.pause();
         if (panTween)
             panTween.pause();
-
-        pausedPosition = _soundChannel.position; // Save the paused position
-        pausedTransform = _soundChannel.soundTransform;
-
-        _soundChannel.stop();
+        if (soundChannel)
+        {
+            pausedPosition = soundChannel.position; // Save the paused position
+            pausedTransform = soundChannel.soundTransform;
+
+            soundChannel.stop();
+        }
     }

     /**
@@ -545,7 +548,8 @@
         if (panTween)
             panTween.stop();

-        _soundChannel.stop();
+        if (soundChannel)
+            soundChannel.stop();
     }

     /**
@@ -565,8 +569,9 @@

         if (sound)
         {
-            _soundChannel = sound.play(resumedPosition, loops, pausedTransform);
-            _soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+            _soundChannel = sound.play(resumedPosition, loops, pausedTransform);
+            if (soundChannel)
+                soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
         }
     }

@@ -592,8 +597,8 @@
      */
     override public function finishEffect():void
     {
-        if (_soundChannel)
-            _soundChannel.stop();
+        if (soundChannel)
+            soundChannel.stop();

         super.finishEffect();
     }
@@ -609,10 +614,13 @@
      */
     mx_internal function onVolumeTweenUpdate(value:Object):void
     {
-        // Need to reset the soundTransform object in order
-        var copyTransform:SoundTransform = _soundChannel.soundTransform;
-        copyTransform.volume = Number(value);
-        _soundChannel.soundTransform = copyTransform;
+        if (soundChannel)
+        {
+            // Need to reset the soundTransform object in order
+            var copyTransform:SoundTransform = soundChannel.soundTransform;
+            copyTransform.volume = Number(value);
+            soundChannel.soundTransform = copyTransform;
+        }
     }

     /**
@@ -630,10 +638,13 @@
      */
     mx_internal function onPanTweenUpdate(value:Object):void
     {
-        // Need to reset the soundTransform object in order
-        var copyTransform:SoundTransform = _soundChannel.soundTransform;
-        copyTransform.pan = Number(value);
-        _soundChannel.soundTransform = copyTransform;
+        if (soundChannel)
+        {
+            // Need to reset the soundTransform object in order
+            var copyTransform:SoundTransform = soundChannel.soundTransform;
+            copyTransform.pan = Number(value);
+            soundChannel.soundTransform = copyTransform;
+        }
     }

     /**
@@ -653,8 +664,8 @@
     {
         if (tweenCount == 0 || --tweenCount == 0)
         {
-            if (_soundChannel)
-                _soundChannel.stop();
+            if (soundChannel)
+                soundChannel.stop();

             finishRepeat();
         }


fixed conflict

fixed conflict

--- HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPStreamingHLSIndexHandler.as
+++ HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPStreamingHLSIndexHandler.as
@@ -25,9 +25,12 @@
  package org.denivip.osmf.net.httpstreaming.hls
 {
 	import flash.net.URLRequest;
+	import flash.utils.ByteArray;
+	import flash.utils.getQualifiedClassName;
 	import flash.utils.getTimer;

 	import org.denivip.osmf.plugins.HLSSettings;
+	import org.denivip.osmf.utility.Padding;
 	import org.osmf.events.DVRStreamInfoEvent;
 	import org.osmf.events.HTTPStreamingEvent;
 	import org.osmf.events.HTTPStreamingIndexHandlerEvent;
@@ -144,97 +147,172 @@
 				_reloadTime = getTimer() - _reloadTime;
 				logger.info("Playlist reload time {0} sec", (_reloadTime/1000));
 			}
-
-			var quality:int = indexContext as int;
-			data = String(data).replace(/\\\s*[\r?\n]\s*/g, "");
-
-			if(String(data).localeCompare(_prevPlaylist) == 0)
-				++_matchCounter;
-
-			if(_matchCounter == HLSSettings.hlsMaxErrors){ // if delivered playlist again not changed then error_event (or all what you want)
-				CONFIG::LOGGING
-				{
-					logger.error("Stream is stuck. Playlist on server don't updated!");
-				}
-				dispatchEvent(new HTTPStreamingEvent(HTTPStreamingEvent.INDEX_ERROR));
-			}
-
-			_prevPlaylist = String(data);
-
-			var lines:Vector.<String> = Vector.<String>(String(data).split(/\r?\n/));
-			var rateItem:HTTPStreamingM3U8IndexRateItem = new HTTPStreamingM3U8IndexRateItem(_streamQualityRates[quality], _streamURLs[quality]);
-			var indexItem:HTTPStreamingM3U8IndexItem;
-			var len:int = lines.length;
-			var discontinuity:Boolean = false;
-			var duration:Number = 0;
-			for(var i:int = 0; i < len; i++){
-				if(i == 0){
-					if(lines[i] != '#EXTM3U'){
-						dispatchEvent(new HTTPStreamingEvent(HTTPStreamingEvent.INDEX_ERROR));
-						return;
-					}
-				}
-
-				if (lines[i].indexOf("#") != 0 && lines[i].length > 0) { //non-empty line not starting with # => segment URI
-					var url:String = (lines[i].search(/(ftp|file|https?):\/\//) == 0) ?  lines[i] : rateItem.url.substr(0, rateItem.url.lastIndexOf('/')+1) + lines[i];
-					// spike for hidden discontinuity
-					if(url.match(/SegNum(\d+)/)){
-						var chunkIndex:int = parseInt(url.match(/SegNum(\d+)/)[1]);
-						if(chunkIndex <= _prevChunkIndex)
+			var quality:int;
+			if(getQualifiedClassName(indexContext) == "Array") {
+				// TODO: Update this to use an appropriate Object context
+				data = ByteArray(data);
+				var keyRequest:Array = indexContext as Array;
+				var keyItem:HTTPStreamingM3U8IndexKey = keyRequest[0];
+				quality = keyRequest[1];
+
+				// Set key
+				keyItem.key = data;
+				generateIndexReadyForQuality(quality);
+			} else {
+				quality = indexContext as int;
+				data = String(data).replace(/\\\s*[\r?\n]\s*/g, "");
+
+				if(String(data).localeCompare(_prevPlaylist) == 0)
+					++_matchCounter;
+
+				if(_matchCounter == HLSSettings.hlsMaxErrors){ // if delivered playlist again not changed then error_event (or all what you want)
+					CONFIG::LOGGING
+					{
+						logger.error("Stream is stuck. Playlist on server don't updated!");
+					}
+					dispatchEvent(new HTTPStreamingEvent(HTTPStreamingEvent.INDEX_ERROR));
+				}
+
+				_prevPlaylist = String(data);
+
+				var lines:Vector.<String> = Vector.<String>(String(data).split(/\r?\n/));
+				var rateItem:HTTPStreamingM3U8IndexRateItem = new HTTPStreamingM3U8IndexRateItem(_streamQualityRates[quality], _streamURLs[quality]);
+				var indexItem:HTTPStreamingM3U8IndexItem;
+				var len:int = lines.length;
+				var discontinuity:Boolean = false;
+				var keyExistsInIndex:Boolean = false;
+				var keyExists:Boolean = false;
+				var keyIndex:int = -1;
+				var keyIv:String;
+				var keyIvGiven:Boolean = false;
+				var keyIvIndex:int = 0;
+				var duration:Number = 0;
+
+				for(var i:int = 0; i < len; i++){
+					if(i == 0){
+						if(lines[i] != '#EXTM3U'){
+							dispatchEvent(new HTTPStreamingEvent(HTTPStreamingEvent.INDEX_ERROR));
+							return;
+						}
+					}
+
+					if (lines[i].indexOf("#") != 0 && lines[i].length > 0) { //non-empty line not starting with # => segment URI
+						var url:String = (lines[i].search(/(ftp|file|https?):\/\//) == 0) ?  lines[i] : rateItem.url.substr(0, rateItem.url.lastIndexOf('/')+1) + lines[i];
+						// spike for hidden discontinuity
+						if(url.match(/SegNum(\d+)/)){
+							var chunkIndex:int = parseInt(url.match(/SegNum(\d+)/)[1]);
+							if(chunkIndex <= _prevChunkIndex)
+								discontinuity = true;
+							_prevChunkIndex = chunkIndex;
+						}
+						// _spike
+						indexItem = new HTTPStreamingM3U8IndexItem(duration, url, discontinuity);
+						// Add key if it exists
+						if(keyExists) {
+							indexItem.key = keyIndex;
+							// Attach correct IV
+							if(keyIvGiven) {
+								indexItem.iv = keyIv;
+							} else {
+								indexItem.iv = Padding.zeropad(keyIvIndex, 32);
+								keyIvIndex++;
+							}
+						}
+						rateItem.addIndexItem(indexItem);
+						discontinuity = false;
+					}
+					else if(lines[i].indexOf("#EXTINF:") == 0){
+						var duration:Number = parseFloat(lines[i].match(/([\d\.]+)/)[1]);
+					}else if(lines[i].indexOf("#EXT-X-KEY:") == 0){
+						// Flag that encryption key exists in whole playlist
+						keyExistsInIndex = true;
+						// Flag that encryption key exists for this segment
+						keyExists = true;
+
+						// Parse for encryption key
+						var keyAttributeString:String = lines[i].substring(11);
+						var keyAttributes:Array = keyAttributeString.split(",");
+						var keyComponent:String;
+						var keyValue:String;
+						var keyType:String;
+						var keyUrl:String;
+
+						for (var k:int=keyAttributes.length-1; k >= 0; k--) {
+							var keyComponents:Array = keyAttributes[k].split("=");
+							keyComponent = keyComponents[0];
+							keyValue = keyComponents[1];
+							if (keyComponents.length > 2) {
+								for (var j:int=2; j < keyComponents.length; j++) {
+									keyValue = keyValue + "=" + keyComponents[j];
+								}
+							}
+
+							if(keyComponent == "METHOD") {
+								keyType = keyValue;
+							}else if(keyComponent == "URI") {
+								var strip:RegExp = /"/g;
+								keyUrl = keyValue.replace(strip,"");
+								if (keyUrl.search(/(ftp|file|https?):\/\//) != 0) keyUrl = rateItem.url.substr(0, rateItem.url.lastIndexOf('/') + 1) + keyUrl;
+							}else if(keyComponent == "IV") {
+								keyIv = keyValue.substr(2);
+							}
+						}
+
+						// TODO - Support SAMPLE-AES
+						if(keyType == "AES-128") {
+							var keyItem:HTTPStreamingM3U8IndexKey = new HTTPStreamingM3U8IndexKey(keyType, keyUrl);
+							if(keyIv) {
+								keyIvGiven = true;
+							}
+							rateItem.addIndexKey(keyItem);
+							keyIndex++;
+							var keyRequest:Array = new Array(keyItem, quality);
+							dispatchEvent(new HTTPStreamingIndexHandlerEvent(HTTPStreamingIndexHandlerEvent.REQUEST_LOAD_INDEX, false, false, false, NaN, null, null, new URLRequest(keyUrl), keyRequest, true));
+						}
+					}else if(lines[i].indexOf("#EXT-X-ENDLIST") == 0){
+						rateItem.isLive = false;
+					}else if(lines[i].indexOf("#EXT-X-MEDIA-SEQUENCE:") == 0){
+						keyIvIndex = parseInt(lines[i].match(/(\d+)/)[1]);
+						rateItem.sequenceNumber = keyIvIndex;
+					}else{
+						if(lines[i].indexOf("#EXT-X-TARGETDURATION:") == 0){
+							rateItem.targetDuration = parseFloat(lines[i].match(/([\d\.]+)/)[1]);
+						}
+						if(lines[i].indexOf("#EXT-X-DISCONTINUITY") == 0){
 							discontinuity = true;
-						_prevChunkIndex = chunkIndex;
-					}
-					// _spike
-					indexItem = new HTTPStreamingM3U8IndexItem(duration, url, discontinuity);
-					rateItem.addIndexItem(indexItem);
-					//reset
-					discontinuity = false;
-					duration = 0;
-				}
-				else if(lines[i].indexOf("#EXTINF:") == 0){
-					duration = parseFloat(lines[i].match(/([\d\.]+)/)[1]);
-				}else if(lines[i].indexOf("#EXT-X-ENDLIST") == 0){
-					rateItem.isLive = false;
-				}else if(lines[i].indexOf("#EXT-X-MEDIA-SEQUENCE:") == 0){
-					rateItem.sequenceNumber = parseInt(lines[i].match(/(\d+)/)[1]);
-				}else{
-					if(lines[i].indexOf("#EXT-X-TARGETDURATION:") == 0){
-						rateItem.targetDuration = parseFloat(lines[i].match(/([\d\.]+)/)[1]);
-					}
-					if(lines[i].indexOf("#EXT-X-DISCONTINUITY") == 0){
-						discontinuity = true;
-					}
-				}
-			}
-
-			if(_DVR){
-				if(isNaN(_dvrStartTime))
-					_dvrStartTime = 0.0;
-				else{
-					var prevRateItem:HTTPStreamingM3U8IndexRateItem = _rateVec[quality];
-					if(prevRateItem){
-						len = rateItem.sequenceNumber-prevRateItem.sequenceNumber;
-						if(len > prevRateItem.manifest.length){
-							len = prevRateItem.manifest.length;
-						}
-						for(i = 0; i < len; i++){
-							_dvrStartTime += prevRateItem.manifest[i].duration;
-						}
-					}
-				}
-			}
-
-			_rateVec[quality] = rateItem;
-			var initialOffset:Number;
-			if(rateItem.isLive){
-				initialOffset = rateItem.totalTime - ((rateItem.totalTime/rateItem.manifest.length) * 3);
-				if(initialOffset < rateItem.totalTime - 30)
-					initialOffset = rateItem.totalTime - 30;
-			}
-			notifyIndexReady(quality, initialOffset);
-			if(rateItem.isLive){
-				notifyTotalDuration(rateItem.totalTime, rateItem.isLive);
-				_quality = quality;
+							// Reset encryption key variables
+							keyExists = false;
+							keyIvGiven = false;
+							keyIvIndex = 0;
+						}
+					}
+				}
+				rateItem.isParsed = true;
+
+				if(_DVR){
+					if(isNaN(_dvrStartTime))
+						_dvrStartTime = 0.0;
+					else{
+						var prevRateItem:HTTPStreamingM3U8IndexRateItem = _rateVec[quality];
+						if(prevRateItem){
+							len = rateItem.sequenceNumber-prevRateItem.sequenceNumber;
+							if(len > prevRateItem.manifest.length){
+								len = prevRateItem.manifest.length;
+							}
+							for(i = 0; i < len; i++){
+								_dvrStartTime += prevRateItem.manifest[i].duration;
+							}
+						}
+					}
+				}
+
+				_rateVec[quality] = rateItem;
+				generateIndexReadyForQuality(quality);
+
+				if(rateItem.isLive){
+					notifyTotalDuration(rateItem.totalTime, rateItem.isLive);
+					_quality = quality;
+				}
 			}
 		}

@@ -331,12 +409,52 @@
 					_fileHandler.initialOffset = manifest[_segment].startTime;
 					//dispatchEvent(new HTTPHLSStreamingEvent(HTTPHLSStreamingEvent.DISCONTINUITY));
 				}
-
+				// Set key and iv on fileHandler
+				_fileHandler.key = getCurrentKey();
+				_fileHandler.iv = getCurrentIv();
+
+				// Increment segments
 				++_segment;
 				++_absoluteSegment;
 			}

 			return request;
+		}
+
+		public function getCurrentKey():HTTPStreamingM3U8IndexKey {
+			var currentSegment:int = _segment;
+			var rateItem:HTTPStreamingM3U8IndexRateItem = _rateVec[_quality];
+			if (rateItem.key) {
+				var manifest:Vector.<HTTPStreamingM3U8IndexItem> = rateItem.manifest;
+				if (currentSegment >= 0 && currentSegment < manifest.length) {
+					var item:HTTPStreamingM3U8IndexItem = manifest[currentSegment];
+					if (item.key >= 0) {
+						var keys:Vector.<HTTPStreamingM3U8IndexKey> = rateItem.key;
+						if (item.key < keys.length) {
+							return keys[item.key];
+						}
+					}
+				}
+			}
+			return null;
+		}
+
+		public function getCurrentIv():String {
+			var currentSegment:int = _segment;
+			var rateItem:HTTPStreamingM3U8IndexRateItem = _rateVec[_quality];
+			if (rateItem.key) {
+				var manifest:Vector.<HTTPStreamingM3U8IndexItem> = rateItem.manifest;
+				if (currentSegment >= 0 && currentSegment < manifest.length) {
+					var item:HTTPStreamingM3U8IndexItem = manifest[currentSegment];
+					if (item.key >= 0) {
+						var keys:Vector.<HTTPStreamingM3U8IndexKey> = rateItem.key;
+						if (item.key < keys.length) {
+							return item.iv;
+						}
+					}
+				}
+			}
+			return null;
 		}

 		/*
@@ -368,6 +486,34 @@
 			);
 		}

+		private function generateIndexReadyForQuality(quality:int):void{
+			var rateItem:HTTPStreamingM3U8IndexRateItem = _rateVec[quality];
+			var isReady:Boolean = false;
+
+			if (rateItem.isParsed) {
+				var keys:Vector.<HTTPStreamingM3U8IndexKey> = rateItem.key;
+				if (keys) {
+					isReady = true;
+					for (var i:int=keys.length-1; i >= 0; i--) {
+						isReady = isReady && keys[i].isReady();
+					}
+				} else {
+					isReady = true;
+				}
+
+				// Send off notification if ready
+				if (isReady) {
+					var initialOffset:Number;
+					if(rateItem.isLive){
+						initialOffset = rateItem.totalTime - ((rateItem.totalTime/rateItem.manifest.length) * 3);
+						if(initialOffset < rateItem.totalTime - 30)
+							initialOffset = rateItem.totalTime - 30;
+					}
+					notifyIndexReady(quality, initialOffset);
+				}
+			}
+		}
+
 		private function notifyIndexReady(quality:int, offset:Number):void{

 			if(_DVR){


Fixed MouseUtils to report screen position, not stage position.

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/utils/MouseUtils.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/utils/MouseUtils.as
@@ -84,7 +84,7 @@
 		 */
 		static public function globalX(event:MouseEvent):Number
 		{
-			return event.stageX;
+			return event.screenX;
 		}

 		/**
@@ -97,7 +97,7 @@
 		 */
 		static public function globalY(event:MouseEvent):Number
 		{
-			return event.stageY;
+			return event.screenY;
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 1968
Author:   jimurphy@adobe.com
Date:     2008-06-05T15:31:56.961691Z

Log Message:
-----------
Merge 3.0.x revisions [1940,1954] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as
+++ frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as
@@ -22,7 +22,7 @@
  *  The skin for the minimize button in the TitleBar
  *  of a WindowedApplication or Window.
  *
- *  @productversion Apollo 1.0
+ *  @playerversion AIR 1.1
  */
 public class WindowMinimizeButtonSkin extends UIComponent
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4611
Author:   chaase@adobe.com
Date:     2009-01-22T00:30:21.783682Z

Log Message:
-----------
Various bug fixes in effects, mostly in the area of seeking, auto-reversing, and shader transitions.

QE Notes: None
Doc Notes: None
Bugs: sdk-17783, sdk-18767, sdk-18759, sdk-18461, sdk-18309, sdk-18013, sdk-18688
Reviewer: Jason
Tests: checkintests, Mustella: Effects, gumbo/effects, ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/UnconstrainItemAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/AddChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Parallel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/SetPropertyAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/RemoveChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateShaderTransitionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/AddItemAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/SetStyleAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/RemoveItemAction.as</path>

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as
@@ -382,7 +382,7 @@
         {
             // TODO (chaase): Handle seeking back in time
             // idea: Maybe once we get playing a sequence in reverse
-            // working perfectly, seeking back in time should seentially
+            // working perfectly, seeking back in time should essentially
             // 'play' (with zero duration) the child effects in reverse until
             // we get to the proper effect for the seek time
         }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11995
Author:   doug.lee@ssbbartgroup.com
Date:     2009-11-19T18:50:30.831767Z

Log Message:
-----------
Updated all AccImpls that use MSAA constants (except TextLayout) to
use the new AccConst references instead of hard-coding hex numbers and
local copies of the constants.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LabelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextInputAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowedApplicationAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SpinnerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RichEditableTextAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/NumericStepperAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SkinnableTextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ToggleButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/VideoPlayerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/DataGridAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/DataGridAccImpl.as
@@ -14,6 +14,7 @@

 import flash.accessibility.Accessibility;
 import flash.events.Event;
+import mx.accessibility.AccConst;
 import mx.collections.CursorBookmark;
 import mx.collections.IViewCursor;
 import mx.controls.DataGrid;
@@ -39,52 +40,6 @@

 	//--------------------------------------------------------------------------
 	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	private static const ROLE_SYSTEM_LISTITEM:uint = 0x22;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_INVISIBLE:uint = 0x00008000;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_OFFSCREEN:uint = 0x00010000;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_SELECTABLE:uint = 0x00200000;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_SELECTED:uint = 0x00000002;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_FOCUS:uint = 0x8005;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_SELECTION:uint = 0x8006;
-
-	//--------------------------------------------------------------------------
-	//
 	//  Class methods
 	//
 	//--------------------------------------------------------------------------
@@ -177,7 +132,7 @@
 	 */
 	override public function get_accRole(childID:uint):uint
 	{
-		return childID == 0 ? role : ROLE_SYSTEM_LISTITEM;
+		return childID == 0 ? role : AccConst.ROLE_SYSTEM_LISTITEM;
 	}

 	/**
@@ -212,17 +167,17 @@
 					row >= dataGrid.verticalScrollPosition
 						+ dataGrid.rowCount - (dataGrid.headerVisible ? 1 : 0))
 				{
-					accState |= (STATE_SYSTEM_OFFSCREEN | STATE_SYSTEM_INVISIBLE);
+					accState |= (AccConst.STATE_SYSTEM_OFFSCREEN | AccConst.STATE_SYSTEM_INVISIBLE);
 				}
 				else
 				{
-					accState |= STATE_SYSTEM_SELECTABLE;
+					accState |= AccConst.STATE_SYSTEM_SELECTABLE;

 					var renderer:IListItemRenderer = dataGrid.itemToItemRenderer(
 						getItemAt(row));

 					if (renderer && dataGrid.isItemSelected(renderer.data))
-						accState |= STATE_SYSTEM_SELECTED | STATE_SYSTEM_FOCUSED;
+						accState |= AccConst.STATE_SYSTEM_SELECTED | AccConst.STATE_SYSTEM_FOCUSED;
 				}
 			}
 			else
@@ -234,18 +189,18 @@
 					row >= dataGrid.verticalScrollPosition
 						+ dataGrid.rowCount - (dataGrid.headerVisible ? 1 : 0))
 				{
-					accState |= (STATE_SYSTEM_OFFSCREEN | STATE_SYSTEM_INVISIBLE);
+					accState |= (AccConst.STATE_SYSTEM_OFFSCREEN | AccConst.STATE_SYSTEM_INVISIBLE);
 				}
 				else if (dataGrid.columns[col].editable)
 				{
-					accState |= STATE_SYSTEM_SELECTABLE;
+					accState |= AccConst.STATE_SYSTEM_SELECTABLE;

 					var coord:Object = dataGrid.editedItemPosition;
 					if (coord &&
 						coord.rowIndex == row &&
 						coord.columnIndex == col)
 					{
-						accState |= STATE_SYSTEM_SELECTED | STATE_SYSTEM_FOCUSED;
+						accState |= AccConst.STATE_SYSTEM_SELECTED | AccConst.STATE_SYSTEM_FOCUSED;
 					}
 				}
 			}
@@ -519,10 +474,10 @@
 						var childID:uint = index + 1;

 						Accessibility.sendEvent(dataGrid, childID,
-												EVENT_OBJECT_FOCUS);
+												AccConst.EVENT_OBJECT_FOCUS);

 						Accessibility.sendEvent(dataGrid, childID,
-												EVENT_OBJECT_SELECTION);
+												AccConst.EVENT_OBJECT_SELECTION);
 					}
 				}
 				break;
@@ -537,11 +492,11 @@

 					Accessibility.sendEvent(dataGrid,
 									dataGrid.columns.length * item + col + 1,
-									EVENT_OBJECT_FOCUS);
+									AccConst.EVENT_OBJECT_FOCUS);

 					Accessibility.sendEvent(dataGrid,
 									dataGrid.columns.length * item + col + 1,
-									EVENT_OBJECT_SELECTION);
+									AccConst.EVENT_OBJECT_SELECTION);
 				}
 				break;
 			}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.accessibility
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17403
Author:   dloverin@adobe.com
Date:     2010-08-20T12:34:27.065650Z

Log Message:
-----------
Work around for OSMF negative duration problem.

When a video has a negative duration (FM-1009) the function canSeekTo(0) always returns false since that is past the end of the video. When VideoDisplay's autoPlay property is false it can never complete its logic to seek to the first frame.

The work around listens for the first current time change event and pauses the video when it arrives. I think this it the best we can do since we can't seek.

QE notes: None.
Doc notes: None.
Bugs: SDK-26961
Reviewer: Ryan
Tests run: VideoDisplay
Is noteworthy for integration: Yes.

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

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -1561,7 +1561,7 @@
         videoPlayer.addEventListener(MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE, videoPlayer_mediaPlayerStateChangeHandler);
         videoPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, dispatchEvent);
         videoPlayer.addEventListener(LoadEvent.BYTES_LOADED_CHANGE, dispatchEvent);
-        videoPlayer.addEventListener(TimeEvent.DURATION_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(TimeEvent.DURATION_CHANGE, videoPlayer_durationChangeHandler);
         videoPlayer.addEventListener(TimeEvent.COMPLETE, dispatchEvent);

         addChild(videoContainer);
@@ -1869,8 +1869,8 @@
                 if (videoPlayer.displayObject)
                     videoPlayer.displayObject.visible = true;

-                // don't need to do anything to play except change state info and reset
-                // properties above
+                videoPlayer.removeEventListener(TimeEvent.CURRENT_TIME_CHANGE, videoPlayer_currentTimeChangeHandler);
+                videoPlayer.removeEventListener(MediaPlayerCapabilityChangeEvent.CAN_SEEK_CHANGE, videoPlayer_canSeekChangeHandler);
             }
             else
             {
@@ -2167,6 +2167,7 @@
     private function videoPlayer_mediaPlayerStateChangeHandlerForLoading(event:MediaPlayerStateChangeEvent):void
     {
         // only come in here when we want to load the video without playing it.
+        //trace("videoPlayer_mediaPlayerStateChangeHandlerForLoading: mediaPlayerState = " + event.state);

         // wait until we are ready so that we can set mute, play, pause, and seek
         if (event.state == MediaPlayerState.READY)
@@ -2183,6 +2184,8 @@
             // otherwise, we'll just cause play().
             if (inLoadingState1)
             {
+                //trace("videoPlayer_mediaPlayerStateChangeHandlerForLoading: inLoadingState1");
+
                 beforeLoadMuted = videoPlayer.muted;
                 videoPlayer.muted = true;

@@ -2194,6 +2197,7 @@

             // call play(), here, then wait to call pause() and seek(0) in the
             // mediaSizeChangeHandler
+            //trace("videoPlayer_mediaPlayerStateChangeHandlerForLoading: call videoPlayer.play()");
             videoPlayer.play();
         }
     }
@@ -2203,13 +2207,17 @@
      */
     private function videoPlayer_mediaSizeChangeHandler(event:DisplayObjectEvent):void
     {
+        //trace("videoPlayer_mediaSizeChangeHandler");
         invalidateSize();

         // if we're loading up the video, then let's finish the load in here
         if (inLoadingState2)
         {
+            //trace("videoPlayer_mediaSizeChangeHandler: inLoadingState2");
+
             if (videoPlayer.canSeek && videoPlayer.canSeekTo(0))
             {
+                //trace("videoPlayer_mediaSizeChangeHandler: canSeek to first frame");
                 inLoadingState3 = true;

                 // Don't call pause and seek inside this handler because OSMF is
@@ -2218,6 +2226,15 @@
                 // event (see SDK-27028).
                 callLater(pauseAndSeekCallBack);
             }
+            else if (duration < 0)
+            {
+                // Work around for negative durations - FM-1009
+                // We want to seek to the first frame but we can't because the
+                // duration of the video is reported as negative. As a work around,
+                // listen for the first time change event and then pause the video.
+                //trace("videoPlayer_mediaSizeChangeHandler: negative duration - wait for first current time change event");
+                videoPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, videoPlayer_currentTimeChangeHandler);
+            }
             else
             {
                 //trace("videoPlayer_mediaSizeChangeHandler: waiting for media to become seekable");
@@ -2285,5 +2302,63 @@
                 videoPlayer.displayObject.visible = true;
         }
     }
+
+
+    /**
+     *  @private
+     *
+     *  Work around for negative durations - see FM-1009.
+     *  See want to seek to the first frame but can't because
+     *  the vidoe has a negative duration. So we listen to the
+     *  current time. When we get a time change so we must be at
+     *  least the first frames so pause the video now and clean
+     *  up the load state variables.
+     */
+    private function videoPlayer_currentTimeChangeHandler(event:TimeEvent):void
+    {
+        //trace("videoPlayer_currentTimeChangeHandler: time = " + event.time);
+
+        videoPlayer.removeEventListener(TimeEvent.CURRENT_TIME_CHANGE, videoPlayer_currentTimeChangeHandler);
+        videoPlayer.removeEventListener(MediaPlayerCapabilityChangeEvent.CAN_SEEK_CHANGE, videoPlayer_canSeekChangeHandler);
+
+        videoPlayer.pause();
+        videoPlayer.muted = beforeLoadMuted;
+
+        if (videoPlayer.displayObject)
+            videoPlayer.displayObject.visible = true;
+
+        inLoadingState1 = false;
+        inLoadingState2 = false;
+        inLoadingState3 = false;
+
+    }
+
+    /**
+     *  @private
+     *
+     *  Work around for negative durations - see FM-1009.
+     *
+     *  If we get a duration event that is negative while in
+     *  inLoadingState2 is true, then listen for the first time
+     *  change event so we can pauase the video.
+     */
+    private function videoPlayer_durationChangeHandler(event:TimeEvent):void
+    {
+        //trace("videoPlayer_durationChangeHandler: time = " + event.time);
+        dispatchEvent(event);
+
+        if (inLoadingState2)
+        {
+            if (event.time < 0)
+            {
+                // Work around for negative durations - FM-1009
+                // We want to seek to the first frame but we can't because the
+                // duration of the video is reported as negative. As a work around,
+                // listen for the first time change event and then pause the video.
+                //trace("videoPlayer_durationChangeHandler: negative duration - wait for first current time change event");
+                videoPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, videoPlayer_currentTimeChangeHandler);
+            }
+        }
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Removed Handles to Flex Framework features in AsynchronousTestCase

--- as3/src/asunit/framework/AsynchronousTestCase.as
+++ as3/src/asunit/framework/AsynchronousTestCase.as
@@ -6,10 +6,6 @@
     import flash.net.URLLoader;
     import flash.utils.getTimer;

-    import mx.rpc.AsyncToken;
-    import mx.rpc.Responder;
-    import mx.rpc.events.FaultEvent;
-
     /**
      * Extend this class if you have a TestCase that requires the
      * asynchronous load of external data.
@@ -68,11 +64,6 @@
             loader.addEventListener(Event.OPEN, openHandler);
             loader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
             loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
-        }
-
-        // use this method in overriding run() if you are using an HTTPService:
-        protected function configureResponder(token:AsyncToken):void {
-            token.addResponder(new Responder(resultFunc, faultFunc));
         }

         // in a subclass, you should override this method and call super.run() at the end
@@ -153,32 +144,6 @@
             dispatchEvent(new Event(Event.COMPLETE));
         }

-        protected function resultFunc(event:Object):void
-        {
-            completeHandler(event as Event);
-        }
-
-        protected function faultFunc(event:Object):void
-        {
-            var faultEvent:FaultEvent = event as FaultEvent;
-            if (faultEvent == null)
-            {
-                return;
-            }
-            var cause:Object = faultEvent.fault.rootCause;
-            var ioErrorEvent:IOErrorEvent = cause as IOErrorEvent;
-            if (ioErrorEvent)
-            {
-                ioErrorHandler(ioErrorEvent);
-                return;
-            }
-            var securityErrorEvent:SecurityErrorEvent = cause as SecurityErrorEvent;
-            if (securityErrorEvent)
-            {
-                securityErrorHandler(securityErrorEvent);
-            }
-        }
-
         public function testRemoteDuration():void {
             if (!remoteDurationIsValid())
             {


Fixing typo.

Fixing typo.

--- driver/src/main/flex/org/postgresql/db/Connection.as
+++ driver/src/main/flex/org/postgresql/db/Connection.as
@@ -59,7 +59,7 @@
         }

         public function handleError(fields:Object):void {
-            LOGGER.warn("Notice:");
+            LOGGER.warn("Error:");
             for (var key:String in fields) {
                 LOGGER.warn("\t{0}: {1}", key, fields[key]);
             }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/containers/GridItem.as
+++ frameworks/projects/mx/src/mx/containers/GridItem.as
@@ -102,6 +102,11 @@
  *  @see mx.containers.GridRow
  *
  *  @includeExample examples/GridLayoutExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class GridItem extends HBox
 {
@@ -115,6 +120,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function GridItem()
     {
@@ -154,6 +164,11 @@
      *  Number of columns of the Grid container spanned by the cell.
      *
      *  @default 1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get colSpan():int
     {
@@ -187,6 +202,11 @@
      *  You cannot extend a cell past the number of rows in the Grid.
      *
      *  @default 1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get rowSpan():int
     {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.skins.mobile.supportClasses
 {


fixed reactions re-reagistration over component state change. On state change every reaction is removed, and recreated. Remember, that all reaction added uisng FabricationMediator.addReaction method have to be reregistered manually ( you can do it overriding FlexMediator.stateChangeListener

--- src/org/puremvc/as3/multicore/utilities/fabrication/patterns/mediator/FlexMediator.as
+++ src/org/puremvc/as3/multicore/utilities/fabrication/patterns/mediator/FlexMediator.as
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+
 package org.puremvc.as3.multicore.utilities.fabrication.patterns.mediator {
     import mx.events.StateChangeEvent;

@@ -26,19 +26,20 @@
 	import org.puremvc.as3.multicore.utilities.fabrication.patterns.mediator.resolver.Expression;
 	import org.puremvc.as3.multicore.utilities.fabrication.patterns.mediator.resolver.MediatorRegistrar;
 	import org.puremvc.as3.multicore.utilities.fabrication.utils.CloneUtils;
+    import org.puremvc.as3.multicore.utilities.fabrication.vo.Reaction;

     use namespace fabrication_internal;

 	import mx.core.UIComponent;
-
+
 	import flash.utils.describeType;
-	import flash.utils.getQualifiedClassName;
+	import flash.utils.getQualifiedClassName;

 	/**
 	 * FlexMediator is the base mediator class for all Flex based application
-	 * mediators. It provides automatic component resolution using the
-	 * flex component resolver.
-	 *
+	 * mediators. It provides automatic component resolution using the
+	 * flex component resolver.
+	 *
 	 * @author Darshan Sawardekar, Rafał Szemraj
 	 */
 	public class FlexMediator extends FabricationMediator implements ICloneable {
@@ -52,16 +53,16 @@
 		 * Stores the registrars used in this mediator
 		 */
 		protected var registrars:Array;
-
+
 		/**
 		 * Flag indicates whether the mediator has been disposed
 		 */
 		public var disposed:Boolean = false;
-
-		/**
-		 * Singleton key name for the component resolver within this facade.
-		 */
-		static public var routeMapperKey:String = "routeMapper";
+
+		/**
+		 * Singleton key name for the component resolver within this facade.
+		 */
+		static public var routeMapperKey:String = "routeMapper";

 		/**
 		 * Reference to the component route mapper for this facade.
@@ -74,49 +75,49 @@
 		 */
 		public function FlexMediator(name:String = null, viewComponent:Object = null) {
 			super(name, viewComponent);
-
+
 			registrars = new Array();
 		}

         /**
 		 * Removes the registrars used by the mediator.
-		 *
+		 *
 		 * @see org.puremvc.as3.multicore.utilities.fabrication.interfaces.IDisposable#dispose()
 		 */
 		override public function dispose():void {
 			if (disposed) {
 				return;
 			}
-
+
 			disposed = true;
 			var n:int = registrars.length;
 			var registrar:MediatorRegistrar;
-
+
 			for (var i:int = 0; i < n; i++) {
 				registrar = registrars[i] as MediatorRegistrar;

 				registrar.removeEventListener(MediatorRegistrarEvent.REGISTRATION_COMPLETED, registrationCompletedListener);
 				registrar.removeEventListener(MediatorRegistrarEvent.REGISTRATION_CANCELED, registrationCanceledListener);
-
+
 				registrar.dispose();
 				registrars[i] = null;
 			}
-
+
 			registrars = null;
 			routeMapper = null;

 			super.dispose();
 		}
-
+
 		/**
 		 * Overrides the initializeNotifier to initialize local references to the route mapper.
 		 */
 		override public function initializeNotifier(key:String):void {
 			super.initializeNotifier(key);

-			initializeRouteMapper();
-		}
-
+			initializeRouteMapper();
+		}
+
 		/**
 		 * Creates the singleton route mapper for the current facade.
 		 * @private
@@ -137,7 +138,7 @@
 		 * This method needs to override if the mediator constructor
 		 * contains more than 2 required parameters that cannot take
 		 * explicit null values. The supported constructors are,
-		 *
+		 *
 		 *

 		 *
Mediator(name:String, viewComponent:Object)

 		 *
Mediator(viewComponent:Object)

@@ -147,35 +148,35 @@
 		public function clone():ICloneable {
 			var classpath:String = getQualifiedClassName(this);
 			classpath.replace("::", ".");
-
+
 			var clazz:Class = fabrication.getClassByName(classpath);
 			var clazzInfo:XML = describeType(clazz);
-			var constructorNode:XMLList = clazzInfo..constructor as XMLList;
-			var requiredParameters:XMLList = constructorNode.parameter.(@optional = "false");
+			var constructorNode:XMLList = clazzInfo..constructor as XMLList;
+			var requiredParameters:XMLList = constructorNode.parameter.(@optional = "false");
 			var requiredParametersCount:int = requiredParameters.length();
 			var mediator:FlexMediator = CloneUtils.newInstance(clazz, requiredParametersCount) as FlexMediator;

 			mediator.setMediatorName(getMediatorName());
 			mediator.setViewComponent(getViewComponent());
-
+
 			requiredParameters = null;
 			constructorNode = null;
 			clazzInfo = null;
 			clazz = null;
-
+
 			return mediator;
 		}

 		/**
-		 * Changes the mediator name. This is done when RegExp
+		 * Changes the mediator name. This is done when RegExp
 		 * component resolvers are used.
-		 *
+		 *
 		 * @param name The name of the mediator
 		 */
 		fabrication_internal function setMediatorName(name:String):void {
 			this.mediatorName = name;
 		}
-
+
 		/**
 		 * Creates the base link of the component resolver chain. Additional
 		 * link can be added to this to indicate the path to your viewComponent.
@@ -195,25 +196,25 @@
 		 * created with a deferred creationPolicy or programmatically as the
 		 * result of an application state change, etc. The component
 		 * resolver supports all these cases.
-		 */
+		 */
 		override public function registerMediator(mediator:IMediator):IMediator {
 			var registrar:MediatorRegistrar = new MediatorRegistrar(fabFacade);
 			var mediatorComponent:Object = mediator.getViewComponent();
-
+
 			if (mediatorComponent is Expression) {
 				var expression:Expression = mediatorComponent as Expression;
 				var resolver:ComponentResolver = expression.root;
 				var flexMediator:FlexMediator = mediator as FlexMediator;
-
+
 				registrar.addEventListener(MediatorRegistrarEvent.REGISTRATION_COMPLETED, registrationCompletedListener);
 				registrar.addEventListener(MediatorRegistrarEvent.REGISTRATION_CANCELED, registrationCanceledListener);
-
+
 				registrars.push(registrar);
 				registrar.register(flexMediator, resolver);
 			} else {
 				super.registerMediator(mediator);
 			}
-
+
 			return mediator;
 		}

@@ -224,7 +225,7 @@
             var component:UIComponent = viewComponent as UIComponent;
             if( component ) {

-                component.addEventListener( StateChangeEvent.CURRENT_STATE_CHANGE, onViewComponentStateChangeListener );
+                component.addEventListener( StateChangeEvent.CURRENT_STATE_CHANGE, stateChangeListener );
             }

         }
@@ -232,28 +233,28 @@

         /**
 		 * Disposes the mediator on removal from the facade. Subclasses
-		 * that override this should call super.dispose.
+		 * that override this should call super.dispose.
 		 */
 		override public function onRemove():void {

             var component:UIComponent = viewComponent as UIComponent;
             if( component ) {

-                component.removeEventListener( StateChangeEvent.CURRENT_STATE_CHANGE, onViewComponentStateChangeListener );
+                component.removeEventListener( StateChangeEvent.CURRENT_STATE_CHANGE, stateChangeListener );
             }
 			dispose();
 		}
-
+
 		/**
 		 * Hook method to listen for a specific mediator registration. Subclasses
-		 * can use this method to react to mediator registration as needed.
+		 * can use this method to react to mediator registration as needed.
 		 */
 		protected function registrationCompletedListener(event:MediatorRegistrarEvent):void {
 			//var registrar:MediatorRegistrar = event.target as MediatorRegistrar;
 			//trace("AutoRegistration completed for mediator " + event.mediator.getMediatorName());
 			//trace("\tviewComponent = " + event.mediator.getViewComponent());
 		}
-
+
 		/**
 		 * Hook method to listen for a specific mediator registration cancellation.
 		 * Subclasses can use this method to react to mediator cancellation as needed.
@@ -263,8 +264,18 @@
 			//trace("AutoRegistration removed for mediator " + event.mediator.getMediatorName());
 		}

-        protected function onViewComponentStateChangeListener(event:StateChangeEvent):void
+        protected function stateChangeListener(event:StateChangeEvent):void
         {
+            if (currentReactions != null) {
+				var n:int = currentReactions.length;
+				var reaction:Reaction;
+				for (var i:int = 0;i < n; i++) {
+					reaction = currentReactions[i];
+					reaction.dispose();
+				}
+
+				currentReactions = null;
+			}
             initializeReactions();
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -9,7 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.core
+package spark.core
 {

 import flash.display.DisplayObjectContainer;


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

--- frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.as
+++ frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.as
@@ -1,19 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 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.
-//
-////////////////////////////////////////////////////////////////////////////////

-/*
- *  The IDisplayObjectContainerInterface defines the basic set of APIs
- *  for web version of flash.display.DisplayObjectContainer
- *
- */
 import flash.text.TextSnapshot;
 import flash.geom.Point;