Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/olap/CubeNodeBuilder.as
+++ frameworks/projects/advancedgrids/src/mx/olap/CubeNodeBuilder.as
@@ -0,0 +1,713 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.olap
+{
+
+import flash.utils.Dictionary;
+
+import mx.collections.IList;
+
+/**
+* @private
+*/
+public class CubeNodeBuilder
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var prevNodeAtLevel:Array; // of CubeNodes
+    private var allNodeAtLevel:Array;  // of CubeNodes
+    private var prevValueAtLevel:Array;
+
+    // the level at which the new property is going to be placed
+    private var currentLevel:int;
+
+    private var prevLevel:int;
+    private var nextLevel:int;
+
+    //the nodes whose values are going to be aggregated as the above node
+    //value has changed.
+    private var closingNodesBelow:Array;
+    private var closingValues:Array;
+
+    //list of measures in the cube
+    private var measureMembers:IList;
+    private var measuresLength:int ;
+
+    /**
+    *  @private
+    *  Maps containing nodes which need to be passed to the aggrgator
+    *  to compute the final result. The measure object is used as a key.
+    *
+    */
+    // simple aggregation map
+    private var computeEndMap:Dictionary = new Dictionary(false);
+
+	//aggregation of aggregations map
+    private var computeObjEndMap:Dictionary = new Dictionary(false);
+
+	private var measureMap:Object = {};
+
+	/**
+	 *  @private
+	 *  An array of properites in the rootNode.
+	 *  This is used to aggregate each property asychronously
+	 *  to avoid player time out.
+	 *
+	 */
+	private var rootCellValues:Array;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    private var _cube:OLAPCube;
+
+    public function set cube(c:IOLAPCube):void
+    {
+        _cube = c as OLAPCube;
+    }
+
+    /**
+    * The top most node of the cube.
+    * All navigations begin from this node.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var rootNode:CubeNode;
+
+    /**
+    * The property name used to refer to the property
+    * pointing at the aggregation of nodes below a CubeNode
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var allNodePropertyName:String ="(All)";
+
+    /**
+    * Indicates the last level of data other than measures.
+    * This is used to read the measure values from the data item
+    * when processing reaches this level.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var levelPreviousToMeasuresIndex:int;
+
+	//total number of nodes in the cube. (used for perf improvement analysis)
+    //private var totalNodes:int;
+
+    //count of cubes collapsed (used for perf improvement analysis)
+    //private var nodesUpdated:int;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+    * Starts the process of building the cube by initializing
+    * the members.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public function initNodeBuilding():void
+    {
+        prevNodeAtLevel = [];
+        allNodeAtLevel = [];
+        prevValueAtLevel = [];
+
+        //compute for all the measures
+        measureMembers = _cube.findDimension("Measures").members;
+
+        measuresLength = measureMembers.length;
+        for each (var measure:OLAPMeasure in measureMembers)
+        {
+            computeEndMap[measure] = [];
+            computeObjEndMap[measure] = [];
+            measureMap[measure.name] = measure;
+        }
+    }
+
+	/**
+	 * Instructs the builder to start processing the next data item.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+    public function moveToNextRound():void
+    {
+        currentLevel = 0;
+        prevLevel = -1;
+        nextLevel = 1;
+    }
+
+    /**
+    * Finalizes building the cube by computing aggregations at all nodes.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public function completeNodeBuilding():Boolean
+    {
+    	if (prevNodeAtLevel && prevValueAtLevel)
+	    {
+	    	// close all nodes pending
+	        //TODO initializing rootNode twice
+	        rootNode = prevNodeAtLevel[0];
+	        closingNodesBelow = prevNodeAtLevel.reverse();
+	        closingValues = prevValueAtLevel.reverse();
+
+	        var tempLevel:int = closingNodesBelow.length - 1;
+	        var n:int = closingNodesBelow.length;
+	        for (var i:int = 0; i < n; ++i)
+	        {
+	            if (tempLevel < 1)
+	                continue;
+	            var closingValue:Object = closingValues[i];
+	            //OLAPTrace.traceMsg("Closing value:" + closingValues[i], //OLAPTrace.TRACE_LEVEL_2);
+	            var closingNode:Object = closingNodesBelow[i];
+	            if (closingNode[closingValue] is CubeNode)
+	            {
+	                if (closingNode[allNodePropertyName] is CubeNode)
+	                {
+	                	//if there are is only one property (other than (all) ) we short circuit
+	                	if (closingNode.numCells == 2)
+	                		closingNode[allNodePropertyName] = closingNode[closingValue];
+	                	else
+		                	accumValuesFromNode(closingNode[allNodePropertyName], closingNode[closingValue]);
+	                }
+	            }
+
+	            --tempLevel;
+	        }
+
+			prevNodeAtLevel = null;
+			prevValueAtLevel = null;
+			allNodeAtLevel = null;
+
+			rootCellValues = [];
+	        for (var rootCell:String in rootNode)
+    	    {
+        	    if (rootCell == allNodePropertyName)
+            	    continue;
+            	rootCellValues.push(rootCell);
+         	}
+         	return false;
+    	}
+
+        //aggregate the top node
+        while(rootCellValues.length)
+        {
+        	rootCell = rootCellValues.pop();
+            // can we accumulate everything from the tree to the all tree here?
+            accumValuesFromNode(rootNode[allNodePropertyName], rootNode[rootCell]);
+            return false;
+        }
+
+		//finalize all aggregation computation
+        var temp:Array;
+        var y:Object;
+		var measure:OLAPMeasure;
+		var aggregator:IOLAPCustomAggregator;
+        for (var x:Object in computeEndMap)
+        {
+			measure = x as OLAPMeasure;
+        	aggregator = measure.aggregator as IOLAPCustomAggregator;
+            temp = computeEndMap[x];
+            for each (y in temp)
+            {
+                y["saved_" + measure.name] = y[measure.name];
+                y[measure.name] = aggregator.computeEnd(y[measure.name], measure.dataField);
+            }
+			delete computeEndMap[x];
+        }
+
+        for (x in computeObjEndMap)
+        {
+			measure = x as OLAPMeasure;
+        	aggregator = measure.aggregator as IOLAPCustomAggregator;
+            temp = computeObjEndMap[x];
+            for each (y in temp)
+            {
+                y["saved_"+measure.name] = y[measure.name];
+                y[measure.name] = aggregator.computeObjectEnd(y[measure.name], measure.dataField);
+            }
+			delete computeObjEndMap[x];
+        }
+
+		computeEndMap = new Dictionary(false);
+		computeObjEndMap = new Dictionary(false);
+
+		//collapse CubeNodes which have only one property
+		//The aggregation property would point to the single property itself
+		optimizeCube();
+
+		return true;
+    }
+
+    /**
+    * Adds a new value to the cube. If the value is different from the previous value
+    * at the current level adds the new value as a property to the CubeNode and creates
+    * a new CubeNode below. Also creates a CubeNode for aggregating the properties in the
+    * new CubeNode.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public function addValueToNodeBuilder(values:Object, currentData:Object):void
+    {
+    	var i:int = 0;
+    	for each(var value:Object in values)
+        {
+	        // decide whether to create a new node or use the previous node
+	        var prevNode:CubeNode = prevNodeAtLevel[currentLevel];
+	        var prevValue:Object = prevValueAtLevel[currentLevel];
+	        var closingValue:Object;
+	        var closingNode:Object
+
+	        if (prevValue)
+	        {
+	            if (prevValue == value)
+	            {
+	                // continue to process the same value
+	                // update nodes
+	                //OLAPTrace.traceMsg("Continue with value:" + prevValue, OLAPTrace.TRACE_LEVEL_2);
+	            }
+	            else
+	            {
+	                // no more processing of this value.
+	                // time to compute update all nodes etc
+
+	                // close all nodes below this node
+	                closingNodesBelow = prevNodeAtLevel.splice(nextLevel).reverse();
+	                closingValues = prevValueAtLevel.splice(nextLevel).reverse();
+	                var tempLevel:int = currentLevel + closingNodesBelow.length;
+	                var closingNodeLength:int = closingNodesBelow.length;
+	                for (i= 0; i < closingNodeLength; ++i)
+	                {
+	                	if (tempLevel != 0)
+	                    {
+		                    closingValue = closingValues[i];
+	    	                //OLAPTrace.traceMsg("Closing value:" + closingValues[tempIndex], OLAPTrace.TRACE_LEVEL_2);
+	        	            closingNode = closingNodesBelow[i];
+	            	        if (closingNode[closingValue] is CubeNode)
+	                	    {
+	                        	if (closingNode[allNodePropertyName] is CubeNode)
+	                            {
+	                            	if (tempLevel > currentLevel && closingNode.numCells == 2)
+	                            		closingNode[allNodePropertyName] = closingNode[closingValue];
+	                            	else
+	                           	 		accumValuesFromNode(closingNode[allNodePropertyName], closingNode[closingValue]);
+	                            }
+	    	                }
+	    	           	}
+
+	                    --tempLevel;
+	                }
+
+	                //OLAPTrace.traceMsg("Closing value:" + prevValue, //OLAPTrace.TRACE_LEVEL_2);
+	                closingValue = prevValue;
+	                closingNode = prevNode;
+	                if (currentLevel != 0 && closingNode[closingValue] is CubeNode)
+	                {
+	                    if (closingNode[allNodePropertyName] is CubeNode)
+	                        accumValuesFromNode(closingNode[allNodePropertyName], closingNode[closingValue]);
+	                }
+
+	                //OLAPTrace.traceMsg("New value:" + value, //OLAPTrace.TRACE_LEVEL_2);
+	            }
+	        }
+
+
+	        if (!prevNode)
+	        {
+	            //OLAPTrace.traceMsg("Creating new node: " + value, //OLAPTrace.TRACE_LEVEL_2);
+	            // - create a new node, put the pointer to the ALL node, add new key to the ALL node
+	            var newNode:CubeNode = new CubeNode(currentLevel);
+
+	            // create a all node to summaries the cells of this node
+	            newNode[allNodePropertyName] = new CubeNode(currentLevel+1);
+	            ++newNode.numCells;
+
+	            //TODO initializing rootNode twice
+	            if (currentLevel == 0 && prevNodeAtLevel.length == 0)
+	                rootNode = newNode;
+
+	            prevNodeAtLevel[currentLevel] = newNode;
+
+		        var allNode:CubeNode = allNodeAtLevel[currentLevel];
+	            if (!allNode)
+	            {
+	                // for the top most level we would have only one node
+	                // which is also the all node
+	                // for other levels we have one node which is a all node
+	                // containing aggr value of all cells in the nodes at that level
+	                if (currentLevel > 0)
+	                {
+	                    allNodeAtLevel[currentLevel] = allNode = new CubeNode(currentLevel);
+	                    allNode[allNodePropertyName] = {};
+	                    allNodeAtLevel[prevLevel][allNodePropertyName] = allNode;
+	                    ++allNode.numCells;
+	                }
+	                else
+	                {
+	                    // special case of zero level
+	                    allNodeAtLevel[currentLevel] = newNode;
+	                }
+	            }
+
+	            prevNode = newNode;
+	        }
+	        else
+	        {
+	            // add a new cell/property to the previous node if it doesn't exist
+	            if (!prevNode.hasOwnProperty(value))
+	            {
+	                prevNodeAtLevel.splice(nextLevel);
+	                prevValueAtLevel.splice(nextLevel);
+	            }
+	        }
+
+	        // are we at the last level?
+	        // if so we take up measures computation
+	        if (currentLevel == levelPreviousToMeasuresIndex)
+	        {
+	            if (!prevNode.hasOwnProperty(value))
+	            {
+	            	prevNode[value] = new SummaryNode;
+	            	++prevNode.numCells;
+	            }
+	            var temp:Object;
+	            if (prevNode[allNodePropertyName] is CubeNode || prevNode[allNodePropertyName] is Number)
+	            {
+	            	temp = prevNode[allNodePropertyName] = new SummaryNode;
+	            }
+	            else
+	            {
+	                temp = prevNode[allNodePropertyName];
+	            }
+
+				for (i = 0; i < measuresLength; ++i)
+	            {
+					var measureMember:OLAPMember = measureMembers.getItemAt(i) as OLAPMember;
+	                var newDataValue:Object = currentData[measureMember.dataField];
+
+					//force convertion of measure value to a number.
+					//xml dataType runs into problems with value of 0
+					if (typeof(newDataValue) == "xml")
+						newDataValue = Number(newDataValue.toString());
+					newDataValue = Number(newDataValue);
+	                addValueToNode(prevNode[value], measureMember.name, newDataValue, measureMember as OLAPMeasure, currentData);
+	                addValueToNode(temp, measureMember.name, newDataValue, measureMember as OLAPMeasure, currentData);
+	            }
+	        }
+
+	        // make the node at previous level point to the node
+	        if (currentLevel > 0)
+	        {
+	            var prevLevelNode:Object = prevNodeAtLevel[prevLevel];
+	            if (!prevLevelNode.hasOwnProperty(prevValueAtLevel[prevLevel]))
+	            {
+	                var prevLevelValue:Object = prevValueAtLevel[prevLevel];
+	                prevLevelNode[prevLevelValue] = newNode;
+					++prevLevelNode.numCells;
+	            }
+	        }
+
+	        prevValueAtLevel[currentLevel] = value;
+	        ++prevLevel;
+	        ++currentLevel;
+	        ++nextLevel;
+	    }
+    }
+
+    /**
+     *  @private
+     */
+    private function optimizeCube():void
+    {
+    	var total:int =0;
+    	//totalNodes = 0;
+    	//nodesUpdated = 0;
+    	//start from root node and count the number of nodes which have only one cell.
+    	//skip the allValue because we are not updating the numCells there.
+    	if (rootNode)
+	    	total = findNodeWithOneCell(rootNode);
+    	//trace(nodesUpdated + "/" + total + "/" + totalNodes);
+    }
+
+    /**
+    *  @private
+    *  Recursively collapses CubeNodes
+    *
+    */
+    private function findNodeWithOneCell(node:CubeNode):int
+    {
+    	//++totalNodes;
+    	var total:int = 0;
+    	if (node.numCells == 2)
+    		++total;
+    	for (var p:String in node)
+    	{
+    		//if (x == allNodePropertyName)
+    		//	continue;
+    		if (node.numCells == 2)
+    		{
+    			if (node[allNodePropertyName] != node[p])
+    			{
+    				delete node[allNodePropertyName];
+	    			node[allNodePropertyName] = node[p];
+    				//++nodesUpdated;
+    			}
+    		}
+
+    		var cNode:CubeNode = node[p] as CubeNode;
+    		if (cNode)
+    		{
+    			total += findNodeWithOneCell(cNode);
+    		}
+    	}
+		return total;
+    }
+
+    /**
+    *  @private
+    *  Adds a measure value to the node.
+    *  Invokes aggregator functions to compute the value.
+    *
+    */
+    private function addValueToNode(node:Object, name:String,
+                        value:Object, measure:OLAPMeasure, rowData:Object):void
+    {
+    	var aggregator:IOLAPCustomAggregator;
+
+        //if the value is a number we need to compute the summary.
+        if (value is Number)
+        {
+        	aggregator = measure.aggregator as IOLAPCustomAggregator;
+            if (!node.hasOwnProperty(name))
+            {
+                node[name] = aggregator.computeBegin(measure.dataField);
+                computeEndMap[measure].push(node);
+                aggregator.computeLoop(node[name], measure.dataField, /*value,*/ rowData);
+            }
+            else
+            {
+                aggregator.computeLoop(node[name], measure.dataField, /*value,*/ rowData);
+            }
+        }
+        else
+        {
+            var temp:Object;
+            if (!node.hasOwnProperty(name))
+            {
+                node[name] = temp = new SummaryNode;
+                ++node.numCells;
+                for (var p:String in value)
+                {
+                    measure = measureMap[p];
+	            	aggregator = measure.aggregator as IOLAPCustomAggregator;
+                    if (temp.hasOwnProperty(p))
+                    {
+                        aggregator.computeObjectLoop(temp[p], value[p]);
+                    }
+                    else
+                    {
+                        temp[p] = aggregator.computeObjectBegin(value[p]);
+                        computeObjEndMap[measure].push(temp);
+                    }
+                }
+            }
+            else
+            {
+                if (value is SummaryNode && !(node[name] is SummaryNode))
+                {
+                	var incr:Boolean = false;
+                	if (!node.hasOwnProperty(name))
+	                	incr = true;
+                	temp = node[name] = new SummaryNode;
+                	if (incr)
+                		++node.numCells;
+                }
+                else
+                {
+                    temp = node[name];
+                }
+
+                for (p in value)
+                {
+                    measure = measureMap[p];
+	            	aggregator = measure.aggregator as IOLAPCustomAggregator;
+                    if (temp.hasOwnProperty(p))
+                    {
+                        aggregator.computeObjectLoop(temp[p], value[p]);
+                    }
+                    else
+                    {
+                        temp[p] = aggregator.computeObjectBegin(value[p]);
+                        computeObjEndMap[measure].push(temp);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+    *  @private
+    *  Aggregates all property values from source to target objects recursively.
+    *
+    */
+    private function accumValuesFromNode(target:Object,
+                                source:Object):void
+    {
+        for (var p:String in source)
+	    {
+	    	if (p == allNodePropertyName)
+	    	{
+				continue;
+	    	}
+            var value:Object = source[p];
+        	if (value is CubeNode)
+        	{
+                var newNode:CubeNode;
+                if (target[p] is CubeNode)
+                {
+                    newNode = target[p];
+                }
+                else
+                {
+                	target[p] = newNode = new CubeNode(value.level);
+                	++target.numCells;
+                }
+                accumValuesFromNode(newNode, value);
+            }
+            else
+            {
+            	addValueToNode(target, p, value, null, null);
+            }
+        }
+
+        if (target.numCells == 1)
+        {
+        	for (p in target)
+	        {
+	        	target[allNodePropertyName] = target[p];
+	        	break;
+	        }
+	        ++target.numCells;
+        }
+        else if (target.numCells == 2 && target.hasOwnProperty(allNodePropertyName))
+        {
+        	for (p in target)
+	        {
+	        	if (p == allNodePropertyName)
+	        		continue;
+	        	if (target[allNodePropertyName] != target[p])
+	        		target[allNodePropertyName] = target[p];
+	        	break;
+	        }
+        }
+        else
+        {
+        	var done:Boolean = false;
+        	var q:String;
+        	for (p in target)
+	        {
+	        	if (p == allNodePropertyName)
+	        		continue;
+	        	if (target[allNodePropertyName] == target[p])
+	        	{
+	        		value = target[p];
+	        		if (value is CubeNode)
+                	{
+                		target[allNodePropertyName] = newNode = new CubeNode(/*value.level*/);
+	        			accumValuesFromNode(newNode, value);
+						for (q in target)
+                		{
+                			if (q == allNodePropertyName ||
+                				q == p)
+                				continue;
+                			//now we have the other property.
+			            	accumValuesFromNode(newNode, source[q]);
+                		}
+                		done = true;
+                	}
+                	else
+                	{
+                		target[allNodePropertyName] = null;
+		            	addValueToNode(target, allNodePropertyName, value, null, null);
+						for (q in target)
+                		{
+                			if (q == allNodePropertyName ||
+                				q == p)
+                				continue;
+                			//now we have the other property.
+			            	addValueToNode(target, allNodePropertyName, target[q], null, null);
+                		}
+                		done = true;
+                	}
+	        		break;
+	        	}
+	        }
+
+	        if (!done)
+        	{
+	        	p = allNodePropertyName;
+	            value = source[p];
+	        	if (value is CubeNode)
+	        	{
+	                if (target[p] is CubeNode)
+	                    newNode = target[p];
+	                else
+	                {
+	                	target[p] = newNode = new CubeNode(value.level);
+	                	++target.numCells;
+	                }
+	                accumValuesFromNode(newNode, value);
+	            }
+	            else
+	            {
+	            	addValueToNode(target, p, value, null, null);
+	            }
+	        }
+        }
+    }
+
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5119
Author:   smgilson@adobe.com
Date:     2009-03-01T15:19:39.936226Z

Log Message:
-----------
Clean up some ASDoc tags from the addition of the @productversion/@playerversion tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/NCManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/Base64Encoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/StringValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IInteractiveObjectInterface.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/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ContainerRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/Schema.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/HexEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.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/core/IDisplayObjectInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SoundEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISpriteInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/HaloRectBorder.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@1269154 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/videoClasses/NCManager.as
+++ frameworks/projects/mx/src/mx/controls/videoClasses/NCManager.as
@@ -71,13 +71,13 @@
      *  List of connections tried by connectRTMP, in order tried.
      */
     private static var RTMP_CONN:Array =
-	[
+    [
         { protocol: "rtmp:/", port: "1935" },
-		{ protocol: "rtmp:/", port:"443" },
-		{ protocol: "rtmpt:/", port:"80" },
-		{ protocol: "rtmps:/", port:"443" }
+        { protocol: "rtmp:/", port:"443" },
+        { protocol: "rtmpt:/", port:"80" },
+        { protocol: "rtmps:/", port:"443" }
     ];
-
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -90,7 +90,7 @@
      */
     public function NCManager()
     {
-		super();
+        super();

         initNCInfo();
         initOtherInfo();
@@ -144,8 +144,8 @@
     /**
      *  @private
      */
-	private var protocol:String;
-
+    private var protocol:String;
+
     /**
      *  @private
      *  The host name portion of the URL.
@@ -161,8 +161,8 @@
     /**
      *  @private
      */
-	private var wrappedURL:String;
-
+    private var wrappedURL:String;
+
     /**
      *  @private
      */
@@ -210,8 +210,8 @@
     /**
      *  @private
      */
-	private var ncConnected:Boolean;
-
+    private var ncConnected:Boolean;
+
     /**
      *  @private
      *  Info on multiple connections we try.
@@ -230,12 +230,12 @@
      */
     private var connTypeCounter:uint;

-	/**
-	 *  @private
-	 *  Used for accessing localized Error messages.
-	 */
-	private var resourceManager:IResourceManager =
-									ResourceManager.getInstance();
+    /**
+     *  @private
+     *  Used for accessing localized Error messages.
+     */
+    private var resourceManager:IResourceManager =
+                                    ResourceManager.getInstance();

     //--------------------------------------------------------------------------
     //
@@ -253,7 +253,7 @@
      */
     private var _timeout:uint;

-    /*
+    /**
      *  @see INCManager#timeout
      *
      *  @langversion 3.0
@@ -262,12 +262,12 @@
      *  @productversion Flex 3
      */
     public function get timeout():uint
-	{
+    {
         return _timeout;
     }

     public function set timeout(t:uint):void
-	{
+    {
         _timeout = t;
         connectionTimer = new Timer(_timeout, 1);
         connectionTimer.addEventListener(TimerEvent.TIMER, onFCSConnectTimeOut);
@@ -295,7 +295,7 @@
      *  @productversion Flex 3
      */
     public function get bitrate():Number
-	{
+    {
         return _bitrate;
     }

@@ -311,7 +311,7 @@
      *  @productversion Flex 3
      */
     public function set bitrate(b:Number):void
-	{
+    {
         if (_isRTMP == 0)
             _bitrate = b;
     }
@@ -329,15 +329,15 @@
      *  @productversion Flex 3
      */
     public function get videoPlayer():VideoPlayer
-	{
+    {
         return owner;
     }

-	/**
-	 *  @private
-	 */
+    /**
+     *  @private
+     */
     public function set videoPlayer(value:VideoPlayer):void
-	{
+    {
         owner = value;
     }

@@ -359,7 +359,7 @@
      *  @productversion Flex 3
      */
     public function get netConnection():NetConnection
-	{
+    {
         return _netConnection;
     }

@@ -382,7 +382,7 @@
      *  @productversion Flex 3
      */
     public function get streamName():String
-	{
+    {
         return _streamName;
     }

@@ -405,7 +405,7 @@
      *  @productversion Flex 3
      */
     public function get streamLength():Number
-	{
+    {
         return _streamLength;
     }

@@ -428,7 +428,7 @@
      *  @productversion Flex 3
      */
     public function get streamWidth():Number
-	{
+    {
         return _streamWidth;
     }

@@ -451,7 +451,7 @@
      *  @productversion Flex 3
      */
     public function get streamHeight():Number
-	{
+    {
         return _streamHeight;
     }

@@ -499,68 +499,68 @@
         // connect to either rtmp or http or download and parse smil
         if (parseResults.isRTMP)
         {
-			var canReuseRTMP:Boolean = canReuseOldConnection(parseResults);
-			_isRTMP = 1;
-			protocol = parseResults.protocol;
-			_streamName = parseResults.streamName;
-			serverName = parseResults.serverName;
-			wrappedURL = parseResults.wrappedURL;
-			portNumber = parseResults.portNumber;
-			appName = parseResults.appName;
-			if ( !appName || appName == "" ||
-			     !_streamName || _streamName == "" )
-				throw new VideoError(VideoError.INVALID_CONTENT_PATH, url);
-			autoSenseBW = (_streamName.indexOf(",") >= 0);
-			return (canReuseRTMP || connectRTMP());
-        }
-		else
-		{
-			var canReuseHTTP:Boolean = canReuseOldConnection(parseResults);
-			_isRTMP = 0;
-			_streamName = parseResults.streamName;
-			return (canReuseHTTP || connectHTTP());
-		}
-    }
-
-	/**
-	 *  @see INCManager#connectAgain()
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function connectAgain():Boolean
-	{
-		var slashIndex:Number = appName.indexOf("/");
-		if (slashIndex < 0)
-		{
-			// return the appName and streamName back to original form
-			// so we can start this process all over again with the
-			// fallback server if necessary
-			slashIndex = _streamName.indexOf("/");
-			if (slashIndex >= 0)
-			{
-				appName += "/";
-				appName += _streamName.slice(0, slashIndex);
-				_streamName = _streamName.slice(slashIndex + 1);
-			}
-			return false;
-		}
-
-		var newStreamName:String = appName.slice(slashIndex + 1);
-		newStreamName += "/";
-		newStreamName += _streamName;
-		_streamName = newStreamName;
-		appName = appName.slice(0, slashIndex);
-		close();
-		payload = 0;
-		connTypeCounter = 0;
-		cleanConns();
-		connectRTMP();
-		return true;
-	}
-
+            var canReuseRTMP:Boolean = canReuseOldConnection(parseResults);
+            _isRTMP = 1;
+            protocol = parseResults.protocol;
+            _streamName = parseResults.streamName;
+            serverName = parseResults.serverName;
+            wrappedURL = parseResults.wrappedURL;
+            portNumber = parseResults.portNumber;
+            appName = parseResults.appName;
+            if ( !appName || appName == "" ||
+                 !_streamName || _streamName == "" )
+                throw new VideoError(VideoError.INVALID_CONTENT_PATH, url);
+            autoSenseBW = (_streamName.indexOf(",") >= 0);
+            return (canReuseRTMP || connectRTMP());
+        }
+        else
+        {
+            var canReuseHTTP:Boolean = canReuseOldConnection(parseResults);
+            _isRTMP = 0;
+            _streamName = parseResults.streamName;
+            return (canReuseHTTP || connectHTTP());
+        }
+    }
+
+    /**
+     *  @see INCManager#connectAgain()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function connectAgain():Boolean
+    {
+        var slashIndex:Number = appName.indexOf("/");
+        if (slashIndex < 0)
+        {
+            // return the appName and streamName back to original form
+            // so we can start this process all over again with the
+            // fallback server if necessary
+            slashIndex = _streamName.indexOf("/");
+            if (slashIndex >= 0)
+            {
+                appName += "/";
+                appName += _streamName.slice(0, slashIndex);
+                _streamName = _streamName.slice(slashIndex + 1);
+            }
+            return false;
+        }
+
+        var newStreamName:String = appName.slice(slashIndex + 1);
+        newStreamName += "/";
+        newStreamName += _streamName;
+        _streamName = newStreamName;
+        appName = appName.slice(0, slashIndex);
+        close();
+        payload = 0;
+        connTypeCounter = 0;
+        cleanConns();
+        connectRTMP();
+        return true;
+    }
+
     /**
      * INCManager#reconnect
      *
@@ -572,11 +572,11 @@
     public function reconnect():void
     {
         if (!_isRTMP)
-		{
-			var message:String = resourceManager.getString(
-				"controls", "invalidCall");
+        {
+            var message:String = resourceManager.getString(
+                "controls", "invalidCall");
             throw new Error(message);
-		}
+        }

         _netConnection.addEventListener(NetStatusEvent.NET_STATUS, reconnectOnStatus);
         _netConnection.client = new NCManagerReconnectClient(this);
@@ -676,132 +676,132 @@
     private function parseURL(url:String):Object
     {
         var parseResults:Object = {};
-
-		// get protocol
-		var startIndex:uint = 0;
-		var endIndex:int = url.indexOf(":/", startIndex);
-		if (endIndex >= 0)
-		{
-			endIndex += 2;
-			parseResults.protocol = url.slice(startIndex, endIndex);
-			parseResults.isRelative = false;
-		}
-		else
-			parseResults.isRelative = true;
-
-		if ( parseResults.protocol != null &&
-			     ( parseResults.protocol == "rtmp:/" ||
-			       parseResults.protocol == "rtmpt:/" ||
-			       parseResults.protocol == "rtmps:/" ||
-			       parseResults.protocol == "rtmpe:/" ||
-			       parseResults.protocol == "rmpte:/" ) )
-		{
-			parseResults.isRTMP = true;
-
-			startIndex = endIndex;
-
-			if (url.charAt(startIndex) == '/')
-			{
-				startIndex++;
-				// get server (and maybe port)
-				var colonIndex:Number = url.indexOf(":", startIndex);
-				var slashIndex:Number = url.indexOf("/", startIndex);
-				if (slashIndex < 0)
-				{
-					if (colonIndex < 0)
-						parseResults.serverName = url.slice(startIndex);
-					else
-					{
-						endIndex = colonIndex;
-						parseResults.portNumber = url.slice(startIndex, endIndex);
-						startIndex = endIndex + 1;
-						parseResults.serverName = url.slice(startIndex);
-					}
-					return parseResults;
-				}
-				if (colonIndex >= 0 && colonIndex < slashIndex)
-				{
-					endIndex = colonIndex;
-					parseResults.serverName = url.slice(startIndex, endIndex);
-					startIndex = endIndex + 1;
-					endIndex = slashIndex;
-					parseResults.portNumber = url.slice(startIndex, endIndex);
-				}
-				else
-				{
-					endIndex = slashIndex;
-					parseResults.serverName = url.slice(startIndex, endIndex);
-				}
-				startIndex = endIndex + 1;
-			}
-
-			// handle wrapped RTMP servers bit recursively, if it is there
-			if (url.charAt(startIndex) == '?')
-			{
-				var subURL:String = url.slice(startIndex + 1);
-				var subParseResults:Object = parseURL(subURL);
-				if (!subParseResults.protocol || !subParseResults.isRTMP)
-					throw new VideoError(VideoError.INVALID_CONTENT_PATH, url);
-				parseResults.wrappedURL = "?";
-				parseResults.wrappedURL += subParseResults.protocol;
-				if (subParseResults.serverName != null)
-				{
-					parseResults.wrappedURL += "/";
-					parseResults.wrappedURL +=  subParseResults.server;
-				}
-				if (subParseResults.wrappedURL != null)
-				{
-					parseResults.wrappedURL += "/?";
-					parseResults.wrappedURL +=  subParseResults.wrappedURL;
-				}
-				parseResults.appName = subParseResults.appName;
-				parseResults.streamName = subParseResults.streamName;
-				return parseResults;
-			}
-
-			// get application name
-			endIndex = url.indexOf("/", startIndex);
-			if (endIndex < 0)
-			{
-				parseResults.appName = url.slice(startIndex);
-				return parseResults;
-			}
-			parseResults.appName = url.slice(startIndex, endIndex);
-			startIndex = endIndex + 1;
-
-			// check for instance name to be added to application name
-			endIndex = url.indexOf("/", startIndex);
-			if (endIndex < 0)
-			{
-				parseResults.streamName = url.slice(startIndex);
-				// strip off .flv and .flv2 if included
-				if (parseResults.streamName.slice(-5).toLowerCase() == ".flv2")
-					parseResults.streamName = parseResults.streamName.slice(0, -5);
-				else if (parseResults.streamName.slice(-4).toLowerCase() == ".flv")
-					parseResults.streamName = parseResults.streamName.slice(0, -4);
-				return parseResults;
-			}
-			parseResults.appName += "/";
-			parseResults.appName += url.slice(startIndex, endIndex);
-			startIndex = endIndex + 1;
-
-			// get flv name
-			parseResults.streamName = url.slice(startIndex);
-			// strip off .flv and .flv2 if included
-			if (parseResults.streamName.slice(-5).toLowerCase() == ".flv2")
-				parseResults.streamName = parseResults.streamName.slice(0, -5);
-			else if (parseResults.streamName.slice(-4).toLowerCase() == ".flv")
-				parseResults.streamName = parseResults.streamName.slice(0, -4);
-
-		}
-		else
-		{
-			// is http, just return the full url received as streamName
-			parseResults.isRTMP = false;
-			parseResults.streamName = url;
-		}
-
-		return parseResults;
+
+        // get protocol
+        var startIndex:uint = 0;
+        var endIndex:int = url.indexOf(":/", startIndex);
+        if (endIndex >= 0)
+        {
+            endIndex += 2;
+            parseResults.protocol = url.slice(startIndex, endIndex);
+            parseResults.isRelative = false;
+        }
+        else
+            parseResults.isRelative = true;
+
+        if ( parseResults.protocol != null &&
+                 ( parseResults.protocol == "rtmp:/" ||
+                   parseResults.protocol == "rtmpt:/" ||
+                   parseResults.protocol == "rtmps:/" ||
+                   parseResults.protocol == "rtmpe:/" ||
+                   parseResults.protocol == "rmpte:/" ) )
+        {
+            parseResults.isRTMP = true;
+
+            startIndex = endIndex;
+
+            if (url.charAt(startIndex) == '/')
+            {
+                startIndex++;
+                // get server (and maybe port)
+                var colonIndex:Number = url.indexOf(":", startIndex);
+                var slashIndex:Number = url.indexOf("/", startIndex);
+                if (slashIndex < 0)
+                {
+                    if (colonIndex < 0)
+                        parseResults.serverName = url.slice(startIndex);
+                    else
+                    {
+                        endIndex = colonIndex;
+                        parseResults.portNumber = url.slice(startIndex, endIndex);
+                        startIndex = endIndex + 1;
+                        parseResults.serverName = url.slice(startIndex);
+                    }
+                    return parseResults;
+                }
+                if (colonIndex >= 0 && colonIndex < slashIndex)
+                {
+                    endIndex = colonIndex;
+                    parseResults.serverName = url.slice(startIndex, endIndex);
+                    startIndex = endIndex + 1;
+                    endIndex = slashIndex;
+                    parseResults.portNumber = url.slice(startIndex, endIndex);
+                }
+                else
+                {
+                    endIndex = slashIndex;
+                    parseResults.serverName = url.slice(startIndex, endIndex);
+                }
+                startIndex = endIndex + 1;
+            }
+
+            // handle wrapped RTMP servers bit recursively, if it is there
+            if (url.charAt(startIndex) == '?')
+            {
+                var subURL:String = url.slice(startIndex + 1);
+                var subParseResults:Object = parseURL(subURL);
+                if (!subParseResults.protocol || !subParseResults.isRTMP)
+                    throw new VideoError(VideoError.INVALID_CONTENT_PATH, url);
+                parseResults.wrappedURL = "?";
+                parseResults.wrappedURL += subParseResults.protocol;
+                if (subParseResults.serverName != null)
+                {
+                    parseResults.wrappedURL += "/";
+                    parseResults.wrappedURL +=  subParseResults.server;
+                }
+                if (subParseResults.wrappedURL != null)
+                {
+                    parseResults.wrappedURL += "/?";
+                    parseResults.wrappedURL +=  subParseResults.wrappedURL;
+                }
+                parseResults.appName = subParseResults.appName;
+                parseResults.streamName = subParseResults.streamName;
+                return parseResults;
+            }
+
+            // get application name
+            endIndex = url.indexOf("/", startIndex);
+            if (endIndex < 0)
+            {
+                parseResults.appName = url.slice(startIndex);
+                return parseResults;
+            }
+            parseResults.appName = url.slice(startIndex, endIndex);
+            startIndex = endIndex + 1;
+
+            // check for instance name to be added to application name
+            endIndex = url.indexOf("/", startIndex);
+            if (endIndex < 0)
+            {
+                parseResults.streamName = url.slice(startIndex);
+                // strip off .flv and .flv2 if included
+                if (parseResults.streamName.slice(-5).toLowerCase() == ".flv2")
+                    parseResults.streamName = parseResults.streamName.slice(0, -5);
+                else if (parseResults.streamName.slice(-4).toLowerCase() == ".flv")
+                    parseResults.streamName = parseResults.streamName.slice(0, -4);
+                return parseResults;
+            }
+            parseResults.appName += "/";
+            parseResults.appName += url.slice(startIndex, endIndex);
+            startIndex = endIndex + 1;
+
+            // get flv name
+            parseResults.streamName = url.slice(startIndex);
+            // strip off .flv and .flv2 if included
+            if (parseResults.streamName.slice(-5).toLowerCase() == ".flv2")
+                parseResults.streamName = parseResults.streamName.slice(0, -5);
+            else if (parseResults.streamName.slice(-4).toLowerCase() == ".flv")
+                parseResults.streamName = parseResults.streamName.slice(0, -4);
+
+        }
+        else
+        {
+            // is http, just return the full url received as streamName
+            parseResults.isRTMP = false;
+            parseResults.streamName = url;
+        }
+
+        return parseResults;
     }

     /**
@@ -864,29 +864,29 @@
     {
         tryNCTimer.reset();

-		var tempProtocol:String;
-		var port:String;
-		if (connTypeCounter == 0)
-		{
-			tempProtocol = protocol;
-			if (portNumber)
-				port = portNumber;
-			else
-				for (var i:Number = 0; i < RTMP_CONN.length; i++)
-					if (protocol == RTMP_CONN[i].protocol)
-					{
-						port = RTMP_CONN[i].port;
-						break;
-					}
-		}
-		else
-		{
-			tempProtocol = RTMP_CONN[connTypeCounter].protocol;
-			port = RTMP_CONN[connTypeCounter].port;
-		}
-		var connectionURL:String = tempProtocol + ((!serverName) ? "" :
-			"/" + serverName + ":" + port + "/") + ((!wrappedURL) ? "" :
-			wrappedURL + "/") + appName;
+        var tempProtocol:String;
+        var port:String;
+        if (connTypeCounter == 0)
+        {
+            tempProtocol = protocol;
+            if (portNumber)
+                port = portNumber;
+            else
+                for (var i:Number = 0; i < RTMP_CONN.length; i++)
+                    if (protocol == RTMP_CONN[i].protocol)
+                    {
+                        port = RTMP_CONN[i].port;
+                        break;
+                    }
+        }
+        else
+        {
+            tempProtocol = RTMP_CONN[connTypeCounter].protocol;
+            port = RTMP_CONN[connTypeCounter].port;
+        }
+        var connectionURL:String = tempProtocol + ((!serverName) ? "" :
+            "/" + serverName + ":" + port + "/") + ((!wrappedURL) ? "" :
+            wrappedURL + "/") + appName;

         tryNC[connTypeCounter].client.pending = true;
         tryNC[connTypeCounter].connect(connectionURL, autoSenseBW);
@@ -955,7 +955,7 @@
         }
         else
         {
-        	connTypeCounter = 0;
+            connTypeCounter = 0;
             cleanConns();
             serverName = fallbackServerName;
             connectRTMP();
@@ -975,8 +975,8 @@
      */
     public function onReconnected():void
     {
-    	_netConnection.removeEventListener(NetStatusEvent.NET_STATUS, connectOnStatus);
-    	ncConnected = true;
+        _netConnection.removeEventListener(NetStatusEvent.NET_STATUS, connectOnStatus);
+        ncConnected = true;
         owner.ncReconnected();
     }

@@ -1036,18 +1036,18 @@
                         break;
                     }
                 } // for
-		        // strip off .flv and .flv2 if included
-		        if (_streamName.slice(-5).toLowerCase() == ".flv2")
-		            _streamName = _streamName.slice(0, -5);
-		        else if (_streamName.slice(-4).toLowerCase() == ".flv")
-		            _streamName = _streamName.slice(0, -4);
+                // strip off .flv and .flv2 if included
+                if (_streamName.slice(-5).toLowerCase() == ".flv2")
+                    _streamName = _streamName.slice(0, -5);
+                else if (_streamName.slice(-4).toLowerCase() == ".flv")
+                    _streamName = _streamName.slice(0, -4);
             }
         }

         // if we need to get the stream length from the server, do it here
-		// Donot call getStreamLength when main.asc is not present
-		// since getStreamLength is defined in main.asc
+        // Donot call getStreamLength when main.asc is not present
+        // since getStreamLength is defined in main.asc
         if ((!owner.isLive && _streamLength == -1) && owner.autoBandWidthDetection)
         {
             var res:Responder = new Responder(getStreamLengthResult,
@@ -1065,26 +1065,26 @@
     public function connectOnStatus(event:NetStatusEvent):void
     {
         var stuff:Object;
-		var target:NetConnection = NetConnection(event.target);
+        var target:NetConnection = NetConnection(event.target);

         target.client.pending = false;

         if (event.info.code == "NetConnection.Connect.Success")
         {
             _netConnection = tryNC[target.client.connIndex];
-			// Force call to onConnected when main.asc is not present
-			// which would call this function through onBWDone
-			if (!owner.autoBandWidthDetection)
-				onConnected(_netConnection, 0);
+            // Force call to onConnected when main.asc is not present
+            // which would call this function through onBWDone
+            if (!owner.autoBandWidthDetection)
+                onConnected(_netConnection, 0);
             tryNC[target.client.connIndex] = null;
             cleanConns();
         }
         else if (((event.info.code == "NetConnection.Connect.Failed")
                     || (event.info.code == "NetConnection.Connect.Rejected"))
                     && (target.client.connIndex == (RTMP_CONN.length - 1)))
-			// Try rearranging the app URL, then the fallbackServer
-			if (!connectAgain())
-				tryFallBack();
+            // Try rearranging the app URL, then the fallbackServer
+            if (!connectAgain())
+                tryFallBack();
     }

     /**
@@ -1125,8 +1125,8 @@
      */
     private function getStreamLengthResult(length:Number):void
     {
-		if (length > 0)
-	        _streamLength = length;
+        if (length > 0)
+            _streamLength = length;
         owner.ncConnected();
     }

@@ -1153,7 +1153,7 @@
         _netConnection = null;
         ncConnected = false;
         if (!connectAgain())
-        	owner.ncConnected();
+            owner.ncConnected();
     }

     /**
@@ -1185,8 +1185,8 @@
         if (_isRTMP)
         {
             if (parseResults.serverName == serverName && parseResults.appName == appName &&
-			     parseResults.protocol == protocol && parseResults.portNumber == portNumber &&
-			     parseResults.wrappedURL == wrappedURL)
+                 parseResults.protocol == protocol && parseResults.portNumber == portNumber &&
+                 parseResults.wrappedURL == wrappedURL)
                 return true;
             // cannot reuse this rtmp--close
             owner.close();


Transferred from the Adobe Open Source Subversion Repository

Revision: 4205
Author:   clucier@adobe.com
Date:     2008-12-01T19:48:53.571431Z

Log Message:
-----------
Initial baselinePosition support for our new skinnable components.
QE Notes: Please wait until Evtim completes his baseline support in our new layouts to test.
Doc Notes: None
Reviewer: Glenn, Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.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/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8486
Author:   smgilson@adobe.com
Date:     2009-07-09T18:42:45.734868Z

Log Message:
-----------
Third checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/NumericStepper.as
+++ frameworks/projects/spark/src/spark/components/NumericStepper.as
@@ -82,7 +82,7 @@
  *
  *  @mxml
  *
- *
The <NumericStepper> tag inherits all of the tag
+ *
The <s:NumericStepper> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:

  *
  *


added 'mediaUrl' info on reprotError request

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -706,6 +706,9 @@
 						{
 							message += "| Initial flavor index: " + _mediaProxy.startingIndex;
 						}
+						if ( player.media && player.media.resource && player.media.resource is URLResource) {
+							message += "| mediaUrl: " + (player.media.resource as URLResource).url;
+						}

 						var sendError:StatsReportError = new StatsReportError(NotificationType.MEDIA_ERROR, message);
 						sendError.method = URLRequestMethod.POST;


F Null pointer exception in SceneIterator

--- src/aerys/minko/scene/SceneIterator.as
+++ src/aerys/minko/scene/SceneIterator.as
@@ -205,7 +205,8 @@
 		{
 			var selection : Vector.<ISceneNode> = _selection.slice();

-			typeName = typeName.toLowerCase();
+			if (typeName != null)
+				typeName = typeName.toLowerCase();

 			_selection.length = 0;
 			for each (var node : ISceneNode in selection)
@@ -220,7 +221,7 @@
 						var child 		: ISceneNode 	= group.getChildAt(i);
 						var childType 	: String 		= getQualifiedClassName(child).split('::')[1];

-						if (childType.toLowerCase() == typeName)
+						if (typeName == null || childType.toLowerCase() == typeName)
 							_selection.push(child);
 					}
 				}


remove unused file

remove unused file

--- src/org/mangui/HLS/utils/HexDump.as
+++ src/org/mangui/HLS/utils/HexDump.as
@@ -1,52 +0,0 @@
-package org.mangui.HLS.utils {
-    import flash.utils.ByteArray;
-
-    /**
-    * @author Bjrn Acker | www.bjoernacker.de
-    */
-    public class HexDump
-    {
-
-        public static function dump(buffer:ByteArray):String
-        {
-            var out:String; // = fillUp("Offset", 8, " ") + "  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F\n";
-            var offset:int = 0;
-            var l:int = buffer.length;
-            var row:String = "";
-            buffer.position = 0;
-            for (var i:int = 0; i < l; i += 15)
-            {
-                row += fillUp(offset.toString(16).toUpperCase(), 8, "0") + "  ";
-                var n:int = Math.min(16, buffer.length - buffer.position);
-                var string:String = "";
-                for (var j:int = 0; j < 16; ++j)
-                {
-                    if (j < n)
-                    {
-                        var value:int = buffer.readUnsignedByte();
-                        string += value >= 32 ? String.fromCharCode(value) : ".";
-                        row += fillUp(value.toString(16).toUpperCase(), 2, "0") + " ";
-                        offset++;
-                    }
-                    else
-                    {
-                        row += "   ";
-                        string += " ";
-                    }
-                }
-                //row += " " + string + "\n";
-            }
-            out += row;
-            return out;
-        }
-
-        private static function fillUp(value:String, count:int, fillWith:String):String
-        {
-            var l:int = count - value.length;
-            var ret:String = "";
-            while (--l > -1)
-            ret += fillWith;
-            return ret + value;
-        }
-    }
-}


ENT-253

--- src/org/jivesoftware/xiff/im/Roster.as
+++ src/org/jivesoftware/xiff/im/Roster.as
@@ -622,11 +622,12 @@
 			return _presenceMap[jid];
 		}

-		public function changePresence(show:String, status:String):void
+		public function changePresence(show:String, status:String, priority:Number):void
 		{
 			var presence:Presence = new Presence();
 			presence.type = Presence.AVAILABLE_TYPE;
 			presence.show = show;
+			presence.priority = priority;
 			presence.status = status;
 			connection.send(presence);
 			updateRosterItemPresence(me, presence);


- bugfix: RadioButtons now get removed from their group on removal from display list

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


Added players labels in server command ui.

--- bin/Data/AngelScript/Components/ServerCommandUi.as
+++ bin/Data/AngelScript/Components/ServerCommandUi.as
@@ -11,7 +11,9 @@
     protected Button @sendMessageButton_;
     protected Text @sendMessageButtonText_;
     protected LineEdit @messageEdit_;
-
+    protected Array <Text @> otherPlayersLabels_;
+
+    protected int PROPERTY_OTHER_PLAYERS_LABELS_POOL_SIZE = 40;
     protected int PROPERTY_KEY_SWITCH_INPUT_CHAT_MESSAGE = KEY_TAB;
     protected int PROPERTY_KEY_SEND_CHAT_MESSAGE = KEY_RETURN;

@@ -59,6 +61,15 @@
         sendMessageButtonText_.SetStyleAuto (styles_);
         sendMessageButtonText_.SetAlignment (HA_CENTER, VA_CENTER);

+        for (int index = 0; index < PROPERTY_OTHER_PLAYERS_LABELS_POOL_SIZE; index++)
+        {
+            Text @label = rootElement_.CreateChild ("Text", "other_player_label_" + index);
+            label.text = "...";
+            label.SetStyleAuto (styles_);
+            label.color = Color (0.3f, 0.8f, 0.3f);
+            otherPlayersLabels_.Push (label);
+        }
+
         SubscribeToEvent ("UIMouseClickEnd", "HandleUiMouseClickEnd");
         SubscribeToEvent ("NewChatMessage", "HandleNewChatMessage");
         SubscribeToEvent ("NewServerMessage", "HandleNewServerMessage");
@@ -73,6 +84,7 @@
             ResizeUi (lastScreenSize.x, lastScreenSize.y);
         }
         UpdateChat ();
+        UpdatePlayersLabels ();
         HandleKeyboard (timeStep);
     }

@@ -152,6 +164,79 @@
         }
     }

+    void UpdatePlayersLabels ()
+    {
+        Array <Node @> sceneNodes = scene.GetChildren (true);
+        Array <Node @> otherPlayersNodes;
+        Camera @camera = cameraNode_.GetComponent ("Camera");
+
+        for (int index = 0; index < sceneNodes.length; index++)
+        {
+            Node @processingNode = sceneNodes [index];
+            if (processingNode.id < FIRST_LOCAL_ID and
+                processingNode.id != node.id and
+                processingNode.vars ["ObjectType"].GetInt () ==
+                SerializationConstants__OBJECT_TYPE_PLAYER)
+                {
+                    Vector2 screenPoint = camera.WorldToScreenPoint (processingNode.worldPosition);
+                    if (screenPoint.x > 0.0f and screenPoint.x < 1.0f and
+                        screenPoint.y > 0.0f and screenPoint.y < 1.0f)
+                        otherPlayersNodes.Push (processingNode);
+                }
+        }
+
+        for (int index = 0; index < otherPlayersLabels_.length; index++)
+        {
+            Text @label = otherPlayersLabels_ [index];
+            if (index < otherPlayersNodes.length)
+            {
+                Node @otherPlayerNode = otherPlayersNodes [index];
+                String labelText =
+                    otherPlayerNode.vars [SerializationConstants__NAME_VAR_HASH].
+                        GetString () + "\n";
+
+                if (not otherPlayerNode.HasTag ("Died"))
+                {
+                    int otherPlayerLives = Floor (otherPlayerNode.vars
+                                                  [SerializationConstants__HEALTH_VAR_HASH].
+                                                  GetFloat ());
+                    int otherPlayerExp = otherPlayerNode.vars
+                                         [SerializationConstants__EXP_VAR_HASH].GetInt ();
+                    int OtherPlayerMaxLives = Floor (GameplayConstants__BASIC_MAX_HEALTH *
+                                              (1.0f + otherPlayerExp *
+                                              GameplayConstants__MAX_HEALTH_INCREASE_PER_EXP));
+
+                    labelText += otherPlayerLives + "/" + OtherPlayerMaxLives + " HP.\n" +
+                                 otherPlayerExp + " EXP.";
+                }
+                else
+                    labelText += "[Died]";
+
+                label.text = labelText;
+                label.visible = true;
+
+                float distance = (cameraNode_.position - otherPlayerNode.position).length;
+                Vector2 labelPosition =
+                    camera.WorldToScreenPoint (otherPlayerNode.position + Vector3 (0, 1.5f, 0));
+
+                if (distance > 7.0f)
+                {
+                    label.fontSize = Floor (graphics.height * 0.1f * 7.0f / distance);
+                    labelPosition.x -= Floor (0.08f * 7.0f / distance);
+                }
+                else
+                {
+                    label.fontSize = Floor (graphics.height * 0.1f);
+                    labelPosition.x -= Floor (0.08f * 7.0f);
+                }
+                label.SetPosition (graphics.width * labelPosition.x,
+                                   graphics.height * labelPosition.y);
+            }
+            else
+                label.visible = false;
+        }
+        }
+
     void HandleUiMouseClickEnd (StringHash eventType, VariantMap &eventData)
     {
         if (eventData ["Element"].GetPtr () is sendMessageButton_)


Fixed DownloadProgressBar REMOVE_FROME_STAGE event handler error.

--- src/net/manaca/preloaders/DownloadProgressBar.as
+++ src/net/manaca/preloaders/DownloadProgressBar.as
@@ -72,9 +72,10 @@
     protected function addedToStageHandler(event:Event):void
     {
         removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
-        addEventListener(Event.REMOVED_FROM_STAGE, addedToStageHandler);
+        addEventListener(Event.REMOVED_FROM_STAGE, removeFromStageHandler);
         stage.addEventListener(Event.RESIZE, resizeHandler);
         resizeHandler(null);
+
     }

     protected function removeFromStageHandler(event:Event):void


Fixed aspect ratio problems

Fixed aspect ratio problems

git-svn-id: 02605e11d3a461bc7e12f3f3880edf4b0c8dcfd0@4708 3e7533ad-8678-4d30-8e38-00a379d3f0d0

--- src/flash/display/ConstrainedSprite.as
+++ src/flash/display/ConstrainedSprite.as
@@ -1,6 +1,9 @@
 package flash.display {
+	import episodic.core.Playable;
+
 	import flash.events.Event;
 	import flash.geom.Rectangle;
+	import flash.media.Video;

 	public class ConstrainedSprite extends Sprite {

@@ -8,15 +11,15 @@
 		private var _height:Number;

 		public function ConstrainedSprite() {
-//			addEventListener(Event.ADDED, addedHandler);
+			addEventListener(Event.ADDED, addedHandler);
 		}

-//		private function addedHandler(event:Event):void {
-//			var child:DisplayObject = event.target as DisplayObject;
-//			if(child.parent == this) {
-//				drawChild(child);
-//			}
-//		}
+		private function addedHandler(event:Event):void {
+			var child:DisplayObject = event.target as DisplayObject;
+			if(child.parent == this) {
+				drawChild(child);
+			}
+		}

 		public function draw():void {
 			drawChildren();
@@ -43,8 +46,7 @@
 		}

 		private function shouldDrawChild(child:DisplayObject):Boolean {
-			return (
-					!isNaN(_width) &&
+			return (!isNaN(_width) &&
 					!isNaN(_height) &&
 					_width != 0 &&
 					_height != 0 &&
@@ -56,7 +58,27 @@
 			if(shouldDrawChild(child)) {
 				var rect:Rectangle;

-				rect = constrainedSize(child.width, child.height, _width, _height);
+				var childWidth:Number = child.width;
+				var childHeight:Number = child.height;
+
+				// NOTE: This is some ugliness that had to be done
+				// because the flash.display.Video object doesn't
+				// provide .videoWidth or .videoHeight until AFTER
+				// that asset has actually been on screen for an arbitrary
+				//  number of frames. SO  - the Stream object now
+				// collects those values from metaData and holds onto them
+				if(child.hasOwnProperty('stream')) {
+					var stream:Playable = child['stream'] as Playable;
+					if(stream.videoWidth > 0 && stream.videoHeight > 0) {
+						childWidth = stream.videoWidth;
+						childHeight = stream.videoHeight;
+					}
+					else {
+						return;
+					}
+				}
+
+				rect = constrainedSize(childWidth, childHeight, _width, _height);
 				child.width = rect.width;
 				child.height = rect.height;
 				child.x = Math.round((_width/2) - (child.width/2));
@@ -98,4 +120,4 @@
 			return new Rectangle(0, 0, w, h);
 		}
 	}
-}+}


Adding mobile framework implemented via an external file

--- Bin/Data/Scripts/18_CharacterDemo.as
+++ Bin/Data/Scripts/18_CharacterDemo.as
@@ -5,8 +5,10 @@
 //     - Manual control of a bone scene node
 //     - Implementing 1st and 3rd person cameras, using raycasts to avoid the 3rd person camera clipping into scenery
 //     - Saving and loading the variables of a script object
+//     - Using touch inputs/gyroscope for iOS/Android (implemented through an external file)

 #include "Scripts/Utilities/Sample.as"
+#include "Scripts/Utilities/Touch.as"

 const int CTRL_FORWARD = 1;
 const int CTRL_BACK = 2;
@@ -22,7 +24,7 @@
 const float INAIR_THRESHOLD_TIME = 0.1f;

 const float CAMERA_MIN_DIST = 1.0f;
-const float CAMERA_MAX_DIST = 5.0f;
+float CAMERA_MAX_DIST = 5.0f;

 Scene@ scene_;
 Node@ cameraNode;
@@ -42,6 +44,10 @@

     // Create the UI content
     CreateInstructions();
+
+    // Activate mobile stuff when appropriate
+    if (GetPlatform() == "Android" || GetPlatform() == "iOS")
+        InitTouchInput();

     // Subscribe to necessary events
     SubscribeToEvents();
@@ -198,6 +204,10 @@

     // Subscribe to PostUpdate event for updating the camera position after physics simulation
     SubscribeToEvent("PostUpdate", "HandlePostUpdate");
+
+    // Sbscribe to mobile touch events
+    if (GetPlatform() == "Android" || GetPlatform() == "iOS")
+        SubscribeToTouchEvents();
 }

 void HandleUpdate(StringHash eventType, VariantMap& eventData)
@@ -209,44 +219,52 @@
     if (character is null)
         return;

-    // Get movement controls and assign them to the character logic component. If UI has a focused element, clear controls
-    if (ui.focusElement is null)
-    {
-        character.controls.Set(CTRL_FORWARD, input.keyDown['W']);
-        character.controls.Set(CTRL_BACK, input.keyDown['S']);
-        character.controls.Set(CTRL_LEFT, input.keyDown['A']);
-        character.controls.Set(CTRL_RIGHT, input.keyDown['D']);
-        character.controls.Set(CTRL_JUMP, input.keyDown[KEY_SPACE]);
-
-        // Add character yaw & pitch from the mouse motion
-        character.controls.yaw += input.mouseMoveX * YAW_SENSITIVITY;
-        character.controls.pitch += input.mouseMoveY * YAW_SENSITIVITY;
-        // Limit pitch
-        character.controls.pitch = Clamp(character.controls.pitch, -80.0f, 80.0f);
-
-        // Switch between 1st and 3rd person
-        if (input.keyPress['F'])
-            firstPerson = !firstPerson;
-
-        // Check for loading / saving the scene
-        if (input.keyPress[KEY_F5])
-        {
-            File saveFile(fileSystem.programDir + "Data/Scenes/CharacterDemo.xml", FILE_WRITE);
-            scene_.SaveXML(saveFile);
+    character.controls.Set(CTRL_FORWARD | CTRL_BACK | CTRL_LEFT | CTRL_RIGHT | CTRL_JUMP, false); // clear previous controls
+
+    if (GetPlatform() == "Android" || GetPlatform() == "iOS")
+        updateTouches();
+
+    else  // On desktop, get movement controls and assign them to the character logic component
+    {
+
+        if (ui.focusElement is null)
+       {
+            character.controls.Set(CTRL_FORWARD, input.keyDown['W']);
+            character.controls.Set(CTRL_BACK, input.keyDown['S']);
+            character.controls.Set(CTRL_LEFT, input.keyDown['A']);
+            character.controls.Set(CTRL_RIGHT, input.keyDown['D']);
+            character.controls.Set(CTRL_JUMP, input.keyDown[KEY_SPACE]);
+
+            // Add character yaw & pitch from the mouse motion
+            character.controls.yaw += input.mouseMoveX * YAW_SENSITIVITY;
+            character.controls.pitch += input.mouseMoveY * YAW_SENSITIVITY;
+            // Limit pitch
+            character.controls.pitch = Clamp(character.controls.pitch, -80.0f, 80.0f);
+
+            // Switch between 1st and 3rd person
+            if (input.keyPress['F'])
+                firstPerson = !firstPerson;
+
+            // Check for loading / saving the scene
+            if (input.keyPress[KEY_F5])
+           {
+                File saveFile(fileSystem.programDir + "Data/Scenes/CharacterDemo.xml", FILE_WRITE);
+                scene_.SaveXML(saveFile);
+            }
+            if (input.keyPress[KEY_F7])
+           {
+                File loadFile(fileSystem.programDir + "Data/Scenes/CharacterDemo.xml", FILE_READ);
+                scene_.LoadXML(loadFile);
+                // After loading we have to reacquire the character scene node, as it has been recreated
+                // Simply find by name as there's only one of them
+                characterNode = scene_.GetChild("Jack", true);
+                if (characterNode is null)
+                    return;
+            }
         }
-        if (input.keyPress[KEY_F7])
-        {
-            File loadFile(fileSystem.programDir + "Data/Scenes/CharacterDemo.xml", FILE_READ);
-            scene_.LoadXML(loadFile);
-            // After loading we have to reacquire the character scene node, as it has been recreated
-            // Simply find by name as there's only one of them
-            characterNode = scene_.GetChild("Jack", true);
-            if (characterNode is null)
-                return;
-        }
-    }
-    else
-        character.controls.Set(CTRL_FORWARD | CTRL_BACK | CTRL_LEFT | CTRL_RIGHT | CTRL_JUMP, false);
+    }
+//    else
+//        character.controls.Set(CTRL_FORWARD | CTRL_BACK | CTRL_LEFT | CTRL_RIGHT | CTRL_JUMP, false);

     // Set rotation already here so that it's updated every rendering frame instead of every physics frame
     characterNode.rotation = Quaternion(character.controls.yaw, Vector3(0.0f, 1.0f, 0.0f));
@@ -284,10 +302,10 @@
     else
     {
         // Third person camera: position behind the character
-        Vector3 aimPoint = characterNode.position + rot * Vector3(0.0f, 1.7f, 0.0f);
+        Vector3 aimPoint = characterNode.position + rot * Vector3(0.0f, 1.7f, 0.0f); // You can modify x Vector3 value to translate the fixed character position (indicative range[-2;2])

         // Collide camera ray with static physics objects (layer bitmask 2) to ensure we see the character properly
-        Vector3 rayDir = dir * Vector3(0.0f, 0.0f, -1.0f);
+        Vector3 rayDir = dir * Vector3(0.0f, 0.0f, -1.0f); // For indoor scenes you can use dir * Vector3(0.0, 0.0, -0.5) to prevent camera from crossing the walls
         float rayDistance = CAMERA_MAX_DIST;
         PhysicsRaycastResult result = scene_.physicsWorld.RaycastSingle(Ray(aimPoint, rayDir), rayDistance, 2);
         if (result.body !is null)
@@ -421,4 +439,4 @@
         // Reset grounded flag for next frame
         onGround = false;
     }
-}+}


now using text column for generating labels

--- WeaveUISpark/src/weave/visualization/plotters/AxisLabelPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/AxisLabelPlotter.as
@@ -34,6 +34,7 @@
 	import weave.core.LinkableString;
 	import weave.data.AttributeColumns.DynamicColumn;
 	import weave.utils.BitmapText;
+	import weave.utils.ColumnUtils;
 	import weave.utils.LinkableTextFormat;

 	/**
@@ -75,7 +76,7 @@
 		public const maxWidth:LinkableNumber = registerLinkableChild(this, new LinkableNumber(80));
 		public const alignToDataMax:LinkableBoolean = registerLinkableChild(this, new LinkableBoolean(false));

-		public const labelFunction:LinkableFunction = registerLinkableChild(this, new LinkableFunction('string', true, false, ['number', 'string']));
+		public const labelFunction:LinkableFunction = registerLinkableChild(this, new LinkableFunction('string', true, false, ['number', 'string', 'column']));

 		/**
 		 * Draws the graphics onto BitmapData.
@@ -123,11 +124,11 @@

 		private function drawLabel(number:Number, dataBounds:IBounds2D, screenBounds:IBounds2D, destination:BitmapData):void
 		{
-			bitmapText.text = StandardLib.formatNumber(number);
+			bitmapText.text = ColumnUtils.deriveStringFromNumber(text, number) || StandardLib.formatNumber(number);
 			try
 			{
 				if (labelFunction.value)
-					bitmapText.text = labelFunction.apply(null, [number, bitmapText.text]);
+					bitmapText.text = labelFunction.apply(null, [number, bitmapText.text, text]);
 			}
 			catch (e:Error)
 			{


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

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

 package spark.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20742
Author:   smgilson@adobe.com
Date:     2011-03-09T21:46:11.224420Z

Log Message:
-----------
Merge 20732 - asdoc updates

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MovieClipSWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/SwitchSymbolFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/State.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/effects/effectClasses/UnconstrainItemActionInstance.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/MXFTETextInput.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ComboBox.as
+++ frameworks/projects/mx/src/mx/controls/ComboBox.as
@@ -1560,7 +1560,10 @@
      *
If the item has a label property, returns its value.

      *

      *
-     *  @param item The object that contains the value to convert to a label. If the item is null, this method returns the empty string.
+     *  @param item The object that contains the value to convert to a label.
+     *  If the item is null, this method returns the empty string.
+     *
+     *  @return A string representing the item parameter.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -1633,6 +1636,9 @@

     /**
      *  Hides the drop-down list.
+     *
+     *  @param trigger The event to dispatch when the
+     *  drop-down list closes.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -1745,8 +1751,8 @@
         if (!initialized || show == _showingDropdown)
             return;

-		if (inTween)
-			tween.endTween();
+        if (inTween)
+            tween.endTween();

         // Subclasses may extend to do pre-processing
         // before the dropdown is displayed


add debug logs to track StreamBuffer flushing related to #300

--- src/org/mangui/hls/stream/StreamBuffer.as
+++ src/org/mangui/hls/stream/StreamBuffer.as
@@ -268,6 +268,9 @@
             _reachedEnd = false;
             _playlistSlidingMain = _playlistSlidingAltAudio = 0;
             _nextExpectedAbsoluteStartPosMain = _nextExpectedAbsoluteStartPosAltAudio = -1;
+            CONFIG::LOGGING {
+                Log.debug("StreamBuffer flushed");
+            }
         }

         private function flushAudio() : void {


StreamBuffer : ensure header tags are sorted after appending

StreamBuffer requires sorted header tags.
this is not the case with all streams.
see below
INFO:append type/dts/pts:DISCONTINUITY/18650011/18650011
INFO:append type/dts/pts:METADATA/18650011/18650011
INFO:append type/dts/pts:AAC_HEADER/18650027/18650027
INFO:append type/dts/pts:AAC_RAW/18650027/18650027
INFO:append type/dts/pts:AVC_HEADER/18650011/18650011
in case header tags are not sorted, it could happen that AVC_HEADER will be located before a DISCONTINUITY tags; resulting in video decoder not being able to decode the video.
=> this bug was not highlighted before, as previously AVC_HEADER were repeated before each keyframe ... this is not the case anymore since https://github.com/mangui/flashls/commit/0e9f7f4eddb5d2085f72a1ffb0e14ffac3286766
related to https://github.com/mangui/flashls/issues/453
related to https://github.com/mangui/flashls/issues/454

--- src/org/mangui/hls/stream/StreamBuffer.as
+++ src/org/mangui/hls/stream/StreamBuffer.as
@@ -348,10 +348,8 @@
                 }
             }

-            if(_useAltAudio) {
-                if(headerAppended) {
-                    _headerTags = _headerTags.sort(compareTags);
-                }
+            if(headerAppended) {
+                _headerTags = _headerTags.sort(compareTags);
             }

             if(metaAppended) {


StreamBuffer: avoid exception in seekFilterTags() in case seek position is located before buffered tags

--- src/org/mangui/hls/stream/StreamBuffer.as
+++ src/org/mangui/hls/stream/StreamBuffer.as
@@ -520,7 +520,9 @@
                 var data : Vector.<FLVData> = shiftmultipletags(tagDuration);
                 if (!_seekPositionReached) {
                     data = seekFilterTags(data, _seekPositionRequested);
-                    _seekPositionReached = true;
+                    if(data.length) {
+                        _seekPositionReached = true;
+                    }
                 }

                 var tags : Vector.<FLVTag> = new Vector.<FLVTag>();
@@ -550,36 +552,50 @@
             var idx2Clone : Vector.<int> = new Vector.<int>();

             // loop through all tags and find index position of header tags located before start position
-            for (var i : int = 0; i < tags.length; i++) {
-                var data : FLVData = tags[i];
-                if (data.positionAbsolute <= absoluteStartPosition) {
-                    lastIdx = i;
-                    // current tag is before requested start position
-                    // grab AVC/AAC/DISCONTINUITY/METADATA/KEYFRAMES tag located just before
-                    switch(data.tag.type) {
-                        case FLVTag.DISCONTINUITY:
-                            disIdx = i;
-                            break;
-                        case FLVTag.METADATA:
-                            if(data.loaderType == HLSLoaderTypes.FRAGMENT_MAIN) {
-                                metIdxMain = i;
-                            } else {
-                                metIdxAltAudio = i;
-                            }
-                            break;
-                        case FLVTag.AAC_HEADER:
-                            aacIdx = i;
-                            break;
-                        case FLVTag.AVC_HEADER:
-                            avcIdx = i;
-                            break;
-                        case FLVTag.AVC_NALU:
-                            if (data.tag.keyframe) keyIdx = i;
-                        default:
-                            break;
-                    }
-                } else {
-                    break;
+            while(lastIdx ==-1) {
+                for (var i : int = 0; i < tags.length; i++) {
+                    var data : FLVData = tags[i];
+                    if (data.positionAbsolute <= absoluteStartPosition) {
+                        lastIdx = i;
+                        // current tag is before requested start position
+                        // grab AVC/AAC/DISCONTINUITY/METADATA/KEYFRAMES tag located just before
+                        switch(data.tag.type) {
+                            case FLVTag.DISCONTINUITY:
+                                disIdx = i;
+                                break;
+                            case FLVTag.METADATA:
+                                if(data.loaderType == HLSLoaderTypes.FRAGMENT_MAIN) {
+                                    metIdxMain = i;
+                                } else {
+                                    metIdxAltAudio = i;
+                                }
+                                break;
+                            case FLVTag.AAC_HEADER:
+                                aacIdx = i;
+                                break;
+                            case FLVTag.AVC_HEADER:
+                                avcIdx = i;
+                                break;
+                            case FLVTag.AVC_NALU:
+                                if (data.tag.keyframe) keyIdx = i;
+                            default:
+                                break;
+                        }
+                    } else {
+                        break;
+                    }
+                }
+                if(lastIdx == -1) {
+                    // all filtered tags are located after seek position ... tweak start position
+                    CONFIG::LOGGING {
+                        Log.warn("seekFilterTags: startPosition > first tag position:" + absoluteStartPosition.toFixed(3) + '/' + tags[0].positionAbsolute.toFixed(3));
+                    }
+                    if(absoluteStartPosition != tags[0].positionAbsolute) {
+                        absoluteStartPosition = tags[0].positionAbsolute;
+                    } else {
+                        // nothing found yet, let's return empty an array
+                        return filteredTags;
+                    }
                 }
             }


added queued parameter.

added queued parameter.

git-svn-id: 8a2ccb88241e16c78017770bc38d91d6d5396a5a@58631 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- generator/sources/as3/net/KalturaCall.as
+++ generator/sources/as3/net/KalturaCall.as
@@ -24,12 +24,22 @@

 		public var delegate : IKalturaCallDelegate;

+		/**
+		 * when the client is in queueing mode, determined whether the call is queued.
+		 */
+		public var queued:Boolean = true;
+
+
 		public function KalturaCall() {}

-		//OVERRIDE this function in case something needs to be initialized prior to execution
+		/**
+		 * OVERRIDE this function in case something needs to be initialized prior to execution
+		 * */
 		public function initialize():void {}

-		//OVERRIDE this function to make init the right delegate action
+		/**
+		 * OVERRIDE this function to make init the right delegate action
+		 * */
 		public function execute():void {}

 		public function setRequestArgument(name:String, value:Object):void {
@@ -51,7 +61,7 @@
 			dispatchEvent(new KalturaEvent(KalturaEvent.COMPLETE, false, false, true, result));
 		}
 		/**
-		 * dispatch an Error when a request has faild for any reasone
+		 * dispatch an Error when a request has faild for any reason
 		 * @param error
 		 *
 		 */