Transferred from the Adobe Open Source Subversion Repository

Revision: 4378
Author:   jszeto@adobe.com
Date:     2008-12-23T00:24:54.896211Z

Log Message:
-----------
BitmapFill Bug fixes and minor Group mask change

SDK-18378 BitmapFill rotation property not rotating correctly

Change code to use radians instead of angles

SDK-18345 Cannot change BitmapFill source property at runtime using ActionScript

Fixed logic in source setter

SDK-18344 Setting BitmapFill source dynamically at runtime doesnt immediately update the display list.

Dispatch PropertyChange event from source setter

* Added transformX, transformY, x, y

   These properties are defined in the FXG spec, but were missing.

* Deprecated originX, originY, offsetX, offsetY

   These are replaced by transformX, transformY, x, and y.

* Fixed setting source to null

* Fixed originX/Y logic

   Code now translates the bitmap back

* Fixed position when sharing displayObject

   Take into account the position of the bounds passed into the begin function.

* Moved Group's mask and maskType logic from commitProperties to updateDisplayList

QE Notes: Need updated tests for BitmapFill.
- add transformX, transformY, x, y.
- test setting source to null, or changing source
- test position when you have multiple GraphicElements sharing the same displayObject
- test setting rotation

Doc Notes: Need doc for transformX, transformY, x and y.
Bugs: SDK-18378, SDK-18345, SDK-18344
Reviewer:

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -537,31 +537,142 @@
     /**
      *  @private
      */
-    override protected function commitProperties():void
-    {
-        super.commitProperties();
-
-        if (maskChanged)
+
+
+    /**
+     *  If virtualLayout is true and the layout supports
+     *  virtualization, then the layout calls this method before
+     *  changing the actual sizes and positions of the layout elements
+     *  beginning at the specified index.
+     *
+     *  The layout is responsible for computing the startIndex based on
+     *  the current vertical and horizontal scroll positions.
+     *
+     *  After calling this method, the layout will size and position
+     *  layout elements until the available space has been exhausted,
+     *  and then it will finish by calling endVirtualLayout().
+     *
+     *  The origin of the "available space" is defined by
+     *  horizontalScrollPosition and verticalScrollPosition, and the
+     *  width,height is this DataGroup's with and height.
+     *
+     *  This method is intended to be overriden by subclasses that
+     *  need to handle virtualzed getLayoutElement requests specially.
+     *
+     *  This method is called at updateDisplayList time and when
+     *  the scroll position changes.
+     *
+     *  This method should not be called explicitly, it's called
+     *  as needed by the layout.
+     *
+     *  @param startIndex The first layout element that will be moved into view.
+     *  @see #endVirtualLayout
+     *  @see virtualLayout
+     *  @see verticalScrollPosition
+     *  @see horizontalScrollPosition
+     *  @see clipContent
+     *  @see layout
+     */
+    public function beginVirtualLayout(startIndex:int):void
+    {
+    }
+
+    /**
+     *  If virtualLayout is true and the layout supports
+     *  virtualization, then the layout calls this method after
+     *  updating the sizes and positions of the layout elements
+     *  in the specified range.
+     *
+     *  This method is called at updateDisplayList time and when
+     *  the scroll position changes.
+     *
+     *  This method is intended to be overriden by subclasses that
+     *  want to discard or recycle layout elements that fall
+     *  outside the startIndex, endIndex range.
+     *
+     *  This method should not be called explicitly, it's called
+     *  as needed by the layout.
+     *
+     *  @param startIndex The first layout element that was moved into view.
+     *  @param endIndex The last layout element that was moved into view.
+     *
+     *  @see #beginVirtualLayout
+     *  @see virtualLayout
+     *  @see verticalScrollPosition
+     *  @see horizontalScrollPosition
+     *  @see clipContent
+     *  @see layout
+     */
+    public function endVirtualLayout(startIndex:int, endIndex:int):void
+    {
+    }
+
+    /**
+     *  @private
+     */
+    override public function invalidateSize():void
+    {
+        super.invalidateSize();
+        layoutInvalidateSizeFlag = true;
+    }
+
+    /**
+     *  @private
+     */
+    override public function invalidateDisplayList():void
+    {
+        super.invalidateDisplayList();
+        layoutInvalidateDisplayListFlag = true;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        if (_layout && layoutInvalidateSizeFlag)
+        {
+            super.measure();
+
+            layoutInvalidateSizeFlag = false;
+            _layout.measure();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        if (_resizeMode == _SCALE_UINT)
+        {
+            unscaledWidth = measuredWidth;
+            unscaledHeight = measuredHeight;
+        }
+
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+		if (maskChanged)
         {
             maskChanged = false;
             if (_mask)
             {
             	maskTypeChanged = true;

-	            if (!_mask.parent)
-            {
-            	// TODO!!! This needs to be a sibling because alpha
-                super.addChild(_mask);
-                var maskComp:UIComponent = _mask as UIComponent;
-                if (maskComp)
-                {
-	                	maskComp.validateProperties();
-                    maskComp.validateSize();
-                    maskComp.setActualSize(maskComp.getExplicitOrMeasuredWidth(),
-                                           maskComp.getExplicitOrMeasuredHeight());
-                }
-            }
-        }
+		        if (!_mask.parent)
+	            {
+	            	// TODO!!! This needs to be a sibling because alpha
+	                super.addChild(_mask);
+	                var maskComp:UIComponent = _mask as UIComponent;
+	                if (maskComp)
+	                {
+		                maskComp.validateProperties();
+	                    maskComp.validateSize();
+	                    maskComp.setActualSize(maskComp.getExplicitOrMeasuredWidth(),
+	                                           maskComp.getExplicitOrMeasuredHeight());
+	                }
+	            }
+	        }
         }

         if (maskTypeChanged)
@@ -573,7 +684,7 @@
                 if (_maskType == MaskType.CLIP)
                 {
                     // Turn off caching on mask
-                    _mask.cacheAsBitmap = false;
+                    _mask.cacheAsBitmap = false;
                     // Save the original filters and clear the filters property
                     originalMaskFilters = _mask.filters;
                     _mask.filters = [];
@@ -584,121 +695,7 @@
                     cacheAsBitmap = true;
                 }
             }
-        }
-    }
-
-    /**
-     *  If virtualLayout is true and the layout supports
-     *  virtualization, then the layout calls this method before
-     *  changing the actual sizes and positions of the layout elements
-     *  beginning at the specified index.
-     *
-     *  The layout is responsible for computing the startIndex based on
-     *  the current vertical and horizontal scroll positions.
-     *
-     *  After calling this method, the layout will size and position
-     *  layout elements until the available space has been exhausted,
-     *  and then it will finish by calling endVirtualLayout().
-     *
-     *  The origin of the "available space" is defined by
-     *  horizontalScrollPosition and verticalScrollPosition, and the
-     *  width,height is this DataGroup's with and height.
-     *
-     *  This method is intended to be overriden by subclasses that
-     *  need to handle virtualzed getLayoutElement requests specially.
-     *
-     *  This method is called at updateDisplayList time and when
-     *  the scroll position changes.
-     *
-     *  This method should not be called explicitly, it's called
-     *  as needed by the layout.
-     *
-     *  @param startIndex The first layout element that will be moved into view.
-     *  @see #endVirtualLayout
-     *  @see virtualLayout
-     *  @see verticalScrollPosition
-     *  @see horizontalScrollPosition
-     *  @see clipContent
-     *  @see layout
-     */
-    public function beginVirtualLayout(startIndex:int):void
-    {
-    }
-
-    /**
-     *  If virtualLayout is true and the layout supports
-     *  virtualization, then the layout calls this method after
-     *  updating the sizes and positions of the layout elements
-     *  in the specified range.
-     *
-     *  This method is called at updateDisplayList time and when
-     *  the scroll position changes.
-     *
-     *  This method is intended to be overriden by subclasses that
-     *  want to discard or recycle layout elements that fall
-     *  outside the startIndex, endIndex range.
-     *
-     *  This method should not be called explicitly, it's called
-     *  as needed by the layout.
-     *
-     *  @param startIndex The first layout element that was moved into view.
-     *  @param endIndex The last layout element that was moved into view.
-     *
-     *  @see #beginVirtualLayout
-     *  @see virtualLayout
-     *  @see verticalScrollPosition
-     *  @see horizontalScrollPosition
-     *  @see clipContent
-     *  @see layout
-     */
-    public function endVirtualLayout(startIndex:int, endIndex:int):void
-    {
-    }
-
-    /**
-     *  @private
-     */
-    override public function invalidateSize():void
-    {
-        super.invalidateSize();
-        layoutInvalidateSizeFlag = true;
-    }
-
-    /**
-     *  @private
-     */
-    override public function invalidateDisplayList():void
-    {
-        super.invalidateDisplayList();
-        layoutInvalidateDisplayListFlag = true;
-    }
-
-    /**
-     *  @private
-     */
-    override protected function measure():void
-    {
-        if (_layout && layoutInvalidateSizeFlag)
-        {
-            super.measure();
-
-            layoutInvalidateSizeFlag = false;
-            _layout.measure();
-        }
-    }
-
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-    {
-        if (_resizeMode == _SCALE_UINT)
-        {
-            unscaledWidth = measuredWidth;
-            unscaledHeight = measuredHeight;
-        }
-
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
+        }

         if (layoutInvalidateDisplayListFlag)
         {
@@ -932,7 +929,7 @@
         {
             _mask = value;
             maskChanged = true;
-            invalidateProperties();
+            invalidateDisplayList();
         }
         super.mask = value;
     }
@@ -967,7 +964,7 @@
         {
             _maskType = value;
             maskTypeChanged = true;
-            invalidateProperties();
+            invalidateDisplayList();
         }
     }

@@ -978,7 +975,6 @@
      */
     mx_internal function graphicElementChanged(e:IGraphicElement):void
     {
-        // TODO!!! Optimize
         // Call super, so that we don't invalidate the layout
         super.invalidateDisplayList();
     }
@@ -990,7 +986,6 @@
      */
     mx_internal function graphicElementSizeChanged(e:IGraphicElement):void
     {
-        // TODO!!! Optimize
         // Call super so that we don't invalidate the layout
         super.invalidateSize();
     }
@@ -1002,8 +997,6 @@
      */
     mx_internal function graphicElementLayerChanged(e:IGraphicElement):void
     {
-        // TODO!!! Optimize
-        // TODO!!! Need to recalculate the elements
         // Call super, so that we don't invalidate the layout
         super.invalidateDisplayList();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8411
Author:   gruehle@adobe.com
Date:     2009-07-06T23:43:15.899980Z

Log Message:
-----------
Make the following skin parts optional:
  TrackBase (includes sliders and scrollbars): thumb, track
  SkinnableTextBase (includes TextInput and TextArea): textDisplay
  SkinnableContainer (includes Panel and Application): contentGroup

Verified all access of these parts are protected with null checks.

Bug: SDK-21663
QE Notes: Tests should be added for components with missing parts

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -200,7 +200,7 @@
     //
     //--------------------------------------------------------------------------

-    [SkinPart(required="true")]
+    [SkinPart(required="false")]

     /**
      *  A skin part that defines a button
@@ -217,7 +217,7 @@
      */
     public var thumb:Button;

-    [SkinPart(required="true")]
+    [SkinPart(required="false")]

     /**
      *  A skin part that defines a button


Transferred from the Adobe Open Source Subversion Repository

Revision: 6122
Author:   chaase@adobe.com
Date:     2009-04-10T14:30:17.762458Z

Log Message:
-----------
Various refactorings/renamings/changes from effects PARB review.

QE Notes: mx/effects and spark/effects currently broken (and disabled) due to these API changes. Matt is fixing.
Doc Notes: None
Bugs:
Reviewer: Hans
tests: checkintests, mustella tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOut.as" copyfrom-rev="5944" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOut.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EasingFraction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EffectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/RepeatBehavior.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/NumberArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Animate3DInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimationProperty.as" copyfrom-rev="5944" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateFilterInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Rotate3DInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/AnimationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RotateInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimationProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
@@ -15,8 +15,7 @@

 import spark.components.Group;
 import spark.effects.animation.Animation;
-import spark.effects.AnimationProperty;
-import spark.events.AnimationEvent;
+import spark.effects.SimpleMotionPath;
 import mx.events.FlexEvent;
 import spark.primitives.supportClasses.GraphicElement;
 import mx.managers.LayoutManager;
@@ -160,8 +159,8 @@
             makeInvisible = true;
         }

-        animationProperties =
-            [new AnimationProperty("alpha",alphaFrom, alphaTo, duration)];
+        motionPaths =
+            [new SimpleMotionPath("alpha",alphaFrom, alphaTo, duration)];

         super.play();
     }


Removes an 'API feature' that is not currently used and has no purpose at present. This feature is both untested and likely to cause errors.

--- as3/src/ember/core/Entity.as
+++ as3/src/ember/core/Entity.as
@@ -24,13 +24,14 @@
 			_componentRemoved = componentRemoved;
 		}

-		public function addComponent(component:Object, componentClass:Class = null):void
+		public function addComponent(component:Object):void
 		{
-			componentClass ||= component["constructor"];
-			_components[componentClass] = component;
+			var klass:Class = component["constructor"];
+
+			_components[klass] = component;
 			_listOfComponents.push(component);
-			_listOfClasses.push(componentClass);
-			_componentAdded.dispatch(this, componentClass);
+			_listOfClasses.push(klass);
+			_componentAdded.dispatch(this, klass);
 		}

 		public function getComponents():Vector.<Object>


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

--- frameworks/projects/framework/src/mx/core/FlexGlobals.as
+++ frameworks/projects/framework/src/mx/core/FlexGlobals.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.core
 {


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 7918
Author:   chaase@adobe.com
Date:     2009-06-17T16:55:30.271215Z

Log Message:
-----------
Round 2 of effects PARB changes. Some renames and removals of properties/functions, including:
AnimateTransform: removed 18 MotionPath properties, added applyChangesPostLayout property (replaces affectLayout property in subclasses), removed addMotionPath/addPostLayoutMotionPath protected functions
Animation: removed seek(), reverse()
SimpleMotionPath: removed 'duration' arg in constructor

QE Notes: Mustella will break on some of these changes (no surprise, just needs minor updates)
Doc Notes: API updates
Bugs: none
Reviewer: Jason
Tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
@@ -11,6 +11,8 @@
 package spark.effects.supportClasses
 {
 import spark.effects.SimpleMotionPath;
+import spark.effects.animation.Keyframe;
+import spark.effects.animation.MotionPath;

 /**
  *  The MoveInstance class implements the instance class
@@ -153,9 +155,12 @@
      */
     override public function play():void
     {
-        motionPaths =
-            [new SimpleMotionPath("x", xFrom, xTo, duration, xBy),
-             new SimpleMotionPath("y", yFrom, yTo, duration, yBy)];
+        motionPaths = new <MotionPath>[new MotionPath("x"),
+            new MotionPath("y")];
+        motionPaths[0].keyframes = new <Keyframe>[new Keyframe(0, xFrom),
+            new Keyframe(duration, xTo, xBy)];
+        motionPaths[1].keyframes = new <Keyframe>[new Keyframe(0, yFrom),
+            new Keyframe(duration, yTo, yBy)];

         // Also animate any position-related constraints that change between
         // transition states


#FEC-178 #time 3h #comment fix OSMF cue points bug - sometimes event wasn't dispatched because of OSMF enhancement, remove it

--- vendors/OSMF/org/osmf/metadata/TimelineMetadata.as
+++ vendors/OSMF/org/osmf/metadata/TimelineMetadata.as
@@ -1,768 +1,768 @@
-/*****************************************************
-*
-*  Copyright 2009 Akamai Technologies, Inc.  All Rights Reserved.
-*
-*****************************************************
-*  The contents of this file are subject to the Mozilla Public License
-*  Version 1.1 (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.mozilla.org/MPL/
-*
-*  Software distributed under the License is distributed on an "AS IS"
-*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-*  License for the specific language governing rights and limitations
-*  under the License.
-*
-*
-*  The Initial Developer of the Original Code is Akamai Technologies, Inc.
-*  Portions created by Akamai Technologies, Inc. are Copyright (C) 2009 Akamai
-*  Technologies, Inc. All Rights Reserved.
-*
-*****************************************************/
-package org.osmf.metadata
-{
-	import __AS3__.vec.Vector;
-
-	import flash.events.TimerEvent;
-	import flash.utils.Dictionary;
-	import flash.utils.Timer;
-
-	import org.osmf.events.MediaElementEvent;
-	import org.osmf.events.MetadataEvent;
-	import org.osmf.events.PlayEvent;
-	import org.osmf.events.SeekEvent;
-	import org.osmf.events.TimelineMetadataEvent;
-	import org.osmf.media.MediaElement;
-	import org.osmf.traits.MediaTraitType;
-	import org.osmf.traits.PlayState;
-	import org.osmf.traits.PlayTrait;
-	import org.osmf.traits.SeekTrait;
-	import org.osmf.traits.TimeTrait;
-	import org.osmf.utils.OSMFStrings;
-
-	/**
-	 * Dispatched when a TimelineMarker is added to this object.
-	 *
-	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_ADD
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion OSMF 1.0
-	 */
-	[Event (name="markerAdd", type="org.osmf.events.TimelineMetadataEvent")]
-
-	/**
-	 * Dispatched when a TimelineMarker is removed from this object.
-	 *
-	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_REMOVE
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion OSMF 1.0
-	 */
-	[Event (name="markerRemove", type="org.osmf.events.TimelineMetadataEvent")]
-
-	/**
-	 * Dispatched when the currentTime property of the MediaElement associated
-	 * with this TimelineMetadata has reached the time value of one of the
-	 * TimelineMarkers in this TimelineMetadata.
-	 *
-	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_TIME_REACHED
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion OSMF 1.0
-	 */
-	[Event (name="markerTimeReached", type="org.osmf.events.TimelineMetadataEvent")]
-
-	/**
-	 * Dispatched when the currentTime property of the MediaElement associated
-	 * with this TimelineMetadata has reached the duration offset of one of the
-	 * TimelineMarkers in this TimelineMetadata.
-	 *
-	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_TIME_REACHED
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion OSMF 1.0
-	 */
-	[Event (name="markerDurationReached", type="org.osmf.events.TimelineMetadataEvent")]
-
-	/**
-	 * The TimelineMetadata class encapsulates metadata associated with the
-	 * timeline of a MediaElement.
-	 *
-	 *
TimelineMetadata uses the TimelineMarker class to represent both
-	 * keys and values (i.e. a TimelineMarker will be stored as both key and
-	 * value).  A TimelineMetadata object dispatches a TimelineMetadataEvent
-	 * when the currentTime property of the MediaElement's TimeTrait matches
-	 * any of the time values in its collection of TimelineMarker objects.

-	 *
-	 *  @includeExample TimelineMetadataExample.as -noswf
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion OSMF 1.0
-	 */
-	public class TimelineMetadata extends Metadata
-	{
-		/**
-		 * Constructor.
-		 *
-		 * @param media The media element this timeline metadata applies to.
-		 *
-		 * @throws ArgumentError If the media argument is null.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		public function TimelineMetadata(media:MediaElement)
-		{
-			super();
-
-			if (media == null)
-			{
-				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM));
-			}
-
-			this.media = media;
-			_enabled = true;
-
-			intervalTimer = new Timer(CHECK_INTERVAL);
-			intervalTimer.addEventListener(TimerEvent.TIMER, onIntervalTimer);
-
-			// Check the media element for traits, if they are null here
-			// that's okay we'll manage them in the event handlers.
-			timeTrait = media.getTrait(MediaTraitType.TIME) as TimeTrait;
-
-			seekTrait = media.getTrait(MediaTraitType.SEEK) as SeekTrait;
-			setupTraitEventListener(MediaTraitType.SEEK);
-
-			playTrait = media.getTrait(MediaTraitType.PLAY) as PlayTrait;
-			setupTraitEventListener(MediaTraitType.PLAY);
-
-			media.addEventListener(MediaElementEvent.TRAIT_ADD, onTraitAdd);
-			media.addEventListener(MediaElementEvent.TRAIT_REMOVE, onTraitRemove);
-		}
-
-		/**
-		 * The number of TimelineMarker objects contained within this object.
-		 **/
-		public function get numMarkers():int
-		{
-			return temporalValueCollection ? temporalValueCollection.length : 0;
-		}
-
-		/**
-		 * Returns the TimelineMarker at the specified index.  Note that the
-		 * markers are sorted by time.
-		 *
-		 * @param index The index of the marker to return.
-		 *
-		 * @returns The marker at that index, null if there is no
-		 * such marker at that index.
-		 **/
-		public function getMarkerAt(index:int):TimelineMarker
-		{
-			if (index >= 0 && temporalValueCollection != null && index < temporalValueCollection.length)
-			{
-				return temporalValueCollection[index];
-			}
-			else
-			{
-				return null;
-			}
-		}
-
-		/**
-		 * Adds the specified TimelineMarker to this object.  This class
-		 * maintains the TimelineMarkers in time order.  If another TimelineMarker
-		 * with the same time value exists within this object, then the existing
-		 * value will be overwritten.
-		 *
-		 * @param marker The marker to add.
-		 *
-		 * @throws ArgumentError If marker is null or specifies an invalid time.
-		 **/
-		public function addMarker(marker:TimelineMarker):void
-		{
-			if (marker == null)
-			{
-				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
-			}
-
-			addValue("" + marker.time, marker);
-		}
-
-		/**
-		 * Removes the specified TimelineMarker from this object.
-		 *
-		 * @param marker The marker to remove.
-		 *
-		 * @returns The removed marker, null if the specified marker is not
-		 * contained within this object.
-		 *
-		 * @throws ArgumentError If marker is null.
-		 **/
-		public function removeMarker(marker:TimelineMarker):TimelineMarker
-		{
-			if (marker == null)
-			{
-				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
-			}
-
-			return removeValue("" + marker.time);
-		}
-
-		/**
-		 * @private
-		 */
-		override public function addValue(key:String, value:Object):void
-		{
-			var time:Number = new Number(key);
-			var marker:TimelineMarker = value as TimelineMarker;
-
-			if (key == null || isNaN(time) || time < 0 || marker == null)
-			{
-				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
-			}
-
-			if (temporalValueCollection == null)
-			{
-				temporalKeyCollection = new Vector.<Number>();
-				temporalKeyCollection.push(time);
-
-				temporalValueCollection = new Vector.<TimelineMarker>();
-				temporalValueCollection.push(value);
-			}
-			else
-			{
-				// Find the index where we should insert this value
-				var index:int = findTemporalMetadata(0, temporalValueCollection.length - 1, time);
-
-				// A negative index value means it doesn't exist in the array and the absolute value is the
-				// index where it should be inserted.  A positive index means a value exists and in this
-				// case we'll overwrite the existing value rather than insert a duplicate.
-				if (index < 0)
-				{
-					index *= -1;
-					temporalKeyCollection.splice(index, 0, time);
-					temporalValueCollection.splice(index, 0, marker);
-				}
-
-				// Make sure we don't insert a dup at index 0
-				else if ((index == 0) && temporalKeyCollection.length &&  (time != temporalKeyCollection[0]))
-				{
-					temporalKeyCollection.splice(index, 0, time);
-					temporalValueCollection.splice(index, 0, marker);
-				}
-				else
-				{
-					temporalKeyCollection[index] = time;
-					temporalValueCollection[index] = marker;
-				}
-			}
-
-			enabled = true;
-
-			dispatchEvent(new MetadataEvent(MetadataEvent.VALUE_ADD, false, false, key, marker));
-			dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_ADD, false, false, marker));
-		}
-
-		/**
-		 * @private
-		 **/
-		override public function removeValue(key:String):*
-		{
-			if (key == null)
-			{
-				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM));
-			}
-
-			var time:Number = new Number(key);
-
-			var result:* = null;
-
-			// Also remove from our collections.
-			var index:int = temporalValueCollection ? findTemporalMetadata(0, temporalValueCollection.length - 1, time) : -1;
-			if (index >= 0)
-			{
-				temporalKeyCollection.splice(index, 1);
-				result = temporalValueCollection.splice(index, 1)[0];
-
-				// If we just removed the last one, clean up and stop the interval timer (fix for FM-1052)
-				if (temporalValueCollection.length == 0)
-				{
-					reset(false);
-					temporalValueCollection = null;
-					temporalKeyCollection = null;
-				}
-
-				dispatchEvent(new MetadataEvent(MetadataEvent.VALUE_REMOVE, false, false, key, result));
-				dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_REMOVE, false, false, result as TimelineMarker));
-			}
-
-			return result;
-		}
-
-		/**
-		 * @private
-		 */
-		override public function getValue(key:String):*
-		{
-			if (key == null)
-			{
-				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM));
-			}
-
-			var time:Number = new Number(key);
-			if (!isNaN(time))
-			{
-				for (var i:int = 0; i < temporalKeyCollection.length; i++)
-				{
-					var keyTime:Number = temporalKeyCollection[i];
-					if (keyTime == time)
-					{
-						return temporalValueCollection[i];
-					}
-				}
-			}
-
-			return null;
-		}
-
-		/**
-		 * @private
-		 *
-		 * Enables/disables this metadata object (enabled by default). If enabled, the
-		 * class will dispatch events of type TimelineMetadataEvent. Setting
-		 * this property to false will cause the class to stop
-		 * dispatching events.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		public function get enabled():Boolean
-		{
-			return _enabled;
-		}
-
-		/**
-		 * @private
-		 **/
-		public function set enabled(value:Boolean):void
-		{
-			_enabled = value;
-			reset(value);
-		}
-
-		/**
-		 * Starts / stops the interval timer.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		private function startTimer(start:Boolean=true):void
-		{
-			if (!start)
-			{
-				intervalTimer.stop();
-			}
-			else if (	timeTrait != null
-					 && temporalValueCollection != null
-					 && temporalValueCollection.length > 0
-					 && restartTimer
-					 && enabled
-					 && !intervalTimer.running
-					)
-			{
-				// If there is a PlayTrait and the media isn't playing, there is no reason to
-				// start the timer.
-				if (playTrait != null && playTrait.playState == PlayState.PLAYING)
-				{
-					intervalTimer.start();
-				}
-			}
-		}
-
-		/**
-		 * Perform a reset on the class' internal state.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		private function reset(startTimer:Boolean):void
-		{
-			lastFiredTemporalMetadataIndex = -1;
-			restartTimer = true;
-			intervalTimer.reset();
-			intervalTimer.delay = CHECK_INTERVAL;
-
-			if (startTimer)
-			{
-				this.startTimer();
-			}
-		}
-
-		/**
-		 * The interval timer callback. Checks for temporal metadata
-		 * around the current TimeTrait.currentTime and dispatches an event
-		 * if found.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-   		private function checkForTemporalMetadata():void
-   		{
-			var now:Number = timeTrait.currentTime;
-
-			// Start looking one index past the last one we found
-			var index:int = findTemporalMetadata(lastFiredTemporalMetadataIndex + 1, temporalValueCollection.length - 1, now);
-
-			// A negative index value means it doesn't exist in the collection and the absolute value is the
-			// index where it should be inserted.  Therefore, to get the closest match, we'll look at the index
-			// before this one.  A positive index means an exact match was found.
-			if (index <= 0)
-			{
-				index *= -1;
-				index = (index > 0) ? (index - 1) : 0;
-			}
-
-			// See if the value at this index is within our tolerance
-			if (!checkTemporalMetadata(index, now) && ((index + 1) < temporalValueCollection.length))
-			{
-				// Look at the next one, see if it is close enough to fire
-				checkTemporalMetadata(index+1, now);
-			}
-   		}
-
-   		private function setupTraitEventListener(traitType:String, add:Boolean=true):void
-   		{
-   			if (add)
-   			{
-	   			if (traitType == MediaTraitType.SEEK && seekTrait != null)
-	   			{
-					seekTrait.addEventListener(SeekEvent.SEEKING_CHANGE, onSeekingChange);
-	   			}
-
-	   			else if (traitType == MediaTraitType.PLAY && playTrait != null)
-	   			{
-	   				playTrait.addEventListener(PlayEvent.PLAY_STATE_CHANGE, onPlayStateChange);
-
-	   				// We need to check the playing state, if the media is already playing, we won't
-	   				// get the play state change event and the interval timer will never start.
-	   				if (playTrait.playState == PlayState.PLAYING)
-	   				{
-	   					var event:PlayEvent = new PlayEvent(PlayEvent.PLAY_STATE_CHANGE, false, false, PlayState.PLAYING);
-	   					onPlayStateChange(event);
-	   				}
-	   			}
-	   		}
-	   		else
-	   		{
-	   			if (traitType == MediaTraitType.SEEK && seekTrait != null)
-	   			{
-					seekTrait.removeEventListener(SeekEvent.SEEKING_CHANGE, onSeekingChange);
-	   			}
-
-	   			else if (traitType == MediaTraitType.PLAY && playTrait != null)
-	   			{
-	   				playTrait.removeEventListener(PlayEvent.PLAY_STATE_CHANGE, onPlayStateChange);
-	   			}
-	   		}
-   		}
-
-   		private function onSeekingChange(event:SeekEvent):void
-   		{
-   			if (event.seeking)
-   			{
-   				reset(true);
-   			}
-   		}
-
-   		private function onPlayStateChange(event:PlayEvent):void
-   		{
-   			var timer:Timer;
-   			if (event.playState == PlayState.PLAYING)
-   			{
-   				// Start any duration timers.
-   				if (durationTimers != null)
-   				{
-   					for each (timer in durationTimers)
-   					{
-   						timer.start();
-   					}
-   				}
-   				startTimer();
-   			}
-   			else
-   			{
-  				// Pause any duration timers.
-   				if (durationTimers != null)
-   				{
-   					for each (timer in durationTimers)
-   					{
-   						timer.stop();
-   					}
-   				}
-
-   				startTimer(false);
-   			}
-   		}
-
-		/**
-		 * Returns the index of the temporal metadata object matching the time. If no match is found, returns
-		 * the index where the value should be inserted as a negative number.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		private function findTemporalMetadata(firstIndex:int, lastIndex:int, time:Number):int
-		{
-			if (firstIndex <= lastIndex)
-			{
-				var mid:int = (firstIndex + lastIndex) / 2;	// divide and conquer
-				if (time == temporalKeyCollection[mid])
-				{
-					return mid;
-				}
-				else if (time < temporalKeyCollection[mid])
-				{
-					// search the lower part
-					return findTemporalMetadata(firstIndex, mid - 1, time);
-				}
-				else
-				{
-					// search the upper part
-					return findTemporalMetadata(mid + 1, lastIndex, time);
-				}
-			}
-			return -(firstIndex);
-		}
-
-		/**
-		 * Dispatch the events for this temporal value. If there is a duration
-		 * property on the value, dispatch a duration reached event after the
-		 * proper amount of time has passed.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		private function dispatchTemporalEvents(index:int):void
-		{
-			var marker:TimelineMarker = temporalValueCollection[index];
-			dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_TIME_REACHED, false, false, marker));
-
-			if (marker.duration > 0)
-			{
-				var timer:Timer = new Timer(CHECK_INTERVAL);
-				var endTime:Number = marker.time + marker.duration;
-
-				// Add it to the dictionary of duration timers so we can pause it
-				// if the media pauses.
-				if (durationTimers == null)
-				{
-					durationTimers = new Dictionary();
-				}
-				durationTimers[marker] = timer;
-
-				timer.addEventListener(TimerEvent.TIMER, onDurationTimer);
-				timer.start();
-
-				function onDurationTimer(event:TimerEvent):void
-				{
-					if (timeTrait && timeTrait.currentTime >= endTime)
-					{
-						timer.removeEventListener(TimerEvent.TIMER, onDurationTimer);
-						delete durationTimers[marker];
-						dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_DURATION_REACHED, false, false, marker));
-					}
-				}
-			}
-		}
-
-   		/**
-   		 * Checks the item at the index passed in with the time passed in.
-   		 * If the item time is within the class' tolerance, an event is dispatched.
-   		 *
-   		 * Returns True if a match was found, otherwise False.
-   		 *
-   		 *  @langversion 3.0
-   		 *  @playerversion Flash 10
-   		 *  @playerversion AIR 1.5
-   		 *  @productversion OSMF 1.0
-   		 */
-   		private function checkTemporalMetadata(index:int, now:Number):Boolean
-   		{
-			if (!temporalValueCollection || !temporalValueCollection.length)
-			{
-				return false;
-			}
-
-			var result:Boolean = false;
-
-			if ( 	(temporalValueCollection[index].time >= (now - TOLERANCE))
-				&& 	(temporalValueCollection[index].time <= (now + TOLERANCE))
-				&&	(index != lastFiredTemporalMetadataIndex)
-			   )
-			{
-				lastFiredTemporalMetadataIndex = index;
-
-				dispatchTemporalEvents(index);
-
-				// Adjust the timer interval if necessary
-				var thisTime:Number = temporalKeyCollection[index];
-				// Get the next time value after this one so we can decide to adjust the timer interval
-				var nextTime:Number = calcNextTime(index);
-
-				var newDelay:Number = ((nextTime - thisTime)*1000)/4;
-				newDelay = (newDelay > CHECK_INTERVAL) ? newDelay : CHECK_INTERVAL;
-
-				// If no more data, stop the timer
-				if (thisTime == nextTime)
-				{
-					startTimer(false);
-					restartTimer = false;
-				}
-				else if (newDelay != intervalTimer.delay)
-				{
-					intervalTimer.reset();
-					intervalTimer.delay = newDelay;
-					startTimer();
-				}
-				result = true;
-			}
-
-			// If we've optimized the interval time by reseting the delay, we could miss a data point
-			//    if it happens to fall between this check and next one.
-			// See if we are going to miss a data point (meaning there is one between now and the
-			//    next interval timer event).  If so, drop back down to the default check interval.
-			else if ((intervalTimer.delay != CHECK_INTERVAL) && ((now + (intervalTimer.delay/1000)) > calcNextTime(index)))
-			{
-				this.intervalTimer.reset();
-				this.intervalTimer.delay = CHECK_INTERVAL;
-				startTimer();
-			}
-			return result;
-   		}
-
-		private function calcNextTime(index:int):Number
-		{
-			return temporalValueCollection [ index + 1 < temporalKeyCollection.length
-										  	 ? index + 1
-					  		  				 : temporalKeyCollection.length - 1
-					 						].time;
-		}
-
-		/**
-		 * The interval timer event handler.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		private function onIntervalTimer(event:TimerEvent):void
-		{
-			checkForTemporalMetadata();
-		}
-
-		/**
-		 * Called when traits are added to the media element.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		private function onTraitAdd(event:MediaElementEvent):void
-		{
-			switch (event.traitType)
-			{
-				case MediaTraitType.TIME:
-					timeTrait = media.getTrait(MediaTraitType.TIME) as TimeTrait;
-					startTimer();
-					break;
-				case MediaTraitType.SEEK:
-					seekTrait = media.getTrait(MediaTraitType.SEEK) as SeekTrait;
-					break;
-				case MediaTraitType.PLAY:
-					playTrait = media.getTrait(MediaTraitType.PLAY) as PlayTrait;
-					break;
-			}
-
-			setupTraitEventListener(event.traitType);
-		}
-
-		/**
-		 * Called when traits are removed from the media element.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10
-		 *  @playerversion AIR 1.5
-		 *  @productversion OSMF 1.0
-		 */
-		private function onTraitRemove(event:MediaElementEvent):void
-		{
-			// Remove any event listeners
-			setupTraitEventListener(event.traitType, false);
-
-			switch (event.traitType)
-			{
-				case MediaTraitType.TIME:
-					timeTrait = null;
-					// This is a work around for FM-171. Traits are added and removed for
-					// each child in a composition element when transitioning between child
-					// elements. So don't stop the timer if the MediaElement is a composition
-					// (which we determine by looking for the numChildren property, since
-					// we don't want to link the composition classes in by default).
-					if (media.hasOwnProperty("numChildren") == false)
-					{
-						startTimer(false);
-					}
-					break;
-				case MediaTraitType.SEEK:
-					seekTrait = null;
-					break;
-				case MediaTraitType.PLAY:
-					playTrait = null;
-					break;
-			}
-		}
-
-		private static const CHECK_INTERVAL:Number = 100;	// The default interval (in milliseconds) the
-															// class will check for temporal metadata
-		private static const TOLERANCE:Number = 0.25;	// A value must be within this tolerence to trigger
-														//	a timeReached event.
-		private var temporalKeyCollection:Vector.<Number>;
-		private var temporalValueCollection:Vector.<TimelineMarker>;
-		private var media:MediaElement;
-		private var timeTrait:TimeTrait;
-		private var seekTrait:SeekTrait;
-		private var playTrait:PlayTrait;
-		private var lastFiredTemporalMetadataIndex:int;
-		private var intervalTimer:Timer;
-		private var restartTimer:Boolean;
-		private var _enabled:Boolean;
-		private var durationTimers:Dictionary;
-	}
-}
+/*****************************************************
+*
+*  Copyright 2009 Akamai Technologies, Inc.  All Rights Reserved.
+*
+*****************************************************
+*  The contents of this file are subject to the Mozilla Public License
+*  Version 1.1 (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.mozilla.org/MPL/
+*
+*  Software distributed under the License is distributed on an "AS IS"
+*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+*  License for the specific language governing rights and limitations
+*  under the License.
+*
+*
+*  The Initial Developer of the Original Code is Akamai Technologies, Inc.
+*  Portions created by Akamai Technologies, Inc. are Copyright (C) 2009 Akamai
+*  Technologies, Inc. All Rights Reserved.
+*
+*****************************************************/
+package org.osmf.metadata
+{
+	import __AS3__.vec.Vector;
+
+	import flash.events.TimerEvent;
+	import flash.utils.Dictionary;
+	import flash.utils.Timer;
+
+	import org.osmf.events.MediaElementEvent;
+	import org.osmf.events.MetadataEvent;
+	import org.osmf.events.PlayEvent;
+	import org.osmf.events.SeekEvent;
+	import org.osmf.events.TimelineMetadataEvent;
+	import org.osmf.media.MediaElement;
+	import org.osmf.traits.MediaTraitType;
+	import org.osmf.traits.PlayState;
+	import org.osmf.traits.PlayTrait;
+	import org.osmf.traits.SeekTrait;
+	import org.osmf.traits.TimeTrait;
+	import org.osmf.utils.OSMFStrings;
+
+	/**
+	 * Dispatched when a TimelineMarker is added to this object.
+	 *
+	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_ADD
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion OSMF 1.0
+	 */
+	[Event (name="markerAdd", type="org.osmf.events.TimelineMetadataEvent")]
+
+	/**
+	 * Dispatched when a TimelineMarker is removed from this object.
+	 *
+	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_REMOVE
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion OSMF 1.0
+	 */
+	[Event (name="markerRemove", type="org.osmf.events.TimelineMetadataEvent")]
+
+	/**
+	 * Dispatched when the currentTime property of the MediaElement associated
+	 * with this TimelineMetadata has reached the time value of one of the
+	 * TimelineMarkers in this TimelineMetadata.
+	 *
+	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_TIME_REACHED
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion OSMF 1.0
+	 */
+	[Event (name="markerTimeReached", type="org.osmf.events.TimelineMetadataEvent")]
+
+	/**
+	 * Dispatched when the currentTime property of the MediaElement associated
+	 * with this TimelineMetadata has reached the duration offset of one of the
+	 * TimelineMarkers in this TimelineMetadata.
+	 *
+	 * @eventType org.osmf.events.TimelineMetadataEvent.MARKER_TIME_REACHED
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion OSMF 1.0
+	 */
+	[Event (name="markerDurationReached", type="org.osmf.events.TimelineMetadataEvent")]
+
+	/**
+	 * The TimelineMetadata class encapsulates metadata associated with the
+	 * timeline of a MediaElement.
+	 *
+	 *
TimelineMetadata uses the TimelineMarker class to represent both
+	 * keys and values (i.e. a TimelineMarker will be stored as both key and
+	 * value).  A TimelineMetadata object dispatches a TimelineMetadataEvent
+	 * when the currentTime property of the MediaElement's TimeTrait matches
+	 * any of the time values in its collection of TimelineMarker objects.

+	 *
+	 *  @includeExample TimelineMetadataExample.as -noswf
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion OSMF 1.0
+	 */
+	public class TimelineMetadata extends Metadata
+	{
+		/**
+		 * Constructor.
+		 *
+		 * @param media The media element this timeline metadata applies to.
+		 *
+		 * @throws ArgumentError If the media argument is null.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		public function TimelineMetadata(media:MediaElement)
+		{
+			super();
+
+			if (media == null)
+			{
+				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM));
+			}
+
+			this.media = media;
+			_enabled = true;
+
+			intervalTimer = new Timer(CHECK_INTERVAL);
+			intervalTimer.addEventListener(TimerEvent.TIMER, onIntervalTimer);
+
+			// Check the media element for traits, if they are null here
+			// that's okay we'll manage them in the event handlers.
+			timeTrait = media.getTrait(MediaTraitType.TIME) as TimeTrait;
+
+			seekTrait = media.getTrait(MediaTraitType.SEEK) as SeekTrait;
+			setupTraitEventListener(MediaTraitType.SEEK);
+
+			playTrait = media.getTrait(MediaTraitType.PLAY) as PlayTrait;
+			setupTraitEventListener(MediaTraitType.PLAY);
+
+			media.addEventListener(MediaElementEvent.TRAIT_ADD, onTraitAdd);
+			media.addEventListener(MediaElementEvent.TRAIT_REMOVE, onTraitRemove);
+		}
+
+		/**
+		 * The number of TimelineMarker objects contained within this object.
+		 **/
+		public function get numMarkers():int
+		{
+			return temporalValueCollection ? temporalValueCollection.length : 0;
+		}
+
+		/**
+		 * Returns the TimelineMarker at the specified index.  Note that the
+		 * markers are sorted by time.
+		 *
+		 * @param index The index of the marker to return.
+		 *
+		 * @returns The marker at that index, null if there is no
+		 * such marker at that index.
+		 **/
+		public function getMarkerAt(index:int):TimelineMarker
+		{
+			if (index >= 0 && temporalValueCollection != null && index < temporalValueCollection.length)
+			{
+				return temporalValueCollection[index];
+			}
+			else
+			{
+				return null;
+			}
+		}
+
+		/**
+		 * Adds the specified TimelineMarker to this object.  This class
+		 * maintains the TimelineMarkers in time order.  If another TimelineMarker
+		 * with the same time value exists within this object, then the existing
+		 * value will be overwritten.
+		 *
+		 * @param marker The marker to add.
+		 *
+		 * @throws ArgumentError If marker is null or specifies an invalid time.
+		 **/
+		public function addMarker(marker:TimelineMarker):void
+		{
+			if (marker == null)
+			{
+				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
+			}
+
+			addValue("" + marker.time, marker);
+		}
+
+		/**
+		 * Removes the specified TimelineMarker from this object.
+		 *
+		 * @param marker The marker to remove.
+		 *
+		 * @returns The removed marker, null if the specified marker is not
+		 * contained within this object.
+		 *
+		 * @throws ArgumentError If marker is null.
+		 **/
+		public function removeMarker(marker:TimelineMarker):TimelineMarker
+		{
+			if (marker == null)
+			{
+				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
+			}
+
+			return removeValue("" + marker.time);
+		}
+
+		/**
+		 * @private
+		 */
+		override public function addValue(key:String, value:Object):void
+		{
+			var time:Number = new Number(key);
+			var marker:TimelineMarker = value as TimelineMarker;
+
+			if (key == null || isNaN(time) || time < 0 || marker == null)
+			{
+				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
+			}
+
+			if (temporalValueCollection == null)
+			{
+				temporalKeyCollection = new Vector.<Number>();
+				temporalKeyCollection.push(time);
+
+				temporalValueCollection = new Vector.<TimelineMarker>();
+				temporalValueCollection.push(value);
+			}
+			else
+			{
+				// Find the index where we should insert this value
+				var index:int = findTemporalMetadata(0, temporalValueCollection.length - 1, time);
+
+				// A negative index value means it doesn't exist in the array and the absolute value is the
+				// index where it should be inserted.  A positive index means a value exists and in this
+				// case we'll overwrite the existing value rather than insert a duplicate.
+				if (index < 0)
+				{
+					index *= -1;
+					temporalKeyCollection.splice(index, 0, time);
+					temporalValueCollection.splice(index, 0, marker);
+				}
+
+				// Make sure we don't insert a dup at index 0
+				else if ((index == 0) && temporalKeyCollection.length &&  (time != temporalKeyCollection[0]))
+				{
+					temporalKeyCollection.splice(index, 0, time);
+					temporalValueCollection.splice(index, 0, marker);
+				}
+				else
+				{
+					temporalKeyCollection[index] = time;
+					temporalValueCollection[index] = marker;
+				}
+			}
+
+			enabled = true;
+
+			dispatchEvent(new MetadataEvent(MetadataEvent.VALUE_ADD, false, false, key, marker));
+			dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_ADD, false, false, marker));
+		}
+
+		/**
+		 * @private
+		 **/
+		override public function removeValue(key:String):*
+		{
+			if (key == null)
+			{
+				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM));
+			}
+
+			var time:Number = new Number(key);
+
+			var result:* = null;
+
+			// Also remove from our collections.
+			var index:int = temporalValueCollection ? findTemporalMetadata(0, temporalValueCollection.length - 1, time) : -1;
+			if (index >= 0)
+			{
+				temporalKeyCollection.splice(index, 1);
+				result = temporalValueCollection.splice(index, 1)[0];
+
+				// If we just removed the last one, clean up and stop the interval timer (fix for FM-1052)
+				if (temporalValueCollection.length == 0)
+				{
+					reset(false);
+					temporalValueCollection = null;
+					temporalKeyCollection = null;
+				}
+
+				dispatchEvent(new MetadataEvent(MetadataEvent.VALUE_REMOVE, false, false, key, result));
+				dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_REMOVE, false, false, result as TimelineMarker));
+			}
+
+			return result;
+		}
+
+		/**
+		 * @private
+		 */
+		override public function getValue(key:String):*
+		{
+			if (key == null)
+			{
+				throw new ArgumentError(OSMFStrings.getString(OSMFStrings.NULL_PARAM));
+			}
+
+			var time:Number = new Number(key);
+			if (!isNaN(time))
+			{
+				for (var i:int = 0; i < temporalKeyCollection.length; i++)
+				{
+					var keyTime:Number = temporalKeyCollection[i];
+					if (keyTime == time)
+					{
+						return temporalValueCollection[i];
+					}
+				}
+			}
+
+			return null;
+		}
+
+		/**
+		 * @private
+		 *
+		 * Enables/disables this metadata object (enabled by default). If enabled, the
+		 * class will dispatch events of type TimelineMetadataEvent. Setting
+		 * this property to false will cause the class to stop
+		 * dispatching events.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		public function get enabled():Boolean
+		{
+			return _enabled;
+		}
+
+		/**
+		 * @private
+		 **/
+		public function set enabled(value:Boolean):void
+		{
+			_enabled = value;
+			reset(value);
+		}
+
+		/**
+		 * Starts / stops the interval timer.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		private function startTimer(start:Boolean=true):void
+		{
+			if (!start)
+			{
+				intervalTimer.stop();
+			}
+			else if (	timeTrait != null
+					 && temporalValueCollection != null
+					 && temporalValueCollection.length > 0
+					 && restartTimer
+					 && enabled
+					 && !intervalTimer.running
+					)
+			{
+				// If there is a PlayTrait and the media isn't playing, there is no reason to
+				// start the timer.
+				if (playTrait != null && playTrait.playState == PlayState.PLAYING)
+				{
+					intervalTimer.start();
+				}
+			}
+		}
+
+		/**
+		 * Perform a reset on the class' internal state.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		private function reset(startTimer:Boolean):void
+		{
+			lastFiredTemporalMetadataIndex = -1;
+			restartTimer = true;
+			intervalTimer.reset();
+			intervalTimer.delay = CHECK_INTERVAL;
+
+			if (startTimer)
+			{
+				this.startTimer();
+			}
+		}
+
+		/**
+		 * The interval timer callback. Checks for temporal metadata
+		 * around the current TimeTrait.currentTime and dispatches an event
+		 * if found.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+   		private function checkForTemporalMetadata():void
+   		{
+			var now:Number = timeTrait.currentTime;
+
+			// Start looking one index past the last one we found
+			var index:int = findTemporalMetadata(lastFiredTemporalMetadataIndex + 1, temporalValueCollection.length - 1, now);
+
+			// A negative index value means it doesn't exist in the collection and the absolute value is the
+			// index where it should be inserted.  Therefore, to get the closest match, we'll look at the index
+			// before this one.  A positive index means an exact match was found.
+			if (index <= 0)
+			{
+				index *= -1;
+				index = (index > 0) ? (index - 1) : 0;
+			}
+
+			// See if the value at this index is within our tolerance
+			if (!checkTemporalMetadata(index, now) && ((index + 1) < temporalValueCollection.length))
+			{
+				// Look at the next one, see if it is close enough to fire
+				checkTemporalMetadata(index+1, now);
+			}
+   		}
+
+   		private function setupTraitEventListener(traitType:String, add:Boolean=true):void
+   		{
+   			if (add)
+   			{
+	   			if (traitType == MediaTraitType.SEEK && seekTrait != null)
+	   			{
+					seekTrait.addEventListener(SeekEvent.SEEKING_CHANGE, onSeekingChange);
+	   			}
+
+	   			else if (traitType == MediaTraitType.PLAY && playTrait != null)
+	   			{
+	   				playTrait.addEventListener(PlayEvent.PLAY_STATE_CHANGE, onPlayStateChange);
+
+	   				// We need to check the playing state, if the media is already playing, we won't
+	   				// get the play state change event and the interval timer will never start.
+	   				if (playTrait.playState == PlayState.PLAYING)
+	   				{
+	   					var event:PlayEvent = new PlayEvent(PlayEvent.PLAY_STATE_CHANGE, false, false, PlayState.PLAYING);
+	   					onPlayStateChange(event);
+	   				}
+	   			}
+	   		}
+	   		else
+	   		{
+	   			if (traitType == MediaTraitType.SEEK && seekTrait != null)
+	   			{
+					seekTrait.removeEventListener(SeekEvent.SEEKING_CHANGE, onSeekingChange);
+	   			}
+
+	   			else if (traitType == MediaTraitType.PLAY && playTrait != null)
+	   			{
+	   				playTrait.removeEventListener(PlayEvent.PLAY_STATE_CHANGE, onPlayStateChange);
+	   			}
+	   		}
+   		}
+
+   		private function onSeekingChange(event:SeekEvent):void
+   		{
+   			if (event.seeking)
+   			{
+   				reset(true);
+   			}
+   		}
+
+   		private function onPlayStateChange(event:PlayEvent):void
+   		{
+   			var timer:Timer;
+   			if (event.playState == PlayState.PLAYING)
+   			{
+   				// Start any duration timers.
+   				if (durationTimers != null)
+   				{
+   					for each (timer in durationTimers)
+   					{
+   						timer.start();
+   					}
+   				}
+   				startTimer();
+   			}
+   			else
+   			{
+  				// Pause any duration timers.
+   				if (durationTimers != null)
+   				{
+   					for each (timer in durationTimers)
+   					{
+   						timer.stop();
+   					}
+   				}
+
+   				startTimer(false);
+   			}
+   		}
+
+		/**
+		 * Returns the index of the temporal metadata object matching the time. If no match is found, returns
+		 * the index where the value should be inserted as a negative number.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		private function findTemporalMetadata(firstIndex:int, lastIndex:int, time:Number):int
+		{
+			if (firstIndex <= lastIndex)
+			{
+				var mid:int = (firstIndex + lastIndex) / 2;	// divide and conquer
+				if (time == temporalKeyCollection[mid])
+				{
+					return mid;
+				}
+				else if (time < temporalKeyCollection[mid])
+				{
+					// search the lower part
+					return findTemporalMetadata(firstIndex, mid - 1, time);
+				}
+				else
+				{
+					// search the upper part
+					return findTemporalMetadata(mid + 1, lastIndex, time);
+				}
+			}
+			return -(firstIndex);
+		}
+
+		/**
+		 * Dispatch the events for this temporal value. If there is a duration
+		 * property on the value, dispatch a duration reached event after the
+		 * proper amount of time has passed.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		private function dispatchTemporalEvents(index:int):void
+		{
+			var marker:TimelineMarker = temporalValueCollection[index];
+			dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_TIME_REACHED, false, false, marker));
+
+			if (marker.duration > 0)
+			{
+				var timer:Timer = new Timer(CHECK_INTERVAL);
+				var endTime:Number = marker.time + marker.duration;
+
+				// Add it to the dictionary of duration timers so we can pause it
+				// if the media pauses.
+				if (durationTimers == null)
+				{
+					durationTimers = new Dictionary();
+				}
+				durationTimers[marker] = timer;
+
+				timer.addEventListener(TimerEvent.TIMER, onDurationTimer);
+				timer.start();
+
+				function onDurationTimer(event:TimerEvent):void
+				{
+					if (timeTrait && timeTrait.currentTime >= endTime)
+					{
+						timer.removeEventListener(TimerEvent.TIMER, onDurationTimer);
+						delete durationTimers[marker];
+						dispatchEvent(new TimelineMetadataEvent(TimelineMetadataEvent.MARKER_DURATION_REACHED, false, false, marker));
+					}
+				}
+			}
+		}
+
+   		/**
+   		 * Checks the item at the index passed in with the time passed in.
+   		 * If the item time is within the class' tolerance, an event is dispatched.
+   		 *
+   		 * Returns True if a match was found, otherwise False.
+   		 *
+   		 *  @langversion 3.0
+   		 *  @playerversion Flash 10
+   		 *  @playerversion AIR 1.5
+   		 *  @productversion OSMF 1.0
+   		 */
+   		private function checkTemporalMetadata(index:int, now:Number):Boolean
+   		{
+			if (!temporalValueCollection || !temporalValueCollection.length)
+			{
+				return false;
+			}
+
+			var result:Boolean = false;
+
+			if ( 	(temporalValueCollection[index].time >= (now - TOLERANCE))
+				&& 	(temporalValueCollection[index].time <= (now + TOLERANCE))
+				&&	(index != lastFiredTemporalMetadataIndex)
+			   )
+			{
+				lastFiredTemporalMetadataIndex = index;
+
+				dispatchTemporalEvents(index);
+
+				// Adjust the timer interval if necessary
+				var thisTime:Number = temporalKeyCollection[index];
+				// Get the next time value after this one so we can decide to adjust the timer interval
+				var nextTime:Number = calcNextTime(index);
+
+			//	var newDelay:Number = ((nextTime - thisTime)*1000)/4;
+			//	newDelay = (newDelay > CHECK_INTERVAL) ? newDelay : CHECK_INTERVAL;
+
+				// If no more data, stop the timer
+				if (thisTime == nextTime)
+				{
+					startTimer(false);
+					restartTimer = false;
+				}
+				/*else if (newDelay != intervalTimer.delay)
+				{
+					intervalTimer.reset();
+					intervalTimer.delay = newDelay;
+					startTimer();
+				}*/
+				result = true;
+			}
+
+			// If we've optimized the interval time by reseting the delay, we could miss a data point
+			//    if it happens to fall between this check and next one.
+			// See if we are going to miss a data point (meaning there is one between now and the
+			//    next interval timer event).  If so, drop back down to the default check interval.
+			else if ((intervalTimer.delay != CHECK_INTERVAL) && ((now + (intervalTimer.delay/1000)) > calcNextTime(index)))
+			{
+				this.intervalTimer.reset();
+				this.intervalTimer.delay = CHECK_INTERVAL;
+				startTimer();
+			}
+			return result;
+   		}
+
+		private function calcNextTime(index:int):Number
+		{
+			return temporalValueCollection [ index + 1 < temporalKeyCollection.length
+										  	 ? index + 1
+					  		  				 : temporalKeyCollection.length - 1
+					 						].time;
+		}
+
+		/**
+		 * The interval timer event handler.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		private function onIntervalTimer(event:TimerEvent):void
+		{
+			checkForTemporalMetadata();
+		}
+
+		/**
+		 * Called when traits are added to the media element.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		private function onTraitAdd(event:MediaElementEvent):void
+		{
+			switch (event.traitType)
+			{
+				case MediaTraitType.TIME:
+					timeTrait = media.getTrait(MediaTraitType.TIME) as TimeTrait;
+					startTimer();
+					break;
+				case MediaTraitType.SEEK:
+					seekTrait = media.getTrait(MediaTraitType.SEEK) as SeekTrait;
+					break;
+				case MediaTraitType.PLAY:
+					playTrait = media.getTrait(MediaTraitType.PLAY) as PlayTrait;
+					break;
+			}
+
+			setupTraitEventListener(event.traitType);
+		}
+
+		/**
+		 * Called when traits are removed from the media element.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion OSMF 1.0
+		 */
+		private function onTraitRemove(event:MediaElementEvent):void
+		{
+			// Remove any event listeners
+			setupTraitEventListener(event.traitType, false);
+
+			switch (event.traitType)
+			{
+				case MediaTraitType.TIME:
+					timeTrait = null;
+					// This is a work around for FM-171. Traits are added and removed for
+					// each child in a composition element when transitioning between child
+					// elements. So don't stop the timer if the MediaElement is a composition
+					// (which we determine by looking for the numChildren property, since
+					// we don't want to link the composition classes in by default).
+					if (media.hasOwnProperty("numChildren") == false)
+					{
+						startTimer(false);
+					}
+					break;
+				case MediaTraitType.SEEK:
+					seekTrait = null;
+					break;
+				case MediaTraitType.PLAY:
+					playTrait = null;
+					break;
+			}
+		}
+
+		private static const CHECK_INTERVAL:Number = 100;	// The default interval (in milliseconds) the
+															// class will check for temporal metadata
+		private static const TOLERANCE:Number = 0.25;	// A value must be within this tolerence to trigger
+														//	a timeReached event.
+		private var temporalKeyCollection:Vector.<Number>;
+		private var temporalValueCollection:Vector.<TimelineMarker>;
+		private var media:MediaElement;
+		private var timeTrait:TimeTrait;
+		private var seekTrait:SeekTrait;
+		private var playTrait:PlayTrait;
+		private var lastFiredTemporalMetadataIndex:int;
+		private var intervalTimer:Timer;
+		private var restartTimer:Boolean;
+		private var _enabled:Boolean;
+		private var durationTimers:Dictionary;
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12436
Author:   smgilson@adobe.com
Date:     2009-12-03T16:08:12.117370Z

Log Message:
-----------
ASDoc localization prep

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/framework/src/mx/automation/IAutomationObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>

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

--- frameworks/projects/framework/src/mx/automation/IAutomationObject.as
+++ frameworks/projects/framework/src/mx/automation/IAutomationObject.as
@@ -225,9 +225,9 @@
      *  @productversion Flex 3
      */
     function createAutomationIDPart(child:IAutomationObject):Object;
-
-    /**
-     *  Returns a set of properties as automation ID that identify the child within
+
+    /**
+     *  Returns a set of properties as automation IDs that identify the child within
      *  this container.  These values should not change during the
      *  lifespan of the application
      *
@@ -276,7 +276,7 @@
      *  @productversion Flex 3
      */
     function getAutomationChildAt(index:int):IAutomationObject;
-
+
     /**
      *  Provides the automation object list .  This list
      *  does not include any children that are composites.


Transferred from the Adobe Open Source Subversion Repository

Revision: 9419
Author:   aharui@adobe.com
Date:     2009-08-20T16:19:04.456854Z

Log Message:
-----------
2nd attempt to check in prototypes of ControlBars in Panel and Application, Spark Containers in Halo Navigators, Halo ViewStack in Spark ButtonBar.  APIs should match spec but are subject to change from PARB.  Skins are subject to tweaking after XD review

QE Notes: The following tests will fail and need updating:
gumbo/containers/Panel/Properties/Panel_Properties_position Panel_Properties_rotate
apollo/spark/components/Window/properties/window_properties_titleIcon_tests titleIcon_test8

Doc Notes: None
Bugs: None
Reviewer: Darrell, Glenn, Ryan
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/Application, gumbo/components/ButtonBar, gumbo/containers/Panel, apollo/gumbo/spark/Window, containers/ViewStack, containers/Accordion,
states/Integration/TabNavApp, states/Reparent

Modified Paths:
--------------
<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/airframework/src/spark/skins/spark/SparkChromeWindowedApplicationSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NavigatorChild.as" copyfrom-rev="9399" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NavigatorChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatable.as" copyfrom-rev="9399" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</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/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatorContent.as" copyfrom-rev="9399" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatorContent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as" copyfrom-rev="9399" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ApplicationSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -11,16 +11,16 @@

 package spark.components
 {
-
 import mx.collections.IList;
 import spark.components.Group;
 import mx.core.mx_internal;
 import spark.components.supportClasses.SkinnableComponent;
 import spark.components.supportClasses.SkinnableContainerBase;
 import mx.core.ContainerCreationPolicy;
-import spark.core.IDeferredContentOwner;
+import mx.core.IDeferredContentOwner;
 import mx.core.IDeferredInstance;
 import mx.core.IFactory;
+import mx.core.INavigatorContent;
 import mx.core.IVisualElement;
 import mx.core.IVisualElementContainer;
 import mx.core.IUIComponent;
@@ -1123,11 +1123,27 @@
                     mxmlContent = deferredContent as Array;
                 else
                     mxmlContent = [deferredContent];
+                _deferredContentCreated = true;
                 dispatchEvent(new FlexEvent(FlexEvent.CONTENT_CREATION_COMPLETE));
             }
         }
     }
-
+
+    private var _deferredContentCreated:Boolean;
+
+    /**
+     *  True if deferred content has been created
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get deferredContentCreated():Boolean
+    {
+        return _deferredContentCreated;
+    }
+
     /**
      *  @private
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 20346
Author:   mhorn@adobe.com
Date:     2011-02-17T17:01:02.113472Z

Log Message:
-----------
fix some broken xrefs and make other minor asdoc updates

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElementContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/core/IGraphicElementContainer.as
+++ frameworks/projects/spark/src/spark/core/IGraphicElementContainer.as
@@ -28,14 +28,14 @@
 public interface IGraphicElementContainer
 {
     /**
-     *  Notify the host that an element layer has changed.
+     *  Notify the host component that an element layer has changed.
      *
-     *  The IGraphicElementContainer must re-evaluates the sequences of
+     *
The IGraphicElementContainer must re-evaluates the sequences of
      *  graphic elements with shared DisplayObjects and may need to re-assign the
-     *  DisplayObjects and redraw the sequences as a result.
+     *  DisplayObjects and redraw the sequences as a result.

      *
-     *  Typically the host will perform this in its
-     *  validateProperties() method.
+     *
Typically the host will perform this in its
+     *  validateProperties() method.

      *
      *  @param element The element that has changed size.
      *
@@ -49,11 +49,11 @@
     /**
      *  Notify the host component that an element changed and needs to validate properties.
      *
-     *  The IGraphicElementContainer must call the validateProperties()
-     *  method on the IGraphicElement to give it a chance to commit its properties.
+     *
The IGraphicElementContainer must call the validateProperties()
+     *  method on the IGraphicElement to give it a chance to commit its properties.

      *
-     *  Typically the host will validate the elements' properties in its
-     *  validateProperties() method.
+     *
Typically the host will validate the elements' properties in its
+     *  validateProperties() method.

      *
      *  @param element The element that has changed.
      *
@@ -67,11 +67,11 @@
     /**
      *  Notify the host component that an element size has changed.
      *
-     *  The IGraphicElementContainer must call the validateSize()
-     *  method on the IGraphicElement to give it a chance to validate its size.
+     *
The IGraphicElementContainer must call the validateSize()
+     *  method on the IGraphicElement to give it a chance to validate its size.

      *
-     *  Typically the host will validate the elements' size in its
-     *  validateSize() method.
+     *
Typically the host will validate the elements' size in its
+     *  validateSize() method.

      *
      *  @param element The element that has changed size.
      *
@@ -85,11 +85,11 @@
     /**
      *  Notify the host component that an element has changed and needs to be redrawn.
      *
-     *  The IGraphicElementContainer must call the validateDisplayList()
-     *  method on the IGraphicElement to give it a chance to redraw.
+     *
The IGraphicElementContainer must call the validateDisplayList()
+     *  method on the IGraphicElement to give it a chance to redraw.

      *
-     *  Typically the host will validate the elements' display lists in its
-     *  validateDisplayList() method.
+     *
Typically the host will validate the elements' display lists in its
+     *  validateDisplayList() method.

      *
      *  @param element The element that has changed.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 18514
Author:   dthakkar@adobe.com
Date:     2010-11-10T00:38:39.528767Z

Log Message:
-----------
QE notes: Some testcases in spark formatters are failing because of behavior change. These testcases are excluded prior to submission. Globalization QE team has been informed about this.
Doc notes: Spark Formatters ASDocs are updated and also added samples for the spark formatters.
Bugs: SDK-28145, SDK-28345 ,SDK-28320 ,SDK-28287,SDK-28314
Reviewer: Gordon , Craig, Masa, Xie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/MatchingCollatorExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberValidatorTests.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyValidatorTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample1.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample1.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/bundles/en_US/validators.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/SortingCollator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/SortingCollatorExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/StringToolsExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/IValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationValidatorBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample2.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample2.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/Validator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/DateTimeFormatterExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberFormatterBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/MatchingCollator.as</path>

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

--- frameworks/projects/spark/src/spark/globalization/SortingCollator.as
+++ frameworks/projects/spark/src/spark/globalization/SortingCollator.as
@@ -20,24 +20,25 @@
  *  The SortingCollator class provides locale-sensitve string
  *  comparison capabilities with inital settings suitable for linguistic
  *  sorting purposes such as sorting a list of
- *  text strings that are displayed to an end user.
+ *  text strings that are displayed to an end-user.
  *
  *
This class is a wrapper class around the
  *  flash.globalization.Collator.
  *  Therefore the locale-specific string comparison is provided by the
  *  flash.globalization.Collator.
- *  However this SortingCollator class can be used in MXML declartions, uses
+ *  However, this SortingCollator class can be used in MXML declartions, uses
  *  the locale style for the requested Locale ID name, and has methods and
  *  properties that are bindable.
- *  Additionally events are generated if there is an error or warning
+ *  Additionally, LastOperationStatus is set, if there is an error or warning
  *  generated by the flash.globalization class.

  *
- *
The flash.globalization.Collator class use the underlying operating
+ *
The flash.globalization.Collator class uses the underlying operating
  *  system for the formatting functionality and to supply the locale
  *  specific data.
  *  On some operating systems, the flash.globalization classes are
- *  unsupported, this wrapper class provides a fallback functionality in
- *  this case.

+ *  unsupported, this wrapper class provides a fallback functionality.

+ *
+ *  @includeExample examples/SortingCollatorExample.mxml
  *
  *  @see flash.globalization.Collator
  */
@@ -70,33 +71,35 @@
      *  CollatorMode.SORTING.
      *  For more details and examples of this mode, please
      *  see the documentation for the
-     *  flash.globalization.Collator class
+     *  flash.globalization.Collator class.
      *

      *
      *
The locale for this class is supplied by the locale style.
      *  The locale style can be set in several ways:

      *
      *

-     *
Inheriting the style from a UIComponent by calling the
+     *
Inheriting the style from a UIComponent by calling the
      *          UIComponent's addStyleClient method.

      *
By using the class in an MXML declaration and inheriting the
      *          locale from the document that contains the declaration.
      *  <listing version="3.0">
+     *  Example:
      *  <fx:Declarations>
-     *         <s:StringTools id="st" />
+     *         <s:SortingCollator id="sc" />
      *  </fx:Declarations>
      *  </listing>
      *

      *
By using an MXML declaration and specifying the locale value
      *              in the list of assignments.
      *  <listing version="3.0">
+     *  Example:
      *  <fx:Declarations>
-     *      <s:StringTools id="st_turkish" locale="tr-TR" />
+     *      <s:SortingCollator id="sc_France" locale="fr-FR" />
      *  </fx:Declarations>
      *  </listing>
      *

      *
Calling the setStyle method, e.g.
-     *              st.setStyle("locale", "tr-TR")

+     *              sc.setStyle("locale", "fr-FR")

      *

      *
      *
If the locale style is not set by one of the above techniques, the
@@ -107,10 +110,10 @@
      *

      *
      *  @see flash.globalization.Collator
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
-     *  @productversion Flash CS5
      */
     public function SortingCollator()
     {


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

--- frameworks/projects/framework/src/mx/effects/EffectManager.as
+++ frameworks/projects/framework/src/mx/effects/EffectManager.as
@@ -47,6 +47,11 @@
  *  For each event, corresponding to an event trigger, it determines if
  *  there is an effect assigned to the object.
  *  If an effect is defined, it plays the effect.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class EffectManager extends EventDispatcher
 {
@@ -136,6 +141,11 @@
 	 *  resumeEventHandling().
 	 *  Used internally so that an effect that is updating the screen
 	 *  does not cause another effect to be triggered.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function suspendEventHandling():void
 	{
@@ -149,6 +159,11 @@
 	 *  suspendEventHandling() method
 	 *  so that an effect that is updating the screen
 	 *  does not cause another effect to be triggered.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function resumeEventHandling():void
 	{
@@ -159,6 +174,11 @@
 	 *  Immediately ends any effects currently playing on a target.
 	 *
 	 *  @param target The target component on which to end all effects.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function endEffectsForTarget(target:IUIComponent):void
 	{
@@ -704,6 +724,11 @@
 						{
 							return;
 						}
+						*
+						*  @langversion 3.0
+						*  @playerversion Flash 9
+						*  @playerversion AIR 1.1
+						*  @productversion Flex 3
 						*/

 						otherInst.end();
@@ -857,6 +882,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function EffectNode(factory:Effect, instance:EffectInstance)
 	{