Transferred from the Adobe Open Source Subversion Repository

Revision: 18173
Author:   jasonsj@adobe.com
Date:     2010-10-15T17:03:20.801634Z

Log Message:
-----------
Mobile Theme Initial check-in

* New light-look visuals from XD
* Changed airmobile-config.xml to use standalone Mobile theme instead of Spark overlay
* Added theme="spark, mobile" where spark was already white-listed and support is implemented and/or planned for Mobile/spark.css (see https://zerowing.corp.adobe.com/display/flexmobile/Mobile+Theme+Styles+Spec)
* MobileSkin has symbolColor and chromeColor support. Override beginChromeColorFill and drawChromeColor when defining custom chromeColor visuals.
* CheckBox and RadioButton now have chromeColor and symbolColor support
* Added textShadowColor and textShadowAlpha support to Button and ActionBar
* Added chromeColor support to HScrollBar and VScrollBar

QE notes: All mobile skins have been updaetd.
Doc notes: Update mobile skinning documentation for new APIs
Bugs:
SDK-28043 Investigate usage of "viewWidth", "viewHeight" for the Flex Mobile Skin Assets
SDK-27609 Mobile scroll bar skins should use chromeColor
SDK-27646 cornerradius has no effect on button in mobile application
Reviewer: gruehle
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/ContainerBackgroundStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.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/mobiletheme/src/spark/skins/mobile/assets/CheckBox_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/TextInput_border.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_down.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.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/RadioButton.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_downSelected.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/themes/Mobile/spark.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/airmobile-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_downSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
@@ -40,6 +40,7 @@
     private static const VERTICAL_PADDING:int = 12;
     private static const TEXT_WIDTH_PADDING:int = 4;
     private static const TEXT_HEIGHT_PADDING:int = 2;
+    private static const CORNER_ELLIPSE_SIZE:uint = 16;

     //--------------------------------------------------------------------------
     //
@@ -133,7 +134,7 @@
         // Draw the contentBackgroundColor
         graphics.clear();
         graphics.beginFill(getStyle("contentBackgroundColor"), getStyle("contentBackgroundAlpha"));
-        graphics.drawRoundRect(2, 2, unscaledWidth - 4, unscaledHeight - 4, 4, 4);
+        graphics.drawRoundRect(1, 1, unscaledWidth - 2, unscaledHeight - 2, CORNER_ELLIPSE_SIZE, CORNER_ELLIPSE_SIZE);
         graphics.endFill();

         // position & size border


Transferred from the Adobe Open Source Subversion Repository

Revision: 4247
Author:   clucier@adobe.com
Date:     2008-12-06T02:25:29.463716Z

Log Message:
-----------
Fixing up some old crusty MenuBar code to fix a Mustella test.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as

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

--- frameworks/projects/mx/src/mx/controls/MenuBar.as
+++ frameworks/projects/mx/src/mx/controls/MenuBar.as
@@ -1026,10 +1026,13 @@
             }

             var backgroundSkinClass:Class = getStyle("backgroundSkin");
-            background = new backgroundSkinClass();
-            if (background is ISimpleStyleClient)
-                ISimpleStyleClient(background).styleName = this;
-            addChildAt(DisplayObject(background), 0);
+            if (backgroundSkinClass)
+            {
+                background = new backgroundSkinClass();
+                if (background is ISimpleStyleClient)
+                    ISimpleStyleClient(background).styleName = this;
+                addChildAt(DisplayObject(background), 0);
+            }
         }
     }


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultItemRendererAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultItemRendererAutomationImpl.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: 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@1252316 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkTrackBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkTrackBaseAutomationImpl.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.automation.delegates.components.supportClasses
+{
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.core.mx_internal;
+
+	import spark.components.supportClasses.TrackBase;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  TrackBase control.
+	 *
+	 *  @see spark.components.supportClasses.TrackBase
+	 *
+	 */
+	public class SparkTrackBaseAutomationImpl extends SparkRangeAutomationImpl
+	{
+
+		include "../../../../core/Version.as";
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.supportClasses.TrackBase, SparkTrackBaseAutomationImpl);
+		}
+
+		/**
+		 *  Constructor.
+		 * @param obj TrackBase object to be automated.
+		 */
+		public function SparkTrackBaseAutomationImpl(obj:spark.components.supportClasses.TrackBase)
+		{
+			super(obj);
+
+		}
+
+
+	}
+
+}


adding support for missing requestMethod and missing responseType

--- WeaveJS/src/weavejs/net/URLRequestUtils.as
+++ WeaveJS/src/weavejs/net/URLRequestUtils.as
@@ -21,7 +21,6 @@
 	import weavejs.api.net.IURLRequestUtils;
 	import weavejs.util.Dictionary2D;
 	import weavejs.util.JS;
-	import weavejs.util.StandardLib;
 	import weavejs.util.WeavePromise;

 	public class URLRequestUtils implements IURLRequestUtils
@@ -45,6 +44,8 @@

 		public function request(relevantContext:Object, urlRequest:URLRequest):WeavePromise
 		{
+			var responseType:String = urlRequest.responseType || ResponseType.UINT8ARRAY;
+
 			if (urlRequest.url.indexOf(LOCAL_FILE_URL_SCHEME) == 0)
 			{
 				var weaveRoot:ILinkableHashMap = Weave.getRoot(relevantContext as ILinkableObject);
@@ -53,7 +54,7 @@
 					promise.setError(Weave.lang("Local file missing: {0}", urlRequest.url.substr(LOCAL_FILE_URL_SCHEME.length)));
 				promise = promise.then(function(byteArray:/*Uint8*/Array):Object {
 					return new WeavePromise(relevantContext, function(resolve:Function, reject:Function):* {
-						switch (urlRequest.responseType) {
+						switch (responseType) {
 							default:
 							case ResponseType.TEXT:
 								return resolve(byteArrayToString(byteArray));
@@ -82,21 +83,21 @@
 					var ie9_XHR:Class = JS.global.XDomainRequest;
 					var XHR:Class = ie9_XHR || JS.global.XMLHttpRequest;
 					var xhr:Object = new XHR();
-					xhr.open(urlRequest.method, urlRequest.url, true);
+					xhr.open(urlRequest.method || RequestMethod.GET, urlRequest.url, true);
 					for (var name:String in urlRequest.requestHeaders)
 						xhr.setRequestHeader(name, urlRequest.requestHeaders[name], false);

-					if (urlRequest.responseType === ResponseType.UINT8ARRAY || urlRequest.responseType === ResponseType.DATAURI)
+					if (responseType === ResponseType.UINT8ARRAY || responseType === ResponseType.DATAURI)
 						xhr.responseType = ResponseType.ARRAYBUFFER;
 					else
-						xhr.responseType = urlRequest.responseType;
+						xhr.responseType = responseType;

 					xhr.onload = function(event:*):void {
 						var result:* = ie9_XHR ? xhr.responseText : xhr.response;

-						if (urlRequest.responseType === ResponseType.UINT8ARRAY)
+						if (responseType === ResponseType.UINT8ARRAY)
 							result = new JS.Uint8Array(result);
-						if (urlRequest.responseType === ResponseType.DATAURI)
+						if (responseType === ResponseType.DATAURI)
 							result = byteArrayToDataUri(new JS.Uint8Array(result), urlRequest.mimeType);

 						resolve(result);


removed unused imports

removed unused imports

--- asx_test/src/asx/array/SequentiallyTest.as
+++ asx_test/src/asx/array/SequentiallyTest.as
@@ -7,8 +7,6 @@
   import flash.events.IEventDispatcher;
   import flash.utils.getTimer;
   import flash.utils.setTimeout;
-
-  import mx.automation.events.EventDetails;

   import org.flexunit.assertThat;
   import org.flexunit.async.Async;


refactor

refactor

--- as/main/frame4.as
+++ as/main/frame4.as
@@ -30,6 +30,7 @@
 				pressing = true;
 				movement = -1;
 				this.updateAfterEvent;
+
 			}

 		}
@@ -61,8 +62,8 @@
 		this.historia_txt.multiline = true;
 }

-var Privat = new LoadVars ();
-Privat.load ("/assets/tendes.txt");
+var Privat:LoadVars = new LoadVars ();
+Privat.load ("/assets/tendes.txt?ver=" + Math.floor(Math.random() * 777));
 Privat.onLoad = function ()
 {
 		this.historia_txt.setTextFormat(formatText);


Added parseUnsignedInteger.

Added parseUnsignedInteger.

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

--- src/as/com/threerings/util/StringUtil.as
+++ src/as/com/threerings/util/StringUtil.as
@@ -101,45 +101,28 @@
      */
     public static function parseInteger (str :String, radix :uint = 0) :int
     {
-        if (str == null) {
-            throw new ArgumentError("Cannot parseInt(null)");
-        }
-
-        if (radix == 0) {
-            if (startsWith(str, "0x")) {
-                str = str.substring(2);
-                radix = 16;
-
-            } else if (startsWith(str, "0")) {
-                str = str.substring(1);
-                radix = 8;
-
-            } else {
-                radix = 10;
-            }
-
-        } else if (radix == 16 && startsWith(str, "0x")) {
-            str = str.substring(2);
-
-        } else if (radix < 2 || radix > 16) {
-            throw new ArgumentError("Radix out of range: " + radix);
-        }
-
-        // now verify that str only contains valid chars for the radix
-        for (var ii :int = 0; ii < str.length; ii++) {
-            var dex :int = HEX.indexOf(str.charAt(ii).toLowerCase());
-            if (dex == -1 || dex >= radix) {
-                throw new ArgumentError("Invalid characters in String parseInt='" + arguments[0] +
-                    "', radix=" + radix);
-            }
-        }
-
-        var result :Number = parseInt(str, radix);
-        if (isNaN(result)) {
-            // this shouldn't happen..
-            throw new ArgumentError("Could not parseInt=" + arguments[0]);
-        }
-        return int(result);
+        return int(parseInt0(str, radix, true));
+    }
+
+    /**
+     * Parse an integer more anally than the built-in parseInt() function,
+     * throwing an ArgumentError if there are any invalid characters.
+     *
+     * The built-in parseInt() will ignore trailing non-integer characters.
+     *
+     * @param str The string to parse.
+     * @param radix The radix to use, from 2 to 16. If not specified the radix will be 10,
+     *        unless the String begins with "0x" in which case it will be 16,
+     *        or the String begins with "0" in which case it will be 8.
+     */
+    public static function parseUnsignedInteger (str :String, radix :uint = 0) :uint
+    {
+        var result :Number = parseInt0(str, radix, false);
+        if (result < 0) {
+            throw new ArgumentError("parseUnsignedInteger parsed negative value [value=" + str +
+                "].");
+        }
+        return uint(result);
     }

     /**
@@ -344,6 +327,60 @@
         return data;
     }

+    /**
+     * Internal helper function for parseInteger and parseUnsignedInteger.
+     */
+    protected static function parseInt0 (str :String, radix :uint, allowNegative :Boolean) :Number
+    {
+        if (str == null) {
+            throw new ArgumentError("Cannot parseInt(null)");
+        }
+
+        var negative :Boolean = (str.charAt(0) == "-");
+        if (negative) {
+            str = str.substring(1);
+        }
+
+        if (radix == 0) {
+            if (startsWith(str, "0x")) {
+                str = str.substring(2);
+                radix = 16;
+
+            } else if (startsWith(str, "0")) {
+                str = str.substring(1);
+                radix = 8;
+
+            } else {
+                radix = 10;
+            }
+
+        } else if (radix == 16 && startsWith(str, "0x")) {
+            str = str.substring(2);
+
+        } else if (radix < 2 || radix > 16) {
+            throw new ArgumentError("Radix out of range: " + radix);
+        }
+
+        // now verify that str only contains valid chars for the radix
+        for (var ii :int = 0; ii < str.length; ii++) {
+            var dex :int = HEX.indexOf(str.charAt(ii).toLowerCase());
+            if (dex == -1 || dex >= radix) {
+                throw new ArgumentError("Invalid characters in String parseInt='" + arguments[0] +
+                    "', radix=" + radix);
+            }
+        }
+
+        var result :Number = parseInt(str, radix);
+        if (isNaN(result)) {
+            // this shouldn't happen..
+            throw new ArgumentError("Could not parseInt=" + arguments[0]);
+        }
+        if (negative) {
+            result *= -1;
+        }
+        return result;
+    }
+
     /** Hexidecimal digits. */
     protected static const HEX :Array = [ "0", "1", "2", "3", "4",
         "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" ];


Fade out after killing the monster.

Fade out after killing the monster.


Split first tutorial in 1/2

Split first tutorial in 1/2

--- src/Level.as
+++ src/Level.as
@@ -45,11 +45,16 @@
 		public static function list():Vector.<Level> {
 			var levels:Vector.<Level> = new Vector.<Level>;

-			levels.push(new Level("Tutorial 1: Wires",
+			levels.push(new Level("Tutorial 1A: Wires",
 								  new WireTutorialGoal,
 								  false,
 								  [], [],
-								  [new ConstIn(12, 16, 1), new Adder(20, 16), new DataWriter(28, 16)]),
+								  [new ConstIn(12, 12, 1), new ConstIn(12, 20, 2), new DataWriter(22, 16)]),
+						new Level("Tutorial 1B: Modules",
+								  new WireTutorialGoal,
+								  false,
+								  [Adder, DataWriter], [],
+								  [new ConstIn(12, 16, 1)]),
 						new Level("Tutorial 2: Acc.",
 								  new AccumulatorTutorialGoal,
 								  false,


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/CartesianDataCanvas.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/CartesianDataCanvas.as
@@ -1,12 +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.
 //
 ////////////////////////////////////////////////////////////////////////////////
 package mx.charts.chartClasses


update

update


Scrollbar now respects scrollwheel

Scrollbar now respects scrollwheel

--- src/UI/Scrollbar.as
+++ src/UI/Scrollbar.as
@@ -50,6 +50,7 @@
 		override public function update():void {
 			super.update();
 			checkClick();
+			checkScroll();
 			tick++;
 		}

@@ -63,15 +64,20 @@

 			if (FlxG.mouse.justPressed() && barMoused) {
 				barClicked = true;
-				moveSlider();
+				moveSlider(adjMouse.y);
 			}

 			if (barClicked) {
 				if (FlxG.mouse.pressed())
-					moveSlider();
+					moveSlider(adjMouse.y);
 				else
 					barClicked = false;
 			}
+		}
+
+		private function checkScroll():void {
+			if (Math.abs(FlxG.mouse.wheelChange()) > 1)
+				moveSlider(FlxG.mouse.wheelChange() * (rail.height - slider.height) / 20 + slider.y);
 		}

 		private function getAdjMouse():FlxPoint {
@@ -79,10 +85,10 @@
 								FlxG.mouse.y + FlxG.camera.scroll.y * (slider.scrollFactor.y - 1));
 		}

-		private function moveSlider():void {
+		private function moveSlider(targetY:int):void {
 			slider.y = Math.max(rail.y,
 								Math.min(rail.y + rail.height - slider.height,
-										 getAdjMouse().y - slider.height / 2));
+										 targetY - slider.height / 2));
 		}

 		public function get scrollFraction():Number {


speed optimizations

speed optimizations

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -31,6 +31,8 @@

 	import weave.utils.fixErrorMessage;

+	use namespace flash_proxy;
+
 	/**
 	 * This class can compile simple ActionScript expressions into functions.
 	 *
@@ -416,8 +418,10 @@
 				return object;
 			};
 			operators[".."] = function(object:*, propertyName:*):* {
-				if (typeof(object) == 'xml')
-					return object.descendants(propertyName);
+				if (object is XML)
+					return (object as XML).descendants(propertyName);
+				if (object is Proxy)
+					return (object as Proxy).getDescendants(propertyName);
 				return object.flash_proxy::getDescendants(propertyName);
 			};
 			operators['in'] = function(...args):* {
@@ -888,7 +892,7 @@
 					break;
 				if (i == 0 || i + 1 == tokens.length)
 					throw new Error("Misplaced '" + tokens[i] + "'");
-				tokens.splice(i - 1, 3, compileVariableAssignment.apply(null, tokens.slice(i - 1, i + 2)));
+				tokens.splice(i - 1, 3, compileVariableAssignment(tokens[i - 1], tokens[i], tokens[i + 1]));
 			}

 			// next step: commas
@@ -2464,10 +2468,10 @@
 						}
 						else if (call.evaluatedHost is Proxy)
 						{
-							// use Proxy.flash_proxy::callProperty
+							// use Proxy.callProperty
 							var proxyParams:Array = call.evaluatedParams.concat();
 							proxyParams.unshift(call.evaluatedMethodName);
-							result = (call.evaluatedHost as Proxy).flash_proxy::callProperty.apply(call.evaluatedHost, proxyParams);
+							result = (call.evaluatedHost as Proxy).callProperty.apply(call.evaluatedHost, proxyParams);
 						}
 						else
 						{


fixed bug where fault handlers were called twice.

--- WeaveCore/src/weave/core/LibraryUtils.as
+++ WeaveCore/src/weave/core/LibraryUtils.as
@@ -346,6 +346,7 @@
 			{
 				var resultEvent:ResultEvent = ResultEvent.createEvent(_classQNames.concat(), _asyncToken);
 				_asyncToken.mx_internal::applyResult(resultEvent);
+				_asyncToken = null; // prevent responders from being called again
 			}
 			else
 			{
@@ -354,10 +355,10 @@
 					fault = new Fault('Error', "Unable to load plugin " + _url);
 				var faultEvent:FaultEvent = FaultEvent.createEvent(fault, _asyncToken);
 				_asyncToken.mx_internal::applyFault(faultEvent);
+				_asyncToken = null; // prevent responders from being called again

 				WeaveAPI.SessionManager.disposeObjects(this);
 			}
-			_asyncToken = null;
 		}
 	}
 }


Added type info

Added type info

--- WeaveData/src/weave/utils/ColumnUtils.as
+++ WeaveData/src/weave/utils/ColumnUtils.as
@@ -31,8 +31,8 @@
 	import weave.api.data.IAttributeColumn;
 	import weave.api.data.IColumnWrapper;
 	import weave.api.data.IDataSource;
+	import weave.api.data.IKeyFilter;
 	import weave.api.data.IKeySet;
-	import weave.api.data.IKeyFilter;
 	import weave.api.data.IPrimitiveColumn;
 	import weave.api.data.IQualifiedKey;
 	import weave.api.getCallbackCollection;
@@ -444,7 +444,7 @@
 			if (!subset)
 				keys = getAllKeys(attrCols);
 			else
-				keys = getAllKeys(attrCols).filter(function (key:IQualifiedKey, idx:*, arr:Array) { return subset.containsKey(key);});
+				keys = getAllKeys(attrCols).filter(function(key:IQualifiedKey, idx:*, arr:Array):Boolean { return subset.containsKey(key);});

 			var keyTypeMap:Object = {};
 			// create the data for each column in each selected row


Pass test for error on resolving unregistered scope

--- src/asfac/src/com/thedevstop/asfac/AsFactory.as
+++ src/asfac/src/com/thedevstop/asfac/AsFactory.as
@@ -74,7 +74,7 @@
 				throw new IllegalOperationError("Type cannot be null when registering a callback");

 			validateCallback(callback);
-
+
 			var registrationsByScope:Dictionary = _registrations[type];
 			if (!registrationsByScope)
 			{
@@ -112,6 +112,8 @@
 			{
 				if (registrationsByScope[scopeName])
 					return registrationsByScope[scopeName](this);
+				else if (scopeName != DefaultScopeName)
+					throw new ArgumentError("Type being resolved has not been registered for scope named " + scopeName);
 			}

 			return resolveByClass(type);


Fixed memory leak in SceneLoader

Fixed memory leak in SceneLoader

--- src/aerys/minko/type/loader/SceneLoader.as
+++ src/aerys/minko/type/loader/SceneLoader.as
@@ -142,7 +142,9 @@

 		public function loadClass(classObject : Class) : void
 		{
-			loadBytes(new classObject());
+			var bytes : ByteArray = new classObject() as ByteArray;
+			loadBytes(bytes);
+			bytes.clear();
 		}

 		public function loadBytes(byteArray : ByteArray) : void


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.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: 18933
Author:   rfrishbe@adobe.com
Date:     2010-12-02T01:39:12.064691Z

Log Message:
-----------
Fixing transitions for ItemRenderers to only occur on certain changes.  For instance, when int he down state and a scroll starts, the transition for down->normal shouldn't play--instead we're really cancelling the down state, so no transition plays.

Also fixing another issue so that mousing up on an item renderer now goes in to the hovered state.  This makes the mouse handling logic as robust as Button's.

QE notes: Update the tests that have been excluded
Doc notes:
Bugs: SDK-28578
Reviewer: Corey
Tests run: checkintests, mustella cyclone server
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -683,8 +683,10 @@
      */
     private function interactionStateDetector_changeHandler(event:Event):void
     {
+		playTransitions = interactionStateDetector.playTransitions;
         down = (interactionStateDetector.state == InteractionState.DOWN);
         hovered = (interactionStateDetector.state == InteractionState.OVER);
+		playTransitions = true;
     }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7918
Author:   chaase@adobe.com
Date:     2009-06-17T16:55:30.271215Z

Log Message:
-----------
Round 2 of effects PARB changes. Some renames and removals of properties/functions, including:
AnimateTransform: removed 18 MotionPath properties, added applyChangesPostLayout property (replaces affectLayout property in subclasses), removed addMotionPath/addPostLayoutMotionPath protected functions
Animation: removed seek(), reverse()
SimpleMotionPath: removed 'duration' arg in constructor

QE Notes: Mustella will break on some of these changes (no surprise, just needs minor updates)
Doc Notes: API updates
Bugs: none
Reviewer: Jason
Tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</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/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -297,7 +297,7 @@
     override public function set playheadTime(value:Number):void
     {
         if (animation)
-            animation.seek(value, true);
+            animation.playheadTime = value;
         else
             _seekTime = value;
     }
@@ -468,7 +468,7 @@
         animation.motionPaths = motionPaths;

         if (_seekTime > 0)
-            animation.seek(_seekTime);
+            animation.playheadTime = _seekTime;
         if (reverseAnimation)
             animation.playReversed = true;
         animation.interpolator = interpolator;


Allow undo/redo with selected bloc

Allow undo/redo with selected bloc

--- src/LevelStates/LevelState.as
+++ src/LevelStates/LevelState.as
@@ -997,23 +997,31 @@
 		}

 		private function canUndo():Boolean {
-			return actionStack.length > 0 && !currentWire && !currentModule && !currentBloc;
+			return actionStack.length > 0 && !currentWire && !currentModule;
 		}

 		private function canRedo():Boolean {
-			return reactionStack.length > 0 && !currentWire && !currentModule && !currentBloc;
+			return reactionStack.length > 0 && !currentWire && !currentModule;
 		}

 		private function undo():Action {
 			if (!canUndo())
 				return null;
+			if (currentBloc) {
+				currentBloc.unravel();
+				currentBloc = null;
+			}
 			return actionStack.pop().revert();
 		}

 		private function redo():Action {
 			if (!canRedo())
 				return null;
+			if (currentBloc) {
+				currentBloc.unravel();
+				currentBloc = null;
+			}
 			return reactionStack.pop().execute();
 		}