Transferred from the Adobe Open Source Subversion Repository

Revision: 8605
Author:   jszeto@adobe.com
Date:     2009-07-15T22:30:29.555333Z

Log Message:
-----------
Transform bug fixes

http://bugs.adobe.com/jira/browse/SDK-22046 - Can't set matrix3D property on Transform

Player declares matrix3D setter with * return type. So mx.geom.Transform override must also use *. Note that once the Player is updated with void, this will need to be changed to void.

http://bugs.adobe.com/jira/browse/SDK-22146 - [CT 2373084] AlphaMultiplier and AlphaOffset in color transformation are ignored in MXML Graphics

Changed the behavior of alpha and ColorTransform for GraphicElement to match the behavior of DisplayObject.

- ColorTransform.alphaMultiplier and alpha are equivalent and are kept in sync.
- ColorTransform.alphaOffset is still applied even if alpha is set.

Implementation details:
- mx.geom.Transform sets the colorTransformExplicitlySet flag whenever the colorTransform setter is called
- GraphicElement alpha setter clears the colorTransformExplicitlySet flag whenever it is called
- Setting GraphicElement.transform will update the alpha property with ColorTransform.alphaMultiplier if a colorTransform was explicitly set
- Setting the colorTransform on a mx.geom.Transform that is assigned to a GraphicElement, calls setColorTransform, which updates the alpha property with ColorTransform.alphaMultiplier.
- In commitProperties, the displayObject.alpha is updated only if there is no transform or if colorTransformExplicitlySet is false.

QE Notes: Need tests for combo of alpha and colorTransform alpha props
Doc Notes: None
Bugs: SDK-22046, SDK-22146
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -1,7 +1,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2006 Adobe Systems Incorporated
+//  Copyright 2008 Adobe Systems Incorporated
 //  All Rights Reserved.
 //
 //  NOTICE: Adobe permits you to use, modify, and distribute this file
@@ -146,7 +146,7 @@
     private var _colorTransform:ColorTransform;

     private var colorTransformChanged:Boolean;
-
+
     /**
      *  @private The Sprite to draw into.
      *  If null, then we just use displayObject or sharedDisplayObject
@@ -333,7 +333,7 @@
      *  @private
      */
     private var alphaChanged:Boolean = false;
-
+
     [Inspectable(category="General")]

     /**
@@ -353,12 +353,18 @@
      *  @private
      */
     public function set alpha(value:Number):void
-    {
+    {
         if (_alpha == value)
             return;
-
+
         var previous:Boolean = needsDisplayObject;
         _alpha = value;
+
+        // Clear the colorTransform flag since alpha was explicitly set
+        var mxTransform:mx.geom.Transform = _transform as mx.geom.Transform;
+        if (mxTransform)
+            mxTransform.applyColorTransformAlpha = false;
+
         if (previous != needsDisplayObject)
             invalidateDisplayObjectSharing();

@@ -1773,7 +1779,8 @@
             }
         }

-        setColorTransform(colorTransform);
+        var mxTransform:mx.geom.Transform = value as mx.geom.Transform;
+        applyColorTransform(colorTransform, mxTransform && mxTransform.applyColorTransformAlpha);

         invalidateTransform(previous != needsDisplayObject);
     }
@@ -1796,14 +1803,31 @@
         _transform = value;
     }

+    /**
+     * @private
+     *
+     * Sets the colorTransform property of the transform. Called by mx.geom.Transform
+     * when its colorTransform property has been changed.
+     */
     public function setColorTransform(value:ColorTransform):void
+    {
+        applyColorTransform(value, true);
+    }
+
+    /**
+     * @private
+     */
+    private function applyColorTransform(value:ColorTransform, updateAlpha:Boolean):void
     {
         if (_colorTransform != value)
         {
             var previous:Boolean = needsDisplayObject;
             // Make a copy of the colorTransform
             _colorTransform = new ColorTransform(value.redMultiplier, value.greenMultiplier, value.blueMultiplier, value.alphaMultiplier,
-                                                 value.redOffset, value.greenOffset, value.blueOffset, value.alphaOffset);
+                value.redOffset, value.greenOffset, value.blueOffset, value.alphaOffset);
+
+            if (updateAlpha)
+                _alpha = value.alphaMultiplier;

             if (displayObject && displayObjectSharingMode == DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT)
             {
@@ -1814,8 +1838,8 @@
                 colorTransformChanged = true;
                 invalidateProperties();
                 if (previous != needsDisplayObject)
-                    invalidateDisplayObjectSharing();
-            }
+                    invalidateDisplayObjectSharing();
+            }
         }
     }

@@ -2998,6 +3022,7 @@
     {
         //trace("GraphicElement.commitProperties displayObject",displayObject,"this",this);
         var updateTransform:Boolean = false;
+        var mxTransform:mx.geom.Transform;

         // If we are the first in the sequence, setup the displayObject properties
         if (displayObjectSharingMode != DisplayObjectSharingMode.USES_SHARED_OBJECT && displayObject)
@@ -3008,12 +3033,15 @@
                 if (_colorTransform)
                     displayObject.transform.colorTransform = _colorTransform;
             }
-
+
             if (alphaChanged || displayObjectChanged)
             {
                 alphaChanged = false;
-                displayObject.alpha = _alpha;
-            }
+
+                mxTransform = _transform as mx.geom.Transform;
+                if (!mxTransform || !mxTransform.applyColorTransformAlpha)
+                    displayObject.alpha = _alpha;
+            }

             if (blendModeChanged || displayObjectChanged)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6957
Author:   jimurphy@adobe.com
Date:     2009-05-15T16:11:59.737851Z

Log Message:
-----------
Merged beta1 revisions 6898,6906,6913,6915,6917,6926,6930 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/ImageHelper.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VRule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/flash-integration/FlexComponentKit.mxp</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/ShapeHelper.java</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/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HRule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/dom/filters/GlowFilterNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/FlexComponentKit.mxi</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/TypeHelper.java</path>

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

--- frameworks/projects/mx/src/mx/controls/HRule.as
+++ frameworks/projects/mx/src/mx/controls/HRule.as
@@ -87,6 +87,8 @@

 [IconFile("HRule.png")]

+[Alternative(replacement="spark.primitives.Line", since="4.0")]
+
 /**
  *  The HRule control creates a single horizontal line.
  *  You typically use this control to create a dividing line


Fix errors in trace_properties when called with something else than _global

--- test/trace/trace_properties.as
+++ test/trace/trace_properties.as
@@ -421,10 +421,13 @@
   generate_names (_global.Object, "_global", "Object");
   generate_names (_global, "", "_global");

-  generate_names (o, prefix, identifier);
-
   if (typeof (o) == "object" || typeof (o) == "function")
   {
+    if (o["mySecretId"] == undefined) {
+      o["mySecretId"] = prefix + (prefix != "" ? "." : "") + identifier;
+      generate_names (o, prefix, identifier);
+    }
+
     if (prefix + (prefix != "" ? "." : "") + identifier == o["mySecretId"])
     {
       trace (prefix + (prefix != "" ? "." : "") + identifier + " = " +
@@ -439,7 +442,13 @@
   }
   else
   {
+    var value = "";
+    if (typeof (o) == "number" || typeof (o) == "boolean") {
+      value += " : " + o;
+    } else if (typeof (o) == "string") {
+      value += " : \"" + o + "\"";
+    }
     trace (prefix + (prefix != "" ? "." : "") + identifier + " = " +
-	typeof (o[prop]) + value);
-  }
-}
+	typeof (o) + value);
+  }
+}


Add throttled checking using timers.

Add throttled checking using timers.

--- src/PlayState.as
+++ src/PlayState.as
@@ -45,6 +45,9 @@
     // Some game switches.
     private var fallChecking:Boolean;

+    // Internal helpers.
+    private var gameStatePollInterval:FlxTimer;
+
     // Flixel Methods
     // --------------
     override public function create():void
@@ -64,7 +67,16 @@
       // For now, we add things in order to get correct layering.
       add(bg);
       add(platform);
-      add(player);
+      add(player);
+
+      // Internals.
+      // Don't do expensive operations too often, if possible.
+      gameStatePollInterval = new FlxTimer();
+      gameStatePollInterval.start(2, Number.POSITIVE_INFINITY,
+        function(onTimer:FlxTimer):void {
+          updateGameState(true);
+        }
+      );
     }
     override public function update():void
     {
@@ -226,12 +238,20 @@
       // Tilemaps can be collided just like any other FlxObject, and flixel
       // automatically collides each individual tile with the object.
       FlxG.collide(player, platform);
-      var pPos:FlxPoint = new FlxPoint(player.x, player.y);
-      wrapToStage(player);
-      var pos:FlxPoint = new FlxPoint(player.x, player.y);
-      if (FlxU.getDistance(pos, pPos) > 0)
-      {
-        player.nextAction = Player.STOP;
+      // Wrap to stage.
+      if (!player.inMidAir() && player.nextAction != Player.STOP)
+      {
+        var pPos:FlxPoint = new FlxPoint(player.x, player.y);
+        wrapToStage(player);
+        var pos:FlxPoint = new FlxPoint(player.x, player.y);
+        if (FlxU.getDistance(pos, pPos) > 0)
+        {
+          player.nextAction = Player.STOP;
+        }
+      }
+      else
+      {
+        wrapToStage(player);
       }
     }
     private function updateCamera(playerJustFell:Boolean):void
@@ -245,32 +265,35 @@
         );
       }
     }
-    private function updateGameState():void
-    {
-      // Check if player is on top of last platform, periodically.
-      // Play the end screen for a while, on click, switch to start screen.
-      if (player.isTouching(FlxObject.FLOOR) && platform.isAtEndingPoint(player))
-      {
-        if (player.controlled)
+    private function updateGameState(doChecks:Boolean=false):void
+    {
+      if (doChecks)
+      {
+        // Check if player is on top of last platform, periodically.
+        // Play the end screen for a while, on click, switch to start screen.
+        if (player.isTouching(FlxObject.FLOOR) && platform.isAtEndingPoint(player))
         {
-          player.controlled = false;
-          var title:Text, instructions:Text;
-          title = new Text(0, Text.BASELINE * 2, FlxG.width,
-            "The End", Text.H1);
-          instructions = new Text(0, Text.BASELINE * 4, FlxG.width,
-            "Click to play again");
-          instructions.size = 16;
-          // Stay on the screen.
-          instructions.scrollFactor = title.scrollFactor = new FlxPoint();
-          add(title);
-          add(instructions);
+          if (player.controlled)
+          {
+            player.controlled = false;
+            var title:Text, instructions:Text;
+            title = new Text(0, Text.BASELINE * 2, FlxG.width,
+              "The End", Text.H1);
+            instructions = new Text(0, Text.BASELINE * 4, FlxG.width,
+              "Click to play again");
+            instructions.size = 16;
+            // Stay on the screen.
+            instructions.scrollFactor = title.scrollFactor = new FlxPoint();
+            add(title);
+            add(instructions);
+          }
+          else if (!player.controlled && FlxG.mouse.justPressed())
+          {
+            MorningStroll.endGame();
+          }
         }
-        else if (!player.controlled && FlxG.mouse.justPressed())
-        {
-          MorningStroll.endGame();
-        }
-      }
-      else if (FlxG.keys.justPressed('Q'))
+      }
+      if (FlxG.keys.justPressed('Q'))
       {
         MorningStroll.endGame();
       }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
@@ -10,10 +10,10 @@
 ////////////////////////////////////////////////////////////////////////////////

-package mx.layout
+package spark.layout.supportClasses
 {
 import flash.geom.Rectangle;
-import mx.graphics.Rect;
+import spark.primitives.Rect;
 import mx.core.ILayoutElement;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;


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

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


menu for add removed. enter re-incorporated

--- Arguments/src/classes/ArgumentPanel.as
+++ Arguments/src/classes/ArgumentPanel.as
@@ -50,7 +50,6 @@
 		//another skin
 		public var panelSkin1:PanelSkin;
 		//doneButton
-
 		public var doneBtn:AButton;
 		public var addBtn:AButton;
 		public var deleteBtn:AButton;
@@ -89,10 +88,9 @@
 		{
 			if(userEntered == false)
 			{
-					input1.text="";
-					userEntered = true;
-			}
-			//trace("should make it editable");
+				input1.text="";
+				userEntered = true;
+			}
 			if( !( event.target is mx.controls.Button) )
 			{
 				input1.visible = true;
@@ -123,7 +121,8 @@
 			panelType = ArgumentPanel.ARGUMENT_PANEL;
 			this.addEventListener(FlexEvent.CREATION_COMPLETE,onArgumentPanelCreate);
 			this.addEventListener(UpdateEvent.UPDATE_EVENT,adjustHeight);
-
+			this.addEventListener(KeyboardEvent.KEY_DOWN,keyEntered);
+
 			//will be set by the object that creates this
 			inference = null;

@@ -149,6 +148,14 @@
 				parentMap.layoutManager.alignReasons(this, this.gridY);
 			}
 			return;
+		}
+
+		public function keyEntered(event: KeyboardEvent):void
+		{
+			if(event.keyCode == Keyboard.ENTER)
+			{
+				statementEntered();
+			}
 		}

 		public function beginDrag( mouseEvent: MouseEvent ):void
@@ -164,7 +171,8 @@
 				ds.addData(dPInitiator.gridX,"gx");
 				ds.addData(dPInitiator.gridY,"gy");
 				DragManager.doDrag(dPInitiator,ds,mouseEvent,null);
-			}catch(error:Error)
+			}
+			catch(error:Error)
 			{
 				Alert.show(error.toString());
 			}
@@ -174,143 +182,144 @@
 		//through argument type, reasons and claim
 		public function addArgument(event:MenuEvent):void
 		{
-				if(event.label == "add an argument for this statement")
-				{
-					//create an inference
-					var currInference:Inference = new Inference();
-					//add the inference to map
-					parentMap.addElement(currInference);
-					currInference.visible=false;
-					//create the panel that displays connection information
-					var infoPanel:DisplayArgType = new DisplayArgType;
-					currInference.argType = infoPanel;
-					currInference.argType.inference = currInference;
-					parentMap.addElement(currInference.argType);
-					//add inference to the list of inferences
-					rules.push(currInference);
-					//set the claim of the inference rule to this
-					currInference.claim = this;
-					//create a reason node
-					var reason:ArgumentPanel = new ArgumentPanel();
-					//add reason to the map
-					parentMap.addElement(reason);
-					//push reason to the list of reasons belonging to this particular class
-					currInference.reasons.push(reason);
+			if(event.label == "add an argument for this statement")
+			{

-					//temporary, should be replaced by TID
-					currInference.connectionIDs.push(Inference.connections++);
-					//set the inference of the reason
-					reason.inference = currInference;
-					//register the reason
-					parentMap.layoutManager.registerPanel(reason);
-					//create an invisible box for the inference rule corresponding to the claim
-					var tmpInput:DynamicTextArea = new DynamicTextArea();
-					//add it to the map
-					parentMap.addElement(tmpInput);
-					//set the input box as invisible
-					tmpInput.visible = false;
-					//logical
-					//set the panel to which the input box belongs
-					tmpInput.panelReference = currInference;
-					//add a pointer to the input
-					currInference.input.push(tmpInput);
-					//binding
-					tmpInput.forwardList.push(currInference.input1);
-					input1.forwardList.push(currInference.input[0]);
-					tmpInput.aid = input1.aid;
-
-					//create an invisible box for the reason
-					var tmpInput2:DynamicTextArea = new DynamicTextArea();
-					tmpInput2.aid = reason.input1.aid;
-					parentMap.addElement(tmpInput2);
-					tmpInput2.visible = false;
-					tmpInput2.panelReference = currInference;
-					currInference.input.push(tmpInput2);
-
-					tmpInput2.forwardList.push(currInference.input1);
-					reason.input1.forwardList.push(tmpInput2);
-					parentMap.layoutManager.registerPanel(currInference);
-				}
+			}
 		}

 		public function addHandler(event:MouseEvent):void
 		{
-			var menu:Menu = Menu.createMenu(null,addMenuData,false);
-			menu.labelField = "@label";
-			menu.addEventListener(MenuEvent.ITEM_CLICK, addArgument);
-			var globalPosition:Point = localToGlobal(new Point(0,this.height));
-			menu.show(globalPosition.x,globalPosition.y);
+			//var menu:Menu = Menu.createMenu(null,addMenuData,false);
+			//menu.labelField = "@label";
+			//menu.addEventListener(MenuEvent.ITEM_CLICK, addArgument);
+			//var globalPosition:Point = localToGlobal(new Point(0,this.height));
+			//menu.show(globalPosition.x,globalPosition.y);
+			//create an inference
+			var currInference:Inference = new Inference();
+			//add the inference to map
+			parentMap.addElement(currInference);
+			currInference.visible=false;
+			//create the panel that displays connection information
+			var infoPanel:DisplayArgType = new DisplayArgType;
+			currInference.argType = infoPanel;
+			currInference.argType.inference = currInference;
+			parentMap.addElement(currInference.argType);
+			//add inference to the list of inferences
+			rules.push(currInference);
+			//set the claim of the inference rule to this
+			currInference.claim = this;
+			//create a reason node
+			var reason:ArgumentPanel = new ArgumentPanel();
+			//add reason to the map
+			parentMap.addElement(reason);
+			//push reason to the list of reasons belonging to this particular class
+			currInference.reasons.push(reason);
+
+			//temporary, should be replaced by TID
+			currInference.connectionIDs.push(Inference.connections++);
+			//set the inference of the reason
+			reason.inference = currInference;
+			//register the reason
+			parentMap.layoutManager.registerPanel(reason);
+			//create an invisible box for the inference rule corresponding to the claim
+			var tmpInput:DynamicTextArea = new DynamicTextArea();
+			//add it to the map
+			parentMap.addElement(tmpInput);
+			//set the input box as invisible
+			tmpInput.visible = false;
+			//logical
+			//set the panel to which the input box belongs
+			tmpInput.panelReference = currInference;
+			//add a pointer to the input
+			currInference.input.push(tmpInput);
+			//binding
+			tmpInput.forwardList.push(currInference.input1);
+			input1.forwardList.push(currInference.input[0]);
+			tmpInput.aid = input1.aid;
+
+			//create an invisible box for the reason
+			var tmpInput2:DynamicTextArea = new DynamicTextArea();
+			tmpInput2.aid = reason.input1.aid;
+			parentMap.addElement(tmpInput2);
+			tmpInput2.visible = false;
+			tmpInput2.panelReference = currInference;
+			currInference.input.push(tmpInput2);
+
+			tmpInput2.forwardList.push(currInference.input1);
+			reason.input1.forwardList.push(tmpInput2);
+			parentMap.layoutManager.registerPanel(currInference);
 		}

 		public function checkForEnter(event:KeyboardEvent):void{
 			/*
 			if(event.keyCode==Keyboard.ENTER){
-				MODE=0;
-				// add Reason only
-				var reason:ArgumentPanel = new ArgumentPanel();
-				reason.x = this.gridY*25 + this.width + 100;
-				reason.y = this.gridX*25;
-				//add reason to the map
-				parentMap.addElement(reason);
-
-				Alert.show("Select reason to be Universal or Particular statement, by clicking on its label on top");
-
-				//line saying "therefore" joining claim and reason temporarily
-				thereforeLine.graphics.moveTo(this.width-10,this.height/2);
-				thereforeLine.graphics.lineTo(this.width+100,this.height/2);
-				thereforeText = new Label;
-				thereforeText.x = this.gridY*25+this.width + 10; thereforeText.y = this.gridX*25+50;
-				parentMap.addElement(thereforeText);
-				thereforeText.text = "<== Therefore";
-
-				var currInference:Inference = new Inference();
-				parentMap.addElement(currInference);
-				currInference.visible = false; currInference.argType.visible = false;
-				currInference.claim = this;
-				currInference.reasons.push(reason);
-
-				currInference.connectionIDs.push(Inference.connections++);
-
-				reason.inference = currInference;
-
-				//create an invisible box for the inference rule corresponding to the claim
-				var tmpInput:DynamicTextArea = new DynamicTextArea();
-				parentMap.addElement(tmpInput);
-				//set the input box as invisible
-				tmpInput.visible = false;
-				//logical
-				//set the panel to which the input box belongs
-				tmpInput.panelReference = currInference;
-				//add a pointer to the input
-				currInference.input.push(tmpInput);
-
-				//binding
-				tmpInput.forwardList.push(currInference.input1);
-				input1.forwardList.push(currInference.input[0]);
-
-				//set the id of the new text box to the id of the one in the reason
-				tmpInput.aid = input1.aid;
-
-
-				//create an invisible box for the reason
-				var tmpInput2:DynamicTextArea = new DynamicTextArea();
-				//set its id to the DTA's id present in the reason
-				tmpInput2.aid = reason.input1.aid;
-				parentMap.addElement(tmpInput2);
-				tmpInput2.visible = false;
-				tmpInput2.panelReference = currInference;
-				currInference.input.push(tmpInput2);
-
-				tmpInput2.forwardList.push(currInference.input1);
-				reason.input1.forwardList.push(tmpInput2);
-				input1.forwardUpdate();		//claim
-				reason.input1.forwardUpdate();		//reason
-
-
-				// deactive the DONE button to avoid duplicate action
-				doneBtn.removeEventListener(MouseEvent.CLICK,doneHandler);
-
+			MODE=0;
+			// add Reason only
+			var reason:ArgumentPanel = new ArgumentPanel();
+			reason.x = this.gridY*25 + this.width + 100;
+			reason.y = this.gridX*25;
+			//add reason to the map
+			parentMap.addElement(reason);
+
+			Alert.show("Select reason to be Universal or Particular statement, by clicking on its label on top");
+
+			//line saying "therefore" joining claim and reason temporarily
+			thereforeLine.graphics.moveTo(this.width-10,this.height/2);
+			thereforeLine.graphics.lineTo(this.width+100,this.height/2);
+			thereforeText = new Label;
+			thereforeText.x = this.gridY*25+this.width + 10; thereforeText.y = this.gridX*25+50;
+			parentMap.addElement(thereforeText);
+			thereforeText.text = "<== Therefore";
+
+			var currInference:Inference = new Inference();
+			parentMap.addElement(currInference);
+			currInference.visible = false; currInference.argType.visible = false;
+			currInference.claim = this;
+			currInference.reasons.push(reason);
+
+			currInference.connectionIDs.push(Inference.connections++);
+
+			reason.inference = currInference;
+
+			//create an invisible box for the inference rule corresponding to the claim
+			var tmpInput:DynamicTextArea = new DynamicTextArea();
+			parentMap.addElement(tmpInput);
+			//set the input box as invisible
+			tmpInput.visible = false;
+			//logical
+			//set the panel to which the input box belongs
+			tmpInput.panelReference = currInference;
+			//add a pointer to the input
+			currInference.input.push(tmpInput);
+
+			//binding
+			tmpInput.forwardList.push(currInference.input1);
+			input1.forwardList.push(currInference.input[0]);
+
+			//set the id of the new text box to the id of the one in the reason
+			tmpInput.aid = input1.aid;
+
+
+			//create an invisible box for the reason
+			var tmpInput2:DynamicTextArea = new DynamicTextArea();
+			//set its id to the DTA's id present in the reason
+			tmpInput2.aid = reason.input1.aid;
+			parentMap.addElement(tmpInput2);
+			tmpInput2.visible = false;
+			tmpInput2.panelReference = currInference;
+			currInference.input.push(tmpInput2);
+
+			tmpInput2.forwardList.push(currInference.input1);
+			reason.input1.forwardList.push(tmpInput2);
+			input1.forwardUpdate();		//claim
+			reason.input1.forwardUpdate();		//reason
+
+
+			// deactive the DONE button to avoid duplicate action
+			doneBtn.removeEventListener(MouseEvent.CLICK,doneHandler);
+
 			}
 			*/
 		}
@@ -329,7 +338,8 @@
 			}
 		}

-		public function doneHandler(d:MouseEvent):void{
+		public function statementEntered():void
+		{
 			makeUnEditable();
 			input1.forwardUpdate();
 			if(inference!=null && inference.formedBool == false)
@@ -340,40 +350,22 @@
 				var globalPosition:Point = localToGlobal(new Point(0,this.height));
 				menu.show(globalPosition.x,globalPosition.y);
 			}
-			/*
-			if(MODE==1){ //only reason has been added, inference is invisible and not pushed to claim.rules
-				var correspClaim:ArgumentPanel = this.inference.claim;
-				correspClaim.rules.push(this.inference);
-				parentMap.layoutManager.registerPanel(this);
-				parentMap.layoutManager.registerPanel(this.inference);
-				this.inference.makeVisible();
-				parentMap.removeElement(correspClaim.thereforeText);
-				correspClaim.thereforeLine.graphics.clear();
-
-				Alert.show("Select Argument Scheme from the list");
-				var simulatedClick:MouseEvent = new MouseEvent(MouseEvent.CLICK);
-				this.inference.scheme.dispatchEvent(simulatedClick);
-
-			}
-			else { //this is also a claim. so "done" should not do anything special. here done should be equivalent to hitting 'enter'
-				if(this.rules.length==0) {//open ended claim. Enter has not been hit yet
-					var simulatedEnter:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN);
-					simulatedEnter.keyCode = Keyboard.ENTER;
-					input1.dispatchEvent(simulatedEnter);
-				}
-			}
-			*/
-		}
-
+		}
+
+		public function doneHandler(d:MouseEvent):void
+		{
+			statementEntered();
+		}
+
 		public function getString():String{
 			return input1.text;
 		}
-
+
 		public function textBoxClicked(event:MouseEvent):void{
 			if(this.inference==null)
 				event.target.text = "";
 		}
-
+
 		public function movedAway(event:MouseEvent):void{
 			if(event.target.text == ""){
 				event.target.text = "[Enter your claim/reason]. Pressing Enter afterwards will prompt you for a reason";
@@ -415,9 +407,9 @@
 			input1.panelReference = this;
 			input1.toolTip = "Otherwise, if you wish to start with Argument Scheme, click on the Add arg button below (do NOT press enter too)";
 			if(this.panelType==ARGUMENT_PANEL) {
-			//input1.addEventListener(MouseEvent.CLICK,textBoxClicked);
-			//input1.addEventListener(MouseEvent.MOUSE_OUT,movedAway);
-			input1.addEventListener(KeyboardEvent.KEY_DOWN,checkForEnter); }
+				//input1.addEventListener(MouseEvent.CLICK,textBoxClicked);
+				//input1.addEventListener(MouseEvent.MOUSE_OUT,movedAway);
+				input1.addEventListener(KeyboardEvent.KEY_DOWN,checkForEnter); }

 			//Create the label for displaying the statement
 			//displayLbl = new Label;
@@ -466,8 +458,7 @@
 			deleteBtn.label = "delete...";
 			bottomHG.addElement(deleteBtn);
 			addBtn.addEventListener(MouseEvent.CLICK,addHandler);
-			bottomHG.visible = false;
-
+			bottomHG.visible = false;
 		}

 		public function onArgumentPanelCreate(e:FlexEvent):void
@@ -492,7 +483,7 @@
 			displayTxt.text = input1.text;
 			displayTxt.width = input1.width;
 			displayTxt.height = input1.height;
-
+
 		}

 		public function toggle(m:MouseEvent):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 3139
Author:   jimurphy@adobe.com
Date:     2008-09-08T15:42:37.788151Z

Log Message:
-----------
Merged 3.0.x revisions [3074,3079-3080,3086,3094,3096,3098,3101-3102,3104,3108,3114,3123,3125-3126] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FocusRequestDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/NetConnectionChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/SecurityUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InvalidateRequestData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/framework/src/mx/managers/ISystemManager.as
+++ frameworks/projects/framework/src/mx/managers/ISystemManager.as
@@ -394,12 +394,17 @@
     function removeChildBridge(bridge:IEventDispatcher):void;

 	/**
-	 *  dispatch the event to all sandboxes except the specified one
-	 *
-     *  @param event Event to dispatch
-     *  @param skip IEventDispatcher to not dispatch from
-     *  @param trackClones Whether to keep a reference to the events as they are dispatched
-     *  @param toOtherSystemManagers Whether to dispatch to other top level SystemManagers
+	 *  Dispatch a message to all parent and child applications in this SystemManager's SWF bridge group, regardless of
+	 *  whether they are in the same SecurityDomain or not. You can optionally exclude an application with this method's parameters.
+	 *
+     	 *  @param event The event to dispatch.
+     	 *
+     	 *  @param skip Specifies an IEventDispatcher that you do not want to dispatch a message to. This is typically used to skip the
+     	 *  IEventDispatcher that originated the event.
+	 *
+     	 *  @param trackClones Whether to keep a reference to the events as they are dispatched.
+     	 *
+     	 *  @param toOtherSystemManagers Whether to dispatch the event to other top-level SystemManagers in AIR.
 	 */
 	function dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null, trackClones:Boolean = false, toOtherSystemManagers:Boolean = false):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 10475
Author:   jimurphy@adobe.com
Date:     2009-09-21T23:58:45.057679Z

Log Message:
-----------
Merged 3.x revisions 10063,10086,10098,10123,10176,10397,10416-10418,10420 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/SortField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as
@@ -353,6 +353,15 @@
         // Shut down locally.
         setConnected(false);
         super.internalDisconnect(rejected);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function internalSend(msgResp:MessageResponder):void
+    {
+        handleReconnectWithSessionId(); // Adjust the session id, in case it's needed.
+        super.internalSend(msgResp);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 10357
Author:   jimurphy@adobe.com
Date:     2009-09-17T21:13:02.502084Z

Log Message:
-----------
Merged beta2 revisions 10309,10320-10321,10333-10335,10342,10347-10348 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeClassInfo.java</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/TLFText.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/TypeAnalyzer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ApplicationSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -1450,6 +1450,138 @@
 	{
 		return super.transform;
 	}
+
+    /**
+     *  Sets the x coordinate for the transform center of the component.
+     *
+     *
When this object is the target of a Spark transform effect,
+     *  you can override this property by setting
+     *  the AnimateTransform.autoCenterTransform property.
+     *  If autoCenterTransform is false, the transform
+     *  center is determined by the transformX,
+     *  transformY, and transformZ properties
+     *  of the effect target.
+     *  If autoCenterTransform is true,
+     *  the effect occurs around the center of the target,
+     *  (width/2, height/2).

+     *
+     *
Setting this property on the Spark effect class
+     *  overrides the setting on the target object.

+     *
+     *  @see spark.effects.AnimateTransform#autoCenterTransform
+     *  @see spark.effects.AnimateTransform#transformX
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get transformX():Number
+    {
+        return (_layoutFeatures == null)? 0 : _layoutFeatures.transformX;
+    }
+
+    /**
+     *  @private
+     */
+    public function set transformX(value:Number):void
+    {
+        if (transformX == value)
+            return;
+        if (_layoutFeatures == null)
+            initAdvancedLayoutFeatures();
+        _layoutFeatures.transformX = value;
+        invalidateTransform();
+        invalidateParentSizeAndDisplayList();
+    }
+
+    /**
+     *  Sets the y coordinate for the transform center of the component.
+     *
+     *
When this object is the target of a Spark transform effect,
+     *  you can override this property by setting
+     *  the AnimateTransform.autoCenterTransform property.
+     *  If autoCenterTransform is false, the transform
+     *  center is determined by the transformY,
+     *  transformY, and transformZ properties
+     *  of the effect target.
+     *  If autoCenterTransform is true,
+     *  the effect occurs around the center of the target,
+     *  (width/2, height/2).

+     *
+     *
Setting this property on the Spark effect class
+     *  overrides the setting on the target object.

+     *
+     *  @see spark.effects.AnimateTransform#autoCenterTransform
+     *  @see spark.effects.AnimateTransform#transformY
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get transformY():Number
+    {
+        return (_layoutFeatures == null)? 0 : _layoutFeatures.transformY;
+    }
+
+    /**
+     *  @private
+     */
+    public function set transformY(value:Number):void
+    {
+        if (transformY == value)
+            return;
+        if (_layoutFeatures == null)
+            initAdvancedLayoutFeatures();
+        _layoutFeatures.transformY = value;
+        invalidateTransform();
+        invalidateParentSizeAndDisplayList();
+    }
+
+    /**
+     *  Sets the z coordinate for the transform center of the component.
+     *
+     *
When this object is the target of a Spark transform effect,
+     *  you can override this property by setting
+     *  the AnimateTransform.autoCenterTransform property.
+     *  If autoCenterTransform is false, the transform
+     *  center is determined by the transformZ,
+     *  transformY, and transformZ properties
+     *  of the effect target.
+     *  If autoCenterTransform is true,
+     *  the effect occurs around the center of the target,
+     *  (width/2, height/2).

+     *
+     *
Setting this property on the Spark effect class
+     *  overrides the setting on the target object.

+     *
+     *  @see spark.effects.AnimateTransform#autoCenterTransform
+     *  @see spark.effects.AnimateTransform#transformZ
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get transformZ():Number
+    {
+        return (_layoutFeatures == null)? 0 : _layoutFeatures.transformZ;
+    }
+
+    /**
+     *  @private
+     */
+    public function set transformZ(value:Number):void
+    {
+        if (transformZ == value)
+            return;
+        if (_layoutFeatures == null)
+            initAdvancedLayoutFeatures();
+        _layoutFeatures.transformZ = value;
+        invalidateTransform();
+        invalidateParentSizeAndDisplayList();
+    }

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


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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.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.
+// foo
+////////////////////////////////////////////////////////////////////////////////

 package spark.layouts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3581
Author:   egeorgie@adobe.com
Date:     2008-10-10T23:52:26.296427Z

Log Message:
-----------
Fix for "http://bugs.adobe.com/jira/browse/SDK-15886 percentSize is not consistent between GraphicElement and UIComponent"

Reviewed by Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -40,7 +40,7 @@

     private static function calculatePercentHeight( layoutItem:ILayoutItem, height:Number ):Number
     {
-    	var percentHeight:Number = LayoutItemHelper.pinBetween( layoutItem.percentSize.y * height,
+    	var percentHeight:Number = LayoutItemHelper.pinBetween(layoutItem.percentSize.y * 0.01 * height,
     	                                                       layoutItem.minSize.y,
     	                                                       layoutItem.maxSize.y );
     	return percentHeight < height ? percentHeight : height;
@@ -939,7 +939,7 @@

                 childInfo = new HLayoutItemFlexChildInfo();
                 childInfo.layoutItem = layoutItem;
-                childInfo.percent    = layoutItem.percentSize.x * 100;
+                childInfo.percent    = layoutItem.percentSize.x;
                 childInfo.min        = layoutItem.minSize.x;
                 childInfo.max        = layoutItem.maxSize.x;

@@ -959,7 +959,6 @@
         // Distribute the extra space among the flexible children
         if (totalPercentWidth)
         {
-            totalPercentWidth *= 100;
             spaceToDistribute = Flex.flexChildrenProportionally(width,
                                                                 spaceToDistribute,
                                                                 totalPercentWidth,


Transferred from the Adobe Open Source Subversion Repository

Revision: 13046
Author:   hneelu@adobe.com
Date:     2009-12-17T12:34:07.695337Z

Log Message:
-----------
Updating automation sources..

Modified Paths:
--------------
451 paths were modified

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as
@@ -113,7 +113,8 @@
 		 */
 		override public function get automationValue():Array
 		{
-			return [ slider.value.toString() ];
+			//return [ slider.value.toString() ];
+			return super.automationValue;
 		}

 		/**
@@ -227,10 +228,13 @@
 			{
 				// the event does not give the details of the value. So we need to provide this
 				// so that replay can happen accordingly
-				var valueChangeEvent:SparkValueChangeAutomationEvent =
-					new SparkValueChangeAutomationEvent(
-						SparkValueChangeAutomationEvent.CHANGE,false,false,slider.value);
-				recordAutomatableEvent(valueChangeEvent);
+				if(!(isNaN(slider.value)))
+				{
+					var valueChangeEvent:SparkValueChangeAutomationEvent =
+						new SparkValueChangeAutomationEvent(
+							SparkValueChangeAutomationEvent.CHANGE,false,false,slider.value);
+					recordAutomatableEvent(valueChangeEvent);
+				}
 			}
 			else
 			{


Transferred from the Adobe Open Source Subversion Repository

Revision: 22304
Author:   chiedozi@adobe.com
Date:     2011-08-30T23:27:46.960143Z

Log Message:
-----------
Made a small change to SplitViewNavigator that ensures a navigator is visible and includedInLayout before the callout is open

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

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as

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

--- frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
@@ -379,10 +379,12 @@

         viewNavigatorCallout.addEventListener('mouseDownOutside', navigatorCallout_mouseDownOutsideHandler, false, 0, true);
         viewNavigatorCallout.addElement(_calloutNavigator);
-        viewNavigatorCallout.open(owner, true);

         // Make sure the first navigator is visible
         _calloutNavigator.visible = true;
+
+        // Open the callout
+        viewNavigatorCallout.open(owner, true);
     }

     /**


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

--- frameworks/projects/framework/src/mx/core/IProgrammaticSkin.as
+++ frameworks/projects/framework/src/mx/core/IProgrammaticSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4460
Author:   gosmith@adobe.com
Date:     2009-01-09T01:53:33.590972Z

Log Message:
-----------
Renamed UIComponentAccImpl to UIComponentAccProps because it extends AccessibilityProperties, not AccessibilityImplementation.

Added comments with the identifier for each magic role constant, so that it is easier to understand what roles our components are using.

Moved two static methods from UIComponentAccProperties to AccImpl because they make more sense there.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: None (no functional changes)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as" copyfrom-rev="4437" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/DataGridAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/DataGridAccImpl.as
@@ -190,10 +190,7 @@
 	 */
 	override public function get_accRole(childID:uint):uint
 	{
-		if (childID == 0)
-			return role;
-
-		return ROLE_SYSTEM_LISTITEM;
+		return childID == 0 ? role : ROLE_SYSTEM_LISTITEM;
 	}

 	/**
@@ -404,7 +401,6 @@
 		var childIDs:Array = [];

 		var dataGrid:DataGrid = DataGrid(master);
-
 		if (dataGrid.dataProvider)
 		{
 			// 0 is DataGrid, 1 to columnCount * Rows -> ItemRenderers
@@ -419,6 +415,7 @@
 				childIDs[i] = i + 1;
 			}
 		}
+
 		return childIDs;
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 13159
Author:   clucier@adobe.com
Date:     2009-12-22T20:07:04.606773Z

Log Message:
-----------
Reverting suspect change (13130) by Steve Breinberg's request.

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

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
@@ -6349,10 +6349,10 @@
         {
             var item:DisplayObject = lastRowItems[i];
             var yOffset:Number = item.y - rowY;
-            if (item is IUITextField && !IUITextField(item).embedFonts)
-                item.height = Math.max(rowHeight - yOffset, 0);
+            if (item is IUITextField)
+                item.height = rowHeight - yOffset;
             else
-                item.mask = createItemMask(0, rowY + yOffset, rowWidth, Math.max(rowHeight - yOffset, 0));
+                item.mask = createItemMask(0, rowY + yOffset, rowWidth, rowHeight - yOffset);
         }
     }

@@ -6432,7 +6432,7 @@
         for (var i:int = 0; i < numColumns; i++)
         {
             var item:DisplayObject = lastRowItems[i];
-            if (item is IUITextField && !IUITextField(item).embedFonts)
+            if (item is IUITextField)
             {
                 if (item.height != rowHeight - (item.y - lastRowInfo.y))
                     item.height = rowHeight - (item.y - lastRowInfo.y);


Transferred from the Adobe Open Source Subversion Repository

Revision: 11469
Author:   smgilson@adobe.com
Date:     2009-11-05T18:27:49.211775Z

Log Message:
-----------
ASDoc localization bug fixes - Part II

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/IItemRendererOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>

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

--- frameworks/projects/airspark/src/spark/components/WindowedApplication.as
+++ frameworks/projects/airspark/src/spark/components/WindowedApplication.as
@@ -79,7 +79,7 @@

 /**
  *  Provides a margin of error around a window's border so a resize
- *  and be more easily started. A click on a window is considered a
+ *  can be more easily started. A click on a window is considered a
  *  click on the window's border if the click occurs with the resizeAffordance
  *  number of pixels from the outside edge of the window.
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 4790
Author:   jimurphy@adobe.com
Date:     2009-02-02T18:13:13.580538Z

Log Message:
-----------
Merged 3.x revisions 4710-4711,4741,4746-4747,4755,4777,4787 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/NumberBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloFocusRect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
@@ -1201,10 +1201,13 @@
      *  Internal function to allow the DataGrid to set the width of the
      *  column without locking it as an explicitWidth
      */
-    mx_internal function setWidth(value:Number):void
-    {
-        _width = value;
-    }
+     mx_internal function setWidth(value:Number):void
+     {
+         var oldValue:Number = _width;
+         _width = value;
+         if (oldValue != value)
+             dispatchEvent(new Event("widthChanged"));
+     }

     //----------------------------------
     //  wordWrap


started new algorithm for remembering the path of the snake head

--- src/Mukik.as
+++ src/Mukik.as
@@ -20,7 +20,7 @@
 		private var rocks:Array = new Array();
 		public var symbol:SymRock;
 		private var symRocks:Array = new Array();
-		//public var boxMap:Object = new Object();  //hopefully dont need this
+
 		public var size:int = 3; //length of the snake
 		public var snakeBods:Array = new Array();
 		public var bod:SnakeBod;
@@ -33,6 +33,9 @@
 		public var dir:String; //l,r,u,d for the direction the snake is going.
 		public var turn:Boolean = false;
 		public var bounce:Boolean = false;
+		private var path: Array = new Array(size+1);  //this three dimensional array holds the number of snake body segments (including the tail) of path[i][x,y,r] = [x position, y position, and rotation being 0,1,2,3] for 0=vertical 1=90 degrees clockwise 2=180 and 3=270!  This will be stored 10 times for each segment to follow the path of the snake head.
+		private var pCount:int = 0; //path counter
+		private var bodyCount:int = 0;  // counter for active body
 		public function Mukik()
 		{
 			board =
@@ -91,7 +94,8 @@
 				}
 			}

-			addObject(snake, 200, 50);
+			addObject(snake, 200, 50);
+			path[0][0] = [snake.x, snake.y, 1];
 			addBody(size);
 			dir = 'r';
 		}
@@ -108,27 +112,55 @@
 		public function addBody(size:int):void {

 			//Add the body segments
-			var p:int = 0;    //placeholder for putting on the snake bods
+
 			for(var i:int = 0; i<size; i++){
 				bod = new SnakeBod();
-				p += b;
-				addObject(bod, snake.x-p, snake.y);
+
+				addObject(bod, path[i][0], path[i][1]);	//use path to place the bodies
 				bod.rotation = 90;
 				snakeBods.push(bod);
 			}
-			p += b;
-			addObject(tail,snake.x-p, snake.y);
+
+			addObject(tail,path[size][0], path[size][1]);
 			tail.rotation = 90;
 			snakeBods.push(tail);
 		}
-
+		public function addPath(x:int, y:int, r:int):void {
+			var rot:int;
+			if (r == 0) {rot=0;}
+			else if (r == 90) {rot=1;}
+			else if (r == 180) {rot=2;}
+			else {rot=3;}
+			while(pCount < 10) {
+				path[0][pCount] = [x,y,rot];
+			}
+			if (pCount == 10) {
+				pCount = 0;
+				for(var i:int = 0; i < size; i++) {
+					path.pop();
+					path[i] = path[i+1];
+				}
+
+				bodyCount += 1;
+
+				if (bodyCount == size+1) {
+					bodyCount = 0;
+				}
+			}
+			if (r == 0) {rot=0;}
+			else if (r == 90) {rot=1;}
+			else if (r == 180) {rot=2;}
+			else {rot=3;}
+
+			pCount += 1;
+		}

 		public function enterFrameHandler(event:Event):void {
 			//var p:int = 0;
 			snake.x += vx;
 			snake.y += vy;
-
+			addPath(snake.x, snake.y, snake.rotation);
 			for(var i:int = 0; i<size+1; i++) {
 				snakeBods[i].x += vx;
 				snakeBods[i].y += vy;


Transferred from the Adobe Open Source Subversion Repository

Revision: 21943
Author:   chiedozi@adobe.com
Date:     2011-08-12T00:03:34.288366Z

Log Message:
-----------
ActionBar ViewTransitions now use TransformOffsets instead of moving the x and y values of the components

QE notes:
Doc notes:
Bugs: SDK-30839
Reviewer: Evtim
Tests run: checkintests, mustella-mobile
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
@@ -27,6 +27,7 @@
 import mx.effects.Parallel;
 import mx.events.EffectEvent;
 import mx.events.FlexEvent;
+import mx.geom.TransformOffsets;

 import spark.components.ActionBar;
 import spark.components.Group;
@@ -36,6 +37,7 @@
 import spark.components.supportClasses.ButtonBarBase;
 import spark.components.supportClasses.ViewNavigatorBase;
 import spark.effects.Animate;
+import spark.effects.Fade;
 import spark.effects.animation.MotionPath;
 import spark.effects.animation.SimpleMotionPath;
 import spark.effects.easing.IEaser;
@@ -819,10 +821,12 @@
      */
     protected function createActionBarEffect():IEffect
     {
+        var transformOffsets:TransformOffsets;
         var slideDistance:Number;
         var animatedProperty:String;

         var actionBarSkin:UIComponent = actionBar.skin;
+        var slideTargets:Array = new Array();
         var fadeOutTargets:Array = new Array();
         var fadeInTargets:Array = new Array();

@@ -834,12 +838,12 @@
         transitionGroup = new Group();
         transitionGroup.autoLayout = false;
         transitionGroup.includeInLayout = false;
-        addComponentToContainer(transitionGroup, actionBarSkin);
         transitionGroup.width = actionBar.width;
         transitionGroup.height = actionBar.height;
+        addComponentToContainer(transitionGroup, actionBarSkin);

         // Construct our parallel effect.
-        var effect:Parallel = new Parallel();
+        var actionBarEffect:Parallel = new Parallel();

         // Calculate the slide distance based on direction.
         switch (actionBarTransitionDirection)
@@ -884,12 +888,19 @@

             if (titleComponent)
             {
+                // Initialize the transformation offests
+                transformOffsets = new TransformOffsets();
+                transformOffsets[animatedProperty] = slideDistance;
+                slideTargets.push(transformOffsets);
+
                 // Initialize titleGroup
                 titleComponent.cacheAsBitmap = true;
                 titleComponent.alpha = 0;
-                titleComponent[animatedProperty] += slideDistance;
+                titleComponent.postLayoutTransformOffsets = transformOffsets;
                 fadeInTargets.push(titleComponent);

+                // We reparent the titleComponent into the transition group so
+                // that the items are properly clipped when animating vertically
                 if (verticalTransition)
                     transitionGroup.addElementAt(titleComponent, 0);
             }
@@ -916,89 +927,118 @@
         {
             if (endView.navigationContent)
             {
-                actionBar.navigationGroup[animatedProperty] += slideDistance;
+                // Initialize the transformation offests
+                transformOffsets = new TransformOffsets();
+                transformOffsets[animatedProperty] = slideDistance;
+                slideTargets.push(transformOffsets);
+
+                actionBar.navigationGroup.postLayoutTransformOffsets = transformOffsets;
                 actionBar.navigationGroup.cacheAsBitmap = true;
                 actionBar.navigationGroup.alpha = 0;
                 fadeInTargets.push(actionBar.navigationGroup);
+
+                // We reparent the titleComponent into the transition group so
+                // that the items are properly clipped when animating vertically
                 if (verticalTransition)
                     transitionGroup.addElementAt(actionBar.navigationGroup, 0);
             }

             if (endView.actionContent)
             {
-                actionBar.actionGroup[animatedProperty] += slideDistance;
+                // Initialize the transformation offests
+                transformOffsets = new TransformOffsets();
+                transformOffsets[animatedProperty] = slideDistance;
+                slideTargets.push(transformOffsets);
+
+                actionBar.actionGroup.postLayoutTransformOffsets = transformOffsets;
                 actionBar.actionGroup.cacheAsBitmap = true;
                 actionBar.actionGroup.alpha = 0;
                 fadeInTargets.push(actionBar.actionGroup);
+
+                // We reparent the titleComponent into the transition group so
+                // that the items are properly clipped when animating vertically
                 if (verticalTransition)
                     transitionGroup.addElementAt(actionBar.actionGroup, 0);
             }
         }

+        // Add transform offsets to slide target array
+
         // Ensure bitmaps are rendered prior to invocation of our effect.
         transitionGroup.validateNow();

-        // Setup fade out targets.
-        if (!verticalTransition && cachedNavigationGroup)
+
+        // Setup fade out targets
+        if (cachedTitleGroup)
+        {
+            // Initialize the transformation offests
+            transformOffsets = new TransformOffsets();
+            slideTargets.push(transformOffsets);
+
+            cachedTitleGroup.postLayoutTransformOffsets = transformOffsets;
+            fadeOutTargets.push(cachedTitleGroup.displayObject);
+        }
+
+        if (cachedNavigationGroup)
+        {
+            // Initialize the transformation offests
+            transformOffsets = new TransformOffsets();
+            slideTargets.push(transformOffsets);
+
+            cachedNavigationGroup.postLayoutTransformOffsets = transformOffsets;
             fadeOutTargets.push(cachedNavigationGroup.displayObject);
-
-        if (!verticalTransition && cachedActionGroup)
+        }
+
+        if (cachedActionGroup)
+        {
+            // Initialize the transformation offests
+            transformOffsets = new TransformOffsets();
+            slideTargets.push(transformOffsets);
+
+            cachedActionGroup.postLayoutTransformOffsets = transformOffsets;
             fadeOutTargets.push(cachedActionGroup.displayObject);
-
-        // if there are no targets don't create an effect; just return null
-        if (fadeOutTargets.length == 0 && fadeInTargets.length == 0)
+        }
+
+        // If no fade effects we aren't animating anything so return null
+        if (fadeInTargets.length == 0 && fadeOutTargets.length == 0)
             return null;

-        // Fade out action and navigation content
-        var fadeOut:Animate = new Animate();
-        vector = new Vector.<MotionPath>();
-        vector.push(new SimpleMotionPath("alpha", 1, 0));
-        fadeOut.motionPaths = vector;
-        fadeOut.targets = fadeOutTargets;
-        fadeOut.duration = duration * .7;
-
-        // Fade out and slide old select content
-        var animation:Animate = new Animate();
+        // Create fade in effect
+        if (fadeInTargets.length > 0)
+        {
+            var fadeInEffect:Fade = new Fade();
+            fadeInEffect.targets = fadeInTargets;
+            fadeInEffect.duration = duration;
+            fadeInEffect.alphaFrom = 0;
+            fadeInEffect.alphaTo = 1;
+            actionBarEffect.addChild(fadeInEffect);
+        }
+
+        // Create fade out effect
+        if (fadeOutTargets.length > 0)
+        {
+            var fadeOutEffect:Fade = new Fade();
+            fadeOutEffect.targets = fadeOutTargets;
+            fadeOutEffect.duration = duration;
+            fadeOutEffect.alphaFrom = 1;
+            fadeOutEffect.alphaTo = 0;
+            actionBarEffect.addChild(fadeOutEffect);
+        }
+
+        // Create slide in effect
         var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
-        vector.push(new SimpleMotionPath("alpha", 1, 0));
         vector.push(new SimpleMotionPath(animatedProperty, null, null, -slideDistance));
-        animation.motionPaths = vector;
-        animation.easer = new spark.effects.easing.Sine(.7);
-
-        // Setup simultaneous fade out and slide targets.
-        var fadeOutSlideTargets:Array = new Array();
-
-        if (cachedTitleGroup)
-            fadeOutSlideTargets.push(cachedTitleGroup.displayObject);
-
-        if (cachedActionGroup && verticalTransition)
-            fadeOutSlideTargets.push(cachedActionGroup.displayObject);
-
-        if (cachedNavigationGroup && verticalTransition)
-            fadeOutSlideTargets.push(cachedNavigationGroup.displayObject);
-
-        if (fadeOutSlideTargets.length)
-        {
-            animation.targets = fadeOutSlideTargets;
-            animation.duration = duration;
-            effect.addChild(animation);
-        }
-
-        // Construct animation for our fade in and slide elements.
-        var fadeAndSlide:Animate = new Animate();
-        vector = new Vector.<MotionPath>();
-        vector.push(new SimpleMotionPath("alpha", 0, 1));
-        vector.push(new SimpleMotionPath(animatedProperty, null, null, -slideDistance));
-        fadeAndSlide.motionPaths = vector;
-        fadeAndSlide.easer = new spark.effects.easing.Sine(.7);
-        fadeAndSlide.targets = fadeInTargets;
-        fadeAndSlide.duration = duration;
-
-        // Add effects to the parallel effect
-        effect.addChild(fadeOut);
-        effect.addChild(fadeAndSlide);
-
-        return effect;
+
+        var moveEffect:Animate = new Animate();
+        moveEffect.targets = slideTargets;
+        moveEffect.motionPaths = vector;
+        moveEffect.easer = new spark.effects.easing.Sine(.7);
+        moveEffect.duration = duration;
+        moveEffect.addEventListener(EffectEvent.EFFECT_UPDATE, actionBarMoveEffect_effectUpdateHandler);
+        moveEffect.addEventListener(EffectEvent.EFFECT_END, actionBarMoveEffect_effectEndedHandler);
+        actionBarEffect.addChild(moveEffect);
+
+        return actionBarEffect;
     }

     /**
@@ -1100,62 +1140,66 @@
                 transitionGroup.removeElement(cachedActionGroup);
                 actionBar.actionGroup.cacheAsBitmap = false;
             }
-
-            // Restore title group and title content to their original state.
-            if (actionBar && actionBar.titleGroup && actionBar.titleGroup.visible)
-                actionBar.titleGroup.cacheAsBitmap = false;
-
-            if (actionBar && actionBar.titleDisplay
-                && (actionBar.titleDisplay is DisplayObject)
-                && DisplayObject(actionBar.titleDisplay).visible)
-            {
-                DisplayObject(actionBar.titleDisplay).cacheAsBitmap = false;
-            }
-
-            // Restore title group and title content to their original home.
-            if (actionBar && verticalTransition)
-            {
-                var titleComponent:UIComponent = actionBar.titleGroup;
-                if (!titleComponent || !titleComponent.visible)
-                    titleComponent = actionBar.titleDisplay as UIComponent;
-
-                if (titleComponent)
-                {
-                    transitionGroup.removeElement(titleComponent);
-                    addComponentToContainer(titleComponent, actionBar.skin);
-                }
-            }
-
-            // Restore navigation group to their proper home.
-            if (endView.navigationContent && actionBar && verticalTransition)
-            {
-                transitionGroup.removeElement(actionBar.navigationGroup);
-                if (actionBar.titleDisplay)
-                {
-                    var childIndex:uint = actionBar.skin.getChildIndex(actionBar.titleDisplay as DisplayObject);
-                    addComponentToContainerAt(actionBar.navigationGroup, actionBar.skin, childIndex);
-                }
-                else
-                    addComponentToContainer(actionBar.navigationGroup, actionBar.skin);
-            }
-
-            // Restore action group to their proper home.
-            if (endView.actionContent && actionBar && verticalTransition)
-            {
-                transitionGroup.removeElement(actionBar.actionGroup);
-                if (actionBar.titleDisplay)
-                {
-                    childIndex = actionBar.skin.getChildIndex(actionBar.titleDisplay as DisplayObject);
-                    addComponentToContainerAt(actionBar.actionGroup, actionBar.skin, childIndex);
-                }
-                else
-                    addComponentToContainer(actionBar.actionGroup, actionBar.skin);
-            }
-
-            removeComponentFromContainer(transitionGroup, actionBar.skin);
-
+
             if (actionBar)
             {
+                // Restore title group and title content to their original state.
+                if (actionBar.titleGroup && actionBar.titleGroup.visible)
+                {
+                    actionBar.titleGroup.postLayoutTransformOffsets = null;
+                    actionBar.titleGroup.cacheAsBitmap = false;
+                }
+
+                if (actionBar.titleDisplay
+                    && (actionBar.titleDisplay is DisplayObject)
+                    && DisplayObject(actionBar.titleDisplay).visible)
+                {
+                    (actionBar.titleDisplay as UIComponent).postLayoutTransformOffsets = null;
+                    DisplayObject(actionBar.titleDisplay).cacheAsBitmap = false;
+                }
+
+                // Restore title group and title content to their original home.
+                if (verticalTransition)
+                {
+                    var titleComponent:UIComponent = actionBar.titleGroup;
+                    if (!titleComponent || !titleComponent.visible)
+                        titleComponent = actionBar.titleDisplay as UIComponent;
+
+                    if (titleComponent)
+                    {
+                        transitionGroup.removeElement(titleComponent);
+                        addComponentToContainer(titleComponent, actionBar.skin);
+                    }
+                }
+
+                // Restore navigation group to their proper home.
+                if (endView.navigationContent && verticalTransition)
+                {
+                    transitionGroup.removeElement(actionBar.navigationGroup);
+                    if (actionBar.titleDisplay)
+                    {
+                        var childIndex:uint = actionBar.skin.getChildIndex(actionBar.titleDisplay as DisplayObject);
+                        addComponentToContainerAt(actionBar.navigationGroup, actionBar.skin, childIndex);
+                    }
+                    else
+                        addComponentToContainer(actionBar.navigationGroup, actionBar.skin);
+                }
+
+                // Restore action group to their proper home.
+                if (endView.actionContent && verticalTransition)
+                {
+                    transitionGroup.removeElement(actionBar.actionGroup);
+                    if (actionBar.titleDisplay)
+                    {
+                        childIndex = actionBar.skin.getChildIndex(actionBar.titleDisplay as DisplayObject);
+                        addComponentToContainerAt(actionBar.actionGroup, actionBar.skin, childIndex);
+                    }
+                    else
+                        addComponentToContainer(actionBar.actionGroup, actionBar.skin);
+                }
+
+                removeComponentFromContainer(transitionGroup, actionBar.skin);
+
                 actionBar.skin.scrollRect = null;

                 // Force actionBar to update content group positions after
@@ -1170,6 +1214,12 @@
                 {
                     actionBar.skin.invalidateDisplayList();
                 }
+
+                if (actionBar.actionGroup)
+                    actionBar.actionGroup.postLayoutTransformOffsets = null;
+
+                if (actionBar.navigationGroup)
+                    actionBar.navigationGroup.postLayoutTransformOffsets = null;
             }

             verticalTransition = false;
@@ -1343,6 +1393,45 @@
     //--------------------------------------------------------------------------

     /**
+     *  @private
+     *  Remove listeners
+     */
+    private function actionBarMoveEffect_effectEndedHandler(event:EffectEvent):void
+    {
+        event.target.removeEventListener(EffectEvent.EFFECT_UPDATE, actionBarMoveEffect_effectUpdateHandler);
+        event.target.removeEventListener(EffectEvent.EFFECT_END, actionBarMoveEffect_effectEndedHandler);
+    }
+
+    /**
+     *  @private
+     *  Since layout is disabled, we need to force validation on all of the
+     *  participating display objects.
+     */
+    private function actionBarMoveEffect_effectUpdateHandler(event:EffectEvent):void
+    {
+        if (actionBar.actionGroup)
+            actionBar.actionGroup.validateDisplayList();
+
+        if (actionBar.navigationGroup)
+            actionBar.navigationGroup.validateDisplayList();
+
+        if (actionBar.titleDisplay)
+            (actionBar.titleDisplay as UIComponent).validateDisplayList();
+
+        if (actionBar.titleGroup)
+            actionBar.titleGroup.validateDisplayList();
+
+        if (cachedTitleGroup)
+            cachedTitleGroup.validateDisplayList();
+
+        if (cachedNavigationGroup)
+            cachedNavigationGroup.validateDisplayList();
+
+        if (cachedActionGroup)
+            cachedActionGroup.validateDisplayList();
+    }
+
+    /**
      * @private
      */
     private function effectComplete(event:EffectEvent):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 19062
Author:   clucier@adobe.com
Date:     2010-12-06T17:47:25.198044Z

Log Message:
-----------
A couple view transition bug fixes.

QE notes: None
Doc notes: None
Bugs: SDK-28774, SDK-28760
Reviewer: Chiedo
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
@@ -146,7 +146,7 @@
     //  Variables
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  @private
      *  Flag set when we've determined that we need to transition the navigator
@@ -190,7 +190,7 @@
     //  Properties
     //
     //--------------------------------------------------------------------------
-
+
     //----------------------------------
     //  duration
     //----------------------------------
@@ -281,7 +281,7 @@
     {
         _effect = value;
     }
-
+
     //----------------------------------
     //  endView
     //----------------------------------
@@ -311,7 +311,7 @@
     {
         _endView = value;
     }
-
+
     //----------------------------------
     //  navigator
     //----------------------------------
@@ -459,7 +459,7 @@
      *  performing a full screen transition.
      */
     mx_internal var cachedNavigator:BitmapImage;
-
+
     //----------------------------------
     //  cachedActionGroupSnapshot
     //----------------------------------
@@ -560,7 +560,7 @@
         // bitmap snapshots for use later by our default action bar transition.
         consolidatedTransition = consolidatedTransition ?
             consolidatedTransition : !canTransitionControlBarContent();
-
+
         // Snapshot component parts of action bar in preparation for our
         // default action bar transition, (if appropriate).
         if (!consolidatedTransition && navigator is ViewNavigator)
@@ -617,7 +617,7 @@

     /**
      *  This method is called by the ViewNavigator when the transition
-     *  should begin animating.  At this time the transition should dispatch an
+     *  should begin animating.  At this time the transition should dispatch a
      *  FlexEvent.TRANSITION_START event.
      *
      *  @langversion 3.0
@@ -630,6 +630,11 @@
         if (effect)
         {
             effect.addEventListener(EffectEvent.EFFECT_END, effectComplete);
+
+            // Dispatch TRANSITION_START.
+            if (hasEventListener(FlexEvent.TRANSITION_START))
+                dispatchEvent(new FlexEvent(FlexEvent.TRANSITION_START));
+
             effect.play();
         }
         else
@@ -698,7 +703,7 @@
             effect = createConsolidatedEffect();
         }
     }
-
+
     /**
      *  Called by the default prepareForPlay() implementation, this method
      *  is responsible for creating the spark effect that should be played on the
@@ -769,7 +774,7 @@
         // Suppress slide if our action bar transition behavior is fade-only.
         if (actionBarTransitionMode == ACTION_BAR_MODE_FADE)
             slideDistance = 0;
-
+
         // If the skin has title content queue new title content for fade in.
         if (actionBar.titleGroup || actionBar.titleDisplay)
         {
@@ -855,7 +860,7 @@
         animation.motionPaths = vector;
         animation.easer = new spark.effects.easing.Sine(.7);
         var fadeOutSlideTargets:Array = new Array();
-
+
         if (cachedTitleGroup)
             fadeOutSlideTargets.push(cachedTitleGroup);

@@ -871,7 +876,7 @@
             animation.duration = duration;
             effect.addChild(animation);
         }
-
+
         // Construct animation for our fade in and slide elements.
         var fadeAndSlide:Animate = new Animate();
         vector = new Vector.<MotionPath>();
@@ -885,10 +890,10 @@
         // Add effects to the parallel effect
         effect.addChild(fadeOut);
         effect.addChild(fadeAndSlide);
-
+
         // Ensure bitmaps are rendered prior to invocation of our effect.
         transitionGroup.validateNow();
-
+
         return effect;
     }

@@ -979,8 +984,8 @@
      */
     protected function cleanUp():void
     {
-        if (!consolidatedTransition)
-        {
+        if (!consolidatedTransition && transitionGroup)
+        {
             if (cachedTitleGroup)
                 transitionGroup.removeElement(cachedTitleGroup);

@@ -1045,7 +1050,9 @@
             }

             removeComponentFromContainer(transitionGroup, actionBar.skin);
-            actionBar.skin.scrollRect = null;
+
+            if (actionBar)
+                actionBar.skin.scrollRect = null;

             verticalTransition = false;
             cachedActionBarHeight = 0;
@@ -1113,7 +1120,7 @@

         return true;
     }
-
+
     /**
      *  Helper method used to render snap shots of on screen elements in
      *  preparation for transitioning.  The bitmap is returned in the form
@@ -1144,7 +1151,7 @@
         snapShot.height = bounds.height;
         snapShot.x = target.x + bounds.left;
         snapShot.y = target.y + bounds.top;
-
+
         // Exclude from layout.
         snapShot.includeInLayout = false;

@@ -1183,8 +1190,8 @@
      *  or DisplayObjectContainer.
      */
     protected function addComponentToContainerAt(component:UIComponent,
-                                               container:UIComponent,
-                                               index:int):void
+                                                 container:UIComponent,
+                                                 index:int):void
     {
         if (container is IVisualElementContainer)
             IVisualElementContainer(container).addElementAt(component, index);
@@ -1212,7 +1219,7 @@
      *  or DisplayObjectContainer.
      */
     protected function removeComponentFromContainer(component:UIComponent,
-                                                     container:UIComponent):void
+                                                    container:UIComponent):void
     {
         if (container is IVisualElementContainer)
             IVisualElementContainer(container).removeElement(component);
@@ -1233,8 +1240,8 @@
         else
             container.setChildIndex(component, index);
     }
+
+}

+
 }
-
-
-}