Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/charts/src/mx/charts/effects/effectClasses/SeriesEffectInstance.as
+++ frameworks/projects/charts/src/mx/charts/effects/effectClasses/SeriesEffectInstance.as
@@ -0,0 +1,427 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.effects.effectClasses
+{
+
+import mx.charts.chartClasses.Series;
+import mx.effects.Tween;
+import mx.effects.effectClasses.TweenEffectInstance;
+import mx.events.TweenEvent;
+
+/**
+ *  The SeriesEffectInstance class implements the base instance class
+ *  for the chart series effects.
+ *
+ *  @see mx.charts.effects.SeriesEffect
+ *
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class SeriesEffectInstance extends TweenEffectInstance
+{
+    include "../../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static function LinearEase(t:Number, b:Number,
+									   c:Number, d:Number):Number
+	{
+		return b + c * t / d;
+	}
+
+	/**
+	 *  @private
+	 */
+	private static function sinEase(t:Number, b:Number,
+								    c:Number, d:Number):Number
+	{
+		return b + c * (1 - Math.cos(Math.PI * t / d)) / 2;
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param target The target of the effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function SeriesEffectInstance(target:Object = null)
+	{
+		targetSeries = Series(target);
+
+		super(target);
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var easingFunctionHolder:Function;
+
+	/**
+	 *  @private
+	 */
+	private var _elementDuration:Number;
+
+	/**
+	 *  @private
+	 */
+	private var _elementCount:Number;
+
+	/**
+	 *  @private
+	 */
+	private var _playHeads:Array /* of Number */;
+
+	/**
+	 *  @private
+	 */
+	private var _forward:Boolean = true;
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  The series targeted by this instance.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	protected var targetSeries:Series;
+
+	/**
+	 *  The current position of each chart item being managed by this effect. This is an array of values between 0 and 1 indicating how far the effect should render each item in the series between its
+	 *	starting and ending values. These values are calculated based on the duration, number of elements, element offset, minimum element duration, and easing function.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	protected var interpolationValues:Array /* of Number */;
+
+ 	//----------------------------------
+	//  elementOffset
+	//----------------------------------
+
+	[Inspectable]
+
+	/**
+	 *  Specifies the amount of time, in milliseconds, that Flex delays
+	 *  the start of the effect on each element in the series.
+	 *
+	 *
Set elementOffset to 0
+	 *  to affect all elements of the series at the same time.
+	 *  They start the effect at the same time and end it at the same time.

+	 *
+	 *
Set elementOffset to a positive integer
+	 *  (such as 30) to stagger the effect on each element
+	 *  by that amount of time.
+	 *  For example, with a slide effect, the first element slides in
+	 *  immediately, then the next element begins 30 milliseconds later,
+	 *  and so on.
+	 *  The amount of time for the effect to execute is the same
+	 *  for each element, but the overall duration of the effect is longer.

+	 *
+	 *
Set elementOffset to a negative value
+	 *  to have the effect begin from the last element
+	 *  and move backwards through the list.

+	 *
+	 *
The default is 20.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public var elementOffset:Number = 20;
+
+ 	//----------------------------------
+	//  minimumElementDuration
+	//----------------------------------
+
+	[Inspectable]
+
+	/**
+	 *  Specifies the amount of time, in milliseconds,
+	 *  that an individual element should take to complete the effect.
+	 *
+	 *
Charts with a variable number of data points in the series
+	 *  cannot reliably create smooth effects
+	 *  with only the duration property.
+	 *  For example, an effect with a duration
+	 *  of 1000 and an elementOffset
+	 *  of 100 takes 900 milliseconds per element
+	 *  to complete an effect if you have two elements in the series.
+	 *  This is because the start of each effect is offset by 100
+	 *  and each effect finishes in 1000 milliseconds.

+	 *
+	 *
If there are four elements in the series,
+	 *  each element takes 700 milliseconds to complete
+	 *  (the last effect starts 300 milliseconds after the first
+	 *  and must be completed within 1000 milliseconds).
+	 *  With 10 elements, each element has only 100 milliseconds

+	 *  to complete the effect.
+	 *
+	 *
The minimumElementDuration value
+	 *  sets a minimal duration for each element.
+	 *  No element of the series takes less than this amount of time
+	 *  (in milliseconds) to execute the effect,
+	 *  regardless of the number of elements in the series
+	 *  and the value of the duration property.
+	 *  As a result, it is possible for an effect to take longer
+	 *  than a specified duration
+	 *  if at least two of the following three properties are specified:
+	 *  duration, offset,
+	 *  and minimumElementDuration.

+	 *
+	 *
The default is 0.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public var minimumElementDuration:Number = 0;
+
+ 	//----------------------------------
+	//  offset
+	//----------------------------------
+
+	[Inspectable]
+
+	/**
+	 *  Specifies the amount of time, in milliseconds,
+	 *  that Flex delays the effect.
+	 *
+	 *
Use this property to stagger effects on multiple series.

+	 *
+	 *
The default is 0.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public var offset:Number = 0;
+
+ 	//----------------------------------
+	//  type
+	//----------------------------------
+
+	[Inspectable(environment="none")]
+
+	/**
+	 *  The type of transition this effect is being used for. Some series effects define different behavior based on whether they are being used during the show or hide portion of
+	 *	a chart transition.  The SeriesSlide effect, for example, slides elements from their position off screen when type is set to hide, and on screen when set to show.  This property
+	 *	is set automatically by the chart, based on whether the effect is assigned to the ShowDataEffect or HideDataEffect style.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public var type:String = "show";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function onTweenUpdate(value:Object):void
+	{
+		var curVal:Number = Number(value);
+
+		var n:int = _elementCount;
+		var i:int;
+		var playHead:Number;
+
+		if (_forward)
+		{
+			for (i = 0; i < n; i++)
+			{
+				if (_playHeads[i] != 1)
+				{
+					playHead = (curVal - offset - i * elementOffset) /
+							   _elementDuration;
+
+					if (playHead > 1)
+						interpolationValues[i] = 1;
+					else if (playHead >= 0)
+						interpolationValues[i] = easingFunctionHolder(playHead, 0, 1, 1);
+					else
+						interpolationValues[i] = 0;
+
+					_playHeads[i] = playHead;
+				}
+			}
+		}
+		else
+		{
+			for (i = 0; i < n; i++)
+			{
+				if (_playHeads[i] != 1)
+				{
+					playHead =
+						(curVal - offset - (n - 1 - i) * elementOffset)  /
+						_elementDuration;
+
+					if (playHead > 1)
+						interpolationValues[i] = 1;
+					else if (playHead >= 0)
+						interpolationValues[i] = easingFunctionHolder(playHead, 0, 1, 1);
+					else
+						interpolationValues[i] = 0;
+
+					_playHeads[i] = playHead;
+				}
+			}
+		}
+
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Initializes the tweening calculations and sets up the interpolationValues Array for the number of items equal to the elementCount property. Derived classes should call this function in their play() method.
+	 *  @param elementCount The number of elements to generate interpolation values for.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	protected function beginTween(elementCount:int):void
+	{
+		easingFunctionHolder = findEasingEquation(target,easingFunction);
+
+		_elementCount = elementCount;
+
+		if (elementOffset < 0)
+		{
+			_forward = false;
+			elementOffset *= -1;
+		}
+
+		if (elementCount > 0)
+		{
+			if (!isNaN(duration))
+			{
+				_elementDuration =
+					duration - Math.abs(elementOffset) * (elementCount - 1);
+			}
+
+			if (isNaN(duration) || _elementDuration < minimumElementDuration)
+			{
+				_elementDuration = minimumElementDuration;
+				duration = Math.abs(elementOffset) * (elementCount - 1) +
+						   _elementDuration;
+			}
+
+			duration += offset;
+		}
+
+		elementOffset /= duration;
+		_elementDuration /= duration;
+		offset /= duration;
+
+		interpolationValues = [];
+		_playHeads = [];
+
+		tween = new Tween(this,0,1,duration);
+		tween.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
+		tween.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
+		tween.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
+		tween.easingFunction = LinearEase;
+	}
+
+	/**
+	 *  @private
+	 */
+	private function findEasingEquation(targetObj:Object,
+										easing:Object):Function
+	{
+		// If we're passed a function pointer, we have no work to do.
+		if (easing == null)
+			return sinEase;
+
+		if (easing is Function)
+			return (easing as Function);
+
+		// Otherwise, assume we're passed a string (the name of an
+		// easing function).  Search up the containment hierarchy for
+		// a definition of that function.
+		while (targetObj != null)
+		{
+			var easingFunc:Object = targetObj[easing];
+
+			if (easingFunc != null && easingFunc is Function)
+				return (easingFunc as Function);
+
+			targetObj = targetObj.parent;
+		}
+
+		return sinEase;
+	}
+
+
+	//--------------------------------------------------------------------
+	//
+	// Event Handlers
+	//
+	//--------------------------------------------------------------------
+	private function tweenEventHandler(event:TweenEvent):void
+	{
+		dispatchEvent(event);
+	}
+
+}
+
+}


76 MathUtil.positiveMod more concise

76 MathUtil.positiveMod more concise

--- raw/src/org/yellcorp/math/MathUtil.as
+++ raw/src/org/yellcorp/math/MathUtil.as
@@ -58,10 +58,7 @@
     public static function positiveMod(dividend:Number, divisor:Number):Number
     {
         var modResult:Number = dividend % divisor;
-
-        if (modResult < 0) modResult += divisor;
-
-        return modResult;
+        return modResult < 0 ? modResult + divisor : modResult;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/utils/Translator.as
+++ frameworks/projects/rpc/src/mx/utils/Translator.as
@@ -63,6 +63,11 @@
     /**
      *  Assumes the bundle name is the name of the second package
 	 *  (e.g foo in mx.foo).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function getDefaultInstanceFor(source:Class):Translator
     {
@@ -107,6 +112,11 @@

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


Kathy's fix + new setColorBands()

Kathy's fix + new setColorBands()

--- activities/module-2/series-measuring/ResistorBase.as
+++ activities/module-2/series-measuring/ResistorBase.as
@@ -15,7 +15,7 @@
 	import Globe;

 	//resistor 4 band
-
+
 	public class ResistorBase extends DragItShift
 	{
 		private var m_bandCount:int;
@@ -29,11 +29,6 @@
 		private var bandToleranceColor:String = "blue";

 		private var componentName:String;
-
-// 		private var redProbeArmatureNumber:Number = 8;
-//		private var redProbeikBoneName:Number = 131;
-//		private var blackProbeArmatureNumber:Number = 16;
-//		private var blackProbeikBoneName:Number = 202;

 		private var probeOnLeft:Boolean = false;
 		private var probeOnRight:Boolean = false;
@@ -47,14 +42,11 @@
 		private var transform1:SoundTransform=new SoundTransform();

 		//manually set x and y values for probe mc's
-		private var probeRedX:Number = 360.8;
-		private var probeRedY:Number = 40.4;
-		private var probeBlackX:Number = -264.4;
-		private var probeBlackY:Number = 68.8;
-
-		//resistor tip variables relative to resistor x value
-		//NEW resistor tip values
-		private var resistorTipLength:Number = 45;
+//		private var probeRedX:Number = 360.8;
+//		private var probeRedY:Number = 40.4;
+//		private var probeBlackX:Number = -264.4;
+//		private var probeBlackY:Number = 68.8;
+
 		private var resistorTipLeftX:Number;
 		private var resistorTipLeftY:Number;
 		private var resistorTipRightX:Number;
@@ -73,22 +65,30 @@

 			//resistor tip variables relative to resistor x value
 			//NEW resistor tip values
-			resistorTipLeftX = this.x + (getChildByName("resistorEndLeft").x - resistorTipLength);
-			resistorTipLeftY = this.y + getChildByName("resistorEndLeft").y;
-			resistorTipRightX = this.x + (getChildByName("resistorEndRight").x + resistorTipLength);
-			resistorTipRightY = this.y + getChildByName("resistorEndRight").y;
+//			resistorTipLeftX = this.x + (getChildByName("resistorEndLeft").x - getChildByName("resistorEndLeft").width);
+//			resistorTipLeftY = this.y + getChildByName("resistorEndLeft").y;
+//			resistorTipRightX = this.x + (getChildByName("resistorEndRight").x + getChildByName("resistorEndRight").width);
+//			resistorTipRightY = this.y + getChildByName("resistorEndRight").y;

 			this.getChildByName("resistor_rollover_left").alpha = 0;
 			this.getChildByName("probe_engaged_left").alpha = 0;
 			this.getChildByName("resistor_rollover_right").alpha = 0;
 			this.getChildByName("probe_engaged_right").alpha = 0;
+			this.getChildByName("resistorEndLeftBroken").alpha = 0;
+			this.getChildByName("resistorEndRightBroken").alpha = 0;
+			this.getChildByName("leftRestore").alpha = 0;
+			this.getChildByName("rightRestore").alpha = 0;

 			randomizeResistance();
-			resistorLocationInitialValues();
 			//testResistorTips();
-
 			this.addEventListener(Event.ADDED_TO_STAGE, added_to_stage_handler);
 			this.addEventListener(Event.REMOVED_FROM_STAGE, removed_from_stage_handler);
+			this.getChildByName("leftBreak").addEventListener(MouseEvent.MOUSE_UP, breakLeftResistor);
+			this.getChildByName("rightBreak").addEventListener(MouseEvent.MOUSE_UP, breakRightResistor);
+			this.getChildByName("leftRestore").addEventListener(MouseEvent.MOUSE_UP, restoreLeftResistor);
+			this.getChildByName("rightRestore").addEventListener(MouseEvent.MOUSE_UP, restoreRightResistor);
+			this.addEventListener(Event.ENTER_FRAME, resistorLocationInitialValues)
+

 			if (stage != null)
 			{
@@ -99,14 +99,60 @@
 				stage.addEventListener(Event.ENTER_FRAME, resistor_rollovers_right_handler);
 				stage.addEventListener(Event.ENTER_FRAME, resistor_rollovers_left_handler);
 			}
-		}
-
-		private function resistorLocationInitialValues():void
-		{
-			resistorOnBoard();
-			//  replace 'color string' with the actual values of the resistors in ohms.
-			//componentName = ExternalInterface.call('breadModel', 'insert', 'resistor', resistorLeftLocation + ',' + resistorRightLocation, bandOneColor + ',' + bandTwoColor + ',' + bandThreeColor + ',' + bandFourColor);
-		}
+
+		}
+		private function breakLeftResistor(event:MouseEvent):void
+		{
+			this.getChildByName("leftBreak").alpha=0;
+			this.getChildByName("leftRestore").alpha=1;
+			this.getChildByName("leftRestore").addEventListener(MouseEvent.MOUSE_UP, restoreLeftResistor);
+			this.getChildByName("resistorEndLeft").alpha=0;
+			this.getChildByName("resistorEndLeft").x += 1000;
+			this.getChildByName("resistorEndLeftBroken").alpha=1;
+			this.resistorTipLeftX -= 45  ;
+			//this.resistorOnBoard();  This line of code is duplicated in the move resistor function
+	  	 }
+
+		private function breakRightResistor(event:MouseEvent):void
+		{
+			this.getChildByName("rightBreak").alpha=0;
+			this.getChildByName("rightRestore").alpha=1;
+			this.getChildByName("rightRestore").addEventListener(MouseEvent.MOUSE_UP, restoreRightResistor);
+			this.getChildByName("resistorEndRight").alpha=0;
+			this.getChildByName("resistorEndRight").x += 1000;
+			this.getChildByName("resistorEndRightBroken").alpha=1;
+			this.resistorTipRightX += 45  ;
+			//this.resistorOnBoard();  This line of code is exectued on resistor_move function
+	  	 }
+
+		private function restoreLeftResistor(event:MouseEvent):void
+		{
+
+			this.getChildByName("leftBreak").alpha=1;
+			this.getChildByName("leftRestore").alpha=0;
+			this.getChildByName("leftRestore").removeEventListener(MouseEvent.MOUSE_UP, restoreLeftResistor);
+			this.getChildByName("resistorEndLeft").alpha=1;
+			this.getChildByName("resistorEndLeft").x -= 1000;
+			this.getChildByName("resistorEndLeftBroken").alpha=0;
+			this.resistorTipLeftX += 45  ;
+			//this.resistorOnBoard();  This line of code is exectued on resistor_move function
+	  	 }
+
+		private function restoreRightResistor(event:MouseEvent):void
+		{
+
+			this.getChildByName("rightBreak").alpha=1;
+			this.getChildByName("rightRestore").alpha=0;
+			this.getChildByName("rightRestore").removeEventListener(MouseEvent.MOUSE_UP, restoreRightResistor);
+			this.getChildByName("resistorEndRight").alpha=1;
+			this.getChildByName("resistorEndRight").x -= 1000;
+			this.getChildByName("resistorEndRightBroken").alpha=0;
+			this.resistorTipRightX -= 45  ;
+			//this.resistorOnBoard();  This line of code is exectued on resistor_move function
+	  	 }
+
+
+

 		private function added_to_stage_handler(evt:Event):void
 		{
@@ -116,8 +162,6 @@
 			stage.addEventListener(MouseEvent.MOUSE_UP, probeQuery_handler);
 			stage.addEventListener(Event.ENTER_FRAME, resistor_rollovers_right_handler);
 			stage.addEventListener(Event.ENTER_FRAME, resistor_rollovers_left_handler);
-
-			resistorOnBoard();
 		}

 		private function removed_from_stage_handler(evt:Event):void
@@ -128,12 +172,23 @@
 			stage.removeEventListener(MouseEvent.MOUSE_UP, probeQuery_handler);
 			stage.removeEventListener(Event.ENTER_FRAME, resistor_rollovers_right_handler);
 			stage.removeEventListener(Event.ENTER_FRAME, resistor_rollovers_left_handler);
-
+		}
+
+		private function resistorLocationInitialValues(event:Event):void
+		{
+			resistorTipLeftX = this.x + (getChildByName("resistorEndLeft").x - getChildByName("resistorEndLeft").width);
+			resistorTipLeftY = this.y + getChildByName("resistorEndLeft").y;
+			resistorTipRightX = this.x + (getChildByName("resistorEndRight").x + getChildByName("resistorEndRight").width);
+			resistorTipRightY = this.y + getChildByName("resistorEndRight").y;
 			resistorOnBoard();
-		}
+			//  replace 'color string' with the actual values of the resistors in ohms.
+			//componentName = ExternalInterface.call('breadModel', 'insert', 'resistor', resistorLeftLocation + ',' + resistorRightLocation, bandOneColor + ',' + bandTwoColor + ',' + bandThreeColor + ',' + bandFourColor);
+			removeEventListener(Event.ENTER_FRAME, resistorLocationInitialValues);
+	}

 		private function resistorOnBoard():void
 		{
+
 			if (currentHoleOne != null )
 			{
 				currentHoleOne.gotoAndStop(1);
@@ -228,11 +283,11 @@

-		private function onResistorMove_handler(event:MouseEvent):void
-		{
-			var newResistorTipLeftX:Number = this.x + (getChildByName("resistorEndLeft").x - resistorTipLength);
+private function onResistorMove_handler(event:MouseEvent):void
+		{
+			var newResistorTipLeftX:Number = this.x + (getChildByName("resistorEndLeft").x - (getChildByName("resistorEndLeft").width) );
 			var newResistorTipLeftY:Number = this.y + getChildByName("resistorEndLeft").y;
-			var newResistorTipRightX:Number = this.x + (getChildByName("resistorEndRight").x + resistorTipLength);
+			var newResistorTipRightX:Number = this.x + (getChildByName("resistorEndRight").x + (getChildByName("resistorEndRight").width) );
 			var newResistorTipRightY:Number = this.y + getChildByName("resistorEndRight").y;

 		//	trace( this.name + " x= " + this.x);
@@ -248,9 +303,21 @@
 				//ExternalInterface.call('breadModel', 'move', componentName, resistorLeftLocation + ',' + resistorRightLocation);

 				//trace( this.name + " x= " + resistorTipLeftX + " y= " + resistorTipLeftY);
-
-			}
-		}
+			}
+
+			else if ((newResistorTipRightX != resistorTipRightX) || (newResistorTipRightY != resistorTipRightY) )
+			{
+				resistorTipLeftX = newResistorTipLeftX;
+				resistorTipLeftY = newResistorTipLeftY;
+				resistorTipRightX = newResistorTipRightX;
+				resistorTipRightY = newResistorTipRightY;
+				this.resistorOnBoard();
+				//ExternalInterface.call('breadModel', 'move', componentName, resistorLeftLocation + ',' + resistorRightLocation);
+
+				//trace( this.name + " x= " + resistorTipLeftX + " y= " + resistorTipLeftY);
+			}
+		}
+

 		private const bandColorMap:Array = [
 			"black",					// 0
@@ -286,7 +353,7 @@

 			const toleranceValue:Number = tolerances[Math.floor(Math.random() * 8)];

-			setColorBands(randnumValue, toleranceValue);
+			//setColorBands(randnumValue, toleranceValue);
 		}

 		private var m_bandOneLoader:Loader = null;
@@ -294,14 +361,63 @@
 		private var m_bandThreeLoader:Loader = null;
 		private var m_bandFourLoader:Loader = null;
 		private var m_bandToleranceLoader:Loader = null;
-
-		public function setColorBands(bandValues:Vector.<int>, toleranceValue:Number)
+
+        public function setColorBands(colors:Array) {
+
+            const toleranceBandName:String = (m_bandCount > 4) ? "band5" : "band4";
+
+            if (m_bandOneLoader != null)
+                Sprite(this.getChildByName("band1")).removeChild(m_bandOneLoader);
+            if (m_bandTwoLoader != null)
+                Sprite(this.getChildByName("band2")).removeChild(m_bandOneLoader);
+            if (m_bandThreeLoader != null)
+                Sprite(this.getChildByName("band3")).removeChild(m_bandOneLoader);
+            if (m_bandFourLoader != null)
+                Sprite(this.getChildByName("band4")).removeChild(m_bandOneLoader);
+            if (m_bandToleranceLoader != null)
+                Sprite(this.getChildByName(toleranceBandName)).removeChild(m_bandToleranceLoader);
+
+            //load image into Band1
+            m_bandOneLoader = new Loader();
+            Sprite(this.getChildByName("band1")).addChild(m_bandOneLoader);
+            var bandOneBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/t_" + colors[0] + ".png");
+            m_bandOneLoader.load(bandOneBitmap);
+
+            //load image into Band2
+            m_bandTwoLoader = new Loader();
+            Sprite(this.getChildByName("band2")).addChild(m_bandTwoLoader);
+            var bandTwoBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[1] + ".png");
+            m_bandTwoLoader.load(bandTwoBitmap);
+
+            //load image into Band3
+            m_bandThreeLoader = new Loader();
+            Sprite(this.getChildByName("band3")).addChild(m_bandThreeLoader);
+            var bandThreeBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[2] + ".png");
+            m_bandThreeLoader.load(bandThreeBitmap);
+
+            //load image into Band4
+            m_bandFourLoader = new Loader();
+            Sprite(this.getChildByName("band4")).addChild(m_bandFourLoader);
+            var bandFourBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[3] + ".png");
+            m_bandFourLoader.load(bandFourBitmap);
+
+            //load image into Band5
+            if (colors.length > 4) {
+              m_bandToleranceLoader = new Loader();
+              Sprite(this.getChildByName(toleranceBandName)).addChild(m_bandToleranceLoader);
+              var bandToleranceBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[4] + ".png");
+              m_bandToleranceLoader.load(bandToleranceBitmap);
+            }
+        }
+
+		public function setColorBands_old(bandValues:Vector.<int>, toleranceValue:Number)
 		{
 			//assigns a value into bandThreeColor based on random number
 			bandOneColor = bandColorMap[bandValues[0]];
 			bandTwoColor = bandColorMap[bandValues[1]];
 			bandThreeColor = bandColorMap[bandValues[2]];
-			bandFourColor = bandColorMap[bandValues[3]];
+			if (m_bandCount > 4)
+				bandFourColor = bandColorMap[bandValues[3]];

 			switch(toleranceValue)
 			{
@@ -336,16 +452,27 @@

 			const toleranceBandName:String = (m_bandCount > 4) ? "band5" : "band4";

-			if (m_bandOneLoader != null)
-				Sprite(this.getChildByName("band1")).removeChild(m_bandOneLoader);
-			if (m_bandTwoLoader != null)
-				Sprite(this.getChildByName("band2")).removeChild(m_bandOneLoader);
-			if (m_bandThreeLoader != null)
-				Sprite(this.getChildByName("band3")).removeChild(m_bandOneLoader);
-			if (m_bandFourLoader != null)
-				Sprite(this.getChildByName("band4")).removeChild(m_bandOneLoader);
-			if (m_bandToleranceLoader != null)
-				Sprite(this.getChildByName(toleranceBandName)).removeChild(m_bandToleranceLoader);
+			var bandObject:Sprite;
+			if (m_bandOneLoader != null) {
+				bandObject = Sprite(this.getChildByName("band1"));
+				bandObject.removeChild(m_bandOneLoader);
+			}
+			if (m_bandTwoLoader != null) {
+				bandObject = Sprite(this.getChildByName("band2"));
+				bandObject.removeChild(m_bandTwoLoader);
+			}
+			if (m_bandThreeLoader != null) {
+				bandObject = Sprite(this.getChildByName("band3"));
+				bandObject.removeChild(m_bandThreeLoader);
+			}
+			if (m_bandFourLoader != null) {
+				bandObject = Sprite(this.getChildByName("band4"));
+				bandObject.removeChild(m_bandFourLoader);
+			}
+			if (m_bandToleranceLoader != null) {
+				bandObject = Sprite(this.getChildByName(toleranceBandName));
+				bandObject.removeChild(m_bandToleranceLoader);
+			}

 			//load image into Band1
 			m_bandOneLoader = new Loader();
@@ -366,12 +493,12 @@
 			m_bandThreeLoader.load(bandThreeBitmap);

 			//load image into Band4
-			if (m_bandCount > 4)
-			{
-				m_bandFourLoader = new Loader();
-				Sprite(this.getChildByName("band4")).addChild(m_bandFourLoader);
-				var bandFourBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + bandFourColor + ".png");
-				m_bandFourLoader.load(bandFourBitmap);
+			if (m_bandCount > 4 && this.getChildByName("band4") != null)
+			{
+				m_bandFourLoader = new Loader();
+				Sprite(this.getChildByName("band4")).addChild(m_bandFourLoader);
+				var bandFourBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + bandFourColor + ".png");
+				m_bandFourLoader.load(bandFourBitmap);
 			}

 			//load image into Tolerance Band
@@ -398,7 +525,7 @@
 			//trace("hotspot1Right_maxY" + hotspot1Right_maxY);
 			//trace("--------");

-			var hotspot1Right_minX:Number = (parent).x + resistorTipRightX - resistorTipLength;
+			var hotspot1Right_minX:Number = (parent).x + resistorTipRightX - getChildByName("resistorEndRight").width;
 			var hotspot1Right_maxX:Number = (parent).x + resistorTipRightX;
 			var hotspot1Right_minY:Number = (parent).y + (resistorTipRightY - 35);
 			var hotspot1Right_maxY:Number = (parent).y + (resistorTipRightY + 5);
@@ -517,10 +644,10 @@
 		{

 			var hotspot1Left_minX:Number = (parent).x + resistorTipLeftX;
-			var hotspot1Left_maxX:Number = (parent).x + resistorTipLeftX + resistorTipLength;
+			var hotspot1Left_maxX:Number = (parent).x + resistorTipLeftX + getChildByName("resistorEndLeft").width;
 			var hotspot1Left_minY:Number = (parent).y + (resistorTipLeftY - 35);
 			var hotspot1Left_maxY:Number = (parent).y + (resistorTipLeftY + 5);
-
+

 			//var hotspotWidth:Number = 14;
 			//var hotspotHeight:Number = 7;
@@ -644,11 +771,11 @@

 		private function resistor_rollovers_right_handler(event:Event):void
 		{
-			var hotspot1Right_minX:Number = (parent).x + resistorTipRightX - resistorTipLength;
+			var hotspot1Right_minX:Number = (parent).x + resistorTipRightX - getChildByName("resistorEndRight").width;
 			var hotspot1Right_maxX:Number = (parent).x + resistorTipRightX;
 			var hotspot1Right_minY:Number = (parent).y + (resistorTipRightY - 35);
 			var hotspot1Right_maxY:Number = (parent).y + (resistorTipRightY + 5);
-
+
 			var redProbe_tipX = (parent).x + MovieClip(parent).probe_red.x;
 			var redProbe_tipY = (parent).y + MovieClip(parent).probe_red.y;

@@ -677,10 +804,10 @@
 		private function resistor_rollovers_left_handler(event:Event):void{

 			var hotspot1Left_minX:Number = (parent).x + resistorTipLeftX;
-			var hotspot1Left_maxX:Number = (parent).x + resistorTipLeftX + resistorTipLength;
+			var hotspot1Left_maxX:Number = (parent).x + resistorTipLeftX + getChildByName("resistorEndLeft").width;
 			var hotspot1Left_minY:Number = (parent).y + (resistorTipLeftY - 35);
 			var hotspot1Left_maxY:Number = (parent).y + (resistorTipLeftY + 5);
-
+

 			var redProbe_tipX = (parent).x + MovieClip(parent).probe_red.x;
 			var redProbe_tipY = (parent).y + MovieClip(parent).probe_red.y;


Result doesn't extend EventDispatcher any more. It's been a long time since it needed to.

--- asunit-4.0/src/asunit/framework/Result.as
+++ asunit-4.0/src/asunit/framework/Result.as
@@ -1,8 +1,6 @@
 package asunit.framework {

 	import asunit.errors.UsageError;
-
-	import flash.events.EventDispatcher;

 	/**
      * A Result collects the results of executing
@@ -13,7 +11,7 @@
      *
      * @see Test
      */
-    public class Result extends EventDispatcher implements IResult {
+    public class Result implements IResult {

 		protected var _runCount:uint = 0;
 		protected var _runTime:Number;


import reorg

import reorg

--- runtime/src/main/as/flump/display/LibraryLoader.as
+++ runtime/src/main/as/flump/display/LibraryLoader.as
@@ -83,10 +83,10 @@
 import flash.utils.ByteArray;
 import flash.utils.Dictionary;

-import starling.core.Starling;
-import starling.display.DisplayObject;
-import starling.display.Image;
-import starling.textures.Texture;
+import deng.fzip.FZip;
+import deng.fzip.FZipErrorEvent;
+import deng.fzip.FZipEvent;
+import deng.fzip.FZipFile;

 import flump.display.Library;
 import flump.display.LibraryLoader;
@@ -102,10 +102,10 @@
 import flump.mold.MovieMold;
 import flump.mold.TextureGroupMold;

-import deng.fzip.FZip;
-import deng.fzip.FZipErrorEvent;
-import deng.fzip.FZipEvent;
-import deng.fzip.FZipFile;
+import starling.core.Starling;
+import starling.display.DisplayObject;
+import starling.display.Image;
+import starling.textures.Texture;

 interface SymbolCreator
 {


Bump our data format version

Bump our data format version

--- runtime/src/main/as/flump/display/LibraryLoader.as
+++ runtime/src/main/as/flump/display/LibraryLoader.as
@@ -71,7 +71,7 @@
      * The version produced and parsable by this version of the code. The version in a resources
      * zip must equal the version compiled into the parsing code for parsing to succeed.
      */
-    public static const VERSION :String = "0";
+    public static const VERSION :String = "1";
 }

 }


Add keep alive routine

Add keep alive routine

--- src/com/axis/rtspclient/RTSPClient.as
+++ src/com/axis/rtspclient/RTSPClient.as
@@ -40,7 +40,7 @@
     private static const STATE_PAUSE:uint    = 1 << 6;
     private static const STATE_PAUSED:uint   = 1 << 7;
     private static const STATE_TEARDOWN:uint = 1 << 8;
-
+    private static const KEEPALIVE:uint      = 30000;
     private var state:int = STATE_INITIAL;
     private var handle:IRTSPHandle;

@@ -66,6 +66,7 @@
     private var digestNC:uint = 1;

     private var bcTimer:Timer;
+    private var kaTimer:Timer = new Timer(KEEPALIVE);
     private var connectionBroken:Boolean = false;

     private var nc:NetConnection = null;
@@ -354,6 +355,11 @@
         analu.addEventListener(NALU.NEW_NALU, flvmux.onNALU);
         aaac.addEventListener(AACFrame.NEW_FRAME, flvmux.onAACFrame);
         apcma.addEventListener(PCMAFrame.NEW_FRAME, flvmux.onPCMAFrame);
+
+        /* Start Keep-alive routine */
+
+        kaTimer.addEventListener(TimerEvent.TIMER, keepAlive);
+        kaTimer.start();
         break;

       case STATE_PLAYING:
@@ -531,6 +537,20 @@
       prevMethod = sendPlayReq;
     }

+    private function sendGetParamReq():void {
+      var req:String =
+        "GET_PARAMETER " + getControlURL() + " RTSP/1.0\r\n" +
+        "CSeq: " + (++cSeq) + "\r\n" +
+        "User-Agent: " + userAgent + "\r\n" +
+        "Session: " + session + "\r\n" +
+        auth.authorizationHeader("GET_PARAMETER", authState, authOpts, urlParsed, digestNC++) +
+        "\r\n";
+      Logger.log('RTSP OUT:', req);
+      handle.writeUTFBytes(req);
+
+      prevMethod = sendGetParamReq;
+    }
+
     private function sendPauseReq():void {
       if (!this.supportCommand("PAUSE")) {
         ErrorManager.dispatchError(825, null, true);
@@ -571,6 +591,10 @@
       prevMethod = sendTeardownReq;
     }

+    private function keepAlive(event:TimerEvent):void {
+      sendGetParamReq();
+    }
+
     private function onAsyncError(event:AsyncErrorEvent):void {
       bcTimer.stop();
       ErrorManager.dispatchError(728);


remove idle timer instanciation

remove idle timer instanciation

--- src/com/google/analytics/GATracker.as
+++ src/com/google/analytics/GATracker.as
@@ -24,7 +24,6 @@
     import com.google.analytics.core.Ecommerce;
     import com.google.analytics.core.EventTracker;
     import com.google.analytics.core.GIFRequest;
-    import com.google.analytics.core.IdleTimer;
     import com.google.analytics.core.ServerOperationMode;
     import com.google.analytics.core.TrackerCache;
     import com.google.analytics.core.TrackerMode;
@@ -76,7 +75,6 @@
         private var _jsproxy:JavascriptProxy;
         private var _dom:HTMLDOM;
         private var _adSense:AdSenseGlobals;
-        private var _idleTimer:IdleTimer;
         private var _ecom:Ecommerce;

         //object properties
@@ -203,7 +201,6 @@

             _buffer     = new Buffer( config, debug, false );
             _gifRequest = new GIFRequest( config, debug, _buffer, _env );
-            _idleTimer  = new IdleTimer( config, debug, _display, _buffer );
             _ecom       = new Ecommerce ( _debug );

             /* note:


TSDemuxer: avoid "SEI NAL unit unescaping" shifting start offset of consecutive NAL units

this could introduce framing issues, especially if IDR is following SEI.
IDR NALu start offset extracted from NAL unit parsing won't be relevant anymore

fix playback freeze of http://cp107857-f.akamaihd.net/i/mtvnorigin/gsp.asmstor/vmn_4-0/agility_3-0_rewrap/coldplayV2_,384x216_150_b30,384x216_400_m30,448x252_450_b30,512x288_750_m30,640x360_1200_m30,768x432_1700_m30,960x540_2200_m31,1280x720_3500_h32,.mp4.csmil/master.m3u8?__a__=off&__viacc__=NONE
level 1

--- src/org/mangui/hls/demux/TSDemuxer.as
+++ src/org/mangui/hls/demux/TSDemuxer.as
@@ -218,27 +218,27 @@
         }

 		//Read CC track
-		private function readCC(pes : PES):void
+		private function readCC(seiData : ByteArray, pts : Number):void
 		{
-			var country_code : uint = pes.data.readUnsignedByte();
+			var country_code : uint = seiData.readUnsignedByte();

 			if (country_code == 181)
 			{
-				var provider_code : uint = pes.data.readUnsignedShort();
+				var provider_code : uint = seiData.readUnsignedShort();

 				if (provider_code == 49)
 				{
-					var user_structure : uint = pes.data.readUnsignedInt();
+					var user_structure : uint = seiData.readUnsignedInt();

 					if (user_structure == 0x47413934) // GA94
 					{
-						var user_data_type : uint = pes.data.readUnsignedByte();
+						var user_data_type : uint = seiData.readUnsignedByte();

 						// CEA-608 wrapped in 708 ( user_data_type == 4 is raw 608, not handled yet )
 						if (user_data_type == 3)
 						{
 							// cc -- the first 8 bits are 1-Boolean-0 and the 5 bits for the number of CCs
-							var byte:uint = pes.data.readUnsignedByte();
+							var byte:uint = seiData.readUnsignedByte();

 							// get the total number of cc_datas
 							var total:uint = 31 & byte;
@@ -251,9 +251,9 @@
 							var size:uint = total * 3;

 							// em_data, do we need? It's not used for anything, but it's there, so i need to pull it out
-							var otherByte:uint = pes.data.readUnsignedByte();
-
-							if (pes.data.bytesAvailable >= size)
+							var otherByte:uint = seiData.readUnsignedByte();
+
+							if (seiData.bytesAvailable >= size)
 							{
 								// ByteArray for onCaptionInfo event
 								var sei : ByteArray = new ByteArray();
@@ -267,9 +267,9 @@
 								sei.writeByte(otherByte);

 								// write the cc_datas
-								pes.data.readBytes(sei, 6, 3*total);
-
-								pes.data.position -= total * 3;
+								seiData.readBytes(sei, 6, 3*total);
+
+								seiData.position -= total * 3;

 								// onCaptionInfo expects Base64 data...
 								var sei_data:String = Base64.encode(sei);
@@ -280,7 +280,7 @@
 								};

 								// add a new FLVTag with the onCaptionInfo call
-								var tag:FLVTag = new FLVTag(FLVTag.METADATA, pes.pts, pes.pts, false);
+								var tag:FLVTag = new FLVTag(FLVTag.METADATA, pts, pts, false);

 								var data : ByteArray = new ByteArray();
 								data.objectEncoding = ObjectEncoding.AMF0;
@@ -613,37 +613,46 @@
                     ppsvect.push(pps);
                 } else if (frame.type == 6) {

-					//unescape Emulation Prevention bytes
-					Nalu.unescapeStream(pes.data,frame.start,frame.start + frame.length);
-
-					// We already know it's 6, so skip first byte
-					pes.data.position = frame.start + 1;
-
-					// we need at least 12 bytes to retrieve Caption length
-					if(pes.data.bytesAvailable > 12) {
-
-						// get the SEI payload type
-						var payload_type : uint = 0;
-						var payload_size : uint = 0;
-						while (pes.data.position < frame.start + frame.length) {
-							// Parse payload type.
-							payload_type= 0;
-							do {
-								payload_type += pes.data.readUnsignedByte();
-							} while (payload_type == 0xFF);
-							// Parse payload size.
-							payload_size = 0;
-							do {
-								payload_size += pes.data.readUnsignedByte();
-							} while (pes.data.bytesAvailable!=0 && payload_size == 0xFF);
-							// Process the payload. We only support EIA-608 payloads currently.
-							if (payload_type == 4) {
-								readCC(pes);
-							} else {
-								pes.data.position+=payload_size;
-							}
-						}
-					}
+                    var sei : ByteArray = new ByteArray();
+                    pes.data.position = frame.start;
+                    pes.data.readBytes(sei, 0, frame.length);
+                    //unescape Emulation Prevention bytes
+                    sei.length = Nalu.unescapeStream(sei,0,sei.length);
+
+
+                    // We already know it's 6, so skip first byte
+                    sei.position = 1;
+                    try {
+                        // we need at least 12 bytes to retrieve Caption length
+                        if(sei.bytesAvailable > 12) {
+
+                            // get the SEI payload type
+                            var payload_type : uint = 0;
+                            var payload_size : uint = 0;
+                            while (sei.position < sei.length) {
+                                // Parse payload type.
+                                payload_type= 0;
+                                do {
+                                    payload_type += sei.readUnsignedByte();
+                                } while (payload_type == 0xFF);
+                                // Parse payload size.
+                                payload_size = 0;
+                                do {
+                                    payload_size += sei.readUnsignedByte();
+                                } while (sei.bytesAvailable!=0 && payload_size == 0xFF);
+                                // Process the payload. We only support EIA-608 payloads currently.
+                                if (payload_type == 4) {
+                                    readCC(sei,pes.pts);
+                                } else {
+                                    sei.position+=payload_size;
+                                }
+                            }
+                        }
+                    } catch(error : Error) {
+                        CONFIG::LOGGING {
+                            Log.debug("TS: SEI parsing error : " + error.message);
+                        }
+                    }
                 } else if (frame.type == 0) {
                     // report parsing error
                     if(_callback_error != null) {
@@ -653,7 +662,7 @@
                 }
             }
             // if both SPS and PPS have been found, build AVCC and push tag if needed
-            if (sps_found && pps_found && sps.length >= 4) {
+            if (sps_found && pps_found) {
                 var avcc : ByteArray = AVCC.getAVCC(sps, ppsvect);
                 // only push AVCC tag if never pushed or avcc different from previous one
                 if (_avcc == null || !compareByteArray(_avcc, avcc)) {


fix attack animation for non-moving units

--- src/battlecode/client/viewer/render/DrawRobot.as
+++ src/battlecode/client/viewer/render/DrawRobot.as
@@ -54,7 +54,7 @@
             this.type = type;
             this.team = team;
             this.maxEnergon = RobotType.maxEnergon(type);
-            this.movementDelay = 0;
+            this.movementDelay = 1;
             this.hats = new Array();
             this.hatImages = new Array();


Player: Replaced reference to global Locomote w LocomoteMap

--- src/com/axis/ErrorManager.as
+++ src/com/axis/ErrorManager.as
@@ -113,7 +113,7 @@
     };

     public static function dispatchError(errorCode:Number, errorData:Array = null, throwError:Boolean = false):void {
-      var functionName:String = "Locomote('" + Player.locomoteID + "').__playerEvent";
+      var functionName:String = "LocomoteMap['" + Player.locomoteID + "'].__playerEvent";
       var errorMessage:String = (errorData) ? ErrorManager.resolveErrorString(STREAM_ERRORS[errorCode], errorData) : STREAM_ERRORS[errorCode];
       if (null === errorMessage) {
         errorMessage = "An unknown error has occurred.";


Added more hints to eff levels

Added more hints to eff levels

--- src/Levels/Level.as
+++ src/Levels/Level.as
@@ -294,12 +294,27 @@
 			L_PCPU_Basic = new ShardLevel("Efficiency!", pipeShard);
 			L_PCPU_Basic.predecessors.push(L_PTutorial4);
 			L_PCPU_Basic.displayName = "Efficiency"
+			L_PCPU_Basic.info = "This level's a lot like the last tutorial, just with the usual basic instructions (SET/ADD/SAVE) you know so well."
+			L_PCPU_Basic.info += " One thing to keep in mind, though: what happens if you have an instruction which depends directly on a previous instruction?"
+			L_PCPU_Basic.info += "\n\nLet's say you decide to have 'read from registers' in a separate stage from 'write to registers'. (This is reasonable.)"
+			L_PCPU_Basic.info += " In this case, if you have something that writes to a register (e.g. SET R1), followed by an instruction that reads from that register (e.g. ADD R1 R1 -> R2),"
+			L_PCPU_Basic.info += " you'll end up reading the *old* value of the register with the second instruction *before* you write the *new* value in with the first instruction! This problem is called a 'read-before-write' error."
+			L_PCPU_Basic.info += "\n\nThis is a solvable problem - you can use a multiplexer to choose (in the 'read-from-registers' stage) between the values coming out of the registers, and values from later stages (previous instructions)."
+			L_PCPU_Basic.info += " You want to use the newest values possible - so for both registers you're reading, if previous instructions are going to write to that register, select their values instead!"
+
+			L_PCPU_Load = new ShardLevel("Efficient Load", pipeShard.compositWith(LevelShard.LOAD));
+			L_PCPU_Load.predecessors.push(L_PCPU_Basic, L_CPU_Load);
+			L_PCPU_Load.info = "Load means reading from memory, which is slow enough that it might justify adding a new stage to your pipeline."
+			L_PCPU_Load.info += " Whether or not you add a new stage, you'll probably have to tweak your setup for avoiding read-before-write errors. (This gets trickier with more pipeline stages.)"
+			L_PCPU_Load.info += " Go to!"
+
+
 			L_PCPU_Jump = new ShardLevel("Efficient Jump", pipeShard.compositWith( LevelShard.JUMP));
 			L_PCPU_Jump.predecessors.push(L_PCPU_Basic, L_CPU_Branch);
 			L_PCPU_Branch = new ShardLevel("Efficient Branch", pipeShard.compositWith( LevelShard.JUMP, LevelShard.BRANCH));
 			L_PCPU_Branch.predecessors.push(L_PCPU_Jump);
-			L_PCPU_Load = new ShardLevel("Efficient Load", pipeShard.compositWith(LevelShard.LOAD));
-			L_PCPU_Load.predecessors.push(L_PCPU_Basic, L_CPU_Load);
+
+
 			var fullEfficientShard:LevelShard = pipeShard.compositWith(LevelShard.ADV, LevelShard.LOAD, LevelShard.JUMP, LevelShard.BRANCH);
 			L_PCPU_Full = new ShardLevel("Full Efficient", fullEfficientShard);
 			L_PCPU_Full.predecessors.push(L_CPU_Full, L_PCPU_Branch, L_PCPU_Load);


GoogleMaps, AS3/AIR version, writes its page template to a location in the app storage area and then loads it.

--- frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/GoogleMapView.as
+++ frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/GoogleMapView.as
@@ -21,6 +21,9 @@
 	COMPILE::AS3 {
 		import flash.events.Event;
 		import flash.net.URLRequest;
+		import flash.filesystem.File;
+		import flash.filesystem.FileMode;
+		import flash.filesystem.FileStream;

 		import org.apache.flex.utils.HTMLLoader;
 	}
@@ -457,21 +460,26 @@
 				page = pageTemplateStart + "&key=" + token + pageTemplateEnd;
 			else
 				page = pageTemplateStart + pageTemplateEnd;
-
+
+			var pathToFile:String;
+
 			if (page) {
-				_loader.loadString(page);
-				//trace(page);
-				//_loader.load(new URLRequest("https://google-developers.appspot.com/maps/documentation/javascript/examples/full/map-simple"));
-				_loader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
-			}
+				pathToFile = File.applicationDirectory.resolvePath('flexjs_mapapi.html').nativePath;
+				var someFile:File = new File(pathToFile);
+				var writeStream:FileStream = new FileStream();
+				writeStream.open(someFile, FileMode.WRITE);
+				writeStream.writeUTFBytes(page);
+				writeStream.close();
+			}
+
+			_loader.load(new URLRequest("file://"+pathToFile));
+			_loader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
 		}

 		private function completeHandler(event:flash.events.Event):void
 		{
-			trace("htmlLoader complete");
-
-			if (_loader && page) {
-/*				_loader.window.map.center_changed = onMapCentered;
+			if (_loader && page) {
+				_loader.window.map.center_changed = onMapCentered;
 				_loader.window.map.bounds_changed = onMapBoundsChanged;
 				_loader.window.map.zoom_changed   = onMapZoomChanged;
 				_loader.window.map.dragend        = onMapDragEnd;
@@ -479,7 +487,7 @@

 				// custom event handlers
 				_loader.window.addEventListener("searchResults",onSearchResults);
-				_loader.window.addEventListener("markerClicked",onMarkerClicked);*/
+				_loader.window.addEventListener("markerClicked",onMarkerClicked);
 			}

 			IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("ready"));
@@ -516,7 +524,6 @@
 		private function onMapCentered():void
 		{
 			IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("centered") );
-			//_loader.window.recenter();
 		}

 		/**
@@ -525,7 +532,6 @@
 		private function onMapBoundsChanged():void
 		{
 			IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("boundsChanged") );
-			//_loader.window.recenter();
 		}

 		/**
@@ -541,7 +547,6 @@
 		 */
 		private function onMapDragEnd():void
 		{
-			trace("GMV: drag-end");
 			IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("dragEnd") );
 		}

@@ -552,15 +557,6 @@
 		{
 			var results:Array = [];
 			for(var i:int=0; i < event.results.length; i++) {
-				/*var result:Place = new Place();
-				result.geometry.location.lat = event.results[i].geometry.location.lat();
-				result.geometry.location.lng = event.results[i].geometry.location.lng();
-				result.icon = event.results[i].icon;
-				result.id = event.results[i].id;
-				result.name = event.results[i].name;
-				result.reference = event.results[i].reference;
-				result.vicinity = event.results[i].vicinity;
-				results.push(result);*/
 				var place:Object = event.results[i];
 				results.push(place);
 			}
@@ -574,7 +570,6 @@
 		 */
 		private function onMarkerClicked(event:*):void
 		{
-			trace("GMV: onMarkerClicked");
 			var marker:Marker = new Marker({
 				position: event.marker.getPosition(),
 				title: event.marker.getTitle(),
@@ -584,7 +579,6 @@
 			var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
 			model.selectedMarker = marker;

-			trace("GMV: dispatching event");
 			IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("markerClicked"));
 		}

@@ -751,31 +745,8 @@
 			'    </style>\n'+
 			'    \n'+
-			'    \n'+
-			'  \n'+
-			'  \n'+
-			'

\n'+
-			'  \n'+
-			'\n';
-
-		private static var pageTemplateEndOLD:String = '&libraries=places">'+
+
+		private static var pageTemplateEnd:String = '&libraries=places">'+
 			'    </script>\n'+
 			'


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

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

 package spark.skins.mobile
 {


making sure isLinkable() always returns a boolean

--- WeaveJS/src/Weave.as
+++ WeaveJS/src/Weave.as
@@ -397,7 +397,7 @@
 			if (objectOrClass is ILinkableObject || objectOrClass === ILinkableObject)
 				return true;
 			// test class definition
-			return objectOrClass && objectOrClass.prototype is ILinkableObject;
+			return objectOrClass ? objectOrClass.prototype is ILinkableObject : false;
 		}


feat(call): Implement call responder

feat(call): Implement call responder

Create a new Responder when call method is invoked. The responder will call external interface with either the result or an error.

NetConnection-polyfill should implement the static method "onClientCallResult" which will receive the result of a call invoke.

--- src/NetConnectionPolyfill.as
+++ src/NetConnectionPolyfill.as
@@ -2,6 +2,7 @@
     import flash.display.Sprite;
     import flash.system.Security;
     import flash.net.NetConnection;
+    import flash.net.Responder;
     import flash.external.ExternalInterface;
     import flash.events.Event;
     import flash.events.AsyncErrorEvent
@@ -21,6 +22,7 @@
         private var _jsNetStatusEventProxyName: String = "NetConnection.onNetStatusEvent";
         private var _jsSecurityErrorEventProxyName: String = "NetConnection.onSecurityErrorEvent";
         private var _jsClientCallProxyName: String = "NetConnection.onClientCall";
+        private var _jsClientCallResultProxyName: String = "NetConnection.onClientCallResult";

         public function NetConnectionPolyfill() {
@@ -86,13 +88,18 @@
             this._nc.addHeader(opeartion, mustUnderstand, param);
         }

-        private function onCallCalled(command: String, ... args):void {
+        private function onCallCalled(command: String, handlerId: String, ... args):void {
             try {
-                log('info', 'Calling '+command);
+                log('info', 'Calling command: '+command);
+                var responder: Responder = new Responder(function(result: Object) {
+                    callExternalInterface(_jsClientCallResultProxyName, handlerId, null, cleanObject(result));
+                }, function(error: Object) {
+                    callExternalInterface(_jsClientCallResultProxyName, handlerId, cleanObject(error));
+                });
+
                 var __incomingArgs:* = args as Array;
-                var __newArgs:Array = [command, null].concat(__incomingArgs);
-                var __sanitizedArgs:Array = cleanObject(__newArgs);
-                this._nc.call.apply(this._nc, __sanitizedArgs);
+                var __newArgs:Array = [command, responder].concat(cleanObject(__incomingArgs));
+                this._nc.call.apply(this._nc, __newArgs);
             } catch (e: Error) {
                 log('error', e.message);
             }
@@ -111,13 +118,20 @@
         }

         private function onSetClientCalled(methods: Array):void {
+            var self = this;
             this._nc.client = new Object();
             try {
                 for (var i = 0; i < methods.length; i++) {
                     var method = methods[i];
-                    this._nc.client[method] = function(... args) {
-                        callExternalInterface(_jsClientCallProxyName, method, args);
+                    log('info', 'Creating method '+method);
+                    var createMethod = function(method) {
+                        var m = method;
+                        return function(... args) {
+                            var _incomingArgs:* = args as Array;
+                            callExternalInterface.apply(self, [_jsClientCallProxyName, m].concat(_incomingArgs));
+                        }
                     }
+                    this._nc.client[method] = createMethod(method);
                 }
             } catch (e: Error) {
                 log('error', e.message);


reorganizing code

reorganizing code

--- WeaveCore/src/weave/core/StageUtils.as
+++ WeaveCore/src/weave/core/StageUtils.as
@@ -35,10 +35,8 @@
 	import weave.api.WeaveAPI;
 	import weave.api.core.ICallbackCollection;
 	import weave.api.core.IStageUtils;
-	import weave.api.newLinkableChild;
 	import weave.api.reportError;
 	import weave.compiler.StandardLib;
-	import weave.utils.DebugTimer;

 	use namespace mx_internal;

@@ -52,15 +50,81 @@
 	 */
 	public class StageUtils implements IStageUtils
 	{
+		public function StageUtils()
+		{
+			initialize();
+		}
+
 		[Bindable] public var enableThreadPriorities:Boolean = false;

 		private const frameTimes:Array = [];
-		private var debug_fps:Boolean = false;
-
-		public function StageUtils()
-		{
-			initialize();
-		}
+		private var debug_fps:Boolean = false; // set to true to trace the frames per second
+		public var debug_delayTasks:Boolean = false; // set this to true to delay async tasks
+		private const _stackTraceMap:Dictionary = new Dictionary(true); // used by callLater to remember stack traces
+
+		private var _event:Event = null; // returned by get event()
+		private var _shiftKey:Boolean = false; // returned by get shiftKey()
+		private var _altKey:Boolean = false; // returned by get altKey()
+		private var _ctrlKey:Boolean = false; // returned by get ctrlKey()
+		private var _mouseButtonDown:Boolean = false; // returned by get mouseButtonDown()
+		private var _currentFrameStartTime:int = getTimer(); // this is the result of getTimer() on the last ENTER_FRAME event.
+		private var _previousFrameElapsedTime:int = 0; // this is the amount of time it took to process the previous frame.
+
+		private var _callbackCollectionsInitialized:Boolean = false; // This is true after the callback collections have been created.
+		private var _listenersInitialized:Boolean = false; // This is true after the mouse listeners have been added.
+		private const _initializeTimer:Timer = new Timer(0, 1); // only used if initialize() is attempted before stage is accessible
+		private const _callbackCollections:Object = {}; // mapping from event type to the ICallbackCollection associated with it
+		private var _stage:Stage = null; // pointer to the Stage, null until initialize() succeeds
+		private const _lastMousePoint:Point = new Point(NaN, NaN); // stage coords of mouse for current frame
+		private const _lastMouseDownPoint:Point = new Point(NaN, NaN); // stage coords of last mouseDown event
+
+		/**
+		 * This Array is used to keep strong references to the generated listeners so that they can be added with weak references.
+		 * The weak references only matter when this code is loaded as a sub-application and later unloaded.
+		 */
+		private const _generatedListeners:Array = [];
+
+		/**
+		 * This is a list of supported event types.
+		 */
+		private const _eventTypes:Array = [
+			POINT_CLICK_EVENT,
+			Event.ACTIVATE, Event.DEACTIVATE,
+			MouseEvent.CLICK, MouseEvent.DOUBLE_CLICK,
+			MouseEvent.MOUSE_DOWN, MouseEvent.MOUSE_MOVE,
+			MouseEvent.MOUSE_OUT, MouseEvent.MOUSE_OVER,
+			MouseEvent.MOUSE_UP, MouseEvent.MOUSE_WHEEL,
+			MouseEvent.ROLL_OUT, MouseEvent.ROLL_OVER,
+			KeyboardEvent.KEY_DOWN, KeyboardEvent.KEY_UP,
+			Event.ENTER_FRAME, Event.FRAME_CONSTRUCTED, Event.EXIT_FRAME, Event.RENDER
+		];
+
+		/**
+		 * This is a special pseudo-event supported by StageUtils.
+		 * Callbacks added to this event will only trigger when the mouse was clicked and released at the same screen location.
+		 */
+		public static const POINT_CLICK_EVENT:String = "pointClick";
+
+		/**
+		 * This is an array of functions with parameters that will be executed the next time handleEnterFrame() is called.
+		 * This array gets populated by callLater().
+		 */
+		private var _callNextFrameArray:Array = [];
+		/**
+		 * This is an Array of "callLater queues", each being an Array of function invocations to be done later.
+		 * The Arrays get populated by callLater().
+		 * There are four nested Arrays corresponding to the four priorities (0, 1, 2, 3) defined by static constants in WeaveAPI.
+		 */
+		private const _priorityCallLaterQueues:Array = [[],[],[],[]];
+		/**
+		 * This is the task priority that is currently being processed.
+		 */
+		private var _activePriority:uint = 0; // task priority that is currently being processed
+
+		/**
+		 * When the current frame elapsed time reaches this threshold, callLater processing will be done in later frames.
+		 */
+		[Bindable] public var maxComputationTimePerFrame:uint = 100;

 		/**
 		 * This is the last keyboard event that occurred on the stage.
@@ -86,7 +150,6 @@
 		{
 			return _event as Event;
 		}
-		private var _event:Event = null; // returned by get event()

 		/**
 		 * @return The current pressed state of the ctrl key.
@@ -95,7 +158,6 @@
 		{
 			return _shiftKey;
 		}
-		private var _shiftKey:Boolean = false; // returned by get shiftKey()
 		/**
 		 * @return The current pressed state of the ctrl key.
 		 */
@@ -103,7 +165,6 @@
 		{
 			return _altKey;
 		}
-		private var _altKey:Boolean = false; // returned by get altKey()
 		/**
 		 * @return The current pressed state of the ctrl key.
 		 */
@@ -111,7 +172,6 @@
 		{
 			return _ctrlKey;
 		}
-		private var _ctrlKey:Boolean = false; // returned by get ctrlKey()

 		/**
 		 * @return The current pressed state of the mouse button.
@@ -120,7 +180,6 @@
 		{
 			return _mouseButtonDown;
 		}
-		private var _mouseButtonDown:Boolean = false; // returned by get mouseButtonDown()

 		/**
 		 * @return true if the mouse moved since the last frame.
@@ -148,11 +207,6 @@
 			return getTimer() - _currentFrameStartTime;
 		}

-		/**
-		 * When the current frame elapsed time reaches this threshold, callLater processing will be done in later frames.
-		 */
-		[Bindable] public var maxComputationTimePerFrame:uint = 100;
-
 		/**
 		 * This function gets called on ENTER_FRAME events.
 		 */
@@ -247,8 +301,6 @@
 				_activePriority++;
 			}
 		}
-		private var _currentFrameStartTime:int = getTimer(); // this is the result of getTimer() on the last ENTER_FRAME event.
-		private var _previousFrameElapsedTime:int = 0; // this is the amount of time it took to process the previous frame.

 		/**
 		 * This calls a function in a future ENTER_FRAME event.  The function call will be delayed
@@ -275,22 +327,6 @@
 				_stackTraceMap[arguments] = new Error("This is the stack trace from when callLater() was called.").getStackTrace();
 		}

-		private const _stackTraceMap:Dictionary = new Dictionary(true);
-
-		/**
-		 * This is an array of functions with parameters that will be executed the next time handleEnterFrame() is called.
-		 * This array gets populated by callLater().
-		 */
-		private var _callNextFrameArray:Array = [];
-
-		/**
-		 * This is an Array of "callLater queues", each being an Array of function invocations to be done later.
-		 * The Arrays get populated by callLater().
-		 * There are four nested Arrays corresponding to the four priorities (0, 1, 2, 3) defined by static constants in WeaveAPI.
-		 */
-		private const _priorityCallLaterQueues:Array = [[],[],[],[]];
-		private var _activePriority:uint = 0; // the task priority that is currently being processed.
-
 		/**
 		 * This will start an asynchronous task, calling iterativeTask() across multiple frames until it returns a value of 1 or the relevantContext object is disposed of.
 		 * @param relevantContext This parameter may be null.  If the relevantContext object gets disposed of, the task will no longer be iterated.
@@ -337,8 +373,6 @@
 			_iterateTask(relevantContext, iterativeTask, priority);
 		}

-		public var debug_delayTasks:Boolean = false;
-
 		/**
 		 * @private
 		 */
@@ -418,33 +452,6 @@
 		{
 			return _eventTypes.concat();
 		}
-
-		/**
-		 * This is a list of supported event types.
-		 */
-		private const _eventTypes:Array = [
-				POINT_CLICK_EVENT,
-				Event.ACTIVATE, Event.DEACTIVATE,
-				MouseEvent.CLICK, MouseEvent.DOUBLE_CLICK,
-				MouseEvent.MOUSE_DOWN, MouseEvent.MOUSE_MOVE,
-				MouseEvent.MOUSE_OUT, MouseEvent.MOUSE_OVER,
-				MouseEvent.MOUSE_UP, MouseEvent.MOUSE_WHEEL,
-				MouseEvent.ROLL_OUT, MouseEvent.ROLL_OVER,
-				KeyboardEvent.KEY_DOWN, KeyboardEvent.KEY_UP,
-				Event.ENTER_FRAME, Event.FRAME_CONSTRUCTED, Event.EXIT_FRAME, Event.RENDER
-			];
-		private var _callbackCollectionsInitialized:Boolean = false; // This is true after the callback collections have been created.
-		private var _listenersInitialized:Boolean = false; // This is true after the mouse listeners have been added.
-
-		/**
-		 * This timer is only used if initialize() is attempted before the stage is accessible.
-		 */
-		private const _initializeTimer:Timer = new Timer(0, 1);
-
-		/**
-		 * This is a mapping from an event type to a callback collection associated with it.
-		 */
-		private const _callbackCollections:Object = {};

 		/**
 		 * initialize callback collections.
@@ -555,12 +562,6 @@
 		}

 		/**
-		 * This Array is used to keep strong references to the generated listeners so that they can be added with weak references.
-		 * The weak references only matter when this code is loaded as a sub-application and later unloaded.
-		 */
-		private const _generatedListeners:Array = [];
-
-		/**
 		 * WARNING: These callbacks will trigger on every mouse event that occurs on the stage.
 		 *          Developers should not add any callbacks that run computationally expensive code.
 		 *
@@ -592,26 +593,5 @@
 			if (cc != null)
 				cc.removeCallback(callback);
 		}
-
-		/**
-		 * This is a pointer to the stage.  This is null until initialize() is successfully called.
-		 */
-		private var _stage:Stage = null;
-
-		/**
-		 * This object contains the stage coordinates of the mouse for the current frame.
-		 */
-		private const _lastMousePoint:Point = new Point(NaN, NaN);
-
-		/**
-		 * This is the stage location of the last mouse-down event.
-		 */
-		private const _lastMouseDownPoint:Point = new Point(NaN, NaN);
-
-		/**
-		 * This is a special pseudo-event supported by StageUtils.
-		 * Callbacks added to this event will only trigger when the mouse was clicked and released at the same screen location.
-		 */
-		public static const POINT_CLICK_EVENT:String = "pointClick";
 	}
 }


removed unnecessary code

removed unnecessary code

--- WeaveData/src/weave/utils/ZoomUtils.as
+++ WeaveData/src/weave/utils/ZoomUtils.as
@@ -90,23 +90,6 @@
 			return Math.log(Math.abs(screenSize / minScreenSize)) / Math.LN2;
 		}

-		/**
-		 * This function generates a matrix for transforming points from one bounds to another.
-		 */
-		public static function generateTransformMatrix(outputMatrix:Matrix, fromBounds:IBounds2D, toBounds:IBounds2D):void
-		{
-			outputMatrix.identity();
-			outputMatrix.translate(-fromBounds.getXMin(), -fromBounds.getYMin());
-
-			var fromWidth:Number = fromBounds.getWidth();
-			var fromHeight:Number = fromBounds.getHeight();
-			var toWidth:Number = toBounds.getWidth();
-			var toHeight:Number = toBounds.getHeight();
-
-			outputMatrix.scale(toWidth / fromWidth, toHeight / fromHeight);
-			outputMatrix.translate(toBounds.getXMin(), toBounds.getYMin());
-		}
-
 		/**
 		 * conformDataBoundsToAspectRatio
 		 * Enforce an aspect ratio on xDataUnitsPerPixel to yDataUnitsPerPixel.


Now setting focus on mouse down

Now setting focus on mouse down

Change-Id: Iad47849a7bb2502657d314e3dd4bae7c436911a2

--- WeaveUI/src/weave/ui/CustomComboBox.as
+++ WeaveUI/src/weave/ui/CustomComboBox.as
@@ -19,6 +19,8 @@

 package weave.ui
 {
+	import flash.events.MouseEvent;
+
 	import mx.collections.CursorBookmark;
 	import mx.controls.ComboBox;

@@ -28,7 +30,12 @@
 	 * @author adufilie
 	 */
 	public class CustomComboBox extends ComboBox
-	{
+	{
+		public function CustomComboBox()
+		{
+			addEventListener(MouseEvent.MOUSE_DOWN, function(..._):void { setFocus(); });
+		}
+
 		/**
 		 * This function will set the selectedItem corresponding to the given label.
 		 * @param value The label of the item to select.


[VectorCommon] translator between SequenceProvider and GenbankFileModel

git-svn-id: adbdea8fc1759bd16b0eaf24a244a7e5f870a654@257 fe3f0490-d73e-11de-a956-c71e7d3a9d2f

--- VectorCommon/src/org/jbei/lib/SequenceProvider.as
+++ VectorCommon/src/org/jbei/lib/SequenceProvider.as
@@ -5,9 +5,13 @@

     import mx.collections.ArrayCollection;

+    import org.jbei.bio.parsers.GenbankFeatureElement;
+    import org.jbei.bio.parsers.GenbankFeatureQualifier;
+    import org.jbei.bio.parsers.GenbankFileModel;
     import org.jbei.bio.sequence.DNATools;
     import org.jbei.bio.sequence.common.SymbolList;
     import org.jbei.bio.sequence.dna.Feature;
+    import org.jbei.bio.sequence.dna.FeatureNote;
     import org.jbei.lib.common.IMemento;
     import org.jbei.lib.common.IOriginator;

@@ -969,6 +973,83 @@
             manualUpdateEnd();
         }

+        /**
+        * suitable for generating genbank file
+        */
+        public function generateGenbankFileModel():GenbankFileModel{
+            var result:GenbankFileModel = new GenbankFileModel();
+            result.locus.locusName = this.name;
+            result.locus.linear = !this.circular;
+            result.locus.naType = "DNA";
+            result.locus.strandType = "ds";
+            result.locus.date = new Date();
+            result.origin.sequence = this.sequence.toString();
+
+            var seqProviderFeature:Feature;
+            var feature:GenbankFeatureElement;
+            var tempQualifier:GenbankFeatureQualifier;
+            for (var i:int = 0; i < this.features.length; i++) {
+                seqProviderFeature = this.features[i] as Feature;
+                feature = new GenbankFeatureElement();
+                feature.genbankStart = seqProviderFeature.start + 1;
+                feature.end = seqProviderFeature.end;
+                feature.key = seqProviderFeature.type;
+                tempQualifier = new GenbankFeatureQualifier();
+                tempQualifier.quoted = true;
+                tempQualifier.name = "label";
+                tempQualifier.value = seqProviderFeature.name;
+                feature.featureQualifiers.push(tempQualifier);
+                for (var j:int = 0; j < seqProviderFeature.notes.length; j++) {
+                    tempQualifier = new GenbankFeatureQualifier();
+                    tempQualifier.quoted = true;
+                    tempQualifier.name = seqProviderFeature.notes[i].name;
+                    tempQualifier.value = seqProviderFeature.notes[i].value;
+                    feature.featureQualifiers.push(tempQualifier);
+                }
+                result.features.features.push(feature);
+            }
+
+            return result;
+        }
+
+        /**
+        * Use after calling empty constructor
+        */
+
+        public function useGenbankFIleModel(genbankFileModel:GenbankFileModel):void
+        {
+            _name = genbankFileModel.locus.locusName;
+            _circular = !genbankFileModel.locus.linear;
+            _sequence = DNATools.createDNA(genbankFileModel.origin.sequence);
+
+            var genbankFeatures:Vector.<GenbankFeatureElement> = genbankFileModel.features.features;
+            var feature:Feature;
+            for (var i:int = 0; i < genbankFeatures.length; i++) {
+                feature = new Feature();
+                feature.start = genbankFeatures[i].genbankStart;
+                feature.end = genbankFeatures[i].end;
+                feature.type = genbankFeatures[i].key;
+                if (feature.start > feature.end) {
+                    feature.strand = -1;
+                } else {
+                    feature.strand = 1;
+                }
+
+                feature.notes = new Vector.<FeatureNote>();
+                for (var j:int = 0; j < genbankFeatures[i].featureQualifiers.length; j++) {
+                    if (genbankFeatures[i].featureQualifiers[j].name == "label") {
+                        feature.name = genbankFeatures[i].featureQualifiers[j].value;
+                    } else {
+                        feature.notes.push(new FeatureNote(genbankFeatures[i].featureQualifiers[j].name, genbankFeatures[i].featureQualifiers[j].value));
+                    }
+                }
+                if (feature.name == null) {
+                    feature.name = "unknown";
+                }
+            }
+
+
+        }
         // Private Methods
         private function updateComplementSequence():void
         {


collection

collection

--- src/com/kemsky/$.as
+++ src/com/kemsky/$.as
@@ -20,7 +20,7 @@
             if(Flex.available && [0] is Flex.collection)
             {
                 //$ from collection
-                return new Stream(rest[0].source);
+                return new Stream(rest[0].toArray());
             }
             else if(rest[0] is Array)
             {


Added mouseAbsX() and mouseAbsY() to Input.

--- net/flashpunk/utils/Input.as
+++ net/flashpunk/utils/Input.as
@@ -72,6 +72,22 @@
 		}

 		/**
+		 * The absolute mouse x position on the screen (unscaled).
+		 */
+		public static function get mouseAbsX():int
+		{
+			return FP.stage.mouseX;
+		}
+
+		/**
+		 * The absolute mouse y position on the screen (unscaled).
+		 */
+		public static function get mouseAbsY():int
+		{
+			return FP.stage.mouseY;
+		}
+
+		/**
 		 * Defines a new input.
 		 * @param	name		String to map the input to.
 		 * @param	...keys		The keys to use for the Input.
@@ -182,7 +198,7 @@
 		}

 		/** @private Event handler for key press. */
-		private static function onKeyDown(e:KeyboardEvent):void
+		private static function onKeyDown(e:KeyboardEvent = null):void
 		{
 			// get the keycode
 			var code:int = e.keyCode;


Rename valueof and tostring to printvalueof and printtostring in values.as

To avoid non-determinism with having multiple variables using different case

--- test/trace/values.as
+++ test/trace/values.as
@@ -16,14 +16,14 @@
   return this;
 };

-tostring = new Object ();
-tostring.toString = function () {
+printtostring = new Object ();
+printtostring.toString = function () {
   trace ("toString called with " + arguments);
   return this;
 };

-valueof = new Object ();
-valueof.valueOf = function () {
+printvalueof = new Object ();
+printvalueof.valueOf = function () {
   trace ("valueOf called with " + arguments);
   return this;
 };
@@ -36,7 +36,7 @@
   true, false,
   0, 1, 0.5, -1, -0.5, Infinity, -Infinity, NaN,
   "", "0", "-0", "0.0", "1", "Hello World!", "true", "_level0",
-  this, new Object (), Function, printall, tostring, valueof, nothing ];
+  this, new Object (), Function, printall, printtostring, printvalueof, nothing ];

 var l = values.length;
 var v = function () {


IUIBase should extend IEventDispatcher

IUIBase should extend IEventDispatcher

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IUIBase.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IUIBase.as
@@ -18,6 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
+    import org.apache.flex.events.IEventDispatcher;
+
     /**
      *  The IUIBase interface is the basic interface for user interface components.
      *
@@ -26,7 +28,7 @@
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public interface IUIBase extends IStrand
+	public interface IUIBase extends IStrand, IEventDispatcher
 	{
         /**
          *  Each IUIBase has an element that is actually added to


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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

 package mx.formatters
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/managers/BrowserManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/BrowserManagerImpl.as
@@ -0,0 +1,372 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 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.managers
+{
+
+import flash.events.EventDispatcher;
+import flash.external.ExternalInterface;
+import mx.events.BrowserChangeEvent;
+import mx.core.ApplicationGlobals;
+
+/**
+ *  Dispatched when the fragment property is changed either
+ *  by the user interacting with the browser, invoking an
+ *  application in Apollo
+ *  or by code setting the property.
+ *
+ *  @eventType mx.events.BrowserChangeEvent.URL_CHANGE
+ */
+[Event(name="urlChange", type="flash.events.Event")]
+
+/**
+ *  Dispatched when the fragment property is changed
+ *  by the browser.
+ *
+ *  @eventType mx.events.BrowserChangeEvent.BROWSER_URL_CHANGE
+ */
+[Event(name="browserURLChange", type="mx.events.BrowserChangeEvent")]
+
+/**
+ *  Dispatched when the fragment property is changed
+ *  by the application via setFragment
+ *
+ *  @eventType mx.events.BrowserChangeEvent.APPLICATION_URL_CHANGE
+ */
+[Event(name="applicationURLChange", type="mx.events.BrowserChangeEvent")]
+
+[ExcludeClass]
+
+/**
+ *  @private
+ *  The BrowserManager is a Singleton manager that acts as
+ *  a proxy between the browser and the application.
+ *  It provides access to the URL in the browser address
+ *  bar similar to accessing document.location in Javascript.
+ *  Events are dispatched as the url property is changed.
+ *  Listeners can then respond, alter the url, and/or block others
+ *  from getting the event.
+ *
+ *  For desktop applications, the BrowserManager
+ *  provides access to the command-line parameters used to
+ *  invoke the application.  The url property will be the concatenated
+ *  string representing all of the command-line parameters separated
+ *  by semi-colons.
+ *
+ */
+public class BrowserManagerImpl extends EventDispatcher implements IBrowserManager
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static var instance:IBrowserManager;
+
+    private var _defaultFragment:String = "";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public static function getInstance():IBrowserManager
+    {
+        if (!instance)
+            instance = new BrowserManagerImpl();
+
+        return instance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function BrowserManagerImpl()
+    {
+        super();
+
+        try
+        {
+            ExternalInterface.addCallback("browserURLChange", browserURLChangeBrowser);
+
+            ExternalInterface.addCallback("debugTrace", debugTrace);
+        }
+        catch(e:Error)
+        {
+            // not supported in all environments
+            browserMode = false;
+        }
+    }
+
+    private var browserMode:Boolean = true;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  base
+    //----------------------------------
+
+    private var _base:String;
+
+    [Bindable("urlChange")]
+    /**
+     *  The portion of current URL before the '#' as it appears
+     *  in the browser address bar.
+     */
+    public function get base():String
+    {
+        return _base;
+    }
+
+    //----------------------------------
+    //  fragment
+    //----------------------------------
+
+    private var _fragment:String;
+
+    [Bindable("urlChange")]
+    /**
+     *  The portion of current URL after the '#' as it appears
+     *  in the browser address bar, or the default fragment
+	 *  used in setup() if there is nothing after the '#'.
+	 *  Use setFragment to change this value.
+     */
+    public function get fragment():String
+    {
+		if (_fragment && _fragment.length)
+			return _fragment;
+
+		return _defaultFragment;
+    }
+
+    //----------------------------------
+    //  title
+    //----------------------------------
+
+    private var _title:String;
+
+    [Bindable("urlChange")]
+    /**
+     *  The title of the app as it should appear in the
+     *  browser history
+     */
+    public function get title():String
+    {
+        return _title;
+    }
+
+    //----------------------------------
+    //  url
+    //----------------------------------
+
+    private var _url:String;
+
+    [Bindable("urlChange")]
+    /**
+     *  The current URL as it appears in the browser address bar.
+     */
+    public function get url():String
+    {
+        return _url;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Initialize the BrowserManager.  The BrowserManager will get the initial URL.  If it
+     *  has a fragment, it will dispatch BROWSER_URL_CHANGE, so add your event listener
+	 *  before calling this method.
+     *
+     *  @param defaultFragment the fragment to use if no fragment in the initial URL.
+     *  @param defaultTitle the title to use if no fragment in the initial URL.
+     */
+    public function init(defaultFragment:String = "", defaultTitle:String = ""):void
+    {
+		ApplicationGlobals.application.historyManagementEnabled = false;
+
+		setup(defaultFragment, defaultTitle);
+	}
+
+    /**
+     *  Initialize the BrowserManager.  The HistoryManager calls this method to
+	 *  prepare the BrowserManager for further calls from the HistoryManager.  Use
+	 *  of HistoryManager and setFragment calls from the application is
+	 *  not supported, so the init() method sets
+	 *  Application.application.historyManagementEnabled to false to disable
+	 *  the HistoryManager
+     */
+	public function initForHistoryManager():void
+	{
+		setup("", "");
+	}
+
+	private function setup(defaultFragment:String, defaultTitle:String):void
+	{
+        if (!browserMode)
+            return;
+
+        _defaultFragment = defaultFragment;
+        _url = ExternalInterface.call("BrowserHistory.getURL");
+
+		// probably no support in html wrapper
+		if (!_url)
+		{
+			browserMode = false;
+			return;
+		}
+
+        var pos:int = _url.indexOf('#');
+        if (pos == -1 || pos == _url.length - 1)
+        {
+            _base = _url;
+            _fragment = '';
+            _title = defaultTitle;
+            ExternalInterface.call("BrowserHistory.setDefaultURL", defaultFragment);
+            setTitle(defaultTitle);
+        }
+        else
+        {
+            _base = _url.substring(0, pos);
+            _fragment = _url.substring(pos + 1);
+            _title = ExternalInterface.call("BrowserHistory.getTitle");
+            ExternalInterface.call("BrowserHistory.setDefaultURL", _fragment);
+            //have to force a refresh of the application.
+            if (_fragment != _defaultFragment)
+                browserURLChange(_fragment, true);
+        }
+    }
+
+    /**
+     *  Change the fragment of the url after the '#' in the browser.
+     *  An attempt will be made to track this URL in the browser's
+     *  history.
+     *
+     *  If the title is set, the old title in the browser is replaced
+     *  by the new title.
+     *
+     *  To actually store the URL, a JavaScript
+     *  method named setBrowserURL() will be called.
+     *  The application's HTML wrapper must have that method which
+     *  must implement a mechanism for taking this
+     *  value and registering it with the browser's history scheme
+     *  and address bar.
+     *
+     *  When set, the APPLICATION_URL_CHANGE event is sent.  If the event
+     *  is cancelled the setBrowserURL() will not be called.
+     */
+    public function setFragment(value:String):void
+    {
+        if (!browserMode)
+            return;
+
+        //value = (value == "") ? _defaultFragment : value;
+
+        var lastURL:String = _url;
+        var lastFragment:String = _fragment;
+
+        _url = base + '#' + value;
+        _fragment = value;
+
+        if (dispatchEvent(new BrowserChangeEvent(BrowserChangeEvent.APPLICATION_URL_CHANGE, false, true, _url, lastURL)))
+        {
+            ExternalInterface.call("BrowserHistory.setBrowserURL", value, ExternalInterface.objectID);
+            dispatchEvent(new BrowserChangeEvent(BrowserChangeEvent.URL_CHANGE, false, false, _url, lastURL));
+        }
+        else
+        {
+            _fragment = lastFragment;
+            _url = lastURL;
+        }
+    }
+
+    /**
+     *  Change the title in the browser.
+     *  Does not affect the browser's
+     *  history.
+     */
+    public function setTitle(value:String):void
+    {
+        if (!browserMode)
+            return;
+
+        ExternalInterface.call("BrowserHistory.setTitle", value);
+        _title = ExternalInterface.call("BrowserHistory.getTitle");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event Listeners
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Callback from browser when the URL has been changed
+     *  in the browser.
+     */
+    private function browserURLChangeBrowser(fragment:String):void
+    {
+        browserURLChange(fragment, false);
+    }
+
+    private function browserURLChange(fragment:String, force:Boolean = false):void
+    {
+        //trace("browserURLChange: |" + decodeURI(fragment) + "|, |" + decodeURI(_fragment) + "|" + ", " + force.toString());
+        if ((decodeURI(_fragment) != decodeURI(fragment)) || force)
+		{
+            _fragment = fragment;
+
+            var lastURL:String = url;
+
+            _url = _base + '#' + fragment;
+
+            dispatchEvent(new BrowserChangeEvent(BrowserChangeEvent.BROWSER_URL_CHANGE, false, false, url, lastURL));
+            dispatchEvent(new BrowserChangeEvent(BrowserChangeEvent.URL_CHANGE, false, false, url, lastURL));
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Diagnostics
+    //
+    //--------------------------------------------------------------------------
+
+    private function debugTrace(s:String):void
+    {
+        trace(s);
+    }
+}
+
+}


Fixed flash builder refactor gone wild

Fixed flash builder refactor gone wild

--- FlexUnit4Test/src/org/flexunit/runner/manipulation/cases/MetadataAlphabeticalSorterCase.as
+++ FlexUnit4Test/src/org/flexunit/runner/manipulation/cases/MetadataAlphabeticalSorterCase.as
@@ -4,12 +4,12 @@

 	import org.flexunit.Assert;
 	import org.flexunit.runner.Description;
-	import org.flexunit.runner.manipulation.OrderArgumentPlusAlphaSorter1;
+	import org.flexunit.runner.manipulation.OrderArgumentPlusAlphaSorter;

 	public class MetadataAlphabeticalSorterCase
 	{
 		//TODO: Are these test correctly testing the MetadataAlphabeticalSorterCase class
-		private var metaDataAlphaSorter : OrderArgumentPlusAlphaSorter1;
+		private var metaDataAlphaSorter : OrderArgumentPlusAlphaSorter;

 		protected var lowerXML:XML = new XML(
 			<method>
@@ -54,7 +54,7 @@

 		[Before]
 		public function setupSorter():void {
-			metaDataAlphaSorter = new OrderArgumentPlusAlphaSorter1();
+			metaDataAlphaSorter = new OrderArgumentPlusAlphaSorter();
 		}

 		protected var noOrderArray:Array = convertToMetaDataAnnotations( noOrderXML.metadata );


Transferred from the Adobe Open Source Subversion Repository

Revision: 6266
Author:   egeorgie@adobe.com
Date:     2009-04-24T23:09:01.304621Z

Log Message:
-----------
Layout PARB changes

Major (most probably will require updates):
- LayoutBase.getScrollPositionDelta() -> getScrollPositionDeltaToElement()
- HorizontalLayout, VerticalLayout method inView() -> fractionOfElementInView()
- LayoutElementFactory is deleted, interface ILayoutElement is implemented by UIComponent, GraphicElement, VisualSprite, no need for casting in those cases, cast to ILayoutElement in case of type Object.
- TileLayout.elementHorizontalAlign -> horizontalAlign
- TileLayout.elementVerticalAlign -> verticalAlign
- TileJustifyRows -> RowAlign
- TileJustifyColumsn > ColumnAlign
- TileLayout.justifyRows -> rowAlign
- TileLayout.justifyColumns -> columnAling
- TileJustifyRows.NONE, "none" -> TOP, "top"
- TileJustifyRows.GAP_SIZE, "gapSize" -> JUSTIFY_USING_GAP, "justifyUsingGap"
- TileJustifyRows.ROW_SIZE, "rowSize" -> JUSTIFY_USING_HEIGHT, "justifyUsingHeight"
- TileJustifyColumns.NONE, "none" -> LEFT, "left"
- TileJustifyColumns.GAP_SIZE, "gapSize" -> JUSTIFY_USING_GAP, "justifyUsingGap"
- TileJustifyColumns.COLUMN_SIZE, "columnSize" -> JUSTIFY_USING_WIDTH, "justifyUsingWidth"
- TileLayout.set rowCount -> set requestedRowCount
- add TileLayout.get requestedRowCount
- TileLayout.set columnCount -> set requestedColumnCount
- add TileLayout.get requestedColumnCount

Minor (may require updates, but not that probable):
- get baselinePosition() is moved from IVisualElement to ILayoutElement.
- setLayoutBoundsSize() does not have default NaN values for width & height (but still logic is the same).
- name of ILayoutInterface methods' parameter "postTransform" is renamed to "postLayoutTransform".
- name of ILayoutInterface methods' parameter "triggerLayout" is renamed to "invalidateLayout".
- LayoutBase methods invalidateTargetSizeAndDisplayList() and invalidateTargetSize() are removed.
- LayoutBase method getTargetScrollRect() is renamed to getScrollRect().

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans, Ryan
tests: checkintests, mustella (gumbo/layout, gumbo/group, gumbo/dataGroup)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.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/flex4/src/spark/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/RowAlign.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileJustifyRows.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Animate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.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/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/ColumnAlign.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutElementFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileJustifyColumns.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/TextBaseClass.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/Block.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as
@@ -103,7 +103,13 @@
             return;

         _gap = value;
-        invalidateTargetSizeAndDisplayList();
+
+        var g:GroupBase = target;
+        if (g)
+        {
+            g.invalidateSize();
+            g.invalidateDisplayList();
+        }
     }

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