Transferred from the Adobe Open Source Subversion Repository

Revision: 6858
Author:   egeorgie@adobe.com
Date:     2009-05-12T21:36:09.954248Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-21027 http://bugs.adobe.com/jira/browse/SDK-20760 http://bugs.adobe.com/jira/browse/SDK-20914

Fix:
1. modify VerticalLayout, HorizontalLayout to align children to the container edges/ middle of container in cases where clipping is disabled.
2. Modify VerticalLayout/HorizontalLayout to take element's min width/height while calculating minimum measured width/height in cases of "justify" alignment.
3. Modify the contentGroup part in the default skins for the Application, Panel, SkinnableContainer to have explicit minimum width/height of (0,0).

QE Notes: None
Doc Notes: None
Bugs: SDK-21027, SDK-20760, SDK-20914
Reviewer: Hans
tests: checkintests, mustella (gumbo/layouts, gumbo/core/Group, gumbo/containers/FxPanel, gumbo/components/FxContainer)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/SkinnableContainerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/PanelSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -997,7 +997,8 @@
             var width:Number = isNaN(fixedColumnWidth) ? elt.getPreferredBoundsWidth() : fixedColumnWidth;
             preferredHeight = Math.max(preferredHeight, height);
             preferredWidth += width;
-            minHeight = Math.max(minHeight, (isNaN(elt.percentHeight)) ? height : elt.getMinBoundsHeight());
+            var flexibleHeight:Boolean = !isNaN(elt.percentHeight) || verticalAlign == VerticalAlign.JUSTIFY;
+            minHeight = Math.max(minHeight, flexibleHeight ? elt.getMinBoundsHeight() : height);
             minWidth += (isNaN(elt.percentWidth)) ? width : elt.getMinBoundsWidth();

             eltInLayoutCount += 1;
@@ -1116,7 +1117,8 @@
         layoutTarget.measuredHeight = llv.minorSize + vPadding;

         layoutTarget.measuredMinWidth = layoutTarget.measuredWidth;
-        layoutTarget.measuredMinHeight = layoutTarget.measuredHeight;
+        layoutTarget.measuredMinHeight = (verticalAlign == VerticalAlign.JUSTIFY) ?
+                llv.minMinorSize + vPadding : layoutTarget.measuredHeight;
     }

     /**
@@ -1481,7 +1483,9 @@
         // TODO: in the middle or bottom case, we end up calculating percentHeight
         // twice.  Once here for the contentHeight and once in distributeWidth
         // to size that particular element.
-        if (verticalAlign != VerticalAlign.TOP)
+        if (verticalAlign == VerticalAlign.CONTENT_JUSTIFY ||
+           (clipAndEnableScrolling && (verticalAlign == VerticalAlign.MIDDLE ||
+                                       verticalAlign == VerticalAlign.BOTTOM)))
         {
             for (var i:int = 0; i < count; i++)
             {
@@ -1499,17 +1503,7 @@
             }
         }

-        // If we're justifying the elements, then all heights should be set to
-        // targetHeight.  If we're content justifying the elements, then
-        // all heights should be set to the contentHeight.
-        // Otherwise restrictedHeight is ignored in distributedWidth.
-        var restrictedHeight:Number;
-        if (verticalAlign == VerticalAlign.JUSTIFY)
-            restrictedHeight = targetHeight;
-        else if (verticalAlign == VerticalAlign.CONTENT_JUSTIFY)
-            restrictedHeight = containerHeight;
-
-        distributeWidth(targetWidth, targetHeight, restrictedHeight);
+        distributeWidth(targetWidth, targetHeight, containerHeight);

         // default to top (0)
         var vAlign:Number = 0;


Simplified ForeignDataMappingTransform slightly.

--- WeaveData/src/weave/data/Transforms/ForeignDataMappingTransform.as
+++ WeaveData/src/weave/data/Transforms/ForeignDataMappingTransform.as
@@ -34,7 +34,7 @@
     import weave.data.DataSources.AbstractDataSource;
     import weave.data.hierarchy.ColumnTreeNode;
     import weave.utils.ColumnUtils;
-    import weave.utils.EquationColumnLib;
+    import weave.utils.EquationColumnLib;

     public class ForeignDataMappingTransform extends AbstractDataSource
     {
@@ -113,9 +113,7 @@
 			if (!column)
 				return null;

-			var metadata:Object = {};
-			for each (var prop:String in column.getMetadataPropertyNames())
-				metadata[prop] = column.getMetadata(prop);
+			var metadata:Object = ColumnMetadata.getAllMetadata(column);
 			metadata[ColumnMetadata.KEY_TYPE] = keyColumn.getMetadata(ColumnMetadata.KEY_TYPE);
 			metadata[DATA_COLUMNNAME_META] = dataColumnName;
 			return metadata;


Update Act203.as

Update Act203.as

コメント追加

--- src/sample/Act203.as
+++ src/sample/Act203.as
@@ -24,6 +24,10 @@
 //			var url:String = 'http://192.168.24.24/php/api.php';

 			var loader:URLLoader = new URLLoader();
+
+			//↓これは使わない方がいい。対象のファイルが無い時にTryCatchが効かない
+//			loader.dataFormat = URLLoaderDataFormat.VARIABLES;
+
 			loader.addEventListener(Event.COMPLETE,onLoaded);
 			loader.addEventListener(IOErrorEvent.IO_ERROR,onLoadError);
 			loader.dataFormat = URLLoaderDataFormat.TEXT;


Transferred from the Adobe Open Source Subversion Repository

Revision: 8207
Author:   smgilson@adobe.com
Date:     2009-06-24T22:55:28.494485Z

Log Message:
-----------
Fix ASDoc version tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/DropDownEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TrackBaseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/spark/src/spark/events/TrackBaseEvent.as
+++ frameworks/projects/spark/src/spark/events/TrackBaseEvent.as
@@ -26,13 +26,13 @@
 {
     include "../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------

-	/**
+    /**
      *  The TrackBaseEvent.THUMB_DRAG constant defines the value of the
      *  type property of the event object for a thumbDrag event.
      *
@@ -54,9 +54,9 @@
      *  @eventType thumbDrag
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const THUMB_DRAG:String = "thumbDrag";

@@ -82,9 +82,9 @@
      *  @eventType thumbPress
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const THUMB_PRESS:String = "thumbPress";

@@ -110,48 +110,48 @@
      *  @eventType thumbRelease
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const THUMB_RELEASE:String = "thumbRelease";

-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------

-	/**
-	 *  Constructor.
-	 *
-	 *  @param type The event type; indicates the action that caused the event.
-	 *
-	 *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
-	 *
-	 *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function TrackBaseEvent(
-								type:String, bubbles:Boolean = false,
-								cancelable:Boolean = false)
-	{
-		super(type, bubbles, cancelable);
-	}
+    /**
+     *  Constructor.
+     *
+     *  @param type The event type; indicates the action that caused the event.
+     *
+     *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+     *
+     *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function TrackBaseEvent(
+                                type:String, bubbles:Boolean = false,
+                                cancelable:Boolean = false)
+    {
+        super(type, bubbles, cancelable);
+    }

-	//--------------------------------------------------------------------------
-	//
-	//  Overridden methods: Event
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
+    /**
+     *  @private
+     */
     override public function clone():Event
     {
         return new TrackBaseEvent(type, bubbles, cancelable);


Allow the up and down arrow keys to traverse the command history, like we do in Java.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@667 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flex/ChatControl.as
+++ src/as/com/threerings/flex/ChatControl.as
@@ -59,6 +59,7 @@

         addChild(_txt = new ChatInput());
         _txt.addEventListener(FlexEvent.ENTER, sendChat, false, 0, true);
+        _txt.addEventListener(KeyboardEvent.KEY_UP, handleKeyUp);

         _but = new CommandButton(sendButtonLabel, sendChat);
         addChild(_but);
@@ -140,6 +141,22 @@

         // if there was no error, clear the entry area in prep for the next entry event
         _txt.text = "";
+        _histidx = -1;
+    }
+
+    protected function scrollHistory (next :Boolean) :void
+    {
+        var size :int = _chatDtr.getCommandHistorySize();
+        if ((_histidx == -1) || (_histidx == size)) {
+            _curLine = _txt.text;
+            _histidx = size;
+        }
+
+        _histidx = (next) ? Math.min(_histidx + 1, size)
+                          : Math.max(_histidx - 1, 0);
+        var text :String = (_histidx == size) ? _curLine : _chatDtr.getCommandHistory(_histidx);
+        _txt.text = text;
+        _txt.setSelection(text.length, text.length);
     }

     /**
@@ -150,6 +167,7 @@
         if (event.type == Event.ADDED_TO_STAGE) {
             // set up any already-configured text
             _txt.text = _curLine;
+            _histidx = -1;

             // request focus
             callLater(_txt.setFocus);
@@ -161,6 +179,14 @@
         }
     }

+    protected function handleKeyUp (event :KeyboardEvent) :void
+    {
+        switch (event.keyCode) {
+        case Keyboard.UP: scrollHistory(false); break;
+        case Keyboard.DOWN: scrollHistory(true); break;
+        }
+    }
+
     /** Our client-side context. */
     protected var _ctx :CrowdContext;

@@ -169,6 +195,9 @@

     /** The place where the user may enter chat. */
     protected var _txt :ChatInput;
+
+    /** The current index in the chat command history. */
+    protected var _histidx :int = -1;

     /** The button for sending chat. */
     protected var _but :CommandButton;


Possible fix for the not working "Mute" Button on audioplayer flash fallback: - Set "_isMuted" before the event is fired, because the javascript event handler, checks "media.muted" to toggle slider position and muted css class.

--- src/flash/htmlelements/AudioElement.as
+++ src/flash/htmlelements/AudioElement.as
@@ -1,312 +1,314 @@
-
-package htmlelements
-{
-	import flash.events.Event;
-	import flash.events.IOErrorEvent;
-	import flash.events.ProgressEvent;
-	import flash.events.TimerEvent;
-	import flash.media.ID3Info;
-	import flash.media.Sound;
-	import flash.media.SoundChannel;
-	import flash.media.SoundLoaderContext;
-	import flash.media.SoundTransform;
-	import flash.net.URLRequest;
-	import flash.utils.Timer;
-
-
-
-	/**
-	* ...
-	* @author DefaultUser (Tools -> Custom Arguments...)
-	*/
-	public class AudioElement implements IMediaElement
-	{
-
-		private var _sound:Sound;
-		private var _soundTransform:SoundTransform;
-		private var _soundChannel:SoundChannel;
-		private var _soundLoaderContext:SoundLoaderContext;
-
-		private var _volume:Number = 1;
-		private var _preMuteVolume:Number = 0;
-		private var _isMuted:Boolean = false;
-		private var _isPaused:Boolean = true;
-		private var _isEnded:Boolean = false;
-		private var _isLoaded:Boolean = false;
-		private var _currentTime:Number = 0;
-		private var _duration:Number = 0;
-		private var _bytesLoaded:Number = 0;
-		private var _bytesTotal:Number = 0;
-		private var _bufferedTime:Number = 0;
-
-		private var _currentUrl:String = "";
-		private var _autoplay:Boolean = true;
-		private var _preload:String = "";
-
-		private var _element:FlashMediaElement;
-		private var _timer:Timer;
-		private var _firedCanPlay:Boolean = false;
-
-		public function duration():Number {
-			return _duration;
-		}
-
-		public function currentTime():Number {
-			return _currentTime;
-		}
-
-		public function currentProgress():Number {
-				return Math.round(_bytesLoaded/_bytesTotal*100);
-		}
-
-		public function AudioElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number)
-		{
-			_element = element;
-			_autoplay = autoplay;
-			_volume = startVolume;
-			_preload = preload;
-
-			_timer = new Timer(timerRate);
-			_timer.addEventListener(TimerEvent.TIMER, timerEventHandler);
-
-			_soundTransform = new SoundTransform(_volume);
-			_soundLoaderContext = new SoundLoaderContext();
-		}
-
-		// events
-		function progressHandler(e:ProgressEvent):void {
-
-			_bytesLoaded = e.bytesLoaded;
-			_bytesTotal = e.bytesTotal;
-
-			sendEvent(HtmlMediaEvent.PROGRESS);
-		}
-
-		function id3Handler(e:Event):void {
-			sendEvent(HtmlMediaEvent.LOADEDMETADATA);
-
-			try {
-				var id3:ID3Info = _sound.id3;
-				var obj = {
-					type:'id3',
-					album:id3.album,
-					artist:id3.artist,
-					comment:id3.comment,
-					genre:id3.genre,
-					songName:id3.songName,
-					track:id3.track,
-					year:id3.year
-				}
-			} catch (err:Error) {}
-
-
-		}
-
-		function timerEventHandler(e:TimerEvent) {
-			_currentTime = _soundChannel.position/1000;
-
-			// calculate duration
-			var duration = Math.round(_sound.length * _sound.bytesTotal/_sound.bytesLoaded/100) / 10;
-
-			// check to see if the estimated duration changed
-			if (_duration != duration && !isNaN(duration)) {
-
-				_duration = duration;
-				sendEvent(HtmlMediaEvent.LOADEDMETADATA);
-			}
-
-			// send timeupdate
-			sendEvent(HtmlMediaEvent.TIMEUPDATE);
-
-			// sometimes the ended event doesn't fire, here's a fake one
-			if (_duration > 0 && _currentTime >= _duration-0.2) {
-				handleEnded();
-			}
-		}
-
-		function soundCompleteHandler(e:Event) {
-			handleEnded();
-		}
-
-		function handleEnded():void {
-			_timer.stop();
-			_currentTime = 0;
-			_isEnded = true;
-
-			sendEvent(HtmlMediaEvent.ENDED);
-		}
-
-		//events
-
-
-		// METHODS
-		public function setSrc(url:String):void {
-			_currentUrl = url;
-			_isLoaded = false;
-		}
-
-
-		public function load():void {
-
-			if (_currentUrl == "")
-				return;
-
-			_sound = new Sound();
-			//sound.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
-			_sound.addEventListener(ProgressEvent.PROGRESS,progressHandler);
-			_sound.addEventListener(Event.ID3,id3Handler);
-			_sound.load(new URLRequest(_currentUrl));
-			_currentTime = 0;
-
-			sendEvent(HtmlMediaEvent.LOADSTART);
-
-			_isLoaded = true;
-
-			sendEvent(HtmlMediaEvent.LOADEDDATA);
-			sendEvent(HtmlMediaEvent.CANPLAY);
-			_firedCanPlay = true;
-
-			if (_playAfterLoading) {
-				_playAfterLoading = false;
-				play();
-			}
-		}
-
-		private var _playAfterLoading:Boolean= false;
-
-		public function play():void {
-
-			if (!_isLoaded) {
-				_playAfterLoading = true;
-				load();
-				return;
-			}
-
-			_timer.stop();
-
-			_soundChannel = _sound.play(_currentTime*1000, 0, _soundTransform);
-			_soundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
-			_soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
-
-			_timer.start();
-
-			didStartPlaying();
-		}
-
-		public function pause():void {
-
-			_timer.stop();
-			if (_soundChannel != null) {
-				_currentTime = _soundChannel.position/1000;
-				_soundChannel.stop();
-			}
-
-			_isPaused = true;
-			sendEvent(HtmlMediaEvent.PAUSE);
-		}
-
-
-		public function stop():void {
-			if (_timer != null) {
-				_timer.stop();
-			}
-			if (_soundChannel != null) {
-				_soundChannel.stop();
-				_sound.close();
-			}
-			unload();
-			sendEvent(HtmlMediaEvent.STOP);
-		}
-
-		public function setCurrentTime(pos:Number):void {
-			sendEvent(HtmlMediaEvent.SEEKING);
-			_timer.stop();
-			_currentTime = pos;
-			_soundChannel.stop();
-			_sound.length
-			_soundChannel = _sound.play(_currentTime * 1000, 0, _soundTransform);
-			sendEvent(HtmlMediaEvent.SEEKED);
-
-			_timer.start();
-
-			didStartPlaying();
-		}
-
-		private function didStartPlaying():void {
-			_isPaused = false;
-			sendEvent(HtmlMediaEvent.PLAY);
-			sendEvent(HtmlMediaEvent.PLAYING);
-			if (!_firedCanPlay) {
-				sendEvent(HtmlMediaEvent.LOADEDDATA);
-				sendEvent(HtmlMediaEvent.CANPLAY);
-				_firedCanPlay = true;
-			}
-		}
-
-
-		public function setVolume(volume:Number):void {
-
-			_volume = volume;
-			_soundTransform.volume = volume;
-
-			if (_soundChannel != null) {
-				_soundChannel.soundTransform = _soundTransform;
-			}
-
-			sendEvent(HtmlMediaEvent.VOLUMECHANGE);
-		}
-
-		public function getVolume():Number {
-			if(_isMuted) {
-				return 0;
-			} else {
-				return _volume;
-			}
-		}
-
-
-		public function setMuted(muted:Boolean):void {
-
-			// ignore if already set
-			if ( (muted && _isMuted) || (!muted && !_isMuted))
-				return;
-
-			if (muted) {
-				_preMuteVolume = _soundTransform.volume;
-				setVolume(0);
-			} else {
-				setVolume(_preMuteVolume);
-			}
-
-			_isMuted = muted;
-		}
-
-		public function unload():void {
-			_sound = null;
-			_isLoaded = false;
-		}
-
-		private function sendEvent(eventName:String) {
-
-			// calculate this to mimic HTML5
-			_bufferedTime = _bytesLoaded / _bytesTotal * _duration;
-
-			// build JSON
-			var values:String = "duration:" + _duration +
-							",currentTime:" + _currentTime +
-							",muted:" + _isMuted +
-							",paused:" + _isPaused +
-							",ended:" + _isEnded +
-							",volume:" + _volume +
-							",src:\"" + _currentUrl + "\"" +
-							",bytesTotal:" + _bytesTotal +
-							",bufferedBytes:" + _bytesLoaded +
-							",bufferedTime:" + _bufferedTime +
-							"";
-
-			_element.sendEvent(eventName, values);
-		}
-
-	}
-
-}
+
+package htmlelements
+{
+	import flash.events.Event;
+	import flash.events.IOErrorEvent;
+	import flash.events.ProgressEvent;
+	import flash.events.TimerEvent;
+	import flash.media.ID3Info;
+	import flash.media.Sound;
+	import flash.media.SoundChannel;
+	import flash.media.SoundLoaderContext;
+	import flash.media.SoundTransform;
+	import flash.net.URLRequest;
+	import flash.utils.Timer;
+
+
+
+	/**
+	* ...
+	* @author DefaultUser (Tools -> Custom Arguments...)
+	*/
+	public class AudioElement implements IMediaElement
+	{
+
+		private var _sound:Sound;
+		private var _soundTransform:SoundTransform;
+		private var _soundChannel:SoundChannel;
+		private var _soundLoaderContext:SoundLoaderContext;
+
+		private var _volume:Number = 1;
+		private var _preMuteVolume:Number = 0;
+		private var _isMuted:Boolean = false;
+		private var _isPaused:Boolean = true;
+		private var _isEnded:Boolean = false;
+		private var _isLoaded:Boolean = false;
+		private var _currentTime:Number = 0;
+		private var _duration:Number = 0;
+		private var _bytesLoaded:Number = 0;
+		private var _bytesTotal:Number = 0;
+		private var _bufferedTime:Number = 0;
+
+		private var _currentUrl:String = "";
+		private var _autoplay:Boolean = true;
+		private var _preload:String = "";
+
+		private var _element:FlashMediaElement;
+		private var _timer:Timer;
+		private var _firedCanPlay:Boolean = false;
+
+		public function duration():Number {
+			return _duration;
+		}
+
+		public function currentTime():Number {
+			return _currentTime;
+		}
+
+		public function currentProgress():Number {
+				return Math.round(_bytesLoaded/_bytesTotal*100);
+		}
+
+		public function AudioElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number)
+		{
+			_element = element;
+			_autoplay = autoplay;
+			_volume = startVolume;
+			_preload = preload;
+
+			_timer = new Timer(timerRate);
+			_timer.addEventListener(TimerEvent.TIMER, timerEventHandler);
+
+			_soundTransform = new SoundTransform(_volume);
+			_soundLoaderContext = new SoundLoaderContext();
+		}
+
+		// events
+		function progressHandler(e:ProgressEvent):void {
+
+			_bytesLoaded = e.bytesLoaded;
+			_bytesTotal = e.bytesTotal;
+
+			sendEvent(HtmlMediaEvent.PROGRESS);
+		}
+
+		function id3Handler(e:Event):void {
+			sendEvent(HtmlMediaEvent.LOADEDMETADATA);
+
+			try {
+				var id3:ID3Info = _sound.id3;
+				var obj = {
+					type:'id3',
+					album:id3.album,
+					artist:id3.artist,
+					comment:id3.comment,
+					genre:id3.genre,
+					songName:id3.songName,
+					track:id3.track,
+					year:id3.year
+				}
+			} catch (err:Error) {}
+
+
+		}
+
+		function timerEventHandler(e:TimerEvent) {
+			_currentTime = _soundChannel.position/1000;
+
+			// calculate duration
+			var duration = Math.round(_sound.length * _sound.bytesTotal/_sound.bytesLoaded/100) / 10;
+
+			// check to see if the estimated duration changed
+			if (_duration != duration && !isNaN(duration)) {
+
+				_duration = duration;
+				sendEvent(HtmlMediaEvent.LOADEDMETADATA);
+			}
+
+			// send timeupdate
+			sendEvent(HtmlMediaEvent.TIMEUPDATE);
+
+			// sometimes the ended event doesn't fire, here's a fake one
+			if (_duration > 0 && _currentTime >= _duration-0.2) {
+				handleEnded();
+			}
+		}
+
+		function soundCompleteHandler(e:Event) {
+			handleEnded();
+		}
+
+		function handleEnded():void {
+			_timer.stop();
+			_currentTime = 0;
+			_isEnded = true;
+
+			sendEvent(HtmlMediaEvent.ENDED);
+		}
+
+		//events
+
+
+		// METHODS
+		public function setSrc(url:String):void {
+			_currentUrl = url;
+			_isLoaded = false;
+		}
+
+
+		public function load():void {
+
+			if (_currentUrl == "")
+				return;
+
+			_sound = new Sound();
+			//sound.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
+			_sound.addEventListener(ProgressEvent.PROGRESS,progressHandler);
+			_sound.addEventListener(Event.ID3,id3Handler);
+			_sound.load(new URLRequest(_currentUrl));
+			_currentTime = 0;
+
+			sendEvent(HtmlMediaEvent.LOADSTART);
+
+			_isLoaded = true;
+
+			sendEvent(HtmlMediaEvent.LOADEDDATA);
+			sendEvent(HtmlMediaEvent.CANPLAY);
+			_firedCanPlay = true;
+
+			if (_playAfterLoading) {
+				_playAfterLoading = false;
+				play();
+			}
+		}
+
+		private var _playAfterLoading:Boolean= false;
+
+		public function play():void {
+
+			if (!_isLoaded) {
+				_playAfterLoading = true;
+				load();
+				return;
+			}
+
+			_timer.stop();
+
+			_soundChannel = _sound.play(_currentTime*1000, 0, _soundTransform);
+			_soundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+			_soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+
+			_timer.start();
+
+			didStartPlaying();
+		}
+
+		public function pause():void {
+
+			_timer.stop();
+			if (_soundChannel != null) {
+				_currentTime = _soundChannel.position/1000;
+				_soundChannel.stop();
+			}
+
+			_isPaused = true;
+			sendEvent(HtmlMediaEvent.PAUSE);
+		}
+
+
+		public function stop():void {
+			if (_timer != null) {
+				_timer.stop();
+			}
+			if (_soundChannel != null) {
+				_soundChannel.stop();
+				_sound.close();
+			}
+			unload();
+			sendEvent(HtmlMediaEvent.STOP);
+		}
+
+		public function setCurrentTime(pos:Number):void {
+			sendEvent(HtmlMediaEvent.SEEKING);
+			_timer.stop();
+			_currentTime = pos;
+			_soundChannel.stop();
+			_sound.length
+			_soundChannel = _sound.play(_currentTime * 1000, 0, _soundTransform);
+			sendEvent(HtmlMediaEvent.SEEKED);
+
+			_timer.start();
+
+			didStartPlaying();
+		}
+
+		private function didStartPlaying():void {
+			_isPaused = false;
+			sendEvent(HtmlMediaEvent.PLAY);
+			sendEvent(HtmlMediaEvent.PLAYING);
+			if (!_firedCanPlay) {
+				sendEvent(HtmlMediaEvent.LOADEDDATA);
+				sendEvent(HtmlMediaEvent.CANPLAY);
+				_firedCanPlay = true;
+			}
+		}
+
+
+		public function setVolume(volume:Number):void {
+
+			_volume = volume;
+			_soundTransform.volume = volume;
+
+			if (_soundChannel != null) {
+				_soundChannel.soundTransform = _soundTransform;
+			}
+
+			_isMuted = (_volume == 0);
+
+			sendEvent(HtmlMediaEvent.VOLUMECHANGE);
+		}
+
+		public function getVolume():Number {
+			if(_isMuted) {
+				return 0;
+			} else {
+				return _volume;
+			}
+		}
+
+
+		public function setMuted(muted:Boolean):void {
+
+			// ignore if already set
+			if ( (muted && _isMuted) || (!muted && !_isMuted))
+				return;
+
+			if (muted) {
+				_preMuteVolume = _soundTransform.volume;
+				setVolume(0);
+			} else {
+				setVolume(_preMuteVolume);
+			}
+
+			_isMuted = muted;
+		}
+
+		public function unload():void {
+			_sound = null;
+			_isLoaded = false;
+		}
+
+		private function sendEvent(eventName:String) {
+
+			// calculate this to mimic HTML5
+			_bufferedTime = _bytesLoaded / _bytesTotal * _duration;
+
+			// build JSON
+			var values:String = "duration:" + _duration +
+							",currentTime:" + _currentTime +
+							",muted:" + _isMuted +
+							",paused:" + _isPaused +
+							",ended:" + _isEnded +
+							",volume:" + _volume +
+							",src:\"" + _currentUrl + "\"" +
+							",bytesTotal:" + _bytesTotal +
+							",bufferedBytes:" + _bytesLoaded +
+							",bufferedTime:" + _bufferedTime +
+							"";
+
+			_element.sendEvent(eventName, values);
+		}
+
+	}
+
+}


This test (ecma3/RegExp/eregress_119909.as) is supposed to see if we can get PCRE to crash, but we do this by testing a large number of nested parens (500). PCRE 6.4 limited nested parens to 200 and then just returned no match, 7.3 no longer has a hard limit.  Test needs to be updated with new results.

--- test/ecma3/RegExp/eregress_119909.as
+++ test/ecma3/RegExp/eregress_119909.as
@@ -33,64 +33,78 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK *****
-*
-*
-* Date:    14 Jan 2002
-* SUMMARY: Shouldn't crash on regexps with many nested parentheses
-* See http://bugzilla.mozilla.org/show_bug.cgi?id=119909
-*
-*/
-//-----------------------------------------------------------------------------
-
-var SECTION = "eregress_119909";
-var VERSION = "";
-var TITLE   = "Shouldn't crash on regexps with many nested parentheses";
-var bug = "119909";
-
-startTest();
-writeHeaderToLog(SECTION + " " + TITLE);
-var testcases = getTestCases();
-test();
-
-function getTestCases() {
-	var array = new Array();
-	var item = 0;
-
-	var NO_BACKREFS = false;
-	var DO_BACKREFS = true;
-
-
-	//--------------------------------------------------
-
-	testThis(500, NO_BACKREFS, 'hello', 'goodbye');
-	testThis(500, DO_BACKREFS, 'hello', 'goodbye');
-
-	//--------------------------------------------------
-
-	/*
-	 * Creates a regexp pattern like (((((((((hello)))))))))
-	 * and tests str.search(), str.match(), str.replace()
-	 */
-	function testThis(numParens, doBackRefs, strOriginal, strReplace)
-	{
-	  var openParen = doBackRefs? '(' : '(?:';
-	  var closeParen = ')';
-	  var pattern = '';
-
-	  for (var i=0; i<numParens; i++) {pattern += openParen;}
-	  pattern += strOriginal;
-	  for (i=0; i<numParens; i++) {pattern += closeParen;}
-	  var re = new RegExp(pattern);
-
-	  var res = strOriginal.search(re);
-	  array[item++] = new TestCase(SECTION, "strOriginal.search(re)", -1, res);
-
-	  res = strOriginal.match(re);
-	  array[item++] = new TestCase(SECTION, "strOriginal.match(re)", null, res);
-
-	  res = strOriginal.replace(re, strReplace);
-	  array[item++] = new TestCase(SECTION, "strOriginal.replace(re, strReplace)", "hello", res);
-	}
-
-	return array;
-}
+*
+*
+* Date:    14 Jan 2002
+* SUMMARY: Shouldn't crash on regexps with many nested parentheses
+* See http://bugzilla.mozilla.org/show_bug.cgi?id=119909
+*
+*/
+//-----------------------------------------------------------------------------
+
+var SECTION = "eregress_119909";
+var VERSION = "";
+var TITLE   = "Shouldn't crash on regexps with many nested parentheses";
+var bug = "119909";
+
+startTest();
+writeHeaderToLog(SECTION + " " + TITLE);
+var testcases = getTestCases();
+test();
+
+function getTestCases() {
+	var array = new Array();
+	var item = 0;
+
+	var NO_BACKREFS = false;
+	var DO_BACKREFS = true;
+
+
+	//--------------------------------------------------
+
+	testThis(500, NO_BACKREFS, 'hello', 'goodbye');
+	testThis(500, DO_BACKREFS, 'hello', 'goodbye');
+
+	//--------------------------------------------------
+
+	/*
+	 * Creates a regexp pattern like (((((((((hello)))))))))
+	 * and tests str.search(), str.match(), str.replace()
+	 */
+	function testThis(numParens, doBackRefs, strOriginal, strReplace)
+	{
+	  var openParen = doBackRefs? '(' : '(?:';
+	  var closeParen = ')';
+	  var pattern = '';
+
+	  for (var i=0; i<numParens; i++) {pattern += openParen;}
+	  pattern += strOriginal;
+	  for (i=0; i<numParens; i++) {pattern += closeParen;}
+	  var re = new RegExp(pattern);
+
+	  if (doBackRefs) {
+		  var res = strOriginal.search(re);
+		  array[item++] = new TestCase(SECTION, "strOriginal.search(re)", -1, res);
+
+		  res = strOriginal.match(re);
+		  array[item++] = new TestCase(SECTION, "strOriginal.match(re)", null, res);
+
+		  res = strOriginal.replace(re, strReplace);
+		  array[item++] = new TestCase(SECTION, "strOriginal.replace(re, strReplace)", "hello", res);
+	  } else {
+	  	  var res = strOriginal.search(re);
+		  array[item++] = new TestCase(SECTION, "strOriginal.search(re)", 0, res);
+
+		  res = strOriginal.match(re);
+		  //Get the first element to compare
+		  res = res[0];
+		  array[item++] = new TestCase(SECTION, "strOriginal.match(re)", 'hello', res);
+
+		  res = strOriginal.replace(re, strReplace);
+		  array[item++] = new TestCase(SECTION, "strOriginal.replace(re, strReplace)", "goodbye", res);
+
+	  }
+	}
+
+	return array;
+}


Issue #99: Preserve Layer#refreshInterval when converting web map to basemap & operational layers.

--- src/com/esri/builder/model/ConfigLayer.as
+++ src/com/esri/builder/model/ConfigLayer.as
@@ -713,6 +713,10 @@
                     alpha={dynLyr.alpha}
                     url={dynLyr.url}
                     useproxy={dynLyr.proxyURL != null}/>;
+            if (dynLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(dynLyr.refreshInterval);
+            }
             if (dynLyr.showInLegend)
             {
                 if (dynLyr.showInLegendHiddenLayers)
@@ -746,6 +750,10 @@
                     alpha={imgLyr.alpha}
                     url={imgLyr.url}
                     useproxy={imgLyr.proxyURL != null}/>;
+            if (imgLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(imgLyr.refreshInterval);
+            }
             if (!imgLyr.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -764,6 +772,10 @@
                     alpha={tiledLyr.alpha}
                     url={tiledLyr.url}
                     useproxy={tiledLyr.proxyURL != null}/>;
+            if (tiledLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(tiledLyr.refreshInterval);
+            }
             if (tiledLyr.showInLegend)
             {
                 if (tiledLyr.showInLegendHiddenLayers)
@@ -790,6 +802,10 @@
                     url={csvLyr.url}
                     longitudefieldname={csvLyr.longitudeFieldName}
                     latitudefieldname={csvLyr.latitudeFieldName}/>;
+            if (csvLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(csvLyr.refreshInterval);
+            }
             if (!csvLyr.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -821,6 +837,10 @@
                         url={feaLyr.url}
                         iseditable={feaLyr.isEditable}
                         useproxy={feaLyr.proxyURL != null}/>;
+                if (feaLyr.refreshInterval > 0)
+                {
+                    lyrXML.@autorefresh = minutesToSeconds(feaLyr.refreshInterval);
+                }
                 if (!feaLyr.showInLegend)
                 {
                     lyrXML.@showinlegend = false;
@@ -835,6 +855,10 @@
                     visible={geoRSSLayer.visible}
                     alpha={geoRSSLayer.alpha}
                     url={geoRSSLayer.url}/>;
+            if (geoRSSLayer.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(geoRSSLayer.refreshInterval);
+            }
             if (!geoRSSLayer.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -864,6 +888,10 @@
                     visible={kmlLyr.visible}
                     alpha={kmlLyr.alpha}
                     url={kmlLyr.url}/>;
+            if (kmlLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(kmlLyr.refreshInterval);
+            }
             if (!kmlLyr.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -876,6 +904,10 @@
                     type="osm"
                     visible={osmLyr.visible}
                     alpha={osmLyr.alpha}/>;
+            if (osmLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(osmLyr.refreshInterval);
+            }
             if (!osmLyr.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -889,6 +921,10 @@
                     visible={veLyr.visible}
                     alpha={veLyr.alpha}
                     style={veLyr.mapStyle}/>;
+            if (veLyr.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(veLyr.refreshInterval);
+            }
             if (!veLyr.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -909,6 +945,10 @@
                     skipgetcapabilities={wmsLayer.skipGetCapabilities}
                     imageformat={wmsLayer.imageFormat}
                     url={wmsLayer.url}/>;
+            if (wmsLayer.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(wmsLayer.refreshInterval);
+            }
             if (!wmsLayer.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -945,6 +985,10 @@
                     imageformat={wmtsLayer.imageFormat}
                     url={wmtsLayer.url}
                     useproxy={tiledLyr.proxyURL != null}/>;
+            if (wmtsLayer.refreshInterval > 0)
+            {
+                lyrXML.@autorefresh = minutesToSeconds(wmtsLayer.refreshInterval);
+            }
             if (!wmtsLayer.showInLegend)
             {
                 lyrXML.@showinlegend = false;
@@ -976,6 +1020,10 @@
                         visible={webTiledLayer.visible}
                         alpha={webTiledLayer.alpha}
                         url={webTiledLayer.urlTemplate}/>;
+                if (webTiledLayer.refreshInterval > 0)
+                {
+                    lyrXML.@autorefresh = minutesToSeconds(webTiledLayer.refreshInterval);
+                }
                 if (!webTiledLayer.showInLegend)
                 {
                     lyrXML.@showinlegend = false;
@@ -996,6 +1044,12 @@
         }

         return lyrXML;
+    }
+
+    private static function minutesToSeconds(minutes:Number):Number
+    {
+        const SECONDS_IN_MINUTE:int = 60;
+        return minutes * SECONDS_IN_MINUTE;
     }

     private static function getPointSymbolXML(pointSymbol:Symbol):XML


advanced comparator

advanced comparator

--- src/com/kemsky/impl/filters/comparator.as
+++ src/com/kemsky/impl/filters/comparator.as
@@ -29,8 +29,6 @@
         else
         {
             var numeric:Boolean = (options & Stream.NUMERIC) == Stream.NUMERIC;
-            var caseInsensitive:Boolean = (options & Stream.CASEINSENSITIVE) == Stream.CASEINSENSITIVE;
-            var descending:Boolean = (options & Stream.DESCENDING) == Stream.DESCENDING;

             if (numeric)
             {
@@ -38,6 +36,9 @@
             }
             else
             {
+                var caseInsensitive:Boolean = (options & Stream.CASEINSENSITIVE) == Stream.CASEINSENSITIVE;
+                var descending:Boolean = (options & Stream.DESCENDING) == Stream.DESCENDING;
+
                 var typeOfA:String = TypeCache.getQualifiedClassName(a);
                 var typeOfB:String = TypeCache.getQualifiedClassName(b);


Transferred from the Adobe Open Source Subversion Repository

Revision: 15098
Author:   deeptika@adobe.com
Date:     2010-03-29T13:29:30.238202Z

Log Message:
-----------
Merging revision 15097 from 4.x branch.
Changing the position of drag proxy

QE notes:
Doc notes:
Bugs: FLEXDMV-2365 ([Mirroring] When layoutDirection is 'rtl', image of the chart item which is being dragged is seen away from mouse pointer)
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/charts/chartClasses/ChartBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/charts/chartClasses/ChartItemDragProxy.as</path>

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as
@@ -5026,14 +5026,14 @@
         var dragSource:DragSource = new DragSource();

         addDragData(dragSource);
-
-        var proxyOrigin:Point = event.target.localToGlobal(
+
+		var proxyOrigin:Point = event.target.localToGlobal(
 						new Point(event.localX, event.localY));
 		proxyOrigin = globalToLocal(proxyOrigin);

 		var xOffset:Number;
 		if(layoutDirection == LayoutDirection.RTL)
-			xOffset = - (proxyOrigin.x + event.localX);
+			xOffset = - (proxyOrigin.x - event.localX - width);
 		else
 			xOffset = - (proxyOrigin.x - event.localX);
 		var yOffset:Number = - (proxyOrigin.y - event.localY);


Transferred from the Adobe Open Source Subversion Repository

Revision: 11920
Author:   gosmith@adobe.com
Date:     2009-11-18T01:19:50.983542Z

Log Message:
-----------
Removed code in RichEditableText that used a new Flash Player 10.1 interface, ITextSupport, to make the text selection accessible. This API has been redesigned and is being replaced by a new ISimpleTextSelection interface.

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

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

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -26,7 +26,6 @@
 import flash.text.engine.ElementFormat;
 import flash.text.engine.FontDescription;
 import flash.text.engine.FontLookup;
-import flash.text.engine.ITextSupport;
 import flash.text.engine.TextBlock;
 import flash.text.engine.TextElement;
 import flash.text.engine.TextLine;
@@ -385,7 +384,7 @@
  *  @productversion Flex 4
  */
 public class RichEditableText extends UIComponent
-    implements IFocusManagerComponent, IIMESupport, ITextSupport, IViewport
+    implements IFocusManagerComponent, IIMESupport, IViewport
 {
     include "../core/Version.as";

@@ -1116,19 +1115,6 @@
     //  Properties
     //
     //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  canReconvert
-    //----------------------------------
-
-	/**
-	 *  @private
-	 *  FIXME (gosmith)
-	 */
-	public function get canReconvert():Boolean
-	{
-		return enabled && editable;
-	}

     //----------------------------------
     //  content
@@ -1658,34 +1644,6 @@
     }

     //----------------------------------
-    //  selectionActiveIndex
-    //----------------------------------
-
-	/**
-	 *  @private
-	 *  FIXME (gosmith): ITextSupport needs to rename its
-	 *  selectionActiveIndex to selectionActivePosition.
-	 */
-	public function get selectionActiveIndex():int
-	{
-		return _selectionActivePosition;
-	}
-
-    //----------------------------------
-    //  selectionAnchorIndex
-    //----------------------------------
-
-	/**
-	 *  @private
-	 *  FIXME (gosmith): ITextSupport needs to rename its
-	 *  selectionAnchorIndex to selectionAnchorPosition.
-	 */
-	public function get selectionAnchorIndex():int
-	{
-		return _selectionAnchorPosition;
-	}
-
-    //----------------------------------
     //  selectionActivePosition
     //----------------------------------

@@ -3726,16 +3684,6 @@
         dispatchChangeAndChangingEvents = true;
     }

-	/**
-	 *  @private
-	 *  FIXME (gosmith).
-	 */
-	public function getTextInRange(startIndex:int = -1,
-								   endIndex:int = -1):String
-	{
-		return null;
-	}
-
     //--------------------------------------------------------------------------
     //
     //  Event handlers


Transferred from the Adobe Open Source Subversion Repository

Revision: 17139
Author:   clucier@adobe.com
Date:     2010-07-30T18:34:09.362380Z

Log Message:
-----------
Fix for 0 duration autoReverse transitions.

QE notes: None
Doc notes: None
Bugs: SDK-26809
Reviewer: Jason
Tests run: Checkin, Mustella Cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/animation/Animation.as

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

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -876,8 +876,12 @@
         if (duration == 0)
         {
             for (i = 0; i < motionPaths.length; ++i)
-                currentValue[motionPaths[i].property] = motionPaths[i].
-                    keyframes[motionPaths[i].keyframes.length - 1].value;
+            {
+                currentValue[motionPaths[i].property] =
+                    _invertValues ?
+                    motionPaths[i].keyframes[0].value :
+                    motionPaths[i].keyframes[motionPaths[i].keyframes.length - 1].value;
+            }
             return;
         }


added a utility function and a Signal in scene for layers.

--- src/aerys/minko/scene/node/Scene.as
+++ src/aerys/minko/scene/node/Scene.as
@@ -64,6 +64,13 @@
 			return _nameToLayer[name];
 		}

+		public function belongsToLayer(leaf : ITaggable, layerName : String) : Boolean
+		{
+			var layer : uint = getLayerName(layerName);
+
+			return (leaf.tag & layer) != 0;
+		}
+
 		public function get activeCamera() : AbstractCamera
 		{
 			return _camera;
@@ -176,6 +183,7 @@
 			_renderingEnd = new Signal('Scene.renderingEnd');
 			_exitFrame = new Signal('Scene.exitFrame');
 			_layerNameChanged = new Signal('Scene.layerNameChanged');
+			_layers[0] = 'Default';
 		}

 		override protected function initializeSignalHandlers() : void


updated to work with Flex 3

updated to work with Flex 3

--- src/flexlib/controls/CanvasButton.as
+++ src/flexlib/controls/CanvasButton.as
@@ -25,16 +25,12 @@
 {
 	import mx.containers.Canvas;
 	import mx.controls.Button;
+	import mx.core.EdgeMetrics;
 	import mx.core.IContainer;
 	import mx.core.IFlexDisplayObject;
-	import mx.core.UIComponent;
+	import mx.core.ScrollPolicy;
 	import mx.core.UIComponentDescriptor;
 	import mx.core.mx_internal;
-	import mx.managers.IFocusManagerContainer;
-	import mx.core.IRawChildrenContainer;
-	import mx.core.IDataRenderer;
-	import flash.display.DisplayObject;
-	import mx.core.ScrollPolicy;

 	use namespace mx_internal;

@@ -71,26 +67,26 @@

 		public function CanvasButton():void {
 			super();
-
-
 		}

 		private var _childrenCreated:Boolean = false;

 		override protected function createChildren():void {
-			super.createChildren();
+			//super.createChildren();

 			//create our canvas and add it to the display list
 			canvas = new Canvas();
 			canvas.verticalScrollPolicy = _verticalScrollPolicy;
 			canvas.horizontalScrollPolicy = _horizontalScrollPolicy;
+			canvas.mouseChildren = super.mouseChildren;
+			canvas.buttonMode = super.buttonMode;
 			super.addChild(canvas);

 			//if child components have been specified in MXML then we need
 			//to add them all now
 			createComponents();

-			mouseChildren = true;
+			//mouseChildren = true;

 			_childrenCreated = true;
 		}
@@ -209,8 +205,55 @@
 	        if(canvas)
 	        	canvas.verticalScrollPolicy = value;
 	    }
-
-
-
+		public override function get buttonMode():Boolean{
+			return super.buttonMode;
+		}
+		public override function set buttonMode(value:Boolean):void{
+			super.buttonMode = value;
+			if(canvas) canvas.buttonMode = value;
+		}
+		public override function get mouseChildren():Boolean{
+			return super.mouseChildren;
+		}
+		public override function set mouseChildren(enable:Boolean):void{
+			super.mouseChildren = enable;
+			if(canvas) canvas.mouseChildren = enable;
+		}
+ 		//+HAS - Stubs for Flex 3 Beta 3
+		protected var _creatingContentPane:Boolean;
+		public function get creatingContentPane():Boolean{
+			return this._creatingContentPane
+		}
+		public function set creatingContentPane(value:Boolean):void{
+			this._creatingContentPane = value;
+		}
+		protected var _defaultButton:IFlexDisplayObject;
+		public function get defaultButton():IFlexDisplayObject{
+			return this._defaultButton;
+		}
+		public function set defaultButton(value:IFlexDisplayObject):void{
+			this._defaultButton = value;
+		}
+		protected var _horizontalScrollPosition:Number;
+		public function get horizontalScrollPosition():Number{
+			return this._horizontalScrollPosition;
+		}
+		public function set horizontalScrollPosition(value:Number):void{
+			this._horizontalScrollPosition = value;
+		}
+		protected var _verticalScrollPosition:Number;
+		public function get verticalScrollPosition():Number{
+			return this._verticalScrollPosition;
+		}
+		public function set verticalScrollPosition(value:Number):void{
+			this._verticalScrollPosition = value;
+		}
+		protected var _viewMetrics:EdgeMetrics;
+		public function get viewMetrics():EdgeMetrics{
+			return this._viewMetrics;
+		}
+		public function set viewMetrics(value:EdgeMetrics):void{
+			this._viewMetrics = value;
+		}
 	}
 }


commit initial

commit initial

--- testSrc/TestStream.as
+++ testSrc/TestStream.as
@@ -100,13 +100,26 @@
         }

         [Test]
-        public function testProperty():void
+        public function testObject():void
         {
             var item1:Item = new Item("1", 1, 2);
             var item2:Item = new Item("2", 2, 0);

             var s:Stream = $(item1, item2);

+            var d:Object = s.object("name");
+            assertEquals(d["1"], item1);
+            assertEquals(d["2"], item2);
+        }
+
+        [Test]
+        public function testProperty():void
+        {
+            var item1:Item = new Item("1", 1, 2);
+            var item2:Item = new Item("2", 2, 0);
+
+            var s:Stream = $(item1, item2);
+
             var result:Stream = s.filter(gt(prop("price"), 1));
             assertEquals(result.length, 1);
             assertEquals(result.first, item2);
@@ -136,7 +149,7 @@
         }

         [Test]
-        public function testOption():void
+        public function testFoldAsOption():void
         {
             var nullable:Stream = $(null);
             var nonnull:Stream = $("random");
@@ -197,6 +210,42 @@
             assertEquals(sum1, 10);

             var sum2:Number = $(0, 1, 2, 3, 4).fold(function (prev:Number, current:Number):Number
+            {
+                return prev + current;
+            }, 10);
+
+            assertEquals(sum2, 20);
+        }
+
+        [Test]
+        public function testFoldLeft():void
+        {
+            var sum1:Number = $(0, 1, 2, 3, 4).foldLeft(function (prev:Number, current:Number):Number
+            {
+                return prev + current;
+            }, 0);
+
+            assertEquals(sum1, 10);
+
+            var sum2:Number = $(0, 1, 2, 3, 4).foldLeft(function (prev:Number, current:Number):Number
+            {
+                return prev + current;
+            }, 10);
+
+            assertEquals(sum2, 20);
+        }
+
+        [Test]
+        public function testFoldRight():void
+        {
+            var sum1:Number = $(0, 1, 2, 3, 4).foldRight(function (prev:Number, current:Number):Number
+            {
+                return prev + current;
+            }, 0);
+
+            assertEquals(sum1, 10);
+
+            var sum2:Number = $(0, 1, 2, 3, 4).foldRight(function (prev:Number, current:Number):Number
             {
                 return prev + current;
             }, 10);
@@ -238,7 +287,6 @@
             vegetables.sortOn("name");

             vegetables.sortOn("price", Array.NUMERIC | Array.DESCENDING);
-            log.info("{0}", vegetables);

             var val:Number = vegetables[0].price;
             for (var i:int = 0; i < vegetables.length; i++)
@@ -273,14 +321,12 @@
             assertEquals(names[2], "third");

             var test:Stream = items.value(or(eq(4), eq(0)));
-            log.info("{0}", test.length);
         }

         [Test]
         public function testCreate():void
         {
             var streamEmpty:Stream = $();
-            join(streamEmpty);
             assertEquals(streamEmpty.length, 0);
             iterate(streamEmpty);
             deleteItem(streamEmpty);
@@ -288,7 +334,6 @@
             pop(streamEmpty);

             var streamArray:Stream = $([1, 2, 3, 4, 5]);
-            join(streamArray);
             assertEquals(streamArray.length, 5);
             iterate(streamArray);
             deleteItem(streamArray);
@@ -296,7 +341,6 @@
             pop(streamArray);

             var streamArrayCollection:Stream = $(new ArrayCollection([1, 2, 3, 4, 5]));
-            join(streamArrayCollection);
             assertEquals(streamArrayCollection.length, 5);
             iterate(streamArrayCollection);
             deleteItem(streamArrayCollection);
@@ -304,7 +348,6 @@
             pop(streamArrayCollection);

             var streamArguments:Stream = $(1, 2, 3, 4, 5);
-            join(streamArguments);
             assertEquals(streamArguments.length, 5);
             iterate(streamArguments);
             deleteItem(streamArguments);
@@ -312,7 +355,6 @@
             pop(streamArguments);

             var streamOneItem:Stream = $("item");
-            join(streamOneItem);
             assertEquals(streamOneItem.length, 1);
             iterate(streamOneItem);
             deleteItem(streamOneItem);


Well, this is heisentastic, and to top everything off it seems to
always act like the size is 320x240 now, instead of what it used to do.
Ack!

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@749 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/CameraSnapshotter.as
+++ src/as/com/threerings/flash/CameraSnapshotter.as
@@ -126,7 +126,12 @@
         // this code is specifically saying: "fuck up the scale", so if Adobe fixes their
         // bug in the future, this will cause broken behavior.
         _bitmap.bitmapData.draw(_video,
-            new Matrix(_camera.width / 160, 0, 0, _camera.height / 120));
+            new Matrix(_camera.width / 320, 0, 0, _camera.height / 240));
+//        com.threerings.util.Log.testing("Camera stuff",
+//            "camera.width", _camera.width, "camera.height", _camera.height,
+//            "video.width", _video.width, "video.height", _video.height,
+//            "videoWidth", _video.videoWidth, "videoHeight", _video.videoHeight,
+//            "bitmap.width", _bitmap.width, "bitmap.height", _bitmap.height);

         if (_video.parent != null) {
             removeChild(_video);


Uncomment my work around NetStream.Play.Stop

--- src/SoundManager2_AS3.as
+++ src/SoundManager2_AS3.as
@@ -537,16 +537,22 @@
         writeDebug('netStatusEvent: ' + e.info.code);
       }

+      // When streaming, Stop is called when buffering stops, not when the stream is actually finished.
+      // @see http://www.actionscript.org/forums/archive/index.php3/t-159194.html
       if (e.info.code == "NetStream.Play.Stop") { // && !oSound.didFinish && oSound.loaded == true && nD == nP
-        // finished playing
-        // oSound.didFinish = true; // will be reset via JS callback
-        oSound.didJustBeforeFinish = false; // reset
-        writeDebug('calling onfinish for a sound');
-        // reset the sound? Move back to position 0?
-        checkProgress();
-        ExternalInterface.call(baseJSObject + "['" + oSound.sID + "']._onfinish");
-        // and exit full-screen mode, too?
-        stage.displayState = StageDisplayState.NORMAL;
+        //if (!oSound.useNetstream) {
+          // finished playing
+          // oSound.didFinish = true; // will be reset via JS callback
+          oSound.didJustBeforeFinish = false; // reset
+          writeDebug('calling onfinish for a sound');
+          // reset the sound? Move back to position 0?
+          checkProgress();
+          ExternalInterface.call(baseJSObject + "['" + oSound.sID + "']._onfinish");
+          // and exit full-screen mode, too?
+          stage.displayState = StageDisplayState.NORMAL;
+        //} else {
+        //  writeDebug('NetStream.Play.Stop called for a streaming sound...buffer is full?');
+        //}
       } else if (e.info.code == "NetStream.Play.FileStructureInvalid" || e.info.code == "NetStream.Play.FileStructureInvalid" || e.info.code == "NetStream.Play.StreamNotFound") {
         this.onLoadError(oSound);
       } else if (e.info.code == "NetStream.Play.Start" || e.info.code == "NetStream.Buffer.Empty" || e.info.code == "NetStream.Buffer.Full") {


add change animation ability

add change animation ability

--- src/com/merlinds/miracle_tool/viewer/ViewerView.as
+++ src/com/merlinds/miracle_tool/viewer/ViewerView.as
@@ -20,7 +20,6 @@
 	import flash.events.Event;
 	import flash.filesystem.FileMode;
 	import flash.filesystem.FileStream;
-	import flash.html.script.Package;
 	import flash.utils.ByteArray;

 	[SWF(backgroundColor="0x333333", frameRate=60)]
@@ -127,19 +126,19 @@
 			//add animation to miracle
 			var animation:String = list.selectedItem.toString();
 			log(this, "selectAnimationHandler", animation);
-			Miracle.currentScene.createAnimation(_name, _name + "." + animation, 60)
-					.addEventListener(Event.ADDED_TO_STAGE, this.imageAddedToStage);
+			if(_current == null){
+				_current = Miracle.currentScene.createAnimation(_name, _name + "." + animation, 60);
+				_current.addEventListener(Event.ADDED_TO_STAGE, this.imageAddedToStage);
+			}else{
+				_current.animation = _name + "." + animation;
+			}
 		}

 		private function imageAddedToStage(event:Event):void {
-			var target:MiracleDisplayObject = event.target as MiracleDisplayObject;
-			target.moveTO(
-					500,300 /*this.stage.stageWidth - target.width >> 1,
-					this.stage.stageHeight - target.height >> 1*/
+			_current.moveTO(
+					this.stage.stageWidth - _current.width >> 1,
+					this.stage.stageHeight - _current.height >> 1
 			);
-			_current = target;
-			_current.currentFrame = 0;
-//			_current.stop();
 		}

 		private function selectFpsHandler(event:Event):void {


undo recent change

undo recent change

Change-Id: I2b39cb43581c9bb84546b6e99c9164f8d1b23b0f

--- WeaveData/src/weave/data/AttributeColumns/ReferencedColumn.as
+++ WeaveData/src/weave/data/AttributeColumns/ReferencedColumn.as
@@ -77,13 +77,13 @@
 				// do nothing if this is the same column
 				if (_internalColumn != newColumn)
 				{
-					if (_internalColumn)
-						_internalColumn.removeCallback(triggerCallbacks);
-
-					_internalColumn = newColumn;
-
-					if (_internalColumn)
-						_internalColumn.addImmediateCallback(this, triggerCallbacks, false, true);
+					if (_internalColumn != null)
+						(WeaveAPI.SessionManager as SessionManager).unregisterLinkableChild(this, _internalColumn);
+
+					_internalColumn = newColumn;
+
+					if (_internalColumn != null)
+						registerLinkableChild(this, _internalColumn);
 				}
 			}
 			return _internalColumn;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/mx/src/mx/skins/halo/DateChooserIndicator.as
+++ frameworks/projects/mx/src/mx/skins/halo/DateChooserIndicator.as
@@ -21,6 +21,11 @@
 /**
  *  The skins of the DateChooser's indicators for
  *  displaying today, rollover and selected dates.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class DateChooserIndicator extends ProgrammaticSkin
 {
@@ -34,6 +39,11 @@

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


Escaping doc. Send white space again while keep alive. Error event was mismatched.

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

--- src/org/igniterealtime/xiff/core/XMPPConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPConnection.as
@@ -97,22 +97,22 @@
 	{
 		/**
 		 * Stream type lets user set opening/closing tag.
-		 * <stream:stream>
+		 * <stream:stream>
 		 */
 		public static const STREAM_TYPE_STANDARD:uint = 0;
 		/**
 		 * Stream type lets user set opening/closing tag.
-		 * <stream:stream />
+		 * <stream:stream />
 		 */
 		public static const STREAM_TYPE_STANDARD_TERMINATED:uint = 1;
 		/**
 		 * Stream type lets user set opening/closing tag.
-		 * <flash:stream>
+		 * <flash:stream>
 		 */
 		public static const STREAM_TYPE_FLASH:uint = 2;
 		/**
 		 * Stream type lets user set opening/closing tag.
-		 * <flash:stream />
+		 * <flash:stream />
 		 */
 		public static const STREAM_TYPE_FLASH_TERMINATED:uint = 3;

@@ -343,9 +343,9 @@
 		 * @see	org.igniterealtime.xiff.data.ISerializable
 		 * @example	The following example sends a basic chat message to the user with the
 		 * JID "sideshowbob@springfieldpenitentiary.gov".

-		 *
var msg:Message = new Message( "sideshowbob@springfieldpenitentiary.gov", null, "Hi Bob.",
+		 * var msg:Message = new Message( "sideshowbob@springfieldpenitentiary.gov", null, "Hi Bob.",
 		 * "Hi Bob.", Message.CHAT_TYPE );
-		 * myXMPPConnection.send( msg );

+		 * myXMPPConnection.send( msg );
 		 */
 		public function send( o:XMPPStanza ):void
 		{
@@ -378,12 +378,13 @@

 		/**
 		 * Sends empty data in order to keep the connection alive.
+		 * TODO: Replace with XMPP ping extension.
 		 */
 		public function sendKeepAlive():void
 		{
 			if ( isActive() )
 			{
-				sendXML("< />"); // String
+				sendXML(" "); // String
 			}
 		}

@@ -899,7 +900,7 @@
 			socket = new Socket();
 			socket.addEventListener(Event.CLOSE, socketClosed);
 			socket.addEventListener(Event.CONNECT, socketConnected);
-			socket.addEventListener(IOErrorEvent.IO_ERROR, onSecurityError);
+			socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
 			socket.addEventListener(ProgressEvent.SOCKET_DATA, socketDataReceived);
 			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
 		}
@@ -1059,7 +1060,7 @@
 		 */
 		protected function sendXML( someData:* ):void
 		{
-			trace("OUTGOING: {0}", someData);
+			trace("OUTGOING: {0}" + someData);

 			trace("sendXML. someData type: " + (typeof someData));

@@ -1321,7 +1322,7 @@

 		/**
-		 * Gets the fully qualified unescaped JID (user\@server/resource) of the user.
+		 * Gets the fully qualified unescaped JID of the user.
 		 * A fully-qualified JID includes the resource. A bare JID does not.
 		 * To get the bare JID, use the bareJID property of the UnescapedJID.
 		 *


Edited elsewhere and forgot it there. Now this is the only difference what was done earlier.

--- src/org/igniterealtime/xiff/core/XMPPConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPConnection.as
@@ -488,7 +488,10 @@
 		}

 		/**
-		 * Sends ping to server in order to keep the connection alive.
+		 * Sends ping to server in order to keep the connection alive, in case the server
+		 * has not indicated that it would not support it.
+		 *
+		 * TODO: Whitespace keepalive if ping not supported...
 		 */
 		public function sendKeepAlive():void
 		{


Exporter: default to "Optimize for Speed" in new projects.

This is definitely the recommended setting

--- exporter/src/main/as/flump/export/ExportConf.as
+++ exporter/src/main/as/flump/export/ExportConf.as
@@ -31,7 +31,7 @@
     /** Additional scaleFactors to output */
     public var additionalScaleFactors :Array = [];
     /** The optimization strategy. */
-    public var optimize :String = OPTIMIZE_MEMORY;
+    public var optimize :String = OPTIMIZE_SPEED;
     /** The stage quality setting (StageQuality). */
     public var quality :String = StageQuality.BEST;
     /** Whether or not to pretty print the library. */


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

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

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

 package mx.controls
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5209
Author:   gruehle@adobe.com
Date:     2009-03-09T18:47:59.771020Z

Log Message:
-----------
More bug fixes for Spark skins for Halo components.

SDK-19724 - If you change themeColor at runtime, it does not affect rollOverColor and selectionColor even if you compile with -compatibility-version=3
SDK-19719 - The top edge of a TabNavigator using a Spark skin doesn't look disabled when the container is disabled.
SDK-19628 - Disabled TabBar and TabNavigator render differently when using Gumbo skins
SDK-19627 - disabled Halo TabBar control not rendering correctly when using Gumbo skins
SDK-19612 - disabled Halo DateChooser should set the alpha on the calendar icon when disabled
SDK-19585 - Menus compiled with the halo theme in Flex 4 have a different border color than in Flex 3
SDK-19718 - Spark Alert skin should allow for more space at the bottom (under the button(s))
SDK-19649 - Default height of Halo RadioButton is different
SDK-19648 - Default height of a halo CheckBox is different now.
SDK-19615 - very difficult to tell if a Halo HSlider or VSlider with Gumbo skin is disabled
SDK-19561 - FxSlider thumb is smaller than Slider thumb
SDK-17416 - Setting the themeColor at runtime with the StyleManager does not affect rollOverColor.

QA/Doc Notes: These changes are controlled by the compatibility-version flag:
* Disabled container appearance:
  - old behavior: disabled containers dimmed the contents, but not the border
  - new behavior: disabled containers dim contents and the border
* Slider thumb measurement:
  - old behavior: slider thumbs forced measured size to 12x12
  - new behavior: slider thumbs measured size dictated by skin

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/BorderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/SliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/TextInputBorderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/SliderThumb.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/TabSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -3235,6 +3235,9 @@
         {
             vm = viewMetrics;

+			if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
+				vm = EdgeMetrics.EMPTY;
+
             var bgColor:Object = enabled ?
                                  null :
                                  getStyle("backgroundDisabledColor");


Transferred from the Adobe Open Source Subversion Repository

Revision: 11163
Author:   dloverin@adobe.com
Date:     2009-10-26T20:35:33.260693Z

Log Message:
-----------
Changes to turn on the per-module style feature by default.

The feature can be turned off by compiling with -isolateStyles=false.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex, Paul
Tests run: checkintests, all mustella
Is noteworthy for integration: Yes.

Summary of changes:

frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as
Propagate the module factory in setFlexContent.

frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
Implement IFlexModule

frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as
Move getting style declaration from the constructor to the override of the module factory setter.

frameworks/projects/framework/src/mx/controls/Alert.as
Set moduleFactory to parent if parent is an IFlexModuleFactory.

frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/framework/src/mx/controls/RadioButton.as
Move getting style declaration from the constructor to the override of the module factory setter.

frameworks/projects/framework/src/mx/controls/SWFLoader.as
Handle the “get parent module factory” request from an embedded swf.

frameworks/projects/framework/src/mx/core/Container.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/framework/src/mx/core/UIComponent.as
Defer setting styles until a module factory is set.

frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as
Set the module factory of an added child.

frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
Set the module factory of the tooltip to be the same as the target.

frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
Rename parameter based on PARB feedback.

frameworks/projects/framework/src/mx/styles/IStyleModule.as
Add setStyleDeclarations per spec.

frameworks/projects/framework/src/mx/styles/StyleManager.as
Deprecate old static StyleManager API.

frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
Use IStyleModule.setStyleDeclarations.

frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
A fix to get the correct style manager and pass styleManager in CSSStyleDeclaration.

frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/spark/src/spark/components/Group.as
Propagate moduleFactory in elementAdded().

modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java
Rename –create-style-manager option to –isloateStyles. The option has been changed from hidden to advanced.

modules/compiler/src/java/flex2/compiler/css/StyleDef.vm
Fix bug to not add a default factory that is not needed.

modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDef.vm
Initialize styles in a module factory setter override.

modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm
Changed emitComponentInitializers_1 to not emit style related code if the document implements IFlexModule. Created emitComponentStyleInitializers to emit those styles.

modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
Generate code to match ClassDef.vm and ClassDefLib.vm changes.

modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
Add IFlexModuleFactory to standard imports.

modules/compiler/src/java/flex2/configuration_en.properties
Rename –create-style-manager option to –isloateStyles.

modules/compiler/src/java/flex2/tools/PreLink.java
Rename –create-style-manager option to –isloateStyles.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.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/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.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/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -4255,7 +4255,7 @@
             if (childDescriptor.stylesFactory != null)
             {
                 if (!scChild.styleDeclaration)
-                    scChild.styleDeclaration = new CSSStyleDeclaration();
+                    scChild.styleDeclaration = new CSSStyleDeclaration(null, styleManager);
                 scChild.styleDeclaration.factory =
                     childDescriptor.stylesFactory;
             }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


added error message for when Flash object has been removed from the DOM.

--- WeaveAPI/src/JavaScript.as
+++ WeaveAPI/src/JavaScript.as
@@ -261,6 +261,8 @@

 					function cacheProxyFunction(id) {
 						var func = function() {
+							if (!flash[JSON_CALL])
+								throw new Error("Cannot use the JavaScript API of a Flash object after it has been removed from the DOM.");
 							var params = Array.prototype.slice.call(arguments);
 							var paramsJson = toJson(params);
 							var resultJson = flash[JSON_CALL](id, paramsJson);


fixed a namespace issue causing null reference exceptions in Minko Studio

--- src/aerys/minko/type/animation/timeline/MatrixSegmentTimeline.as
+++ src/aerys/minko/type/animation/timeline/MatrixSegmentTimeline.as
@@ -8,8 +8,8 @@

 	public final class MatrixSegmentTimeline extends AbstractTimeline
 	{
-		private var _timeTable	: Vector.<uint>			= null;
-		private var _matrices	: Vector.<Matrix4x4>	= null;
+		minko_animation var _timeTable	: Vector.<uint>			= null;
+		minko_animation var _matrices	: Vector.<Matrix4x4>	= null;

 		public function MatrixSegmentTimeline(propertyPath		: String,
 											  timeTable 		: Vector.<uint>,


ImageEditor, Flash: After all commits are done, make sure that everything is rendered by explicitly calling draw() method in the end.

--- src/flash/src/com/ImageEditor.as
+++ src/flash/src/com/ImageEditor.as
@@ -167,8 +167,10 @@
 		{
 			if (_commitIndex < _historyIndex) {
 				_currOp = _history[_commitIndex];
-				this[_currOp.method].apply(null, _currOp.args);
+				this[_currOp.method].apply(this, _currOp.args);
 			} else {
+				draw();
+				onDrawComplete();
 				_busy = false;
 				dispatchEvent(new ImageEditorEvent(ImageEditorEvent.COMPLETE));
 			}


Added horizontal support in CompoundBarChart's error bars.

--- WeaveUI/src/weave/visualization/plotters/CompoundBarChartPlotter.as
+++ WeaveUI/src/weave/visualization/plotters/CompoundBarChartPlotter.as
@@ -300,8 +300,9 @@
 					{
 						var errorMinusVal:Number = errorPlusVal;
 					}
-					if (!_horizontalMode && !isNaN(errorPlusVal) && !isNaN(errorMinusVal))
+					if (!isNaN(errorPlusVal) && !isNaN(errorMinusVal))
 					{
+
 						var center:Number = (barStart+barEnd)/2;
 						var width:Number = barEnd-barStart;
 						var left:Number = center-width/4;
@@ -311,19 +312,30 @@
 						var bottom:Number = yMax - errorMinusVal;

 						var points:Array = []
-						points.push(new Point(left, top));
-						points.push(new Point(right, top));
-						points.push(new Point(center, top));
-						points.push(new Point(center, bottom));
-						points.push(new Point(left, bottom));
-						points.push(new Point(right, bottom));
+						if (!_horizontalMode)
+						{
+							points.push(new Point(left, top));
+							points.push(new Point(right, top));
+							points.push(new Point(center, top));
+							points.push(new Point(center, bottom));
+							points.push(new Point(left, bottom));
+							points.push(new Point(right, bottom));
+						}
+						else
+						{
+							points.push(new Point(top, left));
+							points.push(new Point(top, right));
+							points.push(new Point(top, center));
+							points.push(new Point(bottom, center));
+							points.push(new Point(bottom, left));
+							points.push(new Point(bottom, right));
+						}

-						points.forEach(function(p) {
-							dataBounds.projectPointTo(p, screenBounds)}
-						);
-
-
+						for each (var p:Point in points)
+						{
+							dataBounds.projectPointTo(p, screenBounds)
+						}
 						while (points.length != 0)
 						{
 							var a,b:Point;
@@ -332,10 +344,6 @@
 							graphics.moveTo(a.x, a.y);
 							graphics.lineTo(b.x, b.y);
 						}
-					}
-					else
-					{
-						var center:Number = (dataBounds.getYMin()+dataBounds.getYMax())/2;
 					}
 				}
 				//------------------------------------


Mirror the camera using a transform matrix on the video (though that doesn't seem to affect the resulting BitmapData, weirdly)

--- src/CameraMan.as
+++ src/CameraMan.as
@@ -14,6 +14,7 @@
     import flash.display.BitmapData;
     import flash.media.Camera;
     import flash.media.Video;
+    import flash.geom.Matrix;
     import flash.utils.ByteArray;
     import mx.graphics.codec.JPEGEncoder;

@@ -95,6 +96,12 @@

             videoface = new Video(cam.width, cam.height);
             videoface.attachCamera(cam);
+
+            var mirror:Matrix = new Matrix();
+            mirror.scale(-1, 1);
+            mirror.translate(cam.width, 0);
+            videoface.transform.matrix = mirror;
+
             this.addChild(videoface);
         }


LineChartPlotter now supports line styles defined by data.

--- WeaveUISpark/src/weave/visualization/plotters/LineChartPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/LineChartPlotter.as
@@ -28,8 +28,6 @@
 	import weave.api.ui.IPlotTask;
 	import weave.api.ui.IPlotter;
 	import weave.api.ui.ISelectableAttributes;
-	import weave.core.SessionManager;
-	import weave.data.AttributeColumns.AlwaysDefinedColumn;
 	import weave.data.AttributeColumns.DynamicColumn;
 	import weave.data.KeySets.FilteredKeySet;
 	import weave.visualization.layers.PlotTask;
@@ -43,12 +41,6 @@
 		{
 			sortedUnfilteredKeys.setColumnKeySources([group, order, dataX, dataY]);
 			setSingleKeySource(sortedUnfilteredKeys);
-
-			// temporary solution until lineStyle is given record keys
-			var sm:SessionManager = WeaveAPI.SessionManager as SessionManager;
-			var ls:SolidLineStyle = lineStyle;
-			for each (var adc:AlwaysDefinedColumn in [ls.alpha,ls.caps,ls.color,ls.joints,ls.miterLimit,ls.pixelHinting,ls.scaleMode,ls.weight])
-				sm.excludeLinkableChildFromSessionState(adc, adc.internalDynamicColumn);
 		}

 		public function getSelectableAttributeNames():Array
@@ -85,6 +77,7 @@
 	}
 }

+import flash.display.BitmapData;
 import flash.display.Graphics;
 import flash.display.Shape;
 import flash.geom.Point;
@@ -108,29 +101,28 @@
 		this.plotter = plotter;
 		this.task = task;
 		this.unfilteredKeySet = unfilteredKeySet;
-		this.shape = new Shape();
-		this.point = new Point();
+		this.renderer = new AsyncLineRenderer();
+
 		if ((task as PlotTask).taskType != PlotTask.TASK_TYPE_SUBSET)
 			this.keySet = newDisposableChild(plotter, KeySet);
 	}

+	public var renderer:AsyncLineRenderer;
 	public var plotter:LineChartPlotter;
 	public var task:IPlotTask;
-	public var shape:Shape;
-	public var point:Point;
 	public var unfilteredKeySet:IKeySet;
 	public var keys:Array;
 	public var keyIndex:Number;
-	public var handlePoint:Function;
 	public var keySet:KeySet;
 	public var group:Number;

+	private static const tempPoint:Point = new Point();
+
 	public function iterate():Number
 	{
-		var graphics:Graphics = shape.graphics;
 		if (task.iteration == 0)
 		{
-			handlePoint = graphics.moveTo;
+			renderer.reset();
 			if (keySet)
 			{
 				keySet.clearKeys();
@@ -142,15 +134,11 @@

 		try
 		{
-			graphics.clear();
-			graphics.moveTo(point.x, point.y);
-			plotter.lineStyle.beginLineStyle(null, graphics);
-
 			for (; keyIndex < keys.length; keyIndex++)
 			{
 				if (getTimer() > task.iterationStopTime)
 				{
-					task.buffer.draw(shape);
+					renderer.flush(task.buffer);
 					return keyIndex / keys.length;
 				}

@@ -158,30 +146,24 @@

 				if (keySet ? keySet.containsKey(key) : plotter.filteredKeySet.containsKey(key))
 				{
-					point.x = plotter.dataX.getValueFromKey(key, Number);
-					point.y = plotter.dataY.getValueFromKey(key, Number);
+					tempPoint.x = plotter.dataX.getValueFromKey(key, Number);
+					tempPoint.y = plotter.dataY.getValueFromKey(key, Number);
+
+					if (isFinite(tempPoint.x) && isFinite(tempPoint.y))
+						task.dataBounds.projectPointTo(tempPoint, task.screenBounds);
 				}
 				else
 				{
-					point.x = point.y = NaN;
+					tempPoint.x = tempPoint.y = NaN;
 				}
-
-				if (isFinite(point.x) && isFinite(point.y))
-					task.dataBounds.projectPointTo(point, task.screenBounds);

 				// if group differs from previous group, use moveTo()
 				var newGroup:Number = plotter.group.getValueFromKey(key, Number);
 				if (ObjectUtil.numericCompare(group, newGroup) != 0)
-					handlePoint = graphics.moveTo;
+					renderer.newLine();
 				group = newGroup;

-				if (isFinite(point.x) && isFinite(point.y))
-				{
-					handlePoint(point.x, point.y);
-					handlePoint = graphics.lineTo;
-				}
-				else
-					handlePoint = graphics.moveTo;
+				renderer.addPoint(tempPoint.x, tempPoint.y, plotter.lineStyle.getLineStyleParams(key));
 			}
 		}
 		catch (e:Error)
@@ -189,8 +171,80 @@
 			reportError(e);
 		}

-		task.buffer.draw(shape);
-
+		renderer.flush(task.buffer);
 		return 1;
 	}
-}+}
+
+internal class AsyncLineRenderer
+{
+	public function AsyncLineRenderer()
+	{
+		shape = new Shape();
+		graphics = shape.graphics;
+	}
+
+	private var shape:Shape;
+	private var graphics:Graphics;
+	private var handlePoint:Function;
+	private var prevX:Number;
+	private var prevY:Number;
+	private var continueLine:Boolean;
+	private var prevLineStyle:Array;
+
+	/**
+	 * Call this at the beginning of the async task
+	 */
+	public function reset():void
+	{
+		graphics.clear();
+		newLine();
+	}
+
+	/**
+	 * Call this before starting a new line
+	 */
+	public function newLine():void
+	{
+		continueLine = false;
+	}
+
+	/**
+	 * Call this for each coordinate in the line, whether the coordinates are defined or not.
+	 */
+	public function addPoint(x:Number, y:Number, lineStyleParams:Array):void
+	{
+		var isDefined:Boolean = isFinite(x) && isFinite(y);
+
+		if (isDefined && continueLine)
+		{
+			var midX:Number = (prevX + x) / 2;
+			var midY:Number = (prevY + y) / 2;
+
+			graphics.lineStyle.apply(graphics, prevLineStyle);
+			graphics.lineTo(midX, midY);
+			graphics.lineStyle.apply(graphics, lineStyleParams);
+			graphics.lineTo(x, y);
+		}
+		else
+		{
+			graphics.moveTo(x, y);
+		}
+
+		prevX = x;
+		prevY = y;
+		continueLine = isDefined;
+		prevLineStyle = lineStyleParams;
+	}
+
+	/**
+	 * Call this to flush the graphics to a BitmapData buffer.
+	 */
+	public function flush(buffer:BitmapData):void
+	{
+		buffer.draw(shape);
+		graphics.clear();
+		if (continueLine)
+			graphics.moveTo(prevX, prevY);
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 15825
Author:   jszeto@adobe.com
Date:     2010-04-29T20:22:08.624592Z

Log Message:
-----------
Add missing FormItemLayout file

This is just a placeholder for now.

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

Modified Paths:
--------------
/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/layouts/FormItemLayout.as

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

--- frameworks/projects/spark/src/spark/layouts/FormItemLayout.as
+++ frameworks/projects/spark/src/spark/layouts/FormItemLayout.as
@@ -0,0 +1,11 @@
+package spark.layouts
+{
+    // Placeholder for real FormItemLayout
+
+    public class FormItemLayout
+    {
+        public function FormItemLayout()
+        {
+        }
+    }
+}


Fixed an obvious bug -  calculated values rather than passed values are now used.

Signed-off-by: Don-Duong Quach <810608f14f8c036b578d4e5c6fb9aa2c363c1b16@yahoo.com>

--- src/org/openPyro/core/Padding.as
+++ src/org/openPyro/core/Padding.as
@@ -16,9 +16,9 @@
 		public function Padding(top:Number=0, right:Number=-1, bottom:Number=-1, left:Number=-1)
 		{
 			_top = top;
-			_right = right > -1 ? right : top;
-			_bottom = bottom > -1 ? bottom : top;
-			_left = left > -1 ? left : right;
+			_right = right > -1 ? right : _top;
+			_bottom = bottom > -1 ? bottom : _top;
+			_left = left > -1 ? left : _right;
 		}

 		public function get top():Number


Transferred from the Adobe Open Source Subversion Repository

Revision: 8230
Author:   dloverin@adobe.com
Date:     2009-06-25T14:05:58.366381Z

Log Message:
-----------
Fix minimizing a window.

Updated a previous workaround so it doesn’t kick in when a window is minimized. The problem was caused by setting the height of a nativeWindow when the application was minimized. This caused AIR to restore the application. You would see a window minimize and then immediately restore.

QE Notes: none.
Doc Notes: none.
Bugs: SDK-22013

Reviewer: Glenn
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/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -2216,7 +2216,12 @@
             // Work around an AIR issue setting the stageHeight to zero when
             // using system chrome. The set of the stage.stageHeight property
             // is rejected unless the nativeWindow is first set to the proper height.
-            if (_bounds.height == 0 && systemChrome == NativeWindowSystemChrome.STANDARD)
+            // Don't perform this workaround if the window has zero height due
+            // to being minimized. Setting the nativeWindow height to non-zero
+            // causes AIR to restore the window.
+            if (_bounds.height == 0 &&
+                nativeWindow.displayState != NativeWindowDisplayState.MINIMIZED &&
+                systemChrome == NativeWindowSystemChrome.STANDARD)
                 nativeWindow.height = chromeHeight() + _bounds.height;

             systemManager.stage.stageWidth = _width = _bounds.width;


Transferred from the Adobe Open Source Subversion Repository

Revision: 7531
Author:   jimurphy@adobe.com
Date:     2009-06-03T19:20:35.382331Z

Log Message:
-----------
Merge 3.x revisions 7044,7172,7175,7177,7197,7475,7477,7479,7488,7495,7499 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.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/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ContainerRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Application.java</path>

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

--- frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as
@@ -333,6 +333,11 @@
      *  @productversion LCDS 3
      */
     public static const MAX_FREQUENCY_HEADER:String = "DSMaxFrequency";
+
+    /**
+     * Header that indicates the message is a heartbeat.
+     */
+    public static const HEARTBEAT_HEADER:String = "DS<3";

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


修复拼写错误

修复拼写错误

--- as3/com/netease/protobuf/Extension.as
+++ as3/com/netease/protobuf/Extension.as
@@ -10,7 +10,7 @@
 package com.netease.protobuf {
 	import flash.utils.*
 	public final class Extension {
-		public static function repeaedReadFunction(f:Function):Function {
+		public static function repeatedReadFunction(f:Function):Function {
 			return function (input:IDataInput,
 					object:Array, fieldNumber:uint):void {
 				var a:Array = object[fieldNumber]
@@ -27,7 +27,7 @@
 				object[fieldNumber] = f(input)
 			}
 		}
-		public static function repeatedMessageReadFuction(c:Class):Function {
+		public static function repeatedMessageReadFunction(c:Class):Function {
 			return function (input:IDataInput,
 					object:Array, fieldNumber:uint):void {
 				var a:Array = object[fieldNumber]