fixed Identify display bug

fixed Identify display bug

--- WeaveUI/src/weave/utils/Identify.as
+++ WeaveUI/src/weave/utils/Identify.as
@@ -23,6 +23,7 @@
 	import flash.events.Event;
 	import flash.events.MouseEvent;
 	import flash.geom.Point;
+	import flash.geom.Rectangle;

 	import mx.core.UIComponent;

@@ -102,13 +103,9 @@

 			function drawBorder(tip:UIComponent):void
 			{
-				var tipxy:Point = tip.globalToLocal(new Point(0, 0));
-				var targetxy:Point = target.globalToLocal(new Point(0, 0));
-				var offset:Point = targetxy.subtract(tipxy);
-				var g:Graphics = tip.graphics;
-
-				g.lineStyle(2, 0xFF0000, 0.5, true);
-				g.drawRect(-offset.x, -offset.y, target.width, target.height);
+				var r:Rectangle = target.getRect(tip);
+				tip.graphics.lineStyle(2, 0xFF0000, 0.5, true);
+				tip.graphics.drawRect(r.x, r.y, r.width, r.height);
 			}
 		}
 	}


[test] Dump the cloud file in one additional place

--- test/src/FRESteamWorksTest.as
+++ test/src/FRESteamWorksTest.as
@@ -63,6 +63,10 @@
 				log("getFileCount() == "+Steamworks.getFileCount() );
 				log("fileExists('test.txt') == "+Steamworks.fileExists('test.txt') );

+				if(Steamworks.fileExists('test.txt')) {
+					log("readFileFromCloud('test.txt') == "+readFileFromCloud('test.txt') );
+				}
+
 				//comment.. writing to app with id 480 is somehow not working, but works with our real appId
 				log("writeFileToCloud('test.txt','hello steam') == "+writeFileToCloud('test.txt','hello steam'));
 				log("readFileFromCloud('test.txt') == "+readFileFromCloud('test.txt') );
@@ -111,6 +115,7 @@
 			} else {
 				log("clearAchievement('ACH_WIN_ONE_GAME') == "+Steamworks.clearAchievement("ACH_WIN_ONE_GAME"));
 			}
+
 			if(Steamworks.fileExists('test.txt')){
 				log("readFileFromCloud('test.txt') == "+readFileFromCloud('test.txt') );
 				log("Steamworks.fileDelete('test.txt') == "+Steamworks.fileDelete('test.txt'));


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 19590
Author:   jasonsj@adobe.com
Date:     2011-01-04T23:44:20.039628Z

Log Message:
-----------
Minimal implementation of IVisualElemnt to support baselinePosition in StyleableTextField.

Updated ActionBar and LabelItemRenderer baselinePosition.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -16,7 +16,9 @@
 import flash.events.KeyboardEvent;
 import flash.events.TextEvent;
 import flash.geom.Matrix;
+import flash.geom.Matrix3D;
 import flash.geom.Point;
+import flash.geom.Vector3D;
 import flash.text.Font;
 import flash.text.TextField;
 import flash.text.TextFieldType;
@@ -24,9 +26,12 @@
 import flash.text.TextFormatAlign;
 import flash.ui.Keyboard;

+import mx.core.DesignLayer;
+import mx.core.IVisualElement;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
+import mx.geom.TransformOffsets;
 import mx.resources.ResourceManager;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.ISimpleStyleClient;
@@ -71,7 +76,7 @@
 //
 // Supported styles: textAlign, fontFamily, fontWeight, "colorName", fontSize, fontStyle,
 //                   textDecoration, textIndent, leading, letterSpacing
-
+
 /**
  *  The StyleableTextField class is a text primitive for use in ActionScript
  *  skins and item renderers. It cannot be used in MXML markup and is not
@@ -83,7 +88,7 @@
  *  @productversion Flex 4.5
  */
 public class StyleableTextField extends TextField
-    implements IEditableText, ISimpleStyleClient
+    implements IEditableText, ISimpleStyleClient, IVisualElement
 {

     //--------------------------------------------------------------------------
@@ -159,9 +164,9 @@

     public function get measuredTextSize():Point
     {
-		// commit style to get an accurate measurement
-		commitStyles();
-
+        // commit style to get an accurate measurement
+        commitStyles();
+
         if (!_measuredTextSize)
         {
             _measuredTextSize = new Point();
@@ -277,7 +282,13 @@
      */
     public function get styleName():Object /* UIComponent */
     {
-        return _styleName;
+        if (_styleName)
+            return _styleName;
+
+        if (parent is IStyleClient)
+            return parent;
+
+        return null;
     }

     /**
@@ -326,7 +337,7 @@
         // TextField's text property can't be set to null.
         if (!value)
             value = "";
-
+
         super.text = value;
         _isTruncated = false;
         invalidateTextSizeFlag = true;
@@ -334,7 +345,29 @@
         if (hasEventListener(FlexEvent.VALUE_COMMIT))
             dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
     }
-
+
+    //----------------------------------
+    //  $text
+    //----------------------------------
+
+    /**
+     *  @private
+     *  This property allows access to the Player's native implementation
+     *  of the 'text' property, which can be useful since components
+     *  can override 'text' and thereby hide the native implementation.
+     *  Note that this "base property" is final and cannot be overridden,
+     *  so you can count on it to reflect what is happening at the player level.
+     */
+    mx_internal final function get $text():String
+    {
+        return super.text;
+    }
+
+    mx_internal final function set $text(value:String):void
+    {
+        super.text = value;
+    }
+
     //----------------------------------
     //  isTruncated
     //----------------------------------
@@ -563,7 +596,7 @@
     //  IEditableText Methods
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  Scroll so the specified range is in view.
      *
@@ -653,7 +686,7 @@
     public function selectRange(anchorIndex:int, activeIndex:int):void
     {
         setSelection(Math.min(anchorIndex, activeIndex),
-                     Math.max(anchorIndex, activeIndex));
+            Math.max(anchorIndex, activeIndex));
     }

     /**
@@ -668,7 +701,7 @@
     {
         setSelection(0, length);
     }
-
+
     /**
      *  Set focus to this text field.
      *
@@ -680,9 +713,9 @@
     public function setFocus():void
     {
         stage.focus = this;
-
-		if (editable)
-			requestSoftKeyboard();
+
+        if (editable)
+            requestSoftKeyboard();
     }

     //--------------------------------------------------------------------------
@@ -741,7 +774,7 @@
             // ignore padding in the text...most components deal with it themselves
             //textFormat.leftMargin = getStyle("paddingLeft");
             //textFormat.rightMargin = getStyle("paddingRight");
-
+
             // Check for embedded fonts
             embedFonts = isFontEmbedded(textFormat);

@@ -759,10 +792,11 @@
             }

             invalidateStyleFlag = false;
-
-			// now that we've pushed the new styles in, our size might have
-			// changed
+
+            // now that we've pushed the new styles in, our size might have
+            // changed
             invalidateTextSizeFlag = true;
+            invalidateBaselinePosition = true;
         }
     }

@@ -831,9 +865,9 @@
             || styleProp == colorName)
         {
             invalidateStyleFlag = true;
-
-			// invalidateSizeFlag doesn't get set until commitStyles() when
-			// the new styles are actually pushed in and the textWidth/textHeight changes
+
+            // invalidateSizeFlag doesn't get set until commitStyles() when
+            // the new styles are actually pushed in and the textWidth/textHeight changes
         }
     }

@@ -884,6 +918,7 @@

             _isTruncated = true;
             invalidateTextSizeFlag = true;
+            invalidateBaselinePosition = true;

             // Make sure all text is visible
             scrollH = 0;
@@ -979,30 +1014,566 @@

     //--------------------------------------------------------------------------
     //
+    //  IVisualElement implementation
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    public function getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean=true):Number
+    {
+        return x;
+    }
+
+    /**
+     * @private
+     */
+    public function getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean=true):Number
+    {
+        return y;
+    }
+
+    /**
+     * @private
+     */
+    public function getLayoutBoundsHeight(postLayoutTransform:Boolean=true):Number
+    {
+        return height;
+    }
+
+    /**
+     * @private
+     */
+    public function getLayoutBoundsWidth(postLayoutTransform:Boolean=true):Number
+    {
+        return width;
+    }
+
+    /**
+     * @private
+     */
+    public function getLayoutBoundsX(postLayoutTransform:Boolean=true):Number
+    {
+        return x;
+    }
+
+    /**
+     * @private
+     */
+    public function getLayoutBoundsY(postLayoutTransform:Boolean=true):Number
+    {
+        return y;
+    }
+
+    /**
+     * @private
+     */
+    public function getLayoutMatrix():Matrix
+    {
+        return transform.matrix;
+    }
+
+    /**
+     * @private
+     */
+    public function getLayoutMatrix3D():Matrix3D
+    {
+        return transform.matrix3D;
+    }
+
+    /**
+     * @private
+     */
+    public function getMaxBoundsHeight(postLayoutTransform:Boolean=true):Number
+    {
+        return UIComponent.DEFAULT_MAX_WIDTH;
+    }
+
+    /**
+     * @private
+     */
+    public function getMaxBoundsWidth(postLayoutTransform:Boolean=true):Number
+    {
+        return UIComponent.DEFAULT_MAX_WIDTH;
+    }
+
+    /**
+     * @private
+     */
+    public function getMinBoundsHeight(postLayoutTransform:Boolean=true):Number
+    {
+        return 0;
+    }
+
+    /**
+     * @private
+     */
+    public function getMinBoundsWidth(postLayoutTransform:Boolean=true):Number
+    {
+        return 0;
+    }
+
+    /**
+     * @private
+     */
+    public function getPreferredBoundsHeight(postLayoutTransform:Boolean=true):Number
+    {
+        return measuredTextSize.y;
+    }
+
+    /**
+     * @private
+     */
+    public function getPreferredBoundsWidth(postLayoutTransform:Boolean=true):Number
+    {
+        return measuredTextSize.x;
+    }
+
+    /**
+     * @private
+     */
+    public function invalidateLayoutDirection():void
+    {
+        // do nothing
+    }
+
+    /**
+     * @private
+     */
+    public function setEstimatedSize(estimatedWidth:Number=NaN, estimatedHeight:Number=NaN, invalidateSize:Boolean=true):void
+    {
+        // TODO (jasonsj)
+    }
+
+    /**
+     * @private
+     */
+    public function setLayoutBoundsPosition(x:Number, y:Number, postLayoutTransform:Boolean=true):void
+    {
+        this.x = x;
+        this.y = y;
+    }
+
+    /**
+     * @private
+     */
+    public function setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean=true):void
+    {
+        this.width = width;
+        this.height = height;
+    }
+
+    /**
+     * @private
+     */
+    public function setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void
+    {
+        // do nothing
+    }
+
+    /**
+     * @private
+     */
+    public function setLayoutMatrix3D(value:Matrix3D, invalidateLayout:Boolean):void
+    {
+        // do nothing
+    }
+
+    /**
+     * @private
+     */
+    public function transformAround(transformCenter:Vector3D, scale:Vector3D=null, rotation:Vector3D=null, translation:Vector3D=null, postLayoutScale:Vector3D=null, postLayoutRotation:Vector3D=null, postLayoutTranslation:Vector3D=null, invalidateLayout:Boolean=true):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  layoutDirection
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get layoutDirection():String
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set layoutDirection(value:String):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  baseline
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get baseline():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set baseline(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get baselinePosition():Number
+    {
+        commitStyles();
+
+        if (invalidateBaselinePosition)
+        {
+            // getLineMetrics() returns strange numbers for an empty string,
+            // so instead we get the metrics for a non-empty string.
+            var isEmpty:Boolean = (text == "");
+            if (isEmpty)
+                super.text = "Wj";
+
+            _baselinePosition = getLineMetrics(0).ascent;
+
+            if (isEmpty)
+                super.text = "";
+
+            // baseline = add top gutter
+            _baselinePosition += (StyleableTextField.TEXT_HEIGHT_PADDING / 2)
+
+            invalidateBaselinePosition = false;
+        }
+
+        return _baselinePosition;
+    }
+
+    //----------------------------------
+    //  bottom
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get bottom():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set bottom(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  estimatedHeight
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get estimatedHeight():Number
+    {
+        return NaN;
+    }
+
+    //----------------------------------
+    //  estimatedWidth
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get estimatedWidth():Number
+    {
+        return NaN;
+    }
+
+    //----------------------------------
+    //  hasLayoutMatrix3D
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get hasLayoutMatrix3D():Boolean
+    {
+        return false;
+    }
+
+    //----------------------------------
+    //  horizontalCenter
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get horizontalCenter():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set horizontalCenter(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  includeInLayout
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get includeInLayout():Boolean
+    {
+        return true;
+    }
+
+    /**
+     * @private
+     */
+    public function set includeInLayout(value:Boolean):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  left
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get left():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set left(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  percentHeight
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get percentHeight():Number
+    {
+        return NaN;
+    }
+
+    /**
+     * @private
+     */
+    public function set percentHeight(value:Number):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  percentWidth
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get percentWidth():Number
+    {
+        return NaN;
+    }
+
+    /**
+     * @private
+     */
+    public function set percentWidth(value:Number):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  right
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get right():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set right(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  top
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get top():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set top(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  verticalCenter
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get verticalCenter():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set verticalCenter(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  depth
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get depth():Number
+    {
+        return 0;
+    }
+
+    /**
+     * @private
+     */
+    public function set depth(value:Number):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  designLayer
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get designLayer():DesignLayer
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set designLayer(value:DesignLayer):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  is3D
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get is3D():Boolean
+    {
+        return false;
+    }
+
+    //----------------------------------
+    //  owner
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get owner():DisplayObjectContainer
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set owner(value:DisplayObjectContainer):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  postLayoutTransformOffsets
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get postLayoutTransformOffsets():TransformOffsets
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set postLayoutTransformOffsets(value:TransformOffsets):void
+    {
+        // do nothing
+    }
+
+    //--------------------------------------------------------------------------
+    //
     //  Variables
     //
-    //--------------------------------------------------------------------------
-
-    // Name of the style to use for determining the text color
-    mx_internal var colorName:String = "color";
-
-    private static var supportedStyles:String = "textAlign fontFamily fontWeight fontStyle color fontSize textDecoration textIndent leading letterSpacing"
-
-    private var invalidateStyleFlag:Boolean = true;
-
-    private static var textFormat:TextFormat = new TextFormat();
-
-    private var _isTruncated:Boolean = false;
-
-    private static var embeddedFonts:Array;
-
-    /**
-     *  @private
-     *  Whether this StyleableTextField needs to be measure its unscaled size
-     */
-    private var invalidateTextSizeFlag:Boolean = false;
-
-    private var _measuredTextSize:Point;
+    //--------------------------------------------------------------------------

     /**
      *  @private
@@ -1015,6 +1586,40 @@
      */
     private var _inlineStyleObject:Object;

+    // Name of the style to use for determining the text color
+    mx_internal var colorName:String = "color";
+
+    private static var supportedStyles:String = "textAlign fontFamily fontWeight fontStyle color fontSize textDecoration textIndent leading letterSpacing"
+
+    private var invalidateStyleFlag:Boolean = true;
+
+    private static var textFormat:TextFormat = new TextFormat();
+
+    private var _isTruncated:Boolean = false;
+
+    private static var embeddedFonts:Array;
+
+    /**
+     *  @private
+     *  Whether this StyleableTextField needs to be measure its unscaled size
+     */
+    private var invalidateTextSizeFlag:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _measuredTextSize:Point;
+
+    /**
+     *  @private
+     */
+    private var invalidateBaselinePosition:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var _baselinePosition:Number;
+
     /**
      *  @private
      *  The padding to be added to textWidth to get the width


Fix error in TwoWay easing functions

Fix error in TwoWay easing functions

--- src/org/flintparticles/common/easing/TwoWay.as
+++ src/org/flintparticles/common/easing/TwoWay.as
@@ -30,8 +30,9 @@
 package org.flintparticles.common.easing
 {
 	/**
-	 * A set of easing equations for modifying the particle energy such that it starts
-	 * and ends at zero and peaks at one half way through the particle's lifetime.
+	 * A set of easing equations that start and end at the end value and reach the start value
+	 * at the half-time point. They are designed for modifying the particle energy such that it
+	 * starts and ends at zero and peaks at half way through the particle's lifetime.
 	 *
 	 * @see org.flintparticles.common.actions.Age
 	 */
@@ -44,9 +45,9 @@
 		{
 			if( ( t = 2 * t / d ) <= 1 )
 			{
-				return t * c + b;
+				return ( 1 - t ) * c + b;
 			}
-			return ( 2 - t ) * c + b;
+			return ( t - 1 ) * c + b;
 		}

 		/**
@@ -55,7 +56,7 @@
 		public static function circular( t : Number, b : Number, c : Number, d : Number ):Number
 		{
 			t = 1 - (2 * t / d);
-			return Math.sqrt( 1 - t * t ) * c + b;
+			return ( 1 - Math.sqrt( 1 - t * t ) ) * c + b;
 		}

 		/**
@@ -63,7 +64,7 @@
 		 */
 		public static function sine( t : Number, b : Number, c : Number, d : Number ):Number
 		{
-			return Math.sin( Math.PI * t / d ) * c + b;
+			return ( 1 - Math.sin( Math.PI * t / d ) ) * c + b;
 		}

 		/**
@@ -72,7 +73,7 @@
 		public static function quadratic( t : Number, b : Number, c : Number, d : Number ):Number
 		{
 			t = 1 - (2 * t / d);
-			return ( 1 - t * t ) * c + b;
+			return t * t * c + b;
 		}

 		/**
@@ -82,7 +83,7 @@
 		{
 			t = 1 - (2 * t / d);
 			if( t < 0 ) t = -t;
-			return ( 1 - t * t * t ) * c + b;
+			return t * t * t * c + b;
 		}

 		/**
@@ -91,7 +92,7 @@
 		public static function quartic( t : Number, b : Number, c : Number, d : Number ):Number
 		{
 			t = 1 - (2 * t / d);
-			return ( 1 - t * t * t * t ) * c + b;
+			return t * t * t * t * c + b;
 		}

 		/**
@@ -101,7 +102,7 @@
 		{
 			t = 1 - (2 * t / d);
 			if( t < 0 ) t = -t;
-			return ( 1 - t * t * t * t * t ) * c + b;
+			return t * t * t * t * t * c + b;
 		}
 	}
 }


Update GIFDecoder.as

Update GIFDecoder.as

removed dependency on mx.controls.Image for compatibility with the Flash IDE

--- AS3GifPlayer/src/com/worlize/gif/GIFDecoder.as
+++ AS3GifPlayer/src/com/worlize/gif/GIFDecoder.as
@@ -49,7 +49,7 @@
 	import flash.utils.ByteArray;
 	import flash.utils.Endian;

-	import mx.controls.Image;
+	//import mx.controls.Image;

 	[Event(name="asyncDecodeError",type="com.worlize.gif.events.AsyncDecodeErrorEvent")]
 	[Event(name="decodeComplete",type="com.worlize.gif.events.GIFDecoderEvent")]
@@ -481,4 +481,4 @@
 			cleanup();
 		}
 	}
-}+}


OFC-527 plot/gps reading and Cluster/vehicle location: when max distance error is confirmed, systems shows 2 warning

--- collect-flex/collect-flex-client/src/generated/flex/org/openforis/collect/model/proxy/ValidationResultsProxy.as
+++ collect-flex/collect-flex-client/src/generated/flex/org/openforis/collect/model/proxy/ValidationResultsProxy.as
@@ -8,6 +8,7 @@
 package org.openforis.collect.model.proxy {
 	import mx.collections.IList;

+	import org.openforis.collect.util.ArrayUtil;
 	import org.openforis.collect.util.CollectionUtil;
 	import org.openforis.idm.metamodel.validation.ValidationResultFlag;

@@ -20,20 +21,19 @@

 		public function get validationMessages():Array {
 			var results:IList = null;
-			var flag:ValidationResultFlag;
 			if(CollectionUtil.isNotEmpty(errors)) {
 				results = errors;
-				flag = ValidationResultFlag.ERROR;
 			} else if(CollectionUtil.isNotEmpty(warnings)) {
 				results = warnings;
-				flag = ValidationResultFlag.WARNING;
 			}
 			var messages:Array = null;
 			if(results != null) {
 				messages = new Array();
 				for each (var r:ValidationResultProxy in results) {
 					var message:String = r.getMessage();
-					messages.push(message);
+					if ( ! ArrayUtil.contains(messages, message) ) {
+						messages.push(message);
+					}
 				}
 			}
 			return messages;


frameRate attribute is not always present

--- exporter/src/main/as/flump/export/XflLoader.as
+++ exporter/src/main/as/flump/export/XflLoader.as
@@ -3,9 +3,12 @@

 package flump.export {

+import com.adobe.crypto.MD5;
+import com.threerings.util.F;
+import com.threerings.util.Log;
+import com.threerings.util.XmlUtil;
+
 import flash.filesystem.File;
-
-import com.adobe.crypto.MD5;

 import flump.bytesToXML;
 import flump.executor.Executor;
@@ -17,10 +20,6 @@
 import flump.xfl.XflLibrary;
 import flump.xfl.XflMovie;
 import flump.xfl.XflTexture;
-
-import com.threerings.util.F;
-import com.threerings.util.Log;
-import com.threerings.util.XmlUtil;

 public class XflLoader
 {
@@ -64,7 +63,7 @@
         loadDomFile.succeeded.add(function (domFile :File) :void {
             const xml :XML = bytesToXML(domFile.data);

-            _library.frameRate = XmlUtil.getNumberAttr(xml, "frameRate");
+            _library.frameRate = XmlUtil.getNumberAttr(xml, "frameRate", DEFAULT_FLASH_FRAMERATE);

             for each (var symbolXmlPath :XML in xml.symbols.Include) {
                 var libraryFile :File =
@@ -111,5 +110,7 @@
     protected var _library :XflLibrary;

     private static const log :Log = Log.getLog(XflLoader);
+
+    protected static const DEFAULT_FLASH_FRAMERATE :Number = 24;
 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6889
Author:   jimurphy@adobe.com
Date:     2009-05-13T17:26:30.489086Z

Log Message:
-----------
Merged beta1 revisions 6855,6865,6868,6870,6873,6888 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/kick-build.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -645,7 +645,7 @@
 		// gets created and we can measure it.
 		// It will have a width of 0 but a height equal
 		// to the font's ascent plus descent.
-        staticTextElement.text = text.length > 0 ? text : "\u2029";
+        staticTextElement.text = text != null && text.length > 0 ? text : "\u2029";
 		staticTextElement.elementFormat = elementFormat;
 		staticTextBlock.content = staticTextElement;


Transferred from the Adobe Open Source Subversion Repository

Revision: 18323
Author:   smgilson@adobe.com
Date:     2010-10-26T17:50:12.524532Z

Log Message:
-----------
Fix invalid HTML in ASDoc comments for the [DiscouragedForProfile] metadata tag

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Form.as</path>

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

--- frameworks/projects/spark/src/spark/components/Panel.as
+++ frameworks/projects/spark/src/spark/components/Panel.as
@@ -141,7 +141,7 @@
      * Because this component does not define a skin for the mobile theme, Adobe
      * recommends that you not use it in a mobile application. Alternatively, you
      * can define your own mobile skin for the component. For more information,
-     * see Spark Skinning.
+     * see Spark Skinning.
      */
     [DiscouragedForProfile("mobileDevice")]


Add a sendKeepAlive method that just sends whitespace

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

--- src/org/jivesoftware/xiff/core/XMPPConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPConnection.as
@@ -322,6 +322,13 @@
 			}
 		}

+		public function sendKeepAlive():void
+		{
+			if( isActive() ) {
+				sendXML(" ");
+			}
+		}
+
 		/**
 		 * Determines whether the connection with the server is currently active. (Not necessarily logged in.
 		 * For login status, use the isLoggedIn() method.)


Tweaked demux internals

Tweaked demux internals

--- src/Modules/Demux.as
+++ src/Modules/Demux.as
@@ -34,7 +34,7 @@
 		override protected function generateInternalLayout():InternalLayout {var nodes:Array = [];
 			var controlLines:Array = [];
 			for (var i:int = 0; i < inputs.length; i++) {
-				var loc:Point = new Point(layout.offset.x + layout.dim.x / 2, layout.ports[i].offset.y);
+				var loc:Point = new Point(layout.offset.x + layout.dim.x / 2 - 1, layout.ports[i].offset.y);
 				nodes.push(new WideNode(this, loc, [layout.ports[i], layout.ports[layout.ports.length - 1]], [],
 											inputs[i].getValue, "Input value "+i, true));
 				controlLines.push(new NodeTuple(layout.ports[layout.ports.length - 1], nodes[i], function (i:int):Boolean {


Adding a missing bit of info about the round API.

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

--- src/as/com/threerings/ezgame/EZGameControl.as
+++ src/as/com/threerings/ezgame/EZGameControl.as
@@ -451,7 +451,8 @@

     /**
      * Returns the current round number. Rounds start at 1 and increase if the game calls {@link
-     * #endRound} with a next round timeout.
+     * #endRound} with a next round timeout. Between rounds, it returns a negative number,
+     * corresponding to the negation of the round that just ended.
      */
     public function getRound () :int
     {


Out with the old.

Out with the old.

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

--- src/as/com/threerings/flash/VideoDisplayer.as
+++ src/as/com/threerings/flash/VideoDisplayer.as
@@ -1,310 +0,0 @@
-//
-// $Id$
-//
-// Nenya library - tools for developing networked games
-// Copyright (C) 2002-2007 Three Rings Design, Inc., All Rights Reserved
-// http://www.threerings.net/code/nenya/
-//
-// This library is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License as published
-// by the Free Software Foundation; either version 2.1 of the License, or
-// (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-package com.threerings.flash {
-
-import flash.display.Shape;
-import flash.display.Sprite;
-
-import flash.events.AsyncErrorEvent;
-import flash.events.IOErrorEvent;
-import flash.events.Event;
-import flash.events.MouseEvent;
-import flash.events.NetStatusEvent;
-import flash.events.SecurityErrorEvent;
-import flash.events.TimerEvent;
-
-import flash.media.Video;
-
-import flash.net.NetConnection;
-import flash.net.NetStream;
-
-import flash.utils.Timer;
-
-import com.threerings.util.ValueEvent;
-
-public class VideoDisplayer extends Sprite
-{
-    /** A value event dispatched when the size of the video is known.
-     * Value: [ width, height ]. */
-    public static const SIZE_KNOWN :String = "videoDisplayerSizeKnown";
-
-    /** A value event sent when there's an error loading the video.
-     * Value: original error event. */
-    public static const VIDEO_ERROR :String = "videoDisplayerError";
-
-    /**
-     * Create a video displayer.
-     */
-    public function VideoDisplayer ()
-    {
-        _vid = new Video();
-        addChild(_vid);
-
-        _mask = new Shape();
-        this.mask = _mask;
-        addChild(_mask);
-
-        addEventListener(MouseEvent.ROLL_OVER, handleRollOver);
-        addEventListener(MouseEvent.ROLL_OUT, handleRollOut);
-
-        _videoChecker.addEventListener(TimerEvent.TIMER, handleVideoCheck);
-
-        _pauser = new Sprite();
-        _pauser.addEventListener(MouseEvent.CLICK, handleClick);
-        redrawPauser();
-    }
-
-    /**
-     * Start playing a video!
-     */
-    public function setup (url :String) :void
-    {
-        _netCon = new NetConnection();
-        _netCon.addEventListener(NetStatusEvent.NET_STATUS, handleNetStatus);
-
-        // error handlers
-        _netCon.addEventListener(AsyncErrorEvent.ASYNC_ERROR, handleAsyncError);
-        _netCon.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
-        _netCon.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleSecurityError);
-
-        _netCon.connect(null);
-        _netStream = new NetStream(_netCon);
-        // pass in refs to some of our protected methods
-        _netStream.client = {
-            onMetaData: metaDataReceived
-        };
-        _netStream.addEventListener(NetStatusEvent.NET_STATUS, handleStreamNetStatus);
-
-        _vid.attachNetStream(_netStream);
-        _videoChecker.start();
-        _netStream.play(url);
-        _paused = false;
-    }
-
-    /**
-     * Stop playing our video.
-     */
-    public function shutdown () :void
-    {
-        _videoChecker.reset();
-        _vid.attachNetStream(null);
-
-        if (_netStream != null) {
-            _netStream.close();
-            _netStream.removeEventListener(NetStatusEvent.NET_STATUS, handleStreamNetStatus);
-            _netStream = null;
-        }
-        if (_netCon != null) {
-            _netCon.close();
-            _netCon.removeEventListener(NetStatusEvent.NET_STATUS, handleNetStatus);
-            _netCon.removeEventListener(AsyncErrorEvent.ASYNC_ERROR, handleAsyncError);
-            _netCon.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
-            _netCon.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, handleSecurityError);
-            _netCon = null;
-        }
-    }
-
-    /**
-     * Check to see if we now know the dimensions of the video.
-     */
-    protected function handleVideoCheck (event :TimerEvent) :void
-    {
-        if (_vid.videoWidth == 0 || _vid.videoHeight == 0) {
-            return; // not known yet!
-        }
-
-        // stop the checker timer
-        _videoChecker.stop();
-
-        // set up the width/height
-        _vid.width = _vid.videoWidth;
-        _vid.height = _vid.videoHeight;
-
-        // set up our mask to be the size of the video so that we're
-        // guaranteed to get the mouse clicks
-        with (_mask.graphics) {
-            clear();
-            beginFill(0xFFFFFF);
-            drawRect(0, 0, _vid.videoWidth, _vid.videoHeight);
-            endFill();
-        }
-
-        redrawPauser();
-
-        // tell any interested parties
-        dispatchEvent(new ValueEvent(SIZE_KNOWN, [ _vid.videoWidth, _vid.videoHeight ]));
-    }
-
-    protected function handleRollOver (event :MouseEvent) :void
-    {
-        addChild(_pauser);
-    }
-
-    protected function handleRollOut (event :MouseEvent) :void
-    {
-        if (_pauser.parent) {
-            removeChild(_pauser);
-        }
-    }
-
-    protected function handleClick (event :MouseEvent) :void
-    {
-        // the buck stops here!
-        event.stopImmediatePropagation();
-
-        if (_paused) {
-            _netStream.resume();
-            _paused = false;
-
-        } else {
-            _netStream.pause();
-            _paused = true;
-        }
-        redrawPauser();
-    }
-
-    /**
-     * Draw the pauser sprite, update it's location.
-     * This will become something artistic, etc.
-     */
-    protected function redrawPauser () :void
-    {
-        with (_pauser.graphics) {
-            clear();
-            // draw a nice circle
-            beginFill(0x333333);
-            drawCircle(0, 0, 20);
-            endFill();
-            lineStyle(2, 0);
-            drawCircle(0, 0, 20);
-
-            if (_paused) {
-                lineStyle(0, 0, 0);
-                beginFill(0x00FF00);
-                moveTo(-4, -10);
-                lineTo(4, 0);
-                lineTo(-4, 10);
-                lineTo(-4, -10);
-                endFill();
-
-            } else {
-                lineStyle(2, 0x00FF00);
-                moveTo(-4, -10);
-                lineTo(-4, 10);
-                moveTo(4, -10);
-                lineTo(4, 10);
-            }
-        }
-
-        // and update the location
-        _pauser.x = _vid.width/2;
-        _pauser.y = _vid.height/2;
-    }
-
-    protected function handleNetStatus (event :NetStatusEvent) :void
-    {
-        var info :Object = event.info;
-        if ("error" == info.level) {
-            trace("NetStatus error: " + info.code);
-            redispatchError(event);
-            return;
-        }
-        // else info.level == "status"
-        switch (info.code) {
-        case "NetConnection.Connect.Success":
-        case "NetConnection.Connect.Closed":
-            // these status events we ignore
-            break;
-
-        default:
-            trace("NetStatus status: " + info.code);
-            break;
-        }
-    }
-
-    protected function handleStreamNetStatus (event :NetStatusEvent) :void
-    {
-        if (event.info.code == "NetStream.Play.Stop") {
-            _netStream.seek(0);
-            _netStream.pause();
-            _paused = true;
-            redrawPauser();
-        }
-    }
-
-    protected function handleAsyncError (event :AsyncErrorEvent) :void
-    {
-        trace("AsyncError: " + event);
-        redispatchError(event);
-    }
-
-    protected function handleIOError (event :IOErrorEvent) :void
-    {
-        trace("IOError: " + event);
-        redispatchError(event);
-    }
-
-    protected function handleSecurityError (event :SecurityErrorEvent) :void
-    {
-        trace("SecurityError: " + event);
-        redispatchError(event);
-    }
-
-    /**
-     * Redispatch some error we received to our listeners.
-     */
-    protected function redispatchError (event :Event) :void
-    {
-        dispatchEvent(new ValueEvent(VIDEO_ERROR, event));
-    }
-
-    /**
-     * Called when metadata (if any) is found in the video stream.
-     */
-    protected function metaDataReceived (obj :Object) :void
-    {
-        trace("Got video metadata:");
-        for (var n :String in obj) {
-            trace("    " + n + ": " + obj[n]);
-        }
-    }
-
-    protected var _vid :Video;
-
-    /** Our mask, also defines our boundaries for clicking. */
-    protected var _mask :Shape;
-
-    protected var _paused :Boolean = false;
-
-    protected var _netCon :NetConnection;
-
-    protected var _netStream :NetStream;
-
-    protected var _pauser :Sprite;
-
-    /** Checks the video every 100ms to see if the dimensions are now know.
-     * Yes, this is how to do it. We could trigger on ENTER_FRAME, but then
-     * we may not know the dimensions unless we're added on the display list,
-     * and we want this to work in the general case. */
-    protected var _videoChecker :Timer = new Timer(100);
-}
-}


WeavePromise constructor resolver parameter is now optional

--- WeaveCore/src/weave/utils/WeavePromise.as
+++ WeaveCore/src/weave/utils/WeavePromise.as
@@ -36,9 +36,17 @@
 	 */
 	public class WeavePromise extends Promise
 	{
-		public function WeavePromise(relevantContext:Object, resolver:Function)
+		private static function _noop(..._):* { }
+
+		public function WeavePromise(relevantContext:Object, resolver:Function = null)
 		{
-			super(resolver);
+			super(resolver as Function || _noop);
+
+			if (resolver == null)
+			{
+				state_ = PromiseState.FULFILLED;
+				value_ = relevantContext;
+			}

 			this.rootPromise = relevantContext as WeavePromise || this;
 			this.relevantContext = relevantContext is WeavePromise ? rootPromise.relevantContext : relevantContext;


remove unused file

remove unused file

--- src/com/longtailvideo/HLS/streaming/Parser.as
+++ src/com/longtailvideo/HLS/streaming/Parser.as
@@ -1,11 +0,0 @@
-package com.longtailvideo.HLS.streaming {
-
-
-    /** Class that keeps the buffer filled. **/
-    public class Parser {
-
-
-    }
-
-
-}


optimize TransformController.updateLocalToWorld() to update only the nodes of the subtree when subtreeOnly = true

--- src/aerys/minko/scene/controller/TransformController.as
+++ src/aerys/minko/scene/controller/TransformController.as
@@ -9,6 +9,8 @@

     import flash.display.BitmapData;
     import flash.utils.Dictionary;
+
+    import mx.olap.aggregators.MaxAggregator;

     use namespace minko_math;

@@ -60,13 +62,14 @@
                 updateLocalToWorld();
         }

-        private function updateLocalToWorld(nodeId : uint = 0) : void
+        private function updateLocalToWorld(nodeId : uint = 0, subtreeOnly : Boolean = false) : void
         {
             var numNodes 			: uint 			= _transforms.length;
             var childrenOffset		: uint			= 1;
             var rootLocalToWorld	: Matrix4x4		= _localToWorldTransforms[nodeId];
             var rootTransform		: Matrix4x4		= _transforms[nodeId];
             var root				: ISceneNode	= _idToNode[childId];
+            var subtreeMax          : uint          = nodeId;

             if (rootTransform._hasChanged || _initialized[nodeId] == INIT_NONE)
             {
@@ -79,8 +82,11 @@
                 _initialized[nodeId] = INIT_LOCAL_TO_WORLD;
                 root.localToWorldTransformChanged.execute(root, rootLocalToWorld);
             }
-
-            for (; nodeId < numNodes; ++nodeId)
+
+            if (lastChildId > subtreeMax)
+                subtreeMax = lastChildId;
+
+            while (nodeId < numNodes)
             {
                 var localToWorld 	: Matrix4x4	= _localToWorldTransforms[nodeId];
                 var numChildren		: uint		= _numChildren[nodeId];
@@ -102,7 +108,7 @@
                         var child	: ISceneNode	= _idToNode[childId];

                         childLocalToWorld
-                        .copyFrom(childTransform)
+                            .copyFrom(childTransform)
                             .append(localToWorld);

                         childTransform._hasChanged = false;
@@ -110,6 +116,22 @@
                         child.localToWorldTransformChanged.execute(child, childLocalToWorld);
                     }
                 }
+
+                if (subtreeOnly && nodeId && nodeId >= subtreeMax)
+                {
+                    var parentId : uint = _parentId[nodeId];
+
+                    nodeId = _firstChildId[parentId];
+                    while (!_numChildren[nodeId] && nodeId < subtreeMax)
+                        ++nodeId;
+
+                    if (nodeId >= subtreeMax)
+                        return ;
+
+                    nodeId = _firstChildId[nodeId];
+                }
+                else
+                    ++nodeId;
             }
         }

@@ -119,15 +141,14 @@

             while (nodeId >= 0)
             {
-                if ((_transforms[nodeId] as Matrix4x4)._hasChanged ||
-                    !_initialized[nodeId])
+                if ((_transforms[nodeId] as Matrix4x4)._hasChanged || !_initialized[nodeId])
                     dirtyRoot = nodeId;

                 nodeId = _parentId[nodeId];
             }

             if (dirtyRoot >= 0)
-                updateLocalToWorld(dirtyRoot);
+                updateLocalToWorld(dirtyRoot, true);
         }

         private function targetAddedHandler(ctrl	: TransformController,


add TransformController.getSharedWorldToLocalTransformReference() and TransformController.getSharedLocalToWorldTransformReference() methods

--- src/aerys/minko/scene/controller/TransformController.as
+++ src/aerys/minko/scene/controller/TransformController.as
@@ -201,10 +201,65 @@
             }
         }

+        private function updateLocalToWorldPath(path : Vector.<uint> = null) : void
+        {
+            var numNodes 	    : uint 	    = path.length;
+            var nodeId          : uint      = path[uint(numNodes - 1)];
+            var localToWorld 	: Matrix4x4	= _localToWorldTransforms[nodeId];
+
+            updateRootLocalToWorld(nodeId);
+
+            for (var i : int = numNodes - 2; i >= 0; --i)
+            {
+                var childId             : uint          = path[i];
+                var childTransform		: Matrix4x4		= _transforms[childId];
+                var childLocalToWorld	: Matrix4x4		= _localToWorldTransforms[childId];
+                var childFlags          : uint          = _flags[childId];
+                var child	            : ISceneNode	= _idToNode[childId];
+
+                if (childFlags & FLAG_LOCK_TRANSFORMS)
+                    childLocalToWorld.lock();
+
+                childLocalToWorld
+                    .copyFrom(childTransform)
+                    .append(localToWorld);
+
+                if (childFlags & FLAG_LOCK_TRANSFORMS)
+                    childLocalToWorld.unlock();
+
+                childTransform._hasChanged = false;
+                childFlags = (childFlags | FLAG_INIT_LOCAL_TO_WORLD)
+                    & ~FLAG_INIT_WORLD_TO_LOCAL;
+
+                if (childFlags & FLAG_SYNCHRONIZE_TRANSFORMS)
+                {
+                    var childWorldToLocal : Matrix4x4 = _worldToLocalTransforms[childId]
+                        || (_worldToLocalTransforms[childId] = new Matrix4x4());
+
+                    if (childFlags & FLAG_LOCK_TRANSFORMS)
+                        childWorldToLocal.lock();
+
+                    childWorldToLocal.copyFrom(childLocalToWorld).invert();
+                    childFlags |= FLAG_INIT_WORLD_TO_LOCAL;
+
+                    if (childFlags & FLAG_LOCK_TRANSFORMS)
+                        childWorldToLocal.unlock();
+                }
+
+                _flags[childId] = childFlags;
+
+                child.localToWorldTransformChanged.execute(child, childLocalToWorld);
+
+                localToWorld = childLocalToWorld;
+            }
+        }
+
         private function updateAncestorsAndSelfLocalToWorld(nodeId : uint) : void
         {
-            var dirtyRoot : int = -1;
-            var tmpNodeId : int = nodeId;
+            var dirtyRoot   : int           = -1;
+            var tmpNodeId   : int           = nodeId;
+            var path        : Vector.<uint> = new <uint>[];
+            var numNodes    : uint          = 0;

             while (tmpNodeId >= 0)
             {
@@ -212,11 +267,15 @@
                     || !(_flags[nodeId] & FLAG_INIT_LOCAL_TO_WORLD))
                     dirtyRoot = tmpNodeId;

+                path[numNodes] = tmpNodeId;
+                ++numNodes;
+
                 tmpNodeId = _parentId[tmpNodeId];
             }

             if (dirtyRoot >= 0)
-                updateLocalToWorld(dirtyRoot, nodeId);
+                updateLocalToWorldPath(path);
+//                updateLocalToWorld(dirtyRoot, nodeId);
         }

         private function targetAddedHandler(ctrl	: TransformController,
@@ -429,6 +488,11 @@
             return worldToLocalTransform;
         }

+        public function getSharedLocalToWorldTransformReference(node    : ISceneNode) : Matrix4x4
+        {
+            return _localToWorldTransforms[getNodeId(node)];
+        }
+
         public function setSharedLocalToWorldTransformReference(node      : ISceneNode,
                                                                 matrix    : Matrix4x4) : void
         {
@@ -439,6 +503,14 @@
             _localToWorldTransforms[nodeId] = matrix;
         }

+        public function getSharedWorldToLocalTransformReference(node : ISceneNode) : Matrix4x4
+        {
+            var nodeId : uint = getNodeId(node);
+
+            return _worldToLocalTransforms[nodeId]
+                || (_worldToLocalTransforms[nodeId] = new Matrix4x4());
+        }
+
         public function setSharedWorldToLocalTransformReference(node      : ISceneNode,
                                                                 matrix    : Matrix4x4) : void
         {


This is referenced by MediaContainer, so it's compiled in,
but we don't actually use it anywhere in whirled.
Made it extra stupid simple: click to play/pause, with no
other controls.

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

--- src/as/com/threerings/flash/media/SimpleVideoDisplay.as
+++ src/as/com/threerings/flash/media/SimpleVideoDisplay.as
@@ -8,23 +8,14 @@
 import flash.display.Shape;
 import flash.display.Sprite;

-import flash.events.Event;
 import flash.events.MouseEvent;

 import flash.geom.Point;
-import flash.geom.Rectangle;

-import com.threerings.util.Log;
 import com.threerings.util.ValueEvent;

 /**
- *
- * @eventType com.threerings.flash.video.MediaPlayerCodes.SIZE
- */
-[Event(name="size", type="com.threerings.util.ValueEvent")]
-
-/**
- * A simple video display.
+ * An extremely simple video display. Click to pause/play.
  */
 public class SimpleVideoDisplay extends Sprite
 {
@@ -38,24 +29,13 @@
     public function SimpleVideoDisplay (player :VideoPlayer)
     {
         _player = player;
-        _player.addEventListener(MediaPlayerCodes.STATE, handlePlayerState);
         _player.addEventListener(MediaPlayerCodes.SIZE, handlePlayerSize);
-        _player.addEventListener(MediaPlayerCodes.DURATION, handlePlayerDuration);
-        _player.addEventListener(MediaPlayerCodes.POSITION, handlePlayerPosition);
-        _player.addEventListener(MediaPlayerCodes.ERROR, handlePlayerError);

         addChild(_player.getDisplay());

         var masker :Shape = new Shape();
         this.mask = masker;
         addChild(masker);
-
-        addEventListener(MouseEvent.ROLL_OVER, handleRollOver);
-        addEventListener(MouseEvent.ROLL_OUT, handleRollOut);
-
-        _hud = new Sprite();
-        _hud.addEventListener(MouseEvent.CLICK, handleClick);
-        redrawHUD();

         // create the mask...
         var g :Graphics = masker.graphics;
@@ -64,38 +44,7 @@
         g.drawRect(0, 0, NATIVE_WIDTH, NATIVE_HEIGHT);
         g.endFill();

-        // and update the HUD location (even if not currently showing)
-        _hud.x = NATIVE_WIDTH/2;
-        _hud.y = NATIVE_HEIGHT/2;
-
-        _track = new Sprite();
-        _track.x = PAD - _hud.x;
-        _track.y = NATIVE_HEIGHT - PAD - TRACK_HEIGHT - _hud.y;
-        g = _track.graphics;
-        g.beginFill(0x000000, .7);
-        g.drawRect(0, 0, TRACK_WIDTH, TRACK_HEIGHT);
-        g.endFill();
-        g.lineStyle(2, 0xFFFFFF);
-        g.drawRect(0, 0, TRACK_WIDTH, TRACK_HEIGHT);
-        // _track is not added to _hud until we know the duration
-
-        const trackMask :Shape = new Shape();
-        g = trackMask.graphics;
-        g.beginFill(0xFFFFFF);
-        g.drawRect(0, 0, TRACK_WIDTH, TRACK_HEIGHT);
-        _track.addChild(trackMask);
-        _track.mask = trackMask;
-
-        _knob = new Sprite();
-        _knob.y = TRACK_HEIGHT / 2;
-        g = _knob.graphics;
-        g.lineStyle(1, 0xFFFFFF);
-        g.beginFill(0x000099);
-        g.drawCircle(0, 0, TRACK_HEIGHT/2 - 1);
-        // _knob is not added to _track until we know the position
-
-        _track.addEventListener(MouseEvent.CLICK, handleTrackClick);
-        _knob.addEventListener(MouseEvent.MOUSE_DOWN, handleKnobDown);
+        addEventListener(MouseEvent.CLICK, handleClick);
     }

     override public function get width () :Number
@@ -116,16 +65,6 @@
         _player.unload();
     }

-    protected function handleRollOver (event :MouseEvent) :void
-    {
-        showHUD(true);
-    }
-
-    protected function handleRollOut (event :MouseEvent) :void
-    {
-        showHUD(false);
-    }
-
     protected function handleClick (event :MouseEvent) :void
     {
         // the buck stops here!
@@ -142,47 +81,9 @@
             break;

         default:
-            log.info("Click while player in unhandled state: " + _player.getState());
+            trace("Click while player in unhandled state: " + _player.getState());
             break;
         }
-    }
-
-    protected function handleTrackClick (event :MouseEvent) :void
-    {
-        event.stopImmediatePropagation();
-
-        adjustSeek(event.localX);
-    }
-
-    protected function handleKnobDown (event :MouseEvent) :void
-    {
-        event.stopImmediatePropagation();
-
-        _dragging = true;
-        _knob.startDrag(false, new Rectangle(0, TRACK_HEIGHT/2, TRACK_WIDTH, 0));
-        addEventListener(Event.ENTER_FRAME, handleKnobSeekCheck);
-        addEventListener(MouseEvent.MOUSE_UP, handleKnobUp);
-    }
-
-    protected function handleKnobUp (event :MouseEvent) :void
-    {
-        event.stopImmediatePropagation();
-
-        _dragging = false;
-        _knob.stopDrag();
-        removeEventListener(Event.ENTER_FRAME, handleKnobSeekCheck);
-        removeEventListener(MouseEvent.MOUSE_UP, handleKnobUp);
-        handleKnobSeekCheck(null);
-    }
-
-    protected function handleKnobSeekCheck (event :Event) :void
-    {
-        adjustSeek(_knob.x);
-    }
-
-    protected function handlePlayerState (event :ValueEvent) :void
-    {
-        redrawHUD();
     }

     protected function handlePlayerSize (event :ValueEvent) :void
@@ -200,123 +101,6 @@
         dispatchEvent(event);
     }

-    protected function handlePlayerDuration (event :ValueEvent) :void
-    {
-// TODO: temporarily disabled
-//        _hud.addChild(_track);
-    }
-
-    protected function handlePlayerPosition (event :ValueEvent) :void
-    {
-        if (_dragging) {
-            return;
-        }
-        _lastKnobX = int.MIN_VALUE;
-        const pos :Number = Number(event.value);
-        _knob.x = (pos / _player.getDuration()) * TRACK_WIDTH;
-        if (_knob.parent == null) {
-            _track.addChild(_knob);
-        }
-    }
-
-    protected function handlePlayerError (event :ValueEvent) :void
-    {
-        // TODO.. maybe just redispatch
-        log.warning("player error: " + event.value);
-    }
-
-    protected function adjustSeek (trackX :Number) :void
-    {
-        // see if we can seek to a position
-        const dur :Number = _player.getDuration();
-        if (isNaN(dur)) {
-            log.debug("Duration is NaN, not seeking.");
-            return;
-        }
-        if (trackX == _lastKnobX) {
-            return;
-        }
-        _lastKnobX = trackX;
-        var perc :Number = trackX / TRACK_WIDTH;
-        perc = Math.max(0, Math.min(1, perc));
-        log.debug("Seek", "x", trackX, "perc", perc, "pos", (perc * dur));
-        _player.seek(perc * dur);
-    }
-
-    protected function showHUD (show :Boolean) :void
-    {
-        if (show == (_hud.parent == null)) {
-            if (show) {
-                addChild(_hud);
-            } else {
-                removeChild(_hud);
-            }
-        }
-    }
-
-    protected function redrawHUD () :void
-    {
-        const state :int = _player.getState();
-
-        const g :Graphics = _hud.graphics;
-        g.clear();
-
-        if ((state != MediaPlayerCodes.STATE_READY) &&
-                (state != MediaPlayerCodes.STATE_PLAYING) &&
-                (state != MediaPlayerCodes.STATE_PAUSED)) {
-            // draw something loading-like
-            // TODO animated swf
-            g.beginFill(0x000033);
-            g.drawCircle(5, 5, 10);
-            g.drawCircle(-5, 5, 10);
-            g.drawCircle(-5, -5, 10);
-            g.drawCircle(5, -5, 10);
-            g.endFill();
-            return;
-        }
-
-        // draw a nice circle
-        g.beginFill(0x000000, .7);
-        g.drawCircle(0, 0, 20);
-        g.endFill();
-        g.lineStyle(2, 0xFFFFFF);
-        g.drawCircle(0, 0, 20);
-
-        if (state == MediaPlayerCodes.STATE_PLAYING) {
-            g.lineStyle(2, 0x00FF00);
-            g.moveTo(-4, -10);
-            g.lineTo(-4, 10);
-            g.moveTo(4, -10);
-            g.lineTo(4, 10);
-
-        } else { // READY or PAUSED
-            g.lineStyle(0, 0, 0);
-            g.beginFill(0x00FF00);
-            g.moveTo(-4, -10);
-            g.lineTo(4, 0);
-            g.lineTo(-4, 10);
-            g.lineTo(-4, -10);
-            g.endFill();
-        }
-    }
-
-    protected const log :Log = Log.getLog(this);
-
     protected var _player :VideoPlayer;
-
-    protected var _hud :Sprite;
-
-    protected var _track :Sprite;
-
-    /** The seek selector knob, positioned on the hud. */
-    protected var _knob :Sprite;
-
-    protected var _lastKnobX :int = int.MIN_VALUE;
-
-    protected var _dragging :Boolean;
-
-    protected static const PAD :int = 10;
-    protected static const TRACK_HEIGHT :int = 20;
-    protected static const TRACK_WIDTH :int = NATIVE_WIDTH - (PAD * 2);
 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.graphics
 {


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

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

 package mx.resources
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6394
Author:   clucier@adobe.com
Date:     2009-04-29T20:33:19.402572Z

Log Message:
-----------
Fixing issue found by dev. Property overrides were caching their target, so if the target ever changed, and the override was applied again, it was not updating the appropriate (new) target.

Reviewer: Glenn
QE Notes: None
Bugs: None

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetEventHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetProperty.as</path>

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

--- frameworks/projects/framework/src/mx/states/SetEventHandler.as
+++ frameworks/projects/framework/src/mx/states/SetEventHandler.as
@@ -186,6 +186,17 @@
      */
     public var target:Object;

+    /**
+     *  The cached target for which we applied our override.
+     *  We keep track of the applied target while applied since
+     *  our target may be swapped out in the owning document and
+     *  we want to make sure we roll back the correct (original)
+     *  element.
+     *
+     *  @private
+     */
+    private var appliedTarget:Object;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods: EventDispatcher
@@ -241,7 +252,7 @@
         var obj:* = getOverrideContext(target, parent);
         if (obj != null)
         {
-        	target = obj;
+        	appliedTarget = obj;
 	        var uiObj:UIComponent = obj as UIComponent;

 	        if (!installedHandlers)
@@ -289,7 +300,7 @@
      */
     public function remove(parent:UIComponent):void
     {
-        var obj:* = getOverrideContext(target, parent);
+        var obj:* = getOverrideContext(appliedTarget, parent);
         if (obj != null)
         {
 	        if (handlerFunction != null)
@@ -319,6 +330,7 @@
 	                delete installedHandlers[obj];
 	        }
         }
+        appliedTarget = null;
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3640
Author:   pfarland@adobe.com
Date:     2008-10-15T00:52:58.065947Z

Log Message:
-----------
Changing to a stable sort algorithm so that equivalent selector order is preserved. Also fixing a cut and paste error for CSS style modules in the StyleModule.vm velocity template to match what Flex 3 behavior did but accommodating multiple style declarations per "StyleDef" instance in the compiler.

QE: Yes
Doc: No
Checkintests: Pass
Reviewer: Ryan

SDK-17329 - [Advanced CSS] Type selectors no longer work when using runtime CSS
SDK-17330 - [Advanced CSS] When you apply a messageName style to an Alert, the Alert loses its rounded corners.
SDK-17325 - [Advanced CSS] When a styleName is applied to a TitleWindow, it is applied to the entire container rather than just the content area.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
+++ frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
@@ -312,8 +312,8 @@
             // selectors and resort by specificity...
             if (styleDeclarations.length > 0)
             {
-                styleDeclarations = styleDeclarations.concat(advancedObject.getClassStyleDeclarations());
-                styleDeclarations = styleDeclarations.sortOn("specificity", Array.NUMERIC);
+                styleDeclarations = advancedObject.getClassStyleDeclarations().concat(styleDeclarations);
+                styleDeclarations = sortOnSpecificity(styleDeclarations);
             }
             else
             {
@@ -810,14 +810,16 @@
         }

         // Then sort by specificity...
-        // TODO: Check that for equal entries the last one added remains
-        // last (as "the last should win")...
-        if (matchingDecls.length > 0)
-            matchingDecls.sortOn("specificity", Array.NUMERIC);
+        matchingDecls = sortOnSpecificity(matchingDecls);

         return matchingDecls;
     }

+    /**
+     *  @private
+     *  TODO: Replace this key generation as this is reasonably expensive in
+     *  terms of string creation.
+     */
     private static function getAdvancedCacheKey(className:String, object:IAdvancedStyleClient):String
     {
         var cacheKey:String = className;
@@ -836,6 +838,44 @@

         return cacheKey;
     }
+
+    /**
+     *  @private
+     *  Sort algorithm to order style declarations by specificity. Note that
+     *  Array.sort() is not used as it does not employ a stable algorithm and
+     *  CSS requires the order of equal style declaration to be preserved.
+     */
+    private static function sortOnSpecificity(decls:Array):Array
+    {
+        // TODO: Copied algorithm from Group.sortOnLayer as a temporary measure.
+        // We may consider replacing this insertion sort with an efficient but
+        // stable merge sort or the like if many style declarations need to
+        // sorted.
+        var len:Number = decls.length;
+        var tmp:CSSStyleDeclaration;
+
+        if (len <= 1)
+            return decls;
+
+        for (var i:int = 1; i < len; i++)
+        {
+            for (var j:int = i; j > 0; j--)
+            {
+                if (decls[j].specificity < decls[j-1].specificity)
+                {
+                    tmp = decls[j];
+                    decls[j] = decls[j-1];
+                    decls[j-1] = tmp;
+                }
+                else
+                {
+                    break;
+                }
+            }
+        }
+
+        return decls;
+    }
 }

 }


fwr: add error code (event.type) to ioerror / securityerror events

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

--- generator/sources/as3/com/kaltura/delegates/WebDelegateBase.as
+++ generator/sources/as3/com/kaltura/delegates/WebDelegateBase.as
@@ -293,7 +293,7 @@
 			if (!kError) {
 				kError = new KalturaError();
 				kError.errorMsg = event.text;
-				//kError.errorCode;
+				kError.errorCode = event.type; 	// either IOErrorEvent.IO_ERROR or SecurityErrorEvent.SECURITY_ERROR
 			}

 			call.handleError(kError);


ADDED 'areNotificationsEnabled' and 'areNotificationsAvailable' APIs

--- actionscript/src/com/marpies/ane/onesignal/OneSignal.as
+++ actionscript/src/com/marpies/ane/onesignal/OneSignal.as
@@ -354,6 +354,30 @@
          */

         /**
+         * Returns true if notifications are enabled for your app in the device
+         * settings and user has not opted out using OneSignal.setSubscription( false ).
+         *
+         * @see #setSubscription()
+         */
+        public static function get areNotificationsEnabled():Boolean {
+            if( !isSupported ) return false;
+            if( !mInitialized && !initExtensionContext() ) return false;
+
+            return mContext.call( "areNotificationsEnabled" ) as Boolean;
+        }
+
+        /**
+         * Returns true if the notification functionality is available on the current device.
+         * This may be false on Android devices which do not have Google Play Services installed.
+         */
+        public static function get areNotificationsAvailable():Boolean {
+            if( !isSupported ) return false;
+            if( !mInitialized && !initExtensionContext() ) return false;
+
+            return mContext.call( "areNotificationsAvailable" ) as Boolean;
+        }
+
+        /**
          * Version of the native OneSignal SDK.
          */
         public static function get sdkVersion():String {
@@ -369,7 +393,7 @@
          * Extension version.
          */
         public static function get version():String {
-            return "0.5.0";
+            return "0.6.0";
         }

         /**


Fixed AS3 Example

Fixed AS3 Example

--- tests/as3vo.as
+++ tests/as3vo.as
@@ -4,8 +4,8 @@

 		private var variable1 : String;
 		private var variable2 : Number;
-		private var anotherVariable : int;
-		private var anotherVariable : Date;
+		private var anotherVariable1 : int;
+		private var anotherVariable2 : Date;

 	}
 }


added looping for getting client registrations

--- swfcat.as
+++ swfcat.as
@@ -8,6 +8,7 @@
     import flash.events.ProgressEvent;
     import flash.events.SecurityErrorEvent;
     import flash.utils.ByteArray;
+    import flash.utils.setTimeout;

     public class swfcat extends Sprite
     {
@@ -22,6 +23,8 @@
         private var s_f:Socket;

         private var output_text:TextField;
+
+        private var fac_addr:Object;

         public function puts(s:String):void
         {
@@ -47,7 +50,6 @@
         private function loaderinfo_complete(e:Event):void
         {
             var fac_spec:String;
-            var fac_addr:Object;

             puts("Parameters loaded.");
             fac_spec = this.loaderInfo.parameters["facilitator"];
@@ -62,11 +64,11 @@
                 return;
             }

-            main(fac_addr);
+            main();
         }

         /* The main logic begins here, after start-up issues are taken care of. */
-        private function main(fac_addr:Object):void
+        private function main():void
         {
             s_f = new Socket();

@@ -106,15 +108,19 @@
             client_addr = parse_addr_spec(client_spec);
             if (!client_addr) {
                 puts("Error: Client spec must be in the form \"host:port\".");
+                setTimeout(main, 1000);
                 return;
             }
             if (client_addr.host == "0.0.0.0" && client_addr.port == 0) {
                 puts("Error: Facilitator has no clients.");
+                setTimeout(main, 1000);
                 return;
             }

             proxy_pair = new ProxyPair(this, client_addr, DEFAULT_TOR_ADDR);
             proxy_pair.connect();
+
+            setTimeout(main, 1000);
         }

         /* Parse an address in the form "host:port". Returns an Object with


Refactor InternetFreedomBadge (now Badge).

Make it its own Sprite, don't cause it to change the UI of the main
display. Use proxy_begin and proxy_end methods instead of modifying
current/total counts directly.

--- swfcat.as
+++ swfcat.as
@@ -60,7 +60,7 @@
         private var output_text:TextField;

         /* Badge for display */
-        private var badge:InternetFreedomBadge;
+        private var badge:Badge;

         private var fac_addr:Object;
         private var relay_addr:Object;
@@ -94,8 +94,8 @@
             debug_mode = (this.loaderInfo.parameters["debug"] != null)
             proxy_mode = (this.loaderInfo.parameters["proxy"] != null);
             if (proxy_mode && !debug_mode) {
-                badge = new InternetFreedomBadge(this);
-                badge.display();
+                badge = new Badge();
+                addChild(badge);
             } else {
                 output_text = new TextField();
                 output_text.width = stage.stageWidth;
@@ -170,8 +170,7 @@
                     start_proxy_pair();
                     s_c.send_hello(e.peer);
                 } else if (!debug_mode && badge != null) {
-                    badge.total_proxy_pairs++;
-                    badge.num_proxy_pairs++;
+                    badge.proxy_begin();
                 }

                 p_p.client = {peer: e.peer, stream: e.stream};
@@ -234,7 +233,7 @@
                 puts("ProxyPair: connection closed.");
                 p_p = null;
                 if (proxy_mode && !debug_mode && badge != null) {
-                    badge.num_proxy_pairs--;
+                    badge.proxy_end();
                 }
                 establish_facilitator_connection();
             });
@@ -278,29 +277,25 @@
     }
 }

+import flash.text.TextFormat;
 import flash.text.TextField;
-import flash.text.TextFormat;
-
-class InternetFreedomBadge {
-
-    private var ui:swfcat;
-
-    private var _num_proxy_pairs:uint;
-    private var _total_proxy_pairs:uint;
-
+
+class Badge extends flash.display.Sprite
+{
+    /* Number of proxy pairs currently connected. */
+    private var num_proxy_pairs:int = 0;
+    /* Number of proxy pairs ever connected. */
+    private var total_proxy_pairs:int = 0;
+
     [Embed(source="badge.png")]
     private var BadgeImage:Class;
     private var tot_client_count_tf:TextField;
     private var tot_client_count_fmt:TextFormat;
     private var cur_client_count_tf:TextField;
     private var cur_client_count_fmt:TextFormat;
-
-    public function InternetFreedomBadge(ui:swfcat)
-    {
-        this.ui = ui;
-        _num_proxy_pairs = 0;
-        _total_proxy_pairs = 0;
-
+
+    public function Badge()
+    {
         /* Setup client counter for badge. */
         tot_client_count_fmt = new TextFormat();
         tot_client_count_fmt.color = 0xFFFFFF;
@@ -330,42 +325,27 @@
         cur_client_count_tf.x=47;
         cur_client_count_tf.y=6;

+        addChild(new BadgeImage());
+        addChild(tot_client_count_tf);
+        addChild(cur_client_count_tf);
+
         /* Update the client counter on badge. */
         update_client_count();
     }
-
-    public function display():void
-    {
-        ui.addChild(new BadgeImage());
-        /* Tried unsuccessfully to add counter to badge. */
-        /* For now, need two addChilds :( */
-        ui.addChild(tot_client_count_tf);
-        ui.addChild(cur_client_count_tf);
-    }
-
-    public function get num_proxy_pairs():uint
-    {
-        return _num_proxy_pairs;
-    }
-
-    public function set num_proxy_pairs(amount:uint):void
-    {
-        _num_proxy_pairs = amount;
+
+    public function proxy_begin():void
+    {
+        num_proxy_pairs++;
+        total_proxy_pairs++;
         update_client_count();
     }
-
-    public function get total_proxy_pairs():uint
-    {
-        return _total_proxy_pairs;
-    }
-
-    public function set total_proxy_pairs(amount:uint):void
-    {
-        _total_proxy_pairs = amount;
-        /* note: doesn't update, so be sure to update this
-           before you update num_proxy_pairs! */
-    }
-
+
+    public function proxy_end():void
+    {
+        num_proxy_pairs--;
+        update_client_count();
+    }
+
     private function update_client_count():void
     {
         /* Update total client count. */


Use a host name instead of an IP address for the facilitator.

--- swfcat.as
+++ swfcat.as
@@ -25,7 +25,7 @@
             port: 9001
         };
         private const DEFAULT_FACILITATOR_ADDR:Object = {
-            host: "173.255.221.44",
+            host: "tor-facilitator.bamsoftware.com",
             port: 9002
         };


Some in-progress changes that are safe to check-in now.
Created a function to return the mask area as a Rectangle.
Will be used when snapshotting through the media stub.

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

--- src/as/com/threerings/flash/MediaContainer.as
+++ src/as/com/threerings/flash/MediaContainer.as
@@ -43,6 +43,7 @@
 import flash.events.TextEvent;

 import flash.geom.Point;
+import flash.geom.Rectangle;

 import flash.text.TextField;
 import flash.text.TextFieldAutoSize;
@@ -583,7 +584,7 @@
     /**
      * Configure the mask for this object.
      */
-    protected function configureMask (ww :int, hh :int) :void
+    protected function configureMask (rect :Rectangle) :void
     {
         var mask :Shape;
         if (_media.mask != null) {
@@ -611,7 +612,7 @@

         mask.graphics.clear();
         mask.graphics.beginFill(0xFFFFFF);
-        mask.graphics.drawRect(0, 0, ww, hh);
+        mask.graphics.drawRect(rect.x, rect.y, rect.width, rect.height);
         mask.graphics.endFill();
     }

@@ -638,12 +639,25 @@
     protected function contentDimensionsUpdated () :void
     {
         // update the mask
+        var r :Rectangle = getMaskRectangle();
+        if (r != null) {
+            configureMask(r);
+        }
+    }
+
+    /**
+     * Get the mask area, or null if no mask is needed.
+     */
+    protected function getMaskRectangle () :Rectangle
+    {
         var maxW :int = getMaxContentWidth();
         var maxH :int = getMaxContentHeight();
         if ((maxW < int.MAX_VALUE) && (maxH < int.MAX_VALUE)) {
             // if we should do masking, then mask to the lesser of maximum and actual size
-            configureMask(Math.min(maxW, _w), Math.min(maxH, _h));
-        }
+            return new Rectangle(0, 0, Math.min(maxW, _w), Math.min(maxH, _h));
+        }
+
+        return null;
     }

     /**


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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPQueryAxis.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPQueryAxis.as
@@ -0,0 +1,111 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+/**
+ *  The IOLAPQueryAxis interface represents an axis of an OLAP query.
+ *
+ *  @see mx.olap.OLAPQuery
+ *  @see mx.olap.OLAPQueryAxis
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public interface IOLAPQueryAxis
+{
+    //--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  tuples
+	//----------------------------------
+
+    /**
+     *  All the tuples added to the query axis, as an Array of IOLAPTuple instances.
+     *  This Array includes tuples added by the addMember()
+     *  and addSet() methods.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get tuples():Array;
+
+    //----------------------------------
+	//  sets
+	//----------------------------------
+
+    /**
+     *  All the sets of the query axis, as an Array of IOLAPSet instances.
+     *  This Array includes sets added by the addMember()
+     *  and addTuple() methods.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get sets():Array;
+
+    //--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Adds a set to the query axis.
+     *  The set define the members and tuples that provide the information for the query axis.
+     *
+     *  @param s The set to add to the query.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function addSet(s:IOLAPSet):void;
+
+    /**
+     *  Adds a tuple to the query axis.
+     *  The tuple is automatically converted to an IOLPASet instance.
+     *
+     *  @param t The tuple to add to the query.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function addTuple(t:IOLAPTuple):void;
+
+    /**
+     *  Adds a single member to the query axis.
+     *  The member is automatically converted to an IOLPASet instance.
+     *  This method is useful when adding a member to a slicer axis.
+     *
+     *  @param s The member to add to the query.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function addMember(s:IOLAPMember):void;
+}
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21351
Author:   deeptika@adobe.com
Date:     2011-06-08T05:49:31.966086Z

Log Message:
-----------
Filtering 0 values for column and bar charts in case of stacked charts

QE notes:
Doc notes:
Bugs: FLEXDMV-2478 (Chart bars with zero data are drawn (and have datatips) although they have no values.)
Reviewer:
Tests run: Checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/BarSeries.as</path>

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

--- frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
+++ frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
@@ -2126,23 +2126,16 @@
                 {
                     stackedValue = 0;
                 }
-                if (yValue == 0)
-                {
-                    chartItem.yValue = 0;
-                    chartItem.minValue = 0;
-                }
-                else
-                {
-                    chartItem.yValue = yValue + stackedValue;
-                    chartItem.minValue = stackedValue;
-                }
-                yValue += stackedValue;
-                //chartItem.minValue = stackedValue;
-                stackedXValueDictionary[xValue] = yValue;
-                //chartItem.yValue = yValue;
-                chartItem.xValue = xValue;
-                maxValue = Math.max(maxValue,yValue);
-
+				if (yValue != 0)
+				{
+					chartItem.yValue = yValue + stackedValue;
+					chartItem.minValue = stackedValue;
+
+					yValue += stackedValue;
+					stackedXValueDictionary[xValue] = yValue;
+					chartItem.xValue = xValue;
+					maxValue = Math.max(maxValue,yValue);
+				}
                 i++;
                 cursor.moveNext();
             }
@@ -2227,8 +2220,7 @@

                 if (yValue == 0)
                 {
-                    chartItem.yValue = 0;
-                    chartItem.minValue = 0;
+                   // Do nothing
                 }
                 else
                 {