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

--- frameworks/projects/mx/src/mx/styles/metadata/AnchorStyles.as
+++ frameworks/projects/mx/src/mx/styles/metadata/AnchorStyles.as
@@ -0,0 +1,150 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  The vertical distance in pixels from the top edge of the content area to
+ *  the control's baseline position.
+ *  If this style is set, the baseline of the component is
+ *  anchored to the top edge of its content area; when its container
+ *  is resized, the two edges maintain their separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="baseline", type="String", inherit="no")]
+
+/**
+ *  The vertical distance, in pixels, from the bottom edge of the component
+ *  to the bottom edge of its parent container's content area.
+ *  If this style is set, the lower edge of the component is
+ *  anchored to the bottom edge of its content area; when its container
+ *  is resized, the two edges maintain their separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="bottom", type="String", inherit="no")]
+
+/**
+ *  The horizontal distance in pixels from the center of the component's
+ *  content area to the center of the component.
+ *  If this style is set, the center of the component is
+ *  anchored to the center of its content area; when its container
+ *  is resized, the two centers maintain their horizontal separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="horizontalCenter", type="String", inherit="no")]
+
+/**
+ *  The horizontal distance, in pixels, from the left edge of the component
+ *  to the left edge of its parent container's content area.
+ *  If this style is set, the left edge of the component is
+ *  anchored to the left edge of its content area; when its container
+ *  is resized, the two edges maintain their separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="left", type="String", inherit="no")]
+
+/**
+ *  The horizontal distance, in pixels, from the right edge of the component
+ *  to the right edge of its parent container's content area.
+ *  If this style is set, the right edge of the component is
+ *  anchored to the right edge of its content area; when its container
+ *  is resized, the two edges maintain their separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="right", type="String", inherit="no")]
+
+/**
+ *  The vertical distance, in pixels, from the top edge of the component
+ *  to the top edge of its parent container's content area.
+ *  If this style is set, the top edge of the component is
+ *  anchored to the top edge of its content area; when its container
+ *  is resized, the two edges maintain their separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="top", type="String", inherit="no")]
+
+/**
+ *  The vertical distance in pixels from the center of the component's
+ *  content area to the center of the component.
+ *  If this style is set, the center of the component is
+ *  anchored to the center of its content area; when its container
+ *  is resized, the two centers maintain their vertical separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="verticalCenter", type="String", inherit="no")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 20046
Author:   jszeto@adobe.com
Date:     2011-02-02T00:38:47.621310Z

Log Message:
-----------
ViewMenu and SoftKeyboard bug fix

http://bugs.adobe.com/jira/browse/SDK-29144 - Incorrect ViewMenu and Softkeyboard interraction

Added logic to Application to track if the soft keyboard is open.

In ViewNavigatorApplicationBase, if the soft keyboard is open, force it closed by setting focus to null.

QE notes: none
Doc notes: none
Bugs: SDK-29144
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -316,7 +316,15 @@
      */
     private var softKeyboardHandlersAdded:Boolean = false;

+    /**
+     *  @private
+     */
     private static var _softKeyboardBehavior:String = null;
+
+    /**
+     *  @private
+     */
+    mx_internal var isSoftKeyboardActive:Boolean = false;

     /**
      *  @private
@@ -1578,11 +1586,14 @@
      *  has been activated.
      */
     private function softKeyboardActivateHandler(event:SoftKeyboardEvent):void
-    {
+    {
         if (this === FlexGlobals.topLevelApplication)
         {
             // Get the keyboard size
             var keyboardRect:Rectangle = stage.softKeyboardRect;
+
+            if (keyboardRect.height > 0)
+                isSoftKeyboardActive = true;

             var sm:SystemManager = systemManager as SystemManager;
             var scaleFactor:Number = 1;
@@ -1609,7 +1620,8 @@
     private function softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void
     {
         if (this === FlexGlobals.topLevelApplication)
-        {
+        {
+            isSoftKeyboardActive = false;
             var sm:SystemManager = systemManager as SystemManager;
             var scaleFactor:Number = 1;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5859
Author:   rfrishbe@adobe.com
Date:     2009-04-01T23:13:22.675548Z

Log Message:
-----------
Adding FLVPlayback source code to Flex 4 project, rather than using a pre-built SWC.

Some video PARB changes:

Class Name Changes:
Rename VideoDisplay -> VideoPlayer
Combine MetadataEvent and VideoEvent into VideoEvent

Video property/method changes:
isLive -> live
isPlaying -> playing
isMuted -> muted
mute(), unmute() -> muted getter/setter

Also fixed a bug where VideoPlayer wasn't properly re-dispatching events.

QE Notes: -
Doc Notes: -
Bugs: -
Reviewer: Deepa
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoScaleMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/VideoEvent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoDisplayPlayPauseButtonSkin.mxml" copyfrom-rev="5766" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerPlayPauseButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/ConnectClient.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/flvplayback_internal.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/NCManager.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/libs/videoPlayer.swc</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoProgressEvent.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/FMSCapabilities.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/ConnectClientNative.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoDisplayPlayPauseButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/NCManagerNative.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/INCManager.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoDisplayMuteButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoState.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/ComponentVersion.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/ConnectClientDynamicStream.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoDisplaySkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/DynamicStreamItem.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/ReconnectClient.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoError.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoDisplay.as" copyfrom-rev="5766" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoAlign.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoPlayerClient.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/DVRManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/QueuedCommand.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults-3.0.0.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/ParseResults.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoDisplayMuteButtonSkin.mxml" copyfrom-rev="5766" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerMuteButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/SMILManager.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/MetadataEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/IVPEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/DynamicStream.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoDisplay.png" copyfrom-rev="5766" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.png</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/FPADManager.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoDisplaySkin.mxml" copyfrom-rev="5766" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/AutoLayoutEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/VideoEvent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoDisplay.png</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/NCManagerDynamicStream.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/LayoutEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/FPMediaCapabilities.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/fl/video/MetadataEvent.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -1,3 +1,14 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package spark.components
 {
 import fl.video.VideoEvent;
@@ -19,7 +30,6 @@
 import spark.primitives.supportClasses.TextGraphicElement;
 import mx.utils.BitFlagUtil;

-import spark.events.MetadataEvent;
 import spark.events.VideoEvent;

 //--------------------------------------
@@ -61,18 +71,17 @@
  *  The event object has an info property that contains the
  *  info object received by the NetStream.onMetaData event callback.
  *
- *  @eventType spark.events.MetadataEvent.METADATA_RECEIVED
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Event(name="metadataReceived", type="spark.events.MetadataEvent")]
-
-/**
- *  Dispatched every 0.25 seconds, or how often the underlying video
- *  player's playheadUpdateInterval is set to, while the
+ *  @eventType spark.events.VideoEvent.METADATA_RECEIVED
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="metadataReceived", type="spark.events.VideoEvent")]
+
+/**
+ *  Dispatched every 0.25 seconds while the
  *  video is playing.  This event is not dispatched when it is paused
  *  or stopped, unless a seek occurs.
  *
@@ -86,10 +95,9 @@
 [Event(name="playheadUpdate", type="spark.events.VideoEvent")]

 /**
- *  Indicates progress made in number of bytes downloaded. Dispatched at the frequency
- *  specified by the underlying video player's progressInterval property, starting
+ *  Indicates progress made in number of bytes downloaded. Dispatched starting
  *  when the load begins and ending when all bytes are loaded or there is a network error.
- *  The default is every 0.25 seconds starting when load is called and ending
+ *  Dispatched every 0.25 seconds starting when load is called and ending
  *  when all bytes are loaded or if there is a network error. Use this event to check
  *  bytes loaded or number of bytes in the buffer.
  *
@@ -128,7 +136,7 @@
 //--------------------------------------

 /**
- *  Buffering State of the VideoDisplay
+ *  Buffering State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -138,7 +146,7 @@
 [SkinState("buffering")]

 /**
- *  Connection Error State of the VideoDisplay
+ *  Connection Error State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -148,7 +156,7 @@
 [SkinState("connectionError")]

 /**
- *  Disabled State of the VideoDisplay
+ *  Disabled State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -158,7 +166,7 @@
 [SkinState("disabled")]

 /**
- *  Disconnected State of the VideoDisplay
+ *  Disconnected State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -168,7 +176,7 @@
 [SkinState("disconnected")]

 /**
- *  FullScreen State of the VideoDisplay
+ *  FullScreen State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -178,7 +186,7 @@
 [SkinState("fullScreen")]

 /**
- *  Loading State of the VideoDisplay
+ *  Loading State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -188,7 +196,7 @@
 [SkinState("loading")]

 /**
- *  Pause State of the VideoDisplay
+ *  Pause State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -198,7 +206,7 @@
 [SkinState("paused")]

 /**
- *  Playing State of the VideoDisplay
+ *  Playing State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -208,7 +216,7 @@
 [SkinState("playing")]

 /**
- *  Seeking State of the VideoDisplay
+ *  Seeking State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -218,7 +226,7 @@
 [SkinState("seeking")]

 /**
- *  Stopped State of the VideoDisplay
+ *  Stopped State of the VideoPlayer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -233,10 +241,10 @@

 [DefaultProperty("source")]

-[IconFile("VideoDisplay.png")]
-
-/**
- *  The VideoDisplay class is skinnable video player that supports
+[IconFile("VideoPlayer.png")]
+
+/**
+ *  The VideoPlayer class is skinnable video player that supports
  *  progressive download, multi-bitrate, and streaming video.
  *
  *
VideoElement is the chromeless version.

@@ -248,7 +256,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class VideoDisplay extends SkinnableComponent
+public class VideoPlayer extends SkinnableComponent
 {
     //--------------------------------------------------------------------------
     //
@@ -269,7 +277,7 @@
     /**
      *  @private
      */
-    private static const IS_LIVE_PROPERTY_FLAG:uint = 1 << 2;
+    private static const LIVE_PROPERTY_FLAG:uint = 1 << 2;

     /**
      *  @private
@@ -285,6 +293,11 @@
      *  @private
      */
     private static const VOLUME_PROPERTY_FLAG:uint = 1 << 5;
+
+    /**
+     *  @private
+     */
+    private static const MUTED_PROPERTY_FLAG:uint = 1 << 6;

     //--------------------------------------------------------------------------
     //
@@ -300,7 +313,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function VideoDisplay()
+    public function VideoPlayer()
     {
         super();
     }
@@ -459,15 +472,15 @@
     /**
      *  @private
      *  Several properties are proxied to videoElement.  However, when videoElement
-     *  is not around, we need to store values set on VideoDisplay.  This object
+     *  is not around, we need to store values set on VideoPlayer.  This object
      *  stores those values.  If videoElement is around, the values are stored
      *  on the videoElement directly.  However, we need to know what values
-     *  have been set by the developer on the VideoDisplay (versus set on
+     *  have been set by the developer on the VideoPlayer (versus set on
      *  the videoElement or defaults of the videoElement) as those are values
      *  we want to carry around if the videoElement changes (via a new skin).
      *  In order to store this info effeciently, videoElementProperties becomes
      *  a uint to store a series of BitFlags.  These bits represent whether a
-     *  property has been explicitely set on this VideoDisplay.  When the
+     *  property has been explicitely set on this VideoPlayer.  When the
      *  contentGroup is not around, videoElementProperties is a typeless
      *  object to store these proxied properties.  When videoElement is around,
      *  videoElementProperties stores booleans as to whether these properties
@@ -497,7 +510,7 @@

         if (!value && videoElement)
         {
-            if (isPlaying || wasPlayingBeforeDisabled)
+            if (playing || wasPlayingBeforeDisabled)
                 wasPlayingBeforeDisabled = true;
             else
                 wasPlayingBeforeDisabled = false;
@@ -585,81 +598,37 @@
     }

     //----------------------------------
-    //  isLive
+    //  live
     //----------------------------------

     [Inspectable(category="General", defaultValue="false")]

     /**
-     *  @copy spark.primitives.VideoElement#isLive
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get isLive():Boolean
-    {
-        return (videoElement) ? videoElement.isLive : videoElementProperties.isLive;
-    }
-
-    /**
-     *  @private
-     */
-    public function set isLive(value:Boolean):void
+     *  @copy spark.primitives.VideoElement#live
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get live():Boolean
+    {
+        return (videoElement) ? videoElement.live : videoElementProperties.live;
+    }
+
+    /**
+     *  @private
+     */
+    public function set live(value:Boolean):void
     {
         if (videoElement)
         {
-            videoElement.isLive = value;
+            videoElement.live = value;
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        IS_LIVE_PROPERTY_FLAG, true);
+                                                        LIVE_PROPERTY_FLAG, true);
         }
         else
-            videoElementProperties.isLive = value;
-    }
-
-    //----------------------------------
-    //  isMuted
-    //----------------------------------
-
-    [Inspectable(category="General", defaultValue="false")]
-
-    /**
-     *  @copy spark.primitives.VideoElement#isMuted
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get isMuted():Boolean
-    {
-        if (videoElement)
-            return videoElement.isMuted;
-        else
-            return false;
-    }
-
-    //----------------------------------
-    //  isPlaying
-    //----------------------------------
-
-    [Inspectable(category="General")]
-
-    /**
-     *  @copy spark.primitives.VideoElement#isPlaying
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get isPlaying():Boolean
-    {
-        if (videoElement)
-            return videoElement.isPlaying;
-        else
-            return false;
+            videoElementProperties.live = value;
     }

     //----------------------------------
@@ -694,6 +663,43 @@
         }
         else
             videoElementProperties.maintainAspectRatio = value;
+    }
+
+    //----------------------------------
+    //  muted
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="false")]
+
+    /**
+     *  @copy spark.primitives.VideoElement#muted
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get muted():Boolean
+    {
+        return (videoElement) ? videoElement.muted : videoElementProperties.muted;
+    }
+
+    /**
+     *  @private
+     */
+    public function set muted(value:Boolean):void
+    {
+        if (videoElement)
+        {
+            videoElement.muted = value;
+            videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
+                                                        MUTED_PROPERTY_FLAG, true);
+        }
+        else
+            videoElementProperties.muted = value;
+
+        if (muteButton)
+            muteButton.selected = value;
     }

     //----------------------------------
@@ -717,6 +723,28 @@
             return videoElement.playheadTime;
         else
             return 0;
+    }
+
+    //----------------------------------
+    //  playing
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.primitives.VideoElement#playing
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get playing():Boolean
+    {
+        if (videoElement)
+            return videoElement.playing;
+        else
+            return false;
     }

     //----------------------------------
@@ -902,11 +930,11 @@
                                                         AUTO_REWIND_PROPERTY_FLAG, true);
             }

-            if (videoElementProperties.isLive !== undefined)
+            if (videoElementProperties.live !== undefined)
             {
-                videoElement.isLive = videoElementProperties.isLive;
+                videoElement.live = videoElementProperties.live;
                 newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                        IS_LIVE_PROPERTY_FLAG, true);
+                                                        LIVE_PROPERTY_FLAG, true);
             }

             if (videoElementProperties.maintainAspectRatio !== undefined)
@@ -916,11 +944,18 @@
                                                         MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG, true);
             }

+            if (videoElementProperties.muted !== undefined)
+            {
+                videoElement.muted = videoElementProperties.muted;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                                                        MUTED_PROPERTY_FLAG, true);
+            }
+
             videoElementProperties = newVideoProperties;

             videoElement.addEventListener(spark.events.VideoEvent.CLOSE, dispatchEvent);
             videoElement.addEventListener(spark.events.VideoEvent.COMPLETE, dispatchEvent);
-            videoElement.addEventListener(MetadataEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
+            videoElement.addEventListener(spark.events.VideoEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
             videoElement.addEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
             videoElement.addEventListener(ProgressEvent.PROGRESS, dispatchEvent);
             videoElement.addEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);
@@ -944,6 +979,9 @@

             if (totalTimeLabel)
                 totalTimeLabel.text = videoElement.totalTime.toString();
+
+            if (muteButton)
+                muteButton.selected = videoElement.muted;
         }
         else if (instance == playButton)
         {
@@ -963,6 +1001,7 @@
         }
         else if (instance == muteButton)
         {
+            muteButton.selected = muted;
             muteButton.addEventListener(MouseEvent.CLICK, muteButton_clickHandler);
         }
         else if (instance == volumeBar)
@@ -1024,17 +1063,20 @@
             if (BitFlagUtil.isSet(videoElementProperties as uint, AUTO_REWIND_PROPERTY_FLAG))
                 newVideoProperties.autoRewind = videoElement.autoRewind;

-            if (BitFlagUtil.isSet(videoElementProperties as uint, IS_LIVE_PROPERTY_FLAG))
-                newVideoProperties.isLive = videoElement.isLive;
+            if (BitFlagUtil.isSet(videoElementProperties as uint, LIVE_PROPERTY_FLAG))
+                newVideoProperties.live = videoElement.live;

             if (BitFlagUtil.isSet(videoElementProperties as uint, MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG))
                 newVideoProperties.maintainAspectRatio = videoElement.maintainAspectRatio;
+
+            if (BitFlagUtil.isSet(videoElementProperties as uint, MUTED_PROPERTY_FLAG))
+                newVideoProperties.muted = videoElement.muted;

             videoElementProperties = newVideoProperties;

             videoElement.removeEventListener(spark.events.VideoEvent.CLOSE, dispatchEvent);
             videoElement.removeEventListener(spark.events.VideoEvent.COMPLETE, videoElement_completeHandler);
-            videoElement.removeEventListener(MetadataEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
+            videoElement.removeEventListener(spark.events.VideoEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
             videoElement.removeEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
             videoElement.removeEventListener(ProgressEvent.PROGRESS, dispatchEvent);
             videoElement.removeEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);
@@ -1086,7 +1128,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  @copy spark.primitives.VideoElement#mute()
+     *  @copy spark.primitives.VideoElement#pause()
      *
      *  @throws TypeError if the skin hasn't been loaded up yet
      *                    and there's no videoElement.
@@ -1096,16 +1138,13 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function mute():void
-    {
-        videoElement.mute();
-
-        if (muteButton)
-            muteButton.selected = true;
-    }
-
-    /**
-     *  @copy spark.primitives.VideoElement#pause()
+    public function pause():void
+    {
+        videoElement.pause();
+    }
+
+    /**
+     *  @copy spark.primitives.VideoElement#play()
      *
      *  @throws TypeError if the skin hasn't been loaded up yet
      *                    and there's no videoElement.
@@ -1115,13 +1154,13 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function pause():void
-    {
-        videoElement.pause();
-    }
-
-    /**
-     *  @copy spark.primitives.VideoElement#play()
+    public function play(startTime:Number=NaN, duration:Number=NaN):void
+    {
+        videoElement.play(startTime, duration);
+    }
+
+    /**
+     *  @copy spark.primitives.VideoElement#seek()
      *
      *  @throws TypeError if the skin hasn't been loaded up yet
      *                    and there's no videoElement.
@@ -1131,13 +1170,13 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function play(startTime:Number=-1, duration:Number=-1):void
-    {
-        videoElement.play(startTime, duration);
-    }
-
-    /**
-     *  @copy spark.primitives.VideoElement#seek()
+    public function seek(time:Number):void
+    {
+        videoElement.seek(time);
+    }
+
+    /**
+     *  @copy spark.primitives.VideoElement#stop()
      *
      *  @throws TypeError if the skin hasn't been loaded up yet
      *                    and there's no videoElement.
@@ -1147,46 +1186,11 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function seek(time:Number):void
-    {
-        videoElement.seek(time);
-    }
-
-    /**
-     *  @copy spark.primitives.VideoElement#stop()
-     *
-     *  @throws TypeError if the skin hasn't been loaded up yet
-     *                    and there's no videoElement.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
     public function stop():void
     {
         videoElement.stop();
     }

-    /**
-     *  @copy spark.primitives.VideoElement#unmute()
-     *
-     *  @throws TypeError if the skin hasn't been loaded up yet
-     *                    and there's no videoElement.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function unmute():void
-    {
-        videoElement.unmute();
-
-        if (muteButton)
-            muteButton.selected = false;
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Event handlers
@@ -1196,7 +1200,7 @@
     /**
      *  @private
      */
-    private function videoElement_completeHandler(event:MetadataEvent):void
+    private function videoElement_completeHandler(event:spark.events.VideoEvent):void
     {
         if (totalTimeLabel)
             totalTimeLabel.text = videoElement.totalTime.toString();
@@ -1207,7 +1211,7 @@
     /**
      *  @private
      */
-    private function videoElement_metaDataReceivedHandler(event:MetadataEvent):void
+    private function videoElement_metaDataReceivedHandler(event:spark.events.VideoEvent):void
     {
         if (scrubBar)
         {
@@ -1218,6 +1222,8 @@

         if (totalTimeLabel)
             totalTimeLabel.text = videoElement.totalTime.toString();
+
+        dispatchEvent(event);
     }

     /**
@@ -1234,6 +1240,8 @@

         if (playheadTimeLabel)
             playheadTimeLabel.text = videoElement.playheadTime.toString();
+
+        dispatchEvent(event);
     }

     /**
@@ -1242,8 +1250,10 @@
     private function videoElement_stateChangeHandler(event:fl.video.VideoEvent):void
     {
         if (playPauseButton)
-            playPauseButton.selected = isPlaying;
+            playPauseButton.selected = playing;
         invalidateSkinState();
+
+        // don't dispatch the event here...this is an internal event
     }

     /**
@@ -1279,7 +1289,7 @@
      */
     private function playButton_clickHandler(event:MouseEvent):void
     {
-        if (!isPlaying)
+        if (!playing)
             play();
     }

@@ -1304,7 +1314,7 @@
      */
     private function playPauseButton_clickHandler(event:MouseEvent):void
     {
-        if (isPlaying)
+        if (playing)
             pause();
         else
             play();
@@ -1315,10 +1325,10 @@
      */
     private function muteButton_clickHandler(event:MouseEvent):void
     {
-        if (isMuted)
-            unmute();
+        if (muted)
+            muted = false;
         else
-            mute();
+            muted = true;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 6631
Author:   rfrishbe@adobe.com
Date:     2009-05-05T05:15:35.285862Z

Log Message:
-----------
Fixing a bunch of Video Player bugs.  Fixing up full screen and some cases where there was no source or what to do when seek() is called before play().  Now, even when autoPlay=false, we load up the video immediately.  This way we can size the video and also can seek and perform other commands without any issues.

QE Notes: -
Doc Notes: -
Bugs: SDK-20791, SDK-20528, SDK-20696, SDK-20697, SDK-20940, SDK-20927, SDK-20948, SDK-20533, SDK-20933
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/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -15,12 +15,16 @@
 import fl.video.VideoState;
 import fl.video.flvplayback_internal;

+import flash.display.DisplayObject;
 import flash.display.StageDisplayState;
 import flash.events.Event;
 import flash.events.FullScreenEvent;
+import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
 import flash.events.ProgressEvent;
+import flash.events.TimerEvent;
 import flash.geom.Rectangle;
+import flash.utils.Timer;

 import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;
@@ -325,6 +329,15 @@
      */
     private static const VOLUME_PROPERTY_FLAG:uint = 1 << 5;

+    /**
+     *  @private
+     *  The default value that we wait in fullscreen mode with no user-interaction
+     *  before the play controls go away.
+     *
+     *  @default 3000
+     */
+    private static const FULL_SCREEN_HIDE_CONTROLS_DELAY:Number = 3000;
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -424,6 +437,20 @@
      *  @productversion Flex 4
      */
     public var playButton:ButtonBase;
+
+    [SkinPart(required="false")]
+
+    /**
+     *  An optional skin part for all of the player controls.  We
+     *  need this skin part to know what to hide when in full screen
+     *  mode and there's been no user-interaction.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var playerControls:DisplayObject;

     [SkinPart(required="false")]

@@ -961,6 +988,7 @@
             videoElement.addEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
             videoElement.addEventListener(ProgressEvent.PROGRESS, videoElement_progressHandler);
             videoElement.addEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);
+            videoElement.addEventListener("playingChanged", videoElement_playingChangedHandler);

             // just strictly for binding purposes
             videoElement.addEventListener("sourceChanged", dispatchEvent);
@@ -1074,6 +1102,7 @@
             videoElement.removeEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
             videoElement.removeEventListener(ProgressEvent.PROGRESS, videoElement_progressHandler);
             videoElement.removeEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);
+            videoElement.removeEventListener("playingChanged", videoElement_playingChangedHandler);

             // just strictly for binding purposes
             videoElement.removeEventListener("sourceChanged", dispatchEvent);
@@ -1314,12 +1343,18 @@
      */
     private function videoElement_stateChangeHandler(event:fl.video.VideoEvent):void
     {
+        invalidateSkinState();
+
+        // don't dispatch the event here...this is an internal event
+    }
+
+   /**
+    *  @private
+    */
+    private function videoElement_playingChangedHandler(event:Event):void
+    {
         if (playPauseButton)
             playPauseButton.selected = playing;
-
-        invalidateSkinState();
-
-        // don't dispatch the event here...this is an internal event
     }

     /**
@@ -1342,22 +1377,74 @@

     /**
      *  @private
+     *  X-value before going in to full screen mode.  This way we
+     *  can reset it to this afterwards.
+     */
+    private var beforeFullScreenX:Number;
+
+    /**
+     *  @private
+     *  Y-value before going in to full screen mode.  This way we
+     *  can reset it to this afterwards.
+     */
+    private var beforeFullScreenY:Number;
+
+    /**
+     *  @private
+     *  Timer, which waits for 3 seconds by default to hide the
+     *  playback controls.  If there's interaction by the user, then
+     *  these playback controls are show again, and the timer will reset
+     *  and start the countdown.
+     */
+    private var fullScreenHideControlTimer:Timer;
+
+    /**
+     *  @private
      */
     private function fullScreenButton_clickHandler(event:MouseEvent):void
     {
         if (!fullScreen)
         {
-            // TODO (rfrishbe): What should we do on full screen?
             fullScreen = true;
+
+            // need it to go into full screen state for the skin
             invalidateSkinState();
+
+            // let's get it off of our layout system so it doesn't interfere with
+            // the sizing and positioning. Then let's resize it to be
+            // the full size of our screen.  Then let's position it off-screen so
+            // there are no other elements in the way.
+            beforeFullScreenX = this.x;
+            beforeFullScreenY = this.y;
             includeInLayout = false;
             setLayoutBoundsSize(stage.fullScreenWidth, stage.fullScreenHeight);
+            this.validateNow();
+            this.x = -(2*width);
+            this.y = -(2*height);
+
+            // this is for video performance reasons
             videoElement.mx_internal::videoPlayer.smoothing = false;
             videoElement.mx_internal::videoPlayer.deblocking = 0;
-            validateNow();
+
+            // now into full screen we go
+            // TODO: what if we're sandboxed...can we get the stage?
+            stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
+            stage.fullScreenSourceRect = new Rectangle(x, y, width, height);
             stage.displayState = StageDisplayState.FULL_SCREEN;
-            stage.fullScreenSourceRect = new Rectangle(0, 0, width, height);
-            stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
+
+            // start timer for detecting for mouse movements/clicks to hide the controls
+            fullScreenHideControlTimer = new Timer(FULL_SCREEN_HIDE_CONTROLS_DELAY, 1);
+            fullScreenHideControlTimer.addEventListener(TimerEvent.TIMER_COMPLETE,
+                fullScreenHideControlTimer_timerCompleteHandler, false, 0, true);
+
+            // use stage or systemManager?
+            systemManager.addEventListener(MouseEvent.MOUSE_DOWN, resetFullScreenHideControlTimer);
+            systemManager.addEventListener(MouseEvent.MOUSE_MOVE, resetFullScreenHideControlTimer);
+            systemManager.addEventListener(MouseEvent.MOUSE_WHEEL, resetFullScreenHideControlTimer);
+
+            // keyboard events don't happen when in fullScreen mode, but could be in fullScreen and interactive mode
+            systemManager.addEventListener(KeyboardEvent.KEY_DOWN, resetFullScreenHideControlTimer);
+            fullScreenHideControlTimer.start();
         }
         else
         {
@@ -1365,24 +1452,60 @@
         }
     }

+    /**
+     *  @private
+     *  After waiting a certain time perdiod, we hide the controls if no
+     *  user-interaction has occurred on-screen.
+     */
+    private function fullScreenHideControlTimer_timerCompleteHandler(event:TimerEvent):void
+    {
+        playerControls.visible = false;
+    }
+
+    /**
+     *  @private
+     *  Handles when mouse interaction happens, and we are in the fullscreen mode.  This
+     *  resets the fullScreenHideControlTimer.
+     */
+    private function resetFullScreenHideControlTimer(event:Event):void
+    {
+        playerControls.visible = true;
+
+        fullScreenHideControlTimer.reset();
+        fullScreenHideControlTimer.start();
+    }
+
+    /**
+     *  @private
+     *  Handles when coming out the full screen mode
+     */
     private function fullScreenEventHandler(event:FullScreenEvent):void
     {
+        // going in to full screen is handled by the
+        // fullScreenButton_clickHandler
         if (event.fullScreen)
             return;

+        // set the fullScreen variable back to false and remove this event listener
         fullScreen = false;
+        stage.removeEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
+
+        // remove the event listeners to hide the controls
+        systemManager.removeEventListener(MouseEvent.MOUSE_DOWN, resetFullScreenHideControlTimer);
+        systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, resetFullScreenHideControlTimer);
+        systemManager.removeEventListener(MouseEvent.MOUSE_WHEEL, resetFullScreenHideControlTimer);
+        systemManager.removeEventListener(KeyboardEvent.KEY_DOWN, resetFullScreenHideControlTimer);
+
+        // make the controls visible no matter what
+        playerControls.visible = true;
+
+        // reset it so we're re-included in the layout
+        this.x = beforeFullScreenX;
+        this.y = beforeFullScreenY;
+        includeInLayout = true;
         invalidateSkinState();
-        stage.removeEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
-        includeInLayout = true;
         invalidateSize();
         invalidateDisplayList();
-//        var myParent:IVisualElementContainer = parent as IVisualElementContainer;
-//        if (myParent)
-//        {
-//            var index:int = myParent.getElementIndex(this);
-//            myParent.removeElement(this);
-//            myParent.addElementAt(this, index);
-//        }
     }

     /**


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

--- frameworks/projects/framework/src/mx/controls/Spacer.as
+++ frameworks/projects/framework/src/mx/controls/Spacer.as
@@ -48,6 +48,11 @@
  *
  *  @includeExample examples/SpacerExample.mxml
  *
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class Spacer extends UIComponent
 {
@@ -61,6 +66,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function Spacer()
     {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


updated TestList to test List fixes

updated TestList to test List fixes

--- examples/OpenPyroExample/src/TestList.as
+++ examples/OpenPyroExample/src/TestList.as
@@ -5,6 +5,7 @@

 	import org.openPyro.aurora.AuroraContainerSkin;
 	import org.openPyro.controls.List;
+	import org.openPyro.controls.events.ListEvent;
 	import org.openPyro.controls.ScrollBar;
 	import org.openPyro.core.*;
 	import org.openPyro.events.PyroEvent;
@@ -171,26 +172,27 @@

 		private function createList():List{
 			list = new List();
-			list.addEventListener(MouseEvent.CLICK, onListClick)
+			list.addEventListener(ListEvent.ITEM_CLICK, onListClick);
 			list.width = 200
 			list.percentUnusedHeight = 100;

-			var layout:VLayout = new VLayout(0);
+			var layout:VLayout = new VLayout(2);
 			list.layout = layout;

 			var rendererFactory:ClassFactory = new ClassFactory(Renderer);
 			rendererFactory.properties = {width:500, height:30}
 			list.itemRenderer = rendererFactory;
-			list.dataProvider = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
+			list.dataProvider = ["a", "a", "a", "a", "e", "f", "c", "b", "a"];

 			list.skin = new AuroraContainerSkin()
 			return list;
 		}

-		private function onListClick(event:MouseEvent):void
+		private function onListClick(_e:ListEvent):void
 		{
 			//container.horizontalScrollBar.visible = false;
 			//trace('list height: '+list.height, 'list measuredht: '+list.measuredHeight, 'hScrollBar y'+list.horizontalScrollBar.y)
+            trace(List(_e.target).selectedIndex+", "+List(_e.target).selectedItem);
 		}

 		public function onStageResize(event:Event):void{
@@ -239,13 +241,13 @@
 			var verticalScrollBar:ScrollBar = new ScrollBar(Direction.VERTICAL);
 			verticalScrollBar.width = 15;
 			verticalScrollBar.height = 300;
-			addChild(verticalScrollBar)
-
-			verticalScrollBar.slider.trackSkin = new HaloTrackSkin()
-			verticalScrollBar.slider.thumbSkin = new SimpleButtonSkin()
+			addChild(verticalScrollBar);
+
+			verticalScrollBar.slider.trackSkin = new HaloTrackSkin();
+			verticalScrollBar.slider.thumbSkin = new SimpleButtonSkin();
 			verticalScrollBar.incrementButtonSkin = new SimpleButtonSkin()
 			verticalScrollBar.decrementButtonSkin = new SimpleButtonSkin();
-			return verticalScrollBar
+			return verticalScrollBar;

 		}
 	}
@@ -254,14 +256,18 @@

 import flash.display.Sprite;
 import flash.display.Graphics;
+import flash.geom.ColorTransform;
 import org.openPyro.core.UIControl;
 import flash.text.TextField;
-import org.openPyro.core.IDataRenderer;
 import flash.events.MouseEvent;
-
-internal class Renderer extends UIControl implements IDataRenderer{
+import org.openPyro.controls.listClasses.IListDataRenderer;
+import org.openPyro.controls.listClasses.BaseListData;
+
+internal class Renderer extends UIControl implements IListDataRenderer{

 	private var txt:TextField;
+    private var m_selected:Boolean;
+    private var m_bld:BaseListData

 	public function Renderer(){

@@ -283,15 +289,16 @@
 	}

 	public function set data(d:Object):void{
-		this.txt.text = String(d)
+        _data = d;
+		this.txt.text = String(d);
 		invalidateSize();
 	}

-	private var _data:String
+	private var _data:Object;
 	public function set label(s:String):void{
 		_data = s;
 		this.txt.text = s;
-		this.invalidateSize()
+		this.invalidateSize();
 	}

 	override public function measure():void{
@@ -327,4 +334,23 @@
 		gr.drawRect(0,0,unscaledWidth,unscaledHeight);
 		gr.endFill();
 	}
-}+
+    public function  get selected():Boolean {
+        return m_selected;
+    }
+
+    public function  set selected(_selected:Boolean):void {
+        //var e:Error = new Error();
+        //trace(e.getStackTrace());
+        m_selected = _selected;
+        if(m_selected) {
+            this.transform.colorTransform = new ColorTransform(1.1, 1.1, 1.1);
+        } else {
+            this.transform.colorTransform = new ColorTransform(1.0, 1.0, 1.0);
+        }
+    }
+
+    public function  set baseListData(_bld:BaseListData):void {
+        m_bld = _bld;
+    }
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3076
Author:   hmuller@adobe.com
Date:     2008-09-03T17:09:04.203118Z

Log Message:
-----------
Replaced private Group contentWidth,Height set methods with private
functions that explicitly dispatch PropertyChangeEvents.

QE: NO
Doc: No
Checkintests: Pass
Reviewer: Ryan

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -654,7 +654,7 @@

     private var _contentWidth:Number = 0;

-    [Bindable]
+    [Bindable("propertyChange")]
     [Inspectable(category="General")]

     /**
@@ -666,9 +666,13 @@
         return _contentWidth;
     }

-    private function set contentWidth(value:Number):void
-    {
+    private function setContentWidth(value:Number):void
+    {
+        if (value == _contentWidth)
+            return;
+    	var oldValue:Number = _contentWidth;
         _contentWidth = value;
+        dispatchPropertyChangeEvent("contentWidth", oldValue, value);
     }

     //----------------------------------
@@ -677,7 +681,7 @@

     private var _contentHeight:Number = 0;

-    [Bindable]
+    [Bindable("propertyChange")]
     [Inspectable(category="General")]

     /**
@@ -689,9 +693,13 @@
         return _contentHeight;
     }

-    private function set contentHeight(value:Number):void
+    private function setContentHeight(value:Number):void
     {
+        if (value == _contentHeight)
+            return;
+        var oldValue:Number = _contentHeight;
         _contentHeight = value;
+        dispatchPropertyChangeEvent("contentHeight", oldValue, value);
     }

     /**
@@ -708,8 +716,8 @@
     {
         if ((w == _contentWidth) && (h == _contentHeight))
            return;
-        contentWidth = w;
-        contentHeight = h;
+        setContentWidth(w);
+        setContentHeight(h);
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 11118
Author:   gosmith@adobe.com
Date:     2009-10-23T23:35:38.504561Z

Log Message:
-----------
Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: None; no functional changes
Tests run: ant checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<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/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

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


rename requirement to plaque/script

rename requirement to plaque/script

--- flexEditor/src/org/arisgames/editor/util/AppConstants.as
+++ flexEditor/src/org/arisgames/editor/util/AppConstants.as
@@ -80,17 +80,17 @@

     // Requirement Options
     public static const REQUIREMENT_PLAYER_HAS_ITEM_DATABASE:String = "PLAYER_HAS_ITEM";
-    public static const REQUIREMENT_PLAYER_HAS_ITEM_HUMAN:String = "Player Has At Least qty of an Item";
+    public static const REQUIREMENT_PLAYER_HAS_ITEM_HUMAN:String = "Player Has At Least Qty of an Item";
     public static const REQUIREMENT_PLAYER_DOES_NOT_HAVE_ITEM_DATABASE:String = "PLAYER_DOES_NOT_HAVE_ITEM";
-    public static const REQUIREMENT_PLAYER_DOES_NOT_HAVE_ITEM_HUMAN:String = "Player Has Less Than qty of an Item";
+    public static const REQUIREMENT_PLAYER_DOES_NOT_HAVE_ITEM_HUMAN:String = "Player Has Less Than Qty of an Item";
     public static const REQUIREMENT_PLAYER_VIEWED_ITEM_DATABASE:String = "PLAYER_VIEWED_ITEM";
     public static const REQUIREMENT_PLAYER_VIEWED_ITEM_HUMAN:String = "Player Viewed Item";
     public static const REQUIREMENT_PLAYER_HAS_NOT_VIEWED_ITEM_DATABASE:String = "PLAYER_HAS_NOT_VIEWED_ITEM";
     public static const REQUIREMENT_PLAYER_HAS_NOT_VIEWED_ITEM_HUMAN:String = "Player Never Viewed Item";
     public static const REQUIREMENT_PLAYER_VIEWED_NODE_DATABASE:String = "PLAYER_VIEWED_NODE";
-    public static const REQUIREMENT_PLAYER_VIEWED_NODE_HUMAN:String = "Player Viewed Plaque";
+    public static const REQUIREMENT_PLAYER_VIEWED_NODE_HUMAN:String = "Player Viewed Plaque/Script";
     public static const REQUIREMENT_PLAYER_HAS_NOT_VIEWED_NODE_DATABASE:String = "PLAYER_HAS_NOT_VIEWED_NODE";
-    public static const REQUIREMENT_PLAYER_HAS_NOT_VIEWED_NODE_HUMAN:String = "Player Never Viewed Plaque";
+    public static const REQUIREMENT_PLAYER_HAS_NOT_VIEWED_NODE_HUMAN:String = "Player Never Viewed Plaque/Script";
     public static const REQUIREMENT_PLAYER_VIEWED_NPC_DATABASE:String = "PLAYER_VIEWED_NPC";
     public static const REQUIREMENT_PLAYER_VIEWED_NPC_HUMAN:String = "Player Greeted By Character";
     public static const REQUIREMENT_PLAYER_HAS_NOT_VIEWED_NPC_DATABASE:String = "PLAYER_HAS_NOT_VIEWED_NPC";


Fix for falcon compilation issue FLEX-33304

git-svn-id: 7d913817b0a978d84de757191e4bce372605a781@1423863 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/DateTimeAxis.as
+++ frameworks/projects/charts/src/mx/charts/DateTimeAxis.as
@@ -1415,6 +1415,7 @@
     override public function formatForScreen(v:Object):String
     {
         var d:Date = tmpDate;
+        var parseFunction:Function = this.parseFunction;

         if (parseFunction != null)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21009
Author:   aharui@adobe.com
Date:     2011-03-31T22:39:31.412785Z

Log Message:
-----------
Merge svn 20952 to trunk

Re-implement early exit if nestLevel == 1. FIxes performance problem with building DisplayObject trees by parenting the child before parenting the parent.

QE notes: none
Doc notes: none
Bugs: SDK-30010
Reviewer: Ryan
Tests run: checkintests mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -4169,8 +4169,11 @@
         // If my parent hasn't been attached to the display list, then its nestLevel
         // will be zero.  If it tries to set my nestLevel to 1, ignore it.  We'll
         // update nest levels again after the parent is added to the display list.
-        //
+        if (value == 1)
+            return;
+
         // Also punt if the new value for nestLevel is the same as my current value.
+        // TODO: (aharui) add early exit if nestLevel isn't changing
         if (value > 1 && _nestLevel != value)
         {
             _nestLevel = value;


Transferred from the Adobe Open Source Subversion Repository

Revision: 9708
Author:   cframpto@adobe.com
Date:     2009-08-27T20:22:38.464977Z

Log Message:
-----------
Add TLFTextInput which allows Halo controls to use the spark FTE/TLF-based TextInput component wherever a Halo TextInput can be used.

This is done by introducing a new style for Halo called textInputClass.  In the global selector, in defaults.css, it defaults to mx.controls.TextInput.  This style only applies for Flex version 4 and up.

To use TLFText apply the new TLFText.css style sheet as a theme to your application.  Alternatively you may apply this style sheet in your application but you will see compiler warnings for any unused selectors.

Note that mx.controls.TLFTextInput lives in spark.swc since it is build on spark.components.TextInput.

Modified ColorPicker, DateField, ComboBox, NumericStepper and TextInput to look at the textInputClass field to determine whether to use a Halo TextInput or a Spark TextInput.

QE notes:
Doc notes:
Bugs:
Reviewer: Gordon
Tests run: mx ColorPicker,DateField,ComboBox,NumericStepper and TextInput as well as checkintests
one ColorPicker_events_toolTipHide failed - the timer does fire eventually but it seems to take much longer than the hideDelay=10000.
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/TLFText.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>

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

--- frameworks/projects/mx/src/mx/controls/NumericStepper.as
+++ frameworks/projects/mx/src/mx/controls/NumericStepper.as
@@ -28,6 +28,7 @@
 import mx.core.IDataRenderer;
 import mx.core.IFlexDisplayObject;
 import mx.core.IIMESupport;
+import mx.core.ITextInput;
 import mx.core.UIComponent;
 import mx.core.UITextField;
 import mx.core.mx_internal;
@@ -409,7 +410,7 @@
     /**
      *  @private
      */
-    mx_internal var inputField:TextInput;
+    mx_internal var inputField:ITextInput;

     /**
      *  @private
@@ -1122,7 +1123,17 @@

         if (!inputField)
         {
-            inputField = new TextInput();
+            // Mechanism to use TLFTextInput.
+            var textInputClass:Class = getStyle("textInputClass");
+            if (!textInputClass ||
+                FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
+            {
+                inputField = new TextInput();
+            }
+            else
+            {
+                inputField = new textInputClass();
+            }

             inputField.styleName = new StyleProxy(this, inputFieldStyleFilters);
             inputField.focusEnabled = false;
@@ -1140,7 +1151,7 @@
             inputField.addEventListener(KeyboardEvent.KEY_DOWN, inputField_keyDownHandler);
             inputField.addEventListener(Event.CHANGE, inputField_changeHandler);

-            addChild(inputField);
+            addChild(DisplayObject(inputField));
         }

         if (!nextButton)
@@ -1295,8 +1306,7 @@
      */
     override public function setFocus():void
     {
-        if (stage)
-            stage.focus = TextField(inputField.getTextField());
+        inputField.setFocus();
     }

     /**
@@ -1429,7 +1439,7 @@
                      lastValue - stepSize, true, trigger);

             if (oldValue != lastValue)
-                inputField.getTextField().setSelection(0,0);
+                inputField.selectRange(0,0);
         }
     }

@@ -1487,7 +1497,7 @@
     private function buttonClickHandler(event:MouseEvent):void
     {
         inputField.setFocus();
-        inputField.getTextField().setSelection(0, 0);
+        inputField.selectRange(0, 0);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.rpc.events
+{
+
+import flash.events.Event;
+
+import mx.core.mx_internal;
+import mx.messaging.messages.IMessage;
+import mx.rpc.AsyncToken;
+
+use namespace mx_internal;
+
+/**
+ * The event that indicates an RPC operation, such as a WebService SOAP request,
+ * returned a header in the response. A new header event is dispatched for each
+ * service header.
+ */
+public class HeaderEvent extends AbstractEvent
+{
+   /**
+    * The HEADER event type.
+    *
+    *
The properties of the event object have the following values:

+    *

+    *
Property	Value

+    *
bubbles	false

+    *
token	The token that represents the call
+    *     to the method. Used in the asynchronous completion token pattern.

+    *
cancelable	true, but the preventDefault() method has
+    *       no effect.

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

+    *
header	Header that the RPC call returns in the response.
+    *

+    *
message	The Message associated with this event.

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

+    *

+    *  @eventType header
+    */
+    public static const HEADER:String = "header";
+
+    private var _header:Object;
+
+    /**
+     * Creates a new HeaderEvent.
+     *
+     * @param header Object that holds the header of the call.
+     * @param token AsyncToken that represents the call to the method. Used in the asynchronous completion token pattern.
+     * @param message Source Message of the header.
+     */
+    public function HeaderEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true,
+            header:Object = null, token:AsyncToken = null, message:IMessage = null)
+    {
+        super(type, bubbles, cancelable, token, message);
+
+        _header = header;
+    }
+
+    /**
+     * Header that the RPC call returned in the response.
+     */
+    public function get header():Object
+    {
+        return _header;
+    }
+
+    public static function createEvent(header:Object, token:AsyncToken, message:IMessage):HeaderEvent
+    {
+        return new HeaderEvent(HeaderEvent.HEADER, false, true, header, token, message);
+    }
+
+    /**
+      * @private
+      */
+    override public function clone():Event
+    {
+        return new HeaderEvent(type, bubbles, cancelable, header, token, message);
+    }
+
+   /**
+     * Returns a string representation of the HeaderEvent.
+     *
+     * @return String representation of the HeaderEvent.
+     */
+    override public function toString():String
+    {
+        return formatToString("HeaderEvent", "type", "bubbles", "cancelable", "eventPhase");
+    }
+}
+
+}


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

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

 package spark.effects
 {


OutgoingDataEvent.data was supposed to he uncompressed but was compressed is compression is enabled.

git-svn-id: c197267f952b24206666de142881703007ca05d5@13151 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/igniterealtime/xiff/core/XMPPConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPConnection.as
@@ -1511,23 +1511,23 @@

 			bytedata.position = 0;

-			if ( compressionNegotiated )
-			{
-				bytedata.compress();
-				bytedata.position = 0; // maybe not needed.
-			}
-
-			if ( socket && socket.connected )
-			{
-				socket.writeBytes( bytedata, 0, bytedata.length );
-				socket.flush();
-			}
-
-			_outgoingBytes += bytedata.length;
-
 			var event:OutgoingDataEvent = new OutgoingDataEvent();
 			event.data = bytedata;
 			dispatchEvent( event );
+
+			if ( compressionNegotiated )
+			{
+				bytedata.compress();
+				bytedata.position = 0; // maybe not needed.
+			}
+
+			if ( socket && socket.connected )
+			{
+				socket.writeBytes( bytedata, 0, bytedata.length );
+				socket.flush();
+			}
+
+			_outgoingBytes += bytedata.length;
 		}

 		/**


Update src/aerys/minko/render/resource/texture/TextureResource.as

fix bug Error #3679: Texture size does not match.
by analogy with setContentFromBitmapData

--- src/aerys/minko/render/resource/texture/TextureResource.as
+++ src/aerys/minko/render/resource/texture/TextureResource.as
@@ -130,6 +130,10 @@
 			_atf			= atf;
 			_bitmapData		= null;
 			_update 		= true;
+
+			var oldWidth	: Number = _width;
+			var oldHeight	: Number = _height;
+			var oldMipmap	: Boolean = _mipmap;

 			atf.position 	= 6;

@@ -147,6 +151,14 @@
 			else if (_atfFormat == 3)
 				_format = FORMAT_COMPRESSED;

+			if (_texture
+				&& (oldMipmap != _mipmap
+					|| oldWidth != _width
+					|| oldHeight != _height))
+			{
+				_texture.dispose();
+				_texture = null;
+			}
 		}

 		public function getTexture(context : Context3DResource) : TextureBase


Add methods on the lights out script that the button triggers will call. They all call a generic one that handles the game logic. I would prefer to just pass a parameter via the trigger but I don't know if we support that.

--- Game/Resources/elevatorScene/Scripts/LightsOutScript.as
+++ Game/Resources/elevatorScene/Scripts/LightsOutScript.as
@@ -14,4 +14,110 @@
     void Update(float deltaTime) {

     }
+
+	// Index goes first row 0 -> 4, second row 5 -> 9 etc.
+	void ButtonPress(int index) {
+		// Check if button is not pressed, in which case we invert its neighbors (check for out of bounds)
+		print("Pressed button nr `" + index + "`\n");
+	}
+
+	void b_0_0() {
+		ButtonPress(0);
+	}
+
+	void b_0_1() {
+		ButtonPress(1);
+	}
+
+	void b_0_2() {
+		ButtonPress(2);
+	}
+
+	void b_0_3() {
+		ButtonPress(3);
+	}
+
+	void b_0_4() {
+		ButtonPress(4);
+	}
+
+	void b_1_0() {
+		ButtonPress(5);
+	}
+
+	void b_1_1() {
+		ButtonPress(6);
+	}
+
+	void b_1_2() {
+		ButtonPress(7);
+	}
+
+	void b_1_3() {
+		ButtonPress(8);
+	}
+
+	void b_1_4() {
+		ButtonPress(9);
+	}
+
+	void b_2_0() {
+		ButtonPress(10);
+	}
+
+	void b_2_1() {
+		ButtonPress(11);
+	}
+
+	void b_2_2() {
+		ButtonPress(12);
+	}
+
+	void b_2_3() {
+		ButtonPress(13);
+	}
+
+	void b_2_4() {
+		ButtonPress(14);
+	}
+
+	void b_3_0() {
+		ButtonPress(15);
+	}
+
+	void b_3_1() {
+		ButtonPress(16);
+	}
+
+	void b_3_2() {
+		ButtonPress(17);
+	}
+
+	void b_3_3() {
+		ButtonPress(18);
+	}
+
+	void b_3_4() {
+		ButtonPress(19);
+	}
+
+	void b_4_0() {
+		ButtonPress(20);
+	}
+
+	void b_4_1() {
+		ButtonPress(21);
+	}
+
+	void b_4_2() {
+		ButtonPress(22);
+	}
+
+	void b_4_3() {
+		ButtonPress(23);
+	}
+
+	void b_4_4() {
+		ButtonPress(24);
+	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 15674
Author:   klin@adobe.com
Date:     2010-04-23T21:33:18.795073Z

Log Message:
-----------
Fix for http://bugs.adobe.com/jira/browse/SDK-26267. Embedded assets were depending on AdvancedLayoutFeatures and other framework classes. This caused a simple AS-only swf size to be quite large, and even fail to build in an AS-only project in FB. The fixes are:

-Softlink FlexVersion using hasDefinition/getDefinition. This gets rid of the dependency on the ResourceManager, which fixes the compile error in FB.
-Introduce a new interface, IAssetLayoutFeatures, which contains a subset of the API from AdvancedLayoutFeatures only used by the asset classes. AdvancedLayoutFeatures implements this interface. The interface also removes the API dependency on TransformOffsets.
-We can then softlink AdvancedLayoutFeatures and MatrixUtil to remove that dependency.
-Use the hardcoded string "ltr" instead of the constant LayoutDirection.LTR to remove the dependency on LayoutDirection.

All of these fixes bring swf size down to near the original (around 2k more in the reference case).

QE notes: No
Doc notes: No
Bugs: SDK-26267
Reviewer: Alex, Carol
Tests run: checkintests, Mirroring
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/BitmapAsset.as</path>
<path kind="file" action="M">/flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>
<path kind="file" action="A">/flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/IAssetLayoutFeatures.as</path>
<path kind="file" action="M">/flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/SpriteAsset.as</path>

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

--- frameworks/projects/framework/src/mx/core/IAssetLayoutFeatures.as
+++ frameworks/projects/framework/src/mx/core/IAssetLayoutFeatures.as
@@ -0,0 +1,366 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+package mx.core
+{
+import flash.geom.Matrix;
+import flash.geom.Matrix3D;
+
+/**
+ *  The IAssetLayoutFeatures interface defines the minimum properties and methods
+ *  required for an Object to support advanced transforms in embedded assets.
+ *
+ *  @see mx.core.AdvancedLayoutFeatures
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.1
+ */
+public interface IAssetLayoutFeatures
+{
+
+    /**
+     *  Layout transform convenience property.  Represents the x value of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutX(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutX():Number;
+
+    /**
+     *  Layout transform convenience property.  Represents the y value of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutY(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutY():Number;
+
+    /**
+     *  Layout transform convenience property.  Represents the z value of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutZ(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutZ():Number;
+
+    /**
+     *  Used by the mirroring transform. See the mirror property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get layoutWidth():Number;
+
+    /**
+     *  @private
+     */
+    function set layoutWidth(value:Number):void;
+
+    //------------------------------------------------------------------------------
+
+    /**
+     *  The x value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set transformX(value:Number):void;
+    /**
+     * @private
+     */
+    function get transformX():Number;
+
+    /**
+     *  The y value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set transformY(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get transformY():Number;
+
+    /**
+     *  The z value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set transformZ(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get transformZ():Number;
+
+    //------------------------------------------------------------------------------
+
+    /**
+     *  Layout transform convenience property.  Represents the rotation around the X axis of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutRotationX(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutRotationX():Number;
+
+    /**
+     *  Layout transform convenience property.  Represents the rotation around the Y axis of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutRotationY(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutRotationY():Number;
+
+    /**
+     *  Layout transform convenience property.  Represents the rotation around the Z axis of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutRotationZ(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutRotationZ():Number;
+
+    //------------------------------------------------------------------------------
+
+    /**
+     *  Layout transform convenience property.  Represents the scale along the X axis of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutScaleX(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutScaleX():Number;
+
+    /**
+     *  Layout transform convenience property.  Represents the scale along the Y axis of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutScaleY(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutScaleY():Number;
+
+    /**
+     *  Layout transform convenience property.  Represents the scale along the Z axis of the layout matrix used in layout and in
+     *  the computed transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutScaleZ(value:Number):void;
+
+    /**
+     * @private
+     */
+    function get layoutScaleZ():Number;
+
+    /**
+     *  The 2D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
+     *
+     *   @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutMatrix(value:Matrix):void;
+
+    /**
+     * @private
+     */
+    function get layoutMatrix():Matrix;
+
+    /**
+     *  The 3D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function set layoutMatrix3D(value:Matrix3D):void;
+
+    /**
+     * @private
+     */
+    function get layoutMatrix3D():Matrix3D;
+
+    /**
+     *  True if the computed transform has 3D values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get is3D():Boolean;
+
+    /**
+     *  True if the layout transform has 3D values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get layoutIs3D():Boolean;
+
+    /**
+     *  If true the X axis is scaled by -1 and the x coordinate of the origin
+     *  is translated by the component's width.
+     *
+     *  The net effect of this "mirror" transform is to flip the direction
+     *  that the X axis increases in without changing the layout element's
+     *  location relative to the parent's origin.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get mirror():Boolean;
+
+    /**
+     *  @private
+     */
+    function set mirror(value:Boolean):void;
+
+
+    /**
+     *  The stretchY is the horizontal component of the stretch scale factor which
+     *  is applied before any other transformation property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get stretchX():Number;
+
+    /**
+     *  @private
+     */
+    function set stretchX(value:Number):void;
+
+    /**
+     *  The stretchY is the vertical component of the stretch scale factor which
+     *  is applied before any other transformation property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get stretchY():Number;
+
+    /**
+     *  @private
+     */
+    function set stretchY(value:Number):void;
+
+    //------------------------------------------------------------------------------
+
+    /**
+     *  The computed matrix, calculated by combining the layout matrix and any offsets provided.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get computedMatrix():Matrix;
+
+    /**
+     *  The computed 3D matrix, calculated by combining the 3D layout matrix and any offsets provided.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.1
+     */
+    function get computedMatrix3D():Matrix3D;
+}
+}


added metadata session state verifier

added metadata session state verifier

Change-Id: Ibe3d16b81c4db6198fc7a61315fcc71db6b0e73c

--- WeaveData/src/weave/data/AttributeColumns/EquationColumn.as
+++ WeaveData/src/weave/data/AttributeColumns/EquationColumn.as
@@ -26,9 +26,9 @@
 	import weave.api.data.ColumnMetadata;
 	import weave.api.data.DataType;
 	import weave.api.data.IAttributeColumn;
+	import weave.api.data.IKeySet;
 	import weave.api.data.IPrimitiveColumn;
 	import weave.api.data.IQualifiedKey;
-	import weave.api.data.IKeySet;
 	import weave.api.detectLinkableObjectChange;
 	import weave.api.getCallbackCollection;
 	import weave.api.newLinkableChild;
@@ -147,8 +147,12 @@
 		/**
 		 * This holds the metadata for the column.
 		 */
-		public const metadata:UntypedLinkableVariable = newLinkableChild(this, UntypedLinkableVariable);
-
+		public const metadata:UntypedLinkableVariable = registerLinkableChild(this, new UntypedLinkableVariable(null, verifyMetadata));
+
+		private function verifyMetadata(value:Object):Boolean
+		{
+			return typeof value == 'object';
+		}

 		/**
 		 * Specify whether or not we should filter the keys by the column's keyType.


added parentheses around "(Data unavailable)" missing column label.

--- WeaveData/src/weave/data/AttributeColumns/ProxyColumn.as
+++ WeaveData/src/weave/data/AttributeColumns/ProxyColumn.as
@@ -180,7 +180,7 @@
 			resumeCallbacks();
 		}

-		public static const DATA_UNAVAILABLE:String = lang('Data unavailable');
+		public static const DATA_UNAVAILABLE:String = lang('(Data unavailable)');

 		override public function toString():String
 		{


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

--- frameworks/projects/mx/src/mx/effects/WipeDown.as
+++ frameworks/projects/mx/src/mx/effects/WipeDown.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-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.effects
 {


fixed null pointer error

fixed null pointer error

--- WeaveUI/src/weave/ui/VariableListController.as
+++ WeaveUI/src/weave/ui/VariableListController.as
@@ -112,7 +112,7 @@
 				_editor.labelFunction = getItemLabel;
 			}

-			if (dynamicObject)
+			if (dynamicObject && _editor)
 				_editor.rowCount = 1;
 			updateDataProvider();
 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 11592
Author:   gruehle@adobe.com
Date:     2009-11-09T23:18:55.192323Z

Log Message:
-----------
Exclude the textAlign style from Button and ToggleButton.

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

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

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -28,6 +28,8 @@
  *  @productversion Flex 4
  */
 [Style(name="accentColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+[Exclude(name="textAlign", kind="style")]

 //--------------------------------------
 //  Other metadata


Cut client latency by attempting to send upstream messages
immediately.

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

--- src/as/com/threerings/presents/client/Communicator.as
+++ src/as/com/threerings/presents/client/Communicator.as
@@ -76,10 +76,13 @@

     public function postMessage (msg :UpstreamMessage) :void
     {
-        if (_writer == null) {
+        _outq.push(msg);
+        if (_writer != null) {
+            sendPendingMessages(null);
+
+        } else {
             log.warning("Posting message prior to opening socket", "msg", msg);
         }
-        _outq.push(msg);
     }

     /**
@@ -173,15 +176,14 @@
         while (_outq.length > 0) {
             // if we've exceeded our throttle, stop for now
             if (_client.getOutgoingMessageThrottle().throttleOp()) {
-                if (_tqsize != _outq.length) {
-                    // only log when our outq size changes
-                    _tqsize = _outq.length;
+                if (!_notedThrottle) {
                     log.info("Throttling outgoing messages", "queue", _outq.length,
                              "throttle", _client.getOutgoingMessageThrottle());
+                    _notedThrottle = true;
                 }
                 return;
             }
-            _tqsize = 0;
+            _notedThrottle = false;

             // grab the next message from the queue and send it
             var msg :UpstreamMessage = (_outq.shift() as UpstreamMessage);
@@ -356,7 +358,7 @@

     protected var _outq :Array = new Array();
     protected var _writer :Timer;
-    protected var _tqsize :int = 0;
+    protected var _notedThrottle :Boolean = false;

     protected const log :Log = Log.getLog(this);


Modified AirQualityDataSet.as so that it now uses a Stats object (Stats.as)

--- src/data/AirQualityDataSet.as
+++ src/data/AirQualityDataSet.as
@@ -35,6 +35,9 @@
 		public var limitCO:Boolean = false;
 		public var minCOLevel:Number = 0.0;
 		public var maxCOLevel:Number = 0.0;
+
+		// Added to implement spike episodes storage
+		public var stats:Stats

 		protected var multipleSources:Boolean = false;
 		protected var numSourcesLoading:int = 0;
@@ -84,7 +87,7 @@
 							dataURI + "\" has a different number of elements than the header row:(" +
 							entries[0] + ").");
 					}
-					// ADD CHECK FOR CO LEVEL HERE!!!
+					// Check if CO Level is limited (for hotspots view specifically)
 					if(limitCO == true && (entry[5] < minCOLevel || entry[5] > maxCOLevel))
 						continue;
 					else{
@@ -95,6 +98,15 @@
 						_data.push(pointData);
 					}
 				}
+				// execute stats object update now that data is available
+				stats = new Stats(_data, headers);
+				/*
+				// Note the example below on how to iterate through spikes in the data
+				var episodesArray:Array = stats.getSpikes();
+				for(var k:Number = 0; k < episodesArray.length; k++){
+					trace("behold the spike episodes"+"("+episodesArray[k].beginTime+", "+episodesArray[k].endTime+")");
+				}
+				*/
 			}

 			//sort and dispatch a complete event if were done loading everything