Transferred from the Adobe Open Source Subversion Repository

Revision: 9433
Author:   clucier@adobe.com
Date:     2009-08-20T23:54:36.373816Z

Log Message:
-----------
Code complete for runtime design layers.  Incorporated PARB renames and refactoring.  Finished off all compiler optimizations that were spec'd.  Some minor bug fixes.

QE notes: Candidate checkin for code complete. You are welcome to write test plan against the current API.
Doc notes:  DesignLayer docs should be scrubbed.
Bugs:  N/A
Reviewer: Peter (compiler), Chet (renames), Paul (will review MXMLDocument post PTO).
Tests run: Checkin, added new basic test.
Is noteworthy for integration: Yes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DesignLayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/DesignLayerTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/views/DesignLayerTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</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/tests/basicTests/BasicTests-config.xml</path>

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

--- frameworks/projects/framework/src/mx/core/DesignLayer.as
+++ frameworks/projects/framework/src/mx/core/DesignLayer.as
@@ -12,13 +12,12 @@
 package mx.core
 {
     import flash.events.EventDispatcher;
-
     import mx.events.PropertyChangeEvent;
     import mx.events.PropertyChangeEventKind;

     /**
-     *  Dispatched by the layer when either computedVisibility or
-     *  computedAlpha changes.
+     *  Dispatched by the layer when either effectiveVisibility or
+     *  effectiveAlpha changes.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -28,11 +27,11 @@
     [Event(name="layerPropertyChange", type="mx.events.PropertyChangeEvent")]

     /**
-     *  The DesignLayer class represents a "visibility group" that can be associated
+     *  The DesignLayer class represents a visibility group that can be associated
      *  with one or more IVisualElement instances at runtime.
      *
-     *  DesignLayer instances support a visible and alpha property that when set will
-     *  propagate to the assocaited layer children.
+     *  DesignLayer instances support a visible and alpha property
+     *  that when set will propagate to the associated layer children.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -63,21 +62,45 @@
         //----------------------------------
         //  id
         //----------------------------------
-
-        /**
-         *  ID of the layer component. This value becomes the instance name of the layer
-         *  and as such, should not contain any white space or special characters.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public var id:String;
+
+        /**
+         *  @private
+         *  Storage for id property.
+         */
+        private var _id:String;
+
+        /**
+         *  ID of the layer component. This value becomes the instance name of the
+         *  layer and as such, should not contain any white space or special
+         *  characters.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function get id():String
+        {
+            return _id;
+        }
+
+        /**
+         *  @private
+         */
+        public function set id(value:String):void
+        {
+            _id = value;
+        }

         //----------------------------------
         //  parent
         //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for parent property.
+         */
+        private var _parent:DesignLayer;

         /**
          *  @private
@@ -90,7 +113,20 @@
          *  @playerversion AIR 1.5
          *  @productversion Flex 4
          */
-        protected var parent:DesignLayer;
+        protected function get parent():DesignLayer
+        {
+            return _parent;
+        }
+
+        /**
+         *  @private
+         */
+        protected function set parent(value:DesignLayer):void
+        {
+            _parent = value;
+            effectiveVisibilityChanged(_visible);
+            effectiveAlphaChanged(_alpha);
+        }

         //----------------------------------
         //  layerChildren
@@ -113,10 +149,9 @@
         /**
          *  The visibility for this design layer instance.
          *
-         *  When updated, the appropriate change event for
-         *  computedVisibility will be dispatched to all layerPropertyChange
-         *  listeners for this layer, as well as those of affected
-         *  descendant layers if any.
+         *
When updated, the appropriate change event for effectiveVisibility
+         *  will be dispatched to all layerPropertyChange listeners for
+         *  this layer, as well as those of affected descendant layers if any.

          *
          *  @default true
          *
@@ -138,18 +173,17 @@
             if (_visible != value)
             {
                 _visible = value;
-                computedVisibilityChanged(computedVisibility);
-            }
-        }
-
-        //----------------------------------
-        //  computedVisibility
-        //----------------------------------
-
-        /**
-         *  Returns the effective visibility of this design layer
-         *  (which considers the visibility of this layer as well as
-         *  any ancestor layers).
+                effectiveVisibilityChanged(effectiveVisibility);
+            }
+        }
+
+        //----------------------------------
+        //  effectiveVisibility
+        //----------------------------------
+
+        /**
+         *  Returns the effective visibility of this design layer (which considers
+         *  the visibility of this layer as well as any ancestor layers).
          *
          *  @default true
          *
@@ -158,7 +192,7 @@
          *  @playerversion AIR 1.5
          *  @productversion Flex 4
          */
-        public function get computedVisibility():Boolean
+        public function get effectiveVisibility():Boolean
         {
             var isVisible:Boolean = _visible;
             var currentLayer:DesignLayer = this;
@@ -172,15 +206,14 @@

         /**
          * @private
-         * Used to notify the visual elements associated with this layer
-         * that the computed visiblity has changed.  Dispatches a
-         * "layerPropertyChange" event with property field set to
-         * "computedVisibility".
+         * Used to notify the visual elements associated with this layer that the
+         * effective visiblity has changed.  Dispatches a layerPropertyChange
+         * event with property field set to "effectiveVisibility".
          */
-        protected function computedVisibilityChanged(value:Boolean):void
+        protected function effectiveVisibilityChanged(value:Boolean):void
         {
             dispatchEvent(new PropertyChangeEvent("layerPropertyChange", false,
-                false, PropertyChangeEventKind.UPDATE, "computedVisibility", !value, value));
+                false, PropertyChangeEventKind.UPDATE, "effectiveVisibility", !value, value));

             for (var i:int = 0; i < layerChildren.length; i++)
             {
@@ -190,7 +223,7 @@
                 // those that aren't don't really care about their layer parents
                 // visibility.
                 if (layerChild.visible)
-                    layerChild.computedVisibilityChanged(value);
+                    layerChild.effectiveVisibilityChanged(value);
             }
         }

@@ -206,10 +239,9 @@
         /**
          *  The alpha for this design layer instance.
          *
-         *  When updated, the appropriate change event for
-         *  computedAlpha will be dispatched to all layerPropertyChange
-         *  listeners for this layer, as well as those of affected
-         *  descendant layers if any.
+         *
When updated, the appropriate change event for effectiveAlpha
+         *  will be dispatched to all layerPropertyChange listeners
+         *  for this layer, as well as those of affected descendant layers if any.

          *
          *  @default 1.0
          *
@@ -232,17 +264,17 @@
             {
                 var oldAlpha:Number = _alpha;
                 _alpha = value;
-                computedAlphaChanged(oldAlpha);
-            }
-        }
-
-        //----------------------------------
-        //  computedAlpha
+                effectiveAlphaChanged(oldAlpha);
+            }
+        }
+
+        //----------------------------------
+        //  effectiveAlpha
         //----------------------------------

         /**
          *  Property that returns the effective alpha of this design layer
-         *  (which considers the alpha of this multiplied with the alpha of
+         *  (which considers the alpha of this layer multiplied with the alpha of
          *  any ancestor layers).
          *
          *  @default 1.0
@@ -252,7 +284,7 @@
          *  @playerversion AIR 1.5
          *  @productversion Flex 4
          */
-        public function get computedAlpha():Number
+        public function get effectiveAlpha():Number
         {
             var currentAlpha:Number = _alpha;
             var currentLayer:DesignLayer = this;
@@ -266,19 +298,19 @@

         /**
          * @private
-         * Used to notify the visual elements associated with this layer
-         * that the computed alpha has changed.  Dispatches a "layerPropertyChange"
-         * event with the property field set to "computedAlpha".
+         * Used to notify the visual elements associated with this layer that the
+         * effective alpha has changed.  Dispatches a layerPropertyChange
+         * event with the property field set to "effectiveAlpha".
          */
-        protected function computedAlphaChanged(oldAlpha:Number):void
+        protected function effectiveAlphaChanged(oldAlpha:Number):void
         {
             dispatchEvent(new PropertyChangeEvent("layerPropertyChange", false,
-                false, PropertyChangeEventKind.UPDATE, "computedAlpha", oldAlpha, computedAlpha));
+                false, PropertyChangeEventKind.UPDATE, "effectiveAlpha", oldAlpha, effectiveAlpha));

             for (var i:int = 0; i < layerChildren.length; i++)
             {
                 var layerChild:DesignLayer = layerChildren[i];
-                layerChild.computedAlphaChanged(layerChild.alpha);
+                layerChild.effectiveAlphaChanged(layerChild.alpha);
             }
         }

@@ -287,7 +319,7 @@
         //----------------------------------

         /**
-         *  The number of DesignLayer children immediately parented by this layer.
+         *  The number of DesignLayer children directly parented by this layer.
          *
          *  @default 0
          *
@@ -326,11 +358,15 @@
         /**
          *  Returns the DesignLayer child at the specified index.
          *
+         *
Note that the order of DesignLayer children is insignificant.
+         *  The getLayerAt method is meant to be used in
+         *  conjunction with numLayers to iterate over the child list.

+         *
          *  @param index The 0-based index of a DesignLayer child.
          *
          *  @return The specified DesignLayer child if index is between
-         *  0 and numLayers - 1.  Returns
-         *  null if the index is invalid.
+         *  0 and numLayers - 1.  Returns null
+         *  if the index is invalid.
          *
          *  @see numLayers
          *
@@ -368,4 +404,4 @@
         }

     }
-}+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4659
Author:   gosmith@adobe.com
Date:     2009-01-24T23:53:51.983130Z

Log Message:
-----------
Added version check to createInFontContext() to ignore the 'textFieldClass' style before Flex 4.

QE Notes: None
Doc Notes: None
Bugs: SDK-18871
Reviewer: None

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -9551,7 +9551,8 @@
     {
         hasFontContextBeenSaved = true;

-        classObj = getStyle("textFieldClass");
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
+        	classObj = getStyle("textFieldClass");

         var fontName:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
         var fontWeight:String = getStyle("fontWeight");


Transferred from the Adobe Open Source Subversion Repository

Revision: 12782
Author:   smgilson@adobe.com
Date:     2009-12-10T13:53:51.776723Z

Log Message:
-----------
ASDoc updates from doc review of VideoPlayer/VideoDisplay

Update accessibility props of UIComponent.as

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -1682,17 +1682,18 @@
     //------------------------------------------------------------------------

     /**
-     *  A convenience accessor for the 'silent' property
-     *  in this UIComponent's accessibilityProperties object.
-     *
-     *  Note that accessibilityEnabled has the opposite sense from silent;
-     *  accessibilityEnabled is true when silent is false and vice versa.
-     *
-     *  The getter simply returns accessibilityProperties.silent,
-     *  or true if accessibilityProperties is null.
-     *  The setter first checks whether accessibilityProperties is null, and if it is,
-     *  sets it to a new AccessibilityProperties instance;
-     *  then it sets accessibilityProperties.silent.
+     *  A convenience accessor for the silent property
+     *  in this UIComponent's accessibilityProperties object.
+     *
+     *
Note that accessibilityEnabled has the opposite sense from silent;
+     *  accessibilityEnabled is true
+     *  when silent is false.

+     *
+     *
The getter simply returns accessibilityProperties.silent,
+     *  or true if accessibilityProperties is null.
+     *  The setter first checks whether accessibilityProperties is null,
+     *  and if it is, sets it to a new AccessibilityProperties instance.
+     *  Then it sets accessibilityProperties.silent.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -1717,14 +1718,14 @@
     }

     /**
-     *  A convenience accessor for the 'name' property
-     *  in this UIComponent's accessibilityProperties object.
-     *
-     *  The getter simply returns accessibilityProperties.name,
+     *  A convenience accessor for the name property
+     *  in this UIComponent's accessibilityProperties object.
+     *
+     *
The getter simply returns accessibilityProperties.name,
      *  or "" if accessibilityProperties is null.
-     *  The setter first checks whether accessibilityProperties is null, and if it is,
-     *  sets it to a new AccessibilityProperties instance;
-     *  then it sets accessibilityProperties.name.
+     *  The setter first checks whether accessibilityProperties is null,
+     *  and if it is, sets it to a new AccessibilityProperties instance.
+     *  Then it sets accessibilityProperties.name.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -1749,14 +1750,14 @@
     }

     /**
-     *  A convenience accessor for the 'description' property
-     *  in this UIComponent's accessibilityProperties object.
-     *
-     *  The getter simply returns accessibilityProperties.description,
-     *  or "" if accessibilityProperties is null.
-     *  The setter first checks whether accessibilityProperties is null, and if it is,
-     *  sets it to a new AccessibilityProperties instance;
-     *  then it sets accessibilityProperties.description.
+     *  A convenience accessor for the description property
+     *  in this UIComponent's accessibilityProperties object.
+     *
+     *
The getter simply returns accessibilityProperties.description,
+     *  or "" if accessibilityProperties is null.
+     *  The setter first checks whether accessibilityProperties is null,
+     *  and if it is, sets it to a new AccessibilityProperties instance.
+     *  Then it sets accessibilityProperties.description.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -1781,14 +1782,14 @@
     }

     /**
-     *  A convenience accessor for the 'shortcut' property
-     *  in this UIComponent's accessibilityProperties object.
-     *
-     *  The getter simply returns accessibilityProperties.shortcut,
-     *  or "" if accessibilityProperties is null.
-     *  The setter first checks whether accessibilityProperties is null, and if it is,
-     *  sets it to a new AccessibilityProperties instance;
-     *  then it sets accessibilityProperties.shortcut.
+     *  A convenience accessor for the shortcut property
+     *  in this UIComponent's accessibilityProperties object.
+     *
+     *
The getter simply returns accessibilityProperties.shortcut,
+     *  or "" if accessibilityProperties is null.
+     *  The setter first checks whether accessibilityProperties is null,
+     *  and if it is, sets it to a new AccessibilityProperties instance.
+     *  Then it sets accessibilityProperties.shortcut.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 14999
Author:   klin@adobe.com
Date:     2010-03-24T20:33:13.171795Z

Log Message:
-----------
Merge revision 14996 from 4.x to trunk.

Update for implementing ILayoutDirectionElement in BitmapAsset and SpriteAsset. Instead of trying to handle transforming the assets directly, we leverage AdvancedLayoutFeatures to update the transform matrix of the assets. The main difference between the asset implementations and other ones is that width/height and scaleX/Y are tied to each other. The setters of each of those properties will set the backing value of their respective property. Another change is that we use the existence of layoutFeatures to keep track of whether the asset needs to de-mirror instead of using the mirror variable.

Also, I removed a FIXME from AdvancedLayoutFeatures. We already short-circuit this in the classes that own the AdvancedLayoutFeatures. I changed the FIXMEs for the x getters to TODOs.

QE notes: No
Doc notes: No
Bugs: SDK-25879, SDK-25894
Reviewer: Hans, Carol, Evtim
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SpriteAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/BitmapAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/core/UITextField.as
+++ frameworks/projects/framework/src/mx/core/UITextField.as
@@ -407,7 +407,7 @@
      */
     override public function get x():Number
     {
-        // FIXME(hmuller): by default get x returns transform.matrix.tx rounded to the nearest 20th.
+        // TODO(hmuller): by default get x returns transform.matrix.tx rounded to the nearest 20th.
         // should do the same here, if we're returning _x.
         return (mirror) ? _x : super.x;
     }


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

--- frameworks/projects/rpc/src/mx/rpc/soap/SOAPConstants.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/SOAPConstants.as
@@ -0,0 +1,328 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.rpc.soap
+{
+
+import flash.utils.getDefinitionByName;
+import flash.utils.getQualifiedClassName;
+
+import mx.rpc.soap.types.ICustomSOAPType;
+import mx.rpc.soap.types.MapType;
+import mx.rpc.soap.types.QueryBeanType;
+import mx.rpc.soap.types.RowSetType;
+import mx.rpc.soap.types.SOAPArrayType;
+import mx.rpc.soap.types.ApacheDocumentType;
+import mx.rpc.soap.types.DataSetType;
+import mx.utils.StringUtil;
+import mx.utils.URLUtil;
+
+[ExcludeClass]
+
+/**
+ * A helper class listing all of the constants required to encode and decode
+ * SOAP messages.
+ *
+ * @private
+ */
+public class SOAPConstants
+{
+    public function SOAPConstants(envelopeNS:Namespace = null, encodingNS:Namespace = null)
+    {
+        super();
+
+        // Default to SOAP 1.1
+        if (envelopeNS == null)
+            envelopeNS = new Namespace(SOAP_ENV_PREFIX, SOAP_ENVELOPE_URI);
+
+        if (encodingNS == null)
+            encodingNS = new Namespace(SOAP_ENC_PREFIX, SOAP_ENCODING_URI);
+
+        _envelopeNS = envelopeNS;
+        _encodingNS = encodingNS;
+
+        envelopeQName = new QName(envelopeURI, "Envelope");
+        headerQName = new QName(envelopeURI, "Header");
+        bodyQName = new QName(envelopeURI, "Body");
+        faultQName = new QName(envelopeURI, "Fault");
+        actorQName = new QName(envelopeURI, "actor");
+        mustUnderstandQName = new QName(envelopeURI, "mustUnderstand");
+
+        soapencArrayQName = new QName(encodingURI, "Array");
+        soapencArrayTypeQName = new QName(encodingURI, "arrayType");
+        soapencRefQName = new QName(encodingURI, "multiRef");
+        soapoffsetQName = new QName(encodingURI, "offset");
+        soapBase64QName = new QName(encodingURI, "base64");
+
+        // Initialize custom SOAP type handlers
+        if (!customTypesInitialized)
+            initCustomSOAPTypes();
+
+        // Register Types with version-specific QNames
+        registerCustomSOAPType(soapencArrayQName, SOAPArrayType);
+        registerCustomSOAPType(soapencArrayTypeQName, SOAPArrayType);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    public function get contentType():String
+    {
+        return _contentType;
+    }
+
+    public function get encodingURI():String
+    {
+        return encodingNamespace.uri;
+    }
+
+    public function get encodingNamespace():Namespace
+    {
+        return _encodingNS;
+    }
+
+    public function get envelopeURI():String
+    {
+        return envelopeNamespace.uri;
+    }
+
+    public function get envelopeNamespace():Namespace
+    {
+        return _envelopeNS;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    public function getSOAPEncodingToken(type:QName):String
+    {
+        return encodingNamespace.prefix + ":" + type.localName;
+    }
+
+    public static function getConstants(xml:XML = null):SOAPConstants
+    {
+        var envelopeNS:Namespace;
+        var encodingNS:Namespace;
+
+        if (xml != null)
+        {
+            var nsArray:Array = xml.namespaceDeclarations();
+            for each (var ns:Namespace in nsArray)
+            {
+                if (URLUtil.urisEqual(ns.uri, SOAP_ENVELOPE_URI)
+                    || URLUtil.urisEqual(ns.uri, SOAP12_ENVELOPE_URI))
+                {
+                    envelopeNS = ns;
+                }
+                else if (URLUtil.urisEqual(ns.uri, SOAP_ENCODING_URI)
+                    || URLUtil.urisEqual(ns.uri, SOAP12_ENCODING_URI))
+                {
+                    encodingNS = ns;
+                }
+            }
+        }
+
+        // Default to SOAP 1.1
+        if (envelopeNS == null)
+            envelopeNS = new Namespace(SOAP_ENV_PREFIX, SOAP_ENVELOPE_URI);
+
+        if (encodingNS == null)
+            encodingNS = new Namespace(SOAP_ENC_PREFIX, SOAP_ENCODING_URI);
+
+        if (constantsCache == null)
+            constantsCache = {};
+
+        var constants:SOAPConstants = constantsCache[envelopeNS.uri];
+        if (constants == null)
+        {
+            constants = new SOAPConstants(envelopeNS, encodingNS);
+            constantsCache[envelopeNS.uri] = constants;
+        }
+
+        return constants;
+    }
+
+    public static function isSOAPEncodedType(type:QName):Boolean
+    {
+        var uri:String = (type != null) ? type.uri : null;
+        if (uri != null)
+        {
+            if (URLUtil.urisEqual(uri, SOAPConstants.SOAP_ENCODING_URI) ||
+                URLUtil.urisEqual(uri, SOAPConstants.SOAP12_ENCODING_URI))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Looks for an ICustomSOAPType implementation for the given type.
+     *
+     * @return A new instance of the ICustomSOAPType, if registered, otherwise
+     * null.
+     */
+    public static function getCustomSOAPType(type:QName):ICustomSOAPType
+    {
+        var soapType:ICustomSOAPType;
+        if (type != null)
+        {
+            var key:String = getKey(type);
+            var definitionName:String = typeMap[key] as String;
+
+            if (definitionName != null)
+            {
+                try
+                {
+                    var c:Class = getDefinitionByName(definitionName) as Class;
+                    soapType = new c() as ICustomSOAPType;
+                }
+                catch(e:Error)
+                {
+                }
+            }
+        }
+        return soapType;
+    }
+
+    /**
+     * Maps a type QName to a definition of an ISOAPType implementation.
+     * The definition can be a String representation of the fully qualified
+     * class name, an Object instance or the Class instance itself.
+     */
+    public static function registerCustomSOAPType(type:QName, definition:*):void
+    {
+        var key:String = getKey(type);
+
+        var definitionName:String;
+
+        if (definition is String)
+            definitionName = definition as String;
+        else
+            definitionName = getQualifiedClassName(definition);
+
+        typeMap[key] = definitionName;
+    }
+
+    /**
+     * Removes the ICustomSOAPType from the registry for the given type.
+     */
+    public static function unregisterCustomSOAPType(type:QName):void
+    {
+        if (type != null)
+        {
+            var key:String = getKey(type);
+            delete typeMap[key];
+        }
+    }
+
+    private static function getKey(type:QName):String
+    {
+        var key:String;
+        if (type.uri == null || type.uri == "")
+            key = type.localName;
+        else
+            key = type.toString();
+        return key;
+    }
+
+    private static function initCustomSOAPTypes():void
+    {
+        registerCustomSOAPType(queryBeanQName, QueryBeanType);
+        registerCustomSOAPType(mapQName, MapType);
+        registerCustomSOAPType(rowSetQName, RowSetType);
+        registerCustomSOAPType(documentQName, ApacheDocumentType);
+        registerCustomSOAPType(diffgramQName, DataSetType);
+        customTypesInitialized = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    // SOAP Envelope QNames
+    public var envelopeQName:QName;
+    public var headerQName:QName;
+    public var bodyQName:QName;
+    public var faultQName:QName;
+    public var actorQName:QName;
+    public var mustUnderstandQName:QName;
+
+    // SOAP Encoding QNames
+    public var soapencArrayQName:QName;
+    public var soapencArrayTypeQName:QName;
+    public var soapencRefQName:QName;
+    public var soapoffsetQName:QName;
+    public var soapBase64QName:QName;
+
+    private var _contentType:String;
+    private var _envelopeNS:Namespace;
+    private var _encodingNS:Namespace;
+
+    private static var constantsCache:Object;
+    private static var customTypesInitialized:Boolean;
+    private static var typeMap:Object = {};
+
+    //--------------------------------------------------------------------------
+    //
+    // Constants
+    //
+    //--------------------------------------------------------------------------
+
+    // ColdFusion SOAP Type QNames
+    public static const queryBeanQName:QName = new QName(COLD_FUSION_URI, "QueryBean");
+
+    // Apache SOAP Type QNames
+    public static const rowSetQName:QName = new QName(APACHE_SOAP_URI, "RowSet");
+    public static const mapQName:QName = new QName(APACHE_SOAP_URI, "Map");
+    public static const documentQName:QName = new QName(APACHE_SOAP_URI, "Document");
+
+    // MS .NET DataSet Constants
+    public static const msdataURI:String = "urn:schemas-microsoft-com:xml-msdata";
+    public static const diffgramQName:QName = new QName("urn:schemas-microsoft-com:xml-diffgram-v1", "diffgram");
+
+    // SOAP Envelope Constants
+    public static const SOAP_ENVELOPE_URI:String = "http://schemas.xmlsoap.org/soap/envelope/";
+    public static const SOAP12_ENVELOPE_URI:String = "http://www.w3.org/2002/12/soap-envelope";
+    public static const XML_DECLARATION:String = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+
+    // SOAP Encoding Constants
+    public static const SOAP_ENCODING_URI:String = "http://schemas.xmlsoap.org/soap/encoding/";
+    public static const SOAP12_ENCODING_URI:String = "http://www.w3.org/2002/12/soap-encoding";
+    public static const SOAP_CONTENT_TYPE:String = "text/xml; charset=utf-8";
+    public static const SOAP12_CONTENT_TYPE:String = "application/soap+xml; charset=utf-8";
+
+    public static const RPC_STYLE:String = "rpc";
+    public static const DOC_STYLE:String = "document";
+    public static const WRAPPED_STYLE:String = "wrapped";
+    public static const USE_ENCODED:String = "encoded";
+    public static const USE_LITERAL:String = "literal";
+    public static const DEFAULT_OPERATION_STYLE:String = "document";
+    public static const DEFAULT_USE:String = "literal";
+
+    // Default namespace prefixes
+    public static const SOAP_ENV_PREFIX:String = "SOAP-ENV";
+    public static const SOAP_ENC_PREFIX:String = "SOAP-ENC";
+
+    // Custom SOAP Type Constants
+    public static const COLD_FUSION_URI:String   = "http://rpc.xml.coldfusion";
+    public static const APACHE_SOAP_URI:String   = "http://xml.apache.org/xml-soap";
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 13283
Author:   egeorgie@adobe.com
Date:     2010-01-05T19:54:47.152032Z

Log Message:
-----------
Fix http://bugs.adobe.com/jira/browse/SDK-24416 Support major axis alignment in VerticalLayout/HorizontalLayout

Added horizontalAlign to HGroup, HorizontalLayout and verticalAlign to VGroup, VerticalLayout

QE notes: New tests needed for the new properties.
Doc notes: New properterties added to HGroup, HorizontalLayout, VGroup, VerticalLayout.
Bugs: SDK-24416
Reviewer: Hans
Tests run: checkintests, mustella cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/HGroup.as
+++ frameworks/projects/spark/src/spark/components/HGroup.as
@@ -349,6 +349,35 @@
     }

     //----------------------------------
+    //  horizontalAlign
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="left,right,center", defaultValue="left")]
+
+    /**
+     *  @copy spark.layouts.HorizontalLayout#horizontalAlign
+     *
+     *  @default "left"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get horizontalAlign():String
+    {
+        return horizontalLayout.horizontalAlign;
+    }
+
+    /**
+     *  @private
+     */
+    public function set horizontalAlign(value:String):void
+    {
+        horizontalLayout.horizontalAlign = value;
+    }
+
+    //----------------------------------
     //  verticalAlign
     //----------------------------------


fixed "parseAccessorsByModifier" in TypeParser so that declaring type is correct

--- src/as3reflect/Type.as
+++ src/as3reflect/Type.as
@@ -349,7 +349,7 @@
 							accessorXML.@name,
 							AccessorAccess.fromString(accessorXML.@access),
 							Type.forName(accessorXML.@type),
-							type,
+							Type.forName(accessorXML.@declaredBy),
 							isStatic);
 			parseMetaData(accessorXML.metadata, accessor);
 			result.push(accessor);


text encoding

text encoding

--- resources/neurosky/FlashToJs/DisplayWindow.as
+++ resources/neurosky/FlashToJs/DisplayWindow.as
@@ -1,223 +1,222 @@
-package
-{
-	import flash.display.*;
-	import flash.events.*;//for event handling
-	import flash.net.Socket;//Sockets
-	import flash.utils.*;
-	import flash.external.ExternalInterface;
-	import flash.system.*;
-	import com.adobe.serialization.json.*;//as3corelib JSON support
-	public class DisplayWindow extends Sprite
-	{
-		// Public Properties:
-		public var attention:uint;
-		public var meditation:uint;
-		public var poorSignal:uint;
-
-
-		public var myTimer:Timer;
-		public var jsTimer:Timer;
-		public var timeCount:uint;
-		public var hasStarted:Boolean;
-
-		// Private Properties:
-		private var thinkGearSocket:Socket;
-		public function DisplayWindow()
-		{
-			Security.allowDomain("*");
-
-			var self = this;
-
-			hasStarted = false;
-			//To run the ThinkGear software without waiting for the JS, uncomment the line below
-			//startThinkGearSocket();
-
-			//Before the application tries to connect to the ThinkGearSocket, make sure JS is available
-			waitForJs();
-		}
-
-		private function startThinkGearSocket()
-		{
-			if (! hasStarted)
-			{
-				hasStarted = true;
-				log("Preparing ThinkGear...");
-				thinkGearSocket = new Socket();
-				thinkGearSocket.addEventListener(ProgressEvent.SOCKET_DATA,dataHandler);
-				thinkGearSocket.addEventListener(ProgressEvent.PROGRESS,progressHandler);
-				thinkGearSocket.connect("127.0.0.1",13854);
-				if (thinkGearSocket.connected)
-				{
-					log("ThinkGear connected. Configuring...");
-				}
-				else
-				{
-					log("ThinkGear not connected. Configuring anyway...");
-				}
-				var configuration:Object = new Object();
-				configuration["enableRawOutput"] = false;
-				configuration["format"] = "Json";
-				thinkGearSocket.writeUTFBytes(JSON.encode(configuration));
-			}
-			else
-			{
-				log("thinkGearSocket has already started");
-			}
-		}
-
-		// Protected Methods:;
-		private function progressHandler(e:ProgressEvent)
-		{
-			if (thinkGearSocket.connected)
-			{
-				log("ThinkGear connected. ProgressEvent occurred.");
-			}
-			else
-			{
-				log("ThinkGear not connected. ProgressEvent occurred.");
-			}
-		}
-		private function dataHandler(e:ProgressEvent)
-		{
-			if (thinkGearSocket.connected)
-			{
-				log("ThinkGear connected. Receiving data.");
-			}
-			else
-			{
-				log("ThinkGear not connected. Receiving data.");
-			}
-			var packetString:String = thinkGearSocket.readUTFBytes(thinkGearSocket.bytesAvailable);
-			if ((packetString == null))
-			{
-				log("packetString is NULL");
-			}
-			thinkGearSocket.flush();
-			log("ThinkGearSocket flushed");
-
-			var packets:Array = packetString.split(/\r/);
-			log(("Packets length: " + packets.length));
-			var data:Object;//temporary data
-			for each (var packet:String in packets)
-			{//iterate through each element
-				if ((packet != ""))
-				{//sometimes the line is blank so skip the line
-					try
-					{
-						log(packet);
-						data = JSON.decode(packet);
-						//decode the data to an array
-						if (data["poorSignalLevel"] != null)
-						{//checking to see if the ''poorSignalLevel' key exists
-							poorSignal = data["poorSignalLevel"];
-							if ((poorSignal == 0))
-							{
-								attention = data["eSense"]["attention"];//assigning data to variables
-								meditation = data["eSense"]["meditation"];
-								//log("Attention: " + attention);//output attention data to debug
-							}
-							else
-							{
-								if ((poorSignal == 200))
-								{
-									attention = 0;
-									meditation = 0;
-									if (!data["eSense"])
-										poorSignal = 250;
-								}
-							}
-						}
-						label1.text = "Attention: " + attention.toString() + "\nMeditation: " + meditation.toString() + "\nPoor Signal: " + poorSignal.toString();
-						sendDataToJavaScript(poorSignal,attention,meditation);
-					}
-					catch (jError:JSONParseError)
-					{
-						log("there was a JSONParseError: " + packet);
-						// restart a connection at first error :(
-						hasStarted = false;
-						thinkGearSocket.close();
-						startThinkGearSocket();
-						sendDataToJavaScript(250, 0, 0);
-						return;
-					}
-
-				} else log("empty packet");
-				data = null;
-
-			}/*for each*/
-		}/*function dataHandler*/
-		/**
-		 * iconLevel is the poor signal value
-		 * attentionLevel is the attention value
-		 * meditationLevel is the meditation value
-		 * There may be some need to check the types of these values, because they are not all
-		 * being passed to the Javascript, from what I can tell
-		 */
-		public function sendDataToJavaScript(iconLevel:uint,attentionLevel:uint,meditationLevel:uint)
-		{
-			if (ExternalInterface.available)
-			{
-				ExternalInterface.call("MindWave.setSignalValue",iconLevel);
-				ExternalInterface.call("MindWave.setAttentionLevel",attentionLevel);
-				ExternalInterface.call("MindWave.setMeditationLevel",meditationLevel);
-			}
-			else
-			{
-				log("ExternalInterface is not available to send data to JS");
-			}
-		}
-		public function checkJs(event:TimerEvent)
-		{
-			log("Checking javascript...");
-			if (ExternalInterface.available)
-			{
-				var jsReady:Boolean = ExternalInterface.call("isReady");
-				if (jsReady)
-				{
-					jsTimer.stop();
-					startThinkGearSocket();
-				}
-				else
-				{
-					log("JS is not Ready");
-				}
-			} else {
-				log("No JS interface...");
-			}
-		}
-		public function checkJsStopped(event:TimerEvent)
-		{
-			log("Javascript connection was not established");
-		}
-		private function waitForJs()
-		{
-			jsTimer = new Timer(1000,100);
-			jsTimer.addEventListener(TimerEvent.TIMER,checkJs);
-			jsTimer.addEventListener(TimerEvent.TIMER_COMPLETE,checkJsStopped);
-			jsTimer.start();
-		}
-
-		private function receivedFromJavaScript(value:String):void
-		{
-			log((("JavaScript says: " + value) + "\n"));
-		}
-		private function checkJavaScriptReady():Boolean
-		{
-			var isReady:Boolean = false;
-			if (ExternalInterface.available)
-			{
-				isReady = ExternalInterface.call("isReady");
-			}
-			return isReady;
-		}
-		private function log(message:String)
-		{
-			trace(message);
-			label2.text = message;
-			if (ExternalInterface.available)
-			{
-				ExternalInterface.call("console.log",message);
-			}
-		}
-	}
+package
+{
+	import flash.display.*;
+	import flash.events.*;//for event handling
+	import flash.net.Socket;//Sockets
+	import flash.utils.*;
+	import flash.external.ExternalInterface;
+	import flash.system.*;
+	import com.adobe.serialization.json.*;//as3corelib JSON support
+	public class DisplayWindow extends Sprite
+	{
+		// Public Properties:
+		public var attention:uint;
+		public var meditation:uint;
+		public var poorSignal:uint;
+
+
+		public var myTimer:Timer;
+		public var jsTimer:Timer;
+		public var timeCount:uint;
+		public var hasStarted:Boolean;
+
+		// Private Properties:
+		private var thinkGearSocket:Socket;
+		public function DisplayWindow()
+		{
+			Security.allowDomain("*");
+
+			var self = this;
+
+			hasStarted = false;
+			//To run the ThinkGear software without waiting for the JS, uncomment the line below
+			//startThinkGearSocket();
+
+			//Before the application tries to connect to the ThinkGearSocket, make sure JS is available
+			waitForJs();
+		}
+
+		private function startThinkGearSocket()
+		{
+			if (! hasStarted)
+			{
+				hasStarted = true;
+				log("Preparing ThinkGear...");
+				thinkGearSocket = new Socket();
+				thinkGearSocket.addEventListener(ProgressEvent.SOCKET_DATA,dataHandler);
+				thinkGearSocket.addEventListener(ProgressEvent.PROGRESS,progressHandler);
+				thinkGearSocket.connect("127.0.0.1",13854);
+				if (thinkGearSocket.connected)
+				{
+					log("ThinkGear connected. Configuring...");
+				}
+				else
+				{
+					log("ThinkGear not connected. Configuring anyway...");
+				}
+				var configuration:Object = new Object();
+				configuration["enableRawOutput"] = false;
+				configuration["format"] = "Json";
+				thinkGearSocket.writeUTFBytes(JSON.encode(configuration));
+			}
+			else
+			{
+				log("thinkGearSocket has already started");
+			}
+		}
+
+		// Protected Methods:;
+		private function progressHandler(e:ProgressEvent)
+		{
+			if (thinkGearSocket.connected)
+			{
+				log("ThinkGear connected. ProgressEvent occurred.");
+			}
+			else
+			{
+				log("ThinkGear not connected. ProgressEvent occurred.");
+			}
+		}
+		private function dataHandler(e:ProgressEvent)
+		{
+			if (thinkGearSocket.connected)
+			{
+				log("ThinkGear connected. Receiving data.");
+			}
+			else
+			{
+				log("ThinkGear not connected. Receiving data.");
+			}
+			var packetString:String = thinkGearSocket.readUTFBytes(thinkGearSocket.bytesAvailable);
+			if ((packetString == null))
+			{
+				log("packetString is NULL");
+			}
+			thinkGearSocket.flush();
+			log("ThinkGearSocket flushed");
+
+			var packets:Array = packetString.split(/\r/);
+			log(("Packets length: " + packets.length));
+			var data:Object;//temporary data
+			for each (var packet:String in packets)
+			{//iterate through each element
+				if ((packet != ""))
+				{//sometimes the line is blank so skip the line
+					try
+					{
+						log(packet);
+						data = JSON.decode(packet);
+						//decode the data to an array
+						if (data["poorSignalLevel"] != null)
+						{//checking to see if the ''poorSignalLevel' key exists
+							poorSignal = data["poorSignalLevel"];
+							if ((poorSignal == 0))
+							{
+								attention = data["eSense"]["attention"];//assigning data to variables
+								meditation = data["eSense"]["meditation"];
+								//log("Attention: " + attention);//output attention data to debug
+							}
+							else
+							{
+								if ((poorSignal == 200))
+								{
+									attention = 0;
+									meditation = 0;
+									if (!data["eSense"])
+										poorSignal = 250;
+								}
+							}
+						}
+						label1.text = "Attention: " + attention.toString() + "\nMeditation: " + meditation.toString() + "\nPoor Signal: " + poorSignal.toString();
+						sendDataToJavaScript(poorSignal,attention,meditation);
+					}
+					catch (jError:JSONParseError)
+					{
+						log("there was a JSONParseError: " + packet);
+						// restart a connection at first error :(
+						hasStarted = false;
+						thinkGearSocket.close();
+						startThinkGearSocket();
+						return;
+					}
+
+				} else log("empty packet");
+				data = null;
+
+			}/*for each*/
+		}/*function dataHandler*/
+		/**
+		 * iconLevel is the poor signal value
+		 * attentionLevel is the attention value
+		 * meditationLevel is the meditation value
+		 * There may be some need to check the types of these values, because they are not all
+		 * being passed to the Javascript, from what I can tell
+		 */
+		public function sendDataToJavaScript(iconLevel:uint,attentionLevel:uint,meditationLevel:uint)
+		{
+			if (ExternalInterface.available)
+			{
+				ExternalInterface.call("MindWave.setSignalValue",iconLevel);
+				ExternalInterface.call("MindWave.setAttentionLevel",attentionLevel);
+				ExternalInterface.call("MindWave.setMeditationLevel",meditationLevel);
+			}
+			else
+			{
+				log("ExternalInterface is not available to send data to JS");
+			}
+		}
+		public function checkJs(event:TimerEvent)
+		{
+			log("Checking javascript...");
+			if (ExternalInterface.available)
+			{
+				var jsReady:Boolean = ExternalInterface.call("isReady");
+				if (jsReady)
+				{
+					jsTimer.stop();
+					startThinkGearSocket();
+				}
+				else
+				{
+					log("JS is not Ready");
+				}
+			} else {
+				log("No JS interface...");
+			}
+		}
+		public function checkJsStopped(event:TimerEvent)
+		{
+			log("Javascript connection was not established");
+		}
+		private function waitForJs()
+		{
+			jsTimer = new Timer(1000,100);
+			jsTimer.addEventListener(TimerEvent.TIMER,checkJs);
+			jsTimer.addEventListener(TimerEvent.TIMER_COMPLETE,checkJsStopped);
+			jsTimer.start();
+		}
+
+		private function receivedFromJavaScript(value:String):void
+		{
+			log((("JavaScript says: " + value) + "\n"));
+		}
+		private function checkJavaScriptReady():Boolean
+		{
+			var isReady:Boolean = false;
+			if (ExternalInterface.available)
+			{
+				isReady = ExternalInterface.call("isReady");
+			}
+			return isReady;
+		}
+		private function log(message:String)
+		{
+			trace(message);
+			label2.text = message;
+			if (ExternalInterface.available)
+			{
+				ExternalInterface.call("console.log",message);
+			}
+		}
+	}
 }


Some rearrangements to improve subclassability.
I had a subclass loading the new zip files that will be remixable avatars,
but that's going to have to be restructured (complexity++) for security
reasons.

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

--- src/as/com/threerings/flash/MediaContainer.as
+++ src/as/com/threerings/flash/MediaContainer.as
@@ -140,12 +140,7 @@

         // set up the new media
         willShowNewMedia();
-        if (StringUtil.endsWith(url.toLowerCase(), ".flv")) {
-            setupVideo(url);
-
-        } else {
-            setupSwfOrImage(url);
-        }
+        showNewMedia(url);
         didShowNewMedia();
     }

@@ -181,6 +176,16 @@
     {
         _initialized = false;
         _isImage = false;
+    }
+
+    protected function showNewMedia (url :String) :void
+    {
+        if (StringUtil.endsWith(url.toLowerCase(), ".flv")) {
+            setupVideo(url);
+
+        } else {
+            setupSwfOrImage(url);
+        }
     }

     /**
@@ -211,6 +216,24 @@
     {
         startedLoading();

+        var loader :Loader = initLoader();
+        loader.load(new URLRequest(url), getContext(url));
+
+        try {
+            var info :LoaderInfo = loader.contentLoaderInfo;
+            updateContentDimensions(info.width, info.height);
+        } catch (err :Error) {
+            // an error is thrown trying to access these props before they're
+            // ready
+        }
+    }
+
+    /**
+     * Initialize a Loader as our _media, and configure it however needed to prepare
+     * loading user content.
+     */
+    protected function initLoader () :Loader
+    {
         // create our loader and set up some event listeners
         var loader :Loader = new Loader();
         _media = loader;
@@ -219,17 +242,9 @@
         info.addEventListener(Event.INIT, handleInit);
         info.addEventListener(IOErrorEvent.IO_ERROR, loadError);
         info.addEventListener(ProgressEvent.PROGRESS, loadProgress);
-
-        // start it loading, add it as a child
-        loader.load(new URLRequest(url), getContext(url));
         addChildAt(loader, 0);

-        try {
-            updateContentDimensions(info.width, info.height);
-        } catch (err :Error) {
-            // an error is thrown trying to access these props before they're
-            // ready
-        }
+        return loader;
     }

     /**


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

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

 package mx.utils
 {


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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/framework/src/mx/validators/IValidatorListener.as
+++ frameworks/projects/framework/src/mx/validators/IValidatorListener.as
@@ -19,6 +19,11 @@
  *  the Flex data validation mechanism.
  *  The UIComponent class implements this interface.
  *  Therefore, any subclass of UIComponent also implements it.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public interface IValidatorListener
 {
@@ -51,6 +56,11 @@
      *
Note that writing a value to the errorString property
      *  does not trigger the valid or invalid events; it only changes the
      *  border color and displays the validation error message.

+ 	 *
+ 	 *  @langversion 3.0
+ 	 *  @playerversion Flash 9
+ 	 *  @playerversion AIR 1.1
+ 	 *  @productversion Flex 3
  	 */
 	function get errorString():String;

@@ -65,6 +75,11 @@

 	/**
 	 *  Used by a validator to assign a subfield.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	function get validationSubField():String;

@@ -97,6 +112,11 @@
 	 *  @param event The event object for the validation.
      *
      *  @see mx.events.ValidationResultEvent
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	function validationResultHandler(event:ValidationResultEvent):void;
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4630
Author:   gosmith@adobe.com
Date:     2009-01-23T00:54:13.155181Z

Log Message:
-----------
Removed code in AccordionHeaderAccImpl and TabBarAccImpl where the child IDs were being adjusted up or down by 100000 for some unknown reason. Deneb (on Flash Player) and Nataliya and Jon (on JAWS) don't think this should be done.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Deepa

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

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

--- frameworks/projects/mx/src/mx/accessibility/AccordionHeaderAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/AccordionHeaderAccImpl.as
@@ -67,11 +67,6 @@
 	 */
 	private static const EVENT_OBJECT_SELECTION:uint = 0x8006;

-	/**
-	 *  @private
-	 */
-	private static const MAX_NUM:uint = 100000;
-
 	//--------------------------------------------------------------------------
 	//
 	//  Class methods
@@ -249,15 +244,12 @@
 		{
 			case "focusDraw":
 			{
-				// sending + 10000 to ensure sending out different number
-				// than sent last time in change.
-
-				//event.currentTarget here is the AccordionHeader (a/k/a 'master')
+				// event.currentTarget here is the AccordionHeader (a/k/a 'master')
 				index = Accordion(event.currentTarget.parent).focusedIndex;

 				if (index >= 0 && master == Accordion(event.currentTarget.parent).getHeaderAt(index))
 				{
-					Accessibility.sendEvent(DisplayObject(event.currentTarget), index + MAX_NUM + 1,
+					Accessibility.sendEvent(DisplayObject(event.currentTarget), index + 1,
 											EVENT_OBJECT_FOCUS, true);
 					break;
 				}
@@ -265,7 +257,7 @@

 			case "change":
 			{
-				//event.currentTarget here is the Accordion (a/k/a 'master.parent')
+				// event.currentTarget here is the Accordion (a/k/a 'master.parent')
 				index = Accordion(event.currentTarget).selectedIndex;
 				if (index >= 0 && master == Accordion(event.currentTarget).getHeaderAt(index))
 				{


Transferred from the Adobe Open Source Subversion Repository

Revision: 11995
Author:   doug.lee@ssbbartgroup.com
Date:     2009-11-19T18:50:30.831767Z

Log Message:
-----------
Updated all AccImpls that use MSAA constants (except TextLayout) to
use the new AccConst references instead of hard-coding hex numbers and
local copies of the constants.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LabelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextInputAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowedApplicationAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SpinnerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RichEditableTextAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/NumericStepperAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SkinnableTextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ToggleButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/VideoPlayerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/AccordionHeaderAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/AccordionHeaderAccImpl.as
@@ -15,6 +15,7 @@
 import flash.accessibility.Accessibility;
 import flash.display.DisplayObject;
 import flash.events.Event;
+import mx.accessibility.AccConst;
 import mx.containers.Accordion;
 import mx.containers.accordionClasses.AccordionHeader;
 import mx.controls.Button;
@@ -42,36 +43,6 @@
 	//
 	//--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_SELECTABLE:uint = 0x00200000;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_SELECTED:uint = 0x00000002;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_UNAVAILABLE:uint = 0x00000001;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_FOCUS:uint = 0x8005;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_SELECTION:uint = 0x8006;
-
 	//--------------------------------------------------------------------------
 	//
 	//  Class methods
@@ -132,7 +103,7 @@
 	{
 		super(master);

-		role = 0x25; // ROLE_SYSTEM_PAGETAB
+		role = AccConst.ROLE_SYSTEM_PAGETAB;

 		master.parent.addEventListener("change", eventHandler);
 		master.addEventListener("removed", removedHandler);
@@ -179,17 +150,17 @@

 		if (accordion.enabled)
 		{
-			accState |= STATE_SYSTEM_SELECTABLE;
+			accState |= AccConst.STATE_SYSTEM_SELECTABLE;

 			if (Button(master).selected)
-				accState |= STATE_SYSTEM_SELECTED;
+				accState |= AccConst.STATE_SYSTEM_SELECTED;

 			var index:int = accordion.focusedIndex;
 			if (index >= 0 && master == accordion.getHeaderAt(index))
-				accState |= STATE_SYSTEM_FOCUSED;
+				accState |= AccConst.STATE_SYSTEM_FOCUSED;
 		}
 		else
-			accState |= STATE_SYSTEM_UNAVAILABLE;
+			accState |= AccConst.STATE_SYSTEM_UNAVAILABLE;

 		return accState;
 	}
@@ -264,7 +235,7 @@
 				if (index >= 0 && master == Accordion(event.currentTarget.parent).getHeaderAt(index))
 				{
 					Accessibility.sendEvent(DisplayObject(event.currentTarget), index + 1,
-											EVENT_OBJECT_FOCUS, true);
+											AccConst.EVENT_OBJECT_FOCUS, true);
 				}
 				break;
 			}
@@ -276,7 +247,7 @@
 				if (index >= 0 && master == Accordion(event.currentTarget).getHeaderAt(index))
 				{
 					Accessibility.sendEvent(master, index + 1,
-											EVENT_OBJECT_SELECTION, true);
+											AccConst.EVENT_OBJECT_SELECTION, true);
 				}
 				break;
 			}


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


Further cleanup.

Further cleanup.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -484,19 +484,19 @@

 			_timeCache_lastTime = super.time;

-			// If cache invalid, repopulate it.
+			// If cache invalid, repopulate it. The segment time calculations are costly to
+			// do many times per second, so we try to do them only infrequently.
 			if(isNaN(_timeCache_LastUpdatedTimestamp) && indexHandler)
 			{
 				CONFIG::LOGGING
 				{
 					logger.debug("Repopulating time cache.");
 				}
-
-				indexHandler.dvrGetStreamInfo(null);

 				var activeManifest:HLSManifestParser = indexHandler.getLastSequenceManifest();
 				var didValidUpdate:Boolean = false;

+				// Attempt to determine _initialTime.
 				if(activeManifest && !isNaN(_initialTime))
 				{
 					if(activeManifest.streamEnds == false)
@@ -510,7 +510,7 @@
 						}
 						else
 						{
-							//trace("   o Failed to perceive live stream.");
+							//trace("   o Failed to perceive live stream, will retry later.");
 						}
 					}
 					else
@@ -522,6 +522,7 @@
 					}
 				}

+				// If we succeeded, note our results.
 				if(didValidUpdate)
 				{
 					_timeCache_streamStartAbsoluteTime = indexHandler.streamStartAbsoluteTime;
@@ -541,21 +542,17 @@
 			//trace(" super.time (" + super.time + ") + " + _initialTime + " = " + potentialNewTime);

 			// If we are VOD, then offset time so 0 seconds is the start of the stream.
-			var disableLiveEdgeFixup:Boolean = false;
 			if(indexHandler)
 			{
 				var lastMan:HLSManifestParser = indexHandler.getLastSequenceManifest();
 				if(lastMan && lastMan.streamEnds == true && _timeCache_streamStartAbsoluteTime)
 					potentialNewTime -= _timeCache_streamStartAbsoluteTime;
-				else
-				{
-					potentialNewTime = absoluteTime;
-					disableLiveEdgeFixup = true;
-				}
-			}
-
-			// Take into account any cached live edge offset.
-			if(_timeCache_liveEdge != Number.MAX_VALUE && !disableLiveEdgeFixup)
+			}
+
+			// If we are live/DVR, then subtract the live edge offset so we report time
+			// window-relative (0 seconds start of window, N seconds live edge of window
+			// of N seconds in length).
+			if(_timeCache_liveEdge != Number.MAX_VALUE)
 			{
 				//trace(" minus " + _timeCache_liveEdgeMinusWindowDuration);
 				potentialNewTime -= _timeCache_liveEdgeMinusWindowDuration;
@@ -1205,13 +1202,13 @@
 						}

 						// We do not allow the user to seek to before the DVR window
-						if (indexHandler && _seekTarget < indexHandler.lastKnownPlaylistStartTime && _seekTarget >= 0 && !isNaN(_seekTarget))
+						if (indexHandler && _seekTarget < indexHandler.lastKnownPlaylistStartTime && !isNaN(_enhancedSeekTarget))
 						{
 							CONFIG::LOGGING
 							{
 								logger.debug("Attempting to seek outside of DVR window, seeking to last known playlist start time of " + indexHandler.lastKnownPlaylistStartTime);
 							}
-							_seekTarget = indexHandler.lastKnownPlaylistStartTime;
+							_seekTarget = _enhancedSeekTarget = indexHandler.lastKnownPlaylistStartTime;
 						}

 						// Handle a case where seeking to the end of a VOD causes the replay function to break


Transferred from the Adobe Open Source Subversion Repository

Revision: 12564
Author:   aharui@adobe.com
Date:     2009-12-05T00:26:10.890539Z

Log Message:
-----------
Try to adjust verticalscrollposition when list gets filtered and vsp is > 0.

QE Notes: None
Doc Notes: None
Bugs: SDK-23726
Reviewer: Ryan
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/components/DataGrid, List

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

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -2353,6 +2353,15 @@
         // we have to scroll up.  We can't have filler rows unless the scrollPosition is 0
         if (verticalScrollPosition > 0 && fillerRows > 0)
         {
+            var bookmark:CursorBookmark = iterator.bookmark;
+            var rowIndex:int = bookmark.getViewIndex();
+            if (verticalScrollPosition != rowIndex - lockedRowCount)
+            {
+                // we got totally out of sync, probably because a filter
+                // removed or added rows
+                super.verticalScrollPosition = Math.max(rowIndex - lockedRowCount, 0);
+            }
+
             if (adjustVerticalScrollPositionDownward(Math.max(rowCount, 1)))
                 return;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19789
Author:   rfrishbe@adobe.com
Date:     2011-01-18T02:37:11.699975Z

Log Message:
-----------
LabelItemRenderer and IconItemRenderer changes:

1) Refactor creating components in Label/IconItemRenderer into protected methods: createLabelDisplay(), destroyLabelDisplay(), createMessageDisplay(), destroyMessageDisplay(), createIconDisplay(), destroyIconDisplay(), createDecoratorDisplay(), destroyDecoratorDisplay()

2) Glenn's suggestion which yields a pretty big performance boost: Turn on cacheAsBitmap=true for labelDisplay and messageDisplay

3) Fix up code in IconItemRenderer related to graphicelement sharing by moving the code into the validateXXX() methods

4) Property renames: decoratorClass -> decorator, loadingIconClass -> iconPlaceholder

5) Bump frameRate back down on RadioStations tests now that Timers are independent of frameRate.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/RadioStations/src/RadioStations.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/RadioStations/src/views/RadioStationsHome.mxml</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
@@ -706,16 +706,44 @@

         if (!labelDisplay)
         {
-            labelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
-            labelDisplay.styleName = this;
-            labelDisplay.editable = false;
-            labelDisplay.selectable = false;
-            labelDisplay.multiline = false;
-            labelDisplay.wordWrap = false;
-
-            addChild(labelDisplay);
+            createLabelDisplay();
             labelDisplay.text = _label;
         }
+    }
+
+    /**
+     *  Creates the labelDisplay component
+     *
+     *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+     */
+    protected function createLabelDisplay():void
+    {
+        labelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
+        labelDisplay.styleName = this;
+        labelDisplay.editable = false;
+        labelDisplay.selectable = false;
+        labelDisplay.multiline = false;
+        labelDisplay.wordWrap = false;
+        labelDisplay.cacheAsBitmap = true;
+
+        addChild(labelDisplay);
+    }
+
+    /**
+     *  Destroys the labelDisplay component
+     *
+     *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+     */
+    protected function destroyLabelDisplay():void
+    {
+        removeChild(labelDisplay);
+        labelDisplay = null;
     }

     /**


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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.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.components.gridClasses
 {


FLEX-16840 removed unused local varaiable

--- frameworks/projects/mx/src/mx/controls/TextArea.as
+++ frameworks/projects/mx/src/mx/controls/TextArea.as
@@ -2395,8 +2395,6 @@
         var visibleRows:Number =
             textField.bottomScrollV - textField.scrollV + 1;

-        var rows:Number = textField.numLines;
-
         setScrollBarProperties(textField.width + textField.maxScrollH,
                                textField.width, textField.numLines,
                                visibleRows);


Transferred from the Adobe Open Source Subversion Repository

Revision: 6422
Author:   hmuller@adobe.com
Date:     2009-04-30T17:00:23.069723Z

Log Message:
-----------
Added fixedThumbSize property to Scroller, moved focusEnabled=false from List to ListSkin.

QE Notes:
Doc Notes:
Bugs: sdk-20733, sdk-17360
Reviewer: Chet, Glenn, Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ListSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
@@ -294,6 +294,42 @@
     }

     //---------------------------------
+    // fixedThumbSize
+    //---------------------------------
+
+    private var _fixedThumbSize:Boolean = false;
+
+    /**
+     *  If true, the thumb's size along the scrollbar's axis will be
+     *  its preferred size.
+     *
+     *  @default false
+     *  @see #calculateThumbSize
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get fixedThumbSize():Boolean
+    {
+        return _fixedThumbSize;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fixedThumbSize(value:Boolean):void
+    {
+        if (value == _fixedThumbSize)
+            return;
+
+        _fixedThumbSize = value;
+        invalidateSize();
+        invalidateDisplayList();
+    }
+
+    //---------------------------------
     // pageSize
     //---------------------------------

@@ -359,7 +395,7 @@
      *  and step offsets.</p>
      *
      *  @default null
-     *  @see mx.components.VScrollBar
+     *       mx.components.VScrollBar
      *  @see mx.components.HScrollBar
      *
      *
@@ -558,9 +594,13 @@
     }

     /**
-     *  Calculate the size for
-     *  the thumb from the current range, pageSize, and
+     *  Calculate the size for the thumb from the current range, pageSize, and
      *  trackSize settings.
+     *
+     *  If fixedThumbSize is true, then subclasses should return a value based
+     *  on the thumb's preferred size instead.
+     *
+     *  @see fixedThumbSize
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


-raised version number

-raised version number

--- actionscript/src/com/freshplanet/ane/AirFacebook/Facebook.as
+++ actionscript/src/com/freshplanet/ane/AirFacebook/Facebook.as
@@ -16,7 +16,7 @@

 public class Facebook extends EventDispatcher {

-    public static const VERSION:String = "4.5.2";
+    public static const VERSION:String = "4.5.3";

     private var _initialized:Boolean;


OFC-1506 - Code list popup last selected item not cleared when popup is closed

--- collect-client/src/main/flex/org/openforis/collect/presenter/TextCodeInputFieldPresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/TextCodeInputFieldPresenter.as
@@ -120,6 +120,7 @@
 				}
 				_popUpOpened = false;
 				PopUpManager.removePopUp(_popUp);
+				resetPopUp();
 			}
 		}

@@ -164,10 +165,16 @@
 			_popUp.setFocus();

 			_popUp.currentState = CodeListDialog.STATE_LOADING;
-
+
 			PopUpManager.centerPopUp(_popUp);

 			CodeInputFieldPresenter(view.presenter).loadCodes(view, loadListDialogDataResultHandler);
+		}
+
+		private static function resetPopUp():void {
+			_popUp.items = null;
+			_popUp.selectedItems = null;
+			_popUp.notSelectedItems = null;
 		}

 		protected static function openAllowedValuesPreviewPopUp(view:TextCodeInputField):void {


Fixed flash showing both mute buttons at the same time when not always showing the controlbar.

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -279,16 +279,14 @@
 				// set
 			}

-			if(_alwaysShowControls) {
-				if(_startVolume<=0) {
-					trace("INITIAL VOLUME: "+_startVolume+" MUTED");
-					_volumeMuted.visible=true;
-					_volumeUnMuted.visible=false;
-				} else {
-					trace("INITIAL VOLUME: "+_startVolume+" UNMUTED");
-					_volumeMuted.visible=false;
-					_volumeUnMuted.visible=true;
-				}
+			if(_startVolume<=0) {
+				trace("INITIAL VOLUME: "+_startVolume+" MUTED");
+				_volumeMuted.visible=true;
+				_volumeUnMuted.visible=false;
+			} else {
+				trace("INITIAL VOLUME: "+_startVolume+" UNMUTED");
+				_volumeMuted.visible=false;
+				_volumeUnMuted.visible=true;
 			}

 			_controlBar.visible = _alwaysShowControls;


Transferred from the Adobe Open Source Subversion Repository

Revision: 4211
Author:   jszeto@adobe.com
Date:     2008-12-02T00:51:56.799456Z

Log Message:
-----------
GraphicElement re-layering optimization and removal of change events

SDK-18055 Optimize invalidation of layering for GraphicElements

For the properties that affect whether GraphicElement needs a displayObject, in their setters we add checks to see if we need to recalculate layering.

SDK-18054  Remove non-critical change events from GraphicElement

Removed a bunch of change events from properties that only get set programmatically.

QE Notes: Most change events from GraphicElement and its subclasses have been removed
Doc Notes:
Bugs: SDK-18054, SDK-18055
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.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/graphics/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as
@@ -64,7 +64,6 @@
      */
     mx_internal var _stroke:IStroke;

-    [Bindable("propertyChange")]
     [Inspectable(category="General")]

     /**
@@ -81,7 +80,6 @@
     public function set stroke(value:IStroke):void
     {
         var strokeEventDispatcher:EventDispatcher;
-        var oldValue:IStroke = _stroke;

         strokeEventDispatcher = _stroke as EventDispatcher;
         if (strokeEventDispatcher)
@@ -96,9 +94,7 @@
             strokeEventDispatcher.addEventListener(
                 PropertyChangeEvent.PROPERTY_CHANGE,
                 stroke_propertyChangeHandler);
-
-        dispatchPropertyChangeEvent("stroke", oldValue, _stroke);
-
+
         invalidateDisplayList();
         // Parent layout takes stroke into account
         invalidateParentSizeAndDisplayList();


Transferred from the Adobe Open Source Subversion Repository

Revision: 10766
Author:   gruehle@adobe.com
Date:     2009-09-30T22:55:55.205927Z

Log Message:
-----------
Re-commit compiler errors for other theme's styles feature. If Style metadata has a "themes" attribute, the style is only valid if that theme is applied.

The Spark theme is applied by default. The halo theme can be specified as a compiler argument or by selecting the "MX Only" component set in Builder.

All other themes need to be applied using theme+= instead of theme=. If you use theme= you will get warnings about styles used in CSS selectors, and errors if you use any theme-specific style as an attribute on an MXML tag.

By default, styles that aren't valid for the current theme are errors. These can be changed to warnings with the report-invalid-styles-as-warnings compiler option.

QE notes: Expect test breakage
Doc notes: The new policy for themes needs to be documented.
Bugs: none yet, but I'm sure there will be some...
Reviewer: Ryan
Tests run: checkintests, cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/DefaultsConfigurator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ApplicationBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/themes/Spark/spark.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.css</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/DeclarationHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/Type.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/TypeTable.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/SparkSkinsClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FXGCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SkinnableDataContainerSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as
+++ frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as
@@ -150,8 +150,6 @@
 		var backgroundAlpha:Number= getStyle("backgroundAlpha");
 		var borderColor:uint = getStyle("borderColor");
 		var cornerRadius:Number = getStyle("cornerRadius");
-		var shadowColor:uint = getStyle("shadowColor");
-		var shadowAlpha:Number = 0.1;

 		var g:Graphics = graphics;
 		g.clear();


def: 2022 clean media didn't actually cleaned the media...

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@82653 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -454,6 +454,7 @@
 					}
 					break;
 				case NotificationType.CLEAN_MEDIA:
+					_mediaProxy.vo.media = null;
 					cleanMedia();
 					kMediaPlayer.hideThumbnail();
 					break;
@@ -1261,7 +1262,7 @@
 			//we don't need to clean the media if it's empty
 			if(!player.media) return;

-			if (player.media.hasOwnProperty("cleanMedia"))
+			if (player.media.hasOwnProperty("cleanMedia") || player.state == MediaPlayerState.PLAYING)
 				sendNotification( NotificationType.DO_STOP );

 			if(player.displayObject)


vpaid ad object

vpaid ad object

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -218,18 +218,23 @@
          * Generates a random ID for this asset. Creates JavaScript
          * callbacks, starts the RenderMeter and sets up ThrottleEvent
          * listeners, and initializes the JavaScript portion of OpenVV.
-         *
-         * @param beaconSwfUrl The fully qualified URL of OVVBeacon.swf for
-         * OpenVV to use. For example, "http://localhost/OVVBeacon.swf". If
-         * not supplied, the "beacon" method for detecting viewability will
+         * @param conf is config object:
+         * {
+         *      beaconSwfUrl:
+         *      vpaidAd:
+         * }
+         * beaconSwfUrl - The fully qualified URL of OVVBeacon.swf for
+         * OpenVV to use. this For example, "http://localhost/OVVBeacon.swf".
+         * If not supplied, the "beacon" method for detecting viewability will
          * be unavailable.
+         * vpaidAd - reference to the vpaid object.
          * @param id The unique identifier of this OVVAsset. If not supplied,
          * it will be randomly generated.
          * @param adRef A reference to the top DisplayObject of the ad; used
          * to determine full-screen status when player's stage is not available.
          * Optional only for backwards compatibility.
          */
-        public function OVVAsset( beaconSwfUrl:String = null, id:String = null, adRef:* = null ) {
+        public function OVVAsset(conf:Object, id:String = null, adRef:* = null ) {
             if (!externalInterfaceIsAvailable()) {
                 dispatchEvent(new OVVEvent(OVVEvent.OVVError, {
                     "message": "ExternalInterface unavailable"
@@ -239,12 +244,23 @@

             _id = (id !== null) ? id : "ovv" + Math.floor(Math.random() * 1000000000).toString();

-            ////////  ????  ///////////////
             if ( !!adRef ) {
                 _ad = adRef as DisplayObject;
             }
             setStage();
-            ////////  ????  ///////////////
+
+            var beaconSwfUrl:String = "";
+            if (conf is String) {
+                beaconSwfUrl = String(conf); //  backward-compatible  - legacy API
+            } else {
+                // config object
+                beaconSwfUrl = conf.beaconSwfUrl;
+                _vpaidAd = conf.vpaidAd;
+            }
+
+            if (_vpaidAd == null && (Object)(adRef).hasOwnProperty('getVPAID') && adRef['getVPAID']  is Function) {
+                _vpaidAd = (Object)(adRef).getVPAID();
+            }

             ExternalInterface.addCallback(_id, flashProbe);
             ExternalInterface.addCallback("onJsReady" + _id, onJsReady);
@@ -255,15 +271,15 @@

             var ovvAssetSource: String = "{{OVVAssetJS}}";
             ovvAssetSource = ovvAssetSource
-                                .replace(/OVVID/g, _id)
-                                .replace(/INTERVAL/g, POLL_INTERVAL)
-                                .replace(/OVVBUILDVERSION/g, _buildVersion)
-								.replace(/OVVRELEASEVERSION/g, RELEASE_VERSION);
-
-			if (beaconSwfUrl)
-			{
-				ovvAssetSource = ovvAssetSource.replace(/BEACON_SWF_URL/g, beaconSwfUrl);
-			}
+                .replace(/OVVID/g, _id)
+                .replace(/INTERVAL/g, POLL_INTERVAL)
+                .replace(/OVVBUILDVERSION/g, _buildVersion)
+                .replace(/OVVRELEASEVERSION/g, RELEASE_VERSION);
+
+            if (beaconSwfUrl)
+            {
+                ovvAssetSource = ovvAssetSource.replace(/BEACON_SWF_URL/g, beaconSwfUrl);
+            }
             ExternalInterface.call("eval", ovvAssetSource);
         }


- added new hook method 'finishValidation' to UIObject

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


added schema str to validator

added schema str to validator

--- as3/xobjas3/src/com/rpath/xobj/XObjSchemaValidator.as
+++ as3/xobjas3/src/com/rpath/xobj/XObjSchemaValidator.as
@@ -40,6 +40,7 @@
     public var message:String;

     public var schemaXML:XML;
+    public var schemaStr:String;

     public function XObjSchemaValidator(schemaUrl:String=null)
     {
@@ -84,6 +85,7 @@
         if (schema)
         {
             schemaXML = schema.xml;
+            schemaStr = schema.xml.toString();

             //Add the loaded schema to the SchemaManager
             schemaManager.addSchema(schema);