Transferred from the Adobe Open Source Subversion Repository

Revision: 18195
Author:   doug.lee@ssbbartgroup.com
Date:     2010-10-18T17:36:36.597920Z

Log Message:
-----------
AccImpl and UIComponentAccProps updates to support Spark Form and form-related components.
Summary of changes:
	- The ASDoc description of how fields in a Form are named is updated to match the code, in that FormHeading text is only included in field names for fields inside a FormItem at this time.
	- Field naming rules applied to Spark components similarly as to MX components.
	- FormItem elements that are incorporated into the field name are not given MSAA objects of their own, to avoid redundancy.
	- tabIndex on FormHeading Label fixed to equal FormHeading tabIndex, so assistive technology can properly position the header among elements (this also affects MX FormHeadings).
	- AccImpl.updateFormItemString() renamed to determineFormItemString() to better reflect its purpose.
	- Some code is better commented.
	- Some spacing corrections.

QE notes:
Doc notes:
Bugs:
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: no

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

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

--- frameworks/projects/framework/src/mx/accessibility/AccImpl.as
+++ frameworks/projects/framework/src/mx/accessibility/AccImpl.as
@@ -95,7 +95,8 @@
  *   (childID 0).

  *
If the component is inside a Form:
  *

- *
If the Form has a FormHeading, the heading text is added.
+ *
If the Form has a FormHeading and the component is inside
+ *       a FormItem, the heading text is added.
  *       Developers wishing to avoid this should set the
  *       accessibilityName of the FormHeading
  *       to a space (" ").

@@ -213,7 +214,7 @@
 public class AccImpl extends AccessibilityImplementation
 {
     include "../core/Version.as";
-
+
     //--------------------------------------------------------------------------
     //
     //  Class methods
@@ -223,9 +224,9 @@
     /**
      *  @private
      *
-     *  Get the definition of a class, namespace, or function. The defintion is
+     *  Get the definition of a class, namespace, or function. The definition is
      *  obtained from the specified moduleFactory. If there is no moduleFactory,
-     *  then the definition of looked up in ApplicationDomain.currentDomain.
+     *  then the definition is looked up in ApplicationDomain.currentDomain.
      *
      *  @param name name of the class, namespace, or function to get.
      *  @param moduleFactory The moduleFactory that specifies the application
@@ -253,32 +254,193 @@
     }

     /**
-     *  Method for supporting state Accessibility.
+     *  @private
+     *  Data structure internal to the following getDefinitions() function:
+     *  These are the defined types and the classes they map to.
+     *  Structure of an entry: typeName: className, className, ...
+     *  Newest classes first in case this helps performance for newer code.
+     */
+    private static var typeMap:Object =
+    {
+        "Container": [
+            "spark.components.SkinnableContainer",
+            "mx.core.Container"
+        ],
+        "Form": [
+            "spark.components.Form",
+            "mx.containers.Form"
+        ],
+        "FormHeading": [
+            "spark.components.FormHeading",
+            "mx.containers.FormHeading"
+        ],
+        "FormItem": [
+            "spark.components.FormItem",
+            "mx.containers.FormItem"
+        ],
+        "FormItemLabel": [
+            // No Spark equivalent for this.
+            "mx.controls.FormItemLabel"
+        ],
+        "ScrollBar": [
+            "mx.controls.scrollClasses.ScrollBar",
+            "spark.components.supportClasses.ScrollBarBase"
+        ]
+    };
+
+    /**
+     *  @private
+     *
+     *  Get the class definition(s) corresponding to a predefined type. The
+     *  definitions are looked up in the specified moduleFactory. If no
+     *  moduleFactory is given, then the definitions are looked up in
+     *  ApplicationDomain.currentDomain.
+     *  The types are defined for this function by the above typeMap structure.
+     *
+     *  @param typeName Type of the class(es) to get.
+     *  Passing an invalid typeName will raise an error.
+     *  @param moduleFactory The moduleFactory that specifies the application
+     *  domain to use to find the definitions. If moduleFactory is null, then
+     *  ApplicationDomain.currentDomain is used as a fall back.
+     *
+     *  return The list of definitions found.
+     *
+     */
+    mx_internal static function getDefinitions(typeName:String, moduleFactory:IFlexModuleFactory):Array
+    {
+        var defs:Array = [];
+        var thisClass:Class;
+        for each (var className:String in typeMap[typeName])
+        {
+            thisClass = Class(getDefinition(className, moduleFactory));
+            if (thisClass)
+                defs.push(thisClass);
+        }
+        return defs;
+    }
+
+    /**
+     *  @private
+     *
+     *  Find out if an object is one of a set of classes, and return the
+     *  class if so.
+     *
+     *  @param obj Object to check against the list of classes.
+     *  @param classes List of classes to check against.
+     *
+     *  return The found class or null.
+     *
+     */
+    mx_internal static function getMatchingDefinition(obj:Object, classes:Array):Class
+    {
+        if (!obj)
+            return null;
+        for each (var thisClass:Class in classes)
+        {
+            if (obj is thisClass)
+                return thisClass;
+        }
+        return null;
+    }
+
+    /**
+    *  @private
+    *  Finds an ancestor of a component matching a rule.
+    *
+    *  @param component The component from which to start (included in the checking too).
+    *  @param f The function that returns true ffor a match.
+    *  The function should be defined as function (component:UIComponent):Boolean.
+    *
+    *  @return The UIComponent first matching the rule or null if none do.
+     */
+    mx_internal static function findMatchingAncestor(component:Object, f:Function):UIComponent
+    {
+        while (component && (component is UIComponent)
+               && !(component is ISystemManager) && component != UIComponent(component).root)
+        {
+            if (f(component))
+                return UIComponent(component);
+            component = UIComponent(component).parent;
+        }
+        return null;
+    }
+
+    /**
      *  Returns true if an ancestor of the component has enabled set to false.
+     *  The given component itself is not checked.
+     *
+     *  @param component The UIComponent to check for a disabled ancestor.
+     *
+     *  @return true if the component has a disabled ancestor.
      */
     public static function isAncestorDisabled(component:UIComponent):Boolean
     {
-        // keeping this DisplayObjectContainer since parent returns
-        // that as root is not a UIComponent.
-        var par:DisplayObjectContainer = component.parent;
-
-        // continue looking up the parent chain
-        // until a disabled UIComponent is found
-        // stopping at the root or system manager
-        while (par && (par is UIComponent && UIComponent(par).enabled) &&
-               !(par is ISystemManager) && par != component.root)
-        {
-            par = par.parent;
-        }
-
-        if (!(par is UIComponent))
-            return false;
-
-        return !UIComponent(par).enabled;
-    }
-
+        return findMatchingAncestor(component.parent, isComponentDisabled) != null;
+    }
+
+    /**
+     *  @private
+     *  Check if a component is disabled.
+     *  Used in calls to findMatchingAncestor().
+     *
+     *  @param component The UIComponent to check.
+     *
+     *  @return true if the component is disabled.
+     */
+    mx_internal static function isComponentDisabled(component:UIComponent):Boolean
+    {
+        return !component.enabled;
+    }
+
+    /**
+     *  @private
+     *  Check if a component is a form..
+     *  Used in calls to findMatchingAncestor().
+     *
+     *  @param component The UIComponent to check.
+     *
+     *  @return true if the component is a form..
+     */
+    mx_internal static function isForm(component:UIComponent):Boolean
+    {
+        var formClasses:Array = getDefinitions("Form", component.moduleFactory);
+        return getMatchingDefinition(component, formClasses) != null;
+    }
+
+    /**
+     *  @private
+     *  Check if a component is a form heading.
+     *  Used in calls to findMatchingAncestor().
+     *
+     *  @param component The UIComponent to check.
+     *
+     *  @return true if the component is a form heading.
+     */
+        mx_internal static function isFormHeading(component:UIComponent):Boolean
+        {
+            var formHeadingClasses:Array = getDefinitions("FormHeading", component.moduleFactory);
+        return getMatchingDefinition(component, formHeadingClasses) != null;
+        }
+
+    /**
+     *  @private
+     *  Check if a component is a form item (meaning a FormItem class).
+     *  Used in calls to findMatchingAncestor().
+     *
+     *  @param component The UIComponent to check.
+     *
+     *  @return true if the component is a FormItem.
+     */
+    mx_internal static function isFormItem(component:UIComponent):Boolean
+    {
+        var formItemClasses:Array = getDefinitions("FormItem", component.moduleFactory);
+        return getMatchingDefinition(component, formItemClasses) != null;
+    }
+
     /**
      *  Method for supporting Form Accessibility.
+     *  Called from get_accName() in this AccImpl class.
+     *  Also called from the UIComponentAccProps constructor.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -287,30 +449,17 @@
      */
     public static function getFormName(component:UIComponent):String
     {
-        var formName:String = "";
-
         // Return nothing if we are a container
-        var containerClass:Class = Class(getDefinition("mx.core.Container", component.moduleFactory));
-        if (containerClass && component is containerClass)
-            return formName;
-
-        // keeping this DisplayObjectContainer since parent returns
-        // that as root is not a UIComponent.
-        var formItemClass:Class = Class(getDefinition("mx.containers.FormItem", component.moduleFactory));
-        var par:DisplayObjectContainer = component.parent;
-
-        // continue looking up the parent chain
-        // until a FormItem is found
-        // stopping at the root or system manager
-        while (par && !(formItemClass && par is formItemClass) &&
-               !(par is ISystemManager) && par != component.root)
-        {
-            par = par.parent;
-        }
-
-        if (par && formItemClass && par is formItemClass)
-            formName = updateFormItemString(par);
-
+        if (getMatchingDefinition(component, getDefinitions("Container", component.moduleFactory)))
+            return "";
+
+        // Return nothing if we are not in a FormItem.
+        var formItem:UIComponent = findMatchingAncestor(component.parent, isFormItem);
+        if (!formItem)
+            return "";
+
+        // We're under a FormItem, so return the appropriate name for it.
+        var formName:String = determineFormItemString(formItem);
         return formName;
     }

@@ -335,29 +484,43 @@

     /**
      *  @private
-     *  Method for supporting Form Accessibility.
+     *  Determine the string to be used as the part of a form field's name
+     *  that represents the FormItem the field is in.
+     *  TODO:  This function has the side effect of setting
+     *  accessibilityEnabled=false on one or more subparts of formItems that
+     *  need this.
+     *  Called from getFormName(), which is called from get_accName() and
+     *   from the UIComponentAccProps constructor.
      *
      *  @param formItem Object of type FormItem. Object is used here to avoid
      *  linking in FormItem.
      */
-    private static function updateFormItemString(formItem:Object):String
+    private static function determineFormItemString(formItem:Object):String
     {
         var formName:String = "";
         var resourceManager:IResourceManager = ResourceManager.getInstance();
-
-        var formClass:Class = Class(getDefinition("mx.containers.Form", formItem.moduleFactory));
-        var form:UIComponent = UIComponent(formItem.parent);
-
-        // If we are located within a Form, then look for the first FormHeading
-        // that is a sibling that is above us in the parent's child hierarchy
-        if (formClass && form is formClass)
-        {
-            var formHeadingClass:Class = Class(getDefinition("mx.containers.FormHeading", formItem.moduleFactory));
-            var formItemIndex:int = form.getChildIndex(DisplayObject(formItem));
+
+        // FormHeadings are sought as direct children of this formItem's parent.
+        var formItemParent:UIComponent = UIComponent(formItem.parent);
+
+        // Figure out if we're in a Form first.
+        // As of Spark, the formItem parent itself may not be a Form class but
+        // may still descend from it.
+        if (findMatchingAncestor(formItemParent, isForm))
+        {
+            // If we are located within a Form, then look for the most
+            // recent FormHeading that is a sibling of this FormItem.
+            // TODO: More complex form layouts may be possible in
+            // which a heading is not a sibling of all of its
+            // FormItems.  For these, the heading will be omitted from
+            // the field name at this time.
+            var formHeadingClasses:Array = getDefinitions("FormHeading", formItem.moduleFactory);
+            var formItemIndex:int = formItemParent.getChildIndex(DisplayObject(formItem));
             for (var i:int = formItemIndex; i >= 0; i--)
             {
-                var child:UIComponent = UIComponent(form.getChildAt(i));
-                if (formHeadingClass && child is formHeadingClass)
+                var child:UIComponent = UIComponent(formItemParent.getChildAt(i));
+                var formHeadingClass:Class = getMatchingDefinition(child, formHeadingClasses);
+                if (formHeadingClass)
                 {
                     // Accessible name if it exists, else label text.
                     if (formHeadingClass(child).accessibilityProperties)
@@ -379,21 +542,101 @@
         // Accessible name if it exists, else label text.
         var f:String = "";
         if (formItem.accessibilityProperties)
-        {
             f = formItem.accessibilityProperties.name
-            // The purpose of the following two lines is to
-            // make the FormItem "silent" so that its MSAA Name doesn't get
-            // spoken. It doesn't need to be spoken since the Name of each
-            // control inside the FormItem includes the FormItem's Name.
+        if (f == "")
+            f = formItem.label;
+        formName = joinWithSpace(formName, f);
+
+        // The purpose of the following lines is to
+        // make parts of this FormItem silent when they are
+        // incorporated into the field name.
+        // First try Spark skin parts that should be silent.
+        try
+        {
+            if (formItem.labelDisplay && formItem.labelDisplay.accessibilityEnabled)
+                formItem.labelDisplay.accessibilityEnabled = false;
+        }
+        catch (e:Error)
+        {
+        }
+        try
+        {
+            if (formItem.sequenceLabelDisplay && formItem.sequenceLabelDisplay.accessibilityEnabled)
+                formItem.sequenceLabelDisplay.accessibilityEnabled = false;
+        }
+        catch (e:Error)
+        {
+        }
+        try
+        {
+            if (formItem.helpContentGroup && formItem.helpContentGroup.accessibilityEnabled)
+                formItem.helpContentGroup.accessibilityEnabled = false;
+        }
+        catch (e:Error)
+        {
+        }
+        try
+        {
+            if (formItem.errorTextDisplay && formItem.errorTextDisplay.accessibilityEnabled)
+                formItem.errorTextDisplay.accessibilityEnabled = false;
+        }
+        catch (e:Error)
+        {
+        }
+        // Then one MX item that should be silent.
+        try
+        {
             if (formItem.itemLabel && formItem.itemLabel.accessibilityEnabled)
                 formItem.itemLabel.accessibilityEnabled = false;
         }
-        if (f == "")
-            f = formItem.label;
+        catch (e:Error)
+        {
+        }

-        formName = joinWithSpace(formName, f);
-
         return formName;
+    }
+
+    /**
+     *  @private
+     *  Determine whether a component is a SkinnableTextBase component whose
+     *  accessibilityProperties are duplicated for a parent within the
+     *  same control.
+     *
+     *  @param component The component to check.
+     *
+     *  @return true if the component meets the described condition..
+     */
+    private static function componentNeedsSkinnableTextBaseException(component:UIComponent):Boolean
+    {
+        // No accessibilityProperties, nothing to look for.
+        var myAccessibilityProperties:Object = component.accessibilityProperties;
+        if (!myAccessibilityProperties)
+            return false;
+
+        // If the classes we're looking for don't exist, don't bother scanning.
+        var richEditableTextClass:Class = Class(getDefinition(
+            "spark.components.RichEditableText",
+            component.moduleFactory
+        ));
+        if (!richEditableTextClass || !(component is richEditableTextClass))
+            return false;
+        var skinnableTextBaseClass:Class = Class(getDefinition(
+            "spark.components.supportClasses.SkinnableTextBase",
+            component.moduleFactory
+        ));
+        if (!skinnableTextBaseClass)
+            return false;
+
+        // An anonymous function is needed here because it needs to know
+        // which accessibilityProperties object to check against.
+        var sharesMyAccessibilityProperties:Function = function(c:UIComponent):Boolean
+        {
+            return c.accessibilityProperties === myAccessibilityProperties;
+        };
+        var matchingAncestor:UIComponent = findMatchingAncestor(component.parent, sharesMyAccessibilityProperties)
+        if (!matchingAncestor)
+            return false;
+        return matchingAncestor is skinnableTextBaseClass;
     }

     //--------------------------------------------------------------------------
@@ -535,9 +778,10 @@
         accName = getFormName(master);

         // Now the component's name or toolTip.
-        if (master.accessibilityProperties &&
-            master.accessibilityProperties.name != null &&
-            master.accessibilityProperties.name != "")
+        if (master.accessibilityProperties &&
+            master.accessibilityProperties.name != null &&
+            master.accessibilityProperties.name != "" &&
+            !componentNeedsSkinnableTextBaseException(master))
         {
             // An accName is set, so use only that.
             accName = joinWithSpace(accName, master.accessibilityProperties.name);
@@ -549,7 +793,7 @@
         }

         accName = joinWithSpace(accName, getStatusName());
-
+
         // Historical: Return null and not "" for empty and null values.
         return (accName != null && accName != "") ? accName : null;
     }
@@ -620,8 +864,8 @@
             accState |= AccConst.STATE_SYSTEM_FOCUSABLE

             // This sets STATE_SYSTEM_FOCUSED appropriately for simple components
-			// and top levels of complex ones, but not for any subparts.
-			// That has to be done in the component's get_accState() method.
+            // and top levels of complex ones, but not for any subparts.
+            // That has to be done in the component's get_accState() method.
             // example: listItems in a list.
             if (UIComponent(master) == UIComponent(master).getFocus()
             && childID == 0)


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/components/PopUpAnchor.as
+++ frameworks/projects/spark/src/spark/components/PopUpAnchor.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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: 11250
Author:   rfrishbe@adobe.com
Date:     2009-10-29T00:07:19.506725Z

Log Message:
-----------
Fixing proxy pattern bug in VideoPlayer.  I tried to save a few extra bytes by not keeping around an extra object, but I made a mistake with this code.  It seems better just to follow the typical pattern and not worry about this extra savings, which probably cost more in code-size anyways.

Also changing VideoPlayer.thumbnailSource to mx_internal, rather than public.  In VideoElement it's mx_internal, and that's what it should be here too.

QE notes: -
Doc notes: -
Bugs: SDK-23665
Reviewer: Deepa
Tests run: checkintests, mustella VideoPlayer
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -658,7 +658,7 @@
      *  videoElementProperties stores booleans as to whether these properties
      *  have been explicitely set or not.
      */
-    private var videoElementProperties:Object;
+    private var videoElementProperties:Object = {};

     //--------------------------------------------------------------------------
     //
@@ -740,13 +740,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                                                         AUTO_PLAY_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.autoPlay = value;
-        }
-        else
-        {
-            videoElementProperties = {autoPlay: value};
         }
     }

@@ -788,13 +784,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                                                         AUTO_REWIND_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.autoRewind = value;
-        }
-        else
-        {
-            videoElementProperties = {autoRewind: value};
         }
     }

@@ -836,13 +828,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                 LOOP_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.loop = value;
-        }
-        else
-        {
-            videoElementProperties = {loop: value};
         }
     }

@@ -884,13 +872,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                                                         MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.maintainAspectRatio = value;
-        }
-        else
-        {
-            videoElementProperties = {maintainAspectRatio: value};
         }
     }

@@ -933,13 +917,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                                                         MUTED_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.muted = value;
-        }
-        else
-        {
-            videoElementProperties = {muted: value};
         }

         if (volumeBar)
@@ -1032,13 +1012,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                 PLAY_WHEN_HIDDEN_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.playWhenHidden = value;
-        }
-        else
-        {
-            videoElementProperties = {playWhenHidden: value};
         }
     }

@@ -1081,13 +1057,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                                                         SOURCE_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.source = value;
-        }
-        else
-        {
-            videoElementProperties = {source: value};
         }
     }

@@ -1106,7 +1078,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function get thumbnailSource():Object
+    mx_internal function get thumbnailSource():Object
     {
         if (videoElement)
         {
@@ -1122,7 +1094,7 @@
     /**
      * @private
      */
-    public function set thumbnailSource(value:Object):void
+    mx_internal function set thumbnailSource(value:Object):void
     {
         if (videoElement)
         {
@@ -1130,13 +1102,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                 THUMBNAIL_SOURCE_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.thumbnailSource = value;
-        }
-        else
-        {
-            videoElementProperties = {thumbnailSource: value};
         }
     }

@@ -1204,13 +1172,9 @@
             videoElementProperties = BitFlagUtil.update(videoElementProperties as uint,
                                                         VOLUME_PROPERTY_FLAG, true);
         }
-        else if (videoElementProperties)
+        else
         {
             videoElementProperties.volume = value;
-        }
-        else
-        {
-            videoElementProperties = {volume: value};
         }
     }

@@ -1321,86 +1285,84 @@

             var newVideoProperties:uint = 0;

-            if (videoElementProperties)
+
+            if (videoElementProperties.source !== undefined)
             {
-                if (videoElementProperties.source !== undefined)
-                {
-                    videoElement.source = videoElementProperties.source;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                            SOURCE_PROPERTY_FLAG, true);
-                }
+                videoElement.source = videoElementProperties.source;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                                                        SOURCE_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.autoPlay !== undefined)
+            {
+                videoElement.autoPlay = videoElementProperties.autoPlay;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                                                        AUTO_PLAY_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.volume !== undefined)
+            {
+                videoElement.volume = videoElementProperties.volume;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                                                        VOLUME_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.autoRewind !== undefined)
+            {
+                videoElement.autoRewind = videoElementProperties.autoRewind;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                                                        AUTO_REWIND_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.loop !== undefined)
+            {
+                videoElement.loop = videoElementProperties.loop;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                    LOOP_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.maintainAspectRatio !== undefined)
+            {
+                videoElement.maintainAspectRatio = videoElementProperties.maintainAspectRatio;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                                                        MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.muted !== undefined)
+            {
+                videoElement.muted = videoElementProperties.muted;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                                                        MUTED_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.playWhenHidden !== undefined)
+            {
+                videoElement.playWhenHidden = videoElementProperties.playWhenHidden;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                    PLAY_WHEN_HIDDEN_PROPERTY_FLAG, true);
+            }
+
+            if (videoElementProperties.thumbnailSource !== undefined)
+            {
+                videoElement.thumbnailSource = videoElementProperties.thumbnailSource;
+                newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
+                    THUMBNAIL_SOURCE_PROPERTY_FLAG, true);
+            }
+
+            // these are state properties just carried over from an old video element
+            if (videoElementProperties.playheadTime !== undefined ||
+                videoElementProperties.playing !== undefined)
+            {
+                videoElement_updateCompleteHandlerProperties = {
+                    autoPlay: videoElement.autoPlay,
+                    playing: videoElementProperties.playing,
+                    playheadTime: videoElementProperties.playheadTime};

-                if (videoElementProperties.autoPlay !== undefined)
-                {
-                    videoElement.autoPlay = videoElementProperties.autoPlay;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                            AUTO_PLAY_PROPERTY_FLAG, true);
-                }
+                // so the videoElement doesn't start playing...we'll handle it instead in
+                // videoElement_updateCompleteHandler
+                videoElement.autoPlay = false;

-                if (videoElementProperties.volume !== undefined)
-                {
-                    videoElement.volume = videoElementProperties.volume;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                            VOLUME_PROPERTY_FLAG, true);
-                }
-
-                if (videoElementProperties.autoRewind !== undefined)
-                {
-                    videoElement.autoRewind = videoElementProperties.autoRewind;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                            AUTO_REWIND_PROPERTY_FLAG, true);
-                }
-
-                if (videoElementProperties.loop !== undefined)
-                {
-                    videoElement.loop = videoElementProperties.loop;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                        LOOP_PROPERTY_FLAG, true);
-                }
-
-                if (videoElementProperties.maintainAspectRatio !== undefined)
-                {
-                    videoElement.maintainAspectRatio = videoElementProperties.maintainAspectRatio;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                            MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG, true);
-                }
-
-                if (videoElementProperties.muted !== undefined)
-                {
-                    videoElement.muted = videoElementProperties.muted;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                                                            MUTED_PROPERTY_FLAG, true);
-                }
-
-                if (videoElementProperties.playWhenHidden !== undefined)
-                {
-                    videoElement.playWhenHidden = videoElementProperties.playWhenHidden;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                        PLAY_WHEN_HIDDEN_PROPERTY_FLAG, true);
-                }
-
-                if (videoElementProperties.thumbnailSource !== undefined)
-                {
-                    videoElement.thumbnailSource = videoElementProperties.thumbnailSource;
-                    newVideoProperties = BitFlagUtil.update(newVideoProperties as uint,
-                        THUMBNAIL_SOURCE_PROPERTY_FLAG, true);
-                }
-
-                // these are state properties just carried over from an old video element
-                if (videoElementProperties.playheadTime !== undefined ||
-                    videoElementProperties.playing !== undefined)
-                {
-                    videoElement_updateCompleteHandlerProperties = {
-                        autoPlay: videoElement.autoPlay,
-                        playing: videoElementProperties.playing,
-                        playheadTime: videoElementProperties.playheadTime};
-
-                    // so the videoElement doesn't start playing...we'll handle it instead in
-                    // videoElement_updateCompleteHandler
-                    videoElement.autoPlay = false;
-
-                    videoElement.addEventListener(FlexEvent.UPDATE_COMPLETE, videoElement_updateCompleteHandler);
-                }
+                videoElement.addEventListener(FlexEvent.UPDATE_COMPLETE, videoElement_updateCompleteHandler);
             }

             videoElementProperties = newVideoProperties;
@@ -1539,61 +1501,33 @@
             // copy proxied values from video (if explicitely set) to videoProperties

             var newVideoProperties:Object = {};
-            var propertySet:Boolean = false;

             if (BitFlagUtil.isSet(videoElementProperties as uint, SOURCE_PROPERTY_FLAG))
-            {
                 newVideoProperties.source = videoElement.source;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, AUTO_PLAY_PROPERTY_FLAG))
-            {
                 newVideoProperties.autoPlay = videoElement.autoPlay;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, VOLUME_PROPERTY_FLAG))
-            {
                 newVideoProperties.volume = videoElement.volume;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, AUTO_REWIND_PROPERTY_FLAG))
-            {
                 newVideoProperties.autoRewind = videoElement.autoRewind;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, LOOP_PROPERTY_FLAG))
-            {
                 newVideoProperties.loop = videoElement.loop;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, MAINTAIN_ASPECT_RATIO_PROPERTY_FLAG))
-            {
                 newVideoProperties.maintainAspectRatio = videoElement.maintainAspectRatio;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, MUTED_PROPERTY_FLAG))
-            {
                 newVideoProperties.muted = videoElement.muted;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, PLAY_WHEN_HIDDEN_PROPERTY_FLAG))
-            {
                 newVideoProperties.playWhenHidden = videoElement.playWhenHidden;
-                propertySet = true;
-            }

             if (BitFlagUtil.isSet(videoElementProperties as uint, THUMBNAIL_SOURCE_PROPERTY_FLAG))
-            {
                 newVideoProperties.thumbnailSource = videoElement.thumbnailSource;
-                propertySet = true;
-            }

             // push our current state (where we were in the video and whether we were playing)
             // so that the new skin gets these as well
@@ -1602,8 +1536,7 @@

             videoElement.stop();

-            if (propertySet)
-                videoElementProperties = newVideoProperties;
+            videoElementProperties = newVideoProperties;

             videoElement.removeEventListener(spark.events.VideoEvent.CLOSE, dispatchEvent);
             videoElement.removeEventListener(spark.events.VideoEvent.COMPLETE, videoElement_completeHandler);


Transferred from the Adobe Open Source Subversion Repository

Revision: 8318
Author:   srahim@adobe.com
Date:     2009-06-26T18:15:33.860209Z

Log Message:
-----------
ASDoc updates

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

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

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -321,13 +321,51 @@
 [IconFile("VideoPlayer.png")]

 /**
- *  The VideoPlayer class is skinnable video player that supports
+ *  The VideoPlayer control is a skinnable video player that supports
  *  progressive download, multi-bitrate streaming, and streaming video.
+ *  It supports playback of FLV and F4v files. The VideoPlayer control
+ *  contains a full-featured UI for controlling video playback.
  *
  *
VideoElement is the chromeless version.

  *
  *  @see spark.primitives.VideoElement
  *  @see spark.skins.spark.VideoPlayerSkin
+ *  @see spark.skins.spark.mediaClasses.FullScreenButtonSkin
+ *  @see spark.skins.spark.mediaClasses.MuteButtonSkin
+ *  @see spark.skins.spark.mediaClasses.PlayPauseButtonSkin
+ *  @see spark.skins.spark.mediaClasses.ScrubBarSkin
+ *  @see spark.skins.spark.mediaClasses.ScrubBarThumbSkin
+ *  @see spark.skins.spark.mediaClasses.ScrubBarTrackSkin
+ *  @see spark.skins.spark.mediaClasses.VolumeBarSkin
+ *  @see spark.skins.spark.mediaClasses.VolumeBarThumbSkin
+ *  @see spark.skins.spark.mediaClasses.VolumeBarTrackSkin
+ *
+ *  @mxml
+ *
+ *
The <VideoPlayer> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <VideoPlayer
+
+ *    Properties
+ *    autoPlay="true"
+ *    autoRewind="false"
+ *    enabled=""
+ *    maintainAspectRatio="No default"
+ *    muted="false"
+ *    source=""
+ *    volume=".75"
+ *
+ *    Events
+ *    close="No default"
+ *    complete="No default"
+ *    metadataReceived="No default"
+ *    playheadUpdate="No default"
+ *    progress="No default"
+ *    ready="No default"
+ *  />
+ *

  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -427,7 +465,7 @@
     [SkinPart(required="false")]

     /**
-     *  An optional skin part for a fullScreen button.
+     *  An optional skin part for a button to toggle fullscreen mode.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -477,9 +515,9 @@
     [SkinPart(required="false")]

     /**
-     *  An optional skin part for all of the player controls.  We
-     *  need this skin part to know what to hide when in full screen
-     *  mode and there's been no user-interaction.
+     *  An optional skin part for all of the player controls.
+     *  This skin is used to determine what to hide when the player is in full screen
+     *  mode and there has been no user interaction.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -588,15 +626,15 @@
     //----------------------------------

     /**
-     *  @inheritDoc
+     *
      *
-     *
Setting enabled to false disables the UI and
+     *  Setting enabled to false disables the UI and
      *  pauses the video if it was currently playing.  Re-enabling the component
      *  does not cause the video to continue playing again; you must
-     *  explicitly call play().

+     *  explicitly call play().
      *
      *
Even though the component is initially paused while disabled,
-     *  if you would like to play the video or perform some other action
+     *  if you want to play the video or perform some other action
      *  while disabled, you may still do so through method calls, like
      *  play().

      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package mx.automation.codec
 {


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

--- frameworks/projects/framework/src/mx/containers/utilityClasses/ConstraintRow.as
+++ frameworks/projects/framework/src/mx/containers/utilityClasses/ConstraintRow.as
@@ -0,0 +1,396 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.containers.utilityClasses
+{
+
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+import mx.core.IInvalidating;
+import mx.core.mx_internal;
+import mx.core.IMXMLObject;
+import flash.events.EventDispatcher;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+[Exclude(name="container", kind="property")]
+
+/**
+ *  ConstraintRow class partitions an absolutely
+ *  positioned container in the horizontal plane.
+ *
+ *  ConstraintRow instances have 3 sizing options: fixed, percentage,
+ *  and content. These options dictate the position of the constraint row,
+ *  the amount of space the constraint row takes in the container, and
+ *  how the constraint row deals with a change in the size of the container.
+ */
+public class ConstraintRow extends EventDispatcher implements IMXMLObject
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function ConstraintRow()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+	mx_internal var contentSize:Boolean = false;
+
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+    //  container
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _container:IInvalidating;
+
+    /**
+     *  The container being partitioned by this ConstraintRow instance.
+     */
+    public function get container():IInvalidating
+    {
+        return _container;
+    }
+
+    /**
+     *  @private
+     */
+    public function set container(value:IInvalidating):void
+    {
+        _container = value;
+    }
+
+	//----------------------------------
+    //  height
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the height property.
+     */
+    mx_internal var _height:Number;
+	[Bindable("heightChanged")]
+    [Inspectable(category="General")]
+    [PercentProxy("percentHeight")]
+
+    /**
+     *  Number that specifies the height of the ConstraintRow instance, in pixels,
+     *  in the parent's coordinates.
+     *
+     */
+    public function get height():Number
+    {
+        return _height;
+    }
+
+    /**
+     *  @private
+     */
+    public function set height(value:Number):void
+    {
+		if (explicitHeight != value)
+    	{
+    		explicitHeight = value;
+    		if (_height != value)
+    		{
+    			_height = value;
+    			if (container)
+    			{
+    				container.invalidateSize();
+    				container.invalidateDisplayList();
+    			}
+    			dispatchEvent(new Event("heightChanged"));
+    		}
+    	}
+    }
+
+	//----------------------------------
+    //  explicitHeight
+    //----------------------------------
+    /**
+     *  @private
+     *  Storage for the explicitHeight property.
+     */
+
+    private var _explicitHeight:Number;
+    [Inspectable(environment="none")]
+    [Bindable("explicitHeightChanged")]
+
+    /**
+     *  Number that specifies the explicit height of the
+     *  ConstraintRow instance, in pixels, in the ConstraintRow
+     *  instance's coordinates.
+     *
+     */
+    public function get explicitHeight():Number
+    {
+    	return _explicitHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set explicitHeight(value:Number):void
+    {
+    	if (_explicitHeight == value)
+            return;
+
+        // height can be pixel or percent not both
+        if (!isNaN(value))
+            _percentHeight = NaN;
+
+        _explicitHeight = value;
+
+        if (container)
+        {
+        	container.invalidateSize();
+        	container.invalidateDisplayList();
+        }
+
+        dispatchEvent(new Event("explicitHeightChanged"));
+    }
+
+	//----------------------------------
+    //  id
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _id:String;
+
+    /**
+     *  ID of the ConstraintRow instance. This value becomes the instance name
+     *  of the constraint row and should not contain white space or special
+     *  characters.
+     */
+    public function get id():String
+    {
+        return _id;
+    }
+
+    /**
+     *  @private
+     */
+    public function set id(value:String):void
+    {
+        _id = value;
+    }
+
+    //----------------------------------
+    //  maxHeight
+    //----------------------------------
+    /**
+     *  @private
+     *  Storage for the maxHeight property.
+     */
+    private var _explicitMaxHeight:Number;
+	[Bindable("maxHeightChanged")]
+    [Inspectable(category="Size", defaultValue="10000")]
+
+    /**
+     *  Number that specifies the maximum height of the ConstraintRow instance,
+     *  in pixels, in the ConstraintRow instance's coordinates.
+     *
+     */
+    public function get maxHeight():Number
+    {
+        return _explicitMaxHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set maxHeight(value:Number):void
+    {
+    	if (_explicitMaxHeight != value)
+    	{
+            _explicitMaxHeight = value;
+			if (container)
+			{
+            	container.invalidateSize();
+   				container.invalidateDisplayList();
+   			}
+   			dispatchEvent(new Event("maxHeightChanged"));
+    	}
+    }
+
+    //----------------------------------
+    //  minHeight
+    //----------------------------------
+    /**
+     *  @private
+     *  Storage for the minHeight property.
+     */
+    private var _explicitMinHeight:Number;
+	[Bindable("minHeightChanged")]
+    [Inspectable(category="Size", defaultValue="0")]
+
+    /**
+     *  Number that specifies the minimum height of the ConstraintRow instance,
+     *  in pixels, in the ConstraintRow instance's coordinates.
+     *
+     */
+    public function get minHeight():Number
+    {
+        return _explicitMinHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set minHeight(value:Number):void
+    {
+    	if (_explicitMinHeight != value)
+    	{
+            _explicitMinHeight = value;
+         	if (container)
+			{
+            	container.invalidateSize();
+   				container.invalidateDisplayList();
+   			}
+			dispatchEvent(new Event("minHeightChanged"));
+    	}
+    }
+
+    //----------------------------------
+    //  percentHeight
+    //----------------------------------
+    /**
+     *  @private
+     *  Storage for the percentHeight property.
+     */
+    private var _percentHeight:Number;
+    [Bindable("percentHeightChanged")]
+    [Inspectable(environment="none")]
+
+    /**
+     *  Number that specifies the height of a component as a percentage
+     *  of its parent's size. Allowed values are 0-100. The default value is NaN.
+     *  Setting the width property resets this property to NaN.
+     */
+    public function get percentHeight():Number
+    {
+        return _percentHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set percentHeight(value:Number):void
+    {
+        if (_percentHeight == value)
+            return;
+
+        if (!isNaN(value))
+            _explicitHeight = NaN;
+
+        _percentHeight = value;
+
+        if (container)
+        {
+        	container.invalidateSize();
+        	container.invalidateDisplayList();
+        }
+    }
+
+    //----------------------------------
+    //  y
+    //----------------------------------
+	private var _y:Number;
+	[Bindable("yChanged")]
+
+    /**
+	 *  @private
+     */
+    public function get y():Number
+    {
+        return _y;
+    }
+
+    /**
+     *  @private
+     */
+    public function set y(value:Number):void
+    {
+        if (value != _y)
+        {
+        	_y = value;
+        	dispatchEvent(new Event("yChanged"));
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods: IMXMLObject
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+      *  Called automatically by the MXML compiler when the ConstraintRow
+      *  instance is created using an MXML tag.
+      *  If you create the constraint row through ActionScript, you
+      *  must call this method passing in the MXML document and
+      *  null for the id.
+      *
+      *  @param document The MXML document containing this ConstraintRow.
+      *
+      *  @param id Ignored.
+      */
+    public function initialized(document:Object, id:String):void
+    {
+		this.id = id;
+		if (!this.height && !this.percentHeight)
+			mx_internal::contentSize = true;
+    }
+
+    /**
+     *  Sizes the ConstraintRow
+     *
+     *  @param height Height of constaint row computed during parent container
+     *  processing.
+     */
+    public function setActualHeight(h:Number):void
+    {
+        if (_height != h)
+        {
+            _height = h;
+            dispatchEvent(new Event("heightChanged"));
+        }
+    }
+
+}
+
+}


implement equalable

implement equalable

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

--- src/as/com/threerings/util/Line.as
+++ src/as/com/threerings/util/Line.as
@@ -27,7 +27,7 @@
 /**
  * Merely a typed container for two Points.
  */
-public class Line
+public class Line implements Equalable
 {
     public static const INTERSECTION_NORTH :int = 1;
     public static const INTERSECTION_SOUTH :int = 2;
@@ -85,5 +85,30 @@
             return DOES_NOT_INTERSECT;
         }
     }
+
+    // from interface Equalable
+    public function equals (o :Object) :Boolean
+    {
+        var other :Line = o as Line;
+        if (other == null) {
+            return false;
+        }
+
+        if (start == null || other.start == null) {
+            if (start != other.start) {
+                // not both null
+                return false;
+            }
+        }
+        if (stop == null || other.stop == null) {
+            if (stop != other.stop) {
+                // not both null
+                return false;
+            }
+        }
+
+        return (start == null || start.equals(other.start)) &&
+               (stop == null || stop.equals(other.stop));
+    }
 }
 }


fix DrawCall.depth update by making sure the reference to localToWorld and worldToScreen are init. directly from the bindings if available when DrawCall.setBindings() is called

--- src/aerys/minko/render/DrawCall.as
+++ src/aerys/minko/render/DrawCall.as
@@ -268,10 +268,12 @@

 			if (computeDepth)
 			{
-//				_worldToScreen = sceneBindings.getProperty('worldToScreen') as Matrix4x4;
-//				_localToWorld = meshBindings.getProperty('localToWorld') as Matrix4x4;
-
+                if (sceneBindings.propertyExists('worldToScreen'))
+                    _worldToScreen = sceneBindings.getProperty('worldToScreen');
 				sceneBindings.addCallback('worldToScreen', transformChangedHandler);
+
+                if (meshBindings.propertyExists('localToWorld'))
+                    _localToWorld = meshBindings.getProperty('localToWorld');
 				meshBindings.addCallback('localToWorld', transformChangedHandler);

 				_invalidDepth = true;


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

--- frameworks/projects/framework/src/mx/effects/Tween.as
+++ frameworks/projects/framework/src/mx/effects/Tween.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: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/utils/RPCStringUtil.as
+++ frameworks/projects/rpc/src/mx/utils/RPCStringUtil.as
@@ -15,6 +15,11 @@
 /**
  *  The RPCStringUtil class is a subset of StringUtil, removing methods
  *  that create dependency issues when RPC messages are in a bootstrap loader.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class RPCStringUtil
 {
@@ -34,6 +39,11 @@
      *
      *  @return Updated String where whitespace was removed from the
      *  beginning and end.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function trim(str:String):String
     {
@@ -63,6 +73,11 @@
      *
      *  @return Updated String where whitespace was removed from the
      *  beginning and end of each element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function trimArrayElements(value:String, delimiter:String):String
     {
@@ -93,6 +108,11 @@
      *
      *  @return true if the specified string is
      *  a single space, tab, carriage return, newline, or formfeed character.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function isWhitespace(character:String):Boolean
     {
@@ -144,6 +164,11 @@
      *
      *  // this will output the following string:
      *  // "here is some info '15.4' and true"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function substitute(str:String, ... rest):String
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4380
Author:   rfrishbe@adobe.com
Date:     2008-12-23T10:00:21.848800Z

Log Message:
-----------
Mostly rename changes in Group and FxContainer.

1.  GraphicElement.elementHost:GroupBase -> GraphicElement.parent:DisplayObjectContainer (parent already exists in the current code-base...I’m just removing elementHost now)

2.  Group content APIs now use “element” instead of “item.”  The new methods were added a while ago, but the old ones co-existed.  These particular changes remove the old methods and strongly type the new ones to deal with IVisualElements rather than Objects.  Here are the overall changes:

numItems:int -> numElements:int
getItemAt(int):Object -> getElementAt(int):IVisualElement
addItem(Object):Object -> addElement(IVisualElement):IVisualElement
addItemAt(Object, int):Object -> addElementAt(IVisualElement, int):IVisualElement
removeItem(Object):Object -> removeElement(IVisualElement):IVisualElement
removeItemAt(int):Object -> removeElementAt(int):IVisualElement
getItemIndex(Object):int -> getElementIndex(IVisualElement):int
setItemIndex(Object, int):void -> setElementIndex(IVisualElement, int):void
swapItems(Object, Object):void -> swapElements(IVisualElement, IVisualElement):void
swapItemsAt(int, int):void -> swapElementsAt(int, int):void

3.  Group and FxContainer's mxmlContent property is now strongly typed as an Array of IVisualElements instead of an Object

4.  Removing ITransformable...there's no need for it.

5.  Had to update Mustella for these changes (the Perforce changes are checked in, and here's the mustella.swc change for checkintests)

QE Notes: Joan and Steve worked with me on changing all the SDK QA tests.
Doc Notes: None
Bugs: SDK-18063
Reviewer: Jason
tests: checkintests, Mustella FxContainer, Group, and DataGroup (Joan ran all tests on an earlier version of these changes, so hopefully nothing broke in the meantime).  Some of the Group/DataGroup ones were failing for me, but I'm pretty sure they're all excluded (tests don't seem to exclude for me when I VPN in...)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/ITransformable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/flex4/flex4test_testScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/testWheel.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/wireframe/FxDefaultComplexItemRenderer.mxml</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/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElementContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultComplexItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/core/IViewport.as
+++ frameworks/projects/spark/src/spark/core/IViewport.as
@@ -11,9 +11,8 @@

 package mx.core
 {
-import flash.events.IEventDispatcher;

-public interface IViewport extends IEventDispatcher
+public interface IViewport extends IVisualElement
 {
     function get width():Number;
     function get height():Number;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/charts/src/mx/charts/styles/metadata/GapStyles.as
+++ frameworks/projects/charts/src/mx/charts/styles/metadata/GapStyles.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Number of pixels between children in the horizontal direction.
+ *  The default value is 8.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="horizontalGap", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between children in the vertical direction.
+ *  The default value is 8.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="verticalGap", type="Number", format="Length", inherit="no")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 6421
Author:   hmuller@adobe.com
Date:     2009-04-30T16:47:47.594411Z

Log Message:
-----------
Put back 3 lines of code that were inadvertently removed from SystemManager::initHandler() in SVN 4983.  This restores the support for cancelable keyboard scrolling events.

QE Notes:
Doc Notes:
Bugs:
Reviewer:

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -3225,6 +3225,10 @@
             addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
             addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
             addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
+
+            // This listener is intended to run before any other KeyboardEvent listeners
+            // so that it can redispatch a cancelable=true copy of the event.
+            addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true, 1000);
         }

         var docFrame:int = (totalFrames == 1)? 0 : 1;


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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListData.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListData.as
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-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.controls.listClasses
+{
+
+import mx.core.IUIComponent;
+
+/**
+ *  The ListData class defines the data type of the listData
+ *  property implemented by drop-in item renderers or drop-in item editors
+ *  for the List control.
+ *  All drop-in item renderers and drop-in item editors must implement
+ *  the IDropInListItemRenderer interface, which defines
+ *  the listData property.
+ *
+ *
While the properties of this class are writable,
+ *  you should consider them to be read only.
+ *  They are initialized by the List class,
+ *  and read by an item renderer or item editor.
+ *  Changing these values can lead to unexpected results.

+ *
+ *  @see mx.controls.listClasses.IDropInListItemRenderer
+ */
+public class ListData extends BaseListData
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param text Text representation of the item data.
+	 *
+	 *  @param icon A Class or String object representing the icon
+	 *  for the item in the List control.
+	 *
+	 *  @param labelField The name of the field of the data provider
+	 *  containing the label data of the List component.
+	 *
+	 *  @param uid A unique identifier for the item.
+	 *
+	 *  @param owner A reference to the List control.
+	 *
+	 *  @param rowIndex The index of the item in the data provider
+	 *  for the List control.
+	 *
+	 *  @param columnIndex The index of the column in the currently visible columns of the
+     *  control.
+	 *
+	 */
+	public function ListData(text:String, icon:Class, labelField:String,
+							 uid:String, owner:IUIComponent, rowIndex:int = 0,
+							 columnIndex:int = 0)
+	{
+		super(text, uid, owner, rowIndex, columnIndex);
+
+		this.icon = icon;
+		this.labelField = labelField;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  icon
+	//----------------------------------
+
+	/**
+	 *  A Class representing the icon for the item in the List control computed
+	 *  from the list class's itemToIcon() method
+	 */
+	public var icon:Class;
+
+	//----------------------------------
+	//  labelField
+	//----------------------------------
+
+	/**
+	 *  The value of the labelField property in the list class.
+	 *  This is the value normally used to calculate which property should
+	 *  be taken from the item in the data provider for the text displayed
+	 *  in the item renderer, but is also used by DateField and other
+	 *  components to indicate which field to take from the data provider item
+	 *  that contains a Date or other non-text property.
+	 *
+	 *
For example, if a data provider item contains a "hiredDate" property,
+	 *  the labelField property can be set to "hiredDate"
+	 *  and the itemRenderer property
+	 *  can be set to DateField. The DateField control then uses the hiredDate
+	 *  property.

+	 */
+	public var labelField:String;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6631
Author:   rfrishbe@adobe.com
Date:     2009-05-05T05:15:35.285862Z

Log Message:
-----------
Fixing a bunch of Video Player bugs.  Fixing up full screen and some cases where there was no source or what to do when seek() is called before play().  Now, even when autoPlay=false, we load up the video immediately.  This way we can size the video and also can seek and perform other commands without any issues.

QE Notes: -
Doc Notes: -
Bugs: SDK-20791, SDK-20528, SDK-20696, SDK-20697, SDK-20940, SDK-20927, SDK-20948, SDK-20533, SDK-20933
Reviewer: Deepa
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -486,8 +486,9 @@

     [Inspectable(category="General")]

-    private var _playing:Boolean = true; // initialize to same value as autoPlay
-
+    private var _playing:Boolean = false;
+
+    [Bindable("playingChanged")]
     /**
      *  Returns true if the video is playing or is attempting to play.
      *
@@ -509,6 +510,23 @@
         return _playing;
     }

+    /**
+     *  @private
+     *  Sets the playing variable to true or false and dispatches
+     *  the appropriate event.  We don't check to compare it to
+     *  the last value because we want this event to dispatch every
+     *  time.  This way when the playPauseButton is toggled in VideoPlayer,
+     *  this binding event has the last word as to whether we are actually
+     *  playing or paused (Someone could click the play button, but if there's
+     *  no source, we want to still show the play button rather than toggle it
+     *  as ToggleButton's do naturally).
+     */
+    private function setPlaying(value:Boolean):void
+    {
+        _playing = value;
+        dispatchEvent(new Event("playingChanged"));
+    }
+
     //----------------------------------
     //  source
     //----------------------------------
@@ -523,14 +541,6 @@
      *  Passing in play(source) resets the stream back to 0.
      */
     private var sourceLastPlayed:Object;
-
-    /**
-     *  @private
-     *  Keeps track of whether we were paused or not when someone calls
-     *  play().  This is used for the same purpose as sourceLastPlayed.
-     *  This is set to true in pause().  It's set to false in stop() and play().
-     */
-    private var wasPaused:Boolean;

     [Bindable("sourceChanged")]
     [Inspectable(category="General", defaultValue="null")]
@@ -661,8 +671,12 @@
             {
                 play();
             }
+            else
+            {
+                load();
             }
         }
+    }

     /**
      *  @private
@@ -724,7 +738,7 @@
      */
     public function pause():void
     {
-        wasPaused = true;
+        setPlaying(false);
         mx_internal::videoPlayer.pause();
     }

@@ -759,7 +773,7 @@
             // if paused, pass in null as the flvSource.  Otherwise, calling
             // play(source) will reset the stream back to zero.  To restart the
             // stream where it was paused, one needs to call play(null).
-            if (wasPaused && (sourceLastPlayed == this.source) )
+            if (sourceLastPlayed == this.source)
             {
                 flvSource = null;
             }
@@ -779,7 +793,9 @@
                 }
             }

-            wasPaused = false;
+            // could wait for stateChange event, but let's do it early
+            // so the UI is more responsive
+            setPlaying(true);

             // we don't do anything with the duration or startTime in
             // the play2() case, as the underlying FLVPlayback VideoPlayer
@@ -791,7 +807,7 @@

             mx_internal::videoPlayer.play2(flvSource);
         }
-        else
+        else if (source is String && String(source).length != 0)
         {
             // The progressive case
             var sourceString:String;
@@ -799,7 +815,7 @@
             // if paused, pass in null as the flvSource.  Otherwise, calling
             // play(source) will reset the stream back to zero.  To restart the
             // stream where it was paused, one needs to call play(null).
-            if (wasPaused && (sourceLastPlayed == this.source) )
+            if (sourceLastPlayed == this.source)
             {
                 sourceString = null;
             }
@@ -809,7 +825,9 @@
                 sourceLastPlayed = sourceString;
             }

-            wasPaused = false;
+            // could wait for stateChange event, but let's do it early
+            // so the UI is more responsive
+            setPlaying(true);

             // TODO (rfrishbe): how we handle startTime is pretty hacky.
             // Need to figure out if there's a better way or talk to Strobe
@@ -826,11 +844,11 @@

                 seek(startTime);

-        if (isNaN(duration))
+                if (isNaN(duration))
                     mx_internal::videoPlayer.play(null);
-        else
+                else
                     mx_internal::videoPlayer.play(null, false, duration);
-    }
+            }
             else
             {
                 // if we've played this video before or we don't
@@ -845,6 +863,51 @@
                     mx_internal::videoPlayer.play(sourceString, false, duration);
             }
         }
+        else
+        {
+            setPlaying(false);
+        }
+    }
+
+    /**
+     *  @private
+     *  Load the video.  This allows seeks and other operations to
+     *  be performed before the video's started to play.
+     */
+    private function load():void
+    {
+        // essentially a load is a play and then a pause
+
+        // check for 2 cases: streaming video or progressive download
+        if (source is StreamingVideoSource)
+        {
+            // can't load in the streaming video case
+            play();
+            pause();
+        }
+        else if (source is String && String(source).length != 0)
+        {
+            // The progressive case
+            var sourceString:String;
+
+            // if paused, pass in null as the flvSource.  Otherwise, calling
+            // play(source) will reset the stream back to zero.  To restart the
+            // stream where it was paused, one needs to call play(null).
+            if (sourceLastPlayed == this.source)
+            {
+                sourceString = null;
+            }
+            else
+            {
+                sourceString = String(this.source);
+                sourceLastPlayed = sourceString;
+            }
+
+            // load the video up
+            mx_internal::videoPlayer.load(sourceString);
+        }
+
+        setPlaying(false);
     }

     /**
@@ -858,6 +921,20 @@
      *  is past the end of the stream, or past the amount of file
      *  downloaded so far, then will attempt seek and when fails
      *  will recover.

+     *
+     *
The playheadTime property might not have the expected value
+     *  immediately after you call one of the seek methods or set
+     *  playheadTime to cause seeking. For a progressive download,
+     *  you can seek only to a keyframe; therefore, a seek takes you to the
+     *  time of the first keyframe after the specified time.

+     *
+     *
Note: When streaming, a seek always goes to the precise specified
+     *  time even if the source FLV file doesn't have a keyframe there.

+     *
+     *
Seeking is asynchronous, so if you call a seek method or set the
+     *  playheadTime property, playheadTime does not update immediately.
+     *  To obtain the time after the seek is complete, listen for the seek event,
+     *  which does not start until the playheadTime property is updated.

      *
      *  @param time seconds
      *
@@ -890,7 +967,7 @@
      */
     public function stop():void
     {
-        wasPaused = false;
+        setPlaying(false);
         mx_internal::videoPlayer.stop();
     }

@@ -949,13 +1026,12 @@
         switch (event.state)
         {
             case VideoState.PLAYING:
-                _playing = true;
+                setPlaying(true);
                 break;
-            case VideoState.PAUSED:
             case VideoState.STOPPED:
             case VideoState.DISCONNECTED:
             case VideoState.CONNECTION_ERROR:
-                _playing = false;
+                setPlaying(false);
                 break;
         }


set max buffer len to 120s

set max buffer len to 120s

--- src/org/mangui/hls/HLSSettings.as
+++ src/org/mangui/hls/HLSSettings.as
@@ -40,9 +40,9 @@
          * Defines maximum buffer length in seconds.
          * (0 means infinite buffering)
          *
-         * Default is 300.
+         * Default is 120.
          */
-        public static var maxBufferLength : Number = 300;
+        public static var maxBufferLength : Number = 120;
         /**
          * Defines maximum back buffer length in seconds.
          * (0 means infinite back buffering)


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

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