attempting to better support preload="auto" in Flash

--- src/flash/htmlelements/VideoElement.as
+++ src/flash/htmlelements/VideoElement.as
@@ -1,388 +1,415 @@
-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 _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 _videoWidth:Number = -1;
-		private var _videoHeight:Number = -1;
-
-		private var _timer:Timer;
-
-		private var _isRTMP:Boolean = false;
-		private var _isConnected:Boolean = false;
-		private var _playWhenConnected:Boolean = false;
-		private var _hasStartedPlaying:Boolean = false;
-
-		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 currentTime():Number {
-			if (_stream != null) {
-				return _stream.time;
-			} else {
-				return 0;
-			}
-		}
-
-		// (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)
-		{
-			_element = element;
-			_autoplay = autoplay;
-			_volume = startVolume;
-			_preload = preload;
-
-			_video = new Video();
-			addChild(_video);
-
-			_connection = new NetConnection();
-			_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);
-					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 {
-			_duration = info.duration;
-			_framerate = info.framerate;
-			_videoWidth = info.width;
-			_videoHeight = info.height;
-
-			// set size?
-
-			sendEvent(HtmlMediaEvent.LOADEDMETADATA);
-		}
-
-
-
-
-		// 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)?\:\/\//);
-			_isConnected = false;
-			_hasStartedPlaying = false;
-		}
-
-		public function load():void {
-			// disconnect existing stream and connection
-			if (_isConnected && _stream) {
-				_stream.pause();
-				_stream.close();
-				_connection.close();
-			}
-			_isConnected = false;
-
-			// start new connection
-			if (_isRTMP) {
-				_connection.connect(_currentUrl.replace(/\/[^\/]+$/,"/"));
-			} 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;
-
-			_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) {
-				_stream.play(_currentUrl, 0, 0);
-
-				_stream.pause();
-				_isPaused = true;
-				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) {
-					_stream.play(_currentUrl.split("/").pop());
-				} else {
-					_stream.play(_currentUrl);
-				}
-				_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;
-
-			sendEvent(HtmlMediaEvent.SEEKING);
-			_stream.seek(pos);
-			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 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:" + (_stream != null ? _stream.time : 0) +
-							",muted:" + _isMuted +
-							",paused:" + _isPaused +
-							",ended:" + _isEnded +
-							",volume:" + _volume +
-							",src:\"" + _currentUrl + "\"" +
-							",bytesTotal:" + _bytesTotal +
-							",bufferedBytes:" + _bytesLoaded +
-							",bufferedTime:" + _bufferedTime +
-							",videoWidth:" + _videoWidth +
-							",videoHeight:" + _videoHeight +
-							"";
-
-			_element.sendEvent(eventName, values);
-		}
-	}
+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 _videoWidth:Number = -1;
+		private var _videoHeight:Number = -1;
+
+		private var _timer:Timer;
+
+		private var _isRTMP:Boolean = false;
+		private var _isConnected:Boolean = false;
+		private var _playWhenConnected:Boolean = false;
+		private var _hasStartedPlaying:Boolean = false;
+
+		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 currentTime():Number {
+			if (_stream != null) {
+				return _stream.time;
+			} else {
+				return 0;
+			}
+		}
+
+		// (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)
+		{
+			_element = element;
+			_autoplay = autoplay;
+			_volume = startVolume;
+			_preload = preload;
+
+			_video = new Video();
+			addChild(_video);
+
+			_connection = new NetConnection();
+			_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 {
+			_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)?\:\/\//);
+			_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;
+
+			// start new connection
+			if (_isRTMP) {
+				_connection.connect(_currentUrl.replace(/\/[^\/]+$/,"/"));
+			} 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;
+
+			_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(_currentUrl, 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) {
+					_stream.play(_currentUrl.split("/").pop());
+				} else {
+					_stream.play(_currentUrl);
+				}
+				_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;
+
+			sendEvent(HtmlMediaEvent.SEEKING);
+			_stream.seek(pos);
+			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 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:" + (_stream != null ? _stream.time : 0) +
+							",muted:" + _isMuted +
+							",paused:" + _isPaused +
+							",ended:" + _isEnded +
+							",volume:" + _volume +
+							",src:\"" + _currentUrl + "\"" +
+							",bytesTotal:" + _bytesTotal +
+							",bufferedBytes:" + _bytesLoaded +
+							",bufferedTime:" + _bufferedTime +
+							",videoWidth:" + _videoWidth +
+							",videoHeight:" + _videoHeight +
+							"";
+
+			_element.sendEvent(eventName, values);
+		}
+	}
 }


Changed trim algorithm

Changed trim algorithm

--- flash/src/org/flashsocket/utils/StringUtil.as
+++ flash/src/org/flashsocket/utils/StringUtil.as
@@ -3,7 +3,7 @@

 	public class StringUtil {
 		public static function trim(input:String):String {
-			return input.replace(/^([\s|\t|\n]+)?(.*)([\s|\t|\n]+)?$/gm, "$2");
+			return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
 		}

 		public static function toBytes(input:String):ByteArray {


vector support

vector support

--- src/com/kemsky/Stream.as
+++ src/com/kemsky/Stream.as
@@ -720,6 +720,7 @@
             return new Stream(result);
         }

+        //todo access by negative index from the end of stream like Ruby
         override flash_proxy function getProperty(name:*):*
         {
             var index:int = -1;


Remove trailing whitespace.

Remove trailing whitespace.


Change 20090314-bargull-GHI by bargull@dell--p4--2-53 on 2009-03-14 19:31:57
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: add support for 'native' swf9 cursors

New Features: LPP-7912 (SWF9: support for default cursors)

Bugs Fixed:

Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
With this change the 'native' swf9 cursors (eg. hand- and ibeam-cursor) can be used for lz.Cursor.setCursorGlobal() and lz.view#cursor.

Tests:
testcase at bugreport

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@13289 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
@@ -15,6 +15,7 @@
     import flash.events.Event;
     import flash.events.MouseEvent;
     import flash.ui.Mouse;
+    import flash.ui.MouseCursor;
     }#

@@ -50,13 +51,13 @@
             LFCApplication.stage.addEventListener(Event.MOUSE_LEAVE, __mouseLeaveHandler);
             __listeneradded = true;
         }
-    }
+    }

     // Handles global mouse events
     static function __mouseHandler(event:MouseEvent):void {
         var eventname:String = 'on' + event.type.toLowerCase();
         if (eventname == 'onmouseup' && __lastMouseDown != null) {
-            // call mouseup on the sprite that got the last mouse down
+            // call mouseup on the sprite that got the last mouse down
             __lastMouseDown.__globalmouseup(event);
             __lastMouseDown = null;
         } else {
@@ -96,13 +97,30 @@
     }

     static var __amLocked:Boolean = false;
+    static var useBuiltinCursor:Boolean = false;
     static var cursorSprite:Sprite = null;
     static var globalCursorResource:String = null;
     static var lastCursorResource:String = null;

+    #passthrough {
+        private static var __builtinCursors:Object = null;
+        static function get builtinCursors () :Object {
+            if (__builtinCursors == null) {
+                var cursors:Object = {};
+                cursors[MouseCursor.ARROW] = true;
+                cursors[MouseCursor.AUTO] = true;
+                cursors[MouseCursor.BUTTON] = true;
+                cursors[MouseCursor.HAND] = true;
+                cursors[MouseCursor.IBEAM] = true;
+                __builtinCursors = cursors;
+            }
+            return __builtinCursors;
+        }
+    }#
+
     /**
     * Sets the cursor to a resource
-    * @param String what: The resource to use as the cursor.
+    * @param String what: The resource to use as the cursor.
     */
     static function setCursorGlobal (what:String) :void {
         globalCursorResource = what;
@@ -111,45 +129,66 @@

     static function setCursorLocal (what:String) :void {
         if ( __amLocked ) { return; }
-        Mouse.hide();
-        cursorSprite.x = LFCApplication.stage.mouseX;
-        cursorSprite.y = LFCApplication.stage.mouseY;
-        LFCApplication.setChildIndex(cursorSprite, LFCApplication._sprite.numChildren-1);
-        if (lastCursorResource != what) {
-            if (cursorSprite.numChildren > 0) {
-                cursorSprite.removeChildAt(0);
+        if (what == null) {
+            // null is invalid, maybe call restoreCursor()?
+            return;
+        } else if (lastCursorResource != what) {
+            var resourceSprite:Sprite = getCursorResource(what);
+            if (resourceSprite != null) {
+                if (cursorSprite.numChildren > 0) {
+                    cursorSprite.removeChildAt(0);
+                }
+                cursorSprite.addChild( resourceSprite );
+                useBuiltinCursor = false;
+            } else if (builtinCursors[what] != null) {
+                useBuiltinCursor = true;
+            } else {
+                // invalid cursor?
+                return;
             }
-            var resourceSprite:Sprite = getCursorResource(what);
-            cursorSprite.addChild( resourceSprite );
             lastCursorResource = what;
         }
-        // respond to mouse move events
-        cursorSprite.startDrag();
-        LFCApplication.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
-        cursorSprite.visible = true;
+        if (useBuiltinCursor) {
+            Mouse.cursor = what;
+            cursorSprite.stopDrag();
+            cursorSprite.visible = false;
+            LFCApplication.stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
+            Mouse.show();
+        } else {
+            Mouse.hide();
+            cursorSprite.x = LFCApplication.stage.mouseX;
+            cursorSprite.y = LFCApplication.stage.mouseY;
+            LFCApplication.setChildIndex(cursorSprite, LFCApplication._sprite.numChildren-1);
+            // respond to mouse move events
+            cursorSprite.startDrag();
+            LFCApplication.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
+            cursorSprite.visible = true;
+        }
     }

     static function mouseLeaveHandler(evt:Event):void {
         cursorSprite.visible = false;
     }

-
     static function getCursorResource (resource:String):Sprite {
+          if (! (LzAsset.isMovieClipAsset(resource) || LzAsset.isMovieClipLoaderAsset(resource))) {
+              // only swf cursors are supported
+              return null;
+          }
+
           var resinfo:Object = LzResourceLibrary[resource];
           var assetclass:Class;
-          var frames:Array = resinfo.frames;
-          var asset:Sprite;
           // single frame resources get an entry in LzResourceLibrary which has
           // 'assetclass' pointing to the resource Class object.
           if (resinfo.assetclass is Class) {
               assetclass = resinfo.assetclass;
           } else {
               // Multiframe resources have an array of Class objects in frames[]
+              var frames:Array = resinfo.frames;
               assetclass = frames[0];
           }

-          if (! assetclass) return null;
-          asset = new assetclass();
+          var asset:Sprite = new assetclass();
           asset.scaleX = 1.0;
           asset.scaleY = 1.0;
           //Debug.write('cursor asset', asset);
@@ -159,14 +198,16 @@
     /**
     * This function restores the default cursor if there is no locked cursor on
     * the screen.
-    *
+    *
     * @access private
     */
     static function restoreCursor () :void {
         if ( __amLocked ) { return; }
         cursorSprite.stopDrag();
         cursorSprite.visible = false;
+        LFCApplication.stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
         globalCursorResource = null;
+        Mouse.cursor = MouseCursor.AUTO;
         Mouse.show();
     }

@@ -185,7 +226,7 @@

     /**
     * Prevents the cursor from being changed until unlock is called.
-    *
+    *
     */
     static function lock () :void {
         __amLocked = true;
@@ -193,11 +234,11 @@

     /**
     * Restores the default cursor.
-    *
+    *
     */
     static function unlock () :void {
         __amLocked = false;
-        restoreCursor();
+        restoreCursor();
     }

     static function initCursor () :void {


default to KEYFRAME_SEEK

default to KEYFRAME_SEEK

--- src/org/mangui/hls/HLSSettings.as
+++ src/org/mangui/hls/HLSSettings.as
@@ -61,11 +61,10 @@
          * Defines seek mode to one form available in HLSSeekMode class:
          *      HLSSeekMode.ACCURATE_SEEK - accurate seeking to exact requested position
          *      HLSSeekMode.KEYFRAME_SEEK - key-frame based seeking (seek to nearest key frame before requested seek position)
-         *      HLSSeekMode.SEGMENT_SEEK - segment based seeking (seek to beginning of segment containing requested seek position)
          *
-         * Default is HLSSeekMode.ACCURATE_SEEK.
+         * Default is HLSSeekMode.KEYFRAME_SEEK.
          */
-        public static var seekMode : String = HLSSeekMode.ACCURATE_SEEK;
+        public static var seekMode : String = HLSSeekMode.KEYFRAME_SEEK;
         /** max nb of retries for Key Loading in case I/O errors are met,
          *      0, means no retry, error will be triggered automatically
          *     -1 means infinite retry


Partially reverting an earlier commit 50acb03a2aa35890b344292eb41daaa5ad021142 since it was causing hangs in some cases.  Setting the bufferTime attribute on the NetStream seems to help the case of stuttering audio (currently set to 5 seconds).

--- actionscript/happyworm/jPlayer/JplayerMp4.as
+++ actionscript/happyworm/jPlayer/JplayerMp4.as
@@ -208,6 +208,7 @@
 			// customClient.onPlayStatus = onPlayStatusHandler; // According to the forums and my tests, onPlayStatus only works with FMS (Flash Media Server).
 			myStream = null;
 			myStream = new NetStream(myConnection);
+			myStream.bufferTime = 5;
 			myStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
 			myStream.client = customClient;
 			myVideo.attachNetStream(myStream);
@@ -300,14 +301,10 @@
 			}
 		}

-		public function seekToPausePosition():void {
+		public function seekToPausePositionAndPlay():void {
 			setTemporaryVolume(0);
+			myStatus.playAfterFlashIsSeeking = true; // Note that once flash is done seeking, we should resume/play the stream.
 			myStream.seek(myStatus.pausePosition/1000); // Seek to the pause position.
-		}
-
-		public function seekToPausePositionAndPlay():void {
-			myStatus.playAfterFlashIsSeeking = true; // Note that once flash is done seeking, we should resume/play the stream.
-			seekToPausePosition();
 		}

 		public function pause(time:Number = NaN):Boolean {
@@ -355,14 +352,14 @@
 			} else if(myStatus.isLoading || myStatus.isLoaded) {
 				if(myStatus.metaDataReady && myStatus.pausePosition > myStatus.duration) { // The time is invalid, ie., past the end.
 					myStatus.pausePosition = 0;
-					seekToPausePosition();
+					seekToPausePositionAndPlay();
 					seekedEvent(); // Deals with seeking effect when using setMedia() then pause(huge). NB: There is no preceeding seeking event.
 				} else if(!isNaN(time)) {
 					if(getSeekTimeRatio() > getLoadRatio()) { // Use an estimate based on the downloaded amount
 						seeking(true);
 					} else {
 						if(myStatus.metaDataReady) { // Otherwise seek(0) will stop the metadata loading.
-							seekToPausePosition();
+							seekToPausePositionAndPlay();
 						}
 					}
 				}


Add check for if game has been won.

Add check for if game has been won.


cleaned up debugging code

cleaned up debugging code

Change-Id: I79a3763027807c091c16a3eb53c83ce60723e664

--- WeaveUISpark/src/weave/visualization/layers/PlotTask.as
+++ WeaveUISpark/src/weave/visualization/layers/PlotTask.as
@@ -57,6 +57,7 @@
 	 */
 	public class PlotTask implements IPlotTask, ILinkableObject, IDisposableObject
 	{
+		public static var debugBusy:Boolean = false;
 		public static var debugMouseDownPause:Boolean = false;
 		public static var debugIgnoreSpatialIndex:Boolean = false;

@@ -64,8 +65,6 @@

 		private function debugTrace(...args):void
 		{
-			return; // comment this out to enable debugging
-
 			args.unshift(toString());
 			$debugTrace.apply(null, args);
 		}
@@ -78,7 +77,7 @@
 				['subset','selection','probe'][_taskType]
 			].join('-');

-			if (linkableObjectIsBusy(this))
+			if (debugBusy && linkableObjectIsBusy(this))
 				str += '(busy)';

 			return str;
@@ -259,7 +258,7 @@
 			if (shouldBeRendered())
 			{
 				asyncInit();
-				debugTrace('begin async rendering');
+				//debugTrace('begin async rendering');
 				WeaveAPI.StageUtils.startTask(this, asyncIterate, WeaveAPI.TASK_PRIORITY_RENDERING, asyncComplete);

 				// assign secondary busy task in case async task gets cancelled due to busy dependencies
@@ -301,7 +300,7 @@
 			// stop immediately if we shouldn't be rendering
 			if (shouldBeRendered())
 			{
-				debugTrace(this.toString(),'clear');
+				//debugTrace(this.toString(),'clear');
 				// clear bitmap and resize if necessary
 				PlotterUtils.setBitmapDataSize(bufferBitmap, _unscaledWidth, _unscaledHeight);
 			}
@@ -325,7 +324,7 @@
 			// if plotter is busy, stop immediately
 			if (WeaveAPI.SessionManager.linkableObjectIsBusy(_dependencies))
 			{
-				debugTrace('dependencies are busy');
+				//debugTrace('dependencies are busy');
 				if (!debugIgnoreSpatialIndex)
 					return 1;

@@ -349,7 +348,7 @@
 				// stop immediately if the bitmap is invalid
 				if (PlotterUtils.bitmapDataIsEmpty(bufferBitmap))
 				{
-					debugTrace('bitmap is empty');
+					//debugTrace('bitmap is empty');
 					return 1;
 				}

@@ -389,7 +388,7 @@
 						}
 					}
 				}
-				debugTrace(this.toString(),'recordKeys',_recordKeys.length);
+				//debugTrace(this.toString(),'recordKeys',_recordKeys.length);

 				// done with keys
 				_pendingKeys = null;
@@ -406,7 +405,7 @@
 				_delayInit = true;

 				_progress = _plotter.drawPlotAsyncIteration(this);
-				debugTrace(this.toString(),'iteration',_iteration,'progress',_progress);
+				//debugTrace(this.toString(),'iteration',_iteration,'progress',_progress);

 				_delayInit = false;

@@ -421,7 +420,7 @@

 		private function asyncComplete():void
 		{
-			debugTrace('rendering completed');
+			//debugTrace('rendering completed');
 			_progress = 0;
 			// don't do anything else if dependencies are busy
 			if (WeaveAPI.SessionManager.linkableObjectIsBusy(_dependencies))


- change: Added getters for maxScrollPosition and minScrollPosition to Scrollbar

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@838 bc4816be-ef27-423a-9c4d-fc420be121a2


Fixed indentation

Fixed indentation

--- src/Player.as
+++ src/Player.as
@@ -199,18 +199,18 @@

     public function speakerVolume(volume:Number):void {
       this.savedSpeakerVolume = volume;
-	    var transform:SoundTransform = new SoundTransform(volume);
-	    flash.media.SoundMixer.soundTransform = transform;
+      var transform:SoundTransform = new SoundTransform(volume);
+      flash.media.SoundMixer.soundTransform = transform;
     }

     public function muteSpeaker():void {
-		  var transform:SoundTransform = new SoundTransform(0);
-		  flash.media.SoundMixer.soundTransform = transform;
+      var transform:SoundTransform = new SoundTransform(0);
+      flash.media.SoundMixer.soundTransform = transform;
     }

     public function unmuteSpeaker():void {
-		  var transform:SoundTransform = new SoundTransform(this.savedSpeakerVolume);
-		  flash.media.SoundMixer.soundTransform = transform;
+      var transform:SoundTransform = new SoundTransform(this.savedSpeakerVolume);
+      flash.media.SoundMixer.soundTransform = transform;
     }

     public function microphoneVolume(volume:Number):void {


Fix for failure to unwrap MPEG2 timestamps.

--- HLSPlugin/src/com/kaltura/hls/m2ts/PESProcessor.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/PESProcessor.as
@@ -76,8 +76,9 @@
             lastVideoNALU = null;
             transcoder.clear(clearAACConfig);

-            // Reset PTS/DTS reference.
-            lastPTS = lastDTS = NaN;
+            // Don't reset PTS/DTS reference. This implies the
+            // total stream length is < ~27 hours or else you'll
+            // get erroneous timecodes.
         }

         private function parseProgramAssociationTable(bytes:ByteArray, cursor:uint):Boolean


Transferred from the Adobe Open Source Subversion Repository

Revision: 7836
Author:   chaase@adobe.com
Date:     2009-06-15T14:37:21.379918Z

Log Message:
-----------
PARB changes for effects. This includes various property renames, a couple of class renames, moving 3 classes to a sub-package, and various doc cleanups. This also includes changing a handful of Array properties to typed Vectors.

QE: This breaks Mustella due to the renames
Doc: Docs will need to be updated to reflect the changes as well
Bugs: None
Reviewer: Jason
Tests: checkintests, Thermo's transitionbug test

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EasingFraction.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/KeyFrame.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/RepeatBehavior.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/CallActionInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/HSBColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.pbk</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/WipeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Move.as
+++ frameworks/projects/spark/src/spark/effects/Move.as
@@ -15,6 +15,7 @@

 import mx.effects.IEffectInstance;

+import spark.effects.animation.MotionPath;
 import spark.effects.supportClasses.AnimateTransformInstance;

 /**
@@ -223,7 +224,7 @@
      */
     override public function createInstance(target:Object = null):IEffectInstance
     {
-        motionPaths = [];
+        motionPaths = new Vector.<MotionPath>();
         return super.createInstance(target);
     }


only perform keep-alive tasks if keep-alive is set in config

--- src/com/axis/rtspclient/RTSPClient.as
+++ src/com/axis/rtspclient/RTSPClient.as
@@ -93,7 +93,6 @@
       this.bcTimer.stop(); // Don't start timeout immediately
       this.bcTimer.reset();
       this.bcTimer.addEventListener(TimerEvent.TIMER_COMPLETE, bcTimerHandler);
-
       this.setKeepAlive(Player.config.keepAlive);

       this.startOptions = options;
@@ -144,7 +143,9 @@

       /* Stop timer, don't close the connection when paused. */
       bcTimer.stop();
-      kaTimer.stop();
+      if (Player.config.keepAlive) {
+        kaTimer.stop();
+      }

       this.ns.pause();

@@ -507,9 +508,12 @@
         }

         /* Start Keep-alive routine */
-        kaTimer.reset();
-        kaTimer.addEventListener(TimerEvent.TIMER, keepAlive);
-        kaTimer.start();
+        if (Player.config.keepAlive) {
+          kaTimer.reset();
+          kaTimer.addEventListener(TimerEvent.TIMER, keepAlive);
+          kaTimer.start();
+        }
+
         break;

       case STATE_PLAYING:


added addClass to ObjectPool

added addClass to ObjectPool

--- src/hype/framework/core/ObjectPool.as
+++ src/hype/framework/core/ObjectPool.as
@@ -13,7 +13,6 @@
 		private var _count:uint;
 		private var _activeSet:ObjectSet;
 		private var _inactiveSet:ObjectSet;
-		private var _makeObject:Function;

 		/**
 		 * Callback for when new objects are created
@@ -39,11 +38,9 @@
 		public function ObjectPool(content:*, max:uint) {

 			if (content is Class) {
-				_objectClass = content as Class;
-				_makeObject = makeSingleObject;
+				_classList = [content as Class];
 			} else if (content is Array) {
 				_classList = content as Array;
-				_makeObject = makeRandomObject;
 			} else {
 				throw new Error("Bad argument passed to ObjectPool. First argument must be class or array of classes");
 			}
@@ -70,6 +67,20 @@
 			return _max == _count;
 		}

+		/**
+		 * Add an additional class
+		 *
+		 * @param objectClass class you would like to add
+		 * @param numTimes Number of times to add the class (defaults to 1)
+		 */
+		 public function addClass(objectClass:Class, numTimes:uint=1):void {
+		 	var i:int;
+
+		 	for (i=0; i<numTimes; ++i) {
+		 		_classList.push(objectClass);
+		 	}
+		 }
+

 		/**
 		 * Request a new object. If no objects are available, null is returned.
@@ -86,7 +97,7 @@

 				return obj;
 			} else if (_count < _max) {
-				obj = _makeObject();
+				obj = makeRandomObject();
 				++_count;
 				_activeSet.insert(obj);
 				onCreateObject(obj);
@@ -127,10 +138,6 @@
 			}
 		}

-		private function makeSingleObject():Object {
-			return new _objectClass();
-		}
-
 		private function makeRandomObject():Object {
 			var i:int = int(Math.random() * _classList.length);
 			return new _classList[i];


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

--- frameworks/projects/framework/src/mx/core/FlexBitmap.as
+++ frameworks/projects/framework/src/mx/core/FlexBitmap.as
@@ -21,6 +21,11 @@
  *  It overrides the toString() method
  *  to return a string indicating the location of the object
  *  within the hierarchy of DisplayObjects in the application.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class FlexBitmap extends Bitmap
 {
@@ -51,6 +56,11 @@
 	 *
 	 *  @see flash.display.DisplayObject#name
 	 *  @see mx.utils.NameUtil#createUniqueName()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function FlexBitmap(bitmapData:BitmapData = null,
 							   pixelSnapping:String = "auto",
@@ -96,6 +106,11 @@
 	 *
 	 *  @see flash.display.DisplayObject#name
 	 *  @see mx.utils.NameUtil#displayObjectToString()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override public function toString():String
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 18396
Author:   jszeto@adobe.com
Date:     2010-11-01T20:44:35.953746Z

Log Message:
-----------
Transition Interruption Bug Fixes

SDK-28277 -  If you interrupt a Transition where interruptionBehavior="stop" and the Transition includes an AddAction, you get a RTE

Added checks to AddItems to be more lenient about removing items that might not have been added.

SDK-28108 -  Values for the interruptionBehavior property on Transition is not hinted in FB

added metadata

QE notes: none
Doc notes: none
Bugs: SDK-28277, SDK-28108
Reviewer: Corey
Tests run: cyclone server
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/states/Transition.as</path>

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

--- frameworks/projects/framework/src/mx/states/AddItems.as
+++ frameworks/projects/framework/src/mx/states/AddItems.as
@@ -629,12 +629,18 @@
         if ((propertyName == null || propertyName == "mxmlContent") && (dest is IVisualElementContainer))
         {
             for (i = 0; i < numAdded; i++)
-                IVisualElementContainer(dest).removeElementAt(startIndex);
+            {
+                if (IVisualElementContainer(dest).numElements > startIndex)
+                    IVisualElementContainer(dest).removeElementAt(startIndex);
+            }
         }
         else if (propertyName == null && dest is IChildList)
         {
             for (i = 0; i < numAdded; i++)
-                IChildList(dest).removeChildAt(startIndex);
+            {
+                if (IChildList(dest).numChildren > startIndex)
+                    IChildList(dest).removeChildAt(startIndex);
+            }
         }
         else if (propertyName != null && !isStyle && dest[propertyName] is IList)
         {


Added a note about a failed attempt at making things better.

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

--- src/as/com/threerings/util/Integer.as
+++ src/as/com/threerings/util/Integer.as
@@ -3,6 +3,11 @@
 /**
  * Equivalent to java.lang.Integer.
  */
+// Unfortunately, I think this is necessary.
+// I was going to remove this class and just make the streaming stuff
+// autotranslate between int <--> java.lang.Integer and
+// Number <--> java.lang.Double. However, a Number object that refers
+// to an integer value is actually an int. Yes, it's totally fucked.
 public class Integer
     implements Equalable
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 807
Author:   mhorn@adobe.com
Date:     2008-03-13T20:42:31.384362Z

Log Message:
-----------
Many minor ASDoc updates.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -860,7 +860,7 @@
             if (headerVisible && header)
             {
                 header.visibleColumns = visibleColumns;
-				header.headerItemsChanged = true;
+                header.headerItemsChanged = true;
                 header.invalidateSize();
                 header.validateNow();
             }
@@ -1307,13 +1307,13 @@
         super.invalidateDisplayList();
         if (header)
         {
-			header.headerItemsChanged = true;
+            header.headerItemsChanged = true;
             header.invalidateSize();
             header.invalidateDisplayList();
         }
         if (lockedColumnHeader)
         {
-			lockedColumnHeader.headerItemsChanged = true;
+            lockedColumnHeader.headerItemsChanged = true;
             lockedColumnHeader.invalidateSize();
             lockedColumnHeader.invalidateDisplayList();
         }
@@ -1965,12 +1965,12 @@
         if (!displayableColumns)
             return;

-		// for purposes of computing rows, we need to accomodate
-		// the case where all the visible columns are locked columns
-		var countableContentListItems:Array = this.listItems;
-		if (visibleColumns && !visibleColumns.length && visibleLockedColumns && visibleLockedColumns.length)
-			countableContentListItems = lockedColumnContent.listItems;
-
+        // for purposes of computing rows, we need to accomodate
+        // the case where all the visible columns are locked columns
+        var countableContentListItems:Array = this.listItems;
+        if (visibleColumns && !visibleColumns.length && visibleLockedColumns && visibleLockedColumns.length)
+            countableContentListItems = lockedColumnContent.listItems;
+
         var oldHorizontalScrollBar:Object = horizontalScrollBar;
         var oldVerticalScrollBar:Object = verticalScrollBar;

@@ -2031,18 +2031,18 @@
             && listItems[0][colCount - 1].x +
             visibleColumns[colCount - 1].width > (displayWidth - listContent.x + viewMetrics.left))
             colCount--;
-		else if (colCount > 1 && !collectionHasRows &&
+        else if (colCount > 1 && !collectionHasRows &&
             visibleColumns[colCount - 1] == displayableColumns[displayableColumns.length - 1])
-		{
-			// the slower computation requires adding up the previous columns
-			var colX:int = 0;
-			for (var i:int = 0; i < visibleColumns.length; i++)
-			{
-				colX += visibleColumns[i].width;
-			}
-			if (colX > (displayWidth - listContent.x + viewMetrics.left))
-				colCount--;
-		}
+        {
+            // the slower computation requires adding up the previous columns
+            var colX:int = 0;
+            for (var i:int = 0; i < visibleColumns.length; i++)
+            {
+                colX += visibleColumns[i].width;
+            }
+            if (colX > (displayWidth - listContent.x + viewMetrics.left))
+                colCount--;
+        }

         // trace("configureSB", verticalScrollPosition);

@@ -2196,28 +2196,28 @@
             for (var i:int = 0; i < n; i++)
             {
                 if (listItems[i][0])
-					lastItem = listItems[i][0];
-
+                    lastItem = listItems[i][0];
+
                 if (rowInfo[i].y <= pt.y && pt.y < rowInfo[i].y + rowInfo[i].height)
                 {
                     item = listItems[i][0];
                     break;
                 }
             }
-			if (!item && lockedRowContent)
-			{
-	            pt = listContent.localToGlobal(pt);
-	            pt = lockedRowContent.globalToLocal(pt);
-				n = lockedRowContent.listItems.length;
-				for (i = 0; i < n; i++)
-				{
-					if (lockedRowContent.rowInfo[i].y <= pt.y && pt.y < lockedRowContent.rowInfo[i].y + lockedRowContent.rowInfo[i].height)
-					{
-						item = lockedRowContent.listItems[i][0];
-						break;
-					}
-				}
-			}
+            if (!item && lockedRowContent)
+            {
+                pt = listContent.localToGlobal(pt);
+                pt = lockedRowContent.globalToLocal(pt);
+                n = lockedRowContent.listItems.length;
+                for (i = 0; i < n; i++)
+                {
+                    if (lockedRowContent.rowInfo[i].y <= pt.y && pt.y < lockedRowContent.rowInfo[i].y + lockedRowContent.rowInfo[i].height)
+                    {
+                        item = lockedRowContent.listItems[i][0];
+                        break;
+                    }
+                }
+            }

             if (item)
@@ -2225,9 +2225,9 @@
             else
             {
                 if (lastItem)
-					lastDropIndex = itemRendererToIndex(lastItem) + 1;
-				else
-					lastDropIndex = collection ? collection.length : 0;
+                    lastDropIndex = itemRendererToIndex(lastItem) + 1;
+                else
+                    lastDropIndex = collection ? collection.length : 0;
             }
         }

@@ -2310,7 +2310,7 @@
     {
         var image:DataGridDragProxy = new DataGridDragProxy();
         image.owner = this;
-		image.moduleFactory = moduleFactory;
+        image.moduleFactory = moduleFactory;
         return image;
     }

@@ -2388,11 +2388,11 @@
                 try
                 {
                     iterator.seek(CursorBookmark.FIRST);
-					if (!iteratorValid)
-					{
-						iteratorValid = true;
-						lastSeekPending = null;
-					}
+                    if (!iteratorValid)
+                    {
+                        iteratorValid = true;
+                        lastSeekPending = null;
+                    }
                 }
                 catch(e:ItemPendingError)
                 {
@@ -3004,9 +3004,9 @@

         var lastRow:Object = rowInfo[listItems.length - 1];
         var columnHeader:DataGridHeader = (s.parent == lockedColumnContent) ?
-        								DataGridHeader(lockedColumnHeader) :
-        								DataGridHeader(header);
-
+                                        DataGridHeader(lockedColumnHeader) :
+                                        DataGridHeader(header);
+
         var xx:Number = columnHeader.rendererArray[columnIndex].x
         var yy:Number = rowInfo[0].y

@@ -3213,6 +3213,10 @@
      *  It creates a
      *  Sprite that contains all of these graphics and adds it as a
      *  child of the listContent at the front of the z-order.
+     *
+     *  @param contentHolder A container of all of the DataGrid's item renderers and item editors.
+     *  @param visibleColumns An array of the visible columns in the DataGrid.
+     *  @param separators An object that defines the top, bottom, left, and right lines that separate the columns and rows.
      */
     protected function drawLinesAndColumnGraphics(contentHolder:ListBaseContentHolder, visibleColumns:Array, separators:Object):void
     {
@@ -3573,8 +3577,8 @@
         if (!enabled || !editable)
             return;

-		if (!collection || collection.length == 0)
-			return;
+        if (!collection || collection.length == 0)
+            return;

         // just give focus back to the itemEditorInstance
         if (itemEditorInstance && coord &&
@@ -3699,7 +3703,7 @@
     private function scrollToEditedItem(rowIndex:int, colIndex:int):void
     {
         actualContentHolder = listContent;
-		var listItems:Array  = actualContentHolder.listItems;
+        var listItems:Array  = actualContentHolder.listItems;

         var lastRowIndex:int = verticalScrollPosition + listItems.length - 1 + lockedRowCount;
         var partialRow:int = (rowInfo[listItems.length - 1].y + rowInfo[listItems.length - 1].height > listContent.height) ? 1 : 0;
@@ -3747,8 +3751,8 @@
             }
         }

-		// reset since actualContentHolder could have changed
-		listItems = actualContentHolder.listItems;
+        // reset since actualContentHolder could have changed
+        listItems = actualContentHolder.listItems;

         var len:uint = (listItems && listItems[0]) ? listItems[0].length : visibleColumns.length;
         var lastColIndex:int = horizontalScrollPosition + len - 1 + lockedColumnCount;
@@ -4049,8 +4053,8 @@
      *  Determines if the item renderer for a data provider item
      *  is editable.
      *
-     *  @param data The data provider item
-     *  @return true if the item is editable
+     *  @param data The data provider item.
+     *  @return true if the item is editable.
      */
     public function isItemEditable(data:Object):Boolean
     {
@@ -4942,8 +4946,11 @@
     }

     /**
-     *  Called from updateDisplayList() to adjust the size and position of
+     *  Called from the updateDisplayList() method to adjust the size and position of
      *  listContent.
+     *
+     *  @param unscaledWidth The width of the listContent. This value ignores changes to the width from external components or settings.
+     *  @param unscaledHeight The height of the listContent. This value ignores changes to the height from external components or settings.
      */
     override protected function adjustListContent(unscaledWidth:Number = -1,
                                        unscaledHeight:Number = -1):void
@@ -4981,7 +4988,7 @@
             header.setActualSize(unscaledWidth + ww, hh);
             if (!skipHeaderUpdate)
             {
-				header.headerItemsChanged = true;
+                header.headerItemsChanged = true;
                 header.invalidateDisplayList(); // make sure it redraws, even if size didn't change
                 // internal renderers could have changed
             }
@@ -4995,31 +5002,31 @@

         if (lockedRowCount > 0 && lockedRowContent && lockedRowContent.iterator)
         {
-			try
-			{
-				lockedRowContent.iterator.seek(CursorBookmark.FIRST);
-				var pt:Point = makeRows(lockedRowContent, 0, 0, unscaledWidth, unscaledHeight, 0, 0, true, lockedRowCount, true);
-
-				if (lockedColumnCount > 0)
-				{
-					lcx = viewMetrics.left + Math.min(lockedColumnAndRowContent.leftOffset, 0);
-					lcy = viewMetrics.top + Math.min(lockedColumnAndRowContent.topOffset, 0) + Math.ceil(hh);
-					lockedColumnAndRowContent.move(lcx, lcy);
-					lockedColumnAndRowContent.setActualSize(lockedColumnWidth, lockedColumnAndRowContent.getExplicitOrMeasuredHeight());
-				}
-				lcx = viewMetrics.left + lockedColumnWidth + Math.min(lockedRowContent.leftOffset, 0);
-				lcy = viewMetrics.top + Math.min(lockedRowContent.topOffset, 0) + Math.ceil(hh);
-				lockedRowContent.move(lcx, lcy);
-				ww = Math.max(0, lockedRowContent.rightOffset) - lcx - viewMetrics.right;
-				lockedRowContent.setActualSize(unscaledWidth + ww, lockedRowContent.getExplicitOrMeasuredHeight());
-				hh += lockedRowContent.getExplicitOrMeasuredHeight();
-			}
-			catch (e:ItemPendingError)
-			{
+            try
+            {
+                lockedRowContent.iterator.seek(CursorBookmark.FIRST);
+                var pt:Point = makeRows(lockedRowContent, 0, 0, unscaledWidth, unscaledHeight, 0, 0, true, lockedRowCount, true);
+
+                if (lockedColumnCount > 0)
+                {
+                    lcx = viewMetrics.left + Math.min(lockedColumnAndRowContent.leftOffset, 0);
+                    lcy = viewMetrics.top + Math.min(lockedColumnAndRowContent.topOffset, 0) + Math.ceil(hh);
+                    lockedColumnAndRowContent.move(lcx, lcy);
+                    lockedColumnAndRowContent.setActualSize(lockedColumnWidth, lockedColumnAndRowContent.getExplicitOrMeasuredHeight());
+                }
+                lcx = viewMetrics.left + lockedColumnWidth + Math.min(lockedRowContent.leftOffset, 0);
+                lcy = viewMetrics.top + Math.min(lockedRowContent.topOffset, 0) + Math.ceil(hh);
+                lockedRowContent.move(lcx, lcy);
+                ww = Math.max(0, lockedRowContent.rightOffset) - lcx - viewMetrics.right;
+                lockedRowContent.setActualSize(unscaledWidth + ww, lockedRowContent.getExplicitOrMeasuredHeight());
+                hh += lockedRowContent.getExplicitOrMeasuredHeight();
+            }
+            catch (e:ItemPendingError)
+            {
                 e.addResponder(new ItemResponder(lockedRowSeekPendingResultHandler, seekPendingFailureHandler,
                                                     null));

-			}
+            }
         }

         if (lockedColumnCount > 0)
@@ -5118,10 +5125,10 @@
                 lockedColumnDropIndicator.setActualSize(lockedColumnContent.width - 2, 4);
                 lockedColumnDropIndicator.visible = true;
             }
-			if (dropIndicator.parent == listContent)
-				lockedColumnContent.addChild(DisplayObject(lockedColumnDropIndicator));
-			else
-				lockedColumnAndRowContent.addChild(DisplayObject(lockedColumnDropIndicator));
+            if (dropIndicator.parent == listContent)
+                lockedColumnContent.addChild(DisplayObject(lockedColumnDropIndicator));
+            else
+                lockedColumnAndRowContent.addChild(DisplayObject(lockedColumnDropIndicator));

             lockedColumnDropIndicator.y = dropIndicator.y;


Transferred from the Adobe Open Source Subversion Repository

Revision: 8649
Author:   gruehle@adobe.com
Date:     2009-07-16T23:41:16.826457Z

Log Message:
-----------
Make sure column widths are rounded down to the nearest integer. Any roundoff error will be added to the last column.

QE notes: -
Doc notes: -
Bugs: SDK-19865
Reviewer: Alex
Tests run: checkintests, QE cycloned
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -2918,7 +2918,7 @@
                             ratio = (lastColumn.width - lastColumn.minWidth)/ (totalWidth - fixedWidth);
                         else
                             ratio = lastColumn.width / totalWidth;
-                        newSize = lastColumn.width - (totalWidth - displayWidth) * ratio;
+                        newSize = Math.floor(lastColumn.width - (totalWidth - displayWidth) * ratio);
                         minWidth = visibleLockedColumns[i].minWidth;
                         visibleLockedColumns[i].setWidth(newSize > minWidth ? newSize : minWidth);
                         // trace("column " + i + " set to " + visibleLockedColumns[i].width);
@@ -2936,7 +2936,7 @@
                             ratio = (lastColumn.width - lastColumn.minWidth)/ (totalWidth - fixedWidth);
                         else
                             ratio = lastColumn.width / totalWidth;
-                        newSize = lastColumn.width - (totalWidth - displayWidth) * ratio;
+                        newSize = Math.floor(lastColumn.width - (totalWidth - displayWidth) * ratio);
                         minWidth = visibleColumns[i].minWidth;
                         visibleColumns[i].setWidth(newSize > minWidth ? newSize : minWidth);
                         // trace("column " + i + " set to " + visibleColumns[i].width);


added rough check for server error

added rough check for server error

--- WeaveJS/src/weavejs/net/Servlet.as
+++ WeaveJS/src/weavejs/net/Servlet.as
@@ -171,7 +171,13 @@
 		public static function readAmf3Object(bytes:/*Uint8*/Array):Object
 		{
 			// length may be zero for void result
-			return bytes && bytes.length && new JSByteArray(bytes).readObject();
+			var obj:Object = bytes && bytes.length && new JSByteArray(bytes).readObject();
+
+			// TEMPORARY SOLUTION to detect errors
+			if (obj && (obj.faultCode && obj.faultString))
+				throw new Error(obj.faultCode + ": " + obj.faultString);
+
+			return obj;
 		}

 		public static function buildUrlWithParams(url:String, params:Object):String


Filter terms should be empty, not null

Filter terms should be empty, not null

--- as3/xobjas3/src/com/rpath/xobj/XSmartURL.as
+++ as3/xobjas3/src/com/rpath/xobj/XSmartURL.as
@@ -251,7 +251,7 @@

         if (filterTerms)
         {
-            var search:String;
+            var search:String = "";
             first = true;
             for each (var searchTerm:FilterTerm in filterTerms)
             {


Fixes avm1 loadVariables trace test

Fixes avm1 loadVariables trace test

--- src/flash/net/URLVariables.as
+++ src/flash/net/URLVariables.as
@@ -33,8 +33,8 @@
         Error.throwError(Error, 2101); // Errors.DecodeParamError
         return;
       }
-      var name: String = unescapeMultiByte(p.substring(0, j));
-      var value: String = unescapeMultiByte(p.substring(j + 1));
+      var name: String = unescape(p.substring(0, j));
+      var value: String = unescape(p.substring(j + 1));
       if (typeof this[name] == 'undefined') {
         this[name] = value;
       } else if (this[name] is Array) {
@@ -49,13 +49,19 @@
     for (var name: String in this) {
       if (this[name] is Array) {
         for each (var value:String in this[name]) {
-          pairs.push(escapeMultiByte(name) + '=' + escapeMultiByte(value));
+          pairs.push(escape(name) + '=' + escape(value));
         }
       } else {
-        pairs.push(escapeMultiByte(name) + '=' + escapeMultiByte(this[name]));
+        pairs.push(escape(name) + '=' + escape(this[name]));
       }
     }
     return pairs.join('&');
   }
+  private function unescape(s: String): String {
+    return s && unescapeMultiByte(s.split('+').join(' '));
+  }
+  private function escape(s: String): String {
+    return s && escapeMultiByte(s).split(' ').join('+');
+  }
 }
 }


code cleanup

code cleanup

Change-Id: I11912a2814d0fc5f3574723607b491ae56db1b2d

--- WeaveCore/src/weave/core/LinkableHashMap.as
+++ WeaveCore/src/weave/core/LinkableHashMap.as
@@ -283,7 +283,7 @@
 		 */
 	    private function createAndSaveNewObject(name:String, classDef:Class, lockObject:Boolean):void
 	    {
-	    	if (_nameIsLocked[name] != undefined)
+	    	if (_nameIsLocked[name])
 	    		return;

 			// remove any object currently using this name
@@ -330,7 +330,7 @@
 		 */
 		public function removeObject(name:String):void
 		{
-			if (_nameIsLocked[name] != undefined)
+			if (_nameIsLocked[name])
 				return;

 			var object:ILinkableObject = _nameToObjectMap[name] as ILinkableObject;


Move LibraryLoader to a builder pattern.

I made the old static methods deprecated and removed the new generateMipMaps parameter from them.
Presumably if anybody other than me is already using it, they're paying enough attention to adapt
to this change too.

--- runtime/src/main/as/flump/display/LibraryLoader.as
+++ runtime/src/main/as/flump/display/LibraryLoader.as
@@ -16,6 +16,8 @@
     /**
      * Loads a Library from the zip in the given bytes.
      *
+     * @deprecated Use a new LibraryLoader with the builder pattern instead.
+     *
      * @param bytes The bytes containing the zip
      *
      * @param executor The executor on which the loading should run. If not specified, it'll run on
@@ -25,9 +27,6 @@
      * textures with multiple scale factors, loader will load the textures with the scale factor
      * closest to this value. If scaleFactor <= 0 (the default), Starling.contentScaleFactor will be
      * used.
-     * @param generateMipMaps If true (defaults to false), flump will instruct Starling to generate
-     * mip maps for all loaded textures. Scaling will look better if mipmaps are enabled, but there
-     * is a loading time and memory usage penalty.
      *
      * @return a Future to use to track the success or failure of loading the resources out of the
      * bytes. If the loading succeeds, the Future's onSuccess will fire with an instance of
@@ -35,15 +34,17 @@
      * loading failure.
      */
     public static function loadBytes (bytes :ByteArray, executor :Executor=null,
-        scaleFactor :Number=-1, generateMipMaps :Boolean=false) :Future {
-        return (executor || new Executor(1)).submit(
-            new Loader(bytes, scaleFactor, generateMipMaps).load);
+        scaleFactor :Number=-1) :Future {
+        return new LibraryLoader().setExecutor(executor).setScaleFactor(scaleFactor)
+            .loadBytes(bytes);
     }

     /**
      * Loads a Library from the zip at the given url.
      *
-     * @param bytes The url where the zip can be found
+     * @deprecated Use a new LibraryLoader with the builder pattern instead.
+     *
+     * @param url The url where the zip can be found
      *
      * @param executor The executor on which the loading should run. If not specified, it'll run on
      * a new single-use executor.
@@ -52,9 +53,6 @@
      * textures with multiple scale factors, loader will load the textures with the scale factor
      * closest to this value. If scaleFactor <= 0 (the default), Starling.contentScaleFactor will be
      * used.
-     * @param generateMipMaps If true (defaults to false), flump will instruct Starling to generate
-     * mip maps for all loaded textures. Scaling will look better if mipmaps are enabled, but there
-     * is a loading time and memory usage penalty.
      *
      * @return a Future to use to track the success or failure of loading the resources from the
      * url. If the loading succeeds, the Future's onSuccess will fire with an instance of
@@ -62,9 +60,67 @@
      * loading failure.
      */
     public static function loadURL (url :String, executor :Executor=null,
-        scaleFactor :Number=-1, generateMipMaps :Boolean=false) :Future {
-        return (executor || new Executor(1)).submit(
-            new Loader(url, scaleFactor, generateMipMaps).load);
+        scaleFactor :Number=-1) :Future {
+        return new LibraryLoader().setExecutor(executor).setScaleFactor(scaleFactor)
+            .loadURL(url);
+    }
+
+    /**
+     * Sets the executor instance to use with this loader.
+     *
+     * @param executor The executor on which the loading should run. If left null (the default),
+     * it'll run on a new single-use executor.
+     */
+    public function setExecutor (executor :Executor) :LibraryLoader {
+        _executor = executor;
+        return this;
+    }
+
+    /**
+     * Sets the scale factor value to use with this loader.
+     *
+     * @param scaleFactor the desired scale factor of the textures to load. If the Library contains
+     * textures with multiple scale factors, loader will load the textures with the scale factor
+     * closest to this value. If scaleFactor <= 0 (the default), Starling.contentScaleFactor will be
+     * used.
+     */
+    public function setScaleFactor (scaleFactor :Number) :LibraryLoader {
+        _scaleFactor = scaleFactor;
+        return this;
+    }
+
+    /**
+     * Sets the mip map generation for this loader.
+     *
+     * @param generateMipMaps If true (defaults to false), flump will instruct Starling to generate
+     * mip maps for all loaded textures. Scaling will look better if mipmaps are enabled, but there
+     * is a loading time and memory usage penalty.
+     */
+    public function setGenerateMipMaps (generateMipMaps :Boolean) :LibraryLoader {
+        _generateMipMaps = generateMipMaps;
+        return this;
+    }
+
+    /**
+     * Loads a Library from the zip in the given bytes, using the settings configured in this
+     * loader.
+     *
+     * @param bytes The bytes containing the zip
+     */
+    public function loadBytes (bytes :ByteArray) :Future {
+        return (_executor || new Executor(1)).submit(
+            new Loader(bytes, _scaleFactor, _generateMipMaps).load);
+    }
+
+    /**
+     * Loads a Library from the zip at the given url, using the settings configured in this
+     * loader.
+     *
+     * @param url The url where the zip can be found
+     */
+    public function loadURL (url :String) :Future {
+        return (_executor || new Executor(1)).submit(
+            new Loader(url, _scaleFactor, _generateMipMaps).load);
     }

     /** @private */
@@ -80,6 +136,10 @@
      * zip must equal the version compiled into the parsing code for parsing to succeed.
      */
     public static const VERSION :String = "2";
+
+    protected var _executor :Executor;
+    protected var _scaleFactor :Number = -1;
+    protected var _generateMipMaps :Boolean = false;
 }

 }


Revert "Those events come during any kind of Zip load."

This reverts commit ad77fe85c23985b13b7b840a91ea351c267e9402.

OK, that was a lie. As far as I can tell, there's no way to get progress info for a zip decoding
when you hand off bytes instead of a URL.

--- runtime/src/main/as/flump/display/LibraryLoader.as
+++ runtime/src/main/as/flump/display/LibraryLoader.as
@@ -68,12 +68,12 @@
     }

     /**
-     * Dispatched when a ProgressEvent is received during Zip archive loading.
+     * Dispatched when a ProgressEvent is received on a URL load of a Zip archive.
      *
      * Signal parameters:
      *  * event :flash.events.ProgressEvent
      */
-    public const loadProgressed :Signal = new Signal();
+    public const urlLoadProgressed :Signal = new Signal();

     /**
      * Dispatched when a file is found in the Zip archive that is not recognized by Flump.
@@ -349,7 +349,7 @@
     }

     protected function onProgress (e :ProgressEvent) :void {
-        _libLoader.loadProgressed.dispatch(e);
+        _libLoader.urlLoadProgressed.dispatch(e);
     }

     protected function onFileLoaded (e :FZipEvent) :void {


Use mx.utils.DisplayUtil.

Use mx.utils.DisplayUtil.

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

--- src/as/com/threerings/crowd/client/PlaceViewUtil.as
+++ src/as/com/threerings/crowd/client/PlaceViewUtil.as
@@ -21,7 +21,9 @@

 package com.threerings.crowd.client {

-import flash.display.DisplayObjectContainer;
+import flash.display.DisplayObject;
+
+import mx.utils.DisplayUtil;

 import com.threerings.crowd.data.PlaceObject;

@@ -66,25 +68,23 @@
     private static function dispatch (
             root :Object, plobj :PlaceObject, funct :String) :void
     {
-        // dispatch the call on this component if it implements PlaceView
-        if (root is PlaceView) {
-            try {
-                (root as PlaceView)[funct](plobj);
-            } catch (e :Error) {
-                var log :Log = Log.getLog(PlaceViewUtil);
-                log.warning("Component choked on " + funct + "() " +
-                            "[component=" + root + ", plobj=" + plobj + "].");
-                log.logStackTrace(e);
-            }
+        if (!(root is DisplayObject)) {
+            return;
         }

-        // now traverse all of this component's children
-        if (root is DisplayObjectContainer) {
-            var cont :DisplayObjectContainer = (root as DisplayObjectContainer);
-            for (var ii :int = 0; ii < cont.numChildren; ii++) {
-                dispatch(cont.getChildAt(ii), plobj, funct);
-            }
-        }
+        DisplayUtil.walkDisplayObjects(root as DisplayObject,
+            function (disp :DisplayObject) :void {
+                if (disp is PlaceView) {
+                    try {
+                        (root as PlaceView)[funct](plobj);
+                    } catch (e :Error) {
+                        var log :Log = Log.getLog(PlaceViewUtil);
+                        log.warning("Component choked on " + funct + "() " +
+                            "[component=" + root + ", plobj=" + plobj + "].");
+                        log.logStackTrace(e);
+                    }
+                }
+            });
     }
 }
 }


Develop

Develop

--- src/main/org/shypl/common/timeline/ScheduledTask.as
+++ src/main/org/shypl/common/timeline/ScheduledTask.as
@@ -18,7 +18,7 @@
 			_remains -= time;
 			if (_remains <= 0) {
 				super.handleEnterFrame(_delay - _remains);
-				_remains = _delay + _remains;
+				_remains = _delay;
 			}
 		}
 	}


- Bugfix: Automatic TextField shrinking in Label component sometimes caused incorrect wrapping of text

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@902 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/controls/Label.as
+++ src/reprise/controls/Label.as
@@ -352,8 +352,21 @@
 			{
 				if (m_labelDisplay.textWidth < m_labelDisplay.width - 10)
 				{
+					var correctTextHeight : Number = m_labelDisplay.textHeight;
+					var correctTextWidth : Number = m_labelDisplay.textWidth;
+					var originalWidth : Number = m_labelDisplay.width;
 					m_labelDisplay.width = m_labelDisplay.textWidth + 10;
-					if (m_textAlignment == 'right')
+					if (m_labelDisplay.textHeight != correctTextHeight ||
+						m_labelDisplay.textWidth != correctTextWidth)
+					{
+						/* in some cases, the TextField incorrectly wraps text to the next line
+						 * even though there's plenty enough room for it on the current line.
+						 * In case such an incorrect wrapping occurs after shrinking the TextField,
+						 * we have to roll it back.
+						 */
+						m_labelDisplay.width = originalWidth;
+					}
+					else if (m_textAlignment == 'right')
 					{
 						m_labelDisplay.x = m_currentStyles.paddingLeft +
 							m_currentStyles.width - m_labelDisplay.width + 2;


Fixed signed/unsigned error in some of the relative branching instructions.


Delayed message time stamp parsing fix.

Delayed message time stamp parsing fix.

--- src/org/igniterealtime/xiff/data/Message.as
+++ src/org/igniterealtime/xiff/data/Message.as
@@ -236,21 +236,25 @@
 		{
 			myThreadNode = replaceTextNode(getNode(), myThreadNode, "thread", value);
 		}
-
+		/**
+		 * Time of the message in case of a delay. Used only for messages
+		 * which were sent while user was offline.
+		 * @see http://xmpp.org/extensions/xep-0203.html
+		 */
 		public function get time():Date
 		{
 			if(myTimeStampNode == null) return null;
 			var stamp:String = myTimeStampNode.attributes.stamp;

-			// CCYYMMDDThh:mm:ss
-			var t:Date = new Date();
-			t.setUTCFullYear(stamp.slice(0, 4));
-			t.setUTCMonth(Number(stamp.slice(4, 6)) - 1);
-			t.setUTCDate(stamp.slice(6, 8));
-			t.setUTCHours(stamp.slice(9, 11));
-			t.setUTCMinutes(stamp.slice(12, 14));
-			t.setUTCSeconds(stamp.slice(15, 17));
-			return t;
+			// CCYY-MM-DDThh:mm:ssZ
+			var value:Date = new Date();
+			value.setUTCFullYear(stamp.substr(0, 4));
+			value.setUTCMonth(parseInt(stamp.substr(5, 2)) - 1);
+			value.setUTCDate(stamp.substr(8, 2));
+			value.setUTCHours(stamp.substr(11, 2));
+			value.setUTCMinutes(stamp.substr(14, 2));
+			value.setUTCSeconds(stamp.substr(17, 2));
+			return value;
 		}
 		public function set time( value:Date ): void
 		{


- change: Another slight optimization of CSS selector matching

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@586 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/css/CSSDeclarationList.as
+++ src/reprise/css/CSSDeclarationList.as
@@ -11,6 +11,8 @@

 package reprise.css
 {
+	import flash.utils.Dictionary;
+
 	import reprise.core.reprise;

 	use namespace reprise;
@@ -68,6 +70,7 @@
 			}

 			var matches : Array = [];
+			var checks : Dictionary = new Dictionary(true);
 			var i : int = m_items.length;
 			var item : CSSDeclarationListItem;
 	 		decl = new CSSDeclaration();
@@ -84,9 +87,9 @@
 				for (var j : int = items.length; j--;)
 				{
 					item = items[j];
-					if (item && !matches[item])
+					if (item && !checks[item])
 					{
-						matches[item] = true;
+						checks[item] = true;
 						if (item.matchesSubjectPath(sp))
 						{
 							matches.push(item);


Whitespace

Whitespace

--- raw/src/org/yellcorp/lib/core/InterpUtil.as
+++ raw/src/org/yellcorp/lib/core/InterpUtil.as
@@ -52,8 +52,8 @@
      * @param    inVal    The input value to be scaled
      * @param    inMin    The input lower range
      * @param    inMax    The input higher range
-     * @param    outMin    The output lower range
-     * @param    outMax    The output higher range
+     * @param    outMin   The output lower range
+     * @param    outMax   The output higher range
      * @return            The input value scaled to the output range.
      */
     public static function lerpRange(inVal:Number, inMin:Number, inMax:Number, outMin:Number, outMax:Number):Number


applying callbacks with context as thisArg

--- WeaveCore/src/weave/core/CallbackCollection.as
+++ WeaveCore/src/weave/core/CallbackCollection.as
@@ -107,7 +107,7 @@
 			{
 				// increase the recursion count while the function is running
 				entry.recursionCount++;
-				callback.apply();
+				callback.apply(relevantContext || callback['this']);
 				entry.recursionCount--;
 			}
 		}
@@ -186,9 +186,9 @@
 						entry.recursionCount++; // increase count to signal that we are currently running this callback.

 						if (_preCallback != null)
-							_preCallback.apply(null, preCallbackParams);
+							_preCallback.apply(this, preCallbackParams);

-						entry.callback.apply();
+						entry.callback.apply(entry.context || entry.callback['this']);

 						entry.recursionCount--; // decrease count because the callback finished.
 					}
@@ -294,7 +294,7 @@
 			{
 				var entry:CallbackEntry = _disposeCallbackEntries.shift() as CallbackEntry;
 				if (entry.callback != null && !WeaveAPI.SessionManager.objectWasDisposed(entry.context))
-					entry.callback.apply();
+					entry.callback.apply(entry.context || entry.callback['this']);
 			}
 		}


Log message if we get a failure response.

--- test/src/FRESteamWorksTest.as
+++ test/src/FRESteamWorksTest.as
@@ -502,7 +502,10 @@
 					break;
 				case SteamConstants.RESPONSE_OnFindLeaderboard:
 					log("RESPONSE_OnFindLeaderboad: " + e.response);
-					if(e.response != SteamResults.OK) break;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}

 					if (leaderboard) {
 						// result of findOrCreateLeaderboard
@@ -528,7 +531,11 @@
 					break;
 				case SteamConstants.RESPONSE_OnDownloadLeaderboardEntries:
 					log("RESPONSE_OnDownloadLeaderboardEntries: " + e.response);
-					if(e.response != SteamResults.OK) break;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					var entries:Array = Steamworks.downloadLeaderboardEntriesResult(scoreDetails);
 					log("downloadLeaderboardEntriesResult(" + scoreDetails + ") == " + (entries ? ("Array, size " + entries.length) : "null"));
 					for(i = 0; i < entries.length; ++i) {
@@ -541,7 +548,11 @@
 					break;
 				case SteamConstants.RESPONSE_OnUploadLeaderboardScore:
 					log("RESPONSE_OnUploadLeaderboardScore: " + e.response);
-					if(e.response != SteamResults.OK) break;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					var sr:UploadLeaderboardScoreResult = Steamworks.uploadLeaderboardScoreResult();
 					log("uploadLeaderboardScoreResult() == " + sr);
 					log("success: " + sr.success + ", score: " + sr.score + ", changed: " + sr.scoreChanged +
@@ -550,7 +561,11 @@
 					break;
 				case SteamConstants.RESPONSE_OnFileShared:
 					log("RESPONSE_OnFileShared: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					log("fileShareResult() == " + Steamworks.fileShareResult());
 					apiCall = Steamworks.publishWorkshopFile("test.txt", "", _appId,
 						"Test.txt", "Test.txt", WorkshopConstants.VISIBILITY_Private,
@@ -559,14 +574,22 @@
 					break;
 				case SteamConstants.RESPONSE_OnPublishWorkshopFile:
 					log("RESPONSE_OnPublishWorkshopFile: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					publishedFile = Steamworks.publishWorkshopFileResult();
 					log("File published as " + publishedFile);
 					log("subscribePublishedFile(...) == " + Steamworks.subscribePublishedFile(publishedFile));
 					break;
 				case SteamConstants.RESPONSE_OnEnumerateUserSubscribedFiles:
 					log("RESPONSE_OnEnumerateUserSubscribedFiles: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					var subRes:SubscribedFilesResult = Steamworks.enumerateUserSubscribedFilesResult();
 					log("User subscribed files: " + subRes.resultsReturned + "/" + subRes.totalResults);
 					for(i = 0; i < subRes.resultsReturned; i++) {
@@ -613,7 +636,11 @@
 					break;
 				case SteamConstants.RESPONSE_OnEnumeratePublishedWorkshopFiles:
 					log("RESPONSE_OnEnumeratePublishedWorkshopFiles: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					var fileRes:WorkshopFilesResult = Steamworks.enumeratePublishedWorkshopFilesResult();
 					log("Workshop files: " + fileRes.resultsReturned + "/" + fileRes.totalResults);
 					for(i = 0; i < fileRes.resultsReturned; i++) {
@@ -631,7 +658,10 @@
 					break;
 				case SteamConstants.RESPONSE_OnEnumeratePublishedFilesByUserAction:
 					log("RESPONSE_OnEnumeratePublishedFilesByUserAction: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}

 					var actionRes:FilesByUserActionResult = Steamworks.enumeratePublishedFilesByUserActionResult();
 					// TODO: m_eAction seems to be uninitialized?
@@ -649,7 +679,11 @@
 					break;
 				case SteamConstants.RESPONSE_OnGetPublishedFileDetails:
 					log("RESPONSE_OnGetPublishedFileDetails: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					var res:FileDetailsResult = Steamworks.getPublishedFileDetailsResult(id);
 					log("Result for " + id + ": " + res);
 					if(res) {
@@ -667,7 +701,11 @@
 					break;
 				case SteamConstants.RESPONSE_OnUGCDownload:
 					log("RESPONSE_OnUGCDownload: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}
+
 					var ugcResult:DownloadUGCResult = Steamworks.getUGCDownloadResult(ugcHandle);
 					log("Result for " + ugcHandle + ": " + ugcResult);
 					if(ugcResult) {
@@ -684,7 +722,10 @@
 					break;
 				case SteamConstants.RESPONSE_OnGetPublishedItemVoteDetails:
 					log("RESPONSE_OnGetPublishedItemVoteDetails: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}

 					var voteDetails:ItemVoteDetailsResult = Steamworks.getPublishedItemVoteDetailsResult();
 					log("getPublishedItemVoteDetails() == " + (voteDetails ? voteDetails.result : "null"));
@@ -696,7 +737,10 @@
 					break;
 				case SteamConstants.RESPONSE_OnGetUserPublishedItemVoteDetails:
 					log("RESPONSE_OnGetUserPublishedItemVoteDetails: " + e.response);
-					if(e.response != SteamResults.OK) return;
+					if(e.response != SteamResults.OK) {
+						log("FAILED!");
+						break;
+					}

 					var userVoteDetails:UserVoteDetails = Steamworks.getUserPublishedItemVoteDetailsResult();
 					log("getUserPublishedItemVoteDetails() == " + (userVoteDetails ? userVoteDetails.result : "null"));


Transferred from the Adobe Open Source Subversion Repository

Revision: 13965
Author:   build@adobe.com
Date:     2010-02-03T20:37:12.428300Z

Log Message:
-----------
Version update to 4.5.0

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/build.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Version.as</path>

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

--- frameworks/projects/advancedgrids/src/mx/core/Version.as
+++ frameworks/projects/advancedgrids/src/mx/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.0.0.0";
+mx_internal static const VERSION:String = "4.5.0.13964";


Transferred from the Adobe Open Source Subversion Repository

Revision: 20133
Author:   deeptika@adobe.com
Date:     2011-02-04T12:11:57.639465Z

Log Message:
-----------
QE notes:
Doc notes:
Bugs: FLEXDMV-1632 (Bar chart shrinks in size even if drop labels is enabled)
FLEXDMV-2509 (Null object reference error is thrown in AxisRenderer when showLabels and canDropLabels properties are set)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/AxisRenderer.as

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

--- frameworks/projects/charts/src/mx/charts/AxisRenderer.as
+++ frameworks/projects/charts/src/mx/charts/AxisRenderer.as
@@ -1807,8 +1807,6 @@
                 base = n - 1;
                 dir = -1;
             }
-            var firstIntervalLabel:Object;
-            var lastIntervalLabel:Object;

             for (var i:int = 1; i < n; i++)
             {
@@ -1826,8 +1824,6 @@
                     if (skipCount > maxSkipCount)
                     {
                         maxSkipCount = skipCount;
-                        firstIntervalLabel = prevLabel;
-                        lastIntervalLabel = _labels[base + dir * (i - 1)];
                     }
                     skipCount = 0;
                     prevLabel = thisLabel;
@@ -1837,10 +1833,8 @@
             if (skipCount > maxSkipCount)
             {
                 maxSkipCount = skipCount;
-                firstIntervalLabel = prevLabel;
-                lastIntervalLabel = _labels[base + dir * (i - 1)];
             }
-            lastLabel = _labels[maxSkipCount + 1];
+            lastLabel = prevLabel;
         }

         else


Transferred from the Adobe Open Source Subversion Repository

Revision: 6260
Author:   rfrishbe@adobe.com
Date:     2009-04-24T22:08:41.005574Z

Log Message:
-----------
Automation assumed that a component implemented both IUIComponent and IAutomationObject; however, we'd like to automate FlexNativeMenu and FNM doesn't implement IUIComponent.  The properties automation needed from IUIComponent, were enabled, parent, owner, and visible.  We now have properties on IAutomationObject called automationEnabled, automationParent, automationOwner, and automationVisible for this purpose.  Now automation only needs to rely on IAutomationObject.

QE Notes: -
Doc Notes: -
Bugs: SDK-20488
Reviewer: Evtim
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/automation/IAutomationObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -11083,6 +11083,74 @@
             return automationDelegate.automationTabularData;
         return null;
     }
+
+    //----------------------------------
+    //  automationOwner
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationOwner():DisplayObjectContainer
+    {
+        return owner;
+    }
+
+    //----------------------------------
+    //  automationParent
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationParent():DisplayObjectContainer
+    {
+        return parent;
+    }
+
+    //----------------------------------
+    //  automationEnabled
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationEnabled():Boolean
+    {
+        return enabled;
+    }
+
+    //----------------------------------
+    //  automationVisible
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationVisible():Boolean
+    {
+        return visible;
+    }

     /**
      *  @inheritDoc


Transferred from the Adobe Open Source Subversion Repository

Revision: 12472
Author:   gruehle@adobe.com
Date:     2009-12-04T00:28:17.623456Z

Log Message:
-----------
LoaderUtil.normalizeURL() calls encodeURI() before returning. This fixes several issues when the main app/module has a high-ascii character in the path name. Note that Flex still requires user-specified urls to be encoded before being passed to the framework.

QE notes: None
Doc notes: None
Bugs: SDK-24366
Reviewer: Alex
Tests run: Checkin
Is noteworthy for integration: Yes

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/LoaderUtil.as

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

--- frameworks/projects/framework/src/mx/utils/LoaderUtil.as
+++ frameworks/projects/framework/src/mx/utils/LoaderUtil.as
@@ -82,6 +82,9 @@
      *  to remove the appended text, if present.
      *  Classes accessing LoaderInfo.url should call this method
      *  to normalize the URL before using it.
+     *  This method also encodes the url by calling the encodeURI() method
+     *  on it. If you want the unencoded url, you must call unencodeURI() on
+     *  the results.
      *
      *  @param loaderInfo A LoaderInfo instance.
      *
@@ -110,7 +113,7 @@
             }
         }

-        return url;
+        return encodeURI(url);
     }

     /**