Transferred from the Adobe Open Source Subversion Repository

Revision: 11449
Author:   rfrishbe@adobe.com
Date:     2009-11-05T01:09:57.699854Z

Log Message:
-----------
Adding OSMF to our framework.  The osmf.swc builds automatically as part of our build process.  I'm also adding new video classes that use OSMF, spark.components.VideoDisplay and spark.components.VideoPlayer2.  The other VideoElement and VideoPlayer will be replaced by these.  The new video components are not yet complete; this is an initial checkin for these components.

QE notes: -
Doc notes: -
Bugs: -
Reviewer: Deepa (only the build processes stuff)
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
283 paths were modified

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -11,9 +11,6 @@

 package spark.components
 {
-import fl.video.VideoEvent;
-import fl.video.VideoState;
-import fl.video.flvplayback_internal;

 import flash.display.DisplayObject;
 import flash.display.StageDisplayState;
@@ -32,9 +29,14 @@
 import mx.events.FlexEvent;
 import mx.utils.BitFlagUtil;

+import org.osmf.events.BytesDownloadedChangeEvent;
+import org.osmf.events.DurationChangeEvent;
+import org.osmf.events.MediaPlayerStateChangeEvent;
+import org.osmf.events.PlayheadChangeEvent;
+import org.osmf.media.MediaPlayerState;
+
 import spark.components.mediaClasses.MuteButton;
 import spark.components.mediaClasses.ScrubBar;
-import spark.components.mediaClasses.StreamingVideoSource;
 import spark.components.mediaClasses.VolumeBar;
 import spark.components.supportClasses.ButtonBase;
 import spark.components.supportClasses.SkinnableComponent;
@@ -42,7 +44,6 @@
 import spark.components.supportClasses.ToggleButtonBase;
 import spark.events.TrackBaseEvent;
 import spark.events.VideoEvent;
-import spark.primitives.VideoElement;

 use namespace mx_internal;

@@ -150,7 +151,7 @@
 //--------------------------------------

 include "../styles/metadata/BasicInheritingTextStyles.as";
-
+
 /**
  *  The time, in milli-seconds, to wait in fullscreen mode with no user-interaction
  *  before hiding the video playback controls.
@@ -179,14 +180,80 @@
 //--------------------------------------

 /**
- *  Connection Error State of the VideoPlayer
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("connectionError")]
+ *  Unitialized State of the VideoPlayer.
+ *  The Video Player has been constructed at this point,
+ *  but the source has not been set and no connection
+ *  attempt is in progress.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("uninitialized")]
+
+/**
+ *  Initializing State of the VideoPlayer.
+ *  The VideoPlayer is loading or connecting to the source.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("initializing")]
+
+/**
+ *  Ready State of the VideoPlayer.
+ *  The video is ready to be played.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("ready")]
+
+/**
+ *  Playing State of the VideoPlayer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("playing")]
+
+/**
+ *  Paused State of the VideoPlayer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("paused")]
+
+/**
+ *  Buffering State of the VideoPlayer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("buffering")]
+
+/**
+ *  Playback Error State of the VideoPlayer.
+ *  An error was encountered while trying to play the video.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("playbackError")]

 /**
  *  Disabled State of the VideoPlayer
@@ -199,25 +266,86 @@
 [SkinState("disabled")]

 /**
- *  Disconnected State of the VideoPlayer
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("disconnected")]
-
-/**
- *  Connection Error State of the VideoPlayer when
+ *  Unitialized State of the VideoPlayer when
  *  in full screen mode.
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("connectionErrorAndFullScreen")]
+ *  The Video Player has been constructed at this point,
+ *  but the source has not been set and no connection
+ *  attempt is in progress.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("uninitializedAndFullScreen")]
+
+/**
+ *  Initializing State of the VideoPlayer when
+ *  in full screen mode.
+ *  The VideoPlayer is loading or connecting to the source.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("initializingAndFullScreen")]
+
+/**
+ *  Ready State of the VideoPlayer when
+ *  in full screen mode.  The video is ready to be played.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("readyAndFullScreen")]
+
+/**
+ *  Playing State of the VideoPlayer when
+ *  in full screen mode.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("playingAndFullScreen")]
+
+/**
+ *  Paused State of the VideoPlayer when
+ *  in full screen mode.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("pausedAndFullScreen")]
+
+/**
+ *  Buffering State of the VideoPlayer when
+ *  in full screen mode.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("bufferingAndFullScreen")]
+
+/**
+ *  Playback Error State of the VideoPlayer when
+ *  in full screen mode.
+ *  An error was encountered while trying to play the video.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("playbackErrorAndFullScreen")]

 /**
  *  Disabled State of the VideoPlayer when
@@ -229,80 +357,6 @@
  *  @productversion Flex 4
  */
 [SkinState("disabledAndFullScreen")]
-
-/**
- *  Disconnected State of the VideoPlayer when
- *  in full screen mode.
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("disconnectedAndFullScreen")]
-
-/**
- *  Loading State of the VideoPlayer when
- *  in full screen mode.
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("loadingAndFullScreen")]
-
-/**
- *  Playing State of the VideoPlayer when
- *  in full screen mode.
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("playingAndFullScreen")]
-
-/**
- *  Stopped State of the VideoPlayer when
- *  in full screen mode.
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("stoppedAndFullScreen")]
-
-/**
- *  Loading State of the VideoPlayer
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("loading")]
-
-/**
- *  Playing State of the VideoPlayer
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("playing")]
-
-/**
- *  Stopped State of the VideoPlayer
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("stopped")]

 //--------------------------------------
 //  Excluded APIs
@@ -378,7 +432,7 @@
  *
  *

  *  <s:VideoPlayer
-
+
  *    Properties
  *    autoPlay="true"
  *    autoRewind="false"
@@ -404,8 +458,9 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class VideoPlayer extends SkinnableComponent
+public class VideoPlayer2 extends SkinnableComponent
 {
+    include "../core/Version.as";

     //--------------------------------------------------------------------------
     //
@@ -431,7 +486,7 @@
     /**
      *  @private
      */
-    private static const MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG:uint = 1 << 3;
+    private static const SCALE_MODE_PROPERTY_FLAG:uint = 1 << 3;

     /**
      *  @private
@@ -447,7 +502,7 @@
      *  @private
      */
     private static const VOLUME_PROPERTY_FLAG:uint = 1 << 6;
-
+
     /**
      *  @private
      */
@@ -463,7 +518,7 @@
     //  Constructor
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  Constructor.
      *
@@ -472,10 +527,16 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function VideoPlayer()
+    public function VideoPlayer2()
     {
         super();
-    }
+
+        bufferingTimer = new Timer(250);
+        bufferingTimer.addEventListener(TimerEvent.TIMER, bufferingTimer_timerHandler);
+        bufferingTimer.start();
+    }
+
+    private var bufferingTimer:Timer;

     //--------------------------------------------------------------------------
     //
@@ -486,26 +547,26 @@
     [SkinPart(required="true")]

     /**
-     *  A required skin part that defines the VideoElement.
+     *  A required skin part that defines the VideoDisplay.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var videoElement:VideoElement;
+    public var videoElement:VideoDisplay;

     [SkinPart(required="false")]

     /**
-     *  An optional skin part to display the current playheadTime.
+     *  An optional skin part to display the current currentTime.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var playheadTimeDisplay:TextBase;
+    public var currentTimeDisplay:TextBase;

     [SkinPart(required="false")]

@@ -614,14 +675,14 @@
     [SkinPart(required="false")]

     /**
-     *  An optional skin part to display the totalTime.
+     *  An optional skin part to display the duration.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var totalTimeDisplay:TextBase;
+    public var durationDisplay:TextBase;

     [SkinPart(required="false")]

@@ -669,7 +730,7 @@
     //----------------------------------
     //  enabled
     //----------------------------------
-
+
     /**
      *
      *
@@ -705,7 +766,7 @@
     //----------------------------------
     //  autoPlay
     //----------------------------------
-
+
     [Inspectable(category="General", defaultValue="true")]

     /**
@@ -728,7 +789,7 @@
             return (v === undefined) ? true : v;
         }
     }
-
+
     /**
      * @private
      */
@@ -738,7 +799,7 @@
         {
             videoElement.autoPlay = value;
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        AUTO_PLAY_PROPERTY_FLAG, true);
+                AUTO_PLAY_PROPERTY_FLAG, true);
         }
         else
         {
@@ -768,7 +829,7 @@
         }
         else
         {
-            var v:* = videoElementProperties.autoRewind;
+            var v:* = videoElementProperties.autoRewind
             return (v === undefined) ? true : v;
         }
     }
@@ -782,12 +843,81 @@
         {
             videoElement.autoRewind = value;
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        AUTO_REWIND_PROPERTY_FLAG, true);
+                AUTO_REWIND_PROPERTY_FLAG, true);
         }
         else
         {
             videoElementProperties.autoRewind = value;
         }
+    }
+
+    //----------------------------------
+    //  bytesLoaded
+    //----------------------------------
+
+    [Bindable("currentTimeChanged")]
+    [Inspectable(Category="General", defaultValue="0")]
+
+    /**
+     *  @copy spark.primitives.VideoElement#bytesLoaded
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get bytesLoaded():Number
+    {
+        if (videoElement)
+            return videoElement.bytesLoaded;
+        else
+            return 0;
+    }
+
+    //----------------------------------
+    //  bytesTotal
+    //----------------------------------
+
+    [Inspectable(Category="General", defaultValue="0")]
+
+    /**
+     *  @copy spark.primitives.VideoElement#bytesTotal
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get bytesTotal():Number
+    {
+        if (videoElement)
+            return videoElement.bytesTotal;
+        else
+            return 0;
+    }
+
+    //----------------------------------
+    //  currentTime
+    //----------------------------------
+
+    [Bindable("playheadUpdate")]
+    [Bindable("playheadTimeChanged")]
+    [Inspectable(Category="General", defaultValue="0")]
+
+    /**
+     *  @copy spark.primitives.VideoElement#currentTime
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get currentTime():Number
+    {
+        if (videoElement)
+            return videoElement.currentTime;
+        else
+            return 0;
     }

     //----------------------------------
@@ -835,46 +965,46 @@
     }

     //----------------------------------
-    //  maintainAspectRatio
+    //  scaleMode
     //----------------------------------

     [Inspectable(Category="General", defaultValue="true")]
-
-    /**
-     *  @copy spark.primitives.VideoElement#maintainAspectRatio
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get maintainAspectRatio():Boolean
-    {
-        if (videoElement)
-        {
-            return videoElement.maintainAspectRatio;
-        }
-        else
-        {
-            var v:* = videoElementProperties.maintainAspectRatio;
-            return (v === undefined) ? true : v;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    public function set maintainAspectRatio(value:Boolean):void
-    {
-        if (videoElement)
-        {
-            videoElement.maintainAspectRatio = value;
+
+    /**
+     *  @copy spark.primitives.VideoElement#scaleMode
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get scaleMode():String
+    {
+        if (videoElement)
+        {
+            return videoElement.scaleMode;
+        }
+        else
+        {
+            var v:* = videoElementProperties.scaleMode;
+            return (v === undefined) ? "letterbox" : v;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    public function set scaleMode(value:String):void
+    {
+        if (videoElement)
+        {
+            videoElement.scaleMode = value;
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG, true);
-        }
-        else
-        {
-            videoElementProperties.maintainAspectRatio = value;
+                SCALE_MODE_PROPERTY_FLAG, true);
+        }
+        else
+        {
+            videoElementProperties.scaleMode = value;
         }
     }

@@ -915,7 +1045,7 @@
         {
             videoElement.muted = value;
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        MUTED_PROPERTY_FLAG, true);
+                MUTED_PROPERTY_FLAG, true);
         }
         else
         {
@@ -929,30 +1059,6 @@
     }

     //----------------------------------
-    //  playheadTime
-    //----------------------------------
-
-    [Bindable("playheadUpdate")]
-    [Bindable("playheadTimeChanged")]
-    [Inspectable(Category="General", defaultValue="0")]
-
-    /**
-     *  @copy spark.primitives.VideoElement#playheadTime
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get playheadTime():Number
-    {
-        if (videoElement)
-            return videoElement.playheadTime;
-        else
-            return 0;
-    }
-
-    //----------------------------------
     //  playing
     //----------------------------------

@@ -1018,6 +1124,14 @@
         }
     }

+    override public function setVisible(value:Boolean, noEvent:Boolean=false) : void
+    {
+        super.setVisible(value, noEvent);
+
+        if (videoElement)
+            videoElement.mx_internal::parentVisibility = value;
+    }
+
     //----------------------------------
     //  source
     //----------------------------------
@@ -1045,7 +1159,7 @@
             return (v === undefined) ? null : v;
         }
     }
-
+
     /**
      * @private
      */
@@ -1055,7 +1169,7 @@
         {
             videoElement.source = value;
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        SOURCE_PROPERTY_FLAG, true);
+                SOURCE_PROPERTY_FLAG, true);
         }
         else
         {
@@ -1109,7 +1223,7 @@
     }

     //----------------------------------
-    //  totalTime
+    //  duration
     //----------------------------------

     [Bindable("complete")]
@@ -1118,17 +1232,17 @@
     [Inspectable(Category="General", defaultValue="0")]

     /**
-     *  @copy spark.primitives.VideoElement#totalTime
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get totalTime():Number
-    {
-        if (videoElement)
-            return videoElement.totalTime;
+     *  @copy spark.primitives.VideoElement#duration
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get duration():Number
+    {
+        if (videoElement)
+            return videoElement.duration;
         else
             return 0;
     }
@@ -1170,7 +1284,7 @@
         {
             videoElement.volume = value;
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
-                                                        VOLUME_PROPERTY_FLAG, true);
+                VOLUME_PROPERTY_FLAG, true);
         }
         else
         {
@@ -1186,65 +1300,10 @@

     /**
      *  @private
-     *  We override setVisible so that when we aren't visible, we stop playback of the
-     *  video in certain cases.  We just push this down via parentVisibility to
-     *  VideoElement
-     */
-    override public function setVisible(value:Boolean, noEvent:Boolean=false) : void
-    {
-        super.setVisible(value, noEvent);
-
-        if (videoElement)
-            videoElement.parentVisibility = value;
-    }
-
-    /**
-     *  @private
-     *  Keep track of what the previous state was.  This is because when we're
-     *  figuring out our currentState, we look at 1) whether we're disabled
-     *  2) what our videoPlayer state is 3) what our previous state was
-     */
-    private var previousState:String = VideoState.DISCONNECTED;
-
-    /**
-     *  @private
      */
     override protected function getCurrentSkinState():String
-    {
-        var state:String;
-
-        var currentState:String;
-
-        if (videoElement)
-            currentState = videoElement.videoPlayer.state;
-
-        // only push certain video player states to our skins.
-        // Resizing, rewinding, and execQueuedCmd are ignored,
-        // and that's why we keep track of the previousState, which
-        // is the last state we care about and want to push to our skin
-        switch (currentState)
-        {
-            case VideoState.BUFFERING:
-            case VideoState.LOADING:
-                state = VideoState.LOADING;
-                break;
-            case VideoState.PAUSED:
-                state = VideoState.STOPPED;
-                break;
-            case VideoState.CONNECTION_ERROR:
-            case VideoState.DISCONNECTED:
-            case VideoState.PLAYING:
-            case VideoState.STOPPED:
-            {
-                state = currentState;
-                break;
-            }
-        }
-
-        if (!state)
-            state = previousState;
-        else
-            previousState = state;
+    {
+        var state:String = videoElement.videoPlayer.state.name;

         // now that we have our video player's current state (atleast the one we care about)
         // and that we've set the previous state to something we care about, let's figure
@@ -1266,16 +1325,10 @@
     {
         if (instance == videoElement)
         {
-            videoElement.addEventListener(spark.events.VideoEvent.CLOSE, dispatchEvent);
-            videoElement.addEventListener(spark.events.VideoEvent.COMPLETE, videoElement_completeHandler);
-            videoElement.addEventListener(spark.events.VideoEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
-            videoElement.addEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
-            videoElement.addEventListener(ProgressEvent.PROGRESS, videoElement_progressHandler);
-            videoElement.addEventListener(spark.events.VideoEvent.READY, dispatchEvent);
-            videoElement.addEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);
-            videoElement.addEventListener("playingChanged", videoElement_playingChangedHandler);
-            videoElement.addEventListener("playheadTimeChanged", videoElement_playHeadChangedHandler);
-            videoElement.addEventListener("totalTimeChanged", videoElement_totalTimeChangedHandler);
+            videoElement.addEventListener(PlayheadChangeEvent.PLAYHEAD_CHANGE, videoElement_playHeadChangeHandler);
+            videoElement.addEventListener(BytesDownloadedChangeEvent.BYTES_DOWNLOADED_CHANGE, videoElement_bytesDownloadedChangeHandler);
+            videoElement.addEventListener(MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE, videoElement_mediaPlayerStateChangeHandler);
+            videoElement.addEventListener(DurationChangeEvent.DURATION_CHANGE, videoElement_durationChangeHandler);

             // just strictly for binding purposes
             videoElement.addEventListener("sourceChanged", dispatchEvent);
@@ -1285,33 +1338,32 @@

             var newVideoProperties:uint = 0;

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

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

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

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

             if (videoElementProperties.loop !== undefined)
@@ -1321,18 +1373,18 @@
                     LOOP_PROPERTY_FLAG, true);
             }

-            if (videoElementProperties.maintainAspectRatio !== undefined)
+            if (videoElementProperties.scaleMode !== undefined)
             {
-                videoElement.maintainAspectRatio = videoElementProperties.maintainAspectRatio;
+                videoElement.scaleMode = videoElementProperties.scaleMode;
                 newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                        MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG, true);
+                    SCALE_MODE_PROPERTY_FLAG, true);
             }

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

             if (videoElementProperties.playWhenHidden !== undefined)
@@ -1350,13 +1402,13 @@
             }

             // these are state properties just carried over from an old video element
-            if (videoElementProperties.playheadTime !== undefined ||
+            if (videoElementProperties.currentTime !== undefined ||
                 videoElementProperties.playing !== undefined)
             {
                 videoElement_updateCompleteHandlerProperties = {
                     autoPlay: videoElement.autoPlay,
-                    playing: videoElementProperties.playing,
-                    playheadTime: videoElementProperties.playheadTime};
+                        playing: videoElementProperties.playing,
+                        currentTime: videoElementProperties.currentTime};

                 // so the videoElement doesn't start playing...we'll handle it instead in
                 // videoElement_updateCompleteHandler
@@ -1383,12 +1435,12 @@

             if (scrubBar)
                 updateScrubBar();
-
-            if (playheadTimeDisplay)
-                updatePlayheadTime();
-
-            if (totalTimeDisplay)
-                updateTotalTime();
+
+            if (currentTimeDisplay)
+                updatecurrentTime();
+
+            if (durationDisplay)
+                updateDuration();
         }
         else if (instance == playButton)
         {
@@ -1426,7 +1478,7 @@
                 volumeBar.muted = muted;
             }

-            volumeBar.addEventListener(Event.CHANGE, volumeBar_changeHandler);
+            volumeBar.addEventListener(FlexEvent.VALUE_COMMIT, volumeBar_valueCommitHandler);
             volumeBar.addEventListener(FlexEvent.MUTED_CHANGE, volumeBar_mutedChangeHandler);
         }
         else if (instance == scrubBar)
@@ -1443,15 +1495,15 @@
         {
             fullScreenButton.addEventListener(MouseEvent.CLICK, fullScreenButton_clickHandler);
         }
-        else if (instance == playheadTimeDisplay)
+        else if (instance == currentTimeDisplay)
         {
             if (videoElement)
-                updatePlayheadTime();
-        }
-        else if (instance == totalTimeDisplay)
+                updatecurrentTime();
+        }
+        else if (instance == durationDisplay)
         {
             if (videoElement)
-                updateTotalTime();
+                updateDuration();
         }
     }

@@ -1475,8 +1527,8 @@
         if (videoElement_updateCompleteHandlerProperties.autoPlay)
             videoElement.autoPlay = true;

-        if (videoElement_updateCompleteHandlerProperties.playheadTime !== undefined)
-            videoElement.seek(videoElement_updateCompleteHandlerProperties.playheadTime);
+        if (videoElement_updateCompleteHandlerProperties.currentTime !== undefined)
+            videoElement.seek(videoElement_updateCompleteHandlerProperties.currentTime);

         if (videoElement_updateCompleteHandlerProperties.playing)
             videoElement.play();
@@ -1494,7 +1546,7 @@
         {
             // validate before doing anything with the videoElement.
             // This is so if the video element hasn't been validated, it won't start playing.
-            // plus this way we'll get a valid playheadTime and all those other properties
+            // plus this way we'll get a valid currentTime and all those other properties
             // we are interested in.
             videoElement.validateNow();

@@ -1517,8 +1569,8 @@
             if (BitFlagUtil.isSet(videoElementProperties as uint, LOOP_PROPERTY_FLAG))
                 newVideoProperties.loop = videoElement.loop;

-            if (BitFlagUtil.isSet(videoElementProperties as uint, MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG))
-                newVideoProperties.maintainAspectRatio = videoElement.maintainAspectRatio;
+            if (BitFlagUtil.isSet(videoElementProperties as uint, SCALE_MODE_PROPERTY_FLAG))
+                newVideoProperties.scaleMode = videoElement.scaleMode;

             if (BitFlagUtil.isSet(videoElementProperties as uint, MUTED_PROPERTY_FLAG))
                 newVideoProperties.muted = videoElement.muted;
@@ -1531,23 +1583,17 @@

             // push our current state (where we were in the video and whether we were playing)
             // so that the new skin gets these as well
-            newVideoProperties.playheadTime = videoElement.playheadTime;
+            newVideoProperties.currentTime = videoElement.currentTime;
             newVideoProperties.playing = videoElement.playing;

             videoElement.stop();

             videoElementProperties = newVideoProperties;

-            videoElement.removeEventListener(spark.events.VideoEvent.CLOSE, dispatchEvent);
-            videoElement.removeEventListener(spark.events.VideoEvent.COMPLETE, videoElement_completeHandler);
-            videoElement.removeEventListener(spark.events.VideoEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
-            videoElement.removeEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
-            videoElement.removeEventListener(ProgressEvent.PROGRESS, videoElement_progressHandler);
-            videoElement.removeEventListener(spark.events.VideoEvent.READY, dispatchEvent);
-            videoElement.removeEventListener(fl.video.VideoEvent.STATE_CHANGE, videoElement_stateChangeHandler);
-            videoElement.removeEventListener("playingChanged", videoElement_playingChangedHandler);
-            videoElement.removeEventListener("playheadTimeChanged", videoElement_playHeadChangedHandler);
-            videoElement.removeEventListener("totalTimeChanged", videoElement_totalTimeChangedHandler);
+            videoElement.removeEventListener(PlayheadChangeEvent.PLAYHEAD_CHANGE, videoElement_playHeadChangeHandler);
+            videoElement.removeEventListener(DurationChangeEvent.DURATION_CHANGE, videoElement_durationChangeHandler);
+            videoElement.removeEventListener(BytesDownloadedChangeEvent.BYTES_DOWNLOADED_CHANGE, videoElement_bytesDownloadedChangeHandler);
+            videoElement.removeEventListener(MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE, videoElement_mediaPlayerStateChangeHandler);

             // just strictly for binding purposes
             videoElement.removeEventListener("sourceChanged", dispatchEvent);
@@ -1575,7 +1621,7 @@
         }
         else if (instance == volumeBar)
         {
-            volumeBar.removeEventListener(Event.CHANGE, volumeBar_changeHandler);
+            volumeBar.removeEventListener(FlexEvent.VALUE_COMMIT, volumeBar_valueCommitHandler);
             volumeBar.removeEventListener(FlexEvent.MUTED_CHANGE, volumeBar_mutedChangeHandler);
         }
         else if (instance == scrubBar)
@@ -1583,7 +1629,7 @@
             scrubBar.removeEventListener(TrackBaseEvent.THUMB_PRESS, scrubBar_thumbPressHandler);
             scrubBar.removeEventListener(TrackBaseEvent.THUMB_RELEASE, scrubBar_thumbReleaseHandler);
             scrubBar.removeEventListener(Event.CHANGE, scrubBar_changeHandler);
-            scrubBar.removeEventListener("changing", scrubBar_changingHandler);
+            scrubBar.removeEventListener(FlexEvent.CHANGING, scrubBar_changingHandler);
         }
         else if (instance == fullScreenButton)
         {
@@ -1672,25 +1718,25 @@
         if (!scrubBarMouseCaptured && !scrubBarChanging)
         {
             scrubBar.minimum = 0;
-            scrubBar.maximum = isNaN(videoElement.totalTime) ? 0 : videoElement.totalTime;
-            scrubBar.value = isNaN(videoElement.playheadTime) ? 0 : videoElement.playheadTime;
+            scrubBar.maximum = videoElement.duration;
+            scrubBar.value = videoElement.currentTime;
         }

         scrubBar.bufferedStart = 0;
-        scrubBar.bufferedEnd = videoElement.videoPlayer.bytesLoaded/videoElement.videoPlayer.bytesTotal * videoElement.totalTime;
-    }
-
-   /**
-    *  @private
-    */
-    private function updateTotalTime():void
-    {
-        totalTimeDisplay.text = formatTimeValue(totalTime);
+        scrubBar.bufferedEnd = (videoElement.bytesLoaded/videoElement.bytesTotal)*videoElement.duration;
+    }
+
+    /**
+     *  @private
+     */
+    private function updateDuration():void
+    {
+        durationDisplay.text = formatTimeValue(duration);
     }

     /**
      *  Formats a time value, given in seconds, into a string that
-     *  gets used for the playheadTimeDisplay and the totalTimeDisplay.
+     *  gets used for the currentTimeDisplay and the durationDisplay.
      *
      *  @param value Value in seconds of the time to format
      *
@@ -1698,9 +1744,6 @@
      */
     protected function formatTimeValue(value:Number):String
     {
-        if (isNaN(value))
-            value = 0;
-
         // default format: hours:minutes:seconds
         var hours:uint = Math.floor(value/3600) % 24;
         var minutes:uint = Math.floor(value/60) % 60;
@@ -1722,13 +1765,13 @@

         return result;
     }
-
-    /**
-     *  @private
-     */
-    private function updatePlayheadTime():void
-    {
-        playheadTimeDisplay.text = formatTimeValue(playheadTime);
+
+    /**
+     *  @private
+     */
+    private function updatecurrentTime():void
+    {
+        currentTimeDisplay.text = formatTimeValue(currentTime);
     }

     //--------------------------------------------------------------------------
@@ -1736,29 +1779,17 @@
     //  Event handlers
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private function videoElement_completeHandler(event:spark.events.VideoEvent):void
-    {
-        // FIXME (rfrishbe): needed??
-        if (totalTimeDisplay)
-            updateTotalTime();
-
-        dispatchEvent(event);
-    }
-
-    /**
-     *  @private
-     */
-    private function videoElement_metaDataReceivedHandler(event:spark.events.VideoEvent):void
+
+    /**
+     *  @private
+     */
+    private function videoElement_playHeadChangeHandler(event:PlayheadChangeEvent):void
     {
         if (scrubBar)
             updateScrubBar();

-        if (totalTimeDisplay)
-            updateTotalTime();
+        if (currentTimeDisplay)
+            updatecurrentTime();

         dispatchEvent(event);
     }
@@ -1766,75 +1797,45 @@
     /**
      *  @private
      */
-    private function videoElement_playHeadChangedHandler(event:Event):void
+    private function videoElement_bytesDownloadedChangeHandler(event:BytesDownloadedChangeEvent):void
     {
         if (scrubBar)
             updateScrubBar();

-        if (playheadTimeDisplay)
-            updatePlayheadTime();
-
-        // for binding purposes
         dispatchEvent(event);
     }

     /**
      *  @private
      */
-    private function videoElement_totalTimeChangedHandler(event:Event):void
-    {
+    private function videoElement_mediaPlayerStateChangeHandler(event:MediaPlayerStateChangeEvent):void
+    {
+        invalidateSkinState();
+
         if (scrubBar)
             updateScrubBar();

-        if (totalTimeDisplay)
-            updateTotalTime();
-
-        // for binding purposes
+        if (durationDisplay)
+            updateDuration();
+
+        if (playPauseButton)
+            playPauseButton.selected = playing;
+
         dispatchEvent(event);
     }

     /**
      *  @private
      */
-    private function videoElement_playHeadUpdateHandler(event:spark.events.VideoEvent):void
+    private function videoElement_durationChangeHandler(event:DurationChangeEvent):void
     {
         if (scrubBar)
             updateScrubBar();

-        if (playheadTimeDisplay)
-            updatePlayheadTime();
+        if (durationDisplay)
+            updateDuration();

         dispatchEvent(event);
-    }
-
-    /**
-     *  @private
-     */
-    private function videoElement_progressHandler(event:ProgressEvent):void
-    {
-        if (scrubBar)
-            updateScrubBar();
-
-        dispatchEvent(event);
-    }
-
-    /**
-     *  @private
-     */
-    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;
     }

     /**
@@ -1896,9 +1897,6 @@
             // need it to go into full screen state for the skin
             invalidateSkinState();

-            // keep track of playWhenHidden b/c we will set it to true temporarily
-            // so that the video does not pause when we reparent it to the top
-            // level application
             var oldPlayWhenHidden:Boolean = playWhenHidden;

             // let's get it off of our layout system so it doesn't interfere with
@@ -1906,13 +1904,13 @@
             // the full size of our screen.  Then let's position it off-screen so
             // there are no other elements in the way.
             beforeFullScreenInfo = {parent: this.parent,
-                                    x: this.x,
-                                    y: this.y,
-                                    width: this.getPreferredBoundsWidth(false),
-                                    height: this.getPreferredBoundsHeight(false),
-                                    smoothing: videoElement.videoPlayer.smoothing,
-                                    deblocking: videoElement.videoPlayer.deblocking,
-                                    includeInLayout: this.includeInLayout};
+                x: this.x,
+                y: this.y,
+                width: this.getPreferredBoundsWidth(false),
+                height: this.getPreferredBoundsHeight(false),
+//                smoothing: videoElement.videoPlayer.smoothing,
+//                deblocking: videoElement.videoPlayer.deblocking,
+                includeInLayout: this.includeInLayout};
             includeInLayout = false;
             playWhenHidden = true;

@@ -1944,8 +1942,8 @@
             invalidateDisplayList();

             // this is for video performance reasons
-            videoElement.videoPlayer.smoothing = false;
-            videoElement.videoPlayer.deblocking = 0;
+//            videoElement.videoPlayer.smoothing = false;
+//            videoElement.videoPlayer.deblocking = 0;

             this.validateNow();

@@ -2025,9 +2023,6 @@
         if (event.fullScreen)
             return;

-        // keep track of playWhenHidden b/c we will set it to true temporarily
-        // so that the video does not pause when we reparent it to its original
-        // parent
         var oldPlayWhenHidden:Boolean = playWhenHidden;
         playWhenHidden = true;

@@ -2052,8 +2047,8 @@
         this.y = beforeFullScreenInfo.y;
         this.setLayoutBoundsSize(beforeFullScreenInfo.width, beforeFullScreenInfo.height);

-        videoElement.videoPlayer.smoothing = beforeFullScreenInfo.smoothing;
-        videoElement.videoPlayer.deblocking = beforeFullScreenInfo.deblocking;
+//        videoElement.videoPlayer.smoothing = beforeFullScreenInfo.smoothing;
+//        videoElement.videoPlayer.deblocking = beforeFullScreenInfo.deblocking;

         // remove from top level application:
         if (parent is IVisualElementContainer)
@@ -2129,7 +2124,7 @@
     /**
      *  @private
      */
-    private function volumeBar_changeHandler(event:Event):void
+    private function volumeBar_valueCommitHandler(event:Event):void
     {
         volume = volumeBar.value;
     }
@@ -2202,26 +2197,15 @@
      */
     private function scrubBar_changeHandler(event:Event):void
     {
-        if (scrubBarMouseCaptured)
-        {
-            videoElement.videoPlayer.flvplayback_internal::flushQueuedCmds();
-
-            // check if streaming and play()...then don't seek to last value
-            if (videoElement.videoPlayer.isRTMP && !(source is StreamingVideoSource) && scrubBar.value == totalTime)
-            {
-                seek(Math.max(0, scrubBar.value-0.5));
-            }
-            else
-            {
-                seek(scrubBar.value);
-            }
-        }
-        else
-        {
-            seek(scrubBar.value);
-        }
+        seek(scrubBar.value);

         scrubBarChanging = false;
+    }
+
+    private function bufferingTimer_timerHandler(event:TimerEvent):void
+    {
+        if (videoElement && scrubBar)
+            updateScrubBar();
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3020
Author:   hmuller@adobe.com
Date:     2008-08-27T23:15:11.883082Z

Log Message:
-----------
Group/Viewport changes per feedback from the kick-off meeting.

Group contentWidth,Height properties are now read-only.  Layouts
must set them with new method Group::setContentSize().

Layouts call setContentSize at both measure and updateDisplayList
time.  Doing so at measure time may be unnecessary although
the measured size of scrollbar thumbs can depend indirectly on
a Group's content size.

Group now updates its own scrollRect at updateDisplayList time, rather
than having each layout do so

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -347,11 +347,10 @@
         layoutTarget.measuredWidth = preferredWidth;
         layoutTarget.measuredHeight = (explicitRowCount == -1) ? preferredHeight : visibleHeight;

-        layoutTarget.contentWidth = preferredWidth;
-        layoutTarget.contentHeight = preferredHeight;
-
         layoutTarget.measuredMinWidth = minWidth;
         layoutTarget.measuredMinHeight = minHeight;
+
+        layoutTarget.setContentSize(preferredWidth, preferredHeight);
     }

@@ -392,12 +391,11 @@

         layoutTarget.measuredWidth = columnWidth;
         layoutTarget.measuredHeight = visibleHeight;
-
-        layoutTarget.contentWidth = columnWidth;
-        layoutTarget.contentHeight = contentHeight;

         layoutTarget.measuredMinWidth = minColumnWidth;
         layoutTarget.measuredMinHeight = rowHeight;
+
+        layoutTarget.setContentSize(columnWidth, contentHeight);
     }

@@ -453,21 +451,25 @@

         // Finally, position the objects
         var y:Number = 0;
+        var maxX:Number = 0;
+        var maxY:Number = 0;
         for each (var lo:ILayoutItem in layoutItemArray)
         {
             var x:Number = (unscaledWidth - lo.actualSize.x) * hAlign;
             lo.setActualPosition(x, y);
+            var dx:Number = lo.actualSize.x;
             if (!variableRowHeight)
-                lo.setActualSize(lo.actualSize.x, rowHeight);
+                lo.setActualSize(dx, rowHeight);
             var dy:Number = lo.actualSize.y;
+            maxX = Math.max(maxX, x + dx);
+            maxY = Math.max(maxY, y + dy);
             if ((explicitRowCount == -1) && (y < maxVisibleY) && ((y + dy) > minVisibleY))
             	visibleRows += 1;
             y += dy + gap;
         }
         if (explicitRowCount == -1)
         	setRowCount(visibleRows);
-
-        BasicLayout.setScrollRect(layoutTarget, unscaledWidth, unscaledHeight);
+        layoutTarget.setContentSize(maxX, maxY);
     }


minor fixes

minor fixes

--- src/aerys/minko/render/shader/background/BackgroundLayerShader.as
+++ src/aerys/minko/render/shader/background/BackgroundLayerShader.as
@@ -1,17 +1,16 @@
 package aerys.minko.render.shader.background
 {
 	import aerys.minko.render.RenderTarget;
-	import aerys.minko.render.material.basic.BasicShader;
 	import aerys.minko.render.shader.SFloat;
+	import aerys.minko.render.shader.Shader;
 	import aerys.minko.render.shader.part.DiffuseShaderPart;

-	public class BackgroundLayerShader extends BasicShader
+	public class BackgroundLayerShader extends Shader
 	{
 		private static const ZMAX	: Number	= 1. - 1e-7;

         private var _diffuse    : DiffuseShaderPart;
-        private var _uv         : SFloat;
-
+
 		public function BackgroundLayerShader(target : RenderTarget = null)
 		{
 			super(target, 0.);
@@ -21,14 +20,17 @@

 		override protected function getVertexPosition() : SFloat
 		{
-			return float4(sign(vertexXYZ.xy), ZMAX, 1);
+			return float4(multiply(vertexXYZ.xy, 2), ZMAX, 1);
 		}

 		override protected function getPixelColor() : SFloat
 		{
-            var uv : SFloat = interpolate(divide(add(sign(vertexXYZ.xy), 1), 2));
+            var uv : SFloat = interpolate(float2(
+		        divide(add(multiply(vertexXYZ.x, 2), 1), 2),
+		        divide(add(multiply(vertexXYZ.x, 2), 1), 2)
+            ));

-            return _diffuse.getDiffuseColor(false, uv);
+            return _diffuse.getDiffuseColor(false, interpolate(vertexUV));
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateFilterInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateFilterInstance.as
@@ -9,11 +9,11 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.effects.effectClasses
+package spark.effects.supportClasses
 {

 import mx.filters.IBitmapFilter;
-import mx.effects.FxAnimateFilter;
+import spark.effects.AnimateFilter;

 /**
  * The AnimateFilterInstance class implements the instance class for the
@@ -25,7 +25,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class FxAnimateFilterInstance extends FxAnimateInstance
+public class AnimateFilterInstance extends AnimateInstance
 {
     //--------------------------------------------------------------------------
     //
@@ -41,7 +41,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function FxAnimateFilterInstance(target:Object)
+    public function AnimateFilterInstance(target:Object)
     {
         super(target);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2971
Author:   clucier@adobe.com
Date:     2008-08-23T20:56:35.601535Z

Log Message:
-----------
Preliminary work to support Pixel Bender shaders as filters in Flex, as well as a Filter Animator, to allow for
Pixel Bender based filters (and others) to be animated during effect sequences. Checking in for safe keeping.
Reviewer: Glenn, Chet
QA: Not Yet, Minispec review/signoff pending.
Docs: NA, Minispec review/signoff pending.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimateFilterInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/AnimateFilter.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateFilterInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateFilterInstance.as
@@ -0,0 +1,123 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package flex.effects.effectClasses
+{
+
+import mx.filters.IBitmapFilter;
+import flex.effects.AnimateFilter;
+import flex.filters.ShaderFilter;
+
+/**
+ * The AnimateFilterInstance class implements the instance class for the
+ * AnimateFilter effect. Flex creates an instance of this class when
+ * it plays a AnimateFilter effect; you do not create one yourself.
+ */
+public class AnimateFilterInstance extends AnimateInstance
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function AnimateFilterInstance(target:Object)
+    {
+        super(target);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  bitmapFilter
+    //----------------------------------
+
+    /**
+     * IBitmapFilter instance to apply and animate.
+     */
+    public var bitmapFilter:IBitmapFilter;
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.effects.IEffectInstance#startEffect()
+     */
+    override public function startEffect():void
+    {
+        // Apply our filter instance.
+        var filters:Array = target.filters;
+        filters.push(bitmapFilter);
+        target.filters = filters;
+        super.startEffect();
+    }
+
+    /**
+     *  @copy mx.effects.IEffectInstance#finishEffect()
+     */
+    override public function finishEffect():void
+    {
+        // Locate and remove our filter instance
+        var filters:Array = target.filters;
+        for (var i:int = 0; i < filters.length; i++)
+        {
+            if (filters[i] == bitmapFilter)
+            {
+                filters.splice(i, 1);
+                break;
+            }
+        }
+
+        // Refresh filter stack.
+        target.filters = filters;
+
+        super.finishEffect();
+    }
+
+    /**
+     * Unlike Animate's setValue we assign the new value to the filter
+     * associated with our effect instance rather than the target of
+     * the effect.
+     *
+     * @private
+     */
+    override protected function setValue(property:String, value:Object):void
+    {
+        if (roundValues && (value is Number))
+            value = Math.round(Number(value));
+
+        bitmapFilter[property] = value;
+    }
+
+    /**
+     * Unlike Animate's getValue we return the value of the property requested
+     * from the filter associated with our effect instance rather than
+     * the effect target.
+     *
+     * @private
+     */
+    override protected function getCurrentValue(property:String):Number
+    {
+        return bitmapFilter[property];
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7036
Author:   jimurphy@adobe.com
Date:     2009-05-18T16:23:35.783417Z

Log Message:
-----------
Merged 3.x revisions 6955,6995,6997-7002 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RichTextEditor.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ColorPicker.as
+++ frameworks/projects/mx/src/mx/controls/ColorPicker.as
@@ -1790,7 +1790,7 @@

         UIComponent.resumeBackgroundProcessing();

-        if (showingDropdown)
+        if (showingDropdown && showTextField)
             dropdownSwatch.setFocus();
         else
             setFocus();


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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewReturnObject.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewReturnObject.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Update src/aerys/minko/scene/node/AbstractSceneNode.as

BUG:scaleY

--- src/aerys/minko/scene/node/AbstractSceneNode.as
+++ src/aerys/minko/scene/node/AbstractSceneNode.as
@@ -112,7 +112,7 @@

         final public function get scaleY() : Number
 		{
-			return _transform.scaleX;
+			return _transform.scaleY;
 		}
         final public function set scaleY(value : Number) : void
 		{


HLSProviderChromeless.swf:  fix NaN buffer reported when switching in fullscreen mode when switching to FullScreen, sometimes StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY listener is triggered. remove this listener after its first trigger to avoid reinstanciating HLS instance

--- src/org/mangui/chromeless/ChromelessPlayer.as
+++ src/org/mangui/chromeless/ChromelessPlayer.as
@@ -343,6 +343,7 @@
                 _video.smoothing = true;
                 _video.attachNetStream(_hls.stream);
             }
+            stage.removeEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, _onStageVideoState);
         };

         private function _onStageResize(event : Event) : void {


add logs about video decoding status

add logs about video decoding status

related to #66

--- src/org/mangui/chromeless/ChromelessPlayer.as
+++ src/org/mangui/chromeless/ChromelessPlayer.as
@@ -431,6 +431,7 @@
                 _stageVideo.attachNetStream(_hls.stream);
             } else {
                 _video = new Video(stage.stageWidth, stage.stageHeight);
+                _video.addEventListener(StageVideoEvent.RENDER_STATE, _onStageVideoStateChange);
                 addChild(_video);
                 _video.smoothing = true;
                 _video.attachNetStream(_hls.stream);


Исправление ошибки

Исправление ошибки

--- src/main/org/shypl/common/assets/AtlasLoader.as
+++ src/main/org/shypl/common/assets/AtlasLoader.as
@@ -4,7 +4,7 @@
 	import org.shypl.common.loader.FileLoader;
 	import org.shypl.common.loader.ImageReceiver;
 	import org.shypl.common.loader.XmlReceiver;
-	import org.shypl.common.util.FilePath;
+	import org.shypl.common.util.FilePathUtils;
 	import org.shypl.common.util.progress.Progress;

 	public class AtlasLoader implements Progress, XmlReceiver, ImageReceiver {
@@ -35,7 +35,7 @@
 			_xml = xml;
 			var imagePath:String = _xml.attribute("imagePath");
 			if (imagePath.indexOf("/") !== 0 && imagePath.indexOf("://") === -1) {
-				imagePath = FilePath.factory(_asset.path).resolveSibling(imagePath).toString();
+				imagePath = FilePathUtils.resolveSibling(_asset.path, imagePath).toString();
 			}
 			FileLoader.loadImage(imagePath, this);
 		}


New optimized sort algorithm.  Tested to be faster & more accurate.

--- src/as3isolib/display/renderers/DefaultSceneLayoutRenderer.as
+++ src/as3isolib/display/renderers/DefaultSceneLayoutRenderer.as
@@ -1,103 +1,132 @@
-/*
-
-as3isolib - An open-source ActionScript 3.0 Isometric Library developed to assist
-in creating isometrically projected content (such as games and graphics)
-targeted for the Flash player platform
-
-http://code.google.com/p/as3isolib/
-
-Copyright (c) 2006 - 2008 J.W.Opitz, All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-*/
-package as3isolib.display.renderers
-{
-	import as3isolib.bounds.IBounds;
-	import as3isolib.core.IIsoDisplayObject;
-	import as3isolib.core.as3isolib_internal;
-	import as3isolib.display.scene.IIsoScene;
-
-	use namespace as3isolib_internal;
-
-	/**
-	 * The DefaultSceneLayoutRenderer is the default renderer responsible for performing the isometric position-based depth sorting on the child objects of the target IIsoScene.
-	 */
-	public class DefaultSceneLayoutRenderer implements ISceneLayoutRenderer
-	{
-		////////////////////////////////////////////////////
-		//	RENDER SCENE
-		////////////////////////////////////////////////////
-
-		/**
-		 * @inheritDoc
-		 */
-		public function renderScene (scene:IIsoScene):void
-		{
-			var children:Array = scene.displayListChildren.slice();
-			children.sort(isoDepthSort, Array.NUMERIC);
-
-			var child:IIsoDisplayObject;
-
-			var i:uint;
-			var m:uint = children.length;
-			while (i < m)
-			{
-				child = IIsoDisplayObject(children[i]);
-				if (child.depth != i)
-					scene.setChildIndex(child, i);
-
-				i++;
-			}
-		}
-
-		////////////////////////////////////////////////////
-		//	SORT
-		////////////////////////////////////////////////////
-
-		private function isoDepthSort (childA:Object, childB:Object):int
-		{
-			var boundsA:IBounds = childA.isoBounds;
-			var boundsB:IBounds = childB.isoBounds;
-
-			if (boundsA.right <= boundsB.left)
-				return -1;
-
-			else if (boundsA.front <= boundsB.back)
-				return -1;
-
-			else if (boundsA.top <= boundsB.bottom)
-				return -1;
-
-			else if (boundsA.left >= boundsB.right)
-				return 1;
-
-			else if (boundsA.back >= boundsB.front)
-				return 1;
-
-			else if (boundsA.bottom >= boundsB.top)
-				return 1;
-
-
-
-			else
-				return 0;
-		}
-	}
-}+/*
+
+as3isolib - An open-source ActionScript 3.0 Isometric Library developed to assist
+in creating isometrically projected content (such as games and graphics)
+targeted for the Flash player platform
+
+http://code.google.com/p/as3isolib/
+
+Copyright (c) 2006 - 2008 J.W.Opitz, All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+*/
+package as3isolib.display.renderers
+{
+	import as3isolib.bounds.IBounds;
+	import as3isolib.core.IIsoDisplayObject;
+	import as3isolib.core.as3isolib_internal;
+	import as3isolib.core.IsoDisplayObject;
+	import as3isolib.display.scene.IIsoScene;
+
+	import flash.utils.getTimer;
+
+	use namespace as3isolib_internal;
+
+	/**
+	 * The DefaultSceneLayoutRenderer is the default renderer responsible for performing the isometric position-based depth sorting on the child objects of the target IIsoScene.
+	 */
+	public class DefaultSceneLayoutRenderer implements ISceneLayoutRenderer
+	{
+		////////////////////////////////////////////////////
+		//	RENDER SCENE
+		////////////////////////////////////////////////////
+
+		/**
+		 * @inheritDoc
+		 */
+		public function renderScene (scene:IIsoScene):void
+		{
+			var startTime:uint = getTimer();
+
+			// Rewrite by David Holz
+
+			// NOTE - Flash player 10 only
+			// Using scene.children because they are in last display order, scene.displayListChildren are unordered and fully resorted every time!
+			var sortedChildren:Vector.<IIsoDisplayObject> = Vector.<IIsoDisplayObject>(scene.children);
+
+			// Flash player 9
+			//var sortedChildren:Array = scene.children.slice();
+
+			// Ocean sort, from http://cadaver.homeftp.net/rants/sprite.htm
+			// Starting from offset 1, make sure [N] >= [N-1].  If not, keep pushing N back in the list until it's >= the new [N-1]
+			// This sort works best when there are minor changes to the depth ordering that need to be patched up
+
+			// All of the aditional variables are to reduce the number of array accesses, which are all bounds checked by the VM.  Each removed array access lopped more time off the render.
+			var max:uint = sortedChildren.length;
+			var objB:IIsoDisplayObject = sortedChildren[0];
+			var boundsB:IBounds = objB.isoBounds;
+			for (var i:uint = 1; i < max; ++i)
+			{
+				var j:uint = i;
+
+				var objA:IIsoDisplayObject = sortedChildren[i];
+				var boundsA:IBounds = objA.isoBounds;
+
+				// There are many instances where 2 blocks can be ordered A->B in one axis, and B->A in the other
+				// We need to determine a priority order for comparing, so that they won't just toggle getting behind each other from frame to frame.
+				// Also, these mutual behindednesses can lead to the painter's algorithm type of problems and break visual sorting order.
+
+				// See if objA is behind objB, which would be out of place
+				if((boundsA.top <= boundsB.bottom) || // if A is under B, then process
+				   (!(boundsA.bottom >= boundsB.top) && // else, if A is _known not to be over B_ and ...
+				    ((boundsA.right <= boundsB.left) || // if A is left of B, then process
+					 (!(boundsA.left >= boundsB.right) && // else, if A is _known not to be right of B_ and ...
+					  (boundsA.front <= boundsB.back))))) // if A is back of B, then process
+				{
+					// This should be faster than 2 calls to splice(), since those 2 calls would shuffle all the way to the end of the Vector.
+					// This code only shifts the affected indexes
+					do
+					{
+						sortedChildren[j] = objB;
+						--j;
+						if (0 == j)
+							break;
+						objB = sortedChildren[j - 1];
+						boundsB = objB.isoBounds;
+					}
+					while ((boundsA.top <= boundsB.bottom) || // if A is under B, then process
+				           (!(boundsA.bottom >= boundsB.top) && // else, if A is _known not to be over B_ and ...
+				            ((boundsA.right <= boundsB.left) || // if A is left of B, then process
+					         (!(boundsA.left >= boundsB.right) && // else, if A is _known not to be right of B_ and ...
+					          (boundsA.front <= boundsB.back))))) // if A is back of B, then process
+
+					//trace("moved", i, dumpBounds(boundsA), "to", j, dumpBounds(sortedChildren[j+1].isoBounds));
+
+					// Update the display order of this moved object
+					sortedChildren[j] = objA;
+					scene.setChildIndex(objA, j);
+				}
+				objB = objA;
+				boundsB = boundsA;
+			}
+
+			// DEBUG OUTPUT
+
+			//trace("--------------------");
+			//for (i = 0; i < max; ++i)
+			//	trace(dumpBounds(sortedChildren[i].isoBounds));
+
+			trace("scene layout render time", getTimer() - startTime, "ms (manual sort)");
+		}
+
+		//static private function dumpBounds(b:IBounds):String { return "[" + b.left + ".." + b.right + "," + b.back + ".." + b.front + "," + b.bottom + ".." + b.top + "]"; }
+
+	}
+}


Updated NodeSprite property setters to use IEvaluable

git-svn-id: 6aa7ccb0a2048310a30f08a72aaff4ca39d980ed@175 91848ab2-c4ae-4e4f-8e6a-6a52ea0dccc3

--- flare/src/flare/vis/data/NodeSprite.as
+++ flare/src/flare/vis/data/NodeSprite.as
@@ -3,6 +3,7 @@
 	import flare.animate.Transitioner;
 	import flare.query.Expression;
 	import flare.util.Arrays;
+	import flare.util.IEvaluable;
 	import flare.util.Property;
 	import flare.util.Sort;
 	import flare.vis.util.Filters;
@@ -510,10 +511,9 @@
 			var t:Transitioner = Transitioner.instance(trans);
 			for (var name:String in vals) {
 				var val:* = vals[name];
-				var p:Property = val as Property;
-				var e:Expression = val as Expression;
+				var e:IEvaluable = val as IEvaluable;
 				visitEdges(function(s:EdgeSprite):void {
-					val = p ? p.getValue(t.$(s)) : e ? e.eval(t.$(s)) : val;
+					val = e ? e.eval(t.$(s)) : val;
 					t.setValue(s, name, val);
 				}, opt, filter);
 			}
@@ -539,10 +539,9 @@
 			var t:Transitioner = Transitioner.instance(trans);
 			for (var name:String in vals) {
 				var val:* = vals[name];
-				var p:Property = val as Property;
-				var e:Expression = val as Expression;
+				var e:IEvaluable = val as IEvaluable;
 				visitNodes(function(n:NodeSprite):void {
-					val = p ? p.getValue(t.$(n)) : e ? e.eval(t.$(n)) : val;
+					val = e ? e.eval(t.$(n)) : val;
 					t.setValue(n, name, val);
 				}, opt, filter);
 			}


improve randomness of random aes key generation by seeding with passphrase hash

--- KeyGenerator.as
+++ KeyGenerator.as
@@ -1,13 +1,16 @@
 package dse{
+	import com.hurlant.crypto.Crypto;
+	import com.hurlant.crypto.hash.IHash;
 	import com.hurlant.crypto.prng.Random;
 	import com.hurlant.crypto.rsa.RSAKey;
 	import com.hurlant.util.Hex;

 	import flash.external.ExternalInterface;
 	import flash.utils.ByteArray;
+
 	public class KeyGenerator
 	{
-		public static function generateKeys():void{
+		public static function generateKeys(passphrase:String):void{
 			var exp:String = "10001";
 			var rsa:RSAKey = RSAKey.generate(1024, exp);
 			ExternalInterface.call("setvalue", "publickey", rsa.n.toString());
@@ -20,7 +23,16 @@

 			var r:Random = new Random;
 			var rankey:ByteArray = new ByteArray; var discard:ByteArray = new ByteArray;
-			r.nextBytes(discard, 32);
+
+			//incorporate passphrase into seeding process
+			var hash:IHash = Crypto.getHash("sha256");
+			var p:ByteArray = hash.hash(Hex.toArray(Hex.fromString(passphrase)));
+			r.autoSeed();
+			while (p.bytesAvailable>=4) {
+				r.seed(p.readUnsignedInt());
+			}
+
+			r.nextBytes(discard, 1024);
 			r.nextBytes(rankey, 32);
 			ExternalInterface.call("setvalue", "rk", Hex.fromArray(rankey));
 		}


Wait a little longer before bailing

Wait a little longer before bailing

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

--- mustella/as3/src/mustella/UnitTester.as
+++ mustella/as3/src/mustella/UnitTester.as
@@ -1183,7 +1183,7 @@
 				lastPendingOutput = pendingOutput;
 			if (pendingOutput == lastPendingOutput)
 			{
-				if (frameWaitCount < 4) // wait about 3 frames to see if results come back
+				if (frameWaitCount < 10) // wait about 10 frames to see if results come back
 				{
 					trace("waiting on pending output", pendingOutput);
 					frameWaitCount++;


Change signature of PropertyUtil.copyArrayCollection() method.

--- dolly-framework/src/main/actionscript/dolly/utils/PropertyUtil.as
+++ dolly-framework/src/main/actionscript/dolly/utils/PropertyUtil.as
@@ -19,8 +19,8 @@
 				new ArrayList();
 	}

-	dolly_internal static function copyArrayCollection(targetObj:*, propertyName:String, sourceProperty:*):void {
-		const arrayCollection:ArrayCollection = (sourceProperty as ArrayCollection);
+	dolly_internal static function copyArrayCollection(sourceObj:*, targetObj:*, propertyName:String):void {
+		const arrayCollection:ArrayCollection = sourceObj[propertyName];
 		targetObj[propertyName] = arrayCollection.source ?
 				new ArrayCollection(arrayCollection.source.slice()) :
 				new ArrayCollection();
@@ -44,7 +44,7 @@
 		}

 		if (sourceProperty is ArrayCollection) {
-			copyArrayCollection(targetObj, propertyName, sourceProperty);
+			copyArrayCollection(sourceObj, targetObj, propertyName);
 			return;
 		}

@@ -65,7 +65,7 @@
 		}

 		if (sourceProperty is ArrayCollection) {
-			copyArrayCollection(targetObj, propertyName, sourceProperty);
+			copyArrayCollection(sourceObj, targetObj, propertyName);
 			return;
 		}


Added LF and CR as ilegal characters

Added LF and CR as ilegal characters


Transferred from the Adobe Open Source Subversion Repository

Revision: 12469
Author:   jimurphy@adobe.com
Date:     2009-12-03T22:04:16.560316Z

Log Message:
-----------
fix offsets for FB.  Convert line ending from lf to crlf in svn for the proects directory only.  When checking project files in, be sure to save you files this way.  Another update to make sure happens is set the svn properties svn:eol-style = native and svn:mime-type = text/plain (these have been updated on theses files as well)

QE notes: make sure the proper class is selected
Doc notes: no
Bugs: http://bugs.adobe.com/jira/browse/SDK-24498
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
133 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as
@@ -332,4 +332,4 @@
     }

 }
-}+}


FIX  FLEX-33166 Mobile TextInput with native StageTextInput cannot be included in scrollable forms
- fixed issue when moving from one text input to another, the sof keyboard now does not "flicker"
- to fix the above issue, has to start TI edition on mousedown instead of mouseclick (like in StyleableStageText)
- fix above (because of the change above) => TI cannot initiate a touch scroll (you have to click oustide)

Mustella tests PASS:
Mobile/components/TextInput
Mobile/components/TextArea
Mobile/Softkeyboard

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
@@ -47,6 +47,7 @@
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
+import mx.events.TouchInteractionEvent;
 import mx.managers.FocusManager;
 import mx.managers.SystemManager;
 import mx.utils.MatrixUtil;
@@ -1368,11 +1369,10 @@
     override public function setFocus():void
     {
         // if mouse is down, let SetFocus   handle the focus, otherwise it's programmatic, so assign focus
-        if (isMouseDown)
-        {
-
+  /*      if (isMouseDown)
+        {
             return;
-        }
+        }*/
         if (stageText != null)
         {
             stageText.assignFocus();      // will trigger stageTextfocusIn
@@ -1516,7 +1516,10 @@
      * EDITING AND FOCUS MANAGEMENT
      */

-    protected function startTextEdit():void
+    /**
+     * @return true if editing was actually stated,, false is already started
+     * */
+    protected function startTextEdit():Boolean
     {
         if (!isEditing)
         {
@@ -1525,10 +1528,17 @@
             proxy.visible = false;
             updateViewPort();
             stageText.visible = true;
-        }
-    }
-
-    protected function endTextEdit():void
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+    /**
+     * @return true if editing was actually ended, false is already ended
+     * */
+    protected function endTextEdit():Boolean
     {
         if (isEditing)
         {
@@ -1546,6 +1556,10 @@
                 if (lastFocus && lastFocus.hasOwnProperty("textDisplay") && lastFocus.textDisplay == this)
                     fm.lastFocus = null;
             }
+            return true;
+        }
+        else {
+            return false;
         }
     }

@@ -1779,9 +1793,8 @@
         // always create proxy image

         // register listeners
-        addEventListener(MouseEvent.CLICK, mouseClickHandler);
         addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
-        addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+        addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_STARTING, touchStartingHandler);
         if (stageText != null)
         {
             stageText.addEventListener(Event.CHANGE, stageText_changeHandler);
@@ -1808,10 +1821,8 @@

         stageText.stage = null;
-       removeEventListener(MouseEvent.CLICK, mouseClickHandler);
        removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
-       removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
-
+        addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_STARTING, touchStartingHandler);
         stageText.removeEventListener(Event.CHANGE, stageText_changeHandler);
         stageText.removeEventListener(Event.COMPLETE, stageText_completeHandler);
         stageText.removeEventListener(FocusEvent.FOCUS_IN, stageText_focusInHandler);
@@ -1837,17 +1848,16 @@

     private function mouseDownHandler(event:MouseEvent):void
     {
-        isMouseDown = true;
-    }
-
-    private function mouseUpHandler(event:MouseEvent):void
-    {
-        isMouseDown = false;
-    }
-
-    private function mouseClickHandler(event:MouseEvent):void
-    {
         setFocus();
+    }
+
+    private function touchStartingHandler(event:Event):void
+    {
+        // don't allow touch scrolling while editing (of the StageText will stay in place)
+        trace("[DEBUG] touchStartingHandler", debugId);
+       if (isEditing)
+          event.preventDefault();
+
     }

     protected function stageText_changeHandler(event:Event):void
@@ -1875,22 +1885,27 @@

     private function stageText_focusInHandler(event:FocusEvent):void
     {
-        startTextEdit();
-        // Focus events are documented as bubbling. However, all events coming
-        // from StageText are set to not bubble. So we need to create an
-        // appropriate bubbling event here.
-        dispatchEvent(new FocusEvent(event.type, true, event.cancelable,
-                event.relatedObject, event.shiftKey, event.keyCode, event.direction));
+        if (startTextEdit()){
+            trace("[DEBUG] stageText focus IN:", debugId);
+            // Focus events are documented as bubbling. However, all events coming
+            // from StageText are set to not bubble. So we need to create an
+            // appropriate bubbling event here.
+            dispatchEvent(new FocusEvent(event.type, true, event.cancelable,
+                    event.relatedObject, event.shiftKey, event.keyCode, event.direction));
+        }
     }

     private function stageText_focusOutHandler(event:FocusEvent):void
     {
-        endTextEdit();
-        // Focus events are documented as bubbling. However, all events coming
-        // from StageText are set to not bubble. So we need to create an
-        // appropriate bubbling event here.
-        dispatchEvent(new FocusEvent(event.type, true, event.cancelable,
-                event.relatedObject, event.shiftKey, event.keyCode, event.direction));
+        if (endTextEdit()) {
+            trace("[DEBUG] stageText focus OUT:", debugId);
+            // Focus events are documented as bubbling. However, all events coming
+            // from StageText are set to not bubble. So we need to create an
+            // appropriate bubbling event here.
+            dispatchEvent(new FocusEvent(event.type, true, event.cancelable,
+                    event.relatedObject, event.shiftKey, event.keyCode, event.direction));
+        }
+
     }

     private function stageText_keyDownHandler(event:KeyboardEvent):void
@@ -1934,18 +1949,27 @@

     private function stageText_softKeyboardActivateHandler(event:SoftKeyboardEvent):void
     {
-        startTextEdit();
-        dispatchEvent(new SoftKeyboardEvent(event.type,
-                true, event.cancelable, this, event.triggerType));
+
+        if ( startTextEdit()) {
+            trace("[DEBUG] stageText SK ACTIVATE:", debugId);
+            dispatchEvent(new SoftKeyboardEvent(event.type,
+                    true, event.cancelable, this, event.triggerType));
+        }
     }

     private function stageText_softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void
     {
-        endTextEdit();
-        dispatchEvent(new SoftKeyboardEvent(event.type,
-                true, event.cancelable, this, event.triggerType));
-    }
-
+        if (endTextEdit()) {
+            trace("[DEBUG] stageText SK DE activate:", debugId);
+            dispatchEvent(new SoftKeyboardEvent(event.type,
+                    true, event.cancelable, this, event.triggerType));
+        }
+    }
+
+    protected function get debugId():String {
+        var parentSkin: UIComponent = this.parent.parent as UIComponent;
+        return    parentSkin ? parentSkin.id : "-" ;
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 22564
Author:   tkraikit@adobe.com
Date:     2011-09-14T19:50:07.656843Z

Log Message:
-----------
Update ASDoc "@productversion Flex 4.5.2" => "@productversion Flex 4.6"

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/OnDemandDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/FlexVersion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ArrowDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/calendarClasses/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/NumericDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateSpinnerItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as
@@ -23,7 +23,7 @@
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
- *  @productversion Flex 4.5.2
+ *  @productversion Flex 4.6
  */
 public class SpinnerListItemRenderer extends LabelItemRenderer
 {
@@ -32,7 +32,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	public function SpinnerListItemRenderer()
 	{


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

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


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

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

 package mx.validators
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11158
Author:   cframpto@adobe.com
Date:     2009-10-26T19:04:20.359745Z

Log Message:
-----------
Temporarily revert fix for SDK-23052 (rev 11145).  I think it is the correct fix but it is causing scrolling issues because of some code added to try to get around other scrolling issues.

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

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

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -3970,7 +3970,7 @@

         // If the textFlow content is modified directly or if there is a style
         // change by changing the textFlow directly the size could change.
-        invalidateSize();
+        //invalidateSize();

         invalidateDisplayList();
     }


Added helper to Method that provided correct values for each of the fields it's interested in.

--- asunit-4.0/src/asunit/framework/Method.as
+++ asunit-4.0/src/asunit/framework/Method.as
@@ -10,7 +10,7 @@
 		public var name:String;
 		public var order:int      = 0;
 		public var scope:Object;
-		public var timeout:Number = -1;
+		public var timeout:int = -1;
 		public var value:Function;

 		public function Method(scope:Object, reflection:ReflectionMethod) {
@@ -23,9 +23,18 @@
             if(metadata != null) {
                 ignore  = (reflection.getMetaDataByName('Ignore') != null);

-                timeout = metadata.getValueFor('timeout');
-                expects = metadata.getValueFor('expects');
-                order   = metadata.getValueFor('order');
+                applyMetaData('timeout');
+                applyMetaData('expects');
+                applyMetaData('order');
+            }
+        }
+
+        // The null response for timeout was updating the
+        // int field to zero when it needs to be -1...
+        private function applyMetaData(name:String):void {
+            var value:* = metadata.getValueFor(name);
+            if(value != null) {
+                this[name] = value;
             }
         }