Transferred from the Adobe Open Source Subversion Repository

Revision: 4111
Author:   chaase@adobe.com
Date:     2008-11-14T16:39:46.711628Z

Log Message:
-----------
Makes auto-reversal of transitions work more completely and correctly, fixing some API issues and other related animation/effect issues along the way. Seeking behavior in effects is improved (although still far from perfect, especially for non-playing effects), and dynamic behavior of effects (picking up values dynamically from the environment) is improved.

QE Notes: better seek() behavior, can just call it on non-playing effects and it will automatically play/pause the effect if necessary
Doc Notes: None
Bugs: sdk-17294, sdk-16595, sdk-18104, sdk-18105, sdk-18106, sdk-18107
Reviewer: Jason
tests: checkintests, Mustella: tests/Effects, tests/gumbo/effects tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/Transition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/RemoveAction.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/events/EffectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.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/flex4/src/mx/effects/CallAction.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/FxAnimate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.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/Sequence.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/flex4/src/mx/effects/AddAction.as</path>

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

--- frameworks/projects/framework/src/mx/effects/EffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/EffectInstance.as
@@ -147,7 +147,7 @@
         if (repeatCount > 0)
         {
             value = duration * repeatCount +
-                    (repeatDelay * repeatCount - 1) + startDelay;
+                    (repeatDelay * (repeatCount - 1)) + startDelay;
         }

         return value;
@@ -285,8 +285,16 @@
     //  playheadTime
     //----------------------------------

-    /**
-     *  @copy mx.effects.IEffectInstance#playheadTime
+    // TODO (chaase): This property should be in an interface, to
+    // allow it to be called easily through an interface instead of
+    // having to import Effect just to call it
+    // TODO (chaase): Consider renaming this property; playheadTime
+    // is very video-specific
+    /**
+     *  The current position of the effect, in milliseconds.
+     *  This value is between 0 and the value of the
+     *  duration property.
+     *  Use the seek() method to change the position of the effect.
      */
     public function get playheadTime():Number
     {
@@ -605,6 +613,14 @@
         if (delayTimer)
             delayTimer.reset();
         stopRepeat = true;
+        // Dispatch STOP event in case listeners need to handle this situation
+        // The Effect class may hinge setting final state values on whether
+        // the effect was stopped or ended.
+        dispatchEvent(new EffectEvent(EffectEvent.EFFECT_STOP,
+                                     false, false, this));
+        if (target && (target is IEventDispatcher))
+            target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_STOP,
+                                                 false, false, this));
         finishEffect();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2878
Author:   gosmith@adobe.com
Date:     2008-08-19T01:47:49.628691Z

Log Message:
-----------
Added an ObjectUtil.getUnqualifiedClassName() utility method for use in the className getter in four classes, which previously had copy-and-paste code.

Moved the STYLE_UNINITIALIZED constant from StyleManager to StyleProtoChain, since it indicates an uninitialized style proto chain.

Reviewer: Jono
Bugs: -
QA: No
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.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/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
+++ frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
@@ -34,6 +34,24 @@

     //--------------------------------------------------------------------------
     //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The inheritingStyles and nonInheritingStyles properties
+     *  are initialized to this empty Object.
+     *  This allows the getStyle() and getStyle()
+     *  methods to simply access inheritingStyles[] and nonInheritingStyles[]
+     *  without needing to first check whether those objects exist.
+     *  If they were simply initialized to {}, we couldn't determine
+     *  whether the style chain has already been built or not.
+     */
+    public static const STYLE_UNINITIALIZED:Object = {};
+
+    //--------------------------------------------------------------------------
+    //
     //  Class methods
     //
     //--------------------------------------------------------------------------
@@ -65,7 +83,8 @@
         // Push items onto the proto chain in reverse order, beginning with
         // 6) Follow the usual search path for the styleName object
         var nonInheritChain:Object = styleName.nonInheritingStyles;
-        if (!nonInheritChain || nonInheritChain == StyleManager.STYLE_UNINITIALIZED)
+        if (!nonInheritChain ||
+            nonInheritChain == StyleProtoChain.STYLE_UNINITIALIZED)
         {
             nonInheritChain = StyleManager.stylesRoot;

@@ -74,8 +93,11 @@
         }

         var inheritChain:Object = styleName.inheritingStyles;
-        if (!inheritChain || inheritChain == StyleManager.STYLE_UNINITIALIZED)
+        if (!inheritChain ||
+            inheritChain == StyleProtoChain.STYLE_UNINITIALIZED)
+        {
             inheritChain = StyleManager.stylesRoot;
+        }

         // If there's no type selector on this object, then we can collapse
         // 6 steps to 2 (see above)


Transferred from the Adobe Open Source Subversion Repository

Revision: 6952
Author:   jimurphy@adobe.com
Date:     2009-05-15T14:28:46.807327Z

Log Message:
-----------
Merged 3.x revisions 6875,6899 -> trunk

integrate flex-messaging-common.jar - 4.0.0.6920

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/flash-integration/FlexComponentKit.mxp</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/FlexComponentKit.mxi</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/TileBase.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/TileBase.as
@@ -1990,7 +1990,7 @@
         // the freeItemRenderers table has a free one
         if (factory == itemRenderer)
         {
-            if (freeItemRenderers && freeItemRenderers.length)
+            if (freeItemRenderers && freeItemRenderers.length && freeItemRenderersByFactory[factory])
             {
                 renderer = freeItemRenderers.pop();
                 delete freeItemRenderersByFactory[factory][renderer];


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as
+++ frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as
@@ -30,6 +30,12 @@
  *  Dispatched when a message is received by the Consumer.
  *
  *  @eventType mx.messaging.events.MessageEvent.MESSAGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 [Event(name="message", type="mx.messaging.events.MessageEvent")]

@@ -60,6 +66,12 @@
  *    timestamp="No default."
  *  />
  *

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class MultiTopicConsumer extends AbstractConsumer
 {
@@ -93,6 +105,12 @@
      *       trace("-App recieved message: " + msg.toString());
      *   }
      *   </listing>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function MultiTopicConsumer()
     {
@@ -118,12 +136,24 @@
      * registered with the boolean true.  When we generate a subscription message and
      * send it to the server, we add/remove those subscriptions from this list.  Thus this
      * list tracks the subscriptions we have sent to the server.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     private var _currentSubscriptions:Object = {};

     /**
      * Used when the subscriptions property changes so we batch all changes made in one
      * frame into a single multi-subscription message
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     private var _subchangeTimer:Timer = null;

@@ -149,6 +179,12 @@
      *
      *
The remote destination must understand the value of the selector
      *  expression.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get subscriptions():ArrayCollection
     {
@@ -159,6 +195,12 @@
      * Provide a new subscriptions array collection.  This should be an ArrayCollection
      * containing SubscriptionInfo instances which define message topics and selectors
      * you want received by this consumer.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function set subscriptions(value:ArrayCollection):void
     {
@@ -204,6 +246,12 @@
      * @param maxFrequency The maximum number of messages per second the Consumer wants
      * to receive for the subscription. Note that this value overwrites the Consumer
      * wide maxFrequency.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function addSubscription(subtopic:String = null, selector:String = null, maxFrequency:uint = 0):void
     {
@@ -217,6 +265,12 @@
      * @param subtopic The subtopic for the subscription.
      *
      * @param selector The selector for the subscription.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function removeSubscription(subtopic:String = null, selector:String = null):void
     {
@@ -246,6 +300,12 @@
      * Returns a subscribe message.
      *
      * @return The subscribe CommandMessage.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     override protected function buildSubscribeMessage():CommandMessage
     {
@@ -289,6 +349,12 @@
      * receive missed messages.
      *
      * @return The unsubscribe CommandMessage.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     override protected function buildUnsubscribeMessage(preserveDurable:Boolean):CommandMessage
     {
@@ -350,6 +416,12 @@
          * disconnected), we clear out the subscriptions on the server.  The
          * client will then resubscribe and send all subscriptions on the next
          * connect.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion BlazeDS 4
+         *  @productversion LCDS 3
          */
         if (!value)
             _currentSubscriptions = {};


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as
+++ frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as
@@ -46,6 +46,12 @@
  *  for each message they send depending upon whether the outbound message
  *  was sent and processed successfully or not.
  *  </p>
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class MultiTopicProducer extends AbstractProducer
 {
@@ -73,6 +79,12 @@
      *       producer.send(msg);
      *   }
      *   </listing>
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
 	public function MultiTopicProducer()
 	{
@@ -100,6 +112,12 @@

     /**
      *  Provides access to the list of subtopics used in publishing any messages
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get subtopics():ArrayCollection
     {
@@ -110,6 +128,12 @@
      * Provide a new ArrayCollection of Strings each of which define a subtopic
      * for use in publishing the message.  Any consumers subscribed to any of the
      * subtopics will receive these messages.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function set subtopics(value:ArrayCollection):void
     {
@@ -140,6 +164,12 @@
      * @param subtopic The subtopic to add to the current list of
      * subtopics sent by this producer.
      *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function addSubtopic(subtopic:String):void
     {
@@ -151,6 +181,12 @@
      * subtopic is not in the list.
      *
      * @param subtopic The subtopic to remove from the subtopics property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function removeSubtopic(subtopic:String):void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8393
Author:   jszeto@adobe.com
Date:     2009-07-06T20:46:27.558863Z

Log Message:
-----------
Updated FIXME comments

Changed some to TODOs, removed some and filed bugs for the remainder

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/DropDownList.as
+++ frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -222,8 +222,7 @@
     //--------------------------------------------------------------------------

     private var labelChanged:Boolean = false;
-    // FIXME (jszeto): Should this be protected?
-    private var proposedSelectedIndex:Number = -1;
+    mx_internal var proposedSelectedIndex:Number = -1;
     mx_internal static var PAGE_SIZE:int = 5;

     //--------------------------------------------------------------------------
@@ -459,8 +458,8 @@
      *  @private
      *  Called whenever we need to update the text passed to the labelDisplay skin part
      */
-    // FIXME (jszeto): Make this protected and make the name more generic (passing data to skin)
-    private function updateLabelElement():void
+    // TODO (jszeto): Make this protected and make the name more generic (passing data to skin)
+    mx_internal function updateLabelElement():void
     {
         if (labelDisplay)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8615
Author:   dsubrama@adobe.com
Date:     2009-07-16T00:06:27.325362Z

Log Message:
-----------
Added in enumerations to Inspectable metadata for a bunch of properties.

Reviewer: Ryan
QA: Yes, regress
Doc: No
Checkintests: Pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/IDeferredContentOwner.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>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.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/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -545,10 +545,9 @@
     //  playing
     //----------------------------------

+    private var _playing:Boolean = false;
+
     [Inspectable(category="General")]
-
-    private var _playing:Boolean = false;
-
     [Bindable("playingChanged")]
     /**
      *  Returns true if the video is playing or is attempting to play.


Transferred from the Adobe Open Source Subversion Repository

Revision: 7290
Author:   rfrishbe@adobe.com
Date:     2009-05-26T23:06:26.653919Z

Log Message:
-----------
VideoPlayer bug fixes:

- Removing "mx_internal::" and replacing with "use namespace mx_internal"
- Fixing up how we deal with "null", the empty string case, and when a connection error occurs
- Cleaning up some skins

QE Notes: -
Doc Notes: -
Bugs: SDK-21378, SDK-21314, SDK-21303, SDK-20929, SDK-20961
Reviewer: Deepa
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarTrackSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -178,7 +178,7 @@
         VideoPlayer.iNCManagerClass = fl.video.NCManagerDynamicStream;

         var flvPlayer:VideoPlayer = new VideoPlayer();
-        mx_internal::videoPlayer = flvPlayer;
+        videoPlayer = flvPlayer;

         // we wrap the VideoPlayer inside of another container because
         // the video player doesn't handle setting x/y correctly. we could allocate
@@ -330,13 +330,13 @@
      */
     public function get autoRewind():Boolean
     {
-        var myVideoPlayer:VideoPlayer = mx_internal::videoPlayer;
+        var myVideoPlayer:VideoPlayer = videoPlayer;
         return myVideoPlayer.autoRewind;
     }

     public function set autoRewind(value:Boolean):void
     {
-        mx_internal::videoPlayer.autoRewind = value;
+        videoPlayer.autoRewind = value;
     }

     //----------------------------------
@@ -437,9 +437,9 @@
             // We don't need to worry about NO_SCALE as that's just not putting
             // an explicit width on the VideoElement.
             if (value)
-                mx_internal::videoPlayer.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO;
+                videoPlayer.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO;
             else
-                mx_internal::videoPlayer.scaleMode = VideoScaleMode.EXACT_FIT;
+                videoPlayer.scaleMode = VideoScaleMode.EXACT_FIT;

             invalidateSize();
             invalidateDisplayList();
@@ -481,15 +481,15 @@
         // if trying to unmute and we're muted
         if (!value && mutedVolume != -1)
         {
-            mx_internal::videoPlayer.volume = mutedVolume;
+            videoPlayer.volume = mutedVolume;
             mutedVolume = -1;
             dispatchEvent(new Event("volumeChanged"));
         }
         // if trying to mute and we're not muted
         else if (value && mutedVolume == -1)
         {
-            mutedVolume = mx_internal::videoPlayer.volume;
-            mx_internal::videoPlayer.volume = 0;
+            mutedVolume = videoPlayer.volume;
+            videoPlayer.volume = 0;
             dispatchEvent(new Event("volumeChanged"));
         }
     }
@@ -499,7 +499,7 @@
     //----------------------------------

     [Bindable("playheadUpdate")]
-    [Bindable("autoRewound")]
+    [Bindable("playheadTimeChanged")]
     [Inspectable(Category="General", defaultValue="0")]

     /**
@@ -544,12 +544,12 @@
      */
     public function get playheadTime():Number
     {
-        return mx_internal::videoPlayer.playheadTime;
+        return videoPlayer.playheadTime;
     }

     public function set playheadTime(value:Number):void
     {
-        mx_internal::videoPlayer.playheadTime = value;
+        videoPlayer.playheadTime = value;
     }

     //----------------------------------
@@ -653,6 +653,7 @@

     [Bindable("complete")]
     [Bindable("metadataReceived")]
+    [Bindable("totalTimeChanged")]
     [Inspectable(Category="General", defaultValue="0")]

     /**
@@ -671,7 +672,7 @@
      */
     public function get totalTime():Number
     {
-        return mx_internal::videoPlayer.totalTime;
+        return videoPlayer.totalTime;
     }

     //----------------------------------
@@ -688,7 +689,7 @@
      */
     public function get videoObject():Video
     {
-        return mx_internal::videoPlayer as Video;
+        return videoPlayer as Video;
     }

     //----------------------------------
@@ -710,7 +711,7 @@
      */
     public function get volume():Number
     {
-        return mx_internal::videoPlayer.volume;
+        return videoPlayer.volume;
     }

     /**
@@ -719,7 +720,7 @@
     public function set volume(value:Number):void
     {
         mutedVolume = -1;
-        mx_internal::videoPlayer.volume = value;
+        videoPlayer.volume = value;
         dispatchEvent(new Event("volumeChanged"));
     }

@@ -757,8 +758,8 @@
     {
         super.measure();

-        var vw:Number = mx_internal::videoPlayer.videoWidth;
-        var vh:Number = mx_internal::videoPlayer.videoHeight;
+        var vw:Number = videoPlayer.videoWidth;
+        var vh:Number = videoPlayer.videoHeight;

         measuredWidth = vw;
         measuredHeight = vh;
@@ -784,7 +785,7 @@
     {
         super.updateDisplayList(unscaledWidth, unscaledHeight);

-        var flvPlayer:VideoPlayer = mx_internal::videoPlayer;
+        var flvPlayer:VideoPlayer = videoPlayer;

         flvPlayer.width = Math.floor(unscaledWidth);
         flvPlayer.height = Math.floor(unscaledHeight);
@@ -811,7 +812,7 @@
     public function pause():void
     {
         setPlaying(false);
-        mx_internal::videoPlayer.pause();
+        videoPlayer.pause();
     }

     /**
@@ -825,6 +826,13 @@
      */
     public function play():void
     {
+        // close old video if it was open
+        if (sourceLastPlayed != null && sourceLastPlayed != this.source)
+        {
+            videoPlayer.close();
+            videoPlayer.clear();
+        }
+
         // check for 2 cases: streaming video or progressive download
         if (source is StreamingVideoSource)
         {
@@ -839,16 +847,15 @@
             // stream where it was paused, one needs to call play(null).
             if (sourceLastPlayed == this.source)
             {
+                if (videoPlayer.state == VideoState.CONNECTION_ERROR)
+                {
+                    setPlaying(false);
+                    return;
+                }
                 flvSource = null;
             }
             else
             {
-                if (sourceLastPlayed != null)
-                {
-                    videoPlayer.close();
-                    videoPlayer.clear();
-                }
-
                 flvSource =  new DynamicStreamItem();
                 sourceLastPlayed = source;

@@ -877,7 +884,7 @@
                 videoPlayer.play2(flvSource);
             }
         }
-        else if (source is String && String(source).length != 0)
+        else if (source is String && String(source).length > 0)
         {
             // The progressive case
             var sourceString:String;
@@ -887,16 +894,16 @@
             // stream where it was paused, one needs to call play(null).
             if (sourceLastPlayed == this.source)
             {
+                if (videoPlayer.state == VideoState.CONNECTION_ERROR)
+                {
+                    setPlaying(false);
+                    return;
+                }
+
                 sourceString = null;
             }
             else
             {
-                if (sourceLastPlayed != null)
-                {
-                    videoPlayer.close();
-                    videoPlayer.clear();
-                }
-
                 sourceString = String(this.source);
                 sourceLastPlayed = sourceString;
             }
@@ -909,11 +916,14 @@
         }
         else
         {
-            if (sourceLastPlayed != null)
-            {
-                videoPlayer.close();
-                videoPlayer.clear();
-            }
+            // huge hack to reset the video state
+            // otherwise there's no way to reset the
+            // playheadTime and totalTime.
+            // In the future, this hopefully will be easier and the
+            // video player might also have the concept of a bad URL or a
+            // source=null.
+            videoPlayer.load("QYQYQYQYQYQ");
+
             setPlaying(false);
         }
     }
@@ -925,56 +935,39 @@
      */
     private function load():void
     {
-        // essentially a load is a play and then a pause
+        // load is only called when source is changed.  We should clear out the source and close the connection
+        if (sourceLastPlayed != null)
+        {
+            videoPlayer.close();
+            videoPlayer.clear();
+        }

         // check for 2 cases: streaming video or progressive download
         if (source is StreamingVideoSource)
         {
-            if (source != null && sourceLastPlayed != null)
-            {
-                videoPlayer.close();
-                videoPlayer.clear();
-            }
-            //videoPlayer.volume = 0;
             // can't load in the streaming video case, so just call play(), then pause()
             play();
             pause();
             seek(0);
         }
-        else if (source is String && String(source).length != 0)
+        else if (source is String && String(source).length > 0)
         {
             // The progressive case
-            var sourceString:String;
-
-            // if paused, pass in null as the flvSource.  Otherwise, calling
-            // play(source) will reset the stream back to zero.  To restart the
-            // stream where it was paused, one needs to call play(null).
-            if (sourceLastPlayed == this.source)
-            {
-                sourceString = null;
-            }
-            else
-            {
-                sourceString = String(this.source);
-                sourceLastPlayed = sourceString;
-
-                if (sourceLastPlayed != null)
-                {
-                    videoPlayer.close();
-                    videoPlayer.clear();
-                }
-            }
-
+            var sourceString:String = String(this.source);
+            sourceLastPlayed = sourceString;
+
             // load the video up
             videoPlayer.load(sourceString);
         }
         else
         {
-            if (sourceLastPlayed != null)
-            {
-                videoPlayer.close();
-                videoPlayer.clear();
-            }
+            // huge hack to reset the video state
+            // otherwise there's no way to reset the
+            // playheadTime and totalTime.
+            // In the future, this hopefully will be easier and the
+            // video player might also have the concept of a bad URL or a
+            // source=null.
+            videoPlayer.load("QYQYQYQYQYQ");
         }

         setPlaying(false);
@@ -1015,10 +1008,13 @@
      */
     public function seek(time:Number):void
     {
+        if (source == null || videoPlayer.state == VideoState.CONNECTION_ERROR)
+            return;
+
         if (time < 0)
             time = 0;

-        mx_internal::videoPlayer.seek(time);
+        videoPlayer.seek(time);
     }

     /**
@@ -1038,7 +1034,7 @@
     public function stop():void
     {
         setPlaying(false);
-        mx_internal::videoPlayer.stop();
+        videoPlayer.stop();
     }

     //--------------------------------------------------------------------------
@@ -1053,7 +1049,7 @@
     private function videoPlayer_autoRewoundHandler(event:fl.video.VideoEvent):void
     {
         // just for binding purposes on VideoElement.playheadTime
-        dispatchEvent(new Event("autoRewound"));
+        dispatchEvent(new Event("playheadTimeChanged"));
     }

     /**
@@ -1117,6 +1113,8 @@
             case VideoState.STOPPED:
             case VideoState.DISCONNECTED:
             case VideoState.CONNECTION_ERROR:
+                dispatchEvent(new Event("playheadTimeChanged"));
+                dispatchEvent(new Event("totalTimeChanged"));
                 setPlaying(false);
                 break;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12969
Author:   egeorgie@adobe.com
Date:     2009-12-15T21:56:35.581732Z

Log Message:
-----------
Cleanup FIXMEs.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.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/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.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>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -553,7 +553,7 @@
     {
         super.setLayoutBoundsSize(width, height, postLayoutTransform);

-        // FIXME (egeorgie): possible optimization - if we reflow the text
+        // TODO (egeorgie): possible optimization - if we reflow the text
         // immediately, we'll be able to detect whether the constrained
         // width causes the measured height to change.
         // Also certain layouts like vertical/horizontal will


Level : fix getSeqNumNearestPTS() logic

Level : fix getSeqNumNearestPTS() logic

check that PTS is more than 10% from end to improve accuracy

--- src/org/mangui/hls/model/Level.as
+++ src/org/mangui/hls/model/Level.as
@@ -136,11 +136,22 @@
                 /* check nearest fragment */
                 if ( frag.data.valid &&
                     (duration >= 0) &&
-                    // if PTS is closer from end OR
-                    // if PTS is smaller than end PTS and more than 10% after frag start
-                    ((Math.abs(start - pts) < Math.abs(end - pts)) ||
-                    (   (pts < end) &&
-                        (pts - start ) > 100*duration))) {
+                    // if PTS is closer from start
+                    ((Math.abs(start - pts) < Math.abs(end - pts))
+                    //  start PTS                     end
+                    //    *----|-----------------------*
+                    //
+                    //  PTS start                 end
+                    //   |--*-----------------------*
+                    //
+                    //
+                    // OR if PTS is bigger than start PTS AND more than 10% before frag end
+                    //
+                    //  start                   PTS  end
+                    //    *----------------------|-----*
+                    //                             <10%>
+                    || ((pts > start) &&
+                        (end - pts ) > 100*duration))) {
                     return frag.seqnum;
                 }
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 1570
Author:   jimurphy@adobe.com
Date:     2008-05-06T17:43:41.713917Z

Log Message:
-----------
Merge 3.0.x revision [1569] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/mx/src/mx/controls/MenuBar.as
+++ frameworks/projects/mx/src/mx/controls/MenuBar.as
@@ -220,7 +220,7 @@

 /**
  *  A MenuBar control defines a horizontal, top-level menu bar that contains
- *  one or menu items. Clicking on a top-level menu item opens a pop-up submenu
+ *  one or more menus. Clicking on a top-level menu item opens a pop-up submenu
  *  that is an instance of the Menu control.
  *
  *  <p>The top-level menu bar of the MenuBar control is generally always visible.


Transferred from the Adobe Open Source Subversion Repository

Revision: 16262
Author:   dloverin@adobe.com
Date:     2010-05-20T18:44:39.210129Z

Log Message:
-----------
Move mx components out of framework.swc into mx.swc

The new mx.swc library lives in the libs/mx directory.

QE notes: Of the 5 failures I saw: 1 was intermittent and 4 are not a bug.
Managers/StyleManager/AdvancedCSS/descendantSelectors/AdvancedCSS_descendantSelectors_Style descendantSelector_combining_nested_style
    This failure was intermittent.

mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ApplicationControlBar_FromTo
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ApplicationControlBar_By
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ControlBar_FromTo
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ControlBar_By
    These failures are due to my code changes but I believe the old behavior was incorrect. When a control bar is the last child in a Panel it should appear at the bottom of the Panel. In the test case an ApplicationControlBar/ContorlBar is added to an empty Panel, making it the last child in the Panel. So it should appear at the bottom of the Panel instead of inside the Panel.

Doc notes: new library, mx.swc
Bugs:
Reviewer: Alex
Tests run:
Is noteworthy for integration: Yes

Modified Paths:
--------------
740 paths were modified

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

--- frameworks/projects/mx/src/mx/core/Application.as
+++ frameworks/projects/mx/src/mx/core/Application.as
@@ -1319,6 +1319,41 @@
         }
     }

+    /**
+     *  @private
+     *
+     *  Container implements addChild in terms of addChildAt.
+     */
+    override public function addChildAt(child:DisplayObject,
+                                        index:int):DisplayObject
+    {
+        super.addChildAt(child, index);
+        if (child == controlBar &&
+            "dock" in child && child["dock"] &&
+            "resetDock" in controlBar)
+        {
+            controlBar["resetDock"](true);
+        }
+
+        return child;
+    }
+
+    /**
+     *  @private
+     *
+     *  Container implements removeChildAt in terms of removeChild.
+     */
+    override public function removeChild(child:DisplayObject):DisplayObject
+    {
+        if (child == controlBar &&
+            "dock" in child && child["dock"])
+        {
+            dockControlBar(IUIComponent(child), false);
+        }
+
+        return super.removeChild(child);
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods


Wait for `applicationComplete' event before starting process.

--- src/stdio/StdioSparkApplication.as
+++ src/stdio/StdioSparkApplication.as
@@ -8,9 +8,24 @@
     override public function initialize(): void {
       super.initialize()

+      var application_complete: Boolean = false
+      var stdio_setup_done: Boolean = false
+
+      addEventListener("applicationComplete", function (event: Event): void {
+        application_complete = true
+        maybe_start()
+      })
+
       setup(parameters, function (): void {
-        dispatchEvent(new Event("main"))
+        stdio_setup_done = true
+        maybe_start()
       })
+
+      function maybe_start(): void {
+        if (application_complete && stdio_setup_done) {
+          dispatchEvent(new Event("main"))
+        }
+      }

       if (process is LocalProcess) {
         addEventListener(


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

--- frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as
+++ frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as
@@ -52,6 +52,11 @@
 	 *
 	 *  @result Any extra space that's left over
 	 *  after growing all children to their maxWidth.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function flexChildWidthsProportionally(
 								parent:IChildList,
@@ -181,6 +186,11 @@
 	 *  distributed across all children .
 	 *
 	 *  @param w width for all children.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function flexChildHeightsProportionally(
 								parent:IChildList,
@@ -317,6 +327,11 @@
 	 *  If all the children hit their minWidth/maxWidth/minHeight/maxHeight
 	 *  before the space was distributed, then the remaining unused space
 	 *  is returned. Otherwise, the return value is zero.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function flexChildrenProportionally(
 								spaceForChildren:Number,
@@ -423,6 +438,11 @@
 	 *  @param parent The parent container of the children.
 	 *
 	 *  @param spaceForChildren The total space for all children
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function distributeExtraHeight(
 								parent:IChildList,
@@ -531,6 +551,11 @@
 	 *  @param parent The parent container of the children.
 	 *
 	 *  @param spaceForChildren The total space for all children
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function distributeExtraWidth(
 								parent:IChildList,


Transferred from the Adobe Open Source Subversion Repository

Revision: 4487
Author:   gauravj@adobe.com
Date:     2009-01-12T19:14:21.035257Z

Log Message:
-----------
Fix build.. it didn't like the @Embed in the asdoc comment so changing @ to &64;

Modified Paths:
--------------
<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>

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
@@ -110,9 +110,9 @@
      *   shaderEffect.shaderCode = ShaderCodeClass;
      *   shaderEffect.shaderProperties = {direction : 1};</listing>
      * or in MXML code, this:<listing version="3.0">
-     *   <FxAnimateShaderTransition
-     *       shaderCode="@Embed(source="MyShader.pbj", mimeType="application/octet-stream")"
-     *       shaderProperties="{{direction : 1}}}"/>
+     *   <FxAnimateShaderTransition
+     *       shaderCode="&64;Embed(source="MyShader.pbj", mimeType="application/octet-stream")"
+     *       shaderProperties="{{direction : 1}}}"/>
      * </listing>
      *
      * @see flash.display.Shader


Transferred from the Adobe Open Source Subversion Repository

Revision: 17574
Author:   chiedozi@adobe.com
Date:     2010-09-03T19:58:44.875870Z

Log Message:
-----------
SlideViewTransition properly restores the visible and includeInLayout properties on a View after a transition completes.

QE notes:
Doc notes:
Bugs: SDK-27733
Reviewer: Evtim
Tests run:
Is noteworthy for integration:

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -1789,6 +1789,7 @@
         // Deactivate the current view
         if (currentViewData)
         {
+            // FIXME (chiedozi): Do we need to remove view from layout?
             currentView = currentViewData.instance;
             currentView.active = false;
             currentView.includeInLayout = false;
@@ -1797,6 +1798,9 @@
             // up to date before starting the transition and possibly storing a bitmap
             // for the transition
             currentView.validateNow();
+
+            // Restore the includeInLayout flag on the currentView
+            currentView.includeInLayout = true;
         }

         // Store new view


Transferred from the Adobe Open Source Subversion Repository

Revision: 6257
Author:   smgilson@adobe.com
Date:     2009-04-24T21:28:52.430843Z

Log Message:
-----------
ASDoc edits for effects

QE Notes: None
Doc Notes: None
Bugs: -
checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/IEaser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/RepeatBehavior.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EasingFraction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>

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

--- frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
+++ frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
@@ -11,14 +11,14 @@
 package spark.effects.interpolation
 {
 /**
- * The IInterpolator interface is used by classes that calculate
- * values for the Animation class. The Animation class
- * can handle parametric interpolation between Number values and
- * arrays of Number values, but it cannot handle different types
- * of interpolation, or interpolation between different types of
- * values. Implementors of this interface can provide arbitrary
- * interpolation capabilities so that Animations can be created between
- * arbitrary values.
+ *  The IInterpolator interface is implemented by classes that calculate
+ *  values for the Animation class. The Animation class
+ *  can handle parametric interpolation between Number values and
+ *  arrays of Number values, but it cannot handle different types
+ *  of interpolation, or interpolation between different types of
+ *  values. Implementors of this interface can provide arbitrary
+ *  interpolation capabilities so that Animations can be created between
+ *  arbitrary values.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -28,7 +28,7 @@
 public interface IInterpolator
 {
     /**
-     * Returns the type that an implementor can handle
+     *  The data type that an implementation class can process.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -38,10 +38,17 @@
     function get interpolatedType():Class;

     /**
-     * Given an elapsed fraction of an animation between 0 and 1,
-     * and start and end values, this function returns some value
-     * based on whatever interpolation the implementor chooses to
-     * provide.
+     *  Given an elapsed fraction of an animation, between 0.0 and 1.0,
+     *  and start and end values to interpolate, return the interpolated value.
+     *
+     *  @param fraction The fraction elapsed of the
+     *  animation, between 0.0 and 1.0.
+     *
+     *  @param startValue The start value of the interpolation.
+     *
+     *  @param endValue The end value of the interpolation.
+     *
+     *  @return The interpolated value.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -52,14 +59,20 @@
         startValue:Object, endValue:Object):Object;

     /**
-     * Given a base value and a value to add to it, this function
-     * returns the result of that increment operation. For example,
-     * if the objects are simple Numbers, the result would be
-     * Number(baseValue) + Number(incrementValue).
-     * This function is called by the animation system when it
-     * needs to dynamically calculate a value given some starting
-     * value and a 'by' value that should be added to it, both of
-     * which are of type Object and cannot simply be added together.
+     *  Given a base value and a value to add to it,
+     *  return the result of that operation.
+     *  For example, if the objects are simple Numbers, the result is a
+     *  Number(baseValue) + Number(incrementValue).
+     *  This method is called by the animation system when it
+     *  needs to dynamically calculate a value given some starting
+     *  value and a 'by' value that should be added to it. Both of
+     *  the arguments are of type Object and cannot simply be added together.
+     *
+     *  @param baseValue The start value of the interpolation.
+     *
+     *  @param incrementValue The change to apply to the baseValue.
+     *
+     *  @return The interpolated value.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -69,15 +82,21 @@
     function increment(baseValue:Object, incrementValue:Object):Object;

     /**
-     * Given a base value and a value to subtract from it, this function
-     * returns the result of that decrement operation. For example,
-     * if the objects are simple Numbers, the result would be
-     * Number(baseValue) - Number(incrementValue).
-     * This function is called by the animation system when it
-     * needs to dynamically calculate a value given some ending
-     * value and a 'by' value that should be subtracted from it, both of
-     * which are of type Object and cannot simply be subtracted.
+     *  Given a base value and a value to subtract from it,
+     *  return the result of that decrement operation. For example,
+     *  if the objects are simple Numbers, the result would be
+     *  Number(baseValue) - Number(incrementValue).
+     *  This function is called by the animation system when it
+     *  needs to dynamically calculate a value given some ending
+     *  value and a 'by' value that should be subtracted from it. Both of
+     *  the arguments are of type Object and cannot simply be added together.
      *
+     *  @param baseValue The start value of the interpolation.
+     *
+     *  @param decrementValue The change to apply to the baseValue.
+     *
+     *  @return The interpolated value.
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5


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

--- frameworks/projects/mx/src/mx/accessibility/TitleWindowAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/TitleWindowAccImpl.as
@@ -25,6 +25,11 @@
 /**
  *  TitleWindowAccImpl is a subclass of AccessibilityImplementation
  *  which implements accessibility for the TitleWindow class.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class TitleWindowAccImpl extends PanelAccImpl
 {
@@ -70,6 +75,11 @@
 	 *  Afterwards, when instances of TitleWindow are initialized,
 	 *  their accessibilityImplementation property
 	 *  will be set to an instance of this class.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function enableAccessibility():void
 	{
@@ -110,6 +120,11 @@
 	 *
 	 *  @param master The UIComponent instance that this AccImpl instance
 	 *  is making accessible.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function TitleWindowAccImpl(master:UIComponent)
 	{


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

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

 package mx.skins.halo
 {


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

--- frameworks/projects/mx/src/mx/skins/halo/MenuBarBackgroundSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/MenuBarBackgroundSkin.as
@@ -0,0 +1,187 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.skins.halo
+{
+
+import flash.display.GradientType;
+import mx.core.UIComponent;
+import mx.core.EdgeMetrics;
+import mx.skins.Border;
+import mx.styles.StyleManager;
+import mx.utils.ColorUtil;
+
+/**
+ *  The skin for the background of a MenuBar.
+ */
+public class MenuBarBackgroundSkin extends Border
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var cache:Object = {};
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Several colors used for drawing are calculated from the base colors
+	 *  of the component (themeColor, borderColor and fillColors).
+	 *  Since these calculations can be a bit expensive,
+	 *  we calculate once per color set and cache the results.
+	 */
+	private static function calcDerivedStyles(themeColor:uint,
+											  fillColor0:uint,
+											  fillColor1:uint):Object
+	{
+		var key:String = HaloColors.getCacheKey(themeColor,
+												fillColor0, fillColor1);
+
+		if (!cache[key])
+		{
+			var o:Object = cache[key] = {};
+
+			// Cross-component styles.
+			HaloColors.addHaloColors(o, themeColor, fillColor0, fillColor1);
+		}
+
+		return cache[key];
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function MenuBarBackgroundSkin()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  borderMetrics
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the borderMetrics property.
+	 */
+	private var _borderMetrics:EdgeMetrics = new EdgeMetrics(1, 1, 1, 1);
+
+	/**
+	 *  @private
+	 */
+	override public function get borderMetrics():EdgeMetrics
+	{
+		return _borderMetrics;
+	}
+
+	//----------------------------------
+	//  measuredWidth
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function get measuredWidth():Number
+	{
+		return UIComponent.DEFAULT_MEASURED_MIN_WIDTH;
+	}
+
+	//----------------------------------
+	//  measuredHeight
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function get measuredHeight():Number
+	{
+		return UIComponent.DEFAULT_MEASURED_MIN_HEIGHT;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function updateDisplayList(w:Number, h:Number):void
+	{
+		super.updateDisplayList(w, h);
+
+		// User-defined styles.
+		var bevel:Boolean = getStyle("bevel");
+		var borderColor:uint = getStyle("borderColor");
+		var cornerRadius:Number = getStyle("cornerRadius");
+		var fillAlphas:Array = getStyle("fillAlphas");
+		var fillColors:Array = getStyle("fillColors");
+		StyleManager.getColorNames(fillColors);
+		var themeColor:uint = getStyle("themeColor");
+
+		// Derivative styles.
+		var derStyles:Object = calcDerivedStyles(themeColor, fillColors[0],
+												 fillColors[1]);
+
+		var borderColorDrk1:Number =
+			ColorUtil.adjustBrightness2(borderColor, -25);
+
+		var cr:Number = Math.max(0, cornerRadius);
+		var cr1:Number = Math.max(0, cornerRadius - 1);
+
+   		var upFillColors:Array = [ fillColors[0], fillColors[1] ];
+
+		var upFillAlphas:Array = [ fillAlphas[0], fillAlphas[1] ];
+
+		graphics.clear();
+
+		// button border/edge
+		drawRoundRect(
+			0, 0, w, h, cr,
+			[ borderColor, borderColorDrk1 ], 1,
+			verticalGradientMatrix(0, 0, w, h),
+			GradientType.LINEAR, null,
+			{ x: 1, y: 1, w: w - 2, h: h - 2, r: cr1 });
+
+		// button fill
+		drawRoundRect(
+			1, 1, w - 2, h - 2, cr1,
+			upFillColors, upFillAlphas,
+			verticalGradientMatrix(1, 1, w - 2, h - 2));
+	}
+}
+
+}


Fixes for using a non-debug player with getStackTrace()

git-svn-id: 9278a788294a4258aac04586390fc35fb4a5f335@8859 a9308255-753e-0410-a2e9-80b3fbc4fff6

--- FlexUnit4UIRunner/src/org/flexunit/flexui/data/TestFunctionRowData.as
+++ FlexUnit4UIRunner/src/org/flexunit/flexui/data/TestFunctionRowData.as
@@ -124,18 +124,25 @@
 		    apply method then breaks out. */
          if ( error != null )
          {
-            _stackTrace = formatStack( error.stackTrace.replace( "<", "<" ).replace( ">", ">" ) );
-
-            for ( var i : int = 0 ; i < patterns.length; i++ )
-            {
-               var pattern : AbstractPattern = AbstractPattern( patterns[ i ] );
-
-               if( pattern.match( error.message ) )
-               {
-                  pattern.apply( this );
-                  break;
-               }
-            }
+			if ( error.stackTrace != null )
+			{
+	           _stackTrace = formatStack( error.stackTrace.replace( "<", "<" ).replace( ">", ">" ) );
+
+	           for ( var i : int = 0 ; i < patterns.length; i++ )
+	           {
+	              var pattern : AbstractPattern = AbstractPattern( patterns[ i ] );
+
+	              if( pattern.match( error.message ) )
+	              {
+	                 pattern.apply( this );
+	                 break;
+	              }
+	           }
+			}
+			else
+			{
+				_stackTrace = '';
+			}
          }
       }


Added support for drag+drop xml files into Weave.

--- WeaveUISpark/src/weave/Weave.as
+++ WeaveUISpark/src/weave/Weave.as
@@ -367,6 +367,10 @@
 					}
 					catch (e:Error)
 					{
+						try {
+							loadWeaveFileContent(String(content));
+							return;
+						} catch (e:Error) { }
 						throw new Error("Invalid Weave session state.");
 					}
 				}


RTMP.as: Reporting current time, rebuffering, etc

--- src/RTMP.as
+++ src/RTMP.as
@@ -2,14 +2,24 @@
   import flash.display.Sprite;
   import flash.external.ExternalInterface;
   import flash.system.Security;
+  import flash.net.NetStream;
+  import flash.events.*;

   import org.osmf.containers.MediaContainer;
   import org.osmf.elements.VideoElement;
+  import org.osmf.net.NetStreamLoadTrait;
+
   import org.osmf.media.DefaultMediaFactory;
   import org.osmf.media.MediaElement;
   import org.osmf.media.MediaPlayer;
   import org.osmf.media.URLResource;
+
   import org.osmf.events.TimeEvent;
+  import org.osmf.events.BufferEvent;
+  import org.osmf.events.MediaElementEvent;
+  import org.osmf.events.LoadEvent;
+
+  import org.osmf.traits.MediaTraitType;

   [SWF(width="640", height="360")]
   public class RTMP extends Sprite {
@@ -17,7 +27,10 @@
     private var mediaFactory:DefaultMediaFactory;
     private var mediaContainer:MediaContainer;
     private var mediaPlayer:MediaPlayer;
-    private var element:MediaElement;
+    private var netStream:NetStream;
+    private var mediaElement:MediaElement;
+    private var netStreamLoadTrait:NetStreamLoadTrait;
+    private var playbackState:String = "IDLE";

     public function RTMP() {
       Security.allowDomain('*');
@@ -25,9 +38,9 @@
       playbackId = this.root.loaderInfo.parameters.playbackId;
       mediaFactory = new DefaultMediaFactory();
       mediaContainer = new MediaContainer();
-
       setupCallbacks();
-      ExternalInterface.call('console.log', 'clappr rtmp 0.2-alpha');
+      setupGetters();
+      ExternalInterface.call('console.log', 'clappr rtmp 0.4-alpha');
       _triggerEvent('flashready');
     }

@@ -39,15 +52,53 @@
       ExternalInterface.addCallback("playerSeek", playerSeek);
     }

+    private function setupGetters():void {
+      ExternalInterface.addCallback("getState", getState);
+      ExternalInterface.addCallback("getPosition", getPosition);
+      ExternalInterface.addCallback("getDuration", getDuration);
+    }
+
     private function playerLoad(url:String):void {
-      element = mediaFactory.createMediaElement(new URLResource(url));
-      mediaPlayer = new MediaPlayer(element);
+      mediaElement = mediaFactory.createMediaElement(new URLResource(url));
+      mediaElement.addEventListener(MediaElementEvent.TRAIT_ADD, onTraitAdd);
+      mediaPlayer = new MediaPlayer(mediaElement);
       mediaPlayer.autoPlay = false;
       mediaPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, onTimeUpdated);
       mediaPlayer.addEventListener(TimeEvent.DURATION_CHANGE, onTimeUpdated);
-      mediaContainer.addMediaElement(element);
+      mediaContainer.addMediaElement(mediaElement);
       addChild(mediaContainer);
-      ExternalInterface.call('console.log', 'source loaded!');
+    }
+
+    private function onTraitAdd(event:MediaElementEvent):void {
+      if (mediaElement.hasTrait(MediaTraitType.LOAD)) {
+        netStreamLoadTrait = mediaElement.getTrait(MediaTraitType.LOAD) as NetStreamLoadTrait;
+        netStreamLoadTrait.addEventListener(LoadEvent.LOAD_STATE_CHANGE, onLoaded);
+      }
+    }
+
+    private function onLoaded(event:LoadEvent):void {
+      netStream = netStreamLoadTrait.netStream;
+      netStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
+    }
+
+    private function netStatusHandler(event:NetStatusEvent):void {
+      ExternalInterface.call('console.log', 'new event:' + event.info.code);
+      if (event.info.code === "NetStream.Buffer.Full") {
+        playbackState = "PLAYING";
+      } else if (isBuffering(event.info.code)) {
+        playbackState = "PLAYING_BUFFERING";
+      } else if (event.info.code == "NetStream.Play.Stop") {
+        playbackState = "ENDED";
+      } else if (event.info.code == "NetStream.Buffer.Empty") {
+        playbackState = "BUFFERING";
+      }
+      _triggerEvent('statechanged');
+    }
+
+    private function isBuffering(code:String):Boolean {
+      return Boolean(code == "NetStream.Buffer.Empty" && playbackState != "ENDED" ||
+              code == "NetStream.SeekStart.Notify" ||
+              code == "NetStream.Play.Start");
     }

     private function playerPlay():void {
@@ -82,5 +133,9 @@
     private function _triggerEvent(name: String):void {
       ExternalInterface.call('Clappr.Mediator.trigger("' + playbackId + ':' + name +'")');
     }
+
+    private function getState():String {
+      return playbackState;
+    }
   }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5067
Author:   smgilson@adobe.com
Date:     2009-02-25T16:21:22.849704Z

Log Message:
-----------
In preparation for adding ASDoc version tags for Flex, remove old tags from AIR files

QE Notes: None
Doc Notes: None
Bugs: -

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/events/FlexNativeMenuEvent.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/skins/halo/WindowMinimizeButtonSkin.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/skins/halo/WindowRestoreButtonSkin.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/StatusBarBackgroundSkin.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/frameworks/projects/airframework/src/mx/core/IWindow.as</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/managers/WindowedSystemManager.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/events/FlexNativeWindowBoundsEvent.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/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.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/controls/FileSystemList.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/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/WindowExistenceEvent.as</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/WindowCloseButtonSkin.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/controls/FlexNativeMenu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as
+++ frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as
@@ -25,7 +25,6 @@
  *  a list of File instances representing the files and directories
  *  in a file system directory.
  *
- *  @playerversion AIR 1.1
  */
 public class DirectoryEnumeration
 {
@@ -43,31 +42,31 @@
      *  @param source An Array of File instances representing
      *  the files and subdirectories in a file system directory.
      */
-	public function DirectoryEnumeration(source:Array = null)
-	{
-		super();
-
-		this.source = source;
-	}
-
+    public function DirectoryEnumeration(source:Array = null)
+    {
+        super();
+
+        this.source = source;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Variables
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 *  A hash table for looking up extensions quickly.
-	 */
-	private var extensionsSet:Object;
-
+    /**
+     *  @private
+     *  A hash table for looking up extensions quickly.
+     */
+    private var extensionsSet:Object;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
-
+
     //----------------------------------
     //  collection
     //----------------------------------
@@ -75,8 +74,8 @@
     /**
      *  @private
      */
-	private var _collection:ArrayCollection;
-
+    private var _collection:ArrayCollection;
+
     /**
      *  An ArrayCollection representing a filtered and sorted view
      *  of the source Array of File instances.
@@ -86,22 +85,22 @@
      *  The sorting is determined by the enumerationMode
      *  and nameCompareFunction properties.
      */
-	public function get collection():ArrayCollection
-	{
-		return _collection;
-	}
+    public function get collection():ArrayCollection
+    {
+        return _collection;
+    }

     //----------------------------------
     //  enumerationMode
     //----------------------------------

-	/**
-	 *  @private
-	 *  Storage for the enumerationMode property.
-	 */
-	private var _enumerationMode:String =
-					DirectoryEnumerationMode.DIRECTORIES_FIRST;
-
+    /**
+     *  @private
+     *  Storage for the enumerationMode property.
+     */
+    private var _enumerationMode:String =
+                    DirectoryEnumerationMode.DIRECTORIES_FIRST;
+
     /**
      *  A String specifying whether the collection
      *  includes only files, only subdirectories, or both.
@@ -127,7 +126,7 @@
      */
     public function get enumerationMode():String
     {
-		return _enumerationMode;
+        return _enumerationMode;
     }

     /**
@@ -135,19 +134,19 @@
      */
     public function set enumerationMode(value:String):void
     {
- 		_enumerationMode = value;
+        _enumerationMode = value;
    }

     //----------------------------------
     //  extensions
     //----------------------------------

-	/**
-	 *  @private
-	 *  Storage for the extensions property.
-	 */
-   	private var _extensions:Array /* of String */;
-
+    /**
+     *  @private
+     *  Storage for the extensions property.
+     */
+    private var _extensions:Array /* of String */;
+
     /**
      *  An Array of extensions specifying which files
      *  are included in the collection
@@ -191,7 +190,7 @@
      */
     public function get extensions():Array /* of String */
     {
-		return _extensions;
+        return _extensions;
     }

     /**
@@ -199,27 +198,27 @@
      */
     public function set extensions(value:Array /* of String */):void
     {
- 		_extensions = value;
-
-		extensionsSet = {};
-		for each (var s:String in extensions)
-		{
-			if (s.charAt(0) == ".")
-				s = s.substr(1);
-			extensionsSet[s.toLowerCase()] = true;
-		}
+        _extensions = value;
+
+        extensionsSet = {};
+        for each (var s:String in extensions)
+        {
+            if (s.charAt(0) == ".")
+                s = s.substr(1);
+            extensionsSet[s.toLowerCase()] = true;
+        }
    }

     //----------------------------------
     //  filterFunction
     //----------------------------------

-	/**
-	 *  @private
-	 *  Storage for the filterFunction property.
-	 */
-   	private var _filterFunction:Function;
-
+    /**
+     *  @private
+     *  Storage for the filterFunction property.
+     */
+    private var _filterFunction:Function;
+
     /**
      *  A callback Function that you can use to perform additional filtering,
      *  after the enumerationMode and extensions
@@ -231,7 +230,7 @@
      *
function myFilterFunction(file:File):Boolean

      *
      *
This function should return true to include
-	 *  the specified file or subdirectory.

+     *  the specified file or subdirectory.

      *
      *
To ensure that every enumerated file and subdirectory is passed
      *  to this function, the enumerationMode property must
@@ -248,7 +247,7 @@
      */
     public function get filterFunction():Function
     {
-		return _filterFunction;
+        return _filterFunction;
     }

     /**
@@ -256,19 +255,19 @@
      */
     public function set filterFunction(value:Function):void
     {
-		_filterFunction = value;
+        _filterFunction = value;
    }

     //----------------------------------
     //  nameCompareFunction
     //----------------------------------

-	/**
-	 *  @private
-	 *  Storage for the nameCompareFunction property.
-	 */
-   	private var _nameCompareFunction:Function;
-
+    /**
+     *  @private
+     *  Storage for the nameCompareFunction property.
+     */
+    private var _nameCompareFunction:Function;
+
     /**
      *  A callback Function that you can use to change how file and subdirectory
      *  names are compared in order to produce the sort order.
@@ -298,7 +297,7 @@
      */
     public function get nameCompareFunction():Function
     {
-		return _nameCompareFunction;
+        return _nameCompareFunction;
     }

     /**
@@ -306,23 +305,23 @@
      */
     public function set nameCompareFunction(value:Function):void
     {
-		_nameCompareFunction = value;
+        _nameCompareFunction = value;
     }

     //----------------------------------
     //  showHidden
     //----------------------------------

-	/**
-	 *  @private
-	 *  Storage for the showHidden property.
-	 */
- 	private var _showHidden:Boolean = false;
-
+    /**
+     *  @private
+     *  Storage for the showHidden property.
+     */
+    private var _showHidden:Boolean = false;
+
     /**
      *  A flag that specifies whether files and directories
      *  that the operating system considers hidden
-	 *  are included in the collection.
+     *  are included in the collection.
      *  Set this property to true
      *  to include hidden files and directories.
      *
@@ -330,7 +329,7 @@
      */
     public function get showHidden():Boolean
     {
-		return _showHidden;
+        return _showHidden;
     }

     /**
@@ -338,24 +337,24 @@
      */
     public function set showHidden(value:Boolean):void
     {
-		_showHidden = value;
+        _showHidden = value;
     }

     //----------------------------------
     //  source
     //----------------------------------

-	private var _source:Array /* of File */;
-
-    /**
-	 *  The source of data for the collection.
-	 *
-	 *
This class expects this property to be set to an Array
-	 *  of File instances representing the files and directories
-	 *  in a single file system directory.
-	 *  You can obtain such an Array by calling the
-	 *  listDirectory() or listDirectoryAsync()
-	 *  of the File class.

+    private var _source:Array /* of File */;
+
+    /**
+     *  The source of data for the collection.
+     *
+     *
This class expects this property to be set to an Array
+     *  of File instances representing the files and directories
+     *  in a single file system directory.
+     *  You can obtain such an Array by calling the
+     *  listDirectory() or listDirectoryAsync()
+     *  of the File class.

      */
     public function get source():Array /* of File */
     {
@@ -369,11 +368,11 @@
     {
         _source = value;

-		_collection = new ArrayCollection(source);
-		_collection.filterFunction = fileFilterFunction
-		_collection.sort = new Sort();
-		_collection.sort.compareFunction = fileCompareFunction;
-		_collection.refresh();
+        _collection = new ArrayCollection(source);
+        _collection.filterFunction = fileFilterFunction
+        _collection.sort = new Sort();
+        _collection.sort.compareFunction = fileCompareFunction;
+        _collection.refresh();
     }

     //--------------------------------------------------------------------------
@@ -382,117 +381,117 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  Filters and sorts the source Array of File instances
-	 *  to produce the collection, as specified by the
-	 *  enumerationMode, extensions,
-	 *  filterFunction, nameCompareFunction,
-	 *  and showHidden properties.
-	 */
-	public function refresh():void
-	{
-		_collection.refresh();
-	}
-
-	/**
-	 *  The filter function that is actually applied to filter
-	 *  the source</code Array to produce the collection.
-	 *
-	 *
At the end of its processing, this method calls your
-	 *  filterFunction if one is specified.

-	 */
-	public function fileFilterFunction(file:File):Boolean
-	{
-		// Some files like C:\pagefile.sys throw exceptions
-		// if a labelFunction tries to access other properties
-		// like size, creationDate, or modificationDate.
-		// Fortunately, these seem to have their 'exists' property
-		// set to false.
-		if (!file.exists)
-			return false;
-
-		// Omit hidden files if showHidden is false.
-		// BUG WORKAROUND: Root directories like C:\ and D:\
-		// have their hidden property set to true.
-		// Ignore it and show them.
-		if (!showHidden && file.isHidden && file.parent)
-			return false;
-
-		// Omit all directories if "filesOnly"
-		// or all files if "directoriesOnly".
-		if (enumerationMode == DirectoryEnumerationMode.FILES_ONLY &&
-			file.isDirectory ||
-			enumerationMode == DirectoryEnumerationMode.DIRECTORIES_ONLY &&
-			!file.isDirectory)
-		{
-			return false;
-		}
-
-		// Now do extension-based filtering.
-		// Extension-filtering only occurs if the extensions property
-		// is non-null, and it only applies to files.
-		if (extensions && !file.isDirectory)
-		{
-			// If the file has no extension or that extension was not in
-			// the specified 'extensions' array, then filter out the file.
-			var extension:String = file.extension;
-			if (!extension || !extensionsSet[extension.toLowerCase()])
-				return false;
-		}
-
-		// Finally, do custom filtering.
-		return Boolean(filterFunction != null ? filterFunction(file) : true);
-	}
-
-	/**
-	 *  The comparison function that is actually applied to sort
-	 *  the source</code Array to produce the collection.
-	 *
-	 *
At the end of its processing, this method calls your
-	 *  nameCompareFunction if one is specified.

-	 */
-	public function fileCompareFunction(file1:File, file2:File,
-										fields:Array = null):int
-	{
-		if (file1.isDirectory && !file2.isDirectory)
-		{
-			if (enumerationMode == DirectoryEnumerationMode.DIRECTORIES_FIRST)
-				return -1;
-			if (enumerationMode == DirectoryEnumerationMode.FILES_FIRST)
-				return 1;
-		}
-
-		if (!file1.isDirectory && file2.isDirectory)
-		{
-			if (enumerationMode == DirectoryEnumerationMode.DIRECTORIES_FIRST)
-				return 1;
-			if (enumerationMode == DirectoryEnumerationMode.FILES_FIRST)
-				return -1;
-		}
-
-		return nameCompareFunction != null ?
-			   nameCompareFunction(file1.name, file2.name) :
-			   defaultNameCompareFunction(file1.name, file2.name);
-	}
-
-	/**
-	 *  Performs a case-insensitive, locale-dependent comparison
-	 *  of two file or directory names, using the String method
-	 *  toLocaleLowerCase().
-	 */
-	protected function defaultNameCompareFunction(name1:String, name2:String):int
-	{
-		name1 = name1.toLocaleLowerCase();
-		name2 = name2.toLocaleLowerCase();
-
-		if (name1 < name2)
-			return -1;
-
-		if (name1 > name2)
-			return 1;
-
-		return 0;
-	}
+    /**
+     *  Filters and sorts the source Array of File instances
+     *  to produce the collection, as specified by the
+     *  enumerationMode, extensions,
+     *  filterFunction, nameCompareFunction,
+     *  and showHidden properties.
+     */
+    public function refresh():void
+    {
+        _collection.refresh();
+    }
+
+    /**
+     *  The filter function that is actually applied to filter
+     *  the source</code Array to produce the collection.
+     *
+     *
At the end of its processing, this method calls your
+     *  filterFunction if one is specified.

+     */
+    public function fileFilterFunction(file:File):Boolean
+    {
+        // Some files like C:\pagefile.sys throw exceptions
+        // if a labelFunction tries to access other properties
+        // like size, creationDate, or modificationDate.
+        // Fortunately, these seem to have their 'exists' property
+        // set to false.
+        if (!file.exists)
+            return false;
+
+        // Omit hidden files if showHidden is false.
+        // BUG WORKAROUND: Root directories like C:\ and D:\
+        // have their hidden property set to true.
+        // Ignore it and show them.
+        if (!showHidden && file.isHidden && file.parent)
+            return false;
+
+        // Omit all directories if "filesOnly"
+        // or all files if "directoriesOnly".
+        if (enumerationMode == DirectoryEnumerationMode.FILES_ONLY &&
+            file.isDirectory ||
+            enumerationMode == DirectoryEnumerationMode.DIRECTORIES_ONLY &&
+            !file.isDirectory)
+        {
+            return false;
+        }
+
+        // Now do extension-based filtering.
+        // Extension-filtering only occurs if the extensions property
+        // is non-null, and it only applies to files.
+        if (extensions && !file.isDirectory)
+        {
+            // If the file has no extension or that extension was not in
+            // the specified 'extensions' array, then filter out the file.
+            var extension:String = file.extension;
+            if (!extension || !extensionsSet[extension.toLowerCase()])
+                return false;
+        }
+
+        // Finally, do custom filtering.
+        return Boolean(filterFunction != null ? filterFunction(file) : true);
+    }
+
+    /**
+     *  The comparison function that is actually applied to sort
+     *  the source</code Array to produce the collection.
+     *
+     *
At the end of its processing, this method calls your
+     *  nameCompareFunction if one is specified.

+     */
+    public function fileCompareFunction(file1:File, file2:File,
+                                        fields:Array = null):int
+    {
+        if (file1.isDirectory && !file2.isDirectory)
+        {
+            if (enumerationMode == DirectoryEnumerationMode.DIRECTORIES_FIRST)
+                return -1;
+            if (enumerationMode == DirectoryEnumerationMode.FILES_FIRST)
+                return 1;
+        }
+
+        if (!file1.isDirectory && file2.isDirectory)
+        {
+            if (enumerationMode == DirectoryEnumerationMode.DIRECTORIES_FIRST)
+                return 1;
+            if (enumerationMode == DirectoryEnumerationMode.FILES_FIRST)
+                return -1;
+        }
+
+        return nameCompareFunction != null ?
+               nameCompareFunction(file1.name, file2.name) :
+               defaultNameCompareFunction(file1.name, file2.name);
+    }
+
+    /**
+     *  Performs a case-insensitive, locale-dependent comparison
+     *  of two file or directory names, using the String method
+     *  toLocaleLowerCase().
+     */
+    protected function defaultNameCompareFunction(name1:String, name2:String):int
+    {
+        name1 = name1.toLocaleLowerCase();
+        name2 = name2.toLocaleLowerCase();
+
+        if (name1 < name2)
+            return -1;
+
+        if (name1 > name2)
+            return 1;
+
+        return 0;
+    }
 }

 }


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

--- frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
@@ -1,15 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// AdobePatentID="B976"
+

 package spark.components.supportClasses
 {


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

--- frameworks/projects/framework/src/mx/managers/ISystemManagerChildManager.as
+++ frameworks/projects/framework/src/mx/managers/ISystemManagerChildManager.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.managers
 {


[Script] Fixed a compilation error

[Script] Fixed a compilation error

--- Data/scripts/FirstPersonControllerPhysics.as
+++ Data/scripts/FirstPersonControllerPhysics.as
@@ -83,7 +83,7 @@
 		currentRotation.y += smoothMouse.y;
 		currentRotation.y = ClampRotation(currentRotation.y);

-		cameraTransform.SetRotationLocal(QuaternionFromEuler(Vector3(currentRotation.y, currentRotation.x, 0.0f)));
+		cameraTransform.SetRotationLocal(Quaternion_FromEulerAngles(Vector3(currentRotation.y, currentRotation.x, 0.0f)));
 	}

 	float ClampRotation(float rotation)