Transferred from the Adobe Open Source Subversion Repository

Revision: 11966
Author:   aharui@adobe.com
Date:     2009-11-19T00:21:41.792188Z

Log Message:
-----------
Move focusSkinExclusions into Skin (from SparkSkin) and add suggestedFocusSkinExclusions to SkinnableComponent.

QE Notes: None
Doc Notes: new API (suggestedFocusSkinExclusions)
Bugs: SDK-19255
Reviewer: Glenn
API Change: Yes
Is noteworthy for integration: Yes
tests: checkintests mustella/gumbo/components/TextInput, TextArea, CheckBox, RadioButton

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ComboBoxTextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

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

--- frameworks/projects/spark/src/spark/skins/SparkSkin.as
+++ frameworks/projects/spark/src/spark/skins/SparkSkin.as
@@ -14,15 +14,8 @@
 import flash.display.DisplayObject;
 import flash.geom.ColorTransform;

-import mx.core.UIComponent;
-import mx.core.mx_internal;
-
 import spark.components.supportClasses.Skin;
-import spark.core.DisplayObjectSharingMode;
-import spark.core.IGraphicElement;
 import spark.primitives.supportClasses.GraphicElement;
-
-use namespace mx_internal;

 /**
  *  Base class for Spark skins.
@@ -83,21 +76,6 @@
     }

     /**
-     *  items that should be included when rendering the focus ring.
-     *  Only items of type DisplayObject or GraphicElement should be excluded. Items
-     *  of other types will be ignored.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get focusSkinExclusions():Array
-    {
-        return null;
-    }
-
-    /**
      * Names of items that should have their color property defined by the symbolColor style.
      *
      *  @langversion 3.0
@@ -123,6 +101,9 @@
         return null;
     }

+    private static var oldContentBackgroundAlpha:Number;
+    private static var contentBackgroundAlphaSetLocally:Boolean;
+
     /**
      *  @private
      */
@@ -208,60 +189,10 @@
         super.updateDisplayList(unscaledWidth, unscaledHeight);
     }

-    private static var exclusionAlphaValues:Array;
-    private static var oldContentBackgroundAlpha:Number;
-    private static var contentBackgroundAlphaSetLocally:Boolean;
-
-    /**
-     *  Called before a bitmap capture is made for this skin. The default implementation
-     *  excludes items in the focusSkinExclusions array.
-     */
-    public function beginHighlightBitmapCapture():void
-    {
-		var exclusions:Array = focusSkinExclusions;
-		var exclusionCount:Number = (exclusions == null) ? 0 : exclusions.length;
-
-		/* we'll store off the previous alpha of the exclusions so we
-		can restore them when we're done
-		*/
-		exclusionAlphaValues = [];
-		var needRedraw:Boolean = false;
-
-		for (var i:int = 0; i < exclusionCount; i++)
-		{
-			var ex:Object = exclusions[i];
-			/* we're going to go under the covers here to try and modify alpha with the least
-			amount of disruption to the component.  For UIComponents, we go to Sprite's alpha property;
-			*/
-			if (ex is UIComponent)
-			{
-                exclusionAlphaValues[i] = (ex as UIComponent).$alpha;
-				(ex as UIComponent).$alpha = 0;
-			}
-			else if (ex is DisplayObject)
-			{
-                exclusionAlphaValues[i] = (ex as DisplayObject).alpha;
-				(ex as DisplayObject).alpha = 0;
-			}
-			else if (ex is IGraphicElement)
-			{
-				/* if we're lucky, the IGE has its own DisplayObject, and we can just trip its alpha.
-				If not, we're going to have to set it to 0, and force a redraw of the whole component */
-				var ge:IGraphicElement = ex as IGraphicElement;
-				if (ge.displayObjectSharingMode == DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT)
-				{
-                    exclusionAlphaValues[i] = ge.displayObject.alpha;
-					ge.displayObject.alpha = 0;
-				}
-				else
-				{
-                    exclusionAlphaValues[i] = ge.alpha;
-					ge.alpha = 0;
-					needRedraw = true;
-				}
-			}
-        }
-
+    override public function beginHighlightBitmapCapture():Boolean
+    {
+        var needRedraw:Boolean = super.beginHighlightBitmapCapture();
+
         // If we have a mostly-transparent content background, temporarily bump
         // up the contentBackgroundAlpha so the captured bitmap includes an opaque
         // snapshot of the background.
@@ -275,50 +206,14 @@
             setStyle("contentBackgroundAlpha", 0.5);
             needRedraw = true;
         }
-
-		/* if we excluded an IGE without its own DO, we need to update the component before grabbing the bitmap */
-		if (needRedraw)
-			validateNow();
-    }
-
-    /**
-     *  Called after a bitmap capture is made for this skin. The default implementation
-     *  restores the items in the focusSkinExclusions array.
-     */
-    public function endHighlightBitmapCapture():void
-    {
-        var exclusions:Array = focusSkinExclusions;
-        var exclusionCount:Number = (exclusions == null) ? 0 : exclusions.length;
-        var needRedraw:Boolean = false;
-
-        for (var i:int=0; i < exclusionCount; i++)
-		{
-			var ex:Object = exclusions[i];
-			if (ex is UIComponent)
-			{
-				(ex as UIComponent).$alpha = exclusionAlphaValues[i];
-			}
-			else if (ex is DisplayObject)
-			{
-				(ex as DisplayObject).alpha = exclusionAlphaValues[i];
-			}
-			else if (ex is IGraphicElement)
-			{
-				var ge:IGraphicElement = ex as IGraphicElement;
-				if (ge.displayObjectSharingMode == DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT)
-				{
-					ge.displayObject.alpha = exclusionAlphaValues[i];
-				}
-				else
-				{
-					ge.alpha = exclusionAlphaValues[i];
-                    needRedraw = true;
-				}
-			}
-		}
-
-        exclusionAlphaValues = null;
-
+
+        return needRedraw;
+    }
+
+    override public function endHighlightBitmapCapture():Boolean
+    {
+        var needRedraw:Boolean = super.endHighlightBitmapCapture();
+
         if (!isNaN(oldContentBackgroundAlpha))
         {
             if (contentBackgroundAlphaSetLocally)
@@ -329,8 +224,8 @@
             oldContentBackgroundAlpha = NaN;
         }

-        if (needRedraw)
-            validateNow();
-    }
+        return needRedraw;
+    }
+
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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

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

Modified Paths:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/skins/SparkSkin.as
+++ frameworks/projects/spark/src/spark/skins/SparkSkin.as
@@ -20,6 +20,11 @@

 /**
  *  Base class for spark skins.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class SparkSkin extends Skin
 {
@@ -33,6 +38,11 @@

     /*
      * Constructor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function SparkSkin()
     {
@@ -41,6 +51,11 @@

     /*
      * names of items that should not be colorized by the "baseColor" style.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get colorizeExclusions():Array
     {
@@ -49,6 +64,11 @@

     /*
      * names of items that should have their "color" property defined by the "symbolColor" style.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get symbolItems():Array
     {
@@ -57,6 +77,11 @@

     /*
      * names of items that should have their "color" property defined by the "contentBackgroundColor" style.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get contentItems():Array
     {


WIP - broken enhanced seeking - but OK playback on Firefox w/ live stream.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -1910,6 +1910,15 @@
 		 */
 		private function onTag(tag:FLVTag):Boolean
 		{
+			if(true)
+			{
+				var b:ByteArray = new ByteArray();
+				tag.write(b);
+				attemptAppendBytes(b);
+				_flvParserDone = true;
+				return false;
+			}
+
 			var i:int;

 			// Make sure we don't go past the live edge even if it changes while seeking.


LinkableHashMap.dispose() now removes non-locked children before locked
children

Change-Id: Iff06001f8176494c158a9cb28bd64cccbb5511ad

--- WeaveCore/src/weave/core/LinkableHashMap.as
+++ WeaveCore/src/weave/core/LinkableHashMap.as
@@ -348,6 +348,10 @@
 		{
 			super.dispose();

+			// first, remove all objects that aren't locked
+			removeAllObjects();
+
+			// remove all locked objects
 			for each (var name:String in _orderedNames.concat()) // iterate over a copy of the list
 			{
 				_nameIsLocked[name] = undefined; // make sure removeObject() will carry out its action


Use the new LabeledSlider instead of rolling our own.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@241 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/parlor/client/DefaultFlexTableConfigurator.as
+++ src/as/com/threerings/parlor/client/DefaultFlexTableConfigurator.as
@@ -21,8 +21,6 @@

 package com.threerings.parlor.client {

-import mx.binding.utils.BindingUtils;
-
 import mx.containers.Grid;

 import mx.controls.CheckBox;
@@ -30,6 +28,7 @@
 import mx.controls.Label;

 import com.threerings.flex.GridUtil;
+import com.threerings.flex.LabeledSlider;

 import com.threerings.parlor.data.TableConfig;
 import com.threerings.parlor.util.ParlorContext;
@@ -68,7 +67,6 @@
             _playerSlider.maximum = maxPlayers;
             _playerSlider.liveDragging = true;
             _playerSlider.snapInterval = 1;
-            _playerSlider.showDataTip = false;

         } else {
             _config.desiredPlayerCount = desiredPlayers;
@@ -93,14 +91,7 @@
             var playerLabel :Label = new Label();
             playerLabel.text = "Players:";

-            var countLabel :Label = new Label();
-            BindingUtils.bindProperty(countLabel, "text",
-                _playerSlider, "value");
-
-            var grid :Grid = new Grid();
-            GridUtil.addRow(grid, countLabel, _playerSlider);
-
-            gconf.addControl(playerLabel, grid);
+            gconf.addControl(playerLabel, new LabeledSlider(_playerSlider));
         }

         if (_privateCheck != null) {


Add fluent test that new instances are returned when registering not as singleton

--- src/asfac.tests/src/com/thedevstop/asfac/FluentRegistrationTests.as
+++ src/asfac.tests/src/com/thedevstop/asfac/FluentRegistrationTests.as
@@ -80,6 +80,18 @@
 			assertSame(result1, result2);
 		}

+		public function test_should_retun_new_instances_when_not_registered_as_singleton():void
+		{
+			var factory:FluentAsFactory = new FluentAsFactory();
+
+			factory.register(Dictionary).asType(Dictionary);
+
+			var result1:Object = factory.resolve(Dictionary);
+			var result2:Object = factory.resolve(Dictionary);
+			assertNotSame(result1, result2);
+		}
+
+
 		public function test_should_error_when_registering_type_is_null():void
 		{
 			var factory:FluentAsFactory = new FluentAsFactory();


Added missing underscore, possibly from line ending update

--- src/flash/htmlelements/VideoElement.as
+++ src/flash/htmlelements/VideoElement.as
@@ -1,540 +1,540 @@
-package htmlelements
-{
-import flash.display.Sprite;
-import flash.events.*;
-import flash.net.NetConnection;
-import flash.net.NetStream;
-import flash.media.Video;
-import flash.media.SoundTransform;
-import flash.utils.Timer;
-
-import FlashMediaElement;
-import HtmlMediaEvent;
-
-public class VideoElement extends Sprite implements IMediaElement
-{
-  private var _currentUrl:String = "";
-  private var _autoplay:Boolean = true;
-  private var _preload:String = "";
-  private var _isPreloading:Boolean = false;
-
-  private var _connection:NetConnection;
-  private var _stream:NetStream;
-  private var _video:Video;
-  private var _element:FlashMediaElement;
-  private var _soundTransform;
-  private var _oldVolume:Number = 1;
-
-  // event values
-  private var _duration:Number = 0;
-  private var _framerate:Number;
-  private var _isPaused:Boolean = true;
-  private var _isEnded:Boolean = false;
-  private var _volume:Number = 1;
-  private var _isMuted:Boolean = false;
-
-  private var _bytesLoaded:Number = 0;
-  private var _bytesTotal:Number = 0;
-  private var _bufferedTime:Number = 0;
-  private var _bufferEmpty:Boolean = false;
-  private var _bufferingChanged:Boolean = false;
-  private var _seekOffset:Number = 0;
-
-
-  private var _videoWidth:Number = -1;
-  private var _videoHeight:Number = -1;
-
-  private var _timer:Timer;
-
-  private var _isRTMP:Boolean = false;
-  private var _streamer:String = "";
-  private var _isConnected:Boolean = false;
-  private var _playWhenConnected:Boolean = false;
-  private var _hasStartedPlaying:Boolean = false;
-
-  private var _parentReference:Object;
-  private var _pseudoStreamingEnabled:Boolean = false;
-  private var _pseudoStreamingStartQueryParam:String = "start";
-
-  public function setReference(arg:Object):void {
-    _parentReference = arg;
-  }
-
-  public function setSize(width:Number, height:Number):void {
-    _video.width = width;
-    _video.height = height;
-  }
-
-  public function setPseudoStreaming(enablePseudoStreaming:Boolean):void {
-    _pseudoStreamingEnabled = enablePseudoStreaming;
-  }
-
-  public function setPseudoStreamingStartParam(pseudoStreamingStartQueryParam:String):void {
-    _pseudoStreamingStartQueryParam = pseudoStreamingStartQueryParam;
-  }
-
-  public function get video():Video {
-    return _video;
-  }
-
-  public function get videoHeight():Number {
-    return _videoHeight;
-  }
-
-  public function get videoWidth():Number {
-    return _videoWidth;
-  }
-
-
-  public function duration():Number {
-    return _duration;
-  }
-
-  public function currentProgress():Number {
-    if(_stream != null) {
-      return Math.round(_stream.bytesLoaded/_stream.bytesTotal*100);
-    } else {
-      return 0;
-    }
-  }
-
-  public function currentTime():Number {
-    var currentTime:Number = 0;
-    if (_stream != null) {
-      currentTime = _stream.time;
-      if (_pseudoStreamingEnabled) {
-        currentTime += _seekOffset;
-      }
-    }
-    return currentTime;
-  }
-
-
-  // (1) load()
-  // calls _connection.connect();
-  // waits for NetConnection.Connect.Success
-  // _stream gets created
-
-
-  public function VideoElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number, streamer:String)
-  {
-    _element = element;
-    _autoplay = autoplay;
-    _volume = startVolume;
-    _preload = preload;
-    _streamer = streamer;
-
-    _video = new Video();
-    addChild(_video);
-
-    _connection = new NetConnection();
-    _connection.client = { onBWDone: function():void{} };
-    _connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
-    _connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
-    //_connection.connect(null);
-
-    _timer = new Timer(timerRate);
-    _timer.addEventListener("timer", timerHandler);
-
-  }
-
-  private function timerHandler(e:TimerEvent) {
-
-    _bytesLoaded = _stream.bytesLoaded;
-    _bytesTotal = _stream.bytesTotal;
-
-    if (!_isPaused) {
-      sendEvent(HtmlMediaEvent.TIMEUPDATE);
-    }
-
-    //trace("bytes", _bytesLoaded, _bytesTotal);
-
-    if (_bytesLoaded < _bytesTotal)
-      sendEvent(HtmlMediaEvent.PROGRESS);
-
-  }
-
-  // internal events
-  private function netStatusHandler(event:NetStatusEvent):void {
-    trace("netStatus", event.info.code);
-
-    switch (event.info.code) {
-
-      case "NetStream.Buffer.Empty":
-        _bufferEmpty = true;
-        _isEnded ? sendEvent(HtmlMediaEvent.ENDED) : null;
-        break;
-
-      case "NetStream.Buffer.Full":
-        _bytesLoaded = _stream.bytesLoaded;
-        _bytesTotal = _stream.bytesTotal;
-        _bufferEmpty = false;
-
-        sendEvent(HtmlMediaEvent.PROGRESS);
-        break;
-
-      case "NetConnection.Connect.Success":
-        connectStream();
-        break;
-      case "NetStream.Play.StreamNotFound":
-        trace("Unable to locate video");
-        break;
-
-      // STREAM
-      case "NetStream.Play.Start":
-
-        _isPaused = false;
-        sendEvent(HtmlMediaEvent.LOADEDDATA);
-        sendEvent(HtmlMediaEvent.CANPLAY);
-
-        if (!_isPreloading) {
-
-          sendEvent(HtmlMediaEvent.PLAY);
-          sendEvent(HtmlMediaEvent.PLAYING);
-
-        }
-
-        _timer.start();
-
-        break;
-
-      case "NetStream.Seek.Notify":
-        sendEvent(HtmlMediaEvent.SEEKED);
-        break;
-
-      case "NetStream.Pause.Notify":
-        _isPaused = true;
-        sendEvent(HtmlMediaEvent.PAUSE);
-        break;
-
-      case "NetStream.Play.Stop":
-        _isEnded = true;
-        _isPaused = false;
-        _timer.stop();
-        _bufferEmpty ? sendEvent(HtmlMediaEvent.ENDED) : null;
-        break;
-
-    }
-  }
-
-
-  private function securityErrorHandler(event:SecurityErrorEvent):void {
-    trace("securityErrorHandler: " + event);
-  }
-
-  private function asyncErrorHandler(event:AsyncErrorEvent):void {
-    // ignore AsyncErrorEvent events.
-  }
-
-
-  private function onMetaDataHandler(info:Object):void {
-    // Only set the duration when we first load the video
-    if (_duration == 0) {
-      _duration = info.duration;
-    }
-    _framerate = info.framerate;
-    _videoWidth = info.width;
-    _videoHeight = info.height;
-
-
-    // set size?
-
-    sendEvent(HtmlMediaEvent.LOADEDMETADATA);
-
-
-
-    if (_isPreloading) {
-
-      _stream.pause();
-      _isPaused = true;
-      _isPreloading = false;
-
-      sendEvent(HtmlMediaEvent.PROGRESS);
-      sendEvent(HtmlMediaEvent.TIMEUPDATE);
-
-    }
-  }
-
-
-
-
-  // interface members
-  public function setSrc(url:String):void {
-    if (_isConnected && _stream) {
-      // stop and restart
-      _stream.pause();
-    }
-
-    _currentUrl = url;
-    _isRTMP = !!_currentUrl.match(/^rtmp(s|t|e|te)?\:\/\//) || _streamer != "";
-    _isConnected = false;
-    _hasStartedPlaying = false;
-  }
-
-  public function load():void {
-    // disconnect existing stream and connection
-    if (_isConnected && _stream) {
-      _stream.pause();
-      _stream.close();
-      _connection.close();
-    }
-    _isConnected = false;
-    _isPreloading = false;
-
-
-    _isEnded = false;
-    _bufferEmpty = false;
-
-    // start new connection
-    if (_isRTMP) {
-      var rtmpInfo:Object = parseRTMP(_currentUrl);
-      if (_streamer != "") {
-        rtmpInfo.server = _streamer;
-        rtmpInfo.stream = _currentUrl;
-
-      }
-      _connection.connect(rtmpInfo.server);
-    } else {
-      _connection.connect(null);
-    }
-
-    // in a few moments the "NetConnection.Connect.Success" event will fire
-    // and call createConnection which finishes the "load" sequence
-    sendEvent(HtmlMediaEvent.LOADSTART);
-  }
-
-
-  private function connectStream():void {
-    trace("connectStream");
-    _stream = new NetStream(_connection);
-
-    // explicitly set the sound since it could have come before the connection was made
-    _soundTransform = new SoundTransform(_volume);
-    stream.soundTransform = _soundTransform;
-
-    // set the buffer to ensure nice playback
-    _stream.bufferTime = 1;
-    _stream.bufferTimeMax = 3;
-
-    _stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); // same event as connection
-    _stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
-
-    var customClient:Object = new Object();
-    customClient.onMetaData = onMetaDataHandler;
-    _stream.client = customClient;
-
-    _video.attachNetStream(_stream);
-
-    // start downloading without playing )based on preload and play() hasn't been called)
-    // I wish flash had a load() command to make this less awkward
-    if (_preload != "none" && !_playWhenConnected) {
-      _isPaused = true;
-      //stream.bufferTime = 20;
-      _stream.play(getCurrentUrl(0), 0, 0);
-      _stream.pause();
-
-      _isPreloading = true;
-
-      //_stream.pause();
-      //
-      //sendEvent(HtmlMediaEvent.PAUSE); // have to send this because the "playing" event gets sent via event handlers
-    }
-
-    _isConnected = true;
-
-    if (_playWhenConnected && !_hasStartedPlaying) {
-      play();
-      _playWhenConnected = false;
-    }
-
-  }
-
-  public function play():void {
-
-    if (!_hasStartedPlaying && !_isConnected) {
-      _playWhenConnected = true;
-      load();
-      return;
-    }
-
-    if (_hasStartedPlaying) {
-      if (_isPaused) {
-        _stream.resume();
-        _timer.start();
-        _isPaused = false;
-        sendEvent(HtmlMediaEvent.PLAY);
-        sendEvent(HtmlMediaEvent.PLAYING);
-      }
-    } else {
-
-      if (_isRTMP) {
-        var rtmpInfo:Object = parseRTMP(_currentUrl);
-        _stream.play(rtmpInfo.stream);
-      } else {
-        _stream.play(getCurrentUrl(0));
-      }
-      _timer.start();
-      _isPaused = false;
-      _hasStartedPlaying = true;
-
-      // don't toss play/playing events here, because we haven't sent a
-      // canplay / loadeddata event yet. that'll be handled in the net
-      // event listener
-    }
-
-  }
-
-  public function pause():void {
-    if (_stream == null)
-      return;
-
-    _stream.pause();
-    _isPaused = true;
-
-    if (_bytesLoaded == _bytesTotal) {
-      _timer.stop();
-    }
-
-    _isPaused = true;
-    sendEvent(HtmlMediaEvent.PAUSE);
-  }
-
-  public function stop():void {
-    if (_stream == null)
-      return;
-
-    _stream.close();
-    _isPaused = false;
-    _timer.stop();
-    sendEvent(HtmlMediaEvent.STOP);
-  }
-
-
-  public function setCurrentTime(pos:Number):void {
-    if (_stream == null) {
-      return;
-    }
-
-    // Calculate the position of the buffered video
-    var bufferPosition:Number = _bytesLoaded / _bytesTotal * _duration;
-
-    if (_pseudoStreamingEnabled) {
-      sendEvent(HtmlMediaEvent.SEEKING);
-      // Normal seek if it is in buffer and this is the first seek
-      if (pos < bufferPosition && _seekOffset == 0) {
-        _stream.seek(pos);
-      }
-      else {
-        // Uses server-side pseudo-streaming to seek
-        _stream.play(getCurrentUrl(pos));
-        _seekOffset = pos;
-      }
-    }
-    else {
-      sendEvent(HtmlMediaEvent.SEEKING);
-      _stream.seek(pos);
-    }
-
-    if (!_isEnded) {
-      sendEvent(HtmlMediaEvent.TIMEUPDATE);
-    }
-  }
-
-  public function setVolume(volume:Number):void {
-    if (_stream != null) {
-      _soundTransform = new SoundTransform(volume);
-      _stream.soundTransform = _soundTransform;
-    }
-
-    _volume = volume;
-
-    _isMuted = (_volume == 0);
-
-    sendEvent(HtmlMediaEvent.VOLUMECHANGE);
-  }
-
-  public function getVolume():Number {
-    if(_isMuted) {
-      return 0;
-    } else {
-      return _volume;
-    }
-  }
-
-  public function setMuted(muted:Boolean):void {
-
-    if (_isMuted == muted)
-      return;
-
-    if (muted) {
-      _oldVolume = (_stream == null) ? _oldVolume : _stream.soundTransform.volume;
-      setVolume(0);
-    } else {
-      setVolume(_oldVolume);
-    }
-
-    _isMuted = muted;
-  }
-
-
-  private function sendEvent(eventName:String) {
-
-    // calculate this to mimic HTML5
-    _bufferedTime = _bytesLoaded / _bytesTotal * _duration;
-
-    // build JSON
-    var values:String =
-      "duration:" + _duration +
-        ",framerate:" + _framerate +
-        ",currentTime:" + currentTime() +
-        ",muted:" + _isMuted +
-        ",paused:" + _isPaused +
-        ",ended:" + _isEnded +
-        ",volume:" + _volume +
-        ",src:\"" + _currentUrl + "\"" +
-        ",bytesTotal:" + _bytesTotal +
-        ",bufferedBytes:" + _bytesLoaded +
-        ",bufferedTime:" + _bufferedTime +
-        ",videoWidth:" + _videoWidth +
-        ",videoHeight:" + _videoHeight +
-        "";
-
-    _element.sendEvent(eventName, values);
-  }
-
-  private function parseRTMP(url:String) {
-    var match:Array = url.match(/(.*)\/((flv|mp4|mp3):.*)/);
-    var rtmpInfo:Object = {
-      server: null,
-      stream: null
-    };
-
-    if (match) {
-      rtmpInfo.server = match[1];
-      rtmpInfo.stream = match[2];
-    }
-    else {
-      rtmpInfo.server = url.replace(/\/[^\/]+$/,"/");
-      rtmpInfo.stream = url.split("/").pop();
-    }
-
-    trace("parseRTMP - server: " + rtmpInfo.server + " stream: " + rtmpInfo.stream);
-
-    return rtmpInfo;
-  }
-
-  private function getCurrentUrl(pos:Number):String {
-    var url:String = _currentUrl;
-    if (_pseudoStreamingEnabled) {
-      if (url.indexOf('?') > -1) {
-        url = url + '&' + _pseudoStreamingStartQueryParam + '=' + pos;
-      }
-      else {
-        url = url + '?' + _pseudoStreamingStartQueryParam + '=' + pos;
-      }
-    }
-    return url;
-  }
-}
-}
-
+package htmlelements
+{
+import flash.display.Sprite;
+import flash.events.*;
+import flash.net.NetConnection;
+import flash.net.NetStream;
+import flash.media.Video;
+import flash.media.SoundTransform;
+import flash.utils.Timer;
+
+import FlashMediaElement;
+import HtmlMediaEvent;
+
+public class VideoElement extends Sprite implements IMediaElement
+{
+  private var _currentUrl:String = "";
+  private var _autoplay:Boolean = true;
+  private var _preload:String = "";
+  private var _isPreloading:Boolean = false;
+
+  private var _connection:NetConnection;
+  private var _stream:NetStream;
+  private var _video:Video;
+  private var _element:FlashMediaElement;
+  private var _soundTransform;
+  private var _oldVolume:Number = 1;
+
+  // event values
+  private var _duration:Number = 0;
+  private var _framerate:Number;
+  private var _isPaused:Boolean = true;
+  private var _isEnded:Boolean = false;
+  private var _volume:Number = 1;
+  private var _isMuted:Boolean = false;
+
+  private var _bytesLoaded:Number = 0;
+  private var _bytesTotal:Number = 0;
+  private var _bufferedTime:Number = 0;
+  private var _bufferEmpty:Boolean = false;
+  private var _bufferingChanged:Boolean = false;
+  private var _seekOffset:Number = 0;
+
+
+  private var _videoWidth:Number = -1;
+  private var _videoHeight:Number = -1;
+
+  private var _timer:Timer;
+
+  private var _isRTMP:Boolean = false;
+  private var _streamer:String = "";
+  private var _isConnected:Boolean = false;
+  private var _playWhenConnected:Boolean = false;
+  private var _hasStartedPlaying:Boolean = false;
+
+  private var _parentReference:Object;
+  private var _pseudoStreamingEnabled:Boolean = false;
+  private var _pseudoStreamingStartQueryParam:String = "start";
+
+  public function setReference(arg:Object):void {
+    _parentReference = arg;
+  }
+
+  public function setSize(width:Number, height:Number):void {
+    _video.width = width;
+    _video.height = height;
+  }
+
+  public function setPseudoStreaming(enablePseudoStreaming:Boolean):void {
+    _pseudoStreamingEnabled = enablePseudoStreaming;
+  }
+
+  public function setPseudoStreamingStartParam(pseudoStreamingStartQueryParam:String):void {
+    _pseudoStreamingStartQueryParam = pseudoStreamingStartQueryParam;
+  }
+
+  public function get video():Video {
+    return _video;
+  }
+
+  public function get videoHeight():Number {
+    return _videoHeight;
+  }
+
+  public function get videoWidth():Number {
+    return _videoWidth;
+  }
+
+
+  public function duration():Number {
+    return _duration;
+  }
+
+  public function currentProgress():Number {
+    if(_stream != null) {
+      return Math.round(_stream.bytesLoaded/_stream.bytesTotal*100);
+    } else {
+      return 0;
+    }
+  }
+
+  public function currentTime():Number {
+    var currentTime:Number = 0;
+    if (_stream != null) {
+      currentTime = _stream.time;
+      if (_pseudoStreamingEnabled) {
+        currentTime += _seekOffset;
+      }
+    }
+    return currentTime;
+  }
+
+
+  // (1) load()
+  // calls _connection.connect();
+  // waits for NetConnection.Connect.Success
+  // _stream gets created
+
+
+  public function VideoElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number, streamer:String)
+  {
+    _element = element;
+    _autoplay = autoplay;
+    _volume = startVolume;
+    _preload = preload;
+    _streamer = streamer;
+
+    _video = new Video();
+    addChild(_video);
+
+    _connection = new NetConnection();
+    _connection.client = { onBWDone: function():void{} };
+    _connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
+    _connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
+    //_connection.connect(null);
+
+    _timer = new Timer(timerRate);
+    _timer.addEventListener("timer", timerHandler);
+
+  }
+
+  private function timerHandler(e:TimerEvent) {
+
+    _bytesLoaded = _stream.bytesLoaded;
+    _bytesTotal = _stream.bytesTotal;
+
+    if (!_isPaused) {
+      sendEvent(HtmlMediaEvent.TIMEUPDATE);
+    }
+
+    //trace("bytes", _bytesLoaded, _bytesTotal);
+
+    if (_bytesLoaded < _bytesTotal)
+      sendEvent(HtmlMediaEvent.PROGRESS);
+
+  }
+
+  // internal events
+  private function netStatusHandler(event:NetStatusEvent):void {
+    trace("netStatus", event.info.code);
+
+    switch (event.info.code) {
+
+      case "NetStream.Buffer.Empty":
+        _bufferEmpty = true;
+        _isEnded ? sendEvent(HtmlMediaEvent.ENDED) : null;
+        break;
+
+      case "NetStream.Buffer.Full":
+        _bytesLoaded = _stream.bytesLoaded;
+        _bytesTotal = _stream.bytesTotal;
+        _bufferEmpty = false;
+
+        sendEvent(HtmlMediaEvent.PROGRESS);
+        break;
+
+      case "NetConnection.Connect.Success":
+        connectStream();
+        break;
+      case "NetStream.Play.StreamNotFound":
+        trace("Unable to locate video");
+        break;
+
+      // STREAM
+      case "NetStream.Play.Start":
+
+        _isPaused = false;
+        sendEvent(HtmlMediaEvent.LOADEDDATA);
+        sendEvent(HtmlMediaEvent.CANPLAY);
+
+        if (!_isPreloading) {
+
+          sendEvent(HtmlMediaEvent.PLAY);
+          sendEvent(HtmlMediaEvent.PLAYING);
+
+        }
+
+        _timer.start();
+
+        break;
+
+      case "NetStream.Seek.Notify":
+        sendEvent(HtmlMediaEvent.SEEKED);
+        break;
+
+      case "NetStream.Pause.Notify":
+        _isPaused = true;
+        sendEvent(HtmlMediaEvent.PAUSE);
+        break;
+
+      case "NetStream.Play.Stop":
+        _isEnded = true;
+        _isPaused = false;
+        _timer.stop();
+        _bufferEmpty ? sendEvent(HtmlMediaEvent.ENDED) : null;
+        break;
+
+    }
+  }
+
+
+  private function securityErrorHandler(event:SecurityErrorEvent):void {
+    trace("securityErrorHandler: " + event);
+  }
+
+  private function asyncErrorHandler(event:AsyncErrorEvent):void {
+    // ignore AsyncErrorEvent events.
+  }
+
+
+  private function onMetaDataHandler(info:Object):void {
+    // Only set the duration when we first load the video
+    if (_duration == 0) {
+      _duration = info.duration;
+    }
+    _framerate = info.framerate;
+    _videoWidth = info.width;
+    _videoHeight = info.height;
+
+
+    // set size?
+
+    sendEvent(HtmlMediaEvent.LOADEDMETADATA);
+
+
+
+    if (_isPreloading) {
+
+      _stream.pause();
+      _isPaused = true;
+      _isPreloading = false;
+
+      sendEvent(HtmlMediaEvent.PROGRESS);
+      sendEvent(HtmlMediaEvent.TIMEUPDATE);
+
+    }
+  }
+
+
+
+
+  // interface members
+  public function setSrc(url:String):void {
+    if (_isConnected && _stream) {
+      // stop and restart
+      _stream.pause();
+    }
+
+    _currentUrl = url;
+    _isRTMP = !!_currentUrl.match(/^rtmp(s|t|e|te)?\:\/\//) || _streamer != "";
+    _isConnected = false;
+    _hasStartedPlaying = false;
+  }
+
+  public function load():void {
+    // disconnect existing stream and connection
+    if (_isConnected && _stream) {
+      _stream.pause();
+      _stream.close();
+      _connection.close();
+    }
+    _isConnected = false;
+    _isPreloading = false;
+
+
+    _isEnded = false;
+    _bufferEmpty = false;
+
+    // start new connection
+    if (_isRTMP) {
+      var rtmpInfo:Object = parseRTMP(_currentUrl);
+      if (_streamer != "") {
+        rtmpInfo.server = _streamer;
+        rtmpInfo.stream = _currentUrl;
+
+      }
+      _connection.connect(rtmpInfo.server);
+    } else {
+      _connection.connect(null);
+    }
+
+    // in a few moments the "NetConnection.Connect.Success" event will fire
+    // and call createConnection which finishes the "load" sequence
+    sendEvent(HtmlMediaEvent.LOADSTART);
+  }
+
+
+  private function connectStream():void {
+    trace("connectStream");
+    _stream = new NetStream(_connection);
+
+    // explicitly set the sound since it could have come before the connection was made
+    _soundTransform = new SoundTransform(_volume);
+    _stream.soundTransform = _soundTransform;
+
+    // set the buffer to ensure nice playback
+    _stream.bufferTime = 1;
+    _stream.bufferTimeMax = 3;
+
+    _stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); // same event as connection
+    _stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
+
+    var customClient:Object = new Object();
+    customClient.onMetaData = onMetaDataHandler;
+    _stream.client = customClient;
+
+    _video.attachNetStream(_stream);
+
+    // start downloading without playing )based on preload and play() hasn't been called)
+    // I wish flash had a load() command to make this less awkward
+    if (_preload != "none" && !_playWhenConnected) {
+      _isPaused = true;
+      //stream.bufferTime = 20;
+      _stream.play(getCurrentUrl(0), 0, 0);
+      _stream.pause();
+
+      _isPreloading = true;
+
+      //_stream.pause();
+      //
+      //sendEvent(HtmlMediaEvent.PAUSE); // have to send this because the "playing" event gets sent via event handlers
+    }
+
+    _isConnected = true;
+
+    if (_playWhenConnected && !_hasStartedPlaying) {
+      play();
+      _playWhenConnected = false;
+    }
+
+  }
+
+  public function play():void {
+
+    if (!_hasStartedPlaying && !_isConnected) {
+      _playWhenConnected = true;
+      load();
+      return;
+    }
+
+    if (_hasStartedPlaying) {
+      if (_isPaused) {
+        _stream.resume();
+        _timer.start();
+        _isPaused = false;
+        sendEvent(HtmlMediaEvent.PLAY);
+        sendEvent(HtmlMediaEvent.PLAYING);
+      }
+    } else {
+
+      if (_isRTMP) {
+        var rtmpInfo:Object = parseRTMP(_currentUrl);
+        _stream.play(rtmpInfo.stream);
+      } else {
+        _stream.play(getCurrentUrl(0));
+      }
+      _timer.start();
+      _isPaused = false;
+      _hasStartedPlaying = true;
+
+      // don't toss play/playing events here, because we haven't sent a
+      // canplay / loadeddata event yet. that'll be handled in the net
+      // event listener
+    }
+
+  }
+
+  public function pause():void {
+    if (_stream == null)
+      return;
+
+    _stream.pause();
+    _isPaused = true;
+
+    if (_bytesLoaded == _bytesTotal) {
+      _timer.stop();
+    }
+
+    _isPaused = true;
+    sendEvent(HtmlMediaEvent.PAUSE);
+  }
+
+  public function stop():void {
+    if (_stream == null)
+      return;
+
+    _stream.close();
+    _isPaused = false;
+    _timer.stop();
+    sendEvent(HtmlMediaEvent.STOP);
+  }
+
+
+  public function setCurrentTime(pos:Number):void {
+    if (_stream == null) {
+      return;
+    }
+
+    // Calculate the position of the buffered video
+    var bufferPosition:Number = _bytesLoaded / _bytesTotal * _duration;
+
+    if (_pseudoStreamingEnabled) {
+      sendEvent(HtmlMediaEvent.SEEKING);
+      // Normal seek if it is in buffer and this is the first seek
+      if (pos < bufferPosition && _seekOffset == 0) {
+        _stream.seek(pos);
+      }
+      else {
+        // Uses server-side pseudo-streaming to seek
+        _stream.play(getCurrentUrl(pos));
+        _seekOffset = pos;
+      }
+    }
+    else {
+      sendEvent(HtmlMediaEvent.SEEKING);
+      _stream.seek(pos);
+    }
+
+    if (!_isEnded) {
+      sendEvent(HtmlMediaEvent.TIMEUPDATE);
+    }
+  }
+
+  public function setVolume(volume:Number):void {
+    if (_stream != null) {
+      _soundTransform = new SoundTransform(volume);
+      _stream.soundTransform = _soundTransform;
+    }
+
+    _volume = volume;
+
+    _isMuted = (_volume == 0);
+
+    sendEvent(HtmlMediaEvent.VOLUMECHANGE);
+  }
+
+  public function getVolume():Number {
+    if(_isMuted) {
+      return 0;
+    } else {
+      return _volume;
+    }
+  }
+
+  public function setMuted(muted:Boolean):void {
+
+    if (_isMuted == muted)
+      return;
+
+    if (muted) {
+      _oldVolume = (_stream == null) ? _oldVolume : _stream.soundTransform.volume;
+      setVolume(0);
+    } else {
+      setVolume(_oldVolume);
+    }
+
+    _isMuted = muted;
+  }
+
+
+  private function sendEvent(eventName:String) {
+
+    // calculate this to mimic HTML5
+    _bufferedTime = _bytesLoaded / _bytesTotal * _duration;
+
+    // build JSON
+    var values:String =
+      "duration:" + _duration +
+        ",framerate:" + _framerate +
+        ",currentTime:" + currentTime() +
+        ",muted:" + _isMuted +
+        ",paused:" + _isPaused +
+        ",ended:" + _isEnded +
+        ",volume:" + _volume +
+        ",src:\"" + _currentUrl + "\"" +
+        ",bytesTotal:" + _bytesTotal +
+        ",bufferedBytes:" + _bytesLoaded +
+        ",bufferedTime:" + _bufferedTime +
+        ",videoWidth:" + _videoWidth +
+        ",videoHeight:" + _videoHeight +
+        "";
+
+    _element.sendEvent(eventName, values);
+  }
+
+  private function parseRTMP(url:String) {
+    var match:Array = url.match(/(.*)\/((flv|mp4|mp3):.*)/);
+    var rtmpInfo:Object = {
+      server: null,
+      stream: null
+    };
+
+    if (match) {
+      rtmpInfo.server = match[1];
+      rtmpInfo.stream = match[2];
+    }
+    else {
+      rtmpInfo.server = url.replace(/\/[^\/]+$/,"/");
+      rtmpInfo.stream = url.split("/").pop();
+    }
+
+    trace("parseRTMP - server: " + rtmpInfo.server + " stream: " + rtmpInfo.stream);
+
+    return rtmpInfo;
+  }
+
+  private function getCurrentUrl(pos:Number):String {
+    var url:String = _currentUrl;
+    if (_pseudoStreamingEnabled) {
+      if (url.indexOf('?') > -1) {
+        url = url + '&' + _pseudoStreamingStartQueryParam + '=' + pos;
+      }
+      else {
+        url = url + '?' + _pseudoStreamingStartQueryParam + '=' + pos;
+      }
+    }
+    return url;
+  }
+}
+}
+


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

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

 package mx.collections
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22606
Author:   mhorn@adobe.com
Date:     2011-09-16T15:41:49.539150Z

Log Message:
-----------
asdoc updates

Modified Paths:
--------------
<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/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.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/SpinnerListContainer.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/collections/NumericDataProvider.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as
@@ -33,291 +33,306 @@
 /**
  *  ActionScript-based skin for the SpinnerListContainer in mobile applications.
  *
+ *  @see spark.components.SpinnerListContainer
+ *
  *  @langversion 3.0
  *  @playerversion AIR 3
  *  @productversion Flex 4.6
  */
 public class SpinnerListContainerSkin extends MobileSkin
 {
-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
-	/**
-	 *  Constructor.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 *
-	 */
-	public function SpinnerListContainerSkin()
-	{
-		super();
-
-		switch (applicationDPI)
-		{
-			case DPIClassification.DPI_320:
-			{
-				borderClass = spark.skins.mobile320.assets.SpinnerListContainerBackground;
-				selectionIndicatorClass = spark.skins.mobile320.assets.SpinnerListContainerSelectionIndicator;
-				shadowClass = spark.skins.mobile320.assets.SpinnerListContainerShadow;
-
-				cornerRadius = 10;
-				borderThickness = 2;
-				selectionIndicatorHeight = 96;
-				break;
-			}
-			case DPIClassification.DPI_240:
-			{
-				borderClass = spark.skins.mobile240.assets.SpinnerListContainerBackground;
-				selectionIndicatorClass = spark.skins.mobile240.assets.SpinnerListContainerSelectionIndicator;
-				shadowClass = spark.skins.mobile240.assets.SpinnerListContainerShadow;
-
-				cornerRadius = 8;
-				borderThickness = 1;
-				selectionIndicatorHeight = 72;
-				break;
-			}
-			default: // default DPI_160
-			{
-				borderClass = spark.skins.mobile160.assets.SpinnerListContainerBackground;
-				selectionIndicatorClass = spark.skins.mobile160.assets.SpinnerListContainerSelectionIndicator;
-				shadowClass = spark.skins.mobile160.assets.SpinnerListContainerShadow;
-
-				cornerRadius = 5;
-				borderThickness = 1;
-				selectionIndicatorHeight = 48;
-
-				break;
-			}
-		}
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     *
+     */
+    public function SpinnerListContainerSkin()
+    {
+        super();
+
+        switch (applicationDPI)
+        {
+            case DPIClassification.DPI_320:
+            {
+                borderClass = spark.skins.mobile320.assets.SpinnerListContainerBackground;
+                selectionIndicatorClass = spark.skins.mobile320.assets.SpinnerListContainerSelectionIndicator;
+                shadowClass = spark.skins.mobile320.assets.SpinnerListContainerShadow;
+
+                cornerRadius = 10;
+                borderThickness = 2;
+                selectionIndicatorHeight = 96;
+                break;
+            }
+            case DPIClassification.DPI_240:
+            {
+                borderClass = spark.skins.mobile240.assets.SpinnerListContainerBackground;
+                selectionIndicatorClass = spark.skins.mobile240.assets.SpinnerListContainerSelectionIndicator;
+                shadowClass = spark.skins.mobile240.assets.SpinnerListContainerShadow;
+
+                cornerRadius = 8;
+                borderThickness = 1;
+                selectionIndicatorHeight = 72;
+                break;
+            }
+            default: // default DPI_160
+            {
+                borderClass = spark.skins.mobile160.assets.SpinnerListContainerBackground;
+                selectionIndicatorClass = spark.skins.mobile160.assets.SpinnerListContainerSelectionIndicator;
+                shadowClass = spark.skins.mobile160.assets.SpinnerListContainerShadow;
+
+                cornerRadius = 5;
+                borderThickness = 1;
+                selectionIndicatorHeight = 48;
+
+                break;
+            }
+        }

         minWidth = 30;
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Variables
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Pixel thickness of the border
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var borderThickness:Number;
-
-	/**
-	 *  Radius of the border corners
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var cornerRadius:Number;
-
-	/**
-	 *  Height of the selection indicator
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var selectionIndicatorHeight:Number;
-
-	/**
-	 *  Class for the border part
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var borderClass:Class;
-
-	/**
-	 *  Class for the selection indicator part
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var selectionIndicatorClass:Class;
-
-	/**
-	 *  Class for the shadow part
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var shadowClass:Class;
-
-	/**
-	 *  Border part which includes the background
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var border:InteractiveObject;
-
-	/**
-	 *  Selection indicator part
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var selectionIndicator:InteractiveObject;
-
-	/**
-	 *  Shadow part
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var shadow:InteractiveObject;
-
-	/**
-	 *  Mask for the content group
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	protected var contentGroupMask:Sprite;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Skin parts
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  An optional skin part that defines the Group where the content
-	 *  children get pushed into and laid out.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.6
-	 */
-	public var contentGroup:Group;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------
-	/**
-	 *  @copy spark.skins.spark.ApplicationSkin#hostComponent
-	 */
-	public var hostComponent:SpinnerListContainer;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Overridden Methods
-	//
-	//--------------------------------------------------------------------------
-	override protected function createChildren():void
-	{
-		super.createChildren();
-
-		if (!border)
-		{
-			// Border and background
-			border = new borderClass();
-			border.mouseEnabled = false;
-			addChild(border);
-		}
-
-		if (!contentGroup)
-		{
-			// Contains the child elements
-			contentGroup = new Group();
-			var hLayout:HorizontalLayout = new HorizontalLayout();
-			hLayout.gap = 0;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Pixel thickness of the border.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var borderThickness:Number;
+
+    /**
+     *  Radius of the border corners.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var cornerRadius:Number;
+
+    /**
+     *  Height of the selection indicator.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var selectionIndicatorHeight:Number;
+
+    /**
+     *  Class for the border part.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var borderClass:Class;
+
+    /**
+     *  Class for the selection indicator skin part.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var selectionIndicatorClass:Class;
+
+    /**
+     *  Class for the shadow skin part.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var shadowClass:Class;
+
+    /**
+     *  Border skin part which includes the background.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var border:InteractiveObject;
+
+    /**
+     *  Selection indicator skin part.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var selectionIndicator:InteractiveObject;
+
+    /**
+     *  Shadow skin part.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var shadow:InteractiveObject;
+
+    /**
+     *  Mask for the content group.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    protected var contentGroupMask:Sprite;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Skin parts
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  An optional skin part that defines the Group where the content
+     *  children are pushed into and laid out.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    public var contentGroup:Group;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  @copy spark.skins.spark.ApplicationSkin#hostComponent
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.6
+     */
+    public var hostComponent:SpinnerListContainer;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        if (!border)
+        {
+            // Border and background
+            border = new borderClass();
+            border.mouseEnabled = false;
+            addChild(border);
+        }
+
+        if (!contentGroup)
+        {
+            // Contains the child elements
+            contentGroup = new Group();
+            var hLayout:HorizontalLayout = new HorizontalLayout();
+            hLayout.gap = 0;
             hLayout.verticalAlign = "middle";
-			contentGroup.layout = hLayout;
-			contentGroup.id = "contentGroup";
-			addChild(contentGroup);
-		}
-
-		if (!shadow)
-		{
-			// Shadowing sits on top of the content
-			shadow = new shadowClass();
-			shadow.mouseEnabled = false;
-			addChild(shadow);
-		}
-
-		if (!selectionIndicator)
-		{
-			// Selection indicator is on top
-			selectionIndicator = new selectionIndicatorClass();
-			selectionIndicator.mouseEnabled = false;
-			addChild(selectionIndicator);
-		}
-
-		if (!contentGroupMask)
-		{
-			// Create a mask for the content
-			contentGroupMask = new Sprite();
-			addChild(contentGroupMask);
-		}
-	}
-
-	override protected function measure():void
-	{
-		super.measure();
-
-		var contentW:Number = contentGroup.getPreferredBoundsWidth();
-		var contentH:Number = contentGroup.getPreferredBoundsHeight();
-
-		measuredWidth = measuredMinWidth = contentW + borderThickness * 2;
-		measuredHeight = contentH + borderThickness * 2;
+            contentGroup.layout = hLayout;
+            contentGroup.id = "contentGroup";
+            addChild(contentGroup);
+        }
+
+        if (!shadow)
+        {
+            // Shadowing sits on top of the content
+            shadow = new shadowClass();
+            shadow.mouseEnabled = false;
+            addChild(shadow);
+        }
+
+        if (!selectionIndicator)
+        {
+            // Selection indicator is on top
+            selectionIndicator = new selectionIndicatorClass();
+            selectionIndicator.mouseEnabled = false;
+            addChild(selectionIndicator);
+        }
+
+        if (!contentGroupMask)
+        {
+            // Create a mask for the content
+            contentGroupMask = new Sprite();
+            addChild(contentGroupMask);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var contentW:Number = contentGroup.getPreferredBoundsWidth();
+        var contentH:Number = contentGroup.getPreferredBoundsHeight();
+
+        measuredWidth = measuredMinWidth = contentW + borderThickness * 2;
+        measuredHeight = contentH + borderThickness * 2;

         measuredMinHeight = selectionIndicatorHeight + borderThickness * 4;
         minHeight = measuredMinHeight;
-	}
-
-	override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
-	{
-		super.layoutContents(unscaledWidth, unscaledHeight);
-
+    }
+
+    /**
+     *  @private
+     */
+    override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        super.layoutContents(unscaledWidth, unscaledHeight);
+
         unscaledHeight = Math.max(unscaledHeight, selectionIndicatorHeight + borderThickness * 4);
-
-		setElementSize(contentGroup, unscaledWidth - borderThickness * 2, unscaledHeight - borderThickness * 2);
+
+        setElementSize(contentGroup, unscaledWidth - borderThickness * 2, unscaledHeight - borderThickness * 2);
         setElementPosition(contentGroup, borderThickness, borderThickness);
-
-		// Inset by the borderThickness horizontally because the selectionIndicator starts at 0
+
+        // Inset by the borderThickness horizontally because the selectionIndicator starts at 0
         setElementSize(border, unscaledWidth - borderThickness * 2, unscaledHeight);
-		setElementPosition(border, borderThickness, 0);
-
+        setElementPosition(border, borderThickness, 0);
+
         setElementSize(shadow, unscaledWidth - borderThickness * 4, unscaledHeight - borderThickness * 2);
-		setElementPosition(shadow, borderThickness * 2, borderThickness);
-
+        setElementPosition(shadow, borderThickness * 2, borderThickness);
+
         setElementSize(selectionIndicator, unscaledWidth, selectionIndicatorHeight);
-		setElementPosition(selectionIndicator, 0, Math.floor((unscaledHeight - selectionIndicatorHeight) / 2));
-
-		// The SpinnerLists contain a left and right border. We don't want to show the leftmost
-		// SpinnerLists's left border nor the rightmost one's right border.
-		// We inset the mask on the left and right sides to accomplish this.
-		var g:Graphics = contentGroupMask.graphics;
-		g.clear();
-		g.beginFill(0x00FF00);
-		g.drawRoundRect(borderThickness * 2, borderThickness,
-						unscaledWidth - borderThickness * 4,
-						unscaledHeight - borderThickness * 2,
-						cornerRadius, cornerRadius);
-		g.endFill();
-
-		contentGroup.mask = contentGroupMask;
-	}
+        setElementPosition(selectionIndicator, 0, Math.floor((unscaledHeight - selectionIndicatorHeight) / 2));
+
+        // The SpinnerLists contain a left and right border. We don't want to show the leftmost
+        // SpinnerLists's left border nor the rightmost one's right border.
+        // We inset the mask on the left and right sides to accomplish this.
+        var g:Graphics = contentGroupMask.graphics;
+        g.clear();
+        g.beginFill(0x00FF00);
+        g.drawRoundRect(borderThickness * 2, borderThickness,
+                        unscaledWidth - borderThickness * 4,
+                        unscaledHeight - borderThickness * 2,
+                        cornerRadius, cornerRadius);
+        g.endFill();
+
+        contentGroup.mask = contentGroupMask;
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12380
Author:   smgilson@adobe.com
Date:     2009-12-02T18:37:15.838623Z

Log Message:
-----------
ASDoc edits in preparation for localization

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DisplayLayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as
@@ -25,7 +25,8 @@
 import spark.components.List;

 /**
- *  The default drag proxy used when dragging from a Spark List based control.
+ *  The ListItemDragProxy class defines the default drag proxy used
+ *  when dragging from a Spark List based control.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -96,11 +97,11 @@
             offsetX = scrollRect.x;
             offsetY = scrollRect.y;
         }
-
-		var perspectiveProjection:PerspectiveProjection = dataGroup.transform.perspectiveProjection;
+
+        var perspectiveProjection:PerspectiveProjection = dataGroup.transform.perspectiveProjection;

         // Construct an image by adding clones of the visible item renderers
-		var elementsIn3D:Boolean = false;
+        var elementsIn3D:Boolean = false;
         var count:int = selection.length;
         for (var i:int = 0; i < count; i++)
         {
@@ -111,63 +112,63 @@
             if (!element || !(element is IItemRenderer))
                 continue;

-			if (element.is3D)
-				elementsIn3D = true;
-
+            if (element.is3D)
+                elementsIn3D = true;
+
             // Check visibility of the ItemRenderer. It's not guaranteed that the
             // dataGroup returns null for ItemRenderers outside the viewport
-			if (scrollRect)
-			{
-				var elementBounds:Rectangle;
-				if (element.hasLayoutMatrix3D)
-				{
-					// Bounds in child coordinates
-					elementBounds = new Rectangle(0, 0,
-												  element.getLayoutBoundsWidth(false),
-												  element.getLayoutBoundsHeight(false));
-
-					// Bounds transformed in 3D and projected to parent
-					elementBounds = MatrixUtil.projectBounds(elementBounds,
-															 element.getLayoutMatrix3D(),
-															 perspectiveProjection);
-				}
-				else
-					elementBounds = getElementBounds(element);
-
-				if (!scrollRect.containsRect(elementBounds) && !scrollRect.intersects(elementBounds))
-					continue;
-			}
+            if (scrollRect)
+            {
+                var elementBounds:Rectangle;
+                if (element.hasLayoutMatrix3D)
+                {
+                    // Bounds in child coordinates
+                    elementBounds = new Rectangle(0, 0,
+                                                  element.getLayoutBoundsWidth(false),
+                                                  element.getLayoutBoundsHeight(false));
+
+                    // Bounds transformed in 3D and projected to parent
+                    elementBounds = MatrixUtil.projectBounds(elementBounds,
+                                                             element.getLayoutMatrix3D(),
+                                                             perspectiveProjection);
+                }
+                else
+                    elementBounds = getElementBounds(element);
+
+                if (!scrollRect.containsRect(elementBounds) && !scrollRect.intersects(elementBounds))
+                    continue;
+            }

             var clone:IItemRenderer = cloneItemRenderer(IItemRenderer(element), list);

-			// Copy the dimensions
-			clone.width = element.width;
-			clone.height = element.height;
-
-			// Copy the transform
-			if (element.hasLayoutMatrix3D)
-				clone.setLayoutMatrix3D(element.getLayoutMatrix3D(), false);
-			else
-				clone.setLayoutMatrix(element.getLayoutMatrix(), false);
-			clone.x -= offsetX;
-			clone.y -= offsetY;
-
-			// Copy other relevant properties
-			clone.depth = element.depth;
-			clone.visible = element.visible;
-			if (element.postLayoutTransformOffsets)
-				clone.postLayoutTransformOffsets = element.postLayoutTransformOffsets;
-
-			// Put it in a dragging state
-			clone.dragging = true;
+            // Copy the dimensions
+            clone.width = element.width;
+            clone.height = element.height;
+
+            // Copy the transform
+            if (element.hasLayoutMatrix3D)
+                clone.setLayoutMatrix3D(element.getLayoutMatrix3D(), false);
+            else
+                clone.setLayoutMatrix(element.getLayoutMatrix(), false);
+            clone.x -= offsetX;
+            clone.y -= offsetY;
+
+            // Copy other relevant properties
+            clone.depth = element.depth;
+            clone.visible = element.visible;
+            if (element.postLayoutTransformOffsets)
+                clone.postLayoutTransformOffsets = element.postLayoutTransformOffsets;
+
+            // Put it in a dragging state
+            clone.dragging = true;

             // Add the clone as a child
             addElement(clone);
         }

         // Copy projection matrix, if there was an element in 3d.
-		if (elementsIn3D)
-			this.transform.perspectiveProjection = perspectiveProjection;
+        if (elementsIn3D)
+            this.transform.perspectiveProjection = perspectiveProjection;
     }

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


FEC-3114 error handling.

FEC-3114 error handling.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -796,8 +796,10 @@
 								if((_resource as HLSStreamingResource).manifest.streams.length < 1)
 									return;

+								if(indexHandler == null)
+									return;
+
 								// If this event is hit, set the quality level to the lowest available quality level
-
 								var newStream:String = indexHandler.getQualityLevelStreamName(0);
 								if(!newStream)
 								{


Clean up watermark values and watermark storage for sign respect.

--- HLSPlugin/src/com/kaltura/hls/m2ts/M2TSFileHandler.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/M2TSFileHandler.as
@@ -60,6 +60,11 @@

 		private var _decryptionIV:ByteArray;

+		public var flvLowWaterAudio:int = int.MIN_VALUE;
+		public var flvLowWaterVideo:int = int.MIN_VALUE;
+		public var flvRecoveringIFrame:Boolean = false;
+		public const filterThresholdMs:int = 64;
+
 		public function M2TSFileHandler()
 		{
 			super();
@@ -72,8 +77,8 @@
 			_timeOrigin = 0;
 			_timeOriginNeeded = true;

-			_segmentBeginSeconds = -1;
-			_segmentLastSeconds = -1;
+			_segmentBeginSeconds = Number.MAX_VALUE;
+			_segmentLastSeconds = -Number.MAX_VALUE;

 			_firstSeekTime = 0;

@@ -182,8 +187,8 @@
 				}
 			}

-			_segmentBeginSeconds = -1;
-			_segmentLastSeconds = -1;
+			_segmentBeginSeconds = Number.MAX_VALUE;
+			_segmentLastSeconds = -Number.MAX_VALUE;
 			_lastInjectedSubtitleTime = -1;
 			_encryptedDataBuffer.length = 0;

@@ -406,11 +411,6 @@
 			return basicProcessFileSegment(input || new ByteArray(), true);
 		}

-		public var flvLowWaterAudio:int = int.MIN_VALUE;
-		public var flvLowWaterVideo:int = int.MIN_VALUE;
-		public var flvRecoveringIFrame:Boolean = false;
-		public const filterThresholdMs:int = 64;
-
 		private function clearFLVWaterMarkFilter():void
 		{
 			flvLowWaterAudio = int.MIN_VALUE;


prevent crash when trying to get label from disposed data source

--- WeaveJS/src/weavejs/data/source/AbstractDataSource.as
+++ WeaveJS/src/weavejs/data/source/AbstractDataSource.as
@@ -18,6 +18,7 @@
 	import weavejs.WeaveAPI;
 	import weavejs.api.core.ICallbackCollection;
 	import weavejs.api.core.IDisposableObject;
+	import weavejs.api.core.ILinkableHashMap;
 	import weavejs.api.data.IAttributeColumn;
 	import weavejs.api.data.IDataSource;
 	import weavejs.api.data.IWeaveTreeNode;
@@ -51,7 +52,12 @@

 		public function getLabel():String
 		{
-			return label.value || Weave.getRoot(this).getName(this);
+			if (label.value)
+				return label.value;
+			var root:ILinkableHashMap = Weave.getRoot(this);
+			if (root)
+				return root.getName(this);
+			return null;
 		}

 		/**


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

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


FLEX-34053 - avoid copy operation remove all text in maskedtextinput

--- frameworks/projects/experimental/src/spark/components/MaskedTextInput.as
+++ frameworks/projects/experimental/src/spark/components/MaskedTextInput.as
@@ -22,6 +22,7 @@

     import flashx.textLayout.edit.SelectionState;
     import flashx.textLayout.operations.CompositeOperation;
+    import flashx.textLayout.operations.CopyOperation;
     import flashx.textLayout.operations.DeleteTextOperation;
     import flashx.textLayout.operations.InsertTextOperation;

@@ -442,6 +443,12 @@

                 an = ac = selectionActivePosition - offset;
             }
+            //copy
+            else if(event.operation is CopyOperation)
+            {
+                return; // avoid to remove all text on copy operation
+            }
+

             selectAll();
             insertText(outputText);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/skins/halo/BrokenImageBorderSkin.as
+++ frameworks/projects/framework/src/mx/skins/halo/BrokenImageBorderSkin.as
@@ -19,6 +19,11 @@
 /**
  *  The skin for the border of a SWFLoader or Image component when the content
  *  could not be loaded.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class BrokenImageBorderSkin extends ProgrammaticSkin
 {
@@ -32,6 +37,11 @@

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 17330
Author:   chiedozi@adobe.com
Date:     2010-08-16T17:36:59.538425Z

Log Message:
-----------
Removed the sections functionality from ViewNavigator and refactored that logic into TabbedViewNavigator.  Updated dependent performance tests and components.
Introduced MobileApplicationBase and TabbedMobileApplication do support the tabbed use case for mobile.
Deleted SliderSkin from the framework.  All mobile skins now extend MobileSkin.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/ViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as" copyfrom-rev="17260" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ScriptRunner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ComponentCatalog.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedMobileApplicationSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewHistoryData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/IPersistenceManager.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/IViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SliderSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/MobileApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
@@ -3,9 +3,10 @@

 import spark.components.Button;
 import spark.components.HScrollBar;
+import spark.skins.MobileSkin;

-public class HScrollBarSkin extends SliderSkin {
+public class HScrollBarSkin extends MobileSkin {

     public function HScrollBarSkin()
     {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/colorPickerClasses/SwatchPanel.as
+++ frameworks/projects/mx/src/mx/controls/colorPickerClasses/SwatchPanel.as
@@ -41,6 +41,11 @@
  *  Dispatched when the selected color changes.
  *
  *  @eventType flash.events.Event.CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="change", type="flash.events.Event")]

@@ -48,6 +53,11 @@
  *  Dispatched when the user presses the Enter key.
  *
  *  @eventType mx.events.FlexEvent.ENTER
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="enter", type="flash.events.Event")]

@@ -55,6 +65,11 @@
  *  Dispatched when the mouse rolls over a color.
  *
  *  @eventType mx.events.ColorPickerEvent.ITEM_ROLL_OVER
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="itemRollOver", type="mx.events.ColorPickerEvent")]

@@ -62,6 +77,11 @@
  *  Dispatched when the mouse rolls out of a color.
  *
  *  @eventType mx.events.ColorPickerEvent.ITEM_ROLL_OUT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="itemRollOut", type="mx.events.ColorPickerEvent")]

@@ -81,6 +101,11 @@
  *  The DataGrid control also ignores this style.
  *  The default value is undefined. If both this style and the
  *  backgroundImage style are undefined, the control has a transparent background.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="backgroundColor", type="uint", format="Color", inherit="no")]

@@ -93,24 +118,44 @@
  *  components that support the borderStyle style.
  *  The default value depends on the component class;
  *  if not overriden for the class, it is 0xAAB3B3.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="borderColor", type="uint", format="Color", inherit="no")]

 /**
  *  Number of columns in the swatch grid.
  *  The default value is 20.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="columnCount", type="int", inherit="no")]

 /**
  *  Color of the control border highlight.
  *  The default value is 0xC4CCCC (medium gray) .
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="highlightColor", type="uint", format="Color", inherit="yes")]

 /**
  *  Color for the left and right inside edges of a component's skin.
  *  The default value is 0xD5DDDD.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="shadowCapColor", type="uint", format="Color", inherit="yes")]

@@ -118,6 +163,11 @@
  *  Bottom inside color of a button's skin.
  *  A section of the three-dimensional border.
  *  The default value is 0xEEEEEE (light gray).
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="shadowColor", type="uint", format="Color", inherit="yes")]

@@ -125,42 +175,77 @@
  *  Height of the larger preview swatch that appears above the swatch grid on
  *  the top left of the SwatchPanel object.
  *  The default value is 22.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="previewHeight", type="Number", format="Length", inherit="no")]

 /**
  *  Width of the larger preview swatch.
  *  The default value is 45.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="previewWidth", type="Number", format="Length", inherit="no")]

 /**
  *  Size of the swatchBorder outlines.
  *  The default value is 1.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchBorderSize", type="Number", format="Length", inherit="no")]

 /**
  *  Color of the swatch borders.
  *  The default value is 0x000000.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchBorderColor", type="uint", format="Color", inherit="no")]

 /**
  *  Size of the single border around the grid of swatches.
  *  The default value is 0.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchGridBorderSize", type="Number", format="Length", inherit="no")]

 /**
  *  Color of the background rectangle behind the swatch grid.
  *  The default value is 0x000000.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchGridBackgroundColor", type="uint", format="Color", inherit="no")]

 /**
  *  Height of each swatch.
  *  The default value is 12.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchHeight", type="Number", format="Length", inherit="no")]

@@ -168,6 +253,11 @@
  *  Color of the highlight that appears around the swatch when the user
  *  rolls over a swatch.
  *  The default value is 0xFFFFFF.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchHighlightColor", type="uint", format="Color", inherit="no")]

@@ -175,12 +265,22 @@
  *  Size of the highlight that appears around the swatch when the user
  *  rolls over a swatch.
  *  The default value is 1.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchHighlightSize", type="Number", format="Length", inherit="no")]

 /**
  *  Width of each swatch.
  *  The default value is 12.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="swatchWidth", type="Number", format="Length", inherit="no")]

@@ -188,12 +288,22 @@
  *  @REVIEW
  *  Name of the style sheet definition to configure the text input control.
  *  The default value is "swatchPanelTextField"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="textFieldStyleName", type="String", inherit="no")]

 /**
  *  Width of the hexadecimal text box that appears above the swatch grid.
  *  The default value is 72.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="textFieldWidth", type="Number", format="Length", inherit="no")]

@@ -218,6 +328,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function SwatchPanel()
     {
@@ -460,6 +575,11 @@

     /**
 	 *  Storage for the colorField property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
     private var _colorField:String = "color";

@@ -485,6 +605,11 @@

     /**
 	 *  Storage for the dataProvider property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private var _dataProvider:IList;

@@ -535,6 +660,11 @@

     /**
 	 *  Storage for the editable property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private var _editable:Boolean = true;

@@ -563,6 +693,11 @@

     /**
 	 *  Storage for the labelField property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
     private var _labelField:String = "label";

@@ -600,6 +735,11 @@

     /**
 	 *  Storage for the selectedColor property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
     private var _selectedColor:uint = 0x000000;

@@ -653,6 +793,11 @@

     /**
 	 *  Storage for the selectedIndex property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
     private var _selectedIndex:int = 0;

@@ -717,6 +862,11 @@

     /**
 	 *  Storage for the showTextField property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
     private var _showTextField:Boolean = true;


FLEX-34850 Making the column sorting identical, whether or not the dataField is complex.

--- frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
@@ -19,25 +19,22 @@

 package spark.components.gridClasses
 {
-import flash.events.Event;
-import flash.events.EventDispatcher;
-
-import mx.core.ClassFactory;
-import mx.core.IFactory;
-import mx.core.mx_internal;
-import mx.events.CollectionEvent;
-import mx.events.CollectionEventKind;
-import mx.events.PropertyChangeEvent;
-import mx.formatters.IFormatter;
-import mx.styles.IAdvancedStyleClient;
-import mx.utils.ObjectUtil;
-
-import spark.collections.SortField;
-import spark.components.Grid;
-import spark.components.gridClasses.DefaultGridItemEditor;
-import spark.components.gridClasses.GridSortField;
-
-use namespace mx_internal;
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+
+    import mx.core.ClassFactory;
+    import mx.core.IFactory;
+    import mx.events.CollectionEvent;
+    import mx.events.CollectionEventKind;
+    import mx.events.PropertyChangeEvent;
+    import mx.formatters.IFormatter;
+    import mx.styles.IAdvancedStyleClient;
+    import mx.utils.ObjectUtil;
+
+    import spark.collections.SortField;
+    import spark.components.Grid;
+
+    use namespace mx_internal;

 /**
  *  The GridColumn class defines a column of a Spark grid control,
@@ -160,13 +157,7 @@
         const obj1String:String = column.itemToString(obj1, dataFieldPath, null, formatter);
         const obj2String:String = column.itemToString(obj2, dataFieldPath, null, formatter);

-        if ( obj1String < obj2String )
-            return -1;
-
-        if ( obj1String > obj2String )
-            return 1;
-
-        return 0;
+        return ObjectUtil.stringCompare(obj1String, obj2String);
     }

     //--------------------------------------------------------------------------
@@ -1856,10 +1847,10 @@
     /**
      *  @private
      */
-    private function dispatchChangeEvent(type:String):void
-    {
-        if (hasEventListener(type))
-            dispatchEvent(new Event(type));
+    private function dispatchChangeEvent(eventType:String):void
+    {
+        if (hasEventListener(eventType))
+            dispatchEvent(new Event(eventType));
     }

     /**