unused import

unused import

--- exporter/src/main/as/flump/export/FlumpApp.as
+++ exporter/src/main/as/flump/export/FlumpApp.as
@@ -7,7 +7,6 @@
 import aspire.util.Log;

 import flash.desktop.NativeApplication;
-import flash.display.Loader;
 import flash.display.LoaderInfo;
 import flash.display.NativeMenuItem;
 import flash.events.Event;


GeomListNode getLabel() now calls getChildren() so the number can be displayed in the label. #weave-518 fixed spent time 1m

--- WeaveJS/src/weavejs/data/source/WeaveDataSource.as
+++ WeaveJS/src/weavejs/data/source/WeaveDataSource.as
@@ -711,6 +711,7 @@
 	public function getLabel():String
 	{
 		var label:String = Weave.lang("Geometry Collections");
+		getChildren();
 		if (children && children.length)
 			return Weave.lang("{0} ({1})", label, children.length);
 		return label;


Bug 685161: make GC advice test more robust (r=lhansen).

--- test/acceptance/mmgc/pauseForGCIfCollectionImminent.as
+++ test/acceptance/mmgc/pauseForGCIfCollectionImminent.as
@@ -75,10 +75,30 @@
     for (var i = 0; i < i_loops; i++) {
         for (var j = 0; j < j_loops; j++)
             a[0] = 3.14159 + i * j; // compute a Number and store it in a * location to box it
-        var before = System.totalMemory - System.freeMemory;
+
+        // Bugzilla 685161: Invoking a System method can disrupt
+        // observed memory if its MethodSignature had been evicted but
+        // weakly-held until some GC during loop freed it and cleared
+        // the weak ref.
+        //
+        // As work-around, pre-call pauseForGCIfCollectionImminent
+        // with imminence=1.0 (which should be a no-op) and the two
+        // getters, ensuring all MethodSignatures are available before
+        // memory observations in critical section.
+        System.pauseForGCIfCollectionImminent(1.0);
+        System.totalMemory;
+        System.freeMemory;
+
+        // Start critical section
+        var beforeTotal = System.totalMemory;
+        var beforeFree = System.freeMemory;
         System.pauseForGCIfCollectionImminent(f);
-        var after = System.totalMemory - System.freeMemory;
-
+        var afterTotal = System.totalMemory;
+        var afterFree = System.freeMemory;
+        // End of critical section
+
+        var before = beforeTotal - beforeFree;
+        var after = afterTotal - afterFree;
         if (after < before)
             hits++;
         if (((i + 1) % 100) == 0)


Test for cloning of ArrayList in CompositeCloneableClass.

--- dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
+++ dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
@@ -58,5 +58,22 @@
 		assertThat(clone.array, everyItem(isA(Number)));
 		assertThat(clone.array, array(equalTo(1), equalTo(2), equalTo(3), equalTo(4), equalTo(5)));
 	}
+
+
+	[Test]
+	public function cloningOfArrayList():void {
+		const clone:CompositeCloneableClass = Cloner.clone(compositeCloneableClass);
+
+		const arrayList:ArrayList = clone.arrayList;
+
+		assertNotNull(arrayList);
+		assertFalse(clone.arrayList == compositeCloneableClass.arrayList);
+		assertEquals(arrayList.length, 5);
+		assertEquals(arrayList.getItemAt(0), 1);
+		assertEquals(arrayList.getItemAt(1), 2);
+		assertEquals(arrayList.getItemAt(2), 3);
+		assertEquals(arrayList.getItemAt(3), 4);
+		assertEquals(arrayList.getItemAt(4), 5);
+	}
 }
 }


修复发送字符串时多发了前缀的 bug

修复发送字符串时多发了前缀的 bug

--- as3/com/netease/protobuf/WriteUtils.as
+++ as3/com/netease/protobuf/WriteUtils.as
@@ -59,7 +59,7 @@
 				plb = new PostposeLengthBuffer
 			}
 			const i:uint = plb.beginBlock()
-			plb.writeUTF(value)
+			plb.writeUTFBytes(value)
 			plb.endBlock(i)
 			if (plb != output) {
 				plb.toNormal(output)


fixed AbstractShadowMappingEffect to listen for new lights in the scene

--- src/aerys/minko/render/material/phong/AbstractShadowMappingEffect.as
+++ src/aerys/minko/render/material/phong/AbstractShadowMappingEffect.as
@@ -8,7 +8,10 @@
 	import aerys.minko.render.resource.texture.TextureResource;
 	import aerys.minko.render.shader.Shader;
 	import aerys.minko.scene.data.LightDataProvider;
+	import aerys.minko.scene.node.Group;
+	import aerys.minko.scene.node.ISceneNode;
 	import aerys.minko.scene.node.Scene;
+	import aerys.minko.scene.node.light.AbstractLight;
 	import aerys.minko.type.binding.DataBindings;

 	import flash.display.BitmapData;
@@ -36,29 +39,47 @@
 		public function AbstractShadowMappingEffect(scene 			: Scene,
 													renderingShader : Shader)
 		{
+            super();
+
 			_renderingPass		= renderingShader;
 			_watchedProperties	= new Vector.<String>();
 			_scene				= scene;

-            scene.enterFrame.add(sceneEnterFrameHandler);
+            _scene.descendantAdded.add(sceneDescendantAddedHandler);
+            updateNextFrame();
 		}
+
+        private function updateNextFrame() : void
+        {
+            if (!_scene.enterFrame.hasCallback(sceneEnterFrameHandler))
+                _scene.enterFrame.add(sceneEnterFrameHandler);
+        }

 		private function sceneEnterFrameHandler(scene		: Scene,
                                                 viewport	: Viewport,
                                                 destination	: BitmapData,
                                                 timer		: uint) : void
 		{
-            scene.enterFrame.remove(sceneEnterFrameHandler);
+            _scene.enterFrame.remove(sceneEnterFrameHandler);

 			updatePasses();
 		}
+
+        private function sceneDescendantAddedHandler(parent     : Group,
+                                                     descendant : ISceneNode) : void
+        {
+            if (descendant is AbstractLight
+                || (descendant is Group
+                    && (descendant as Group).getDescendantsByType(AbstractLight).length))
+                updateNextFrame();
+        }

 		private function propertyChangedHandler(sceneBindings	: DataBindings,
 												propertyName	: String,
 												oldValue		: Object,
 												newValue		: Object) : void
 		{
-            scene.enterFrame.add(sceneEnterFrameHandler);
+            updateNextFrame();
 		}

 		private function updatePasses() : void


Multi-copy & paste in the editor.

Multi-copy & paste in the editor.

--- Bin/Data/Scripts/Editor/EditorSceneWindow.as
+++ Bin/Data/Scripts/Editor/EditorSceneWindow.as
@@ -6,7 +6,7 @@
 const uint NO_ITEM = 0xffffffff;

 Window@ sceneWindow;
-XMLFile copyBuffer;
+Array<XMLFile@> copyBuffer;
 bool copyBufferLocal = false;
 bool copyBufferExpanded = false;

@@ -113,7 +113,7 @@
     UpdateSceneWindowNode(0, editorScene);

     // Clear copybuffer when whole window refreshed
-    copyBuffer.CreateRoot("none");
+    copyBuffer.Clear();
 }

 uint UpdateSceneWindowNode(uint itemIndex, Node@ node)
@@ -841,90 +841,110 @@

 bool SceneCopy()
 {
-    /// \todo allow multi-copy
-    if (editNode is null || !CheckSceneWindowFocus())
+    if ((selectedNodes.empty && selectedComponents.empty) || !CheckSceneWindowFocus())
         return false;
-    Component@ editComponent = editComponents.length == 1 ? editComponents[0] : null;
-
-    ListView@ list = sceneWindow.GetChild("NodeList", true);
-
-    // Copy component
-    if (editNode !is null && editComponent !is null)
-    {
-        XMLElement rootElem = copyBuffer.CreateRoot("component");
-        editComponent.SaveXML(rootElem);
-        // Note: component type has to be saved manually
-        rootElem.SetString("type", editComponent.typeName);
-        copyBufferLocal = editComponent.id >= FIRST_LOCAL_ID;
+
+    // Must have either only components, or only nodes
+    if (!selectedNodes.empty && !selectedComponents.empty)
+        return false;
+
+    ListView@ list = sceneWindow.GetChild("NodeList", true);
+    copyBuffer.Clear();
+
+    // Copy components
+    if (!selectedComponents.empty)
+    {
+        for (uint i = 0; i < selectedComponents.length; ++i)
+        {
+            XMLFile@ xml = XMLFile();
+            XMLElement rootElem = xml.CreateRoot("component");
+            selectedComponents[i].SaveXML(rootElem);
+            // Note: component type has to be saved manually
+            rootElem.SetString("type", selectedComponents[i].typeName);
+            rootElem.SetBool("local", selectedComponents[i].id >= FIRST_LOCAL_ID);
+            copyBuffer.Push(xml);
+        }
         return true;
     }
     // Copy node. The root node can not be copied
-    else if (editNode !is null && editComponent is null && editNode !is editorScene)
-    {
-        XMLElement rootElem = copyBuffer.CreateRoot("node");
-        editNode.SaveXML(rootElem);
-        copyBufferLocal = editNode.id >= FIRST_LOCAL_ID;
-        copyBufferExpanded = SaveExpandedStatus(GetNodeListIndex(editNode));
+    else
+    {
+        for (uint i = 0; i < selectedNodes.length; ++i)
+        {
+            if (selectedNodes[i] is editorScene)
+                return false;
+        }
+
+        for (uint i = 0; i < selectedNodes.length; ++i)
+        {
+            XMLFile@ xml = XMLFile();
+            XMLElement rootElem = xml.CreateRoot("node");
+            selectedNodes[i].SaveXML(rootElem);
+            rootElem.SetBool("local", selectedNodes[i].id >= FIRST_LOCAL_ID);
+            copyBuffer.Push(xml);
+        }
+
+        copyBufferExpanded = SaveExpandedStatus(GetNodeListIndex(selectedNodes[0]));
         return true;
     }
-
-    return false;
 }

 bool ScenePaste()
 {
-    /// \todo allow multi-paste
-    if (editNode is null || !CheckSceneWindowFocus())
+    if (editNode is null || !CheckSceneWindowFocus() || copyBuffer.empty)
         return false;

     ListView@ list = sceneWindow.GetChild("NodeList", true);
-    XMLElement rootElem = copyBuffer.root;
-    String mode = rootElem.name;
-
-    if (mode == "component")
-    {
-        BeginModify(editNode.id);
-
-        // If this is the root node, do not allow to create duplicate scene-global components
-        if (editNode is editorScene && CheckForExistingGlobalComponent(editNode, rootElem.GetAttribute("type")))
-            return false;
-
-        // If copied component was local, make the new local too
-        Component@ newComponent = editNode.CreateComponent(rootElem.GetAttribute("type"), copyBufferLocal ? LOCAL :
-            REPLICATED);
-        if (newComponent is null)
-        {
+    bool pasteComponents = false;
+
+    for (uint i = 0; i < copyBuffer.length; ++i)
+    {
+        XMLElement rootElem = copyBuffer[i].root;
+        String mode = rootElem.name;
+        if (mode == "component")
+        {
+            pasteComponents = true;
+
+            // If this is the root node, do not allow to create duplicate scene-global components
+            if (editNode is editorScene && CheckForExistingGlobalComponent(editNode, rootElem.GetAttribute("type")))
+                return false;
+
+            BeginModify(editNode.id);
+
+            // If copied component was local, make the new local too
+            Component@ newComponent = editNode.CreateComponent(rootElem.GetAttribute("type"), rootElem.GetBool("local") ? LOCAL :
+                REPLICATED);
+            if (newComponent is null)
+            {
+                EndModify(editNode.id);
+                return false;
+            }
+            newComponent.LoadXML(rootElem);
+            newComponent.ApplyAttributes();
             EndModify(editNode.id);
-            return false;
-        }
-        newComponent.LoadXML(rootElem);
-        newComponent.ApplyAttributes();
-        EndModify(editNode.id);
-
+        }
+        else if (mode == "node")
+        {
+            // Make the paste go always to the root node, no matter of the selected node
+            BeginModify(editorScene.id);
+            // If copied node was local, make the new local too
+            Node@ newNode = editorScene.CreateChild("", rootElem.GetBool("local") ? LOCAL : REPLICATED);
+            BeginModify(newNode.id);
+            newNode.LoadXML(rootElem);
+            newNode.ApplyAttributes();
+            EndModify(newNode.id);
+            EndModify(editorScene.id);
+
+            uint addIndex = GetParentAddIndex(newNode);
+            UpdateSceneWindowNode(addIndex, newNode);
+            RestoreExpandedStatus(addIndex, copyBufferExpanded);
+        }
+    }
+
+    if (pasteComponents)
         UpdateSceneWindowNode(editNode);
-        list.selection = GetComponentListIndex(newComponent);
-        return true;
-    }
-    else if (mode == "node")
-    {
-        // Make the paste go always to the root node, no matter of the selected node
-        BeginModify(editorScene.id);
-        // If copied node was local, make the new local too
-        Node@ newNode = editorScene.CreateChild("", copyBufferLocal ? LOCAL : REPLICATED);
-        BeginModify(newNode.id);
-        newNode.LoadXML(rootElem);
-        newNode.ApplyAttributes();
-        EndModify(newNode.id);
-        EndModify(editorScene.id);
-
-        uint addIndex = GetParentAddIndex(newNode);
-        UpdateSceneWindowNode(addIndex, newNode);
-        RestoreExpandedStatus(addIndex, copyBufferExpanded);
-        list.selection = addIndex;
-        return true;
-    }
-
-    return false;
+
+    return true;
 }

 bool SaveExpandedStatus(uint itemIndex)


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/controls/TileList.as
+++ frameworks/projects/mx/src/mx/controls/TileList.as
@@ -43,6 +43,11 @@
  *  For the TileList control, use an instance of the DefaultTileListEffect class.</p>
  *
  * @default undefined
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Effect(name="itemsChangeEffect", event="itemsChange")]

@@ -90,6 +95,11 @@
  *  </pre>
  *
  *  @includeExample examples/TileListExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class TileList extends TileBase
 {
@@ -103,6 +113,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function TileList()
 	{


Fix a compiler warning "Warning: Assignment within conditional.  Did you mean == instead of =?" in advancedgrids project

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
@@ -7781,10 +7781,9 @@
 			if (rowData)
 			{
 				var rowIndicators:Object = cellSelectionIndicators[rowData.uid];
-				var columnIndicator:Sprite;
-				if (rowIndicators && (columnIndicator = rowIndicators[columnIndex]))
+				if (rowIndicators && rowIndicators[columnIndex])
 				{
-					o = columnIndicator;
+					o = rowIndicators[columnIndex];
 					if (o.parent)
 						o.parent.removeChild(o);


Transferred from the Adobe Open Source Subversion Repository

Revision: 3647
Author:   mhorn@adobe.com
Date:     2008-10-15T15:08:06.759591Z

Log Message:
-----------
asdoc updates

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as
+++ frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as
@@ -1,28 +1,96 @@
 package mx.graphics
 {
-
+
 import flash.display.GradientType;
 import flash.display.Graphics;
 import flash.geom.Rectangle;
 import mx.core.mx_internal;
 import flash.geom.Matrix;
-
+
+/**
+ *  The RadialGradientStroke class lets you specify a gradient filled stroke.
+ *  You use the RadialGradientStroke class, along with the GradientEntry class,
+ *  to define a gradient stroke.
+ *
+ *  @see mx.graphics.Stroke
+ *  @see mx.graphics.GradientEntry
+ *  @see mx.graphics.RadialGradient
+ *  @see flash.display.Graphics
+ */
 public class RadialGradientStroke extends GradientStroke implements IStroke
 {
-	public function RadialGradientStroke(weight:Number=0, pixelHinting:Boolean=false, scaleMode:String="none", caps:String=null, joints:String=null, miterLimit:Number=0)
-	{
-		super(weight, pixelHinting, scaleMode, caps, joints, miterLimit);
-		matrix = new Matrix();
-	}
-
-	//----------------------------------
+    /**
+     *  Constructor.
+     *
+     *  @param weight Specifies the line weight, in pixels.
+     *  This parameter is optional,
+     *  with a default value of 0.
+     *
+     *  @param pixelHinting A Boolean value that specifies
+     *  whether to hint strokes to full pixels.
+     *  This affects both the position of anchors of a curve
+     *  and the line stroke size itself.
+     *  With pixelHinting set to true,
+     *  Flash Player and AIR hint line widths to full pixel widths.
+     *  With pixelHinting set to false,
+     *  disjoints can  appear for curves and straight lines.
+     *  This parameter is optional,
+     *  with a default value of false.
+     *
+     *  @param scaleMode A value from the LineScaleMode class
+     *  that specifies which scale mode to use.
+     *  Valid values are LineScaleMode.HORIZONTAL,
+     *  LineScaleMode.NONE, LineScaleMode.NORMAL,
+     *  and LineScaleMode.VERTICAL.
+     *  This parameter is optional,
+     *  with a default value of LineScaleMode.NONE.
+     *
+     *  @param caps A value from the CapsStyle class
+     *  that specifies the type of caps at the end of lines.
+     *  Valid values are CapsStyle.NONE,
+     *  CapsStyle.ROUND, and CapsStyle.SQUARE.
+     *  A null value is equivalent to
+     *  CapsStyle.ROUND.
+     *  This parameter is optional,
+     *  with a default value of null.
+     *
+     *  @param joints A value from the JointStyle class
+     *  that specifies the type of joint appearance used at angles.
+     *  Valid values are JointStyle.BEVEL,
+     *  JointStyle.MITER, and JointStyle.ROUND.
+     *  A null value is equivalent to
+     *  JoinStyle.ROUND.
+     *  This parameter is optional,
+     *  with a default value of null.
+     *
+     *  @param miterLimit A number that indicates the limit
+     *  at which a miter is cut off.
+     *  Valid values range from 1 to 255
+     *  (and values outside of that range are rounded to 1 or 255).
+     *  This value is only used if the jointStyle property
+     *  is set to miter.
+     *  The miterLimit value represents the length that a miter
+     *  can extend beyond the point at which the lines meet to form a joint.
+     *  The value expresses a factor of the line thickness.
+     *  For example, with a miterLimit factor of 2.5 and a
+     *  thickness of 10 pixels, the miter is cut off at 25 pixels.
+     *  This parameter is optional,
+     *  with a default value of 0.
+     */
+    public function RadialGradientStroke(weight:Number=0, pixelHinting:Boolean=false, scaleMode:String="none", caps:String=null, joints:String=null, miterLimit:Number=0)
+    {
+        super(weight, pixelHinting, scaleMode, caps, joints, miterLimit);
+        matrix = new Matrix();
+    }
+
+    //----------------------------------
     //  focalPointRatio
     //----------------------------------

     /**
-	 *  @private
-	 *  Storage for the focalPointRatio property.
-	 */
+     *  @private
+     *  Storage for the focalPointRatio property.
+     */
     private var _focalPointRatio:Number = 0.0;

     [Bindable("propertyChange")]
@@ -30,28 +98,28 @@

     /**
      *  Sets the location of the start of the radial fill.
-	 *
-	 *
Valid values are from -1.0 to 1.0.
+     *
+     *
Valid values are from -1.0 to 1.0.
      *  A value of -1.0 sets the focal point
-	 *  (or, start of the gradient fill)
-	 *  on the left of the bounding Rectangle.
-	 *  A value of 1.0 sets the focal point
-	 *  on the right of the bounding Rectangle.
+     *  (or, start of the gradient fill)
+     *  on the left of the bounding Rectangle.
+     *  A value of 1.0 sets the focal point
+     *  on the right of the bounding Rectangle.
      *
      *
If you use this property in conjunction
-	 *  with the angle property,
+     *  with the angle property,
      *  this value specifies the degree of distance
-	 *  from the center that the focal point occurs.
+     *  from the center that the focal point occurs.
      *  For example, with an angle of 45
-	 *  and focalPointRatio of 0.25,
-	 *  the focal point is slightly lower and to the right of center.
+     *  and focalPointRatio of 0.25,
+     *  the focal point is slightly lower and to the right of center.
      *  If you set focalPointRatio to 0,
      *  the focal point is in the middle of the bounding Rectangle.

-	 *  If you set focalPointRatio to 1,
-	 *  the focal point is all the way to the bottom right corner
-	 *  of the bounding Rectangle.

-	 *
-	 *  @default 0.0
+     *  If you set focalPointRatio to 1,
+     *  the focal point is all the way to the bottom right corner
+     *  of the bounding Rectangle.

+     *
+     *  @default 0.0
      */
     public function get focalPointRatio():Number
     {
@@ -59,9 +127,9 @@
     }

     /**
-	 *  @private
-	 */
-	public function set focalPointRatio(value:Number):void
+     *  @private
+     */
+    public function set focalPointRatio(value:Number):void
     {
         var oldValue:Number = _focalPointRatio;
         if (value != oldValue)
@@ -69,14 +137,14 @@
             _focalPointRatio = value;

             mx_internal::dispatchGradientChangedEvent("focalPointRatio",
-            										  oldValue, value);
+                                                      oldValue, value);
         }
     }

     //----------------------------------
-	//  scaleY
-	//----------------------------------
-
+    //  scaleY
+    //----------------------------------
+
     private var _scaleY:Number;

     [Bindable("propertyChange")]
@@ -87,52 +155,62 @@
      */
     public function get scaleY():Number
     {
-    	return _scaleY;
-    }
-
-	/**
-	 *  @private
-	 */
+        return _scaleY;
+    }
+
+    /**
+     *  @private
+     */
     public function set scaleY(value:Number):void
     {
-    	var oldValue:Number = _scaleY;
-    	if (value != oldValue)
-    	{
-    		_scaleY = value;
-    		mx_internal::dispatchGradientChangedEvent("scaleY", oldValue, value);
-    	}
+        var oldValue:Number = _scaleY;
+        if (value != oldValue)
+        {
+            _scaleY = value;
+            mx_internal::dispatchGradientChangedEvent("scaleY", oldValue, value);
+        }
     }

     //--------------------------------------------------------------------------
-	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-	public function apply(g:Graphics):void
-	{
-		// No-op. Need to deprecate. Was never implemented for this class
-	}
-
-	public function draw(g:Graphics, rc:Rectangle):void
-    {
-    	g.lineStyle(weight, 0, 1, pixelHinting, scaleMode,
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public function apply(g:Graphics):void
+    {
+        // No-op. Need to deprecate. Was never implemented for this class
+    }
+
+    /**
+     *  Draws the stroke.
+     *
+     *  @param g The graphics context where the stroke is drawn.
+     *
+     *  @param rc
+     */
+    public function draw(g:Graphics, rc:Rectangle):void
+    {
+        g.lineStyle(weight, 0, 1, pixelHinting, scaleMode,
                     caps, joints, miterLimit);
-
-    	var w:Number = !isNaN(scaleX) ? scaleX : rc.width;
-    	var h:Number = !isNaN(scaleY) ? scaleY : rc.height;
-		var bX:Number = !isNaN(x) ? x + rc.left : rc.left;
-		var bY:Number = !isNaN(y) ? y + rc.top : rc.top;
+
+        var w:Number = !isNaN(scaleX) ? scaleX : rc.width;
+        var h:Number = !isNaN(scaleY) ? scaleY : rc.height;
+        var bX:Number = !isNaN(x) ? x + rc.left : rc.left;
+        var bY:Number = !isNaN(y) ? y + rc.top : rc.top;

         matrix.createGradientBox(w, h,
-        						 mx_internal::rotationInRadians,
-								 bX, bY);
-
-		g.lineGradientStyle(GradientType.RADIAL, mx_internal::colors,
+                                 mx_internal::rotationInRadians,
+                                 bX, bY);
+
+        g.lineGradientStyle(GradientType.RADIAL, mx_internal::colors,
                             mx_internal::alphas, mx_internal::ratios,
                             matrix, spreadMethod,
-                            interpolationMethod, focalPointRatio);
-    }
-
+                            interpolationMethod, focalPointRatio);
+    }
+
 }
 }


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

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

 package spark.skins.mobile
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/effects/effectClasses/ResizeInstance.as
+++ frameworks/projects/mx/src/mx/effects/effectClasses/ResizeInstance.as
@@ -57,6 +57,11 @@
  *
  *  @see mx.effects.Resize
  *  @see mx.events.TweenEvent
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ResizeInstance extends TweenEffectInstance
 {
@@ -72,6 +77,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ResizeInstance(target:Object)
 	{
@@ -204,6 +214,11 @@
 	/**
 	 *  Number of pixels by which to modify the height of the component.
 	 *  Values may be negative.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get heightBy():Number
 	{
@@ -225,6 +240,11 @@

 	/**
 	 *  Initial height. If omitted, Flex uses the current size.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var heightFrom:Number;

@@ -240,6 +260,11 @@

 	/**
 	 *  Final height, in pixels.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get heightTo():Number
 	{
@@ -262,6 +287,11 @@
 	/**
 	 *  An Array of Panels.
 	 *  The children of these Panels are hidden while the Resize effect plays.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var hideChildrenTargets:Array /* of Panel */;

@@ -278,6 +308,11 @@
 	/**
 	 *  Number of pixels by which to modify the width of the component.
 	 *  Values may be negative.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get widthBy():Number
 	{
@@ -299,6 +334,11 @@

 	/**
 	 *  Initial width. If omitted, Flex uses the current size.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var widthFrom:Number;

@@ -314,6 +354,11 @@

 	/**
 	 *  Final width, in pixels.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get widthTo():Number
 	{
@@ -564,6 +609,11 @@
 		applyTweenStartValues();
 		/*if (needToLayout)
 			UIComponent.layoutManager.validateNow();
+		*
+		*  @langversion 3.0
+		*  @playerversion Flash 9
+		*  @playerversion AIR 1.1
+		*  @productversion Flex 3
 		*/
 		//EffectManager.resumeEventHandling();
 	}


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

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

 package spark.globalization.supportClasses
 {


Clean up.

Clean up.

* Consolidate property-change flags in commitProperties().

* Clean up logic that selects included layers.

* Remove unused variable.

* Add missing semicolon.


changed position and toggling of universal/particular statement

--- Arguments/src/classes/ArgumentPanel.as
+++ Arguments/src/classes/ArgumentPanel.as
@@ -44,6 +44,7 @@
 		public static var parentMap:AgoraMap;
 		public var inference:Inference;
 		public var logicalContainer:HGroup;
+		public var topH:HGroup;
 		public var rules:Vector.<Inference>;
 		public var binders:Vector.<Binder>;
 		public var state:int;	//state=0 -> universal statement and state=1 -> particular statement
@@ -73,6 +74,11 @@
 			rules = new Vector.<Inference>(0,false);

 			lab = new Label;
+			// default setting
+			if(this is Inference) lab.text = "Universal Statement";
+			else lab.text = "Particular Statement";
+			lab.toolTip = "Whether a statement is universal or particular determines what kind of objections are possible against it. A 'universal statement' is defined here as a statement that can be falsified by one counter-example. In this sense, laws, rules, and all statements that include 'ought' or 'should,' etc., are universal statements. Anything else is treated as a particular statement, including statements about possibilities.";
+			lab.addEventListener(MouseEvent.CLICK,toggle);
 		}

@@ -189,6 +195,19 @@
 			//Create a UIComponent for clicking and dragging
 			topArea = new UIComponent;

+			topH = new HGroup();
+			addElement(topH);
+
+			//Draw on topArea UIComponent a rectangle
+			//to be used for clicking and dragging
+			topArea.graphics.beginFill(0xdddddd,1.0);
+			topArea.graphics.drawRect(0,0,40,20);
+			topArea.width = 40;
+			topArea.height = 20;
+			topArea.addEventListener(MouseEvent.MOUSE_DOWN,beginDrag);
+			topH.addElement(topArea);
+			topH.addElement(lab);
+
 			logicalContainer = new HGroup();
 			//Register event handlers
 			//Creation Complete event handlers
@@ -196,19 +215,13 @@
 			//this.input2.addEventListener(FlexEvent.CREATION_COMPLETE,onArgumentPanelChildrenCreate);
 			//this.topArea.addEventListener(FlexEvent.CREATION_COMPLETE,onArgumentPanelChildrenCreate);

-			//Draw on topArea UIComponent a rectangle
-			//to be used for clicking and dragging
-			topArea.graphics.beginFill(0xdddddd,1.0);
-			topArea.graphics.drawRect(0,0,160,20);
-			topArea.width = 160;
-			topArea.height = 20;
-			topArea.addEventListener(MouseEvent.MOUSE_DOWN,beginDrag);
+

 			//add the elements to the display list
 			//of the application.
 			//addChild --> Halo
 			//addElement --> Spark
-			addElement(topArea);
+			//addElement(topArea);
 			addElement(input1);
 			addElement(logicalContainer);

@@ -217,13 +230,12 @@
 			logicalContainer.addElement(argschemeButton);
 			argschemeButton.addEventListener(MouseEvent.CLICK,addArgSchemeHandler);

-			useButton = new spark.components.Button;
+			/*useButton = new spark.components.Button;
 			useButton.label = "use as..";
 			logicalContainer.addElement(useButton);
 			useButton.addEventListener(MouseEvent.CLICK,toggle);
 			useButton.toolTip="Whether a statement is universal or particular determines what kind of objections are possible against it. A 'universal statement' is defined here as a statement that can be falsified by one counter-example. In this sense, laws, rules, and all statements that include 'ought' or 'should,' etc., are universal statements. Anything else is treated as a particular statement, including statements about possibilities.";
-
-			addElement(lab);
+			*/
 		}

 		public function onArgumentPanelCreate( e:FlexEvent):void


Hide also the gizmo when orbiting.

Hide also the gizmo when orbiting.

--- Bin/Data/Scripts/Editor/EditorGizmo.as
+++ Bin/Data/Scripts/Editor/EditorGizmo.as
@@ -161,9 +161,9 @@
         lastGizmoMode = editMode;
     }

-    if (editMode != EDIT_SELECT && !gizmo.enabled)
+    if ((editMode != EDIT_SELECT && !orbiting) && !gizmo.enabled)
         ShowGizmo();
-    else if (editMode == EDIT_SELECT && gizmo.enabled)
+    else if ((editMode == EDIT_SELECT || orbiting) && gizmo.enabled)
         HideGizmo();
 }


Do not allow gizmo editing of the Scene's transform.

--- Bin/Data/Scripts/Editor/EditorGizmo.as
+++ Bin/Data/Scripts/Editor/EditorGizmo.as
@@ -122,16 +122,25 @@
     if (gizmo is null)
         return;

-    if (editNodes.empty)
+    Vector3 center(0, 0, 0);
+    bool containsScene = false;
+
+    for (uint i = 0; i < editNodes.length; ++i)
+    {
+        // Scene's transform should not be edited, so hide gizmo if it is included
+        if (editNodes[i] is editorScene)
+        {
+            containsScene = true;
+            break;
+        }
+        center += editNodes[i].worldPosition;
+    }
+
+    if (editNodes.empty || containsScene)
     {
         HideGizmo();
         return;
     }
-
-    Vector3 center(0, 0, 0);
-
-    for (uint i = 0; i < editNodes.length; ++i)
-        center += editNodes[i].worldPosition;

     center /= editNodes.length;
     gizmoNode.position = center;


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.charts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/utils/ArrayUtil.as
+++ frameworks/projects/framework/src/mx/utils/ArrayUtil.as
@@ -18,6 +18,11 @@
  *  You do not create instances of ArrayUtil;
  *  instead you call static methods such as the
  *  ArrayUtil.toArray() method.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ArrayUtil
 {
@@ -44,6 +49,11 @@
      * 	the original Array is returned. Otherwise, a new Array whose
      *  only element is the Object is returned or an empty Array if
      *  the Object was null.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function toArray(obj:Object):Array
     {
@@ -68,6 +78,11 @@
      *  @param source The Array to search for the item.
      *
      *  @return The index of the item, and -1 if the item is not in the list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function getItemIndex(item:Object, source:Array):int
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17392
Author:   cframpto@adobe.com
Date:     2010-08-19T20:21:06.978032Z

Log Message:
-----------
When the scroll rect is set the container background needs to be redrawn if mouseEnabledWhereTransparent and hasMouseListeners.  The hsp and vsp may have changed.  This is already done when either the width or height is changed.  Fix AsDoc in drawBackground header.

QE notes:
Doc notes:
Bugs: SDK-27444 and dup SDK-27470
Reviewer: Ryan, Corey, Hans
Tests run: checkintests, cyclone
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -279,8 +279,16 @@
         // scrollRect won't function correctly.
         var previous:Boolean = canShareDisplayObject;
         super.scrollRect = value;
+
         if (numGraphicElements > 0 && previous != canShareDisplayObject)
-            invalidateDisplayObjectOrdering();
+            invalidateDisplayObjectOrdering();
+
+        if (mouseEnabledWhereTransparent && hasMouseListeners)
+        {
+            // Re-render our mouse event fill if necessary.
+            redrawRequested = true;
+            super.$invalidateDisplayList();
+         }
     }

     /**
@@ -2058,7 +2066,8 @@
     /**
      *  @private
      *  Contains true when any of the IGraphicElement objects that share
-     *  this DisplayObject object needs to redraw.
+     *  this DisplayObject object needs to redraw or the background for the container
+     *  needs to be redrawn.
      *  This is used internally
      *  by the Group class and developers don't typically use this.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 22118
Author:   jasonsj@adobe.com
Date:     2011-08-19T22:45:54.903069Z

Log Message:
-----------
SDK-31259 CalloutSkin graphic ordering
SDK-29673 default button skins for ActionBar buttons.

Update CalloutArrow to match spec, useBackgroundGradient should be protected.

Update mobile skins test app with emphasized examples and fix Callout examples to use to contentBackgroundAppearance.

QE notes: Fixed regression from contentBackgroundAppearance. Update baselines for ActionBar accentColor tests.
Doc notes: ActionBar buttons now support emphasized (i.e. accentColor)
Bugs:
SDK-31259 slight difference in callout content for 320 and 240/160 runs
SDK-29673 accentColor not working inside ActionBarsdk
Reviewer: tkraikit, betravis
Tests run: checkintests, mustella-mobile
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultButtonSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.skins.mobile
+{
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  Emphasized button uses accentColor instead of chromeColor. Replaces the
+ *  BeveledNavigationButtonSkin.
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
+ */
+public class DefaultBeveledActionButtonSkin extends BeveledActionButtonSkin
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public function DefaultBeveledActionButtonSkin()
+    {
+        super();
+
+        fillColorStyleName = "accentColor";
+    }
+}
+}


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

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

 package spark.components.mediaClasses


more fine-grained conditional compile for Application

--- frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
+++ frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
@@ -18,7 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
-
     import org.apache.flex.utils.MXMLDataInterpreter;

     COMPILE::AS3 {
@@ -102,8 +101,7 @@
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::AS3
-    public class Application extends Sprite implements IStrand, IFlexInfo, IParent, IEventDispatcher
+    public class Application extends ApplicationBase implements IStrand, IParent, IEventDispatcher
     {
         /**
          *  Constructor.
@@ -116,15 +114,18 @@
         public function Application()
         {
             super();
-			if (stage)
-			{
-				stage.align = StageAlign.TOP_LEFT;
-				stage.scaleMode = StageScaleMode.NO_SCALE;
-                // should be opt-in
-				//stage.quality = StageQuality.HIGH_16X16_LINEAR;
-			}
-
-            loaderInfo.addEventListener(flash.events.Event.INIT, initHandler);
+
+            COMPILE::AS3 {
+    			if (stage)
+    			{
+    				stage.align = StageAlign.TOP_LEFT;
+    				stage.scaleMode = StageScaleMode.NO_SCALE;
+                    // should be opt-in
+    				//stage.quality = StageQuality.HIGH_16X16_LINEAR;
+    			}
+
+                loaderInfo.addEventListener(flash.events.Event.INIT, initHandler);
+            }
         }

         /**
@@ -139,6 +140,7 @@
          */
         public var document:Object = this;

+        COMPILE::AS3
         private function initHandler(event:flash.events.Event):void
         {
 			if (model is IBead) addBead(model as IBead);
@@ -158,6 +160,7 @@

         }

+        COMPILE::AS3
         private function enterFrameHandler(event:flash.events.Event):void
         {
             if (dispatchEvent(new org.apache.flex.events.Event("preinitialize", false, true)))
@@ -176,6 +179,7 @@
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
+        COMPILE::AS3
         protected function initialize():void
         {

@@ -309,6 +313,7 @@
          */
         public var beads:Array;

+        COMPILE::AS3
         private var _beads:Vector.<IBead>;

         /**
@@ -319,6 +324,7 @@
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
+        COMPILE::AS3
         public function addBead(bead:IBead):void
         {
             if (!_beads)
@@ -335,6 +341,7 @@
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
+        COMPILE::AS3
         public function getBeadByType(classOrInterface:Class):IBead
         {
             for each (var bead:IBead in _beads)
@@ -353,6 +360,7 @@
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
+        COMPILE::AS3
         public function removeBead(value:IBead):IBead
         {
             var n:int = _beads.length;
@@ -368,29 +376,6 @@
             return null;
         }

-        private var _info:Object;
-
-        /**
-         *  An Object containing information generated
-         *  by the compiler that is useful at startup time.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function info():Object
-        {
-            if (!_info)
-            {
-                var mainClassName:String = getQualifiedClassName(this);
-                var initClassName:String = "_" + mainClassName + "_FlexInit";
-                var c:Class = ApplicationDomain.currentDomain.getDefinition(initClassName) as Class;
-                _info = c.info();
-            }
-            return _info;
-        }
-
         /**
          *  @copy org.apache.flex.core.IParent#addElement()
          *
@@ -401,13 +386,18 @@
          */
         public function addElement(c:Object, dispatchEvent:Boolean = true):void
         {
-            if (c is IUIBase)
-            {
-                addChild(IUIBase(c).element as DisplayObject);
-                IUIBase(c).addedToParent();
-            }
-            else
-                addChild(c as DisplayObject);
+            COMPILE::AS3 {
+                if (c is IUIBase)
+                {
+                    addChild(IUIBase(c).element as DisplayObject);
+                    IUIBase(c).addedToParent();
+                }
+                else
+                    addChild(c as DisplayObject);
+            }
+            COMPILE::JS {
+                this.element.appendChild(c.element);
+            }
         }

         /**
@@ -420,13 +410,27 @@
          */
         public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
         {
-            if (c is IUIBase)
-            {
-                addChildAt(IUIBase(c).element as DisplayObject, index);
-                IUIBase(c).addedToParent();
-            }
-            else
-                addChildAt(c as DisplayObject, index);
+            COMPILE::AS3 {
+                if (c is IUIBase)
+                {
+                    addChildAt(IUIBase(c).element as DisplayObject, index);
+                    IUIBase(c).addedToParent();
+                }
+                else
+                    addChildAt(c as DisplayObject, index);
+            }
+            COMPILE::JS {
+                var children:Array = internalChildren();
+                if (index >= children.length)
+                    addElement(c);
+                else
+                {
+                    element.insertBefore(c.positioner,
+                        children[index]);
+                    c.addedToParent();
+                }
+
+            }
         }

         /**
@@ -439,7 +443,13 @@
          */
         public function getElementAt(index:int):Object
         {
-            return getChildAt(index);
+            COMPILE::AS3 {
+                return getChildAt(index);
+            }
+            COMPILE::JS {
+                var children:Array = internalChildren();
+                return children[index].flexjs_wrapper;
+            }
         }

         /**
@@ -452,10 +462,22 @@
          */
         public function getElementIndex(c:Object):int
         {
-            if (c is IUIBase)
-                return getChildIndex(IUIBase(c).element as DisplayObject);
-
-            return getChildIndex(c as DisplayObject);
+            COMPILE::AS3 {
+                if (c is IUIBase)
+                    return getChildIndex(IUIBase(c).element as DisplayObject);
+
+                return getChildIndex(c as DisplayObject);
+            }
+            COMPILE::JS {
+                var children:Array = internalChildren();
+                var n:int = children.length;
+                for (var i:int = 0; i < n; i++)
+                {
+                    if (children[i] == c.element)
+                        return i;
+                }
+                return -1;
+            }
         }

         /**
@@ -468,12 +490,17 @@
          */
         public function removeElement(c:Object, dispatchEvent:Boolean = true):void
         {
-            if (c is IUIBase)
-            {
-                removeChild(IUIBase(c).element as DisplayObject);
-            }
-            else
-                removeChild(c as DisplayObject);
+            COMPILE::AS3 {
+                if (c is IUIBase)
+                {
+                    removeChild(IUIBase(c).element as DisplayObject);
+                }
+                else
+                    removeChild(c as DisplayObject);
+            }
+            COMPILE::JS {
+                element.removeChild(c.element);
+            }
         }

         /**
@@ -486,8 +513,49 @@
          */
         public function get numElements():int
         {
-            return numChildren;
-        }
+            COMPILE::AS3 {
+                return numChildren;
+            }
+            COMPILE::JS {
+                var children:Array = internalChildren();
+                return children.length;
+            }
+        }
+
+        /**
+         * @return {Object} The array of children.
+         */
+        COMPILE::JS
+        protected function internalChildren():Array
+        {
+            return element.childNodes;
+        };
+
+
+
+        /**
+         * @export
+         */
+        COMPILE::JS
+        public function start():void
+        {
+            element = document.getElementsByTagName('body')[0];
+            element.flexjs_wrapper = this;
+            element.className = 'Application';
+
+            MXMLDataInterpreter.generateMXMLInstances(this, null, MXMLDescriptor);
+
+            dispatchEvent('initialize');
+
+            if (model) addBead(model);
+            if (controller) addBead(controller);
+
+            initialView.applicationModel = model;
+            addElement(initialView);
+
+            dispatchEvent('viewChanged');
+        };
+
     }

     COMPILE::JS {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5342
Author:   smgilson@adobe.com
Date:     2009-03-17T12:18:48.123385Z

Log Message:
-----------
Fix errors in ASDod comments

QE Notes: None
Doc Notes: None
Bugs:

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -517,7 +517,7 @@
  *
A WindowedApplication is the top-level application of a Flex-based AIR application. It is not
  *  designed to be loaded by other Flex applications. If a WindowedApplication needs to load other
  *  applications, use the Application class as container for those applications. If other windows
- *  are required, use the Window class as a container for those windows.
+ *  are required, use the Window class as a container for those windows.

  *
  *
Note that because
  *  the WindowedApplication only represents the visual content of a single window, and not


Determine player power at the end of each level.

--- bin/Data/Scripts/Main.as
+++ bin/Data/Scripts/Main.as
@@ -1,3 +1,5 @@
+#include "Scripts/PlayerPower.as"
+
 Scene@ newScene_;
 Scene@ scene_;
 Camera@ camera_;
@@ -18,6 +20,11 @@
 	log.Debug("Level Complete. I should be loading "+data["NextLevel"].GetString());
 	float timeTaken = timer_.GetMSec(false);
 	log.Debug("You took " + timeTaken / 1000.f + " seconds to solve the level");
+
+	Node@[] playerNode = scene_.GetChildrenWithTag("player", true);
+	PlayerPower@ playerPower = cast<PlayerPower>(playerNode[0].GetScriptObject("PlayerPower"));
+	float power = playerPower.Power;
+	log.Debug("You had " + power + " power remaining");

 	StartScene(data["NextLevel"].GetString());
 }


flashlsFlowPlayer.swf: fix seek bar not being updated when replaying a video

--- src/org/mangui/flowplayer/HLSStreamProvider.as
+++ src/org/mangui/flowplayer/HLSStreamProvider.as
@@ -112,7 +112,7 @@
             // _seekable = true;
             // }
             _hls.stream.play();
-            _clip.dispatch(ClipEventType.SEEK);
+            _clip.dispatch(ClipEventType.SEEK,0);
             if (_pauseAfterStart) {
                 pause(new ClipEvent(ClipEventType.PAUSE));
             }


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

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

 package mx.containers.gridClasses
 {


fixed issue where js-output-type option was not added automatically if compilerOptions field was not included in asconfig.json

--- source/ASConfigC.as
+++ source/ASConfigC.as
@@ -277,6 +277,12 @@
 					}
 				}
 			}
+			//if js-output-type was not specified, use the default
+			//swf projects won't have a js-output-type
+			if(this._jsOutputType)
+			{
+				this._args.push("--" + CompilerOptions.JS_OUTPUT_TYPE + "=" + this._jsOutputType);
+			}
 		}

 		private function readProjectType(configData:Object):String
@@ -305,10 +311,6 @@
 			{
 				//if it is set explicitly, then clear the default
 				this._jsOutputType = null;
-			}
-			else if(this._jsOutputType)
-			{
-				this._args.push("--" + CompilerOptions.JS_OUTPUT_TYPE + "=" + this._jsOutputType);
 			}
 		}


Removed levelloader dependency on U.state, fixed clock period bug

--- src/LevelStates/LevelLoader.as
+++ src/LevelStates/LevelLoader.as
@@ -45,8 +45,8 @@
 			bytes.position = wireSectionEnd;
 			var miscLength:int = bytes.readInt(); //currently unused; added for future-compat
 			//load misc data (first, so that clocks are constrained correctly)
-			var clockPeriod:int;
-			if (U.state.level.delay)
+			var clockPeriod:int = 1;
+			if (miscLength)
 				clockPeriod = bytes.readInt();
 			if (bytes.position != bytes.length)
 				throw new Error("Trailing data in save!");
@@ -71,10 +71,10 @@
 			//ordering is key
 			//misc info first
 			var miscStringsString:String = saveArray[2];
-			var clockPeriod:int;
+			var clockPeriod:int = 1;
 			if (miscStringsString.length) {
 				var miscStrings:Array = miscStringsString.split(U.SAVE_DELIM);
-				if (U.state.level.delay)
+				if (miscStrings.length)
 					clockPeriod = C.safeInt(miscStrings[0]);
 			}


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

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

 package mx.charts.series
 {


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

--- frameworks/projects/framework/src/mx/core/IDisplayObjectInterface.as
+++ frameworks/projects/framework/src/mx/core/IDisplayObjectInterface.as
@@ -1,29 +1,5 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/*
- *  The methods here would normally just be in IDisplayObject,
- *  but for backward compatibility, they have to be included
- *  directly into IFlexDisplayObject, so they are kept in
- *  this separate include file.
- */
-
-    /**
-     *  @copy flash.display.DisplayObject#root
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
+
+
     function get root():DisplayObject;


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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21769
Author:   jasonsj@adobe.com
Date:     2011-08-02T17:22:14.710585Z

Log Message:
-----------
CalloutButton
- CalloutButton extends Button (previously SkinnableContainer)
- New Callout proxy properties for calloutContent and calloutLayout
- read-only callout property SDK-30838
- New calloutDestructionPolicy
- closeOnResize added to DropDownController to prevent automatically closing when the system manager resizes SDK-30857

Callout
- Callout visual review changes
- Callout properties for actualHorizontalPosition and actualVerticalPosition
- Removed gap style, replaced with mx_internal margin property
- New auto-close behavior when the owner is removed from the stage SDK-30582
- New reposition behavior when the system manager resizes SDK-30857

ASDoc updates

QE notes: Please add tests for bug fixes listed below. Changes to calloutDestructionPolicy and closeOnResize should also be tested while the Callout is open.
Doc notes:
Bugs:
SDK-30860 arrow direction when "start" or"after" and"auto" is not correct
SDK-30838 New APIs required to resize CalloutButton's Callout before it is opened
SDK-30582 android : callout stays visible when the view changes via device's back button
SDK-30857 callout should stay visible on orientation change
Reviewer: evtim
Tests run: checkintests, mustella
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/scripts/CalloutButtonTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SplitViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/views/TestCalloutButton.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/Callout.as
+++ frameworks/projects/mobilecomponents/src/spark/components/Callout.as
@@ -13,42 +13,25 @@
 {
 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
+import flash.events.Event;
 import flash.geom.ColorTransform;
 import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;

+import mx.core.DPIClassification;
 import mx.core.FlexGlobals;
 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
 import mx.core.LayoutDirection;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
-import mx.events.FlexEvent;
 import mx.events.ResizeEvent;
 import mx.managers.SystemManager;
 import mx.utils.MatrixUtil;
 import mx.utils.PopUpUtil;

 use namespace mx_internal;
-
-//--------------------------------------
-//  Styles
-//--------------------------------------
-
-/**
- *  TODO (jasonsj): PARB
- *
- *  The gap style defines a buffer border at the bounds of the screen
- *  where the callout may not be positioned.
- *
- *  @default 0
- *
- *  @langversion 3.0
- *  @playerversion AIR 3
- *  @productversion Flex 4.5.2
- */
-[Style(name="gap", type="Number", format="Length", inherit="no")]

 /**
@@ -166,6 +149,14 @@
      *  @productversion Flex 4.5.2
      */
     public var arrow:UIComponent;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var invalidatePositionFlag:Boolean = false;

     //--------------------------------------------------------------------------
     //
@@ -210,8 +201,8 @@

         _horizontalPosition = value;

-        invalidateArrowState = true;
-        invalidateProperties();
+        invalidateArrowDirection = true;
+        invalidatePosition();
     }

     //----------------------------------
@@ -221,13 +212,21 @@
     private var _actualHorizontalPosition:String;

     /**
-     *  TODO (jasonsj): PARB
+     *  Fully resolved horizontal position after evaluating CalloutPosition.AUTO.
+     *
+     *
Update this property in commitProperties() when the
+     *  explicit horizontalPosition is CalloutPosition.AUTO.
+     *  This property must be updated in positionPopUp()
+     *  when attempting to reposition the Callout.

+     *
+     *
Subclasses should read this property when computing the arrowDirection,
+     *  the arrow position in updateSkinDisplayList().

      *
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
-    mx_internal function get actualHorizontalPosition():String
+    protected function get actualHorizontalPosition():String
     {
         if (_actualHorizontalPosition)
             return _actualHorizontalPosition;
@@ -236,72 +235,76 @@
     }

     /**
-     *  TODO (jasonsj): PARB
+     *  @private
+     */
+    protected function set actualHorizontalPosition(value:String):void
+    {
+        _actualHorizontalPosition = value;
+    }
+
+    //----------------------------------
+    //  verticalPosition
+    //----------------------------------
+
+    private var _verticalPosition:String = CalloutPosition.AUTO;
+
+    [Inspectable(category="General", enumeration="before,start,middle,end,after,auto", defaultValue="auto")]
+
+    /**
+     *  Vertical position of the callout relative to the owner.
+     *
+     *
Possible values are "before", "start",
+     *  "middle", "end", "after",
+     *  and "auto" (default).

+     *
+     *  @default CalloutPosition.AUTO
+     *  @see spark.components.CalloutPosition
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
-    mx_internal function set actualHorizontalPosition(value:String):void
-    {
-        _actualHorizontalPosition = value;
+    public function get verticalPosition():String
+    {
+        return _verticalPosition;
+    }
+
+    /**
+     *  @private
+     */
+    public function set verticalPosition(value:String):void
+    {
+        if (value == _verticalPosition)
+            return;
+
+        _verticalPosition = value;
+
+        invalidateArrowDirection = true;
+        invalidatePosition();
     }

     //----------------------------------
-    //  verticalPosition
+    //  actualVerticalPosition
     //----------------------------------

-    private var _verticalPosition:String = CalloutPosition.AUTO;
-
-    [Inspectable(category="General", enumeration="before,start,middle,end,after,auto", defaultValue="auto")]
-
-    /**
-     *  Vertical position of the callout relative to the owner.
-     *
-     *
Possible values are "before", "start",
-     *  "middle", "end", "after",
-     *  and "auto" (default).

-     *
-     *  @default CalloutPosition.AUTO
-     *  @see spark.components.CalloutPosition
+    private var _actualVerticalPosition:String;
+
+    /**
+     *  Fully resolved vertical position after evaluating CalloutPosition.AUTO.
+     *
+     *
Update this property in commitProperties() when the
+     *  explicit verticalPosition is CalloutPosition.AUTO.
+     *  This property must be updated in positionPopUp()
+     *  when attempting to reposition the Callout.

+     *
+     *
Subclasses should read this property when computing the arrowDirection,
+     *  the arrow position in updateSkinDisplayList().

      *
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
-    public function get verticalPosition():String
-    {
-        return _verticalPosition;
-    }
-
-    /**
-     *  @private
-     */
-    public function set verticalPosition(value:String):void
-    {
-        if (value == _verticalPosition)
-            return;
-
-        _verticalPosition = value;
-
-        invalidateArrowState = true;
-        invalidateProperties();
-    }
-
-    //----------------------------------
-    //  actualVerticalPosition
-    //----------------------------------
-
-    private var _actualVerticalPosition:String;
-
-    /**
-     *  TODO (jasonsj): PARB
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    mx_internal function get actualVerticalPosition():String
+    protected function get actualVerticalPosition():String
     {
         if (_actualVerticalPosition)
             return _actualVerticalPosition;
@@ -310,13 +313,9 @@
     }

     /**
-     *  TODO (jasonsj): PARB
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    mx_internal function set actualVerticalPosition(value:String):void
+     *  @private
+     */
+    protected function set actualVerticalPosition(value:String):void
     {
         _actualVerticalPosition = value;
     }
@@ -325,7 +324,7 @@
     //  arrowDirection
     //----------------------------------

-    private var invalidateArrowState:Boolean = true;
+    private var invalidateArrowDirection:Boolean = true;

     private var _arrowDirection:String = ArrowDirection.NONE;

@@ -338,6 +337,8 @@
      *  Exterior and interior positions will point from the callout towards
      *  the edge of the owner. Corner and absolute center positions are not
      *  supported and will return a value of "none".

+     *
+     *  @default none
      *
      *  @see spark.components.ArrowDirection
      *
@@ -349,6 +350,69 @@
     {
         return _arrowDirection;
     }
+
+    /**
+     *  @private
+     *  Dispatch an "arrowDirectionChanged" event when the property is set.
+     */
+    mx_internal function setArrowDirection(value:String):void
+    {
+        if (_arrowDirection != value)
+        {
+            _arrowDirection = value;
+
+            if (hasEventListener("arrowDirectionChanged"))
+                dispatchEvent(new Event("arrowDirectionChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  margin
+    //----------------------------------
+
+    private var _margin:Number = NaN;
+
+    /**
+     *  @private
+     *  Defines a margin around the Callout to nudge it's position away from the
+     *  edge of the screen.
+     */
+    mx_internal function get margin():Number
+    {
+        if (isNaN(_margin))
+        {
+            var dpi:Number = FlexGlobals.topLevelApplication["applicationDPI"];
+
+            if (dpi)
+            {
+                switch (dpi)
+                {
+                    case DPIClassification.DPI_320:
+                    {
+                        _margin = 16;
+                        break;
+                    }
+                    case DPIClassification.DPI_240:
+                    {
+                        _margin = 12;
+                        break;
+                    }
+                    default:
+                    {
+                        // default DPI_160
+                        _margin = 8;
+                        break;
+                    }
+                }
+            }
+            else
+            {
+                _margin = 8;
+            }
+        }
+
+        return _margin;
+    }

     //--------------------------------------------------------------------------
     //
@@ -362,18 +426,18 @@
     override protected function commitProperties():void
     {
         super.commitProperties();
-
-        if (arrow && invalidateArrowState)
-        {
-            commitAutoPosition();
-
+
+        commitAutoPosition();
+
+        if (arrow && invalidateArrowDirection)
+        {
             // invalidate only when the arrow direction changes
             var direction:String = determineArrowPosition(actualHorizontalPosition,
                 actualVerticalPosition);

-            if (_arrowDirection != direction)
-            {
-                _arrowDirection = direction;
+            if (arrowDirection != direction)
+            {
+                setArrowDirection(direction);

                 if (arrow)
                     arrow.visible = (arrowDirection != ArrowDirection.NONE);
@@ -381,11 +445,21 @@
                 skin.invalidateProperties();
             }

-            // Always reposition when horizontalPosition or verticalPosition
-            // changes. This will reposition the callout.
+            // Always reposition the arrow when horizontalPosition or verticalPosition
+            // changes. This will reposition the arrow.
             invalidateDisplayList();

-            invalidateArrowState = false;
+            invalidateArrowDirection = false;
+        }
+
+        if (isOpen && invalidatePositionFlag)
+        {
+            // reposition while open
+            skin.invalidateProperties();
+            skin.validateNow();
+            positionPopUp();
+
+            invalidatePositionFlag = false;
         }
     }

@@ -396,8 +470,9 @@
     {
         var popUpPoint:Point = calculatePopUpPosition();
         var ownerComponent:UIComponent = owner as UIComponent;
-        var concatenatedColorTransform:ColorTransform = ownerComponent.$transform.concatenatedColorTransform;
-
+        var concatenatedColorTransform:ColorTransform =
+            (ownerComponent) ? ownerComponent.$transform.concatenatedColorTransform : null;
+
         PopUpUtil.applyPopUpTransform(owner, concatenatedColorTransform,
                                       systemManager, this, popUpPoint);
     }
@@ -432,18 +507,46 @@
      */
     override public function open(owner:DisplayObjectContainer, modal:Boolean=false):void
     {
-        if ((horizontalPosition == CalloutPosition.AUTO)
-            || (verticalPosition == CalloutPosition.AUTO))
+        if ((horizontalPosition == CalloutPosition.AUTO) ||
+            (verticalPosition == CalloutPosition.AUTO))
         {
             // invalidate the arrow direction before opening
-            invalidateArrowState = true;
+            // owner position/size changes will affect AUTO positioning
+            invalidateArrowDirection = true;
             invalidateProperties();
         }
+
+        // TODO (jasonsj): sizing enhancements?
+        // http://bugs.adobe.com/jira/browse/SDK-30838
+
+        // close the callout when the owner is removed
+        owner.addEventListener(Event.REMOVED_FROM_STAGE, owner_removedFromStage);

         // add to PopUpManager, calls positionPopUp(), and change state
         super.open(owner, modal);
-    }
-
+
+        // re-position the callout when the screen changes
+        var systemManagerParent:SystemManager = this.parent as SystemManager;
+
+        if (systemManagerParent)
+            systemManagerParent.addEventListener(Event.RESIZE, systemManager_resizeHandler);
+    }
+
+    /**
+     *  @private
+     */
+    override public function close(commit:Boolean=false, data:*=null):void
+    {
+        owner.removeEventListener(Event.REMOVED_FROM_STAGE, owner_removedFromStage);
+
+        var systemManagerParent:SystemManager = this.parent as SystemManager;
+
+        if (systemManagerParent)
+            systemManagerParent.removeEventListener(Event.RESIZE, systemManager_resizeHandler);
+
+        super.close(commit, data);
+    }
+
     /**
      *  @private
      */
@@ -460,6 +563,14 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
+
+    private function invalidatePosition():void
+    {
+        invalidateProperties();
+
+        if (isOpen)
+            invalidatePositionFlag = true;
+    }

     /**
      *  Sets the bounds of arrow, whose geometry isn't fully
@@ -467,10 +578,12 @@
      *
      *
Subclasses may override this method to update the arrow's size,
      *  position, and visibility, based on the computed
-     *  arrowDirection

+     *  arrowDirection.

      *
      *
By default, this method aligns the arrow on the shorter of either
-     *  the arrow bounds or the owner bounds.

+     *  the arrow bounds or the owner bounds. This
+     *  implementation assumes that the arrow and the Callout skin
+     *  share the same coordinate space.

      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -483,14 +596,11 @@
         if (!arrow || (arrowDirection == ArrowDirection.NONE))
             return;

-        var isVertical:Boolean = (arrowDirection == ArrowDirection.UP)
-            || (arrowDirection == ArrowDirection.DOWN);
-
         var isStartPosition:Boolean = false;
         var isMiddlePosition:Boolean = false;
         var isEndPosition:Boolean = false;

-        var position:String = (isVertical) ? actualHorizontalPosition : actualVerticalPosition;
+        var position:String = (isArrowVertical) ? actualHorizontalPosition : actualVerticalPosition;

         isStartPosition = (position == CalloutPosition.START);
         isMiddlePosition = (position == CalloutPosition.MIDDLE);
@@ -517,7 +627,7 @@
         var regPoint:Point = owner.localToGlobal(new Point());
         regPoint = sandboxRoot.globalToLocal(regPoint);

-        if (isVertical)
+        if (isArrowVertical)
         {
             // vertical arrows need horizontal alignment
             var ownerX:Number = regPoint.x;
@@ -541,12 +651,13 @@
                 // center the arrow on the owner
                 arrowX = (ownerVisibleWidth - arrowWidth) / 2;

+                // add owner offset
                 if (ownerX > 0)
                     arrowX += Math.abs(ownerX - getLayoutBoundsX());
-
-                // arrow should not extend past the callout bounds
-                arrowX = Math.max(Math.min(maxArrowX, arrowX), 0);
-            }
+            }
+
+            // arrow should not extend past the callout bounds
+            arrowX = Math.max(Math.min(maxArrowX, arrowX), 0);

             // move the arrow to the bottom of the callout
             if (isEndOfCallout)
@@ -576,12 +687,13 @@
                 // center the arrow on the owner
                 arrowY = (ownerVisibleHeight - arrowHeight) / 2;

+                // add owner offset
                 if (ownerY > 0)
                     arrowY += Math.abs(ownerY - getLayoutBoundsY());
-
-                // arrow should not extend past the callout bounds
-                arrowY = Math.max(Math.min(maxArrowY, arrowY), 0);
-            }
+            }
+
+            // arrow should not extend past the callout bounds
+            arrowY = Math.max(Math.min(maxArrowY, arrowY), 0);

             // move the arrow to the end of the callout
             if (isEndOfCallout)
@@ -654,15 +766,9 @@
         var position:Number = 0;

         if (calloutStart < screenStart)
-        {
             position += (screenStart - calloutStart) / scaleFactor;
-            invalidateArrowState = true;
-        }
         else if (calloutEnd > screenEnd)
-        {
             position -= (calloutEnd - screenEnd) / scaleFactor;
-            invalidateArrowState = true;
-        }

         return position;
     }
@@ -672,6 +778,9 @@
      *
      *  Basically the same as PopUpAnchor, but with more position options
      *  including exterior, interior and corner positions.
+     *
+     *  Nudging to fit the screen accounts for margin so that
+     *  the Callout is not positioned in the margin.
      *
      *  @see spark.components.PopUpAnchor#calculatePopUpPosition
      */
@@ -685,13 +794,11 @@

         if (!matrix)
             return regPoint;
-
-        var calloutBounds:Rectangle = new Rectangle();
-
-        determinePosition(actualHorizontalPosition, actualVerticalPosition, matrix, regPoint, calloutBounds);
-
+
         var adjustedHorizontalPosition:String;
         var adjustedVerticalPosition:String;
+        var calloutBounds:Rectangle = determinePosition(actualHorizontalPosition,
+            actualVerticalPosition, matrix, regPoint);

         // Position the callout in the opposite direction if it
         // does not fit on the screen.
@@ -708,15 +815,13 @@
                 screen.top, screen.bottom);
         }

-        var oldArrowDirection:String = _arrowDirection;
+        var oldArrowDirection:String = arrowDirection;
         var adjustedArrowDirection:String;

         // Get the new registration point based on the adjusted position
         if ((adjustedHorizontalPosition != null) || (adjustedVerticalPosition != null))
         {
             var adjustedRegPoint:Point = new Point();
-            var adjustedBounds:Rectangle = new Rectangle();
-
             var tempHorizontalPosition:String = (adjustedHorizontalPosition)
                 ? adjustedHorizontalPosition : actualHorizontalPosition;
             var tempVerticalPosition:String = (adjustedVerticalPosition)
@@ -727,9 +832,9 @@
                 tempVerticalPosition);

             // invalidate the skin if the arrow direction changed
-            if (_arrowDirection != adjustedArrowDirection)
-            {
-                _arrowDirection = adjustedArrowDirection;
+            if (arrowDirection != adjustedArrowDirection)
+            {
+                setArrowDirection(adjustedArrowDirection);

                 if (arrow)
                     arrow.visible = (arrowDirection != ArrowDirection.NONE);
@@ -741,7 +846,8 @@
                 updateSkinDisplayList();
             }

-            determinePosition(tempHorizontalPosition, tempVerticalPosition, matrix, adjustedRegPoint, adjustedBounds);
+            var adjustedBounds:Rectangle = determinePosition(tempHorizontalPosition,
+                tempVerticalPosition, matrix, adjustedRegPoint);

             if (screen)
             {
@@ -777,7 +883,7 @@
             {
                 // restore previous arrow direction *before* reversing the
                 // adjusted positions
-                _arrowDirection = oldArrowDirection;
+                setArrowDirection(oldArrowDirection);

                 skin.invalidateProperties();
                 skin.validateNow();
@@ -793,13 +899,12 @@

         // If the callout still doesn't fit, then nudge it
         // so it is completely on the screen. Make sure to include scale.
-        var buffer:Number = getStyle("gap");

         regPoint.y += nudgeToFit(calloutBounds.top, calloutBounds.bottom,
-            screen.top + buffer, screen.bottom - buffer, concatScaleY);
+            screen.top + margin, screen.bottom - margin, concatScaleY);

         regPoint.x += nudgeToFit(calloutBounds.left, calloutBounds.right,
-            screen.left + buffer, screen.right - buffer, concatScaleX);
+            screen.left + margin, screen.right - margin, concatScaleX);

         // Compute the stage coordinates of the upper,left corner of the PopUp, taking
         // the postTransformOffsets - which include mirroring - into account.
@@ -809,17 +914,9 @@
         if (layoutDirection == LayoutDirection.RTL)
             regPoint.x += calloutBounds.width;
         return MatrixUtil.getConcatenatedComputedMatrix(owner, sandboxRoot).transformPoint(regPoint);
-
-        if (invalidateArrowState)
-        {
-            updateSkinDisplayList();
-            invalidateArrowState = false;
-        }
-    }
-
-    /**
-     *  TODO (jasonsj): PARB
-     *
+    }
+
+    /**
      *  Computes actualHorizontalPosition and/or
      *  actualVerticalPosition values when using
      *  CalloutPosition.AUTO. When implementing subclasses of
@@ -852,15 +949,13 @@
      */
     mx_internal function commitAutoPosition():void
     {
-        if (!screen)
-            return;
-
-        if ((horizontalPosition != CalloutPosition.AUTO)
-            || (verticalPosition != CalloutPosition.AUTO))
-        {
+        if (!screen || ((horizontalPosition != CalloutPosition.AUTO) &&
+            (verticalPosition != CalloutPosition.AUTO)))
+        {
+            // use explicit positions instead of AUTO
             actualHorizontalPosition = null;
             actualVerticalPosition = null;
-
+
             return;
         }

@@ -889,14 +984,44 @@
         if (verticalPosition != CalloutPosition.AUTO)
         {
             // horizontal auto only
-            actualHorizontalPosition = (spaceRight > spaceLeft) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
+            switch (verticalPosition)
+            {
+                case CalloutPosition.START:
+                case CalloutPosition.MIDDLE:
+                case CalloutPosition.END:
+                {
+                    actualHorizontalPosition = (spaceRight > spaceLeft) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
+                    break;
+                }
+                default:
+                {
+                    actualHorizontalPosition = CalloutPosition.MIDDLE;
+                    break;
+                }
+            }
+
             actualVerticalPosition = null;
         }
         else if (horizontalPosition != CalloutPosition.AUTO)
         {
             // vertical auto only
+            switch (horizontalPosition)
+            {
+                case CalloutPosition.START:
+                case CalloutPosition.MIDDLE:
+                case CalloutPosition.END:
+                {
+                    actualVerticalPosition = (spaceBottom > spaceTop) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
+                    break;
+                }
+                default:
+                {
+                    actualVerticalPosition = CalloutPosition.MIDDLE;
+                    break;
+                }
+            }
+
             actualHorizontalPosition = null;
-            actualVerticalPosition = (spaceBottom > spaceTop) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
         }
         else // if ((verticalPosition == CalloutPosition.AUTO) && (horizontalPosition == CalloutPosition.AUTO))
         {
@@ -932,8 +1057,13 @@
                 actualVerticalPosition = CalloutPosition.MIDDLE;
             }
         }
-    }
-
+
+        invalidateArrowDirection = true;
+    }
+
+    /**
+     *  @private
+     */
     mx_internal function determineArrowPosition(horizontalPos:String, verticalPos:String):String
     {
         // determine arrow direction, outer positions get priority
@@ -986,9 +1116,12 @@

     /**
      *  @private
+     *
+     *  Uses horizontalPosition and verticalPosition to determine the bounds of
+     *  the callout.
      */
     mx_internal function determinePosition(horizontalPos:String, verticalPos:String,
-                                           matrix:Matrix, registrationPoint:Point, bounds:Rectangle):void
+                                           matrix:Matrix, registrationPoint:Point):Rectangle
     {
         var ownerVisualElement:ILayoutElement = owner as ILayoutElement;
         var ownerWidth:Number = (ownerVisualElement) ? ownerVisualElement.getLayoutBoundsWidth() : owner.width;
@@ -997,47 +1130,101 @@
         switch (horizontalPos)
         {
             case CalloutPosition.BEFORE:
+            {
+                // The full width of the callout is before the owner
+                // All arrow directions are ArrowDirection.RIGHT x=(width - arrow.width)
                 registrationPoint.x = -width;
                 break;
+            }
             case CalloutPosition.START:
+            {
+                // ArrowDirection.LEFT is at x=0
                 registrationPoint.x = 0;
                 break;
+            }
             case CalloutPosition.END:
-                registrationPoint.x = ownerWidth - width;
-                break;
+            {
+                // The ends of the owner and callout are aligned
+                registrationPoint.x = (ownerWidth - width);
+                break;
+            }
             case CalloutPosition.AFTER:
+            {
+                // The full width of the callout is after the owner
+                // All arrow directions are ArrowDirection.LEFT (x=0)
                 registrationPoint.x = ownerWidth;
                 break;
+            }
             default: // case CalloutPosition.MIDDLE:
+            {
                 registrationPoint.x = Math.floor((ownerWidth - width) / 2);
                 break;
+            }
         }

         switch (verticalPos)
         {
             case CalloutPosition.BEFORE:
+            {
+                // The full height of the callout is before the owner
+                // All arrow directions are ArrowDirection.DOWN y=(height - arrow.height)
                 registrationPoint.y = -height;
                 break;
+            }
             case CalloutPosition.START:
+            {
+                // ArrowDirection.UP is at y=0
                 registrationPoint.y = 0;
                 break;
+            }
             case CalloutPosition.MIDDLE:
+            {
                 registrationPoint.y = Math.floor((ownerHeight - height) / 2);
                 break;
+            }
             case CalloutPosition.END:
-                registrationPoint.y = ownerHeight - height;
-                break;
+            {
+                // The ends of the owner and callout are aligned
+                registrationPoint.y = (ownerHeight - height);
+                break;
+            }
             default: //case CalloutPosition.AFTER:
+            {
+                // The full height of the callout is after the owner
+                // All arrow directions are ArrowDirection.UP (y=0)
                 registrationPoint.y = ownerHeight;
                 break;
+            }
         }

         var topLeft:Point = registrationPoint.clone();
         var size:Point = MatrixUtil.transformBounds(width, height, matrix, topLeft);
+        var bounds:Rectangle = new Rectangle();
+
         bounds.left = topLeft.x;
         bounds.top = topLeft.y;
         bounds.width = size.x;
         bounds.height = size.y;
+
+        return bounds;
+    }
+
+    /**
+     * @private
+     */
+    mx_internal function get isArrowHorizontal():Boolean
+    {
+        return (arrowDirection == ArrowDirection.LEFT ||
+                arrowDirection == ArrowDirection.RIGHT);
+    }
+
+    /**
+     * @private
+     */
+    mx_internal function get isArrowVertical():Boolean
+    {
+        return (arrowDirection == ArrowDirection.UP ||
+                arrowDirection == ArrowDirection.DOWN);
     }

     //--------------------------------------------------------------------------
@@ -1063,13 +1250,26 @@
     {
         updateSkinDisplayList();
     }
-
-    /**
-     *  @private
-     */
-    private function arrow_updateCompleteHandler(event:Event):void
-    {
-        updateSkinDisplayList();
+
+    /**
+     *  @private
+     */
+    private function owner_removedFromStage(event:Event):void
+    {
+        if (isOpen)
+            close();
+    }
+
+    /**
+     *  @private
+     */
+    private function systemManager_resizeHandler(event:Event):void
+    {
+        // screen resize might require a new arrow direction and callout position
+        invalidatePosition();
+
+        // force a redraw to call positionPopUp()
+        invalidateDisplayList();
     }
 }
 }