Transferred from the Adobe Open Source Subversion Repository

Revision: 18567
Author:   klin@adobe.com
Date:     2010-11-13T00:28:51.781896Z

Log Message:
-----------
Fix for Bindable metadata being in the wrong place in DataGrid, Grid and GridColumn. Made GridColumn.editable Bindable. variableRowHeight and resizableColumns were also not dispatching a change event. I also took the liberty of performing some code clean up and fixing some docs.

QE notes: Check properties to make sure they're Bindable
Doc notes: No
Bugs: SDK-28464
Reviewer: Hans
Tests run: DataGrid, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridRowList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRendererOwner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridRowNode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelectionMode.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayer.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayer.as
@@ -12,9 +12,6 @@
 package spark.components.gridClasses
 {

-import mx.core.IInvalidating;
-import mx.core.IVisualElement;
-import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;

 import spark.components.Grid;
@@ -30,11 +27,26 @@
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
- *  @playerversion AIR 2.4
+ *  @playerversion AIR 2.0
  *  @productversion Flex 4.5
  */
 public class GridLayer extends Group
 {
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
     public function GridLayer()
     {
         super();
@@ -71,4 +83,4 @@
         super.invalidateSize();
     }
 }
-}
+}


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

--- frameworks/projects/automation/src/mx/automation/codec/AssetPropertyCodec.as
+++ frameworks/projects/automation/src/mx/automation/codec/AssetPropertyCodec.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.automation.codec
+{
+
+	import mx.automation.qtp.IQTPPropertyDescriptor;
+	import mx.automation.IAutomationManager;
+	import mx.automation.IAutomationObject;
+
+	[ResourceBundle("automation_agent")]
+
+	/**
+	 * translates between internal Flex asset and automation-friendly version
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class AssetPropertyCodec extends DefaultPropertyCodec
+	{
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		public function AssetPropertyCodec()
+		{
+			super();
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		override public function encode(automationManager:IAutomationManager,
+										obj:Object,
+										pd:IQTPPropertyDescriptor,
+										relativeParent:IAutomationObject):Object
+		{
+			var val:Object = getMemberFromObject(automationManager, obj, pd);
+
+			if (val != null)
+			{
+				val = val.toString();
+
+				val = stripNoiseFromString("css_", String(val));
+				val = stripNoiseFromString("embed_mxml_", String(val));
+				val = stripNoiseFromString("embed_as_", String(val));
+			}
+
+			return val;
+		}
+
+		protected function stripNoiseFromString(beginPart:String, asset:String):String
+		{
+			var pos:int = asset.indexOf(beginPart);
+
+			if (pos != -1)
+			{
+				asset = asset.substr(pos + beginPart.length);
+
+				var lastUnderscorePos:int = asset.lastIndexOf("_");
+
+				if (lastUnderscorePos != -1)
+				{
+					asset = asset.substr(0, lastUnderscorePos);
+				}
+			}
+
+			return asset;
+		}
+
+		override public function decode(automationManager:IAutomationManager,
+										obj:Object,
+										value:Object,
+										pd:IQTPPropertyDescriptor,
+										relativeParent:IAutomationObject):void
+		{
+			var message:String = resourceManager.getString(
+				"automation_agent", "notSettable");
+			throw new Error(message);
+		}
+	}
+
+}


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

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

 package mx.validators
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18188
Author:   dloverin@adobe.com
Date:     2010-10-16T03:11:51.820813Z

Log Message:
-----------
DataGrid editor PARB changes and more.

Don't open a cell editor on double click.

QE notes: Ready for testing.
Doc notes: None.
Bugs:
Reviewer: Hans
Tests run: cyclone server
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridItemEditorEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/TextGridItemEditor.mxml" copyfrom-rev="18150" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DefaultGridItemEditor.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/TextGridItemEditor.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
@@ -30,7 +30,10 @@
 import spark.components.IGridItemRenderer;

 use namespace mx_internal;
-
+
+/**
+ *  Base class for grid item editors.
+ */
 public class GridItemEditor extends Group implements IGridItemEditor
 {
     include "../../core/Version.as";
@@ -89,26 +92,13 @@
     //----------------------------------

     /**
-     *  @private
-     */
-    private var _columnIndex:int;
-
-    /**
      *  @inheritDoc
      */
     public function get columnIndex():int
     {
-        return _columnIndex;
-    }
-
-    /**
-     *  @private
-     */
-    public function set columnIndex(value:int):void
-    {
-        _columnIndex = value;
-    }
-
+        return column.columnIndex;;
+    }
+
     //----------------------------------
     //  data
     //----------------------------------
@@ -129,6 +119,11 @@
     public function set data(value:Object):void
     {
         _data = value;
+
+        if (_data && column.dataField)
+        {
+            this.value = _data[column.dataField];
+        }
     }

     //----------------------------------
@@ -288,9 +283,19 @@
     //  value
     //----------------------------------

-    /**
-     *  @inheritDoc
-     */
+    /**
+     *  Many custom GridItemEditor subclasses will only need to override the
+     *  get and set methods for this property.   Override the set method to
+     *  initialize the editor’s input  controls based on the value. The value
+     *  property is initialized by the set data method, which sets the value
+     *  to data.dataField. The get value method should be overridden to return
+     *  a new value for data.dataField based on the user’s input.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
     public function get value():Object
     {
         return null;
@@ -363,7 +368,7 @@
             }
         }

-        if (typeInfo == "")
+        if (typeInfo == "" && newData != null)
         {
             if (data[property] is String)
                 typeInfo = "String";
@@ -420,9 +425,17 @@
     }

     /**
-     *  @inheritDoc
-     */
-    public function validate():Boolean
+     *  Tests if the value in the editor is valid and may be saved.
+     *
+     *  @returns true if the value in the editor is valid. Otherwise
+     *  false is returned.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    protected function validate():Boolean
     {
         return validateContainer(this);
     }
@@ -440,7 +453,7 @@
             return false;

         // loop thru the children, looking for errors.
-        var n:int = numElements;
+        var n:int = container.numElements;
         for (var i:int = 0; i < n; i++)
         {
             var child:IVisualElement = container.getElementAt(i);
@@ -476,7 +489,7 @@
         }

         // loop thru the children, looking for errors to clear.
-        var n:int = numElements;
+        var n:int = container.numElements;
         for (var i:int = 0; i < n; i++)
         {
             var child:IVisualElement = container.getElementAt(i);
@@ -493,6 +506,11 @@

     }

+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------

     /**
      *  @private


Transferred from the Adobe Open Source Subversion Repository

Revision: 10323
Author:   jszeto@adobe.com
Date:     2009-09-16T21:21:12.805148Z

Log Message:
-----------
Add URL support to BitmapFill and Border

http://bugs.adobe.com/jira/browse/SDK-23108 - backGroundImage referenced via URL results in runtime error

Add in support for URLs into BitmapFill and BorderSkin.

QE notes: Add tests for BitmapFill source set to a URL
Doc notes: Add notes about URL support
Bugs: SDK-23108
Reviewer: Evtim
Tests run: Border
Is noteworthy for integration: Yes. Source can be URL.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/BorderSkin.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/BitmapFill.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapFill.as
@@ -16,16 +16,23 @@
 import flash.display.BitmapData;
 import flash.display.DisplayObject;
 import flash.display.Graphics;
+import flash.display.Loader;
+import flash.display.LoaderInfo;
+import flash.events.Event;
 import flash.events.EventDispatcher;
+import flash.events.IOErrorEvent;
+import flash.events.SecurityErrorEvent;
 import flash.geom.ColorTransform;
 import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;
-import flash.utils.getDefinitionByName;
+import flash.net.URLRequest;
+import flash.system.LoaderContext;

 import mx.events.PropertyChangeEvent;
 import mx.geom.CompoundTransform;
 import mx.utils.MatrixUtil;
+

 /**
@@ -74,12 +81,14 @@
 	private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
 	private static var transformMatrix:Matrix = new Matrix();
     private var nonRepeatAlphaSource:BitmapData;
+    private var _bitmapData:BitmapData;

     private var regenerateNonRepeatSource:Boolean = true;
     private var lastBoundsWidth:Number = 0;
     private var lastBoundsHeight:Number = 0;
     private var applyAlphaMultiplier:Boolean = false;
     private var nonRepeatSourceCreated:Boolean = false;
+    private var bitmapDataCreated:Boolean = false;

 	//--------------------------------------------------------------------------
 	//
@@ -557,18 +566,18 @@
 			var tmpSprite:DisplayObject;
 			var oldValue:Object = _source;

-			var bitmapData:BitmapData;
+			var bitmapData:BitmapData;
+            var bitmapCreated:Boolean = false;

 			if (value is Class)
 			{
 				var cls:Class = Class(value);
 				value = new cls();
 			}
-			else if (value is String)
-			{
-				var tmpClass:Class = Class(getDefinitionByName(String(value)));
-				value = new tmpClass();
-			}
+            else if (value is String)
+            {
+                loadExternal(value as String);
+            }

 			if (value is BitmapData)
 			{
@@ -595,24 +604,23 @@
 			{
 				bitmapData = new BitmapData(tmpSprite.width, tmpSprite.height, true, 0);
 				bitmapData.draw(tmpSprite, new Matrix());
+                bitmapCreated = true;
 			}

             // If the bitmapData isn't transparent (ex. JPEG), then copy it into a transparent bitmapData
             if (!bitmapData.transparent)
             {
-                // TODO (jszeto) : Dispose of this bitmap when we no longer need it
+                // FIXME (jszeto) : Only clone this if alpha is not 1. Dispose of this bitmap when we no longer need it
                 var transparentBitmap:BitmapData = new BitmapData(bitmapData.width, bitmapData.height, true);
                 transparentBitmap.draw(bitmapData);
-                _source = transparentBitmap;
+                bitmapCreated = true;
+                bitmapData = transparentBitmap;
             }
-            else
-            {
-
-			    _source = bitmapData;
-            }
-
-            applyAlphaMultiplier = true;
-			dispatchFillChangedEvent("source", oldValue, bitmapData);
+
+            _source = value;
+            setBitmapData(bitmapData, bitmapCreated);
+
+			dispatchFillChangedEvent("source", oldValue, value);
         }
 	}

@@ -818,8 +826,12 @@
 	 */
 	public function begin(target:Graphics, bounds:Rectangle):void
 	{
-		if (!source)
+        var sourceAsBitmapData:BitmapData = _bitmapData;
+
+		if (!sourceAsBitmapData)
 			return;
+
+        var repeatFill:Boolean = (resizeMode == BitmapResizeMode.REPEAT);

         // If we need to apply the alpha, we need to make another clone. So dispose of the old one.
         if (nonRepeatAlphaSource && applyAlphaMultiplier)
@@ -827,9 +839,6 @@
             nonRepeatAlphaSource.dispose();
             nonRepeatAlphaSource = null;
         }
-
-        var sourceAsBitmapData:BitmapData = source as BitmapData;
-        var repeatFill:Boolean = (resizeMode == BitmapResizeMode.REPEAT);

         if (compoundTransform)
         {
@@ -964,6 +973,121 @@
 															oldValue, value));
         regenerateNonRepeatSource = true;
 	}
+
+    /**
+     *  @private
+     *  Utility function that sets the underlying bitmapData property.
+     */
+    private function setBitmapData(bitmapData:BitmapData, internallyCreated:Boolean = false):void
+    {
+        // Clear previous bitmapData
+        if (_bitmapData)
+        {
+            if (bitmapDataCreated) // Dispose the bitmap if we created it
+                _bitmapData.dispose();
+            _bitmapData = null;
+        }
+
+        bitmapDataCreated = internallyCreated;
+        applyAlphaMultiplier = alpha != 1;
+        _bitmapData = bitmapData;
+
+        dispatchFillChangedEvent("bitmapData", null, null);
+    }
+
+    /**
+     *  @private
+     */
+    private function validImageFile(url:String):Boolean
+    {
+        // We only accept .jpg, .jpeg, .gif, and .png files
+        // NOTE: This means queries that return images are not accepted: ie: myserver.com/fetch.php?image=12345
+        var exten:String = url.substr(Math.max(url.length - 5, 0), Math.min(url.length, 5)).toLowerCase();
+
+        if (exten.indexOf(".jpg") == -1 &&
+            exten.indexOf(".jpeg") == -1 &&
+            exten.indexOf(".gif") == -1 &&
+            exten.indexOf(".png") == -1)
+            return false;
+
+        return true;
+    }
+
+    /**
+     *  @private
+     */
+    private function loadExternal(url:String):void
+    {
+        if (!validImageFile(url))
+            return;
+
+        var loader:Loader = new Loader();
+        var loaderContext:LoaderContext = new LoaderContext();
+
+        loaderContext.checkPolicyFile = true;
+        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler, false, 0, true);
+        loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler, false, 0, true);
+        loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, loader_securityErrorHandler, false, 0, true);
+        try
+        {
+            loader.load(new URLRequest(url), loaderContext);
+        }
+        catch (error:SecurityError)
+        {
+            handleSecurityError(error);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function loader_completeHandler(event:Event):void
+    {
+        var image:Bitmap = null;
+
+        try
+        {
+            image = Bitmap((event.target as LoaderInfo).content);
+            setBitmapData(image.bitmapData);
+        }
+        catch (error:SecurityError)
+        {
+            handleSecurityError(error);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function loader_ioErrorHandler(error:IOErrorEvent):void
+    {
+        // clear any current image
+        setBitmapData(null);
+
+        // forward the error
+        dispatchEvent(error);
+    }
+
+    /**
+     *  @private
+     */
+    private function loader_securityErrorHandler(error:SecurityErrorEvent):void
+    {
+        // clear any current image
+        setBitmapData(null);
+
+        // forward the error
+        dispatchEvent(error);
+    }
+
+    /**
+     *  @private
+     */
+    private function handleSecurityError(error:SecurityError):void
+    {
+        setBitmapData(null);
+        dispatchEvent(new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR, false, false, error.message));
+    }
 }

 }


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

--- frameworks/projects/mx/src/mx/skins/halo/PopUpButtonSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/PopUpButtonSkin.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-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.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10633
Author:   dloverin@adobe.com
Date:     2009-09-28T13:24:30.559033Z

Log Message:
-----------
Use styleManager instance instead of StyleManager singleton (framework and compiler generated code)

Modified compiler generated style code for the FlexInit class. The style related changes are only available with the -keep option. AST generation is coming later.

Only the framework project is changed here. The other projects are will be changed soon.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex and Paul
Tests run: checkintests, all Mustella tests(no new failures)
Is noteworthy for integration: no.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonBarButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserMonthArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TitleBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperDownSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TabSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/textClasses/TextRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/CheckBoxIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperUpSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/RadioButtonIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ComboBoxArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/MenuBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressBarSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DataGridHeaderBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SetStyleActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>

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

--- frameworks/projects/mx/src/mx/skins/halo/SliderTrackSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/SliderTrackSkin.as
@@ -95,7 +95,7 @@
 		var borderColor:Number = getStyle("borderColor");
 		var fillAlphas:Array = getStyle("fillAlphas");
 		var fillColors:Array = getStyle("trackColors") as Array;
-		StyleManager.getColorNames(fillColors);
+        styleManager.getColorNames(fillColors);

 		// Derivative styles.
 		var borderColorDrk:Number =


revision 05

revision 05

--- as/main/frame4.as
+++ as/main/frame4.as
@@ -74,6 +74,7 @@
 function init():Void{

 onEnterFrame = startTextApp;
+EventDispatcher.initialize(this);

 }


Enable Mouse Lock API when available in the FPS camera.

--- src/aerys/minko/scene/controller/camera/FirstPersonCameraController.as
+++ src/aerys/minko/scene/controller/camera/FirstPersonCameraController.as
@@ -9,6 +9,7 @@
 	import aerys.minko.type.math.Vector4;

 	import flash.display.BitmapData;
+	import flash.display.Stage;
 	import flash.events.IEventDispatcher;
 	import flash.events.MouseEvent;
 	import flash.geom.Point;
@@ -17,6 +18,8 @@
 	public class FirstPersonCameraController extends AbstractScriptController
 	{
 		private static const TMP_MATRIX 	: Matrix4x4 = new Matrix4x4();
+
+		private var _stage					: Stage		= null;

 		private var _ghostMode				: Boolean	= true;
 		private var _rotation				: Vector4	= new Vector4();
@@ -59,9 +62,9 @@
 			_step = value;
 		}

-		public function FirstPersonCameraController()
+		public function FirstPersonCameraController(stage : Stage)
 		{
-			super ();
+			_stage = stage;
 		}

 		public function bindDefaultControls(dispatcher : IEventDispatcher) : FirstPersonCameraController
@@ -145,13 +148,21 @@

 			_update = true;
 		}
-
+
 		private function mouseMoveHandler(event : MouseEvent) : void
 		{
 			if (event.buttonDown)
 			{
-				_rotation.y += -(_mousePosition.x - event.stageX) * .005;
-				_rotation.x += (_mousePosition.y - event.stageY) * .005;
+				if (_stage && _stage.mouseLock)
+				{
+					_rotation.y += event.movementX * .005;
+					_rotation.x += -event.movementY * .005;
+				}
+				else
+				{
+					_rotation.y += -(_mousePosition.x - event.stageX) * .005;
+					_rotation.x += (_mousePosition.y - event.stageY) * .005;
+				}

 				_update = true;
 			}


Fix m4 quotation issues.

Fix m4 quotation issues.

	* build-aux/base.as (verbose): here.

--- build-aux/base.as
+++ build-aux/base.as
@@ -160,7 +160,7 @@
 verbose ()
 {
   case $verbose:" $VERBOSE " in
-    (*true:*|*" $me "*) stderr "$@";;
+    (true:*|*" $me "*) stderr "$[@]";;
   esac
 }


Delete mtApplication.as

Delete mtApplication.as

--- mtApplication.as
+++ mtApplication.as
@@ -1,59 +0,0 @@
-package touchAll.demos.multimediaTouchDemo
-{
-	import flash.ui.*;
-	import flash.display.*;
-	import flash.events.Event;
-
-	import touchAll.*;
-	import touchAll.multimedia.Multimedia;
-
-	/**
-	 * @author Gonçalo Amador
-	 */
-	[SWF(width="1280", height="720", frameRate="60", backgroundColor="#ffffff")]
-	public class MultimediaTouchDemo extends MovieClip
-	{
-		/* global variables */
-		private var tAll:TouchAll = new TouchAll(stage);
-
-		//private var tAll:TouchAll = new TouchAll(stage, 1280, 720, 0x000000, true, true);
-		//private var tAll:TouchAll = new TouchAll(stage,1280,720, 0x000000, true, false, false, false, true, "10.0.4.145", 3000);
-		private var multimedia:Multimedia = new Multimedia(stage);
-
-		public function MultimediaTouchDemo():void
-		{
-			if (stage) init();
-			else addEventListener(Event.ADDED_TO_STAGE, init);
-		}
-
-		private function init(e:Event = null):void
-		{
-			removeEventListener(Event.ADDED_TO_STAGE, init);
-
-			/* LOAD STAGE CONTENT */
-			tAll.backgroundLoader();
-			multimedia.backgroundMultimediaEventListenersLoader();
-
-			/* load images */
-			multimedia.addImage("resources/summer.jpg");
-			multimedia.addImage("resources/palacio.jpg");
-			multimedia.addImage("resources/lake.jpg");
-			multimedia.addImage("resources/forest.jpg");
-			//multimedia.addImage("file:///G:/touch/Source%20Code/TouchProject/bin/resources/forest.jpg");
-
-			/* load an SWF */
-			//multimedia.addSWF("resources/test.swf");
-
-			/* load an MP4 and FLV */
-			multimedia.addVideo("resources/Asus Xtion Pro test using OpenNI & OpenCV.mp4");
-			multimedia.addVideo("resources/Asus Xtion Pro test using OpenNI & OpenCV.flv");
-
-			/* stage set up */
-			tAll.stageLoader();
-			tAll.stageEventListenersLoader();
-
-			/* tuio set up */
-			tAll.tuioLoader();
-		}
-	}
-}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6609
Author:   gruehle@adobe.com
Date:     2009-05-04T22:47:31.285324Z

Log Message:
-----------
Add theme attribute to theme-specific style metadata.

Example of a halo-specific style:
[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo")]

Example of a spark-specific style:
[Style(name="baseColor", type="uint", format="Color", inherit="yes", theme="spark")]

Style metadata without a theme attribute is theme-agnostic, and works with either spark or halo.

Bugs: SDK-20606

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/FillStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BarColorStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/IconColorStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SelectedFillColorsStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.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/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
@@ -40,7 +40,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="focusColor", type="uint", format="Color", inherit="yes")]
+[Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark")]

 /**
  *  Dispatched when the user presses the ButtonBase control.


Beginnings of bandwidth limiting

Beginnings of bandwidth limiting

--- swfcat.as
+++ swfcat.as
@@ -36,8 +36,8 @@

         private var fac_addr:Object;

-        [Embed(source="badge.png")]
-        private var BadgeImage:Class;
+        //[Embed(source="badge.png")]
+        //private var BadgeImage:Class;

         public function puts(s:String):void
         {
@@ -71,8 +71,8 @@

             if (this.loaderInfo.parameters["debug"])
                 addChild(output_text);
-            else
-                addChild(new BadgeImage());
+            //else
+              //  addChild(new BadgeImage());

             fac_spec = this.loaderInfo.parameters["facilitator"];
             if (fac_spec) {
@@ -168,6 +168,7 @@
 import flash.events.SecurityErrorEvent;
 import flash.net.Socket;
 import flash.utils.ByteArray;
+import flash.utils.setInterval;

 /* An instance of a client-relay connection. */
 class ProxyPair
@@ -184,6 +185,19 @@

     // Parent swfcat, for UI updates.
     private var ui:swfcat;
+
+    // Proxy transfer rate limit in KB/s
+    private var rate_limit:uint;
+
+    // Default limit is 10KB/s
+    private const DEFAULT_RATE_LIMIT:uint = 10000;
+
+    private var curr_rate:Number;
+    private var historical_rate:Number;
+    private var lifetime:uint;
+
+    // in milliseconds
+    private const DEFAULT_RATE_TIMEOUT:uint = 1000;

     private function log(msg:String):void
     {
@@ -197,11 +211,16 @@
             "," + this.addr_r.host + ":" + this.addr_r.port + ">";
     }

-    public function ProxyPair(ui:swfcat, addr_c:Object, addr_r:Object)
+    public function ProxyPair(ui:swfcat, addr_c:Object, addr_r:Object, rate_limit:uint = DEFAULT_RATE_LIMIT)
     {
         this.ui = ui;
         this.addr_c = addr_c;
         this.addr_r = addr_r;
+        this.rate_limit = rate_limit;
+        this.curr_rate = 0.0;
+        this.historical_rate = 0.0;
+        this.lifetime = 0;
+        setInterval(update_transfer_rate, DEFAULT_RATE_TIMEOUT)
     }

     public function connect():void
@@ -259,18 +278,53 @@
     private function client_connected(e:Event):void
     {
         log("Client: connected.");
-
-        s_r.addEventListener(ProgressEvent.SOCKET_DATA, function (e:ProgressEvent):void {
-            var bytes:ByteArray = new ByteArray();
-            s_r.readBytes(bytes, 0, e.bytesLoaded);
-            log("Tor: read " + bytes.length + ".");
-            s_c.writeBytes(bytes);
-        });
-        s_c.addEventListener(ProgressEvent.SOCKET_DATA, function (e:ProgressEvent):void {
-            var bytes:ByteArray = new ByteArray();
-            s_c.readBytes(bytes, 0, e.bytesLoaded);
-            log("Client: read " + bytes.length + ".");
-            s_r.writeBytes(bytes);
-        });
+        add_data_listeners();
+    }
+
+    private function add_data_listeners():void
+    {
+      s_r.addEventListener(ProgressEvent.SOCKET_DATA, transfer_to_client);
+      s_c.addEventListener(ProgressEvent.SOCKET_DATA, transfer_to_relay);
+    }
+
+    private function remove_data_listeners():void
+    {
+      s_r.removeEventListener(ProgressEvent.SOCKET_DATA, transfer_to_client);
+      s_c.removeEventListener(ProgressEvent.SOCKET_DATA, transfer_to_relay);
+    }
+
+    private function transfer_to_client(e:ProgressEvent):void
+    {
+      log("Tor: read " + e.bytesLoaded + ".");
+      transfer_bytes(s_r, s_c, e.bytesLoaded);
+    }
+
+    private function transfer_to_relay(e:ProgressEvent):void
+    {
+      log("Client: read " + e.bytesLoaded + ".");
+      transfer_bytes(s_c, s_r, e.bytesLoaded);
+    }
+
+    private function transfer_bytes(src:Socket, dst:Socket, num_bytes:uint):void
+    {
+      var bytes:ByteArray = new ByteArray();
+      src.readBytes(bytes, 0, num_bytes);
+      dst.writeBytes(bytes);
+      curr_rate += num_bytes;
+      if (rate_limit_exceeded()) remove_data_listeners();
+    }
+
+    private function rate_limit_exceeded():Boolean
+    {
+      return curr_rate > rate_limit;
+    }
+
+    private function update_transfer_rate():void
+    {
+      lifetime++;
+      historical_rate = (0.7 * historical_rate + 0.3 * curr_rate) / lifetime;
+      curr_rate = historical_rate;
+      log("Historical rate: " + historical_rate);
+      log("Current rate: " + curr_rate);
     }
 }


Working with the callbacks to be able to translate images is way more exciting than I really appreciate.  But hey, this theoretically should be happier now.

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

--- src/as/com/threerings/miso/tile/AutoFringer.as
+++ src/as/com/threerings/miso/tile/AutoFringer.as
@@ -182,48 +182,79 @@

         // There's no fringe with the same identifier, so we need to create the tile.
         var img :Bitmap = null;
-        for each (fringer in fringers) {
-            indexes = getFringeIndexes(fringer.bits);
-            tsr  = _fringeConf.getFringe(fringer.baseset, hashValue);
-            for each (index in indexes) {
-                try {
-                    img = getTileImage(img, tsr, fringer.baseset, index, hashValue, masks);
-                } catch (nstse :NoSuchTileSetError) {
-                    log.warning("Autofringer couldn't find a needed tileset", nstse);
-                }
-            }
-        }
-        frTile.setImage(img);
+        getTileImageHelper1(img, hashValue, masks, fringers, 0, function (result :Bitmap) {
+                frTile.setImage(result);
+            });
         fringes.put(frTile, new WeakReference(frTile));
         return frTile;
     }

+    protected function getTileImageHelper1 (img :Bitmap, hashValue :int, masks :Map,
+        fringers :Array, fringerIdx :int, callback :Function)
+    {
+        var fringer :FringerRec = fringers[fringerIdx];
+        var indexes :Array = getFringeIndexes(fringer.bits);
+        var tsr :FringeTileSetRecord = _fringeConf.getFringe(fringer.baseset, hashValue);
+        getTileImageHelper0(img, tsr, fringer.baseset, hashValue, masks, indexes, 0,
+            function (result :Bitmap) :void {
+                if (fringerIdx == fringers.size() - 1) {
+                    callback(result);
+                } else {
+                    getTileImageHelper1(img, hashValue, masks, fringers, fringerIdx + 1, callback);
+                }
+            });
+    }
+
+    protected function getTileImageHelper0 (img :Bitmap, tsr :FringeTileSetRecord,
+        baseset :int, hashValue :int, masks :Map, indexes :Array,
+        indexIdx :int, callback :Function) :void
+    {
+        try {
+            getTileImage(img, tsr, baseset, indexes[indexIdx], hashValue, masks,
+                function (result :Bitmap) :void {
+                    if (indexIdx == indexes.size() - 1) {
+                        callback(result);
+                    } else {
+                        getTileImageHelper0(img, tsr, baseset, hashValue, masks, indexes,
+                            indexIdx + 1, callback);
+                    }
+                });
+        } catch (nstse :NoSuchTileSetError) {
+            log.warning("Autofringer couldn't find a needed tileset", nstse);
+            callback(null);
+        }
+    }
+
     /**
      * Retrieve or compose an image for the specified fringe.
      */
     protected function getTileImage (img :Bitmap, tsr :FringeTileSetRecord ,
-        baseset :int, index :int, hashValue :int, masks :Map) :Bitmap
+        baseset :int, index :int, hashValue :int, masks :Map, callback :Function) :void
     {
         var fringeset :int = tsr.fringe_tsid;
         var fset :TileSet = _tMgr.getTileSet(fringeset);
         if (!tsr.mask) {
             // oh good, this is easy
             var stamp :Tile = fset.getTile(index);
-            return stampTileImage(stamp, img, stamp.getWidth(), stamp.getHeight());
+            callback(stampTileImage(stamp, img, stamp.getWidth(), stamp.getHeight()));
+            return;
         }

         // otherwise, it's a mask..
         var maskkey :int = (baseset << 20) + (fringeset << 8) + index;
         var mask :Bitmap = masks.get(maskkey);
         if (mask == null) {
-            // TODO - callbacks
-            var fsrc :Bitmap = Bitmap(_tMgr.getTileSet(fringeset).getTileImage(index, null, null));
-            var bsrc :Bitmap = Bitmap(_tMgr.getTileSet(baseset).getTileImage(0, null, null));
-            mask = composeMaskedImage(fsrc, bsrc);
-            masks.put(maskkey, mask);
-        }
-
-        return stampTileImage(mask, img, mask.width, mask.height);
+            _tMgr.getTileSet(fringeset).getTileImage(index, null, function (fsrc :Bitmap) :void {
+                _tMgr.getTileSet(baseset).getTileImage(0, null, function (bsrc :Bitmap) :void {
+                    mask = composeMaskedImage(fsrc, bsrc);
+                    masks.put(maskkey, mask);
+                    callback(stampTileImage(mask, img, mask.width, mask.height));
+                });
+            });
+
+        } else {
+            callback(stampTileImage(mask, img, mask.width, mask.height));
+        }
     }


Crap.
My change to ClassUtil broke this when serializing
ByteArrays and such from a sub ApplicationDomain.
Jesus this stuff is annoying.
I have no idea why it's not the same Class when you
create a standard flash library class from within a sub AppDom.
But let's go ahead and check the object by name, then.
Hopefully this doesn't break something ELSE.

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

--- src/as/com/threerings/util/ObjectMarshaller.as
+++ src/as/com/threerings/util/ObjectMarshaller.as
@@ -173,7 +173,7 @@
             if (type == "number" || type == "string" || type == "boolean" ) {
                 return null; // kosher!
             }
-            if (-1 != VALID_CLASSES.indexOf(ClassUtil.getClass(value))) {
+            if (-1 != VALID_CLASSES.indexOf(ClassUtil.getClassName(value))) {
                 return null; // kosher
             }
             if (!Util.isPlainObject(value)) {
@@ -205,6 +205,6 @@
     staticInit();

     /** Non-simple classes that we allow, as long as they are not subclassed. */
-    protected static const VALID_CLASSES :Array = [ ByteArray, Point, Rectangle ];
+    protected static const VALID_CLASSES :Array = [ "flash.utils.ByteArray", "flash.geom.Point", "flash.geom.Rectangle" ];
 }
 }


Add test for XML.prototype.child() as used by Candy Crush

--- src/avm2/tests/regress/correctness/pass/xml.as
+++ src/avm2/tests/regress/correctness/pass/xml.as
@@ -135,3 +135,51 @@
     print("eventClass[p]="+eventClass[p]);
   }
 })();
+
+print("Testing XML.prototype.child as used by Candy Crush");
+(function () {
+  var x = new XML(
+    '<gamedata randomseed="1282661104" version="1">' +
+    '<musicOn>false</musicOn>' +
+    '<soundOn>true</soundOn>' +
+    '<isShortGame>false</isShortGame>' +
+    '<booster_1>0</booster_1>' +
+    '<booster_2>0</booster_2>' +
+    '<booster_3>0</booster_3>' +
+    '<booster_4>0</booster_4>' +
+    '<booster_5>0</booster_5>' +
+    '<bestScore>100</bestScore>' +
+    '<bestChain>2</bestChain>' +
+    '<bestLevel>1</bestLevel>' +
+    '<bestCrushed>5</bestCrushed>' +
+    '<bestMixed>2</bestMixed>' +
+    '<text id="intro.time">Le jeu commence dans {0} secondes</text>' +
+    '<text id="intro.title">Speel als volgt:</text>' +
+    '<text id="intro.info1">Sett sammen 3 godteri i samme farge for å knuse  ...</text>' +
+    '<text id="intro.info2">You can also combine the power candy for additio ...</text>' +
+    '<text id="game.nomoves">No more moves!</text>' +
+    '<text id="outro.opengame">Please register to play the full game</text>' +
+    '<text id="outro.title">Game Over</text>' +
+    '<text id="outro.now">now</text>' +
+    '<text id="outro.bestever">best ever</text>' +
+    '<text id="outro.score">Score</text>' +
+    '<text id="outro.chain">Longest chain</text>' +
+    '<text id="outro.level">Level reached</text>' +
+    '<text id="outro.crushed">Candy crushed</text>' +
+    '<text id="outro.time">Game ends in {0} seconds</text>' +
+    '<text id="outro.trophy.one">crushed {0} candy in one game</text>' +
+    '<text id="outro.trophy.two">scored {0} in one game</text>' +
+    '<text id="outro.trophy.three">made {0} combined candy in one game</text>' +
+    '<text id="outro.combo_wrapper_line">combo wrapper line description</text>' +
+    '<text id="outro.combo_color_color">combo color color description</text>' +
+    '<text id="outro.combo_color_line">combo color line description</text>' +
+    '<text id="outro.combo_color_wrapper">combo color wrapper description. ...</text>' +
+    '</gamedata>');
+  var tests = [
+    [x.child("text").length()],
+  ];
+  for (var i = 0; i < tests.length; i++) {
+    print(i + ": " + tests[i]);
+  }
+})();
+


Transferred from the Adobe Open Source Subversion Repository

Revision: 20097
Author:   jasonsj@adobe.com
Date:     2011-02-03T17:48:25.773740Z

Log Message:
-----------
Remove use of minWidth and minHeight where possible from mobile skins to fix constraint use cases. Replace usage of minWidth/minHeight and layoutMeasuredWidth/layoutMeasuredHeight with MobileSkin property measuredDefaultWidth/measuredDefaultHeight.

Use minWidth/minHeight for skins that do not scale down: Beveled buttons, CheckBox, RadioButton, and scroll bars.

Doc notes:
Bugs:
SDK-28715 Cannot size and position button correctly in i4 build.
Reviewer: egeorgie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarFirstButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarMiddleButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TabbedViewNavigatorTabBarTabSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarLastButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ImageSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -101,7 +101,7 @@
             }
             default:
             {
-                // default PPI160
+                // default DPI_160
                 borderSize = 1;
                 layoutShadowHeight = 3;
                 layoutContentGroupHeight = 43;
@@ -329,7 +329,7 @@
         var actionGroupWidth:Number = 0;

         // remove top and bottom padding from content group height
-        var contentGroupsHeight:Number = unscaledHeight - paddingTop - paddingBottom;
+        var contentGroupsHeight:Number = Math.max(0, unscaledHeight - paddingTop - paddingBottom);

         // FXG uses scale-9, drop shadow is drawn outside the bounds
         setElementSize(border, unscaledWidth, unscaledHeight + layoutShadowHeight);


Transferred from the Adobe Open Source Subversion Repository

Revision: 19737
Author:   jasonsj@adobe.com
Date:     2011-01-12T22:13:58.979077Z

Log Message:
-----------
SDK-28851 Symbol was added twice when changing enabled state
SDK-28159 Account for empty and null title in ActionBar

Removed unused textAlign code in ButtonSkinBase
Removed B-feature code for focusColor in MobileSkin

QE notes: None
Doc notes:
Bugs:
SDK-28851 CheckBox icon not properly updated when iconPlacement=right, checkbox is disabled and style changed
SDK-28159 ActionBar titleDisplay should measure the same for null and empty title
Reviewer: jszeto
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -549,17 +549,16 @@
             titleDisplay.text = title;
         titleDisplay.commitStyles();

+        var textSize:Point = titleDisplay.measuredTextSize;
+        textWidth = textSize.x;
+
         if (title != "")
         {
-            var textSize:Point = titleDisplay.measuredTextSize;
-            textWidth = textSize.x;
             textHeight = textSize.y;
             descent = titleDisplay.getLineMetrics(0).descent;
         }
         else
         {
-            // ignore text width...we just need textHeight, but we need to use
-            // measureText("Wj") to figure this out
             var lineMetrics:TextLineMetrics = measureText("Wj");
             textHeight = lineMetrics.height + StyleableTextField.TEXT_HEIGHT_PADDING;
             descent = lineMetrics.descent;


Issue 886 updating failing actionscript core test

git-svn-id: b10e9e05a96f28f96949e4aa4212c55f640c8f96@1844 59b500cc-1b3d-0410-9834-0bbf25fbcc57

--- actionscript/core/test/com/google/zxing/EncodeDecodeEAN8Test.as
+++ actionscript/core/test/com/google/zxing/EncodeDecodeEAN8Test.as
@@ -69,17 +69,20 @@
     }

     [Test(description="Encode a number, decode it, and compare.")]
-    public function encodedEAN8shouldBeDecodedSuccessfully():void {
+    public function testEncodedEAN8shouldBeDecodedSuccessfully():void {
       var testCode:Number = 48512343;
       var decodedNumber:Number = encodeAndDecode(testCode);
       assertEquals(testCode, decodedNumber);
     }

-    [Test(description="Bug: Endoding and decoding 1 fails")]
-    public function shouldEncodeAndDecodeAnyValidEAN8number():void {
-      var testCode:Number = 12345678;
-      var decodedNumber:Number = encodeAndDecode(testCode);
-      assertEquals(testCode, decodedNumber);
+    [Test(description="Encodes EAN8 from 0 to 9999999.")]
+    public function testEncodeAndDecodeAnyValidEAN8Number():void {
+      for (var testCode:Number = 9999999; testCode >= 0; testCode -= 1111111) {
+        var checkSum:Number = calculateEANChecksumDigit(testCode);
+        var testCodeWithCheckSum:Number = testCode * 10 + checkSum;
+        var decodedNumber:Number = encodeAndDecode(testCodeWithCheckSum);
+        assertEquals(testCodeWithCheckSum, decodedNumber);
+      }
     }

     private function encodeAndDecode(testCode:Number):Number {
@@ -125,7 +128,6 @@

     private function generateImage(resultBits:Array, imageWidth:Number,
         imageHeight:Number):Bitmap {
-      // generate an image
       var bitmapData:BitmapData = new BitmapData(imageWidth, imageHeight, false,
           0xFFFFFF);
       var bitmap:Bitmap = new Bitmap(bitmapData);
@@ -176,5 +178,22 @@
       }
       return contents;
     }
+
+    public function calculateEANChecksumDigit(number:Number):Number {
+      var checksum:Number = 0;
+      var weightedSumOfDigits:Number = 0;
+      var weight:Number = 3;
+      while (number > 0) {
+        var lastDigit:int = number % 10;
+        weightedSumOfDigits = weightedSumOfDigits + lastDigit * weight;
+        number = (number - lastDigit) / 10;
+        weight = weight == 3 ? 1 : 3;
+      }
+      var additionToTen:Number = weightedSumOfDigits % 10;
+      if (additionToTen > 0) {
+        checksum = 10 - additionToTen;
+      }
+      return checksum;
+    }
   }
 }


make readSignedExpGolomb public

make readSignedExpGolomb public

--- src/com/axis/rtspclient/BitArray.as
+++ src/com/axis/rtspclient/BitArray.as
@@ -49,7 +49,7 @@
       return n - 1; /* Because result in exp golomb is one larger */
     }

-    private function readSignedExpGolomb(sps:BitArray):uint {
+    public function readSignedExpGolomb(sps:BitArray):uint {
         var r:uint = this.readUnsignedExpGolomb();
         if (r & 0x01) {
             r = (r+1) >> 1;


Transferred from the Adobe Open Source Subversion Repository

Revision: 20374
Author:   smgilson@adobe.com
Date:     2011-02-18T14:57:58.468559Z

Log Message:
-----------
ASdoc leanup - fix broken links, update for event name changes, remove FlashPlayer version tags.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/managers/PersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/GapStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewReturnObject.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/TextInputOperation.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/managers/IPersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/StyleableTextFieldTextStyles.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/managers/PersistenceManager.as
+++ frameworks/projects/mobilecomponents/src/spark/managers/PersistenceManager.as
@@ -15,21 +15,20 @@

 /**
  *  The PersistenceManager class is a basic persistence manager that
- *  is backed by a shared object.  When initialized, it loads a
- *  shared object that matches its id.  If one is not found, one will
- *  be created.
+ *  is backed by a local shared object named FxAppCache.
+ *  When initialized, it loads a local shared object that matches its id.
+ *  If a local shared object is not found, it is created.
  *
- *
When storing values in the manager, it is important that all
- *  values can be properly be written to a shared object.  Complex
- *  objects that store classes or non-standard flash primitives
+ *
When storing values using the manager, it is important that all
+ *  values can be properly be written to a shared object.
+ *  Complex objects that store classes or non-standard flash primitives
  *  must implement flash.net.IExternalizable interface to work properly.
- *  Saving incompatible objects will not cause an RTE, but create
- *  undefined behavior when read from disk.

+ *  Saving incompatible objects does not cause an RTE, but creates
+ *  undefined behavior when the data is read back.

  *
  *  @see flash.net.IExternalizable
  *
  *  @langversion 3.0
- *  @playerversion Flash 10
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -53,7 +52,6 @@
      *  Constructor.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -90,7 +88,6 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -116,7 +113,6 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -135,7 +131,6 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -156,7 +151,6 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -175,7 +169,6 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */


Delete mtApplicationNoTUI.as

Delete mtApplicationNoTUI.as

--- mtApplicationNoTUI.as
+++ mtApplicationNoTUI.as
@@ -1,308 +0,0 @@
-/*
- * Tangible User Interfacer (former TouchAll) demo.
- *
- * Copyright 2016 Gonçalo Amador <g.n.p.amador@gmail.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package touchAll.demos.multimediaTouchDemo
-{
-	import flash.ui.*;
-	import flash.display.*;
-	import flash.events.Event;
-	//import flash.events.TouchEvent;
-	import flash.events.MouseEvent;
-	import flash.events.KeyboardEvent;
-
-	import touchAll.ITouchAll;
-	import touchAll.multimedia.Multimedia;
-
-	import org.tuio.*;
-	import org.tuio.connectors.*;
-	import org.tuio.debug.*;
-	import org.tuio.gestures.*;
-
-	/**
-	 * @author Gonçalo Amador
-	 */
-	[SWF(width="1280", height="720", frameRate="60", backgroundColor="#ffffff")]
-	public class MultimediaNoTouchAllDemo extends MovieClip implements ITouchAll
-	{
-		/* global variables */
-		private var background:Sprite = new Sprite;
-		private var packets_count:uint = 0;
-		private var log:String = "";
-		private var mouseCursor:Sprite;
-
-		private var tc:TuioClient;
-		private var tm:TuioManager;
-		private var gm:GestureManager;
-
-		private var multimedia:Multimedia = new Multimedia(stage);
-
-		public function MultimediaNoTouchAllDemo():void
-		{
-			if (stage) init();
-			else addEventListener(Event.ADDED_TO_STAGE, init);
-		}
-
-		private function init(e:Event = null):void
-		{
-			removeEventListener(Event.ADDED_TO_STAGE, init);
-
-			/* LOAD STAGE CONTENT */
-			backgroundLoader();
-			multimedia.setBackground(background);
-			multimedia.backgroundMultimediaEventListenersLoader();
-
-			/* load images */
-			multimedia.addImage("resources/summer.jpg");
-			multimedia.addImage("resources/palacio.jpg");
-			multimedia.addImage("resources/lake.jpg");
-			multimedia.addImage("resources/forest.jpg");
-			//multimedia.addImage("file:///G:/touch/Source%20Code/TouchProject/bin/resources/forest.jpg");
-
-			/* load an SWF */
-			//multimedia.addSWF("resources/test.swf");
-
-			/* load an MP4 and FLV */
-			multimedia.addVideo("resources/South Park Mac vs. PC.mp4");
-			multimedia.addVideo("resources/South Park Mac vs. PC vs. Linux.flv");
-
-			/* stage set up */
-			stageLoader();
-			stageEventListenersLoader();
-
-			/* tuio set up */
-			tuioLoader();
-		}
-
-		/* BACKGROUND FUNCTIONS */
-		/**
-		 * load default stage background
-		 */
-		public function backgroundLoader():void {
-			/*
-			 * Set blend mode "ALPHA" and
-			 * fill background at the starting position (0,0), with rgb color 0xFFFFFF and alpha blending 1
-			 */
-			background.blendMode = BlendMode.ALPHA;
-			background.graphics.beginFill(0xFFFFFF,1);
-			background.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
-			background.graphics.endFill();
-
-			/* set activate doubleClick mouse checks */
-			trace("set activate doubleClick mouse checks.");
-			background.doubleClickEnabled = true;
-
-			/* add the background to the stage */
-			trace("add the background to the stage.");
-			stage.addChild(background);
-		}
-
-		/**
-		 * stage set up
-		 */
-		public function stageLoader():void {
-			/* STAGE SET UP */
-			trace("STAGE SET UP.");
-			stage.stageWidth = 1280;
-			stage.stageHeight = 720;
-
-			/* AIR stage settings */
-			trace("AIR stage settings.");
-			//stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
-			stage.scaleMode = StageScaleMode.NO_SCALE;
-			stage.align = StageAlign.TOP_LEFT;
-
-			/* set activate doubleClick mouse checks */
-			trace("set activate doubleClick mouse checks.");
-			stage.doubleClickEnabled = true;
-
-			/* load an circle to track mouse cursor */
-			trace("load an circle to track mouse cursor.");
-			addMouseCursor();
-		}
-
-		/**
-		 * stage event listeners set up
-		 */
-		public function stageEventListenersLoader():void {
-			/* STAGE EVENT LISTENERS */
-			/* add stage keyboard event listeners */
-			trace("add stage keyboard event listeners.");
-			stage.addEventListener(KeyboardEvent.KEY_DOWN, showTuioNetworkPacketsLog);
-
-			/* add stage mouse event listeners */
-			trace("add stage mouse event listeners.");
-			stage.addEventListener(MouseEvent.MOUSE_MOVE, followMouse);
-			stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
-			stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
-		}
-
-		/**
-		 * Show total tuio events captured log
-		 */
-		private function packetsCount(e:TuioEvent):void {
-			var date:Date = new Date();
-			packets_count++;
-
-			log += packets_count + " Packet captured TuioEvent at " + date.fullYear;
-
-			if ((date.month + 1) < 10) {
-				log += "-0" + (date.month + 1);
-			}
-			else {
-				log += "-" + (date.month + 1);
-			}
-
-			if (date.date < 10) {
-				log += "-0" + date.date;
-			}
-			else {
-				log += "-" + date.date;
-			}
-
-			if (date.hours < 10) {
-				log += " 0" + date.hours;
-			}
-			else {
-				log += " " + date.hours;
-			}
-
-			if (date.minutes < 10) {
-				log += ":0" + date.minutes;
-			}
-			else {
-				log += ":" + date.minutes;
-			}
-
-			if (date.seconds < 10) {
-				log += ":0" + date.seconds;
-			}
-			else {
-				log += ":" + date.seconds;
-			}
-
-			if (date.milliseconds < 10) {
-				log += ".00" + date.milliseconds;
-			} else if (date.milliseconds < 100) {
-				log += ".0" + date.milliseconds;
-			}
-			else {
-				log += "." + date.milliseconds;
-			}
-
-			log += "\n";
-		}
-
-		/**
-		 * handle stage "F1" keyboard events
-		 */
-		private function showTuioNetworkPacketsLog(e:KeyboardEvent):void {
-			if (e.keyCode == Keyboard.F1) {
-				trace("touch hold.");
-				trace(log);
-				trace("Packets captured " + packets_count + "\n");
-			}
-		}
-
-		/**
-		 * display a circle where mouse cursor is
-		 */
-		private function addMouseCursor():void {
-			/* Create a Sprite instance called mouseCursor */
-			mouseCursor = new Sprite;
-
-			/*
-			 * Set blend mode "DARKEN" and
-			 * fill a circle at the starting position (0,0) of radius 5, with rgb color '_color' and alpha blending 1 or
-			 * draw a circle with line thickness 1.1, with rgb color '_color' and alpha blending 1.
-			 */
-			//mouseCursor.blendMode = BlendMode.DARKEN;
-			//mouseCursor.graphics.beginFill(0x770000, 1);
-			mouseCursor.graphics.lineStyle(1.1, 0x000000, 1, false, LineScaleMode.NONE);
-			mouseCursor.graphics.drawCircle(0, 0, 20);
-			//mouseCursor.graphics.endFill();
-
-			/* set circle center at mouse coursor position */
-			mouseCursor.x = mouseCursor.mouseX;
-			mouseCursor.y = mouseCursor.mouseY;
-
-			/* set circle visibility default value */
-			mouseCursor.visible = false;
-
-			/* add the circle to the stage */
-			stage.addChild(mouseCursor);
-		}
-
-		/**
-		 * handle mouse movement events for the circle
-		 */
-		private function followMouse(e:MouseEvent):void {
-			if (mouseCursor != null) {
-				mouseCursor.x = stage.mouseX;
-				mouseCursor.y = stage.mouseY;
-			}
-		}
-
-		/**
-		 * handle mouse down events for circle
-		 */
-		private function mouseDown(e:MouseEvent):void {
-			if (mouseCursor != null) {
-				mouseCursor.visible = true;
-			}
-		}
-
-		/**
-		 * handle mouse up events for circle
-		 */
-		private function mouseUp(e:MouseEvent):void {
-			if (mouseCursor != null) {
-				mouseCursor.visible = false;
-			}
-		}
-
-		/**
-		 * tuio set up
-		 */
-		public function tuioLoader():void {
-			var tc:TuioClient;
-
-			trace("tuioClient UDP connector.")
-			tc = new TuioClient(new UDPConnector("127.0.0.1", 3333));
-
-			trace("tuioDebug on.")
-			tc.addListener(TuioDebug.init(stage));
-
-			/* tuioManager setup (a container which processes the Tuio tracking data received by the given TuioClient) creation */
-			trace("tuioManager on.")
-			tm = TuioManager.init(stage, tc);
-
-			/* add tuioManager tuio event listeners */
-			tm.addEventListener(TuioEvent.ADD, packetsCount);
-			tm.addEventListener(TuioEvent.REMOVE, packetsCount);
-			tm.addEventListener(TuioEvent.UPDATE, packetsCount);
-
-			trace("gestureManager on.")
-			gm = GestureManager.init(stage, tc);
-
-			GestureManager.addGesture(new DragGesture());
-			GestureManager.addGesture(new ZoomGesture());
-			GestureManager.addGesture(new RotateGesture());
-			GestureManager.addGesture(new PressTapGesture());
-			GestureManager.addGesture(new OneDownOneMoveGesture());
-		}
-	}
-}


Just a quick test, to see if my commits are going to work.

--- src/org/swiftsuspenders/Injector.as
+++ src/org/swiftsuspenders/Injector.as
@@ -181,6 +181,7 @@
 				m_constructorInjectionPoints[clazz] = new NoParamsConstructorInjectionPoint();
 			}
 			//get injection points for variables
+			// This is where we have to wire in the XML...
 			for each (node in description.factory.*.(name() == 'variable' || name() == 'accessor').
 				metadata.(@name == 'Inject'))
 			{


fix Animate build on macOS

fix Animate build on macOS

--- src/ASConfigC.as
+++ src/ASConfigC.as
@@ -844,7 +844,7 @@

 			var jsflPath:String = this.createJSFLScript();

-			var command:String = this._animatePath + " " + this._animateFile + " " + jsflPath;
+			var command:String = escapePath(this._animatePath) + " " + escapePath(this._animateFile) + " " + escapePath(jsflPath);
 			if(process.platform === "darwin")
 			{
 				command = "open -a " + command;
@@ -854,11 +854,7 @@
 				console.info("Compiling Adobe Animate project...");
 				console.info(command);
 			}
-			var result:Object = child_process.execFileSync(this._animatePath,
-			[
-				this._animateFile,
-				jsflPath
-			],
+			var result:Object = child_process.execSync(command,
 			{
 				stdio: "inherit",
 				encoding: "utf8"
@@ -872,11 +868,11 @@
 			var logPath:String = null;
 			if(process.platform === "win32")
 			{
-				logPath = path.resolve(process.env["LOCALAPPDATA"], path.join("Adobe", "vscode-as3mxml"));
+				logPath = path.resolve(os["homedir"](), path.join("Adobe", "vscode-as3mxml"));
 			}
 			else
 			{
-				logPath = path.resolve(process.env["user.home"], path.join("Library", "Application Support", "Adobe", "vscode-as3mxml"));
+				logPath = path.resolve(os["homedir"](), path.join("Library", "Application Support", "Adobe", "vscode-as3mxml"));
 			}
 			if(logPath == null)
 			{


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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