Transferred from the Adobe Open Source Subversion Repository

Revision: 4170
Author:   egeorgie@adobe.com
Date:     2008-11-23T21:12:27.092823Z

Log Message:
-----------
1.	mx.layout.ILayoutItem gets renamed to mx.layout.ILayoutElement
2.	get actualPosition() -> getLayoutPositionX(postTransform:Boolean=true):Number, getLayoutPositionY(postTransform:Boolean=true):Number
3.	get actualSize() -> getLayoutWidth(postTransform:Boolean=true):Number, getLayoutHeight(postTransform:Boolean=true):Number
4.	get preferredSize() -> getPreferredWidth(postTransform:Boolean=true):Number, getPreferredHeight(postTransform:Boolean=true):Number
5.	get minSize() -> getMinWidth(postTransform:Boolean=true):Number, getMinHeight(postTransform:Boolean=true):Number
6.	get maxSize() -> getMaxWidth(postTransform:Boolean=true):Number, getMaxHeight(postTransform:Boolean=true):Number
7.	setActualSize() -> setlayoutSize(width:Number=NaN, height:Number=NaN, postTransform:Boolean=true):void
8.	setActualPosition() -> setLayoutPosition(width:Number=NaN, height:Number=NaN, postTransform:Boolean=true):void
10.     Add support for custom 3D layouts by exposing access to transform matrices through the ILayoutElement interface.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans
tests: checkintests, mustella (gumbo/components)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/graphics/GraphicTags_checkintests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFactory.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFactory.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFDO.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementUIC.as</path>

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

--- frameworks/projects/framework/src/mx/core/ILayoutElement.as
+++ frameworks/projects/framework/src/mx/core/ILayoutElement.as
@@ -12,38 +12,15 @@
 package mx.layout
 {

+import flash.geom.Matrix;
+import flash.geom.Matrix3D;
 import flash.geom.Point;

 /**
- *  TERMINOLOGY
- *
- *
TBounds - bounds of an object in object's parent coordinate space, i.e.
- *            bounds of the transformed object.

- *
- *
UBounds - bounds of an object in object's own coordinate space, i.e.
- *            bounds of the untransformed object (object's dimensions).

- *
- *
Example: Consider a rectangle width=3, height=1 with rotation=90.

- *
- *
Ubounds (before transform) are (3,1):
- *

- *       +--------+
- *       |        |
- *       +--------+
- *

- *

- *
- *
TBounds (after transform) are (1,3):
- *

- *       +----+
- *       |    |
- *       |    |
- *       |    |
- *       +----+
- *

- *

+ *  The ILayoutElement interface is used primarily by the layout classes to query,
+ *  size and position the elements of the GroupBase based containers.
  */
-public interface ILayoutItem
+public interface ILayoutElement
 {
     /**
      * @copy mx.core.IVisualElement#left
@@ -97,72 +74,256 @@
     function get target():Object;

     /**
-     *  Indicates whether to layout should ignore this item or not.
+     *  Indicates whether the layout should ignore this element or not.
      */
     function get includeInLayout():Boolean;

     /**
-     *  The TBounds of the preferred
-     *  item size. The preferred size is usually based on the default
-     *  item size and any explicit size overrides.
-     */
-    function get preferredSize():Point;
-
-    /**
-     *  The TBounds of the minimum item size.
-     *  minSize <= preferredSize must be true.
-     */
-    function get minSize():Point;
-
-    /**
-     *  The TBounds of the maximum item size.
-     *  preferredSize <= maxSize must be true.
-     */
-    function get maxSize():Point;
+     *  @return Returns the element's preferred width.  Preferred width is
+     *  usually based on the default element size and any explicit overrides.
+     *  For UIComponent this is the same as getExplicitOrMeasuredWidth().
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box width.  Bounding box is in element's parent
+     *  coordinate space and is calculated from  the element's perferred size and
+     *  layout transform matrix.
+     *
+     *  @see #getPreferredHeight
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getPreferredWidth(postTransform:Boolean=true):Number;
+
+    /**
+     *  @return Returns the element's preferred height.  Preferred height is
+     *  usually based on the default element size and any explicit overrides.
+     *  For UIComponent this is the same as getExplicitOrMeasuredHeight().
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box height.  Bounding box is in element's parent
+     *  coordinate space and is calculated from  the element's perferred size and
+     *  layout transform matrix.
+     *
+     *  @see #getPreferredWidth
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getPreferredHeight(postTransform:Boolean=true):Number;
+
+    /**
+     *  Returns the element's minimum width.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box width. Bounding box is in element's parent
+     *  coordinate space and is calculated from the element's minimum size and
+     *  layout transform matrix.
+     *
+     *  @see #getMinHeight
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getMinWidth(postTransform:Boolean=true):Number;
+
+    /**
+     *  Returns the element's minimum height.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box height. Bounding box is in element's parent
+     *  coordinate space and is calculated from the element's minimum size and
+     *  layout transform matrix.
+     *
+     *  @see #getMinWidth
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getMinHeight(postTransform:Boolean=true):Number;
+
+    /**
+     *  Returns the element's maximum width.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box width. Bounding box is in element's parent
+     *  coordinate space and is calculated from the element's maximum size and
+     *  layout transform matrix.
+     *
+     *  @see #getMaxHeight
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getMaxWidth(postTransform:Boolean=true):Number;
+
+    /**
+     *  Returns the element's maximum height.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box height. Bounding box is in element's parent
+     *  coordinate space and is calculated from the element's maximum size and
+     *  layout transform matrix.
+     *
+     *  @see #getMaxWidth
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getMaxHeight(postTransform:Boolean=true):Number;

     /**
-     *  The item TBounds size.
-     */
-    function get actualSize():Point;
-
-    /**
-     *  The item TBounds top left corner coordinates.
-     */
-    function get actualPosition():Point;
-
-    /**
-     *  Moves the item such that the item TBounds
-     *  top left corner has the specified coordinates.
-     */
-    function setActualPosition( x:Number, y:Number ):void;
-
-    /**
-     *  setActualSize modifies the item size/transform so that
-     *  its TBounds have the specified width and height.
+     *  Returns the element's layout width. This is the size that the element uses
+     *  to draw on screen.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box width. Bounding box is in element's parent
+     *  coordinate space and is calculated from the element's layout size and
+     *  layout transform matrix.
+     *
+     *  @see #getLayoutHeight
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getLayoutWidth(postTransform:Boolean=true):Number;
+
+    /**
+     *  Returns the element's layout height. This is the size that the element uses
+     *  to draw on screen.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  the element's bounding box width. Bounding box is in element's parent
+     *  coordinate space and is calculated from the element's layout size and
+     *  layout transform matrix.
+     *
+     *  @see #getLayoutWidth
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getLayoutHeight(postTransform:Boolean=true):Number;
+
+    /**
+     *  Returns the x coordinate that the element uses to draw on screen.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  x coordinate of the element's bounding box top-left corner.
+     *  Bounding box is in element's parent coordinate space and is calculated
+     *  from the element's layout size, layout position and layout transform matrix.
+     *
+     *  @see #getLayoutPositionY
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getLayoutPositionX(postTransform:Boolean=true):Number;
+
+    /**
+     *  Returns the y coordinate that the element uses to draw on screen.
+     *
+     *  @param postTransform When postTransform is true the method returns
+     *  y coordinate of the element's bounding box top-left corner.
+     *  Bounding box is in element's parent coordinate space and is calculated
+     *  from the element's layout size, layout position and layout transform matrix.
+     *
+     *  @see #getLayoutPositionX
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function getLayoutPositionY(postTransform:Boolean=true):Number;
+
+    /**
+     *  Sets the coordinates that the element uses to draw on screen.
+     *
+     *  @param postTransform When postTransform is true, the element is positioned
+     *  in such a way that the top-left corner of its bounding box is (x, y).
+     *  Bounding box is in element's parent coordinate space and is calculated
+     *  from the element's layout size, layout position and layout transform matrix.
+     *
+     *  Note that calls to setLayoutSize can affect the layout position, so
+     *  setLayoutPosition should be called after setLayoutSize.
+     *
+     *  @see #setLayoutSize
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function setLayoutPosition(x:Number, y:Number, postTransform:Boolean=true):void;
+
+    /**
+     *  Sets the layout size to the specified dimensions.  This is the size that
+     *  the element uses to draw on screen.
      *
-     *  If one of the desired TBounds dimensions is left unspecified, it's size
-     *  will be picked such that item can be optimally sized to fit the other
-     *  TBounds dimension. This is useful when the layout doesn't want to
-     *  overconstrain the item in cases where the item TBounds width and height
-     *  are dependent (text, components with complex transforms, etc.)
-     *
-     *  If both TBounds dimensions are left unspecified, the item will have its
-     *  preferred size set.
-     *
-     *  setActualSize does not clip against minSize and
-     *  maxSize properties.
-     *
-     *  setActualSize must preserve the item's TBounds position,
-     *  which means that in some cases it will move the item in addition to
-     *  changing its size.
-     *
-     *  @param width The target width. The path is scaled to fit the specified dimensions.
-     *
-     *  @param height the target height. The path is scaled to fit the specified dimensions.
-     *
-     *  @return Returns the TBounds of the new item size.
-     */
-    function setActualSize( width:Number = Number.NaN, height:Number = Number.NaN ):Point;
+     *  If one of the dimensions is left unspecified (NaN), it's size
+     *  will be picked such that element can be optimally sized to fit the other
+     *  dimension.  This is useful when the caller doesn't want to
+     *  overconstrain the element, for example when the element's width and height
+     *  are corelated (text, components with complex transforms, etc.)
+     *  If both dimensions are left unspecified, the element will have its layout size
+     *  set to its preferred size.
+     *
+     *  setLayoutSize does not clip against minium or maximum sizes.
+     *
+     *  Note that calls to setLayoutSize can affect the layout position, so
+     *  setLayoutSize should be called before setLayoutPosition.
+     *
+     *  @param width The target width.
+     *
+     *  @param height The target height.
+     *
+     *  @param postTransform When postTransform is true, the specified dimensions
+     *  are those of the element's bounding box.
+     *  Bounding box is in element's parent coordinate space and is calculated
+     *  from the element's layout size, layout position and layout transform matrix.
+     *
+     *  @see #setLayoutPosition
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function setLayoutSize(width:Number = Number.NaN,
+                           height:Number = Number.NaN,
+                           postTransform:Boolean=true):void;
+
+    /**
+     *  Returns the layout transform Matrix for this element.
+     *  Don't directly modify the return value but call setLayoutMatrix instead.
+     */
+    function getLayoutMatrix():Matrix;
+
+    /**
+     *  Sets the transform Matrix that is used to calculate the component's layout
+     *  size and position relative to its siblings.
+     *
+     *  Note that layout Matrix is factored in the getPreferredSize(),
+     *  getMinSize(), getMaxSize(), getLayoutSize() when computed in parent coordinates
+     *  as well as in getLayoutPosition() in both parent and child coordinates.
+     *
+     *
The method is typically used by layouts that calculate the transform
+     *  matrix explicitly and work with sizes in child coordinates, ingnoring
+     *  getLayoutPosition.  Calling this method does not cause a subsequent layout
+     *  pass (doesn't invalidate element's parent size or display list).

+     *
+     *  @see #setLayoutMatrix3D
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function setLayoutMatrix(m:Matrix):void;
+
+    /**
+     *  Returns the layout transform Matrix3D for this element.
+     *  Don't directly modify the return value but call setLayoutMatrix instead.
+     */
+    function getLayoutMatrix3D():Matrix3D;
+
+    /**
+     *  Sets the transform Matrix3D that is used to calculate the component's layout
+     *  size and position relative to its siblings.
+     *
+     *  Note that layout Matrix3D is factored in the getPreferredSize(),
+     *  getMinSize(), getMaxSize(), getLayoutSize() when computed in parent coordinates
+     *  as well as in getLayoutPosition() in both parent and child coordinates.
+     *
+     *
The method is typically used by layouts that calculate the transform
+     *  matrix explicitly and work with sizes in child coordinates, ingnoring
+     *  getLayoutPosition.  Calling this method does not cause a subsequent layout
+     *  pass (doesn't invalidate element's parent size or display list).

+     *
+     *  @see #setLayoutMatrix3D
+     *  @see mx.core.UIComponent#layoutMatrix
+     *  @see mx.core.UIComponent#layoutMatrix3D
+     */
+    function setLayoutMatrix3D(m:Matrix3D):void;
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4159
Author:   pfarland@adobe.com
Date:     2008-11-21T21:06:29.675775Z

Log Message:
-----------
Enhancement SDK-18016 - updating mxmlc's Embed functionality to recognize .pbj files as precompiled Shader files. This change still retains the old octet stream MIME type mapping to a ByteArray based class, but this change removes the hoop you have to jump through to embed a Shader. The new Embed usage should simply be as follows:

    [Embed(source="TubeView.pbj")]
    private var TubeViewClass:Class; //Subclass of flash.display.Shader

Also updating Embed MIME types to recognize .dfont files since these are supported by CFFFontManager.

Finally, updating FXG TextGraphic -> SymbolClass to use a simple FlexSprite instead of a Group. TextGraphic should now render at the right depth among SWF graphics primitives when compile time optimized FXG is used.

QE: Yes
Doc: If we've documented embedding .pbj, this is a simpler approach and represents a slight change in syntax.
Checkintests: Pass
Reviewer: Corey (Note he said he'll update ShaderFilter with a new property to accept a shader directly in a future check-in).

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/FontTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/DataTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/TextFXGGraphics.java</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/PBJTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/EmbedUtil.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/WebTierAPI.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/MimeMappings.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/TextHelper.java</path>

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

--- frameworks/projects/spark/src/spark/filters/ShaderFilter.as
+++ frameworks/projects/spark/src/spark/filters/ShaderFilter.as
@@ -176,26 +176,34 @@
      * The shader bytecode for this Shader instance, either a Class or ByteArray
      * instance.
      */
-    public function set byteCode(byteCode:*):void
+    public function set byteCode(value:*):void
     {
         // Since our bytecode is sometimes reassigned by the
         // binding infrastructure we only initialize ourselves
         // upon the first instance.
-        if (byteCode == _byteCode)
+        if (value == _byteCode)
             return;

         // Create our shader instance from the byteCode provided.
-        if (byteCode is ByteArray)
-            _shader = new Shader(byteCode);
-        else if (byteCode is Class)
-            _shader = new Shader(new byteCode());
-
+        if (value is ByteArray)
+        {
+            _shader = new Shader(value);
+        }
+        else if (value is Class)
+        {
+            var obj:* = new value();
+            if (obj is Shader)
+                _shader = obj as Shader;
+            else if (obj is ByteArray)
+                _shader = new Shader(obj as ByteArray);
+        }
+
         // Push any pending properties onto the new shader instance.
         applyQueuedProperties();

         // Our new filter is ready to do its work.
         notifyFilterChanged();
-        _byteCode = byteCode;
+        _byteCode = value;
     }

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


修改了部分不一致

修改了部分不一致

--- OcgSee/src/com/application/ApplicationFacade.as
+++ OcgSee/src/com/application/ApplicationFacade.as
@@ -25,6 +25,7 @@
 	import com.application.ocgsee.mediators.LoginMediator;
 	import com.application.ocgsee.models.DeckPackage;
 	import com.application.ocgsee.models.GlobalModel;
+	import com.application.ocgsee.models.LflistPackage;
 	import com.application.ocgsee.models.SQLText;
 	import com.application.ocgsee.proxys.AssetsProxy;
 	import com.application.ocgsee.proxys.CardsSearchProxy;
@@ -122,7 +123,7 @@
 			registerProxy(new LoaderProxy(appAssets));

 			registerProxy(new DeckProxy(new DeckPackage));
-			registerProxy(new LimitProxy());
+			registerProxy(new LimitProxy(new LflistPackage));
 			initializeLoadMap();
 		}


Typo fixed.

Typo fixed.

--- bin/Data/Scripts/Editor.as
+++ bin/Data/Scripts/Editor.as
@@ -208,7 +208,7 @@
         if (cameraElem.HasAttribute("viewportmode")) viewportMode = cameraElem.GetUInt("viewportmode");
         if (cameraElem.HasAttribute("mouseorbitmode")) mouseOrbitMode = cameraElem.GetInt("mouseorbitmode");
         if (cameraElem.HasAttribute("mmbpan")) mmbPanMode = cameraElem.GetBool("mmbpan");
-        if (cameraElem.HasAttribute("mmbpan")) rotateAroundSelect = cameraElem.GetBool("rotatearoundselect");
+        if (cameraElem.HasAttribute("rotatearoundselect")) rotateAroundSelect = cameraElem.GetBool("rotatearoundselect");

         UpdateViewParameters();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 17198
Author:   jszeto@adobe.com
Date:     2010-08-05T04:16:36.133208Z

Log Message:
-----------
Mobile Button Skin

Added icon support:
- Added iconClass and labelPlacement styles to Button

Reworked ButtonSkin.as:
- Switched from creating TextFields to using createInFontContext to create UITextFields
- Removed all of the TextFormat and style code. UITextField uses the style protochain to get the proper text styles.
- Replaced measure with the measure code from mx Button.
- Replaced updateDisplayList with the layoutContents code from mx Button.
- Added states in constructor
- Fixed up the formatting to follow the framework conventions
- Added copyright and asdoc comments

Temporarily added ButtonLabelPlacement into the mobilecomponents swc. I more permanent solution is to move ButtonLabelPlacement.as from the mx to frameworks rsl.

This should fix the text style and sizing issues. LabelPlacement supports left, right, top and bottom.

The button icon support API is not final.

QE notes: This change along with revision 17195 will require new mobile Button mustella baselines
Doc notes: n/a
Bugs:
Reviewer: Ryan
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ButtonLabelPlacement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Button.as
+++ frameworks/projects/mx/src/mx/controls/Button.as
@@ -2241,6 +2241,7 @@
         {
             lineMetrics = measureText("Wj");
             textHeight = lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
+            // TODO (jszeto) Do we need to set textWidth?
         }

         var n:Number = offset ? buttonOffset : 0;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Fix AngelScript warning.

Fix AngelScript warning.

--- Bin/Data/Scripts/NinjaSnowWar.as
+++ Bin/Data/Scripts/NinjaSnowWar.as
@@ -158,7 +158,7 @@
         // Adjust the directional light shadow range slightly further, as only the first
         // cascade is supported
         Node@ dirLightNode = gameScene.GetChild("GlobalLight", true);
-        if (dirLightNode != null)
+        if (dirLightNode !is null)
         {
             Light@ dirLight = dirLightNode.GetComponent("Light");
             dirLight.shadowCascade = CascadeParameters(15.0f, 0.0f, 0.0f, 0.0f, 0.9f);


Update elevator_backDoorCon.as

Update elevator_backDoorCon.as


This was moved to ezgame/util and renamed the EZObjectMarshaller.

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

--- src/as/com/threerings/util/FlashObjectMarshaller.as
+++ src/as/com/threerings/util/FlashObjectMarshaller.as
@@ -1,64 +0,0 @@
-package com.threerings.util {
-
-import flash.net.ObjectEncoding;
-
-import flash.system.ApplicationDomain;
-
-import flash.utils.ByteArray;
-import flash.utils.Endian;
-
-import com.threerings.io.TypedArray;
-
-/**
- * Utility methods for transferring flash properties via
- * the presents dobj system.
- */
-public class FlashObjectMarshaller
-{
-    public static function encode (
-        obj :Object, encodeArrayElements :Boolean = true) :Object
-    {
-        if (obj == null) {
-            return null;
-        }
-        if (encodeArrayElements && obj is Array) {
-            var src :Array = (obj as Array);
-            var dest :TypedArray = TypedArray.create(ByteArray);
-            for each (var o :Object in src) {
-                dest.push(encode(o, false));
-            }
-            return dest;
-        }
-
-        // TODO: Our own encoding, that takes into account
-        // the ApplicationDomain
-        var bytes :ByteArray = new ByteArray();
-        bytes.endian = Endian.BIG_ENDIAN;
-        bytes.objectEncoding = ObjectEncoding.AMF3;
-        bytes.writeObject(obj);
-        return bytes;
-    }
-
-    public static function decode (encoded :Object) :Object
-    {
-        if (encoded == null) {
-            return null;
-        }
-        if (encoded is TypedArray) {
-            var src :TypedArray = (encoded as TypedArray);
-            var dest :Array = [];
-            for each (var b :ByteArray in src) {
-                dest.push(decode(b));
-            }
-            return dest;
-        }
-        var bytes :ByteArray = (encoded as ByteArray);
-
-        // TODO: Our own decoding, that takes into account
-        // the ApplicationDomain
-        bytes.endian = Endian.BIG_ENDIAN;
-        bytes.objectEncoding = ObjectEncoding.AMF3;
-        return bytes.readObject();
-    }
-}
-}


quick fix for a bug in PromptingTextInput

--- src/flexlib/controls/PromptingTextInput.as
+++ src/flexlib/controls/PromptingTextInput.as
@@ -141,9 +141,13 @@
 		}
 	}

+
 	override public function set text( value:String ):void
 	{
-		_textEmpty = value.length == 0;
+		// changed the test to also test for null values, not just 0 length
+		// if we were passed undefined or null then the zero length test would
+		// still return false. - Doug McCune
+		_textEmpty = (!value) || value.length == 0;
 		super.text = value;
 		invalidateDisplayList();
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/mx/src/mx/effects/WipeUp.as
+++ frameworks/projects/mx/src/mx/effects/WipeUp.as
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.effects
+{
+
+import mx.effects.effectClasses.WipeUpInstance;
+
+/**
+ *  The WipeUp class defines a bar wipe up effect.
+ *  The before or after state of the component must be invisible.
+ *
+ *
You often use this effect with the showEffect
+ *  and hideEffect triggers. The showEffect
+ *  trigger occurs when a component becomes visible by changing its
+ *  visible property from false to true.
+ *  The hideEffect trigger occurs when the component becomes
+ *  invisible by changing its visible property from
+ *  true to false.

+ *
+ *
This effect inherits the MaskEffect.show property.
+ *  If you set the value to true, the component appears.
+ *  If you set the value to false, the component disappears.
+ *  The default value is true.

+ *
+ *
If you specify this effect for a showEffect or
+ *  hideEffect trigger, Flex sets the show property
+ *  for you, either to true if the component becomes invisible,
+ *  or false if the component becomes visible.

+ *
+ *  @mxml
+ *
+ *
The <mx:WipeUp> tag
+ *  inherits all of the tag attributes of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:WipeUp
+ *    id="ID"
+ *  />
+ *

+ *
+ *  @see mx.effects.effectClasses.WipeUpInstance
+ *
+ *  @includeExample examples/WipeUpExample.mxml
+ */
+public class WipeUp extends MaskEffect
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param target The Object to animate with this effect.
+	 */
+	public function WipeUp(target:Object = null)
+	{
+		super(target);
+
+		instanceClass = WipeUpInstance;
+	}
+}
+
+}


Code formatting, reordering and a comment.

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

--- src/org/igniterealtime/xiff/vcard/VCard.as
+++ src/org/igniterealtime/xiff/vcard/VCard.as
@@ -8,9 +8,9 @@
 	import flash.utils.ByteArray;
 	import flash.utils.Timer;
 	import flash.xml.XMLNode;
-
+
 	import mx.utils.Base64Decoder;
-
+
 	import org.igniterealtime.xiff.core.UnescapedJID;
 	import org.igniterealtime.xiff.core.XMPPConnection;
 	import org.igniterealtime.xiff.data.IQ;
@@ -18,512 +18,438 @@
 	import org.igniterealtime.xiff.data.im.RosterItemVO;
 	import org.igniterealtime.xiff.data.vcard.VCardExtension;
 	import org.igniterealtime.xiff.events.VCardEvent;
-
+
 	[Bindable]
+	/**
+	 *
+	 */
 	public class VCard extends EventDispatcher
 	{
+		/**
+		 *
+		 * @default
+		 */
+		private static var cache:Object = {};
+
+		/**
+		 * Flush the vcard cache every 6 hours
+		 * @default
+		 */
+		private static var cacheFlushTimer:Timer = new Timer( 6 * 60 * 60 * 1000,
+															  0 );
+
+		/**
+		 *
+		 * @default
+		 */
+		private static var requestQueue:Array = [];
+
+		/**
+		 *
+		 * @default
+		 */
+		private static var requestTimer:Timer;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var company:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var department:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var email:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var firstName:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var fullName:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homeAddress:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homeCellNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homeCity:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homeCountry:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homeFaxNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homePagerNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homePostalCode:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homeStateProvince:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var homeVoiceNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var jid:UnescapedJID;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var lastName:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var loaded:Boolean = false;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var middleName:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var nickname:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var title:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var url:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workAddress:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workCellNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workCity:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workCountry:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workFaxNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workPagerNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workPostalCode:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workStateProvince:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		public var workVoiceNumber:String;
+
+		/**
+		 *
+		 * @default
+		 */
+		private var _avatar:DisplayObject;
+
+		/**
+		 *
+		 * @default
+		 */
+		private var _imageBytes:ByteArray;
+
+		/**
+		 *
+		 * @default
+		 */
 		private var _loader:Loader;
-
+
+		/**
+		 *
+		 * @default
+		 */
 		private var contact:RosterItemVO;
-		public var jid:UnescapedJID;
-		public var firstName:String;
-		public var middleName:String;
-		public var lastName:String;
-		public var nickname:String;
-		public var email:String;
-		public var fullName:String;
-		public var company:String;
-		public var department:String;
-		public var title:String;
-		public var url:String;
-		public var workPostalCode:String;
-		public var workStateProvince:String;
-		public var workAddress:String;
-		public var workCountry:String;
-		public var workCity:String;
-		public var homePostalCode:String;
-		public var homeStateProvince:String;
-		public var homeAddress:String;
-		public var homeCountry:String;
-		public var homeCity:String;
-		public var workVoiceNumber:String;
-		public var workFaxNumber:String;
-		public var workPagerNumber:String;
-		public var workCellNumber:String;
-		public var homeVoiceNumber:String;
-		public var homeFaxNumber:String;
-		public var homePagerNumber:String;
-		public var homeCellNumber:String;
-		private static var cache:Object = {};
-		public var loaded:Boolean = false;
-		private var _avatar:DisplayObject;
-		private var _imageBytes:ByteArray;
-
-		private static var requestQueue:Array = [];
-		private static var requestTimer:Timer;
-		//flush the vcard cache every 6 hours
-		private static var cacheFlushTimer:Timer = new Timer(21600000, 0);
-		public static function getVCard(con:XMPPConnection, user:RosterItemVO):VCard
+
+		/**
+		 *
+		 * @param con
+		 * @param user
+		 * @return
+		 */
+		public static function getVCard( con:XMPPConnection, user:RosterItemVO ):VCard
 		{
-			if(!cacheFlushTimer.running)
+			if ( !cacheFlushTimer.running )
 			{
 				cacheFlushTimer.start();
-				cacheFlushTimer.addEventListener(TimerEvent.TIMER, function(event:TimerEvent):void
-		{
-					var tempCache:Object = cache;
-					cache = {};
-					for each(var cachedCard:VCard in tempCache)
+				cacheFlushTimer.addEventListener( TimerEvent.TIMER, function( event:TimerEvent ):void
 					{
-						pushRequest(con, vcard);
-					}
-				});
-			}
-
+						var tempCache:Object = cache;
+						cache = {};
+						for each ( var cachedCard:VCard in tempCache )
+						{
+							pushRequest( con, vcard );
+						}
+					});
+			}
+
 			var jidString:String = user.jid.toString();
-
-			var cachedCard:VCard = cache[jidString];
-			if(cachedCard)
+
+			var cachedCard:VCard = cache[ jidString ];
+			if ( cachedCard )
 				return cachedCard;
-
+
 			var vcard:VCard = new VCard();
 			vcard.contact = user;
-			cache[jidString] = vcard;
-
-			pushRequest(con, vcard);
-
-		    return vcard;
+			cache[ jidString ] = vcard;
+
+			pushRequest( con, vcard );
+
+			return vcard;
 		}
-
-		private static function pushRequest(con:XMPPConnection, vcard:VCard):void
+
+		/**
+		 *
+		 * @param con
+		 * @param vcard
+		 */
+		private static function pushRequest( con:XMPPConnection, vcard:VCard ):void
 		{
-			if(!requestTimer)
-			{
-				requestTimer = new Timer(1, 1);
-				requestTimer.addEventListener(TimerEvent.TIMER_COMPLETE, sendRequest);
-			}
-			requestQueue.push({connection:con, card:vcard});
+			if ( !requestTimer )
+			{
+				requestTimer = new Timer( 1, 1 );
+				requestTimer.addEventListener( TimerEvent.TIMER_COMPLETE, sendRequest );
+			}
+			requestQueue.push({ connection: con, card: vcard });
 			requestTimer.reset();
 			requestTimer.start();
 		}
-
-		private static function sendRequest(event:TimerEvent):void
+
+		/**
+		 *
+		 * @param event
+		 */
+		private static function sendRequest( event:TimerEvent ):void
 		{
-			if(requestQueue.length == 0)
+			if ( requestQueue.length == 0 )
 				return;
 			var req:Object = requestQueue.pop();
 			var con:XMPPConnection = req.connection;
 			var vcard:VCard = req.card;
-			var user:RosterItemVO = vcard.contact;
-
-			var iq:IQ = new IQ(user.jid.escaped, IQ.GET_TYPE);
+			var user:RosterItemVO = vcard.contact;
+
+			var iq:IQ = new IQ( user.jid.escaped, IQ.GET_TYPE );
 			vcard.jid = user.jid;
-
+
 			iq.callbackName = "handleVCard";
 			iq.callbackScope = vcard;
-			iq.addExtension(new VCardExtension());
-
-			con.send(iq);
+			iq.addExtension( new VCardExtension());
+
+			con.send( iq );
 			requestTimer.reset();
 			requestTimer.start();
 		}
-
-		public function saveVCard(con:XMPPConnection, user:RosterItemVO):void
+
+		/**
+		 *
+		 * @param resultIQ
+		 */
+		public function _vCardSent( resultIQ:IQ ):void
 		{
-			var iq:IQ = new IQ(null, IQ.SET_TYPE, XMPPStanza.generateID("save_vcard_"), null, this, _vCardSent);
-			var vcardExt:VCardExtension = new VCardExtension();
-			var vcardExtNode:XMLNode = vcardExt.getNode();
-
-			if (firstName || middleName || lastName)
-			{
-				var nameNode:XMLNode = new XMLNode(1, 'N');
-
-				if (firstName)
-				{
-					var firstNameNode:XMLNode = new XMLNode(1, 'GIVEN');
-					firstNameNode.appendChild(new XMLNode(3, firstName));
-
-					nameNode.appendChild(firstNameNode);
-				}
-
-				if (middleName)
-				{
-					var middleNameNode:XMLNode = new XMLNode(1, 'MIDDLE');
-					middleNameNode.appendChild(new XMLNode(3, middleName));
-
-					nameNode.appendChild(middleNameNode);
-				}
-
-				if (lastName)
-				{
-					var lastNameNode:XMLNode = new XMLNode(1, 'FAMILY');
-					lastNameNode.appendChild(new XMLNode(3, lastName));
-
-					nameNode.appendChild(lastNameNode);
-				}
-
-				vcardExtNode.appendChild(nameNode);
-			}
-
-			if (fullName)
-			{
-				var fullnameNode:XMLNode = new XMLNode(1, 'FN');
-				fullnameNode.appendChild(new XMLNode(3, fullName));
-
-				vcardExtNode.appendChild(fullnameNode);
-			}
-
-			if (nickname)
-			{
-				var nicknameNode:XMLNode = new XMLNode(1, 'NICKNAME');
-				nicknameNode.appendChild(new XMLNode(3, nickname));
-
-				vcardExtNode.appendChild(nicknameNode);
-			}
-
-			if (email)
-			{
-				var emailNode:XMLNode = new XMLNode(1, 'EMAIL');
-				emailNode.appendChild(new XMLNode(3, 'INTERNET'));
-				emailNode.appendChild(new XMLNode(3, 'PREF'));
-				var userIdNode:XMLNode = new XMLNode(1, 'USERID');
-				userIdNode.appendChild(new XMLNode(3, email));
-				emailNode.appendChild(userIdNode);
-
-				vcardExtNode.appendChild(emailNode);
-			}
-
-			if (company || department)
-			{
-				var organizationNode:XMLNode = new XMLNode(1, 'ORG');
-
-				if (company)
-				{
-					var companyNode:XMLNode = new XMLNode(1, 'ORGNAME');
-					companyNode.appendChild(new XMLNode(3, company));
-
-					organizationNode.appendChild(companyNode);
-				}
-
-				if (department)
-				{
-					var departmentNode:XMLNode = new XMLNode(1, 'ORGUNIT');
-					departmentNode.appendChild(new XMLNode(3, department));
-
-					organizationNode.appendChild(departmentNode);
-				}
-
-				vcardExtNode.appendChild(organizationNode);
-			}
-
-			if (title)
-			{
-				var titleNode:XMLNode = new XMLNode(1, 'TITLE');
-				titleNode.appendChild(new XMLNode(3, title));
-
-				vcardExtNode.appendChild(titleNode);
-			}
-
-			if (url)
-			{
-				var urlNode:XMLNode = new XMLNode(1, 'URL');
-				urlNode.appendChild(new XMLNode(3, url));
-
-				vcardExtNode.appendChild(urlNode);
-			}
-
-			if (workAddress || workCity || workCountry || workPostalCode || workStateProvince)
-			{
-				var workAddressNode:XMLNode = new XMLNode(1, 'ADR');
-				workAddressNode.appendChild(new XMLNode(1, 'WORK'));
-
-				if (workAddress)
-				{
-					var workStreetNode:XMLNode = new XMLNode(1, 'STREET');
-					workStreetNode.appendChild(new XMLNode(3, workAddress));
-
-					workAddressNode.appendChild(workStreetNode);
-				}
-
-				if (workCity)
-				{
-					var workCityNode:XMLNode = new XMLNode(1, 'LOCALITY');
-					workCityNode.appendChild(new XMLNode(3, workCity));
-
-					workAddressNode.appendChild(workCityNode);
-				}
-
-				if (workCountry)
-				{
-					var workCountryNode:XMLNode = new XMLNode(1, 'CTRY');
-					workCountryNode.appendChild(new XMLNode(3, workCountry));
-
-					workAddressNode.appendChild(workCountryNode);
-				}
-
-				if (workPostalCode)
-				{
-					var workPostalCodeNode:XMLNode = new XMLNode(1, 'PCODE');
-					workPostalCodeNode.appendChild(new XMLNode(3, workPostalCode));
-
-					workAddressNode.appendChild(workPostalCodeNode);
-				}
-
-				if (workStateProvince)
-				{
-					var workStateProvinceNode:XMLNode = new XMLNode(1, 'REGION');
-					workStateProvinceNode.appendChild(new XMLNode(3, workStateProvince));
-
-					workAddressNode.appendChild(workStateProvinceNode);
-				}
-
-				vcardExtNode.appendChild(workAddressNode);
-			}
-
-			if (homeAddress || homeCity || homeCountry || homePostalCode || homeStateProvince)
-			{
-				var homeAddressNode:XMLNode = new XMLNode(1, 'ADR');
-				homeAddressNode.appendChild(new XMLNode(1, 'HOME'));
-
-				if (homeAddress)
-				{
-					var homeStreetNode:XMLNode = new XMLNode(1, 'STREET');
-					homeStreetNode.appendChild(new XMLNode(3, homeAddress));
-
-					homeAddressNode.appendChild(homeStreetNode);
-				}
-
-				if (homeCity)
-				{
-					var homeCityNode:XMLNode = new XMLNode(1, 'LOCALITY');
-					homeCityNode.appendChild(new XMLNode(3, homeCity));
-
-					homeAddressNode.appendChild(homeCityNode);
-				}
-
-				if (homeCountry)
-				{
-					var homeCountryNode:XMLNode = new XMLNode(1, 'CTRY');
-					homeCountryNode.appendChild(new XMLNode(3, homeCountry));
-
-					homeAddressNode.appendChild(homeCountryNode);
-				}
-
-				if (homePostalCode)
-				{
-					var homePostalCodeNode:XMLNode = new XMLNode(1, 'PCODE');
-					homePostalCodeNode.appendChild(new XMLNode(3, homePostalCode));
-
-					homeAddressNode.appendChild(homePostalCodeNode);
-				}
-
-				if (homeStateProvince)
-				{
-					var homeStateProvinceNode:XMLNode = new XMLNode(1, 'REGION');
-					homeStateProvinceNode.appendChild(new XMLNode(3, homeStateProvince));
-
-					homeAddressNode.appendChild(homeStateProvinceNode);
-				}
-
-				vcardExtNode.appendChild(homeAddressNode);
-			}
-
-			if (workCellNumber)
-			{
-				var workCellNode:XMLNode = new XMLNode(1, 'TEL');
-				workCellNode.appendChild(new XMLNode(1, 'WORK'));
-				workCellNode.appendChild(new XMLNode(1, 'CELL'));
-				var workCellNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workCellNumberNode.appendChild(new XMLNode(3, workCellNumber));
-				workCellNode.appendChild(workCellNumberNode);
-
-				vcardExtNode.appendChild(workCellNode);
-			}
-
-			if (workFaxNumber)
-			{
-				var workFaxNode:XMLNode = new XMLNode(1, 'TEL');
-				workFaxNode.appendChild(new XMLNode(1, 'WORK'));
-				workFaxNode.appendChild(new XMLNode(1, 'FAX'));
-				var workFaxNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workFaxNumberNode.appendChild(new XMLNode(3, workFaxNumber));
-				workFaxNode.appendChild(workFaxNumberNode);
-
-				vcardExtNode.appendChild(workFaxNode);
-			}
-
-			if (workPagerNumber)
-			{
-				var workPagerNode:XMLNode = new XMLNode(1, 'TEL');
-				workPagerNode.appendChild(new XMLNode(1, 'WORK'));
-				workPagerNode.appendChild(new XMLNode(1, 'PAGER'));
-				var workPagerNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workPagerNumberNode.appendChild(new XMLNode(3, workPagerNumber));
-				workPagerNode.appendChild(workPagerNumberNode);
-
-				vcardExtNode.appendChild(workPagerNode);
-			}
-
-			if (workVoiceNumber)
-			{
-				var workVoiceNode:XMLNode = new XMLNode(1, 'TEL');
-				workVoiceNode.appendChild(new XMLNode(1, 'WORK'));
-				workVoiceNode.appendChild(new XMLNode(1, 'VOICE'));
-				var workVoiceNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workVoiceNumberNode.appendChild(new XMLNode(3, workVoiceNumber));
-				workVoiceNode.appendChild(workVoiceNumberNode);
-
-				vcardExtNode.appendChild(workVoiceNode);
-
-			}
-
-			if (homeCellNumber)
-			{
-				var homeCellNode:XMLNode = new XMLNode(1, 'TEL');
-				homeCellNode.appendChild(new XMLNode(1, 'HOME'));
-				homeCellNode.appendChild(new XMLNode(1, 'CELL'));
-				var homeCellNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homeCellNumberNode.appendChild(new XMLNode(3, homeCellNumber));
-				homeCellNode.appendChild(homeCellNumberNode);
-
-				vcardExtNode.appendChild(homeCellNode);
-			}
-
-			if (homeFaxNumber)
-			{
-				var homeFaxNode:XMLNode = new XMLNode(1, 'TEL');
-				homeFaxNode.appendChild(new XMLNode(1, 'HOME'));
-				homeFaxNode.appendChild(new XMLNode(1, 'FAX'));
-				var homeFaxNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homeFaxNumberNode.appendChild(new XMLNode(3, homeFaxNumber));
-				homeFaxNode.appendChild(homeFaxNumberNode);
-
-				vcardExtNode.appendChild(homeFaxNode);
-			}
-
-			if (homePagerNumber)
-			{
-				var homePagerNode:XMLNode = new XMLNode(1, 'TEL');
-				homePagerNode.appendChild(new XMLNode(1, 'HOME'));
-				homePagerNode.appendChild(new XMLNode(1, 'PAGER'));
-				var homePagerNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homePagerNumberNode.appendChild(new XMLNode(3, homePagerNumber));
-				homePagerNode.appendChild(homePagerNumberNode);
-
-				vcardExtNode.appendChild(homePagerNode);
-			}
-
-			if (homeVoiceNumber)
-			{
-				var homeVoiceNode:XMLNode = new XMLNode(1, 'TEL');
-				homeVoiceNode.appendChild(new XMLNode(1, 'HOME'));
-				homeVoiceNode.appendChild(new XMLNode(1, 'VOICE'));
-				var homeVoiceNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homeVoiceNumberNode.appendChild(new XMLNode(3, homeVoiceNumber));
-				homeVoiceNode.appendChild(homeVoiceNumberNode);
-
-				vcardExtNode.appendChild(homeVoiceNode);
-			}
-
-			iq.addExtension(vcardExt);
-			con.send(iq);
+			if ( resultIQ.type == IQ.ERROR_TYPE )
+			{
+				dispatchEvent( new VCardEvent( VCardEvent.ERROR, cache[ resultIQ.to.unescaped.toString()],
+											   true, true ));
+			}
+			else
+			{
+				delete cache[ resultIQ.to.unescaped.toString()]; // Force profile refresh on next view
+			}
 		}
-
-		public function _vCardSent(resultIQ:IQ):void
+
+		/**
+		 *
+		 * @return
+		 */
+		public function get avatar():ByteArray
 		{
-			if (resultIQ.type == IQ.ERROR_TYPE)
-			{
-				dispatchEvent(new VCardEvent(VCardEvent.ERROR, cache[resultIQ.to.unescaped.toString()], true, true));
-			}
-			else
-				delete cache[resultIQ.to.unescaped.toString()];		// Force profile refresh on next view
+			return _imageBytes;
 		}
-
-		public function handleVCard(iq:IQ):void
+
+		/**
+		 *
+		 * @param iq
+		 */
+		public function handleVCard( iq:IQ ):void
 		{
 			var node:XMLNode = iq.getNode();
-			var vCardNode:XMLNode = node.childNodes[0];
-			if (!vCardNode)
+			var vCardNode:XMLNode = node.childNodes[ 0 ];
+			if ( !vCardNode )
 				return;
-
-		    for each(var child:XMLNode in vCardNode.childNodes)
-		    {
-	            switch (child.nodeName)
-	            {
-	            	case "PHOTO":
-						for each(var sChild:XMLNode in child.childNodes)
+
+			for each ( var child:XMLNode in vCardNode.childNodes )
+			{
+				switch ( child.nodeName )
+				{
+					case "PHOTO":
+						for each ( var sChild:XMLNode in child.childNodes )
 						{
-							if(sChild.nodeName != 'BINVAL')
+							if ( sChild.nodeName != 'BINVAL' )
 								continue;
 							try
-		            		{
-		            			//sometimes we get a packet with just <BINVAL/> ... no idea why
-		            			if(sChild.childNodes.length == 0)
-		            				continue;
-		            			var value:String = sChild.childNodes[0].nodeValue;
-		            			if(value.length > 0)
-		            			{
-		                			_loader = new Loader();
+							{
+								//sometimes we get a packet with just <BINVAL/> ... no idea why
+								if ( sChild.childNodes.length == 0 )
+									continue;
+								var value:String = sChild.childNodes[ 0 ].nodeValue;
+								if ( value.length > 0 )
+								{
+									_loader = new Loader();
 									var decoder:Base64Decoder = new Base64Decoder();
-									decoder.decode(value);
+									decoder.decode( value );
 									_imageBytes = decoder.flush();
-									dispatchEvent(new VCardEvent(VCardEvent.AVATAR_LOADED, this, true, false));
+									dispatchEvent( new VCardEvent( VCardEvent.AVATAR_LOADED,
+																   this, true, false ));
 								}
 							}
-							catch(e:Error)
+							catch ( e:Error )
 							{
-								trace("Error loading vcard image: " + e.message);
+								trace( "Error loading vcard image: " + e.message );
 							}
 						}
 						break;
-
-	                case "N":
-		                // Get Family Name.
-		                var xml:XML = new XML(child.toString());
-		                firstName = xml.GIVEN;
-		                middleName = xml.MIDDLE;
-		                lastName = xml.FAMILY;
-		                break;
-
-	                case "FN":
-		                var fullnameNode:XMLNode = child.childNodes[0];
-		                if(fullnameNode)
-		                	fullName = fullnameNode.nodeValue;
-		                break;
-
-	                case "NICKNAME":
-		                var nicknameNode:XMLNode = child.childNodes[0];
-		                if(nicknameNode)
-		                	nickname = nicknameNode.nodeValue;
-		                break;
-
-	                case "EMAIL":
-		                for each(var emailChild:XMLNode in child.childNodes)
-		                {
-		                	if(emailChild.nodeName == 'USERID')
-		                	{
-		                		if(emailChild.firstChild != null)
-		                			email = emailChild.firstChild.nodeValue;
-		                	}
-		                }
-		                break;
+
+					case "N":
+						// Get Family Name.
+						var xml:XML = new XML( child.toString());
+						firstName = xml.GIVEN;
+						middleName = xml.MIDDLE;
+						lastName = xml.FAMILY;
+						break;
+
+					case "FN":
+						var fullnameNode:XMLNode = child.childNodes[ 0 ];
+						if ( fullnameNode )
+							fullName = fullnameNode.nodeValue;
+						break;
+
+					case "NICKNAME":
+						var nicknameNode:XMLNode = child.childNodes[ 0 ];
+						if ( nicknameNode )
+							nickname = nicknameNode.nodeValue;
+						break;
+
+					case "EMAIL":
+						for each ( var emailChild:XMLNode in child.childNodes )
+						{
+							if ( emailChild.nodeName == 'USERID' )
+							{
+								if ( emailChild.firstChild != null )
+									email = emailChild.firstChild.nodeValue;
+							}
+						}
+						break;
 					case "ORG":
-						var orgXML:XML = new XML(child.toString());
+						var orgXML:XML = new XML( child.toString());
 						company = orgXML.ORGNAME;
 						department = orgXML.ORGUNIT;
 						break;
 					case "TITLE":
-						var titleNode:XMLNode = child.childNodes[0];
-		                if(titleNode)
-		                	title = titleNode.nodeValue;
-		                break;
+						var titleNode:XMLNode = child.childNodes[ 0 ];
+						if ( titleNode )
+							title = titleNode.nodeValue;
+						break;
 					case "URL":
-						var urlNode:XMLNode = child.childNodes[0];
-						if(urlNode)
+						var urlNode:XMLNode = child.childNodes[ 0 ];
+						if ( urlNode )
 							url = urlNode.nodeValue;
 						break;
 					case "ADR":
-						var adrXML:XML = new XML(child.toString());
-						if(adrXML.WORK == '')
+						var adrXML:XML = new XML( child.toString());
+						if ( adrXML.WORK == '' )
 						{
 							workPostalCode = adrXML.PCODE;
 							workStateProvince = adrXML.REGION;
@@ -531,7 +457,7 @@
 							workCountry = adrXML.CTRY;
 							workCity = adrXML.LOCALITY;
 						}
-						else if(adrXML.HOME == '')
+						else if ( adrXML.HOME == '' )
 						{
 							homePostalCode = adrXML.PCODE;
 							homeStateProvince = adrXML.REGION;
@@ -541,40 +467,342 @@
 						}
 						break;
 					case "TEL":
-						var telXML:XML = new XML(child.toString());
-						if(telXML.WORK == '')
+						var telXML:XML = new XML( child.toString());
+						if ( telXML.WORK == '' )
 						{
-							if(telXML.VOICE == '')
+							if ( telXML.VOICE == '' )
 								workVoiceNumber = telXML.NUMBER;
-							else if(telXML.FAX == '')
+							else if ( telXML.FAX == '' )
 								workFaxNumber = telXML.NUMBER;
-							else if(telXML.PAGER == '')
+							else if ( telXML.PAGER == '' )
 								workPagerNumber = telXML.NUMBER;
-							else if(telXML.CELL == '')
+							else if ( telXML.CELL == '' )
 								workCellNumber = telXML.NUMBER;
 						}
-						else if(telXML.HOME == '')
+						else if ( telXML.HOME == '' )
 						{
-							if(telXML.VOICE == '')
+							if ( telXML.VOICE == '' )
 								homeVoiceNumber = telXML.NUMBER;
-							else if(telXML.FAX == '')
+							else if ( telXML.FAX == '' )
 								homeFaxNumber = telXML.NUMBER;
-							else if(telXML.PAGER == '')
+							else if ( telXML.PAGER == '' )
 								homePagerNumber = telXML.NUMBER;
-							else if(telXML.CELL == '')
+							else if ( telXML.CELL == '' )
 								homeCellNumber = telXML.NUMBER;
 						}
 						break;
-                }
-	     	}
-
-	     	loaded = true;
-	     	dispatchEvent(new VCardEvent(VCardEvent.LOADED, this, true, false));
+				}
+			}
+
+			loaded = true;
+			dispatchEvent( new VCardEvent( VCardEvent.LOADED, this, true, false ));
 		}
-
-		public function get avatar():ByteArray
+
+		/**
+		 *
+		 * @param con
+		 * @param user
+		 */
+		public function saveVCard( con:XMPPConnection, user:RosterItemVO ):void
 		{
-			return _imageBytes;
+			var iq:IQ = new IQ( null, IQ.SET_TYPE, XMPPStanza.generateID( "save_vcard_" ),
+								null, this, _vCardSent );
+			var vcardExt:VCardExtension = new VCardExtension();
+			var vcardExtNode:XMLNode = vcardExt.getNode();
+
+			if ( firstName || middleName || lastName )
+			{
+				var nameNode:XMLNode = new XMLNode( 1, 'N' );
+
+				if ( firstName )
+				{
+					var firstNameNode:XMLNode = new XMLNode( 1, 'GIVEN' );
+					firstNameNode.appendChild( new XMLNode( 3, firstName ));
+
+					nameNode.appendChild( firstNameNode );
+				}
+
+				if ( middleName )
+				{
+					var middleNameNode:XMLNode = new XMLNode( 1, 'MIDDLE' );
+					middleNameNode.appendChild( new XMLNode( 3, middleName ));
+
+					nameNode.appendChild( middleNameNode );
+				}
+
+				if ( lastName )
+				{
+					var lastNameNode:XMLNode = new XMLNode( 1, 'FAMILY' );
+					lastNameNode.appendChild( new XMLNode( 3, lastName ));
+
+					nameNode.appendChild( lastNameNode );
+				}
+
+				vcardExtNode.appendChild( nameNode );
+			}
+
+			if ( fullName )
+			{
+				var fullnameNode:XMLNode = new XMLNode( 1, 'FN' );
+				fullnameNode.appendChild( new XMLNode( 3, fullName ));
+
+				vcardExtNode.appendChild( fullnameNode );
+			}
+
+			if ( nickname )
+			{
+				var nicknameNode:XMLNode = new XMLNode( 1, 'NICKNAME' );
+				nicknameNode.appendChild( new XMLNode( 3, nickname ));
+
+				vcardExtNode.appendChild( nicknameNode );
+			}
+
+			if ( email )
+			{
+				var emailNode:XMLNode = new XMLNode( 1, 'EMAIL' );
+				emailNode.appendChild( new XMLNode( 3, 'INTERNET' ));
+				emailNode.appendChild( new XMLNode( 3, 'PREF' ));
+				var userIdNode:XMLNode = new XMLNode( 1, 'USERID' );
+				userIdNode.appendChild( new XMLNode( 3, email ));
+				emailNode.appendChild( userIdNode );
+
+				vcardExtNode.appendChild( emailNode );
+			}
+
+			if ( company || department )
+			{
+				var organizationNode:XMLNode = new XMLNode( 1, 'ORG' );
+
+				if ( company )
+				{
+					var companyNode:XMLNode = new XMLNode( 1, 'ORGNAME' );
+					companyNode.appendChild( new XMLNode( 3, company ));
+
+					organizationNode.appendChild( companyNode );
+				}
+
+				if ( department )
+				{
+					var departmentNode:XMLNode = new XMLNode( 1, 'ORGUNIT' );
+					departmentNode.appendChild( new XMLNode( 3, department ));
+
+					organizationNode.appendChild( departmentNode );
+				}
+
+				vcardExtNode.appendChild( organizationNode );
+			}
+
+			if ( title )
+			{
+				var titleNode:XMLNode = new XMLNode( 1, 'TITLE' );
+				titleNode.appendChild( new XMLNode( 3, title ));
+
+				vcardExtNode.appendChild( titleNode );
+			}
+
+			if ( url )
+			{
+				var urlNode:XMLNode = new XMLNode( 1, 'URL' );
+				urlNode.appendChild( new XMLNode( 3, url ));
+
+				vcardExtNode.appendChild( urlNode );
+			}
+
+			if ( workAddress || workCity || workCountry || workPostalCode || workStateProvince )
+			{
+				var workAddressNode:XMLNode = new XMLNode( 1, 'ADR' );
+				workAddressNode.appendChild( new XMLNode( 1, 'WORK' ));
+
+				if ( workAddress )
+				{
+					var workStreetNode:XMLNode = new XMLNode( 1, 'STREET' );
+					workStreetNode.appendChild( new XMLNode( 3, workAddress ));
+
+					workAddressNode.appendChild( workStreetNode );
+				}
+
+				if ( workCity )
+				{
+					var workCityNode:XMLNode = new XMLNode( 1, 'LOCALITY' );
+					workCityNode.appendChild( new XMLNode( 3, workCity ));
+
+					workAddressNode.appendChild( workCityNode );
+				}
+
+				if ( workCountry )
+				{
+					var workCountryNode:XMLNode = new XMLNode( 1, 'CTRY' );
+					workCountryNode.appendChild( new XMLNode( 3, workCountry ));
+
+					workAddressNode.appendChild( workCountryNode );
+				}
+
+				if ( workPostalCode )
+				{
+					var workPostalCodeNode:XMLNode = new XMLNode( 1, 'PCODE' );
+					workPostalCodeNode.appendChild( new XMLNode( 3, workPostalCode ));
+
+					workAddressNode.appendChild( workPostalCodeNode );
+				}
+
+				if ( workStateProvince )
+				{
+					var workStateProvinceNode:XMLNode = new XMLNode( 1, 'REGION' );
+					workStateProvinceNode.appendChild( new XMLNode( 3, workStateProvince ));
+
+					workAddressNode.appendChild( workStateProvinceNode );
+				}
+
+				vcardExtNode.appendChild( workAddressNode );
+			}
+
+			if ( homeAddress || homeCity || homeCountry || homePostalCode || homeStateProvince )
+			{
+				var homeAddressNode:XMLNode = new XMLNode( 1, 'ADR' );
+				homeAddressNode.appendChild( new XMLNode( 1, 'HOME' ));
+
+				if ( homeAddress )
+				{
+					var homeStreetNode:XMLNode = new XMLNode( 1, 'STREET' );
+					homeStreetNode.appendChild( new XMLNode( 3, homeAddress ));
+
+					homeAddressNode.appendChild( homeStreetNode );
+				}
+
+				if ( homeCity )
+				{
+					var homeCityNode:XMLNode = new XMLNode( 1, 'LOCALITY' );
+					homeCityNode.appendChild( new XMLNode( 3, homeCity ));
+
+					homeAddressNode.appendChild( homeCityNode );
+				}
+
+				if ( homeCountry )
+				{
+					var homeCountryNode:XMLNode = new XMLNode( 1, 'CTRY' );
+					homeCountryNode.appendChild( new XMLNode( 3, homeCountry ));
+
+					homeAddressNode.appendChild( homeCountryNode );
+				}
+
+				if ( homePostalCode )
+				{
+					var homePostalCodeNode:XMLNode = new XMLNode( 1, 'PCODE' );
+					homePostalCodeNode.appendChild( new XMLNode( 3, homePostalCode ));
+
+					homeAddressNode.appendChild( homePostalCodeNode );
+				}
+
+				if ( homeStateProvince )
+				{
+					var homeStateProvinceNode:XMLNode = new XMLNode( 1, 'REGION' );
+					homeStateProvinceNode.appendChild( new XMLNode( 3, homeStateProvince ));
+
+					homeAddressNode.appendChild( homeStateProvinceNode );
+				}
+
+				vcardExtNode.appendChild( homeAddressNode );
+			}
+
+			if ( workCellNumber )
+			{
+				var workCellNode:XMLNode = new XMLNode( 1, 'TEL' );
+				workCellNode.appendChild( new XMLNode( 1, 'WORK' ));
+				workCellNode.appendChild( new XMLNode( 1, 'CELL' ));
+				var workCellNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				workCellNumberNode.appendChild( new XMLNode( 3, workCellNumber ));
+				workCellNode.appendChild( workCellNumberNode );
+
+				vcardExtNode.appendChild( workCellNode );
+			}
+
+			if ( workFaxNumber )
+			{
+				var workFaxNode:XMLNode = new XMLNode( 1, 'TEL' );
+				workFaxNode.appendChild( new XMLNode( 1, 'WORK' ));
+				workFaxNode.appendChild( new XMLNode( 1, 'FAX' ));
+				var workFaxNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				workFaxNumberNode.appendChild( new XMLNode( 3, workFaxNumber ));
+				workFaxNode.appendChild( workFaxNumberNode );
+
+				vcardExtNode.appendChild( workFaxNode );
+			}
+
+			if ( workPagerNumber )
+			{
+				var workPagerNode:XMLNode = new XMLNode( 1, 'TEL' );
+				workPagerNode.appendChild( new XMLNode( 1, 'WORK' ));
+				workPagerNode.appendChild( new XMLNode( 1, 'PAGER' ));
+				var workPagerNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				workPagerNumberNode.appendChild( new XMLNode( 3, workPagerNumber ));
+				workPagerNode.appendChild( workPagerNumberNode );
+
+				vcardExtNode.appendChild( workPagerNode );
+			}
+
+			if ( workVoiceNumber )
+			{
+				var workVoiceNode:XMLNode = new XMLNode( 1, 'TEL' );
+				workVoiceNode.appendChild( new XMLNode( 1, 'WORK' ));
+				workVoiceNode.appendChild( new XMLNode( 1, 'VOICE' ));
+				var workVoiceNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				workVoiceNumberNode.appendChild( new XMLNode( 3, workVoiceNumber ));
+				workVoiceNode.appendChild( workVoiceNumberNode );
+
+				vcardExtNode.appendChild( workVoiceNode );
+
+			}
+
+			if ( homeCellNumber )
+			{
+				var homeCellNode:XMLNode = new XMLNode( 1, 'TEL' );
+				homeCellNode.appendChild( new XMLNode( 1, 'HOME' ));
+				homeCellNode.appendChild( new XMLNode( 1, 'CELL' ));
+				var homeCellNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				homeCellNumberNode.appendChild( new XMLNode( 3, homeCellNumber ));
+				homeCellNode.appendChild( homeCellNumberNode );
+
+				vcardExtNode.appendChild( homeCellNode );
+			}
+
+			if ( homeFaxNumber )
+			{
+				var homeFaxNode:XMLNode = new XMLNode( 1, 'TEL' );
+				homeFaxNode.appendChild( new XMLNode( 1, 'HOME' ));
+				homeFaxNode.appendChild( new XMLNode( 1, 'FAX' ));
+				var homeFaxNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				homeFaxNumberNode.appendChild( new XMLNode( 3, homeFaxNumber ));
+				homeFaxNode.appendChild( homeFaxNumberNode );
+
+				vcardExtNode.appendChild( homeFaxNode );
+			}
+
+			if ( homePagerNumber )
+			{
+				var homePagerNode:XMLNode = new XMLNode( 1, 'TEL' );
+				homePagerNode.appendChild( new XMLNode( 1, 'HOME' ));
+				homePagerNode.appendChild( new XMLNode( 1, 'PAGER' ));
+				var homePagerNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				homePagerNumberNode.appendChild( new XMLNode( 3, homePagerNumber ));
+				homePagerNode.appendChild( homePagerNumberNode );
+
+				vcardExtNode.appendChild( homePagerNode );
+			}
+
+			if ( homeVoiceNumber )
+			{
+				var homeVoiceNode:XMLNode = new XMLNode( 1, 'TEL' );
+				homeVoiceNode.appendChild( new XMLNode( 1, 'HOME' ));
+				homeVoiceNode.appendChild( new XMLNode( 1, 'VOICE' ));
+				var homeVoiceNumberNode:XMLNode = new XMLNode( 1, 'NUMBER' );
+				homeVoiceNumberNode.appendChild( new XMLNode( 3, homeVoiceNumber ));
+				homeVoiceNode.appendChild( homeVoiceNumberNode );
+
+				vcardExtNode.appendChild( homeVoiceNode );
+			}
+
+			iq.addExtension( vcardExt );
+			con.send( iq );
 		}
 	}
-}+}


Whoops, patch got confused here. Fix the build

--- src/org/jivesoftware/xiff/auth/External.as
+++ src/org/jivesoftware/xiff/auth/External.as
@@ -41,89 +41,3 @@
     	}
 	}
 }
-package org.jivesoftware.xiff.auth
-{
-	import flash.xml.XMLNode;
-
-	import mx.utils.Base64Encoder;
-
-	import org.jivesoftware.xiff.core.JID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-
-	public class External extends SASLAuth
-	{
-		public function External(connection:XMPPConnection):void
-		{
-			var jid:JID = connection.jid;
-			var authContent:String = jid.node;
-
-			var b64coder:Base64Encoder = new Base64Encoder();
-			b64coder.insertNewLines = false;
-			b64coder.encode(authContent);
-			authContent = b64coder.flush();
-
-		    var attrs:Object = {
-		        mechanism: "EXTERNAL",
-		        xmlns: "urn:ietf:params:xml:ns:xmpp-sasl"
-		    };
-
-		    req = new XMLNode(1, "auth");
-		    req.appendChild(new XMLNode(3, authContent));
-		    req.attributes = attrs;
-
-		    stage = 0;
-		}
-
-		public override function handleResponse(stage:int, response:XMLNode):Object {
-        	var success:Boolean = response.nodeName == "success";
-       		return {
-        		authComplete: true,
-            	authSuccess: success,
-           		authStage: stage++
-        	};
-    	}
-	}
-}
-package org.jivesoftware.xiff.auth
-{
-	import flash.xml.XMLNode;
-
-	import mx.utils.Base64Encoder;
-
-	import org.jivesoftware.xiff.core.JID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-
-	public class External extends SASLAuth
-	{
-		public function External(connection:XMPPConnection):void
-		{
-			var jid:JID = connection.jid;
-			var authContent:String = jid.node;
-
-			var b64coder:Base64Encoder = new Base64Encoder();
-			b64coder.insertNewLines = false;
-			b64coder.encode(authContent);
-			authContent = b64coder.flush();
-
-		    var attrs:Object = {
-		        mechanism: "EXTERNAL",
-		        xmlns: "urn:ietf:params:xml:ns:xmpp-sasl"
-		    };
-
-		    req = new XMLNode(1, "auth");
-		    req.appendChild(new XMLNode(3, authContent));
-		    req.attributes = attrs;
-
-		    stage = 0;
-		}
-
-		public override function handleResponse(stage:int, response:XMLNode):Object {
-        	var success:Boolean = response.nodeName == "success";
-       		return {
-        		authComplete: true,
-            	authSuccess: success,
-           		authStage: stage++
-        	};
-    	}
-	}
-}


- change: renamed Vector to Vector2D, making reprise FP10-compatible (And now, I've even updated all depencies on Vector to Vector2D. Sigh.)

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

--- src/reprise/css/propertyparsers/Filters.as
+++ src/reprise/css/propertyparsers/Filters.as
@@ -19,7 +19,7 @@
 	import reprise.css.CSSPropertyParser;
 	import reprise.css.transitions.ColorTransitionVO;
 	import reprise.data.AdvancedColor;
-	import reprise.geom.Vector;
+	import reprise.geom.Vector2D;

 	import flash.filters.DropShadowFilter;

@@ -134,7 +134,7 @@
 			styleObj:Object, name:String) : DropShadowFilter
 		{
 			var color : AdvancedColor = styleObj[name + 'ShadowColor'];
-			var offset : Vector = new Vector(styleObj[name + 'ShadowXOffset'],
+			var offset : Vector2D = new Vector2D(styleObj[name + 'ShadowXOffset'],
 				styleObj[name + 'ShadowYOffset']);
 			var blurX : Number = styleObj[name + 'ShadowXBlur'];
 			var blurY : Number = styleObj[name + 'ShadowYBlur'];


Fixed bug with pentool where it wasn't completing the drawing of all
shapes.

Tested with kyle.xml by manually creating a polygon in the session
state such that lastPoint != firstPoint and then started drawing more
polygons.

Change-Id: I54aaf77983ab5e31ed3766af1135cfc53c1a2ab3

--- WeaveUI/src/weave/ui/PenTool.as
+++ WeaveUI/src/weave/ui/PenTool.as
@@ -487,11 +487,13 @@
 							g.lineTo(_tempPoint.x, _tempPoint.y);
 					}

-					// If we are not drawing, always connect back to first point in the shape.
+					// If we are not drawing (or this is not the last shape), always connect back to first point in the shape.
 					// The effect of this is either completing the polygon by drawing a line or
 					// drawing to the current position of the graphics object. This is only used to
 					// draw complete polygons without affecting the polygon's internal representation.
-					if (points && points.length >= 2 && !_drawing && drawingMode.value == POLYGON_DRAW_MODE)
+					if (points.length >= 2 &&			// at least 2 points
+						(!_drawing || line < (_coordsArrays.length - 1)) && 	// not drawing or not on the last line
+						drawingMode.value == POLYGON_DRAW_MODE)	// and drawing polygons
 					{
 						projectCoordToScreenBounds(points[0], points[1], _tempPoint);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/charts/src/mx/charts/events/ChartEvent.as
+++ frameworks/projects/charts/src/mx/charts/events/ChartEvent.as
@@ -0,0 +1,146 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events
+{
+
+import flash.display.InteractiveObject;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+
+import mx.charts.HitData;
+import mx.charts.chartClasses.ChartBase;
+
+/**
+ * The ChartEvent class represents events that are specific
+ * to the chart control, such as when a chart is clicked. This event
+ * is only triggered if there are no ChartItem objects underneath the mouse.
+ *
+ * @see mx.charts.events.ChartItemEvent
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class ChartEvent extends MouseEvent
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Indicates that the user clicked the mouse button
+     *  over a chart control but not on a chart item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static const CHART_CLICK:String = "chartClick";
+
+    /**
+     *  Indicates that the user double-clicked
+     *  the mouse button over a chart control but not on a chart item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static const CHART_DOUBLE_CLICK:String = "chartDoubleClick";
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param type The type of the event.
+     *
+     *  @param triggerEvent The MouseEvent that triggered this ChartEvent.
+     *
+     *  @param target The chart on which the event was triggered.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function ChartEvent(type:String, triggerEvent:MouseEvent=null, target:ChartBase=null)
+    {
+        var relPt:Point;
+        if (triggerEvent && triggerEvent.target)
+        {
+            relPt = target.globalToLocal(triggerEvent.target.localToGlobal(
+                new Point(triggerEvent.localX, triggerEvent.localY)));
+        }
+        else
+        {
+            if (target)
+                relPt = new Point(target.mouseX,target.mouseY);
+            else
+                relPt = new Point(0,0);
+        }
+
+        var bubbles:Boolean = true;
+        var cancelable:Boolean = false;
+        var relatedObject:InteractiveObject = null;
+        var ctrlKey:Boolean = false;
+        var shiftKey:Boolean = false;
+        var altKey:Boolean = false;
+        var buttonDown:Boolean = false;
+        var delta:int = 0;
+
+        if (triggerEvent)
+        {
+            bubbles = triggerEvent.bubbles;
+            cancelable = triggerEvent.cancelable;
+            relatedObject = triggerEvent.relatedObject;
+            ctrlKey = triggerEvent.ctrlKey;
+            altKey = triggerEvent.altKey;
+            shiftKey = triggerEvent.shiftKey;
+            buttonDown = triggerEvent.buttonDown;
+            delta = triggerEvent.delta;
+        }
+
+
+        super(type, bubbles, cancelable,
+              relPt.x, relPt.y, relatedObject,
+              ctrlKey, altKey, shiftKey, buttonDown, delta);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function clone():Event
+    {
+        return new ChartEvent(type, this,ChartBase(this.target));
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 13009
Author:   jimurphy@adobe.com
Date:     2009-12-16T22:08:32.299812Z

Log Message:
-----------
merge 3.x revs 12937-12938,12961 -> trunk

checkintests:pass

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>

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

--- frameworks/projects/framework/src/mx/accessibility/AccImpl.as
+++ frameworks/projects/framework/src/mx/accessibility/AccImpl.as
@@ -54,6 +54,29 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  Method for supporting state Accessibility.
+     *  Returns true if an ancestor of the component has enabled set to false.
+     */
+    public static function isAncestorDisabled(component:UIComponent):Boolean
+    {
+        // keeping this DisplayObjectContainer since parent returns
+        // that as root is not a UIComponent.
+        var par:DisplayObjectContainer = component.parent;
+        // continue looking up the parent chain
+        // until root (or application) or FormItem is found.
+        while (par && (par is UIComponent && UIComponent(par).enabled) &&
+               !(par is SystemManager) && par != component.root)
+        {
+            par = par.parent;
+        }
+
+        if (!(par is UIComponent))
+            return false;
+
+        return !UIComponent(par).enabled;
+    }
+
     /**
      *  Method for supporting Form Accessibility.
      *
@@ -370,7 +393,7 @@
     {
         var accState:uint = AccConst.STATE_SYSTEM_NORMAL;

-        if (!UIComponent(master).enabled)
+        if (!UIComponent(master).enabled || isAncestorDisabled(master))
         {
             accState &= ~AccConst.STATE_SYSTEM_FOCUSABLE;
             accState |= AccConst.STATE_SYSTEM_UNAVAILABLE;