rename variables for sake of clarity

rename variables for sake of clarity

--- src/org/mangui/hls/stream/FragmentLoader.as
+++ src/org/mangui/hls/stream/FragmentLoader.as
@@ -62,10 +62,10 @@
         /* variable to deal with IO Error retry */
         private var _bIOError : Boolean;
         private var _nIOErrorDate : Number = 0;
-        /** boolean to track playlist PTS in loading */
-        private var _pts_loading_in_progress : Boolean = false;
-        /** boolean to indicate that PTS of new playlist has just been loaded */
-        private var _pts_just_loaded : Boolean = false;
+        /** boolean to track whether PTS analysis is ongoing or not */
+        private var _pts_analyzing : Boolean = false;
+        /** boolean to indicate that PTS has just been analyzed */
+        private var _pts_just_analyzed : Boolean = false;
         /** Timer used to monitor/schedule fragment download. **/
         private var _timer : Timer;
         /** requested seek position **/
@@ -161,8 +161,8 @@
                         /* in case IO Error has been raised, stick to same level */
                         level = _level;
                         /* in case last fragment was loaded for PTS analysis, stick to same level */
-                    } else if (_pts_just_loaded == true) {
-                        _pts_just_loaded = false;
+                    } else if (_pts_just_analyzed == true) {
+                        _pts_just_analyzed = false;
                         level = _level;
                         /* in case we are switching levels (waiting for playlist to reload) or seeking , stick to same level */
                     } else if (_switchlevel == true) {
@@ -629,13 +629,13 @@
                         /* when probing PTS, take previous sequence number as reference if possible */
                         new_seqnum = Math.min(frag_previous.seqnum + 1, _levels[level].getLastSeqNumfromContinuity(frag_previous.continuity));
                         new_seqnum = Math.max(new_seqnum, _levels[level].getFirstSeqNumfromContinuity(frag_previous.continuity));
-                        _pts_loading_in_progress = true;
+                        _pts_analyzing = true;
                         log_prefix = "analyzing PTS ";
                     }
                 }
             }

-            if (_pts_loading_in_progress == false) {
+            if (_pts_analyzing == false) {
                 if (last_seqnum == _levels[level].end_seqnum) {
                     // if last segment was last fragment of VOD playlist, notify last fragment loaded event, and return
                     if (_hls.type == HLSTypes.VOD) {
@@ -808,8 +808,8 @@
                         }
                     }

-                    if (_pts_loading_in_progress == true) {
-                        _pts_loading_in_progress = false;
+                    if (_pts_analyzing == true) {
+                        _pts_analyzing = false;
                         _levels[_level].updateFragment(_frag_current.seqnum, true, fragData.pts_min, fragData.pts_min + _frag_current.duration * 1000);
                         /* in case we are probing PTS, retrieve PTS info and synchronize playlist PTS / sequence number */
                         CONFIG::LOGGING {
@@ -827,7 +827,7 @@
                         // Log.info("seq/next:"+ _seqnum+"/"+ next_seqnum);
                         // }
                         if (next_seqnum != _frag_current.seqnum) {
-                            _pts_just_loaded = true;
+                            _pts_just_analyzed = true;
                             CONFIG::LOGGING {
                                 Log.debug("PTS analysis done on " + _frag_current.seqnum + ", matching seqnum is " + next_seqnum + " of [" + (_levels[_level].start_seqnum) + "," + (_levels[_level].end_seqnum) + "],cancel loading and get new one");
                             }
@@ -951,7 +951,7 @@
                     _hasDiscontinuity = false;
                     fragData.tags = new Vector.<FLVTag>();
                 }
-                _pts_loading_in_progress = false;
+                _pts_analyzing = false;
                 _hls.dispatchEvent(new HLSEvent(HLSEvent.FRAGMENT_LOADED, tagsMetrics));
                 _fragment_first_loaded = true;
                 _frag_previous = _frag_current;


reformatting

reformatting

--- src/eu/stefaner/elasticlists/data/Model.as
+++ src/eu/stefaner/elasticlists/data/Model.as
@@ -18,9 +18,12 @@

 package eu.stefaner.elasticlists.data {
 	import eu.stefaner.elasticlists.App;
+
 	import org.osflash.thunderbolt.Logger;
+
 	import flash.events.EventDispatcher;
 	import flash.utils.Dictionary;
+
 	/**
 	 *  Model
 	 *
@@ -32,6 +35,7 @@
 	 *	@author moritz@stefaner.eu
 	 */
 	public class Model extends EventDispatcher {
+
 		public var app : App;
 		public var facets : Array = [];
 		public var facetValuesForContentItem : Dictionary = new Dictionary(true);
@@ -40,13 +44,16 @@
 		public var filteredContentItems : Array = [];
 		protected var allContentItemsForFacetValue : Dictionary = new Dictionary(true);
 		protected var contentItemsById : Dictionary = new Dictionary(true);
-		public static var ANDselectionWithinFacets : Boolean = false;
+		public static var ANDselectionWithinFacets : Boolean = true;
+
 		public function Model(a : App) {
 			app = a;
 		};
+
 		public function hasActiveFilters() : Boolean {
 			return !(filteredContentItems.length == allContentItems.length);
 		}
+
 		// adds a facet
 		// REVISIT: could overwrite pre-existing facet with same name in lookup maps!
 		public function addFacet(f : Facet) : Facet {
@@ -59,6 +66,7 @@

 			return f;
 		}
+
 		public function createFacet(name : String, type : String = "") : Facet {
 			if(getFacetByName(name)) {
 				throw new Error("Cannot add facet, because it is already present: " + name);
@@ -82,6 +90,7 @@

 			return addFacet(new Facet(this, name));
 		};
+
 		// returns a facet by name
 		public function getFacetByName(name : String) : Facet {
 			for each(var facet:Facet in facets) {
@@ -91,25 +100,30 @@
 			}
 			return null;
 		}
+
 		public function updateGlobalFacetStats() : void {
 			for each (var facet:Facet in facets) {
 				facet.calcGlobalStats();
 			}
 		}
+
 		public function updateLocalFacetStats() : void {
 			for each (var facet:Facet in facets) {
 				facet.calcLocalStats();
 			}
 		}
+
 		//---------------------------------------
 		// CONTENTITEMS
 		//---------------------------------------
 		public function createContentItem(id : String) : ContentItem {
 			return getContentItemById(id) || addContentItem(app.createContentItem(id));
 		};
+
 		public function getContentItemById(id : String) : ContentItem {
 			return contentItemsById[id];
 		}
+
 		// REVISIT: lookup should be moved to Facet object?
 		public function getAllContentItemsForFacetValue(f : FacetValue) : Array {
 			if(allContentItemsForFacetValue[f] == undefined) {
@@ -117,9 +131,11 @@
 			}
 			return allContentItemsForFacetValue[f];
 		}
+
 		public function getNumContentItemsForFacetValue(f : FacetValue) : int {
 			return getAllContentItemsForFacetValue(f).length;
 		}
+
 		// adds a content items
 		private function addContentItem(c : ContentItem) : ContentItem {
 			if(!contentItemsById[c.id]) {
@@ -132,6 +148,7 @@
 				return contentItemsById[c.id];
 			}
 		};
+
 		// short cut function with a lengthy name
 		// will create facet value if necessary!
 		public function assignFacetValueToContentItemByName(contentItemId : String, facetName : String, facetValueName : String) : void {
@@ -146,6 +163,7 @@
 			}
 			assignFacetValueToContentItem(facetValue, contentItem);
 		}
+
 		// REVISIT: lookup should be moved to Facet object
 		public function assignFacetValueToContentItem(f : FacetValue, c : ContentItem) : void {
 			if(f == null || c == null) {
@@ -168,6 +186,7 @@
 			 *
 			 */
 		};
+
 		//---------------------------------------
 		// FILTERS
 		//---------------------------------------
@@ -179,6 +198,7 @@
 			}
 			applyFilters();
 		};
+
 		// gets selected filters from facets, stores them in activeFilters dict
 		public function updateActiveFilters() : void {
 			activeFilters = new Dictionary();
@@ -189,6 +209,7 @@
 				}
 			}
 		};
+
 		// updates ContentItem states, filteredContentItems based on filters
 		public function applyFilters() : void {
 			trace("Model.applyFilters");
@@ -218,6 +239,7 @@
 			}
 			Logger.info("Model. onFilteredContentItemsChanged: " + filteredContentItems.length + " results");
 		};
+
 		// tests if a contentitem matches all filters in passed filters dictionary at least once per type
 		// (AND conjunction of OR queries within one facet)
 		protected function contentItemMatchesFilters(c : ContentItem, filters : Dictionary) : Boolean {
@@ -263,9 +285,11 @@
 			// all good
 			return true;
 		}
+
 		public function getTotalNumContentItemsForFacetValue(f : FacetValue) : int {
 			return getAllContentItemsForFacetValue(f).length;
 		}
+
 		public function getFilteredNumContentItemsForFacetValue(f : FacetValue) : int {
 			// get all ContentItems
 			var contentItems : Array = getAllContentItemsForFacetValue(f);


session history squash now temporarily disables mouse on visDesktop

--- WeaveUI/src/weave/application/VisApplication.as
+++ WeaveUI/src/weave/application/VisApplication.as
@@ -80,6 +80,7 @@
 	import weave.core.LinkableBoolean;
 	import weave.data.DataSources.WeaveDataSource;
 	import weave.data.KeySets.KeySet;
+	import weave.editors.SessionHistorySlider;
 	import weave.editors.SingleImagePlotterEditor;
 	import weave.editors.WeavePropertiesEditor;
 	import weave.editors.managers.DataSourceManager;
@@ -119,7 +120,7 @@
 	import weave.utils.DebugTimer;
 	import weave.utils.EditorManager;
 	import weave.utils.VectorUtils;
-	import weave.visualization.tools.WeaveAnalyst;
+	import weave.visualization.tools.WeaveAnalyst;

 	internal class VisApplication extends VBox implements ILinkableObject
 	{
@@ -689,6 +690,12 @@
 			if (!historySlider)
 			{
 				historySlider = EditorManager.getNewEditor(Weave.history) as UIComponent;
+				var shs:SessionHistorySlider = historySlider as SessionHistorySlider;
+				if (shs)
+					shs.squashActive.addImmediateCallback(this, function():void{
+						visDesktop.mouseChildren = !shs.squashActive.value;
+					});
+
 				if (historySlider)
 					this.addChildAt(historySlider, this.getChildIndex(visDesktop));
 				else


Found a simpler way to send results to FlashDevelop, using trace instead of the XMLSocket.

--- as3/src/asunit4/printers/FlashDevelopPrinter.as
+++ as3/src/asunit4/printers/FlashDevelopPrinter.as
@@ -17,21 +17,10 @@

 		protected static const lineNumberPattern:RegExp = /:[0-9]*\]/;

-		protected var messageQueue:Array;
-		protected var socket:XMLSocket;
-
 		public function FlashDevelopPrinter() {
-			messageQueue = [];
-			socket = new XMLSocket();
-	      	socket.addEventListener(Event.CONNECT, onConnect);
-			socket.addEventListener(IOErrorEvent.IO_ERROR, onErrorEvent);
-			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorEvent);
-   	   		socket.addEventListener(Event.CLOSE, onErrorEvent);
-			connect();
 		}

 		public function startTestRun():void {
-
 		}

 		public function addTestResult(result:IFreeTestResult):void {
@@ -50,37 +39,13 @@

 		public function endTestRun():void {
 		}
-
-		protected function connect(ip:String = '127.0.0.1', port:uint = 1978):void {
-   	   		try {
-   	   			socket.connect(ip, port);
-   	   		}
-			catch (e:Error) {
-   	   			trace('## Error connecting to Flash Develop socket: ' + e.message);
-   	   		}
-		}
-
-		protected function onConnect(event:Event):void {
-			dispatchEvent(event);
-			sendQueuedMessages();
-		}
-
-		protected function sendQueuedMessages():void
-		{
-			while (messageQueue.length) {
-				sendMessage(messageQueue.shift());
-			}
-		}
-
+
 		protected function sendMessage(message:String):void {
-			if (!socket.connected) {
-				messageQueue.push(message);
-				return;
-			}
-			socket.send(message);
+			trace(message);
 		}

 		protected function getFailureMessage(failure:ITestFailure):String {
+			var status:String = (failure.isFailure) ? 'F' : 'E';
 			var stack:String = failure.thrownException.getStackTrace();
 			var lines:Array = stack.split('\n');
 			var methodPattern:RegExp = new RegExp(failure.failedMethod);
@@ -100,15 +65,10 @@
 			// Take off the colon and bracket (I need to get better at regex).
 			var lineNumber:String = lineNumberRaw.slice(1, -1);

-			var message:String = filePath + '('+lineNumber+'): '
+			var message:String = filePath + '('+lineNumber+'): ' + status + ' '
 				+ (failure.failedMethod + '(): ' + failure.exceptionMessage);

 			return message;
 		}
-
-		protected function onErrorEvent(event:Event):void {
-			trace('onErrorEvent() - event: ' + event);
-		}
-
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12046
Author:   gruehle@adobe.com
Date:     2009-11-20T16:21:29.084389Z

Log Message:
-----------
Spark application doesn’t support creationPolicy=”queued”. Instead of throwing an error, we fallback on the creationPolicy=”auto” logic.

QE notes: -
Doc notes: -
Bugs: SDK-24062
Reviewer: Corey
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -3145,8 +3145,8 @@

             if ("addToCreationQueue" in mainApp)
                 mainApp.addToCreationQueue(this, creationIndex, null, this);
-            else
-                throw new Error("addToCreationQueue called but method does not exist within application");
+            else // If the app doesn't support queued creation, create our components now
+                createComponentsFromDescriptors();
         }
         else if (recursionFlag)
         {


fixed bugs handling csv data source metadata

Change-Id: I4ae691ed5e7adbfe54fa38a9534a13b72072a243

--- WeaveData/src/weave/data/DataSources/CSVDataSource.as
+++ WeaveData/src/weave/data/DataSources/CSVDataSource.as
@@ -17,6 +17,7 @@
 {
 	import flash.utils.getQualifiedClassName;

+	import mx.utils.ObjectUtil;
 	import mx.utils.StringUtil;

 	import weave.api.core.ICallbackCollection;
@@ -36,6 +37,7 @@
 	import weave.api.newLinkableChild;
 	import weave.api.registerLinkableChild;
 	import weave.api.reportError;
+	import weave.compiler.StandardLib;
 	import weave.core.CallbackCollection;
 	import weave.core.LinkableFile;
 	import weave.core.LinkableString;
@@ -49,6 +51,7 @@
 	import weave.data.AttributeColumns.StringColumn;
 	import weave.data.CSVParser;
 	import weave.data.QKeyManager;
+	import weave.data.hierarchy.ColumnTreeNode;
 	import weave.utils.HierarchyUtils;

 	/**
@@ -62,14 +65,18 @@

 		public function CSVDataSource()
 		{
+			registerLinkableChild(hierarchyRefresh, metadata);
 		}

 		public const csvData:LinkableVariable = registerLinkableChild(this, new LinkableVariable(Array), handleCSVDataChange);
 		public const keyType:LinkableString = newLinkableChild(this, LinkableString, updateKeys);
 		public const keyColName:LinkableString = newLinkableChild(this, LinkableString, updateKeys);

-		public const metadata:LinkableVariable = registerLinkableChild(this, new LinkableVariable(null, typeofIsObject));
-		private function typeofIsObject(value:Object):Boolean { return typeof value == 'object'; }
+		public const metadata:LinkableVariable = registerLinkableChild(this, new LinkableVariable(null, typeOfIsObject));
+		private function typeOfIsObject(value:Object):Boolean
+		{
+			return typeof value == 'object';
+		}

 		public const url:LinkableFile = newLinkableChild(this, LinkableFile, parseRawData);

@@ -156,6 +163,7 @@
 					nameLookup[columnIds[i]] = true;
 			}
 			updateKeys(true);
+			hierarchyRefresh.triggerCallbacks();
 		}

 		private function updateKeys(forced:Boolean = false):void
@@ -219,11 +227,32 @@
 		 */
 		private function getColumnMetadata(id:Object):Object
 		{
-			var meta:Object = metadata.getSessionState();
-			if (id is String && meta is Array)
-				return meta[columnIds.indexOf(id)];
-			else if (meta)
-				return meta[id];
+			try
+			{
+				if (id is Number)
+					id = columnIds[id];
+				var meta:Object = metadata.getSessionState();
+				if (meta is Array)
+				{
+					var array:Array = meta as Array;
+					for (var i:int = 0; i < array.length; i++)
+					{
+						var item:Object = array[i];
+						var itemId:* = item[METADATA_COLUMN_NAME] || item[METADATA_COLUMN_INDEX];
+						if (itemId === undefined)
+							itemId = columnIds[i];
+						if (itemId === id)
+							return item;
+					}
+					return null;
+				}
+				else if (meta)
+					return meta[id];
+			}
+			catch (e:Error)
+			{
+				reportError(e);
+			}
 			return null;
 		}

@@ -358,30 +387,56 @@
 		 */
 		override public function getHierarchyRoot():IWeaveTreeNode
 		{
-			if (!(_rootNode is CSVColumnNode))
-				_rootNode = new CSVColumnNode(this);
+			if (!_rootNode)
+				_rootNode = new ColumnTreeNode({
+					dataSource: this,
+					label: WeaveAPI.globalHashMap.getName(this),
+					children: function(root:ColumnTreeNode):Array {
+						var items:Array = metadata.getSessionState() as Array;
+						if (!items)
+							items = getColumnIds();
+						var children:Array = [];
+						for (var i:int = 0; i < items.length; i++)
+						{
+							var item:Object = items[i];
+							children[i] = generateHierarchyNode(item) || generateHierarchyNode(i);
+						}
+						return children;
+					}
+				});
 			return _rootNode;
 		}

 		override protected function generateHierarchyNode(metadata:Object):IWeaveTreeNode
 		{
+			if (typeof metadata != 'object')
+				metadata = generateMetadataForColumnId(metadata);
+
 			if (!metadata)
 				return null;

-			var csvRoot:CSVColumnNode = getHierarchyRoot() as CSVColumnNode;
-			if (!csvRoot)
-				return super.generateHierarchyNode(metadata);
-
-			if (metadata.hasOwnProperty(METADATA_COLUMN_INDEX))
-				return new CSVColumnNode(this, metadata[METADATA_COLUMN_INDEX]);
-			if (metadata.hasOwnProperty(METADATA_COLUMN_NAME))
-			{
-				var index:int = getColumnNames().indexOf(metadata[METADATA_COLUMN_NAME]);
-				if (index >= 0)
-					return new CSVColumnNode(this, index);
+			if (metadata.hasOwnProperty(METADATA_COLUMN_INDEX) || metadata.hasOwnProperty(METADATA_COLUMN_NAME))
+			{
+				return new ColumnTreeNode({
+					dataSource: this,
+					label: getColumnNodeLabel,
+					idFields: [METADATA_COLUMN_INDEX, METADATA_COLUMN_NAME],
+					data: metadata
+				});
 			}

 			return null;
+		}
+		private function getColumnNodeLabel(node:ColumnTreeNode):String
+		{
+			var title:String = node.data[ColumnMetadata.TITLE] || node.data[METADATA_COLUMN_NAME];
+			if (!title && node.data['name'])
+			{
+				title = node.data['name'];
+				if (node.data['year'])
+					title = StandardLib.substitute("{0} ({1})", title, node.data['year']);
+			}
+			return title;
 		}

 		[Deprecated] public function set attributeHierarchy(state:Object):void
@@ -436,26 +491,23 @@
 				if (!columnId)
 				{
 					// support for time slider
-					var metaArray:Array = this.metadata.getSessionState() as Array;
-					if (metaArray)
+					for (var i:int = 0; i < columnIds.length; i++)
 					{
-						for (var i:int = 0; i < metaArray.length; i++)
+						var meta:Object = getColumnMetadata(columnIds[i]);
+						var found:int = 0;
+						for (var key:String in metadata)
 						{
-							var found:int = 0;
-							for (var key:String in metaArray[i])
+							if (meta[key] != metadata[key])
 							{
-								if (metaArray[i][key] != metadata[key])
-								{
-									found = 0;
-									break;
-								}
-								found++;
-							}
-							if (found)
-							{
-								columnId = i;
+								found = 0;
 								break;
 							}
+							found++;
+						}
+						if (found)
+						{
+							columnId = i;
+							break;
 						}
 					}

@@ -608,60 +660,3 @@
 		[Deprecated(replacement="getColumnById")] public function getColumnByName(name:String):IAttributeColumn { return getColumnById(name); }
 	}
 }
-
-import weave.api.data.ColumnMetadata;
-import weave.api.data.IColumnReference;
-import weave.api.data.IDataSource;
-import weave.api.data.IWeaveTreeNode;
-import weave.data.DataSources.CSVDataSource;
-
-internal class CSVColumnNode implements IWeaveTreeNode, IColumnReference
-{
-	private var source:CSVDataSource;
-	public var columnIndex:int;
-	internal var children:Array;
-	public function CSVColumnNode(source:CSVDataSource = null, columnIndex:int = -1)
-	{
-		this.source = source;
-		this.columnIndex = columnIndex;
-		if (columnIndex < 0)
-			children = [];
-	}
-	public function equals(other:IWeaveTreeNode):Boolean
-	{
-		var that:CSVColumnNode = other as CSVColumnNode;
-		return !!that
-			&& this.source == that.source
-			&& this.columnIndex == that.columnIndex;
-	}
-	public function getLabel():String
-	{
-		if (columnIndex < 0)
-			return WeaveAPI.globalHashMap.getName(source);
-		return source.getColumnTitle(columnIndex);
-	}
-	public function isBranch():Boolean { return columnIndex < 0; }
-	public function hasChildBranches():Boolean { return false; }
-	public function getChildren():Array
-	{
-		if (!children)
-			return null;
-
-		var ids:Array = source.getColumnIds();
-		children.length = ids.length;
-		for (var i:int = 0; i < ids.length; i++)
-			if (!children[i])
-				children[i] = new CSVColumnNode(source, i);
-		return children;
-	}
-
-	public function getDataSource():IDataSource
-	{
-		return source;
-	}
-	public function getColumnMetadata():Object
-	{
-		var id:Object = source.getColumnIds()[columnIndex];
-		return id != null && source.generateMetadataForColumnId(id);
-	}
-}


Remove obsolete values

Remove obsolete values

--- lib/src/com/amanitadesign/steam/SteamConstants.as
+++ lib/src/com/amanitadesign/steam/SteamConstants.as
@@ -12,10 +12,6 @@
 {
 	public class SteamConstants
 	{
-		/* response values */
-		public static const RESPONSE_OK:int = 0;
-		public static const RESPONSE_FAILED:int = 1;
-
 		/* response types */
 		public static const RESPONSE_OnUserStatsReceived:int = 0;
 		public static const RESPONSE_OnUserStatsStored:int = 1;


Just noticed this old sc workaround file, it is no longer needed

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


Tests: another test for findOutputDirectory

--- test/src/tests/FindOutputDirectoryTests.as
+++ test/src/tests/FindOutputDirectoryTests.as
@@ -19,6 +19,17 @@

 		[Test]
 		public function testOutputDirectoryWithMainFileForSWF():void
+		{
+			var mainFile:String = "./source-path-assets/Main.as";
+			var outputPath:String = null;
+			var isSWF:Boolean = true;
+			var outputDirectory:String = findOutputDirectory(mainFile, outputPath, isSWF);
+			Assert.strictEqual(outputDirectory, path.resolve("./source-path-assets"),
+				"Incorrect output directory with main file for SWF: " + mainFile);
+		}
+
+		[Test]
+		public function testOutputDirectoryWithMainFileInSrcForSWF():void
 		{
 			var mainFile:String = "./source-path-assets/src/Main.as";
 			var outputPath:String = null;


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

--- frameworks/projects/automation/src/mx/automation/delegates/containers/ApplicationAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/containers/ApplicationAutomationImpl.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.automation.delegates.containers
 {


Change 20080918-hqm-z by hqm@badtzmaru.home on 2008-09-18 16:07:26 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: use swf9 introspection in debugger inspector

New Features:

Bugs Fixed:

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

Documentation:

Release Notes:

Details:

Tests:

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

--- WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as
+++ WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as
@@ -137,12 +137,20 @@
    *
    * @access private
    */
+  #passthrough {
   override function objectOwnProperties (obj:*, names:Array=null, indices:Array=null, limit:Number=Infinity, nonEnumerable:Boolean=false) {
     // TODO [2008-09-11 hqm] not sure what to do here, maybe we can use the introspection API
     // flash.utils.describeType() to at least enumerate public properties...
+    var description:XML = describeType(obj);
+    trace('objectOwnProperties', description);
+    for each(var a:XML in description.variable) {
+        if (names != null) {
+          names.push(a.@name);
+        }
+      }
     return super.objectOwnProperties(obj, names, indices, limit,nonEnumerable);
-
   }
+  }#
 }

 var Debug = new LzAS3DebugService(null);


Fixed bug where LinkableDynamicObject.requestLocalObjectCopy()
wasn't clearing the object if it failed.

Change-Id: I3cbe5fccf7737897321cb6f58cb2a1b59ec2890f

--- WeaveCore/src/weave/core/LinkableDynamicObject.as
+++ WeaveCore/src/weave/core/LinkableDynamicObject.as
@@ -226,7 +226,10 @@
 			if (newGlobalName == null) // local object
 			{
 				// initialize the local object -- this may trigger childListCallback()
-				_localHashMap.requestObject(LOCAL_OBJECT_NAME, newClassDef, lockObject);
+				var result:ILinkableObject = _localHashMap.requestObject(LOCAL_OBJECT_NAME, newClassDef, lockObject);
+				// if the object fails to be created, remove any existing object (may be a global one).
+				if (!result)
+					removeObject();
 			}
 			else // global object
 			{


Add colors to Flash test to ease debugging.

--- test/flash_test.as
+++ test/flash_test.as
@@ -1,9 +1,19 @@
 package {
   import stdio.Sprite

-  [SWF(width=0, height=0)]
+  [SWF(width=100, height=100)]
   public class flash_test extends Sprite {
+    public function flash_test(): void {
+      graphics.beginFill(0xff0000)
+      graphics.drawRect(10, 10, 80, 80)
+      graphics.endFill()
+    }
+
     public function main(): void {
+      graphics.beginFill(0x0000ff)
+      graphics.drawRect(30, 30, 40, 40)
+      graphics.endFill()
+
       test_body()
     }
   }


Remove unused log; fix IntelliJ warnings

("export" is a reserved keyword)

--- exporter/src/main/as/flump/export/Publisher.as
+++ exporter/src/main/as/flump/export/Publisher.as
@@ -2,8 +2,6 @@
 // Flump - Copyright 2013 Flump Authors

 package flump.export {
-
-import aspire.util.Log;

 import flash.filesystem.File;

@@ -14,14 +12,14 @@
     public function Publisher (exportDir :File, project :ProjectConf, projectName :String) {
         _exportDir = exportDir;
         _projectName = projectName;
-        for each (var export :ExportConf in project.exports) _confs.push(export);
+        for each (var conf :ExportConf in project.exports) _confs.push(conf);
     }

     public function modified (libs :Vector.<XflLibrary>, idx :int = -1) :Boolean {
         // Instantiate all formats and check for modified. For a ProjectConf that contains combined
         // exports, all individual libs will check as modified if any single lib is modified
-        return instantiate(libs, idx).some(function (export :PublishFormat, ..._) :Boolean {
-            return export.modified;
+        return instantiate(libs, idx).some(function (conf :PublishFormat, ..._) :Boolean {
+            return conf.modified;
         });
     }

@@ -56,6 +54,5 @@
     private var _exportDir :File;
     private var _projectName :String;
     private const _confs :Vector.<ExportConf> = new <ExportConf>[];
-    private static const log :Log = Log.getLog(Publisher);
 }
 }


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

--- frameworks/projects/mx/src/mx/core/Repeater.as
+++ frameworks/projects/mx/src/mx/core/Repeater.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.core
 {


TSDemuxer.as: also flush tags found in PES packet with unknown length related to https://github.com/mangui/flashls/issues/120

--- src/org/mangui/hls/demux/TSDemuxer.as
+++ src/org/mangui/hls/demux/TSDemuxer.as
@@ -185,7 +185,8 @@
             // check whether last parsed audio PES is complete
             if (_curAudioPES && _curAudioPES.length > 14) {
                 var pes : PES = new PES(_curAudioPES, true);
-                if (pes.len && (pes.data.length - pes.payload - pes.payload_len) >= 0) {
+                // consider that PES with unknown size (length=0 found in header) is complete
+                if (pes.len == 0 || (pes.data.length - pes.payload - pes.payload_len) >= 0) {
                     CONFIG::LOGGING {
                         Log.debug2("TS: complete Audio PES found at end of segment, parse it");
                     }
@@ -206,7 +207,8 @@
             // check whether last parsed video PES is complete
             if (_curVideoPES && _curVideoPES.length > 14) {
                 pes = new PES(_curVideoPES, false);
-                if (pes.len && (pes.data.length - pes.payload - pes.payload_len) >= 0) {
+                // consider that PES with unknown size (length=0 found in header) is complete
+                if (pes.len == 0 || (pes.data.length - pes.payload - pes.payload_len) >= 0) {
                     CONFIG::LOGGING {
                         Log.debug2("TS: complete AVC PES found at end of segment, parse it");
                     }


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

--- frameworks/projects/mx/src/mx/effects/WipeUp.as
+++ frameworks/projects/mx/src/mx/effects/WipeUp.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2006 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.effects
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3930
Author:   egreenfi@adobe.com
Date:     2008-10-28T16:30:24.729265Z

Log Message:
-----------
Step 1 of memory improvements
GraphicElement now optimizes away its AdvancedLayoutFeatures as long is has a trivial (translation only) transform matrix.
Added a new OnDemandEventDispatcher class that only allocates memory for event dispatcher functionality when it gets its first listener.
GraphicElement, OverrideBase, and LayoutBase extend OnDemandEventDispatcher.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/OverrideBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.as</path>

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

--- frameworks/projects/framework/src/FrameworkClasses.as
+++ frameworks/projects/framework/src/FrameworkClasses.as
@@ -143,6 +143,7 @@
 	import mx.utils.XMLUtil; XMLUtil;
 	import mx.utils.Base64Decoder; Base64Decoder;
 	import mx.utils.Base64Encoder; Base64Encoder;
+	import mx.utils.OnDemandEventDispatcher; OnDemandEventDispatcher;
 	import mx.validators.Validator; Validator;
 	// Maintain alphabetical order
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 1218
Author:   jimurphy@adobe.com
Date:     2008-04-15T16:09:32.174552Z

Log Message:
-----------
merge 3.0.x[1069:1202] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</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/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/PNGEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/JPEGEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaTypeRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/IImageEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPFault.as</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</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/rpc/src/mx/rpc/soap/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloColors.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</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/rpc/src/mx/rpc/xml/IXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RoundedRectangle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLEncoder.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/rpc/src/mx/rpc/soap/SOAPHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLBinding.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/xml/IXMLEncoder.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/IXMLEncoder.as
@@ -24,15 +24,20 @@
      * Encodes an ActionScript value as XML.
      *
      * @param value The ActionScript value to encode as XML.
+     *
      * @param name The QName of an XML Schema element that
      * describes how to encode the value, or the name to be used for the
      * encoded XML node when a type parameter is also specified.
+     *
      * @param type The QName of an XML Schema simpleType or
      * complexType definition that describes how to encode the
      * value.
+     *
      * @param definition If neither a top-level element nor type exists in the
      * schema to describe how to encode this value, a custom element definition
      * can be provided.
+     *
+     * @return Returns an XML encoding of the given ActionScript value.
      */
     function encode(value:*, name:QName = null, type:QName = null, definition:XML = null):XMLList;

@@ -70,4 +75,4 @@
     function set strictNillability(value:Boolean):void;
 }

-}+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8455
Author:   chaase@adobe.com
Date:     2009-07-08T17:14:01.590461Z

Log Message:
-----------
Fixed various effects bugs. Includes:
- fix when setting transform center on effect to (0, 0, 0)
- fix for transform effects running within a Sequence (they now run independently, instead of combining into a signle instance as they do in a Parallel effect)
- fix for asdoc error in AnimateTransform3D for applyLocalProjection
- fix in Resize where we were not setting up propertyChanges correctly for the targets affected by the effect
- fixes in AnimateTransformInstance to handle scaling in Z correctly and handling translation 'by' effects correctly

Bugs: sdk-21877, sdk-21610, sdk21584, sdk-21786
Doc Notes: fixed AnimateTransform3D.applyLocalProjection docs
QE Notes: may affect Sequence tests with transform effects (since it now actually works), but no failures in current mx/effects/Sequence tests. 11 failures overall in Mustella, some known, the rest Matt will exclude and investigate.
Reviewer: Jason (plus Ely for AdvancedLayoutFeatures changes)
Tests: checkintests, Mustella spark/effects, mx/effects/Sequence

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Resize.as
+++ frameworks/projects/spark/src/spark/effects/Resize.as
@@ -270,8 +270,8 @@
             var n:int = propertyChanges.length;
             for (var i:int = 0; i < n; i++)
             {
-                if (targetsToCapture != null &&
-                    targetsToCapture.indexOf(propChanges[i].target) >= 0)
+                if (targetsToCapture == null || targetsToCapture.length == 0 ||
+                    targetsToCapture.indexOf(propertyChanges[i].target) >= 0)
                 {
                     propertyChanges[i].stripUnchangedValues = false;
                 }


Seems we can't reference a constant expression as a default parameter value.

--- driver/src/main/flex/org/postgresql/CodecError.as
+++ driver/src/main/flex/org/postgresql/CodecError.as
@@ -29,7 +29,7 @@
         /**
          * @private
          */
-        public function CodecError(message:String, direction:String, cause:Error, oid:int=Oid.UNSPECIFIED, as3Type:Class=null) {
+        public function CodecError(message:String, direction:String, cause:Error, oid:int=0 /* Oid.UNSPECIFIED */, as3Type:Class=null) {
             super(message);
             _direction = direction;
             _cause = cause;


Removed StopCart since it's no longer used, we also send a message to the board when we've stopped.


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

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/LeadingStyle.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/LeadingStyle.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


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

--- frameworks/projects/mx/src/mx/containers/Panel.as
+++ frameworks/projects/mx/src/mx/containers/Panel.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-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.containers
 {


RTMP.as: fix volume level value (close #4)

--- src/RTMP.as
+++ src/RTMP.as
@@ -119,7 +119,7 @@
     }

     private function playerVolume(level:Number):void {
-      mediaPlayer.volume = level;
+      mediaPlayer.volume = level/100;
     }

    private function getState():String {


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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridListData.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridListData.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/DataGridItemRendererAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/DataGridItemRendererAutomationImpl.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.automation.delegates.controls
 {


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkImageAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkImageAutomationImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


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

--- frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as
+++ frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


updated documentation

updated documentation

Change-Id: If92b573b9a5d6d8e1e14dc6c29814ba89f128868

--- WeaveCore/src/weave/core/CallbackCollection.as
+++ WeaveCore/src/weave/core/CallbackCollection.as
@@ -42,13 +42,13 @@
 		private var _oldEntries:Array;

 		/**
-		 * If specified, the preCallback function will be called immediately before running each callback.
-		 * This means if there are five callbacks added, preCallback() gets called five times whenever
-		 * _runCallbacksImmediately() is called.  An example usage of this is to make sure a relevant
-		 * variable is set to the appropriate value while each callback is running.  If preCallback()
-		 * takes any parameters, they must be made optional.  The preCallback function will not be called
-		 * before grouped callbacks.
 		 * @param preCallback An optional function to call before each immediate callback.
+		 *     If specified, the preCallback function will be called immediately before running each
+		 *     callback using the parameters passed to _runCallbacksImmediately(). This means if there
+		 *     are five callbacks added, preCallback() gets called five times whenever
+		 *     _runCallbacksImmediately() is called.  An example usage of this is to make sure a relevant
+		 *     variable is set to the appropriate value while each callback is running.  The preCallback
+		 *     function will not be called before grouped callbacks.
 		 */
 		public function CallbackCollection(preCallback:Function = null)
 		{
@@ -370,6 +370,7 @@
 	/**
 	 * This is the current recursion depth.
 	 * If this is greater than zero, it means the function is currently running.
+	 * Note that it IS possible for this to go above 1 if an external JavaScript popup interrupts our code.
 	 */
 	public var recursionCount:uint = 0;
 	/**


NavigationState.make now auto clone the state

--- src/it/sharpedge/navigator/api/NavigationState.as
+++ src/it/sharpedge/navigator/api/NavigationState.as
@@ -13,8 +13,8 @@
 		public static const DOUBLE_WILDCARD : String = WILDCARD + WILDCARD;
 		public static const DELIMITER : String = "/";

-		public static function make(stateOrPath : *) : NavigationState {
-			return stateOrPath is NavigationState ? stateOrPath : NavigationStatePool.getNavigationState(stateOrPath);
+		public static function make(stateOrPath:*, clone:Boolean=true) : NavigationState {
+			return stateOrPath is NavigationState ? (clone ? NavigationState(stateOrPath).clone(): stateOrPath) : NavigationStatePool.getNavigationState(stateOrPath);
 		}

 		/*============================================================================*/
@@ -167,7 +167,7 @@
 		 * 		/portfolio/editorial/84/3 + * = /editorial/84/3/*
 		 */
 		public function append( trailingStateOrPath:* ):NavigationState {
-			return NavigationStatePool.getNavigationState(_path, make(trailingStateOrPath).path);
+			return NavigationStatePool.getNavigationState(_path, make(trailingStateOrPath,false).path);
 		}

 		/**
@@ -177,7 +177,7 @@
 		 * 		/portfolio/editorial/84/3 + main = /main/editorial/84/3/
 		 */
 		public function prefix( leadingStateOrPath:* ):NavigationState {
-			return NavigationStatePool.getNavigationState( make(leadingStateOrPath), _path );
+			return NavigationStatePool.getNavigationState( make(leadingStateOrPath,false), _path );
 		}

 		public function hasWildcard():Boolean {


Adventures in XFL parsing: this attribute is sometimes absent.

--- runtime/src/main/as/flump/xfl/XflKeyframe.as
+++ runtime/src/main/as/flump/xfl/XflKeyframe.as
@@ -89,7 +89,7 @@
             // handle "motionTweenRotate" (in this case, the rotation is not embedded in the matrix)
             if (converter.hasAttr("motionTweenRotateTimes") && duration > 1) {
                 rotation = converter.getNumberAttr("motionTweenRotateTimes") * Math.PI * 2;
-                if (converter.getStringAttr("motionTweenRotate") == "clockwise") {
+                if (converter.getStringAttr("motionTweenRotate", null) == "clockwise") {
                     rotation *= -1;
                 }


Улучшения

Улучшения

--- src/main/org/shypl/common/util/CollectionUtils.as
+++ src/main/org/shypl/common/util/CollectionUtils.as
@@ -5,7 +5,8 @@

 	import org.shypl.common.lang.IllegalArgumentException;
 	import org.shypl.common.lang.NullPointerException;
-
+	import org.shypl.common.lang.isEquals;
+
 	public final class CollectionUtils {

 		public static const VECTOR_CLASS_NAME:String = getQualifiedClassName(Vector);
@@ -56,7 +57,7 @@
 			}

 			for (var i:uint = 0; i < length; ++i) {
-				if (collectionA[i] !== collectionB[i]) {
+				if (!org.shypl.common.lang.isEquals(collectionA[i], collectionB[i])) {
 					return false;
 				}
 			}
@@ -80,7 +81,7 @@
 			for (var i:uint = 0; i < length; ++i) {
 				var a:Object = collectionA[i];
 				var b:Object = collectionB[i];
-				if (a !== b && isArrayOrVector(a) && isArrayOrVector(b) && !isEqualsDeep(a, b)) {
+				if (!org.shypl.common.lang.isEquals(a, b) && isArrayOrVector(a) && isArrayOrVector(b) && !isEqualsDeep(a, b)) {
 					return false;
 				}
 			}


Bugfix for ListBase when being created with percentWidth and percentHeights

--- src/org/openPyro/controls/listClasses/ListBase.as
+++ src/org/openPyro/controls/listClasses/ListBase.as
@@ -221,7 +221,7 @@

 		override public function queueValidateDisplayList(event:PyroEvent=null):void{
 			super.queueValidateDisplayList(event);
-			if(!_dataProvider || !_itemRendererFactory || !_needsReRendering ){
+			if(!_dataProvider || !_itemRendererFactory || !_needsReRendering || isNaN(height) || isNaN(width)){
 				return;
 			}
 			_needsReRendering = false;


fix asdoc html

fix asdoc html

--- src/com/ryanberdeen/echonest/api/v4/track/TrackApi.as
+++ src/com/ryanberdeen/echonest/api/v4/track/TrackApi.as
@@ -142,7 +142,7 @@
     * Invokes the Echo Nest upload API method.
     *
     *
This method is for uploads using the url parameter.
-    * To upload a file, use uploadFileReference().
+    * To upload a file, use uploadFileReference().

     *
     * @param parameters The parameters to include in the API request.
     * @param loaderOptions The event listener options for the loader.


add Gestures #	modified:   MultitouchAndGestures/src/MultitouchAndGestures.as

--- MultitouchAndGestures/src/MultitouchAndGestures.as
+++ MultitouchAndGestures/src/MultitouchAndGestures.as
@@ -1,15 +1,20 @@
 package
 {
 	import flash.display.Sprite;
+	import flash.display.Stage;
 	import flash.display.StageAlign;
 	import flash.display.StageScaleMode;
+	import flash.events.GesturePhase;
+	import flash.events.TimerEvent;
 	import flash.events.TouchEvent;
+	import flash.events.TransformGestureEvent;
 	import flash.text.TextField;
 	import flash.text.TextFieldAutoSize;
 	import flash.ui.Multitouch;
 	import flash.ui.MultitouchInputMode;
+	import flash.utils.Timer;

-	import org.osmf.layout.HorizontalAlign;
+	import org.flexunit.internals.matchers.Each;

 	[ SWF(backgrouncColor="0xFFFFFF",
 		  frameRate="25",
@@ -20,6 +25,8 @@
 	{
 		private var coordinates:TextField;
 		private var multitouch:TextField;
+		private var currentTarget:String;
+		private var idleTimer:Timer;
 		private var offsetX:Number;
 		private var offsetY:Number;

@@ -33,6 +40,9 @@

 			multitouch = new TextField();
 			multitouch.autoSize = TextFieldAutoSize.LEFT;
+
+			idleTimer = new Timer(1000);
+			idleTimer.addEventListener(TimerEvent.TIMER, onTimer);

 			switch(Multitouch.supportsTouchEvents)
 			{
@@ -65,9 +75,14 @@

 			switch(e.type) {
 				case TouchEvent.TOUCH_BEGIN:
-					removeShape(id);
-					drawLines(id, x, y);
-					drawShape(id, x, y);
+					if (e.target is Stage) {
+						removeShape(id);
+						drawLines(id, x, y);
+						drawShape(id, x, y);
+					} else {
+						currentTarget = e.target.name;
+						initializeGestures();
+					}
 					break;
 				case TouchEvent.TOUCH_MOVE:
 					moveLines(id, x, y);
@@ -140,6 +155,16 @@
 			if (!stage.getChildByName(shapeId)) {
 				shape = new Sprite();
 				shape.name = shapeId;
+				for each(var g:String in Multitouch.supportedGestures) {
+					switch(g)
+					{
+						case TransformGestureEvent.GESTURE_PAN:
+							shape.addEventListener(g, onPan);
+							break;
+						default:
+							break;
+					}
+				}
 				stage.addChild(shape);
 			} else {
 				shape = stage.getChildByName(shapeId) as Sprite;
@@ -163,5 +188,42 @@
 				stage.removeChild(shape);
 			}
 		}
+
+		//--------------------------
+		private function onTimer(e:TimerEvent):void {
+			idleTimer.stop();
+			initializeTouch();
+		}
+
+		private function initializeTimer():void {
+			idleTimer.delay = 1000;
+			if (!idleTimer.running) {
+				idleTimer.start();
+			}
+		}
+
+		private function initializeGestures():void {
+			if (Multitouch.supportsGestureEvents) {
+				Multitouch.inputMode = MultitouchInputMode.GESTURE;
+				initializeTimer();
+			}
+		}
+
+		private function initializeTouch():void {
+			if (Multitouch.supportsTouchEvents) {
+				Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
+			}
+		}
+
+		private function onPan(e:TransformGestureEvent):void {
+			var shape:Sprite = stage.getChildByName(currentTarget) as Sprite;
+			switch(e.phase) {
+				case GesturePhase.UPDATE:
+					shape.x = shape.x + e.offsetX;
+					shape.y = shape.y + e.offsetY;
+					initializeTimer();
+				break;
+			}
+		}
 	}
 }


Removed ITestResult as it is no longer used.

--- asunit-4.0/src/asunit/framework/ITestResult.as
+++ asunit-4.0/src/asunit/framework/ITestResult.as
@@ -1,21 +0,0 @@
-package asunit.framework {
-
-	public interface ITestResult {
-
-		function addFailure(failure:ITestFailure):void;
-
-		function get errors():Array;
-		function get errorCount():uint;
-
-		function get failures():Array;
-		function get failureCount():uint;
-
-		function get runCount():uint;
-		function set runCount(value:uint):void;
-
-		function get wasSuccessful():Boolean;
-
-		function addListener(listener:ITestListener):void;
-		function removeListener(listener:ITestListener):void;
-	}
-}


added option to use grouped callback

added option to use grouped callback

--- WeaveCore/src/weave/core/LinkableCallbackScript.as
+++ WeaveCore/src/weave/core/LinkableCallbackScript.as
@@ -27,15 +27,16 @@
 	{
 		public function LinkableCallbackScript()
 		{
-			_callbacks = WeaveAPI.SessionManager.getCallbackCollection(this);
-			_callbacks.addImmediateCallback(null, selfCallback);
+			var callbacks:ICallbackCollection = WeaveAPI.SessionManager.getCallbackCollection(this);
+			callbacks.addImmediateCallback(null, selfCallback);
+			callbacks.addGroupedCallback(null, selfGroupedCallback);
 		}

 		public const variables:LinkableHashMap = registerLinkableChild(this, new LinkableHashMap());
 		public const script:LinkableString = registerLinkableChild(this, new LinkableString());
 		public const delayWhileBusy:LinkableBoolean = registerLinkableChild(this, new LinkableBoolean(true));
+		public const groupedCallback:LinkableBoolean = registerLinkableChild(this, new LinkableBoolean(false));

-		private var _callbacks:ICallbackCollection;
 		private const _symbolTableProxy:ProxyObject = new ProxyObject(hasVariable, getVariable, null);
 		private var _compiledScript:Function = null;
 		private static const _compiler:Compiler = new Compiler(true);
@@ -53,6 +54,18 @@
 		}

 		private function selfCallback():void
+		{
+			if (!groupedCallback.value)
+				runScript();
+		}
+
+		private function selfGroupedCallback():void
+		{
+			if (groupedCallback.value)
+				runScript();
+		}
+
+		private function runScript():void
 		{
 			if (delayWhileBusy.value && WeaveAPI.SessionManager.linkableObjectIsBusy(this))
 				return;


EntityCache now becomes busy immediately when an entity is invalidated.

--- WeaveData/src/weave/services/EntityCache.as
+++ WeaveData/src/weave/services/EntityCache.as
@@ -20,6 +20,7 @@
     import mx.rpc.events.ResultEvent;

     import weave.api.core.ICallbackCollection;
+    import weave.api.core.IDisposableObject;
     import weave.api.core.ILinkableObject;
     import weave.api.data.ColumnMetadata;
     import weave.api.data.EntityType;
@@ -37,7 +38,7 @@
 	/**
 	 * Provides an interface to a set of cached Entity objects.
 	 */
-    public class EntityCache implements ILinkableObject
+    public class EntityCache implements ILinkableObject, IDisposableObject
     {
 		/**
 		 * A special flag value to represent a root node, which doesn't actually exist.
@@ -108,6 +109,8 @@
 		{
 			//trace('invalidate',id, alsoInvalidateRelatives, entityCache[id]);
 			callbacks.delayCallbacks();
+
+			WeaveAPI.SessionManager.assignBusyTask(delayedCallback, this);

 			// trigger callbacks if we haven't previously decided to fetch this id
 			if (!idsToFetch[id])
@@ -219,7 +222,9 @@
 					handleServiceFault,
 					splicedIds
 				);
-			}
+			}
+
+			WeaveAPI.SessionManager.unassignBusyTask(delayedCallback);
         }

 		private function handleIdsToInvalidate(event:ResultEvent, alsoInvalidateRelatives:Boolean):void
@@ -498,6 +503,11 @@
 		private function handleServiceFault(event:FaultEvent, token:Object = null):void
 		{
 			reportError(event);
+		}
+
+		public function dispose():void
+		{
+			WeaveAPI.SessionManager.unassignBusyTask(delayedCallback);
 		}
     }
 }


added flex QQQ to C %Q date format string conversion

--- WeaveData/src/weave/data/AttributeColumns/DateColumn.as
+++ WeaveData/src/weave/data/AttributeColumns/DateColumn.as
@@ -334,7 +334,8 @@
 			'EEE','%a',
 			'NN','%M', // note these %M appears after the M's were replaced above
 			'N','%-M',
-			'SS','%S'
+			'SS','%S',
+			'QQQ','%Q'
 			//,'S','%-S'
 		];


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/BlurInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/BlurInstance.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 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.effects.effectClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7332
Author:   hmuller@adobe.com
Date:     2009-05-27T21:00:41.827653Z

Log Message:
-----------
Guard against NaN width,height in GroupBase::renderFillForMouseOpaque().

QE Notes:
Doc Notes:
Bugs: sdk-21434
Reviewer: Corey

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -773,17 +773,19 @@
      */
     protected function renderFillForMouseOpaque():void
     {
-        if (_mouseOpaque && _hasMouseListeners)
-        {
-            graphics.clear();
-            graphics.beginFill(0xFFFFFF, 0);
-
-            var w:Number = (_resizeMode == _SCALE_UINT) ? measuredWidth : unscaledWidth;
-            var h:Number = (_resizeMode == _SCALE_UINT) ? measuredHeight : unscaledHeight;
-            graphics.drawRect(0, 0, w, h);
-
-            graphics.endFill();
-        }
+        if (!_mouseOpaque || !_hasMouseListeners)
+            return;
+
+        var w:Number = (_resizeMode == _SCALE_UINT) ? measuredWidth : unscaledWidth;
+        var h:Number = (_resizeMode == _SCALE_UINT) ? measuredHeight : unscaledHeight;
+
+        if (isNaN(w) || isNaN(h))
+            return;
+
+        graphics.clear();
+        graphics.beginFill(0xFFFFFF, 0);
+        graphics.drawRect(0, 0, w, h);
+        graphics.endFill();
     }

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


Fixed crash when processing truncated PES packets.

--- HLSPlugin/src/com/kaltura/hls/m2ts/PESProcessor.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/PESProcessor.as
@@ -132,6 +132,12 @@
         {
             var b:ByteArray = packet.buffer;
             b.position = 0;
+
+            if(b.length < 8)
+            {
+                trace("Ignoring too short PES packet, length=" + b.length);
+                return;
+            }

             // Get the start code.
             var startCode:uint = b.readUnsignedInt();


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

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

 package mx.rpc.xml
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3085
Author:   chaase@adobe.com
Date:     2008-09-03T22:22:09.170095Z

Log Message:
-----------
New effects, as requested by Thermo (and which made sense for SDK effects as well):
Wait: This effect waits for either/both a timeout period and a specified event. useful for choreographing Effect sequences.
CallFunctionAction: When played, this effect calls a specified function with an optional list of parameters. Again, useful when choreographing multiple effects in a sequence, where a function might be called after/before specific effects are played.

Also, tweaked NumberInterpolator to clamp start/end values to the supplied start/end values, rather than depending on floating-point precision to round off correctly in the parametric calculation of the proper result.

Reviewed by Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/CallFunctionActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/CallFunctionAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/WaitInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Wait.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/effects/CallAction.as
+++ frameworks/projects/spark/src/spark/effects/CallAction.as
@@ -0,0 +1,103 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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 flex.effects
+{
+import flash.events.IEventDispatcher;
+
+import mx.effects.Effect;
+import mx.effects.IEffectInstance;
+import flex.effects.effectClasses.CallFunctionActionInstance;
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="duration", kind="property")]
+
+/**
+ * This effect, when played, calls the function specified by
+ * functionName on the target object with
+ * optional parameters. The effect may be useful in
+ * effect sequences where some function call can be choreographed
+ * with other effects.
+ *
+ * @see flex.effects.effectClasses.CallFunctionActionInstance
+ */
+public class CallFunctionAction extends Effect
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param target The Object to animate with this effect.
+     */
+    public function CallFunctionAction(target:Object = null)
+    {
+        super(target);
+
+        instanceClass = CallFunctionActionInstance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  functionName
+    //----------------------------------
+
+    /**
+     * Name of the function that will be called on the target when this effect plays
+     */
+    public var functionName:String;
+
+    //----------------------------------
+    //  parameters
+    //----------------------------------
+
+    /**
+     * Parameters that will be supplied to the function that is called
+     * by this effect
+     */
+    public var parameters:Array;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function initInstance(instance:IEffectInstance):void
+    {
+        super.initInstance(instance);
+
+        var callInstance:CallFunctionActionInstance = CallFunctionActionInstance(instance);
+
+        callInstance.functionName = functionName;
+        callInstance.parameters = parameters;
+    }
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 15368
Author:   smgilson@adobe.com
Date:     2010-04-13T12:31:21.786591Z

Log Message:
-----------
integrate 15352: Update ASDoc version tags

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkCheckBoxAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTextAreaAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkListBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableTextBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as
@@ -11,261 +11,261 @@

 package spark.automation.delegates.components.supportClasses
 {
-	import flash.display.DisplayObject;
-	import flash.events.Event;
-	import flash.events.IEventDispatcher;
-	import flash.events.KeyboardEvent;
-	import flash.events.MouseEvent;
-	import flash.geom.Point;
-	import flash.ui.Keyboard;
-	import flash.utils.getTimer;
-
-	import mx.automation.Automation;
-	import mx.automation.IAutomationObjectHelper;
-	import mx.core.mx_internal;
-
-	import spark.automation.events.SparkValueChangeAutomationEvent;
-	import spark.components.HSlider;
-	import spark.components.VSlider;
-	import spark.components.supportClasses.SliderBase;
-
-	use namespace mx_internal;
-
-	[Mixin]
-	/**
-	 *
-	 *  Defines methods and properties required to perform instrumentation for the
-	 *  SliderBarBase class.
-	 *
-	 *  @see spark.components.supportClasses.SliderBarBase
-	 *
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public class SparkSliderBaseAutomationImpl extends SparkTrackBaseAutomationImpl
-	{
-		include "../../../../core/Version.as";
-
-		//--------------------------------------------------------------------------
-		//
-		//  Class methods
-		//
-		//--------------------------------------------------------------------------
-
-
-		/**
-		 *  Registers the delegate class for a component class with automation manager.
-		 *
-		 *  @param root The SystemManger of the application.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		public static function init(root:DisplayObject):void
-		{
-			Automation.registerDelegateClass(spark.components.supportClasses.SliderBase, SparkSliderBaseAutomationImpl);
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Constructor
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Constructor.
-		 * @param obj SliderBarBase object to be automated.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		public function SparkSliderBaseAutomationImpl(obj:spark.components.supportClasses.SliderBase)
-		{
-			super(obj);
-
-			obj.addEventListener(Event.CHANGE, scrollHandler, false, -1, true);
-		}
-
-		/**
-		 *  @private
-		 *  storage for the owner component
-		 */
-		protected function get slider():spark.components.supportClasses.SliderBase
-		{
-			return uiComponent as spark.components.supportClasses.SliderBase;
-		}
-
-
-
-		//----------------------------------
-		//  automationValue
-		//----------------------------------
-
-		/**
-		 *  @private
-		 */
-		override public function get automationValue():Array
-		{
-			//return [ slider.value.toString() ];
-			return super.automationValue;
-		}
-
-		/**
-		 *  @private
-		 *  Replays ScrollEvents.
-		 *  ScrollEvents are replayed by simply setting the
-		 *  verticalScrollPosition or
-		 *  horizontalScrollPosition properties of the instance.
-		 */
-		override public function replayAutomatableEvent(interaction:Event):Boolean
-		{
-			if ( interaction is SparkValueChangeAutomationEvent)
-			{
-				var event:SparkValueChangeAutomationEvent = SparkValueChangeAutomationEvent(interaction);
-				var target:IEventDispatcher = null;
-				var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN);
-
-				var mousePoint:Point = new Point(0,0);
-
-				var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
-				var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
-
-				if(slider is  spark.components.HSlider)
-					mousePoint = hSliderValueToPoint(event.value);
-
-				else if (slider is spark.components.VSlider)
-					mousePoint = vSliderValueToPoint(event.value);
-
-				mouseEvent.localX = mousePoint.x;
-				mouseEvent.localY = mousePoint.y;
-				target = slider.track;
-				if (target)
-				{
-					var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-					help.replayClick(target, mouseEvent);
-				}
-
-				var completeTime:Number = getTimer() + slider.getStyle("slideDuration");
-
-				help.addSynchronization(function():Boolean
-				{
-					return getTimer() >= completeTime;
-				});
-				return true;
-			}
-			else if (interaction is KeyboardEvent)
-			{
-				var help1:IAutomationObjectHelper = Automation.automationObjectHelper;
-				help1.replayKeyboardEvent(slider, interaction as KeyboardEvent);
-			}
-			else
-			{
-				return super.replayAutomatableEvent(interaction);
-			}
-
-			return true;
-		}
-
-		private function  vSliderValueToPoint(value:Number):Point
-		{
-			// we are doing the reverse conversion od the pointToValue  in the VSlider
-			// we even consider the modiifcation done in the mouseDownHanlder for the track in the slider
-			var thumbRange:Number = slider.track.getLayoutBoundsHeight() - slider.thumb.getLayoutBoundsHeight();
-			var range:Number = slider.maximum - slider.minimum;
-			var localY:Number = thumbRange - ( (Number(value -slider.minimum) /  range)*  thumbRange)
-
-			var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
-			var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
-
-
-			var adjustedY:Number = localY + (thumbH / 2);
-			var adjustedX:Number = thumbW/2;
-
-			return new Point(adjustedX,adjustedY);
-		}
-
-
-		private function  hSliderValueToPoint(value:Number):Point
-		{
-			// we are doing the reverse conversion od the pointToValue  in the VSlider
-			// we even consider the modiifcation done in the mouseDownHanlder for the track in the slider
-			var thumbRange:Number = slider.track.getLayoutBoundsWidth() - slider.thumb.getLayoutBoundsWidth();
-			var range:Number = slider.maximum - slider.minimum;
-			var localX:Number = ((value - slider.minimum)/ range)* thumbRange;
-
-
-			var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
-			var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
-
-
-			var adjustedX:Number = localX + (thumbW / 2);
-			var adjustedY:Number = thumbH/2;
-
-			return new Point(adjustedX,adjustedY);
-		}
-
-
-		//--------------------------------------------------------------------------
-		//
-		//  Event handlers
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  @private
-		 */
-		protected var keyDownHappened:Boolean = false;
-		private function scrollHandler(event:Event):void
-		{
-			if(!keyDownHappened)
-			{
-				// the event does not give the details of the value. So we need to provide this
-				// so that replay can happen accordingly
-				if(!(isNaN(slider.value)))
-				{
-					var valueChangeEvent:SparkValueChangeAutomationEvent =
-						new SparkValueChangeAutomationEvent(
-							SparkValueChangeAutomationEvent.CHANGE,false,false,slider.value);
-					recordAutomatableEvent(valueChangeEvent);
-				}
-			}
-			else
-			{
-				// let the keyboard event hanlder in the appropriate component take care of the recording
-				keyDownHappened = false;
-			}
-
-
-		}
-
-
-
-		override protected function keyDownHandler(event:KeyboardEvent) : void
-		{
-
-			// we need to inform that when keydown happens the change handler should not be
-			// called and instead we want to record it as the key operation
-			keyDownHappened = true;
-
-			if (event.keyCode == Keyboard.HOME ||
-				event.keyCode == Keyboard.END ||
-				event.keyCode == Keyboard.UP ||
-				event.keyCode == Keyboard.DOWN||
-				event.keyCode == Keyboard.LEFT||
-				event.keyCode == Keyboard.RIGHT)
-			{
-				recordAutomatableEvent(event);
-			}
-
-		}
-
-
-	}
+    import flash.display.DisplayObject;
+    import flash.events.Event;
+    import flash.events.IEventDispatcher;
+    import flash.events.KeyboardEvent;
+    import flash.events.MouseEvent;
+    import flash.geom.Point;
+    import flash.ui.Keyboard;
+    import flash.utils.getTimer;
+
+    import mx.automation.Automation;
+    import mx.automation.IAutomationObjectHelper;
+    import mx.core.mx_internal;
+
+    import spark.automation.events.SparkValueChangeAutomationEvent;
+    import spark.components.HSlider;
+    import spark.components.VSlider;
+    import spark.components.supportClasses.SliderBase;
+
+    use namespace mx_internal;
+
+    [Mixin]
+    /**
+     *
+     *  Defines methods and properties required to perform instrumentation for the
+     *  SliderBarBase class.
+     *
+     *  @see spark.components.supportClasses.SliderBarBase
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public class SparkSliderBaseAutomationImpl extends SparkTrackBaseAutomationImpl
+    {
+        include "../../../../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+
+        /**
+         *  Registers the delegate class for a component class with automation manager.
+         *
+         *  @param root The SystemManger of the application.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public static function init(root:DisplayObject):void
+        {
+            Automation.registerDelegateClass(spark.components.supportClasses.SliderBase, SparkSliderBaseAutomationImpl);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         * @param obj SliderBarBase object to be automated.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function SparkSliderBaseAutomationImpl(obj:spark.components.supportClasses.SliderBase)
+        {
+            super(obj);
+
+            obj.addEventListener(Event.CHANGE, scrollHandler, false, -1, true);
+        }
+
+        /**
+         *  @private
+         *  storage for the owner component
+         */
+        protected function get slider():spark.components.supportClasses.SliderBase
+        {
+            return uiComponent as spark.components.supportClasses.SliderBase;
+        }
+
+
+
+        //----------------------------------
+        //  automationValue
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        override public function get automationValue():Array
+        {
+            //return [ slider.value.toString() ];
+            return super.automationValue;
+        }
+
+        /**
+         *  @private
+         *  Replays ScrollEvents.
+         *  ScrollEvents are replayed by simply setting the
+         *  verticalScrollPosition or
+         *  horizontalScrollPosition properties of the instance.
+         */
+        override public function replayAutomatableEvent(interaction:Event):Boolean
+        {
+            if ( interaction is SparkValueChangeAutomationEvent)
+            {
+                var event:SparkValueChangeAutomationEvent = SparkValueChangeAutomationEvent(interaction);
+                var target:IEventDispatcher = null;
+                var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN);
+
+                var mousePoint:Point = new Point(0,0);
+
+                var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
+                var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
+
+                if(slider is  spark.components.HSlider)
+                    mousePoint = hSliderValueToPoint(event.value);
+
+                else if (slider is spark.components.VSlider)
+                    mousePoint = vSliderValueToPoint(event.value);
+
+                mouseEvent.localX = mousePoint.x;
+                mouseEvent.localY = mousePoint.y;
+                target = slider.track;
+                if (target)
+                {
+                    var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+                    help.replayClick(target, mouseEvent);
+                }
+
+                var completeTime:Number = getTimer() + slider.getStyle("slideDuration");
+
+                help.addSynchronization(function():Boolean
+                {
+                    return getTimer() >= completeTime;
+                });
+                return true;
+            }
+            else if (interaction is KeyboardEvent)
+            {
+                var help1:IAutomationObjectHelper = Automation.automationObjectHelper;
+                help1.replayKeyboardEvent(slider, interaction as KeyboardEvent);
+            }
+            else
+            {
+                return super.replayAutomatableEvent(interaction);
+            }
+
+            return true;
+        }
+
+        private function  vSliderValueToPoint(value:Number):Point
+        {
+            // we are doing the reverse conversion od the pointToValue  in the VSlider
+            // we even consider the modiifcation done in the mouseDownHanlder for the track in the slider
+            var thumbRange:Number = slider.track.getLayoutBoundsHeight() - slider.thumb.getLayoutBoundsHeight();
+            var range:Number = slider.maximum - slider.minimum;
+            var localY:Number = thumbRange - ( (Number(value -slider.minimum) /  range)*  thumbRange)
+
+            var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
+            var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
+
+
+            var adjustedY:Number = localY + (thumbH / 2);
+            var adjustedX:Number = thumbW/2;
+
+            return new Point(adjustedX,adjustedY);
+        }
+
+
+        private function  hSliderValueToPoint(value:Number):Point
+        {
+            // we are doing the reverse conversion od the pointToValue  in the VSlider
+            // we even consider the modiifcation done in the mouseDownHanlder for the track in the slider
+            var thumbRange:Number = slider.track.getLayoutBoundsWidth() - slider.thumb.getLayoutBoundsWidth();
+            var range:Number = slider.maximum - slider.minimum;
+            var localX:Number = ((value - slider.minimum)/ range)* thumbRange;
+
+
+            var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
+            var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
+
+
+            var adjustedX:Number = localX + (thumbW / 2);
+            var adjustedY:Number = thumbH/2;
+
+            return new Point(adjustedX,adjustedY);
+        }
+
+
+        //--------------------------------------------------------------------------
+        //
+        //  Event handlers
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        protected var keyDownHappened:Boolean = false;
+        private function scrollHandler(event:Event):void
+        {
+            if(!keyDownHappened)
+            {
+                // the event does not give the details of the value. So we need to provide this
+                // so that replay can happen accordingly
+                if(!(isNaN(slider.value)))
+                {
+                    var valueChangeEvent:SparkValueChangeAutomationEvent =
+                        new SparkValueChangeAutomationEvent(
+                            SparkValueChangeAutomationEvent.CHANGE,false,false,slider.value);
+                    recordAutomatableEvent(valueChangeEvent);
+                }
+            }
+            else
+            {
+                // let the keyboard event hanlder in the appropriate component take care of the recording
+                keyDownHappened = false;
+            }
+
+
+        }
+
+
+
+        override protected function keyDownHandler(event:KeyboardEvent) : void
+        {
+
+            // we need to inform that when keydown happens the change handler should not be
+            // called and instead we want to record it as the key operation
+            keyDownHappened = true;
+
+            if (event.keyCode == Keyboard.HOME ||
+                event.keyCode == Keyboard.END ||
+                event.keyCode == Keyboard.UP ||
+                event.keyCode == Keyboard.DOWN||
+                event.keyCode == Keyboard.LEFT||
+                event.keyCode == Keyboard.RIGHT)
+            {
+                recordAutomatableEvent(event);
+            }
+
+        }
+
+
+    }
 }


Working on serialization.

Working on serialization.

--- src/Modi/ManagedObject.as
+++ src/Modi/ManagedObject.as
@@ -251,7 +251,7 @@
 			}
 			else if (type == "ManagedObject")
 			{
-				serializator.pushObject(name);
+				serializator.pushObject(name, "ManagedObject"); /// ovdje netreba drugi parametar
 				if (object)
 				{
 					(object as ISerializableObject).serialize(serializator);


only show used unit types

only show used unit types

--- src/battlecode/client/viewer/render/DrawHUD.as
+++ src/battlecode/client/viewer/render/DrawHUD.as
@@ -161,9 +161,14 @@
             top = unitLabel.height + unitLabel.y + 5;
             var i:uint = 0;
             for each (var unitBox:DrawHUDUnit in unitBoxes) {
-                unitBox.x = (width - unitBox.width * 3) / 2 + (i % 3) * unitBox.width;
-                unitBox.y = ((unitBox.height + 10) * Math.floor(i / 3)) + top;
-                i++;
+                if (unitBox.getCount() > 0) {
+                    unitBox.x = (width - unitBox.width * 3) / 2 + (i % 3) * unitBox.width;
+                    unitBox.y = ((unitBox.height + 10) * Math.floor(i / 3)) + top;
+                    unitBox.visible = true;
+                    i++;
+                } else {
+                    unitBox.visible = false;
+                }
             }
         }