Transferred from the Adobe Open Source Subversion Repository

Revision: 43
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-19T23:38:28.615256Z

Log Message:
-----------
Perforce Change 191553 by dsubrama@DSUBRAMA-XP on 2007/12/19 18:37:16 Prevent erroneous tooltips. Cycloned by Joan. Bugs: SDK-13465 QA: Yes Doc: No

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

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

--- frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
@@ -582,6 +582,15 @@
     	if (!target || !target.stage)
     		return false;

+    	//SDK:13465 - If we pass through the above if block, then
+    	//we have a target component and its been added to the
+    	//display list. If the mouse coordinates are (0,0), there
+    	//is a chance the component has not been positioned yet
+    	//and we'll end up mistakenly showing tooltips since the
+    	//target hitTest will return true.
+    	if ((target.stage.mouseX == 0)	 && (target.stage.mouseY == 0))
+    		return false;
+
     	return target.hitTestPoint(target.stage.mouseX,
     							   target.stage.mouseY, true);
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 972
Author:   mhorn@adobe.com
Date:     2008-03-27T20:24:16.905716Z

Log Message:
-----------
Minor ASDoc fixes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/AbstractTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 9207
Author:   dsubrama@adobe.com
Date:     2009-08-10T20:06:36.793713Z

Log Message:
-----------
SDK-22608 – GraphicElement.rotation should not be bindable since it doesn’t satisfy either of the “bindable requirements” – the property is never set “under the covers” by other framework code and its something not settable by the end-user of the application.

SDK-22631 – Request from Design View. They need a way to distinguish whether the dynamic event, callLaterError, is dispatched from UIComponent or LayoutManager. I added a field on the dynamic event object, source, which refers back to the emitter. Additionally, cleaned up the incorrect copy&pasted comment in LayoutManager.

QE notes: None beyond regression
Doc notes: No
Bugs: SDK-22608, SDK-22631
Reviewer: Alex
Tests run: Checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/managers/LayoutManager.as
+++ frameworks/projects/framework/src/mx/managers/LayoutManager.as
@@ -1060,15 +1060,11 @@
         systemManager.removeEventListener(Event.ENTER_FRAME, doPhasedInstantiationCallback);
         systemManager.removeEventListener(Event.RENDER, doPhasedInstantiationCallback);

-        // At run-time, callLaterDispatcher2() is called
-        // without a surrounding try-catch.
         if (!UIComponentGlobals.catchCallLaterExceptions)
         {
             doPhasedInstantiation();
         }

-        // At design-time, callLaterDispatcher2() is called
-        // with a surrounding try-catch.
         else
         {
             try
@@ -1077,8 +1073,10 @@
             }
             catch(e:Error)
             {
+                // Dispatch a callLaterError dynamic event for Design View.
                 var callLaterErrorEvent:DynamicEvent = new DynamicEvent("callLaterError");
                 callLaterErrorEvent.error = e;
+                callLaterErrorEvent.source = this;
                 systemManager.dispatchEvent(callLaterErrorEvent);
             }
         }


Increment and counterpart don't work with FlexJS '_get()' and '_set()'

In FlexJS, all properties are converted to a set of methods, with '_get' and '_set' postfix. Calling an increment on a property in AS - myProp++ - will thus translate to 'myProp_get()++' in JS. And JS strongly objects to that syntax.

Signed-off-by: Erik de Bruin <c195b508e6f0c57aeafdb5e96947e2b79e6a4b40@ixsoftware.nl>

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -1752,7 +1752,7 @@
     {
         // Adjust the partition indexes before the
         // "added" event is dispatched.
-        noTopMostIndex++;
+        noTopMostIndex = noTopMostIndex + 1;

         var oldParent:DisplayObjectContainer = child.parent;
         if (oldParent)
@@ -1790,7 +1790,7 @@
     {
         // Adjust the partition indexes
         // before the "removed" event is dispatched.
-        noTopMostIndex--;
+        noTopMostIndex = noTopMostIndex - 1;

         return rawChildren_removeChild(child);
     }
@@ -1802,7 +1802,7 @@
     {
         // Adjust the partition indexes
         // before the "removed" event is dispatched.
-        noTopMostIndex--;
+        noTopMostIndex = noTopMostIndex - 1;

         return rawChildren_removeChildAt(applicationIndex + index);
     }
@@ -2658,7 +2658,7 @@
         mouseCatcher.name = "mouseCatcher";
         // Must use addChildAt because a creationComplete handler can create a
         // dialog and insert it at 0.
-        noTopMostIndex++;
+        noTopMostIndex = noTopMostIndex + 1;
         super.addChildAt(mouseCatcher, 0);
         resizeMouseCatcher();
         if (!topLevel)
@@ -2668,7 +2668,7 @@
         }

         // Add the application as child 1.
-        noTopMostIndex++;
+        noTopMostIndex = noTopMostIndex + 1;
         super.addChildAt(DisplayObject(app), 1);

         CONFIG::performanceInstrumentation


Transferred from the Adobe Open Source Subversion Repository

Revision: 9857
Author:   jimurphy@adobe.com
Date:     2009-09-01T01:02:58.854673Z

Log Message:
-----------
Merged 3.x revisions 9543,9658,9748,9837 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/OrderedProperties.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -1580,11 +1580,11 @@
 	 */
 	override public function addChild(child:DisplayObject):DisplayObject
 	{
-		// Adjust the partition indexes
-		// before the "added" event is dispatched.
-		noTopMostIndex++;
-
-		return rawChildren_addChildAt(child, noTopMostIndex - 1);
+        var addIndex:int = numChildren;
+        if (child.parent == this)
+            addIndex--;
+
+        return addChildAt(child, addIndex);
 	}

 	/**
@@ -1593,10 +1593,14 @@
 	override public function addChildAt(child:DisplayObject,
 										index:int):DisplayObject
 	{
-		// Adjust the partition indexes
-		// before the "added" event is dispatched.
+        // Adjust the partition indexes before the
+        // "added" event is dispatched.
 		noTopMostIndex++;

+        var oldParent:DisplayObjectContainer = child.parent;
+        if (oldParent)
+            oldParent.removeChild(child);
+
 		return rawChildren_addChildAt(child, applicationIndex + index);
 	}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4726
Author:   gosmith@adobe.com
Date:     2009-01-29T02:47:59.868818Z

Log Message:
-----------
Accessibility changes to the MSAA name of several components, as requested by Freedom Scientific. These changes make Flex controls behave more like standard Windows controls.

In Accordion and TabBar, the name is now just what is displayed, without " Tab" or " Tab, Active" appended.

In ComboBox, List, and Tree, the name of each item is now just what it displays, without, for example, "2 of 7" appended.

Removed an artificial limit of 100000 items in List and Menu.

A Slider with an MXML id no longer returns that id as its name; no other component does this and id's are certainly no intended to be spoken.

Removed the getName() method of ComboBase, which isn't used.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/DataGridAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/DataGridAccImpl.as
@@ -389,14 +389,12 @@
 	 */
 	override protected function getName(childID:uint):String
 	{
-		var dataGrid:DataGrid = DataGrid(master);
-		// 0 -> DataGrid
-		if (childID == 0 || childID > dataGrid.dataProvider.length)
+		if (childID == 0)
 			return "";

+		var dataGrid:DataGrid = DataGrid(master);
+
 		var name:String;
-
-

 		//1 to columnCount * Rows -> ItemRenderers
 		if (childID > 0) // see if this check needs to be given


Transferred from the Adobe Open Source Subversion Repository

Revision: 11449
Author:   rfrishbe@adobe.com
Date:     2009-11-05T01:09:57.699854Z

Log Message:
-----------
Adding OSMF to our framework.  The osmf.swc builds automatically as part of our build process.  I'm also adding new video classes that use OSMF, spark.components.VideoDisplay and spark.components.VideoPlayer2.  The other VideoElement and VideoPlayer will be replaced by these.  The new video components are not yet complete; this is an initial checkin for these components.

QE notes: -
Doc notes: -
Bugs: -
Reviewer: Deepa (only the build processes stuff)
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
283 paths were modified

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -9,32 +9,53 @@
 //
 ///////////////////////////////////////////////////////////////////////////////

-package spark.primitives
+package spark.components
 {
-
-// FIXME (rfrishbe): Change package name and classname
-
-import fl.video.DynamicStreamItem;
-import fl.video.MetadataEvent;
-import fl.video.NCManagerDynamicStream;
-import fl.video.VideoError;
-import fl.video.VideoEvent;
-import fl.video.VideoPlayer;
-import fl.video.VideoScaleMode;
-import fl.video.VideoState;
-import fl.video.flvplayback_internal;

 import flash.events.Event;
 import flash.events.ProgressEvent;
+import flash.geom.Point;
 import flash.media.Video;

 import mx.core.UIComponent;
 import mx.core.mx_internal;

-import spark.components.Group;
-import spark.components.mediaClasses.StreamItem;
-import spark.components.mediaClasses.StreamingVideoSource;
+import org.osmf.display.MediaPlayerSprite;
+import org.osmf.display.ScaleMode;
+import org.osmf.events.BufferTimeChangeEvent;
+import org.osmf.events.BytesDownloadedChangeEvent;
+import org.osmf.events.DimensionChangeEvent;
+import org.osmf.events.DurationChangeEvent;
+import org.osmf.events.LoadableStateChangeEvent;
+import org.osmf.events.MediaPlayerStateChangeEvent;
+import org.osmf.events.MutedChangeEvent;
+import org.osmf.events.PlayheadChangeEvent;
+import org.osmf.events.PlayingChangeEvent;
+import org.osmf.events.SeekingChangeEvent;
+import org.osmf.events.TraitEvent;
+import org.osmf.events.VolumeChangeEvent;
+import org.osmf.media.IMediaResource;
+import org.osmf.media.MediaFactory;
+import org.osmf.media.MediaPlayer;
+import org.osmf.media.MediaPlayerState;
+import org.osmf.media.URLResource;
+import org.osmf.net.NetLoader;
+import org.osmf.net.NetStreamCodes;
+import org.osmf.net.dynamicstreaming.DynamicStreamingItem;
+import org.osmf.net.dynamicstreaming.DynamicStreamingNetLoader;
+import org.osmf.net.dynamicstreaming.DynamicStreamingResource;
+import org.osmf.traits.ILoadable;
+import org.osmf.traits.LoadState;
+import org.osmf.traits.MediaTraitType;
+import org.osmf.utils.FMSURL;
+import org.osmf.utils.MediaFrameworkStrings;
+import org.osmf.utils.URL;
+import org.osmf.video.VideoElement;
+
+import spark.components.mediaClasses.DynamicStreamingVideoItem;
+import spark.components.mediaClasses.DynamicStreamingVideoSource;
 import spark.events.VideoEvent;
+import spark.primitives.BitmapImage;

 use namespace mx_internal;

@@ -143,10 +164,10 @@

 [DefaultProperty("source")]

-[IconFile("VideoElement.png")]
+[IconFile("VideoDisplay.png")]

 /**
- *  The VideoElement class is chromeless video player that supports
+ *  The VideoDisplay class is chromeless video player that supports
  *  progressive download, multi-bitrate, and streaming video.
  *
  *
VideoPlayer is the skinnable version.

@@ -158,7 +179,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class VideoElement extends UIComponent
+public class VideoDisplay extends UIComponent
 {
     include "../core/Version.as";

@@ -170,16 +191,14 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function VideoElement()
-    {
+    public function VideoDisplay()
+    {
+        // create the underlying MediaPlayer class first because
+        // the super() call will set enabled=true, and we have assumptions baked
+        // in to the component that videoPlayer is always around.
+        createUnderlyingVideoPlayer();
+
         super();
-
-        // set up the VideoPlayer's iNCManagerClass to point to our FlexNCManager,
-        // which is a private class
-        VideoPlayer.iNCManagerClass = FlexNCManager;
-
-        // create the underlying FLVPlayback class
-        createUnderlyingVideoPlayer();

         // added and removed event listeners to see whether we should
         // start or stop the video
@@ -198,7 +217,14 @@
      *  This is the underlying VideoPlayer object. At some point in the
      *  future, we may change to a new implementation.
      */
-    mx_internal var videoPlayer:VideoPlayer;
+    mx_internal var videoPlayer:MediaPlayer;
+
+    /**
+     *  @private
+     *  This is the underlying VideoPlayer object. At some point in the
+     *  future, we may change to a new implementation.
+     */
+    mx_internal var videoSprite:MediaPlayerSprite;

     //--------------------------------------------------------------------------
     //
@@ -210,13 +236,9 @@
     //  autoPlay
     //----------------------------------

-    /**
-     *  @private
-     *  Storage for autoPlay property.
-     */
+    [Inspectable(category="General", defaultValue="true")]
+
     private var _autoPlay:Boolean = true;
-
-    [Inspectable(category="General", defaultValue="true")]

     /**
      *  Specifies whether the video should start playing immediately when the
@@ -231,6 +253,10 @@
      *  the first frame to display.
      *  In the case of an HTTP download, Flex starts downloading the stream
      *  and shows the first frame.

+     *
+     *  If playWhenHidden is set to false, then
+     *  autoPlay also affects what happens when the video
+     *  comes back on stage and is enabled and visible.
      *
      *  @default true
      *
@@ -249,28 +275,34 @@
      */
     public function set autoPlay(value:Boolean):void
     {
-        if (_autoPlay == value)
+        if (autoPlay == value)
             return;

         _autoPlay = value;
-    }
-
-    /**
-     *  @private
-     *  Whether we should be playing or not
-     */
-    private function get effectivePlay():Boolean
-    {
-        return playWhenHidden || (visible && _isOnDisplayList && enabled && _parentVisibility);
-    }
-
-    /**
-     *  @private
-     *  Whether we should autoPlay or not
-     */
-    private function get effectiveAutoPlay():Boolean
-    {
-        return autoPlay && effectivePlay;
+        effectiveAutoPlayChanged(false);
+    }
+
+    // FIXME (rfrishbe): Copy this behavior correctly from the spark checked-in versions
+    private function effectiveAutoPlayChanged(takeAction:Boolean):void
+    {
+        if (!playWhenHidden)
+        {
+            var shouldBePlaying:Boolean = visible && _isOnDisplayList && enabled && _parentVisibility;
+
+            if (shouldBePlaying)
+            {
+                if (!playing && takeAction && videoPlayer.playable)
+                    play();
+            }
+            else
+            {
+                if (playing && takeAction && videoPlayer.playable)
+                    pause();
+            }
+
+            if (videoPlayer)
+                videoPlayer.autoPlay = shouldBePlaying && autoPlay;
+        }
     }

     //----------------------------------
@@ -295,7 +327,7 @@
      */
     public function get autoRewind():Boolean
     {
-        var myVideoPlayer:VideoPlayer = videoPlayer;
+        var myVideoPlayer:MediaPlayer = videoPlayer;
         return myVideoPlayer.autoRewind;
     }

@@ -334,24 +366,106 @@
         if (value == enabled)
             return;

-        if (!value)
-        {
-            if (playing)
-                pause();
-        }
-
         super.enabled = value;
+
+        effectiveAutoPlayChanged(true);
+    }
+
+    //----------------------------------
+    //  bytesDownloaded
+    //----------------------------------
+
+    [Bindable("bytesDownloadedChange")]
+    [Inspectable(Category="General", defaultValue="0")]
+
+    /**
+     *  The number of bytes of data that have been downloaded into the application.
+     *
+     *  @return The number of bytes of data that have been downloaded into the application.
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get bytesLoaded():Number
+    {
+        return videoPlayer.bytesDownloaded;
+    }
+
+    //----------------------------------
+    //  bytesTotal
+    //----------------------------------
+
+    [Inspectable(Category="General", defaultValue="0")]
+
+    /**
+     *  The total size in bytes of the data being downloaded into the application.
+     *
+     *  @return The total size in bytes of the data being downloaded into the application.
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get bytesTotal():Number
+    {
+        return videoPlayer.bytesTotal;
+    }
+
+    //----------------------------------
+    //  currentTime
+    //----------------------------------
+
+    [Bindable("playheadUpdate")]
+    [Bindable("playheadTimeChanged")]
+    [Inspectable(Category="General", defaultValue="0")]
+
+    /**
+     *  Current time of the playhead, measured in seconds,
+     *  since the video starting playing.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get currentTime():Number
+    {
+        return videoPlayer.currentTime;
+    }
+
+    //----------------------------------
+    //  duration
+    //----------------------------------
+
+    [Bindable("totalTimeChanged")]
+    [Inspectable(Category="General", defaultValue="0")]
+
+    /**
+     *  Duration of the video's playback, in seconds
+     *
+     *  @return The total running time of the video in seconds
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get duration():Number
+    {
+        return videoPlayer.duration;
     }

     //----------------------------------
     //  loop
     //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for loop property.
-     */
-    private var _loop:Boolean = false;

     [Inspectable(Category="General", defaultValue="false")]

@@ -370,7 +484,7 @@
      */
     public function get loop():Boolean
     {
-        return _loop;
+        return videoPlayer.loop;
     }

     /**
@@ -378,7 +492,10 @@
      */
     public function set loop(value:Boolean):void
     {
-        _loop = value;
+        if (loop == value)
+            return;
+
+        videoPlayer.loop = value;
     }

     //----------------------------------
@@ -391,59 +508,56 @@
      */
     private var _maintainAspectRatio:Boolean = true;

-    [Inspectable(Category="General", defaultValue="true")]
-
-    /**
-     *  Specifies whether the control should maintain the original aspect ratio
-     *  while resizing the video.
+    [Inspectable(Category="General", enumeration="none,stretch,letterBox,zoom", defaultValue="letterBox")]
+
+    /**
+     *  The scaleMode property describes different ways of
+     *  sizing the video content.  scaleMode can be set to
+     *  NONE, STRETCH, LETTERBOX or ZOOM.
      *
-     *
If no width, height, or constraints are specified on the VideoElement,
+     *
If no width, height, or constraints are specified on the component,
      *  this property has no effect.

      *
-     *  @default true
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get maintainAspectRatio():Boolean
-    {
-        return _maintainAspectRatio;
-    }
-
-    /**
-     *  @private
-     */
-    public function set maintainAspectRatio(value:Boolean):void
-    {
-        if (_maintainAspectRatio != value)
+     *  @default letterbox
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get scaleMode():String
+    {
+        return videoSprite.scaleMode.toString().toLowerCase();
+    }
+
+    /**
+     *  @private
+     */
+    public function set scaleMode(value:String):void
+    {
+        if (scaleMode != value)
         {
-            _maintainAspectRatio = value;
-
-            // VideoPlayer has MAINTAIN_ASPECT_RATIO, EXACT_FIT, and NO_SCALE
-            // We don't need to worry about NO_SCALE as that's just not putting
-            // an explicit width on the VideoElement.
-            if (value)
-                videoPlayer.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO;
-            else
-                videoPlayer.scaleMode = VideoScaleMode.EXACT_FIT;
-
-            invalidateSize();
-            invalidateDisplayList();
+            switch(value.toLowerCase())
+            {
+                case "none":
+                    videoSprite.scaleMode = ScaleMode.NONE;
+                    break;
+                case "stretch":
+                    videoSprite.scaleMode = ScaleMode.STRETCH;
+                    break;
+                case "letterbox":
+                    videoSprite.scaleMode = ScaleMode.LETTERBOX;
+                    break;
+                case "zoom":
+                    videoSprite.scaleMode = ScaleMode.ZOOM;
+                    break;
+            }
         }
     }

     //----------------------------------
     //  muted
     //----------------------------------
-
-    /**
-     *  @private
-     *  mutedVolume tracks what the volume was before we were
-     *  muted. If we aren't muted, mutedVolume = -1.
-     */
-    private var mutedVolume:Number = -1;

     [Inspectable(category="General", defaultValue="false")]
     [Bindable("volumeChanged")]
@@ -459,7 +573,7 @@
      */
     public function get muted():Boolean
     {
-        return mutedVolume != -1;
+        return videoPlayer.muted;
     }

     /**
@@ -467,109 +581,15 @@
      */
     public function set muted(value:Boolean):void
     {
-        // if trying to unmute and we're muted
-        if (!value && mutedVolume != -1)
-        {
-            videoPlayer.volume = mutedVolume;
-            mutedVolume = -1;
-            dispatchEvent(new Event("volumeChanged"));
-        }
-        // if trying to mute and we're not muted
-        else if (value && mutedVolume == -1)
-        {
-            mutedVolume = videoPlayer.volume;
-            videoPlayer.volume = 0;
-            dispatchEvent(new Event("volumeChanged"));
-        }
-    }
-
-    //----------------------------------
-    //  parentVisibility
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _parentVisibility:Boolean = true;
-
-    /**
-     *  @private
-     *  Used so that VideoPlayer can reach down and change our effectivePlay/effectiveAutoPlay flag
-     */
-    mx_internal function set parentVisibility(value:Boolean) : void
-    {
-        _parentVisibility = value;
-
-        // if we want our playback to be controlled by visibility
-        if (!playWhenHidden)
-        {
-            // if we shouldn't be playing and we are, then pause it
-            // otherwise if we aren't playing and we should be, then play
-            if (!effectivePlay && playing)
-                pause();
-            else if (effectiveAutoPlay && !playing)
-                play();
-        }
-    }
-
-    //----------------------------------
-    //  playheadTime
-    //----------------------------------
-
-    [Bindable("playheadUpdate")]
-    [Bindable("playheadTimeChanged")]
-    [Inspectable(Category="General", defaultValue="0")]
-
-    /**
-     *  Playhead position, measured in seconds, since the video starting
-     *  playing.
-     *  The event object for many of the VideoPlay events include the playhead
-     *  position so that you can determine the location in the video file where
-     *  the event occurred.
-     *
-     *
Setting this property to a value in seconds performs a seek
-     *  operation.
-     *  If the video is currently playing,
-     *  it continues playing from the new playhead position.
-     *  If the video is paused, it seeks to
-     *  the new playhead position and remains paused.
-     *  If the video is stopped, it seeks to
-     *  the new playhead position and enters the paused state.
-     *  Setting this property has no effect with live video streams.

-     *
-     *
If the new playhead position is less than 0 or NaN,
-     *  the control throws an exception. If the new playhead position
-     *  is past the end of the video, or past the amount of the video file
-     *  downloaded so far, then the control still attempts the seek.

-     *
-     *
For an FLV file, setting the playheadTime property seeks
-     *  to the keyframe closest to the specified position, where
-     *  keyframes are specified in the FLV file at the time of encoding.
-     *  Therefore, you might not seek to the exact time if there
-     *  is no keyframe specified at that position.

-     *
-     *
This property throws an exception if set when no stream is
-     *  connected.  Use the stateChange event and the
-     *  connected property to determine when it is
-     *  safe to set this property.

-     *
-     *  @default 0
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get playheadTime():Number
-    {
-        return videoPlayer.playheadTime;
+        if (muted == value)
+            return;
+
+        videoPlayer.muted = value;
     }

     //----------------------------------
     //  playing
     //----------------------------------
-
-    private var _playing:Boolean = false;

     [Inspectable(category="General")]
     [Bindable("playingChanged")]
@@ -591,24 +611,7 @@
      */
     public function get playing():Boolean
     {
-        return _playing;
-    }
-
-    /**
-     *  @private
-     *  Sets the playing variable to true or false and dispatches
-     *  the appropriate event.  We don't check to compare it to
-     *  the last value because we want this event to dispatch every
-     *  time.  This way when the playPauseButton is toggled in VideoPlayer,
-     *  this binding event has the last word as to whether we are actually
-     *  playing or paused (Someone could click the play button, but if there's
-     *  no source, we want to still show the play button rather than toggle it
-     *  as ToggleButton's do naturally).
-     */
-    private function setPlaying(value:Boolean):void
-    {
-        _playing = value;
-        dispatchEvent(new Event("playingChanged"));
+        return videoPlayer.playing;
     }

     //----------------------------------
@@ -651,16 +654,8 @@
     {
         _playWhenHidden = value;

-        // if we want our playback to be controlled by visibility
-        if (!playWhenHidden)
-        {
-            // if we shouldn't be playing and we are, then pause it
-            // otherwise if we aren't playing and we should be, then play
-            if (!effectivePlay && playing)
-                pause();
-            else if (effectiveAutoPlay && !playing)
-                play();
-        }
+        if (value)
+            videoPlayer.autoPlay = autoPlay;
     }

     //----------------------------------
@@ -669,15 +664,7 @@

     private var _source:Object;
     private var sourceChanged:Boolean;
-
-    /**
-     *  @private
-     *  Keeps track of the last source that's been played.  That way if
-     *  we've been paused, we pass in play(null) to the underlying video player.
-     *  Passing in play(source) resets the stream back to 0.
-     */
-    private var sourceLastPlayed:Object;
-
+
     [Bindable("sourceChanged")]
     [Inspectable(category="General", defaultValue="null")]

@@ -685,7 +672,7 @@
      *  For progressive download, the source is just a path or URL pointing
      *  to the video file to play.  For streaming (streaming, live streaming,
      *  or multi-bitrate streaming), the source property is a
-     *  StreamingVideoSource object.
+     *  DynamicStreamingVideoSource object.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -727,30 +714,67 @@
         dispatchEvent(new Event("sourceChanged"));
     }

-    /**
-     *  @private
-     *  Sets up the source for use.  Also throws away the underlying video player object
-     *  if needed.
+    override public function setVisible(value:Boolean, noEvent:Boolean=false) : void
+    {
+        super.setVisible(value, noEvent);
+
+        effectiveAutoPlayChanged(true);
+    }
+
+    private var _parentVisibility:Boolean = true;
+
+    mx_internal function set parentVisibility(value:Boolean) : void
+    {
+        _parentVisibility = value;
+
+        effectiveAutoPlayChanged(true);
+    }
+
+    /**
+     *  @private
+     *  Sets up the source for use.
      */
     private function setUpSource():void
     {
-        // Reset the video component under certain conditions:
-        // Only keep the video player if the last item played was a
-        // String and the current item being played is a String
-        // or if the last item was null or an empty string
-        if ( !((sourceLastPlayed is String && source is String) ||
-            (sourceLastPlayed == null || (sourceLastPlayed is String && String(sourceLastPlayed).length == 0))))
+        var videoElement:org.osmf.video.VideoElement;
+
+        // check for 2 cases: streaming video or progressive download
+        if (source is DynamicStreamingVideoSource)
         {
-            createUnderlyingVideoPlayer();
+            // the streaming video case.
+            // build up a DynamicStreamingResource to pass in to OSMF
+            var streamingSource:DynamicStreamingVideoSource = source as DynamicStreamingVideoSource;
+            var dsr:DynamicStreamingResource;
+
+            dsr =  new DynamicStreamingResource(new FMSURL(streamingSource.serverURI));
+
+            // if dealing with a live streaming video, set start = -1
+            // otherwise we don't worry about the start parameter
+            if (streamingSource.streamType == "live")
+                dsr.start = DynamicStreamingResource.START_LIVE;
+            else if (streamingSource.streamType == "recorded")
+                dsr.start = DynamicStreamingResource.START_VOD;
+
+            var n:int = streamingSource.streamItems.length;
+            var item:DynamicStreamingVideoItem;
+            for (var i:int = 0; i < n; i++)
+            {
+                item = DynamicStreamingVideoItem(streamingSource.streamItems[i]);
+                var dsi:DynamicStreamingItem = new DynamicStreamingItem(item.streamName, item.bitrate);
+                dsr.addItem(dsi);
+            }
+
+            dsr.initialIndex = streamingSource.initialIndex;
+
+            videoElement = new org.osmf.video.VideoElement(new DynamicStreamingNetLoader(), dsr);
         }
-
-        sourceLastPlayed = null;
-
-        // play if we should be autoPlaying.  Otherwise, just load the video.
-        if (effectiveAutoPlay)
-            play();
-        else
-            load();
+        else if (source is String)
+        {
+            var urlResource:URLResource = new URLResource(new URL(source as String));
+            videoElement = new org.osmf.video.VideoElement(new NetLoader(), urlResource );
+        }
+
+        videoPlayer.element = videoElement;
     }

     //----------------------------------
@@ -846,34 +870,6 @@
     }

     //----------------------------------
-    //  totalTime
-    //----------------------------------
-
-    [Bindable("complete")]
-    [Bindable("metadataReceived")]
-    [Bindable("totalTimeChanged")]
-    [Inspectable(Category="General", defaultValue="0")]
-
-    /**
-     *  Total time for the video feed.  -1 means that property
-     *  was not pass into play() or
-     *  we were unable to detect the total time automatically,
-     *  or have not yet.
-     *
-     *  @return The total running time of the FLV in seconds
-     *  @default 0
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get totalTime():Number
-    {
-        return videoPlayer.totalTime;
-    }
-
-    //----------------------------------
     //  videoObject
     //----------------------------------

@@ -909,6 +905,9 @@
      */
     public function get volume():Number
     {
+        if (muted)
+            return 0;
+
         return videoPlayer.volume;
     }

@@ -917,9 +916,10 @@
      */
     public function set volume(value:Number):void
     {
-        mutedVolume = -1;
+        if (volume == value)
+            return;
+
         videoPlayer.volume = value;
-        dispatchEvent(new Event("volumeChanged"));
     }

     //--------------------------------------------------------------------------
@@ -927,26 +927,6 @@
     //  Overridden methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Override setVisible to see if we should pause or play or video
-     */
-    override public function setVisible(value:Boolean, noEvent:Boolean=false) : void
-    {
-        super.setVisible(value, noEvent);
-
-        // if we want our playback to be controlled by visibility
-        if (!playWhenHidden)
-        {
-            // if we shouldn't be playing and we are, then pause it
-            // otherwise if we aren't playing and we should be, then play
-            if (!effectivePlay && playing)
-                pause();
-            else if (effectiveAutoPlay && !playing)
-                play();
-        }
-    }

     /**
      *  @private
@@ -985,60 +965,21 @@
      */
     private function createUnderlyingVideoPlayer():void
     {
-        // if old one, destroy it
-        if (videoPlayer)
-        {
-            videoPlayerProperties = {autoRewind: videoPlayer.autoRewind,
-                                     scaleMode: videoPlayer.scaleMode};
-
-            // if we try to stop and are throwing away this video, just
-            // ignore any errors. This might happen if the connection went
-            // bad or something else and we're trying to throw it away anyways.
-            try
-            {
-                videoPlayer.stop();
-            } catch (e:VideoError) {};
-
-            // clear out old video player and close the connection
-            videoPlayer.close();
-            videoPlayer.clear();
-
-            videoPlayer.removeEventListener(fl.video.VideoEvent.AUTO_REWOUND, videoPlayer_autoRewoundHandler);
-            videoPlayer.removeEventListener(fl.video.VideoEvent.CLOSE, videoPlayer_closeHandler);
-            videoPlayer.removeEventListener(fl.video.VideoEvent.COMPLETE, videoPlayer_completeHandler);
-            videoPlayer.removeEventListener(fl.video.MetadataEvent.METADATA_RECEIVED, videoPlayer_metaDataReceivedHandler);
-            videoPlayer.removeEventListener(fl.video.VideoEvent.PLAYHEAD_UPDATE, videoPlayer_playHeadUpdateHandler);
-            videoPlayer.removeEventListener(ProgressEvent.PROGRESS, dispatchEvent);
-            videoPlayer.removeEventListener(fl.video.VideoEvent.READY, videoPlayer_readyHandler);
-            videoPlayer.removeEventListener(fl.video.VideoEvent.STATE_CHANGE, videoPlayer_stateChangeHandler);
-
-            removeChild(videoPlayer);
-        }
-
         // create new video player
-        videoPlayer = new VideoPlayer();
-
-        if (videoPlayerProperties)
-        {
-            videoPlayer.autoRewind = videoPlayerProperties.autoRewind;
-            videoPlayer.scaleMode = videoPlayerProperties.scaleMode;
-
-            videoPlayerProperties = null;
-        }
-
-        videoPlayer.addEventListener(fl.video.VideoEvent.AUTO_REWOUND, videoPlayer_autoRewoundHandler);
-        videoPlayer.addEventListener(fl.video.VideoEvent.CLOSE, videoPlayer_closeHandler);
-        videoPlayer.addEventListener(fl.video.VideoEvent.COMPLETE, videoPlayer_completeHandler);
-        videoPlayer.addEventListener(fl.video.MetadataEvent.METADATA_RECEIVED, videoPlayer_metaDataReceivedHandler);
-        videoPlayer.addEventListener(fl.video.VideoEvent.PLAYHEAD_UPDATE, videoPlayer_playHeadUpdateHandler);
-        videoPlayer.addEventListener(ProgressEvent.PROGRESS, dispatchEvent);
-        videoPlayer.addEventListener(fl.video.VideoEvent.READY, videoPlayer_readyHandler);
-        videoPlayer.addEventListener(fl.video.VideoEvent.STATE_CHANGE, videoPlayer_stateChangeHandler);
-
-        addChild(videoPlayer);
-
-        dispatchEvent(new Event("playheadTimeChanged"));
-        dispatchEvent(new Event("totalTimeChanged"));
+        videoPlayer = new MediaPlayer();
+        videoSprite = new MediaPlayerSprite(videoPlayer);
+
+        videoPlayer.addEventListener(DimensionChangeEvent.DIMENSION_CHANGE, videoPlayer_dimensionChangeHandler);
+        videoPlayer.addEventListener(VolumeChangeEvent.VOLUME_CHANGE, videoPlayer_volumeChangeHandler);
+        videoPlayer.addEventListener(MutedChangeEvent.MUTED_CHANGE, videoPlayer_mutedChangeHandler);
+        videoPlayer.addEventListener(MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(PlayheadChangeEvent.PLAYHEAD_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(BytesDownloadedChangeEvent.BYTES_DOWNLOADED_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(DurationChangeEvent.DURATION_CHANGE, dispatchEvent);
+
+        videoPlayer.autoPlay = false;
+
+        addChild(videoSprite);
     }

     /**
@@ -1057,8 +998,8 @@
         }

         // otherwise grab the width/height from the video
-        var vw:Number = videoPlayer.videoWidth;
-        var vh:Number = videoPlayer.videoHeight;
+        var vw:Number = videoPlayer.width;
+        var vh:Number = videoPlayer.height;

         measuredWidth = vw;
         measuredHeight = vh;
@@ -1088,78 +1029,22 @@
         // otherwise we'll push it in to the video object
         if (thumbnailSource && thumbnailGroup)
         {
-            var imageWidth:Number;
-            var imageHeight:Number;
-            var bitmapImage:BitmapImage = thumbnailGroup.getElementAt(0) as BitmapImage;
+            // get what the size of our image should be
+            var newSize:Point = videoSprite.scaleMode.getScaledSize(unscaledWidth, unscaledHeight,
+                thumbnailGroup.getPreferredBoundsWidth(), thumbnailGroup.getPreferredBoundsHeight());

-            if (!maintainAspectRatio)
-            {
-                // if not maintainAspectRatio, the width and height of the image
-                // are what the layout wants them to be and the image is stretched or shrunken
-                imageWidth = unscaledWidth;
-                imageHeight = unscaledHeight;
-
-                thumbnailGroup.setLayoutBoundsSize(imageWidth, imageHeight);
-            }
-            else
-            {
-                // the image dimensions need to maintain aspect ratio
-                var realRatio:Number = thumbnailGroup.getPreferredBoundsWidth()/thumbnailGroup.getPreferredBoundsHeight();
-
-                if (unscaledWidth / realRatio < unscaledHeight)
-                {
-                    // width is restrictive size
-                    imageWidth = unscaledWidth;
-                    imageHeight = unscaledWidth / realRatio;
-                }
-                else
-                {
-                    // height is restrictive size
-                    imageWidth = unscaledHeight * realRatio;
-                    imageHeight = unscaledHeight;
-                }
-
-                thumbnailGroup.setLayoutBoundsSize(imageWidth, imageHeight);
-
-                // center the thumbnailGroup
-                thumbnailGroup.x = (unscaledWidth - imageWidth)/2;
-                thumbnailGroup.y = (unscaledHeight - imageHeight)/2;
-            }
+            thumbnailGroup.setLayoutBoundsSize(newSize.x, newSize.y);
+
+            // center the thumbnailGroup
+            thumbnailGroup.x = (unscaledWidth - newSize.x)/2;
+            thumbnailGroup.y = (unscaledHeight - newSize.y)/2;

             return;
         }

-        var flvPlayer:VideoPlayer = videoPlayer;
-
-        // check to see whether the video width/height has been set before to this value.
-        // if it has, let's not set it again as we could be in an animation where we keep
-        // setting this value, and if that's the case, then the video won't play at all.
-        if (lastSetVideoWidth != Math.floor(unscaledWidth) || lastSetVideoHeight != Math.floor(unscaledHeight))
-        {
-            lastSetVideoWidth = Math.floor(unscaledWidth);
-            lastSetVideoHeight = Math.floor(unscaledHeight);
-
-            flvPlayer.width = lastSetVideoWidth;
-            flvPlayer.height = lastSetVideoHeight;
-        }
-    }
-
-    // FIXME (rfrishbe): remove these "lastSet" variables...should not be needed
-    // when switching to Strobe
-
-    /**
-     *  @private
-     *  Used to store the last video width/height we've set the
-     *  underlying video player to
-     */
-    private var lastSetVideoWidth:Number;
-
-    /**
-     *  @private
-     *  Used to store the last video width/height we've set the
-     *  underlying video player to
-     */
-    private var lastSetVideoHeight:Number;
+        videoSprite.width = Math.floor(unscaledWidth);
+        videoSprite.height = Math.floor(unscaledHeight);
+    }

     //--------------------------------------------------------------------------
     //
@@ -1181,19 +1066,10 @@
      */
     public function pause():void
     {
-        // can't call any methods before we've initialized
-        if (!initializedOnce)
+        // check to see if we can call methods on the video player object yet
+        if (!videoPlayerResponsive())
             return;

-        // if source is null or in a bad connection state, don't do anything
-        if (source == null || videoPlayer.state == VideoState.CONNECTION_ERROR)
-            return;
-
-        // if have a thumbnailSource, no method calls are valid
-        if (thumbnailSource)
-            return;
-
-        setPlaying(false);
         videoPlayer.pause();
     }

@@ -1208,128 +1084,39 @@
      */
     public function play():void
     {
+        // check to see if we can call methods on the video player object yet
+        if (!videoPlayerResponsive())
+            return;
+
+        videoPlayer.play();
+    }
+
+    /**
+     *  @private
+     *  If the video player is responsive, then methods can be called on the underlying
+     *  video player.
+     */
+    private function videoPlayerResponsive():Boolean
+    {
         // can't call any methods before we've initialized
-        if (!initializedOnce || thumbnailSource)
-            return;
-
-        // check for 2 cases: streaming video or progressive download
-        if (source is StreamingVideoSource)
-        {
-            // the streaming video case.
-            // build up a DynamicStreamItem to pass in to
-            // play2();
-            var streamingSource:StreamingVideoSource = source as StreamingVideoSource;
-            var flvSource:DynamicStreamItem;
-
-            // if paused, pass in null as the flvSource.  Otherwise, calling
-            // play(source) will reset the stream back to zero.  To restart the
-            // stream where it was paused, one needs to call play(null).
-            if (sourceLastPlayed == this.source)
-            {
-                if (videoPlayer.state == VideoState.CONNECTION_ERROR)
-                {
-                    setPlaying(false);
-                    return;
-                }
-                flvSource = null;
-            }
-            else
-            {
-                flvSource =  new DynamicStreamItem();
-                sourceLastPlayed = source;
-
-                flvSource.uri = streamingSource.serverURI;
-
-                // if dealing with a live streaming video, set start = -1
-                // otherwise we don't worry about the start parameter
-                if (streamingSource.live)
-                    flvSource.start = -1;
-
-                var n:int = streamingSource.streamItems.length;
-                var item:StreamItem;
-                for (var i:int = 0; i < n; i++)
-                {
-                    item = StreamItem(streamingSource.streamItems[i]);
-                    flvSource.addStream(item.streamName, item.bitRate);
-                }
-            }
-
-            // could wait for stateChange event, but let's do it early
-            // so the UI is more responsive
-            setPlaying(true);
-
-            // if it's null, we just call the play() method
-            if (flvSource == null)
-            {
-                videoPlayer.play(null, NaN, streamingSource.live);
-            }
-            else
-            {
-                videoPlayer.play2(flvSource);
-            }
-        }
-        else if (source is String && String(source).length > 0)
-        {
-            // The progressive case
-            var sourceString:String;
-
-            // if paused, pass in null as the flvSource.  Otherwise, calling
-            // play(source) will reset the stream back to zero.  To restart the
-            // stream where it was paused, one needs to call play(null).
-            if (sourceLastPlayed == this.source)
-            {
-                if (videoPlayer.state == VideoState.CONNECTION_ERROR)
-                {
-                    setPlaying(false);
-                    return;
-                }
-
-                sourceString = null;
-            }
-            else
-            {
-                sourceString = String(this.source);
-                sourceLastPlayed = sourceString;
-            }
-
-            // could wait for stateChange event, but let's do it early
-            // so the UI is more responsive
-            setPlaying(true);
-
-            videoPlayer.play(sourceString);
-        }
-        else
-        {
-            setPlaying(false);
-        }
-    }
-
-    /**
-     *  @private
-     *  Load the video.  This allows seeks and other operations to
-     *  be performed before the video's started to play.
-     */
-    private function load():void
-    {
-        // check for 2 cases: streaming video or progressive download
-        if (source is StreamingVideoSource)
-        {
-            // can't load in the streaming video case, so just call play(), then pause()
-            play();
-            pause();
-            seek(0);
-        }
-        else if (source is String && String(source).length > 0)
-        {
-            // The progressive case
-            var sourceString:String = String(this.source);
-            sourceLastPlayed = sourceString;
-
-            // load the video up
-            videoPlayer.load(sourceString);
-        }
-
-        setPlaying(false);
+        if (!initializedOnce)
+            return false;
+
+        // if displaying a thumbnail, no methods can be called b/c there's no video
+        // loaded up
+        if (thumbnailSource)
+            return false;
+
+        // if the video player's in a bad state, we can't do anything
+        if (videoPlayer.state == MediaPlayerState.PLAYBACK_ERROR)
+            return false;
+
+        // if no source, return false as well
+        if (!source)
+            return false;
+
+        // otherwise, we are in a good state and have a source, so let's go
+        return true;
     }

     /**
@@ -1367,16 +1154,8 @@
      */
     public function seek(time:Number):void
     {
-        // can't call any methods before we've initialized
-        if (!initializedOnce)
-            return;
-
-        // if source is null or in a bad connection state, don't do anything
-        if (source == null || videoPlayer.state == VideoState.CONNECTION_ERROR)
-            return;
-
-        // if have a thumbnailSource, no method calls are valid
-        if (thumbnailSource)
+        // check to see if we can call methods on the video player object yet
+        if (!videoPlayerResponsive())
             return;

         if (time < 0)
@@ -1401,20 +1180,13 @@
      */
     public function stop():void
     {
-        // can't call any methods before we've initialized
-        if (!initializedOnce)
+        // check to see if we can call methods on the video player object yet
+        if (!videoPlayerResponsive())
             return;

-        // if source is null or in a bad connection state, don't do anything
-        if (source == null || videoPlayer.state == VideoState.CONNECTION_ERROR)
-            return;
-
-        // if have a thumbnailSource, no method calls are valid
-        if (thumbnailSource)
-            return;
-
-        setPlaying(false);
-        videoPlayer.stop();
+        videoPlayer.pause();
+        videoPlayer.seek(0);
+        // should be stop()
     }

     //--------------------------------------------------------------------------
@@ -1423,10 +1195,6 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  @private
-     *  Keeps track of whether we are on the display list or not
-     */
     private var _isOnDisplayList:Boolean = false;

     /**
@@ -1436,13 +1204,7 @@
     {
         _isOnDisplayList = true;

-        // if visiblity/onstage shouldn't effect whether we are playing or not, just return
-        if (playWhenHidden)
-            return;
-
-        // if we should start autoPlaying and we're not, let's do that
-        if (effectiveAutoPlay && !playing)
-            play();
+        effectiveAutoPlayChanged(true);
     }

     /**
@@ -1452,210 +1214,31 @@
     {
         _isOnDisplayList = false;

-        // if visiblity/onstage shouldn't effect whether we are playing or not, just return
-        if (playWhenHidden)
-            return;
-
-        // if we're removed from the stage and we're playing, let's pause
-        if (playing)
-            pause();
-    }
-
-    /**
-     *  @private
-     */
-    private function videoPlayer_autoRewoundHandler(event:fl.video.VideoEvent):void
-    {
-        // just for binding purposes on VideoElement.playheadTime
-        dispatchEvent(new Event("playheadTimeChanged"));
-    }
-
-    /**
-     *  @private
-     */
-    private function videoPlayer_closeHandler(event:fl.video.VideoEvent):void
-    {
-        var sparkVideoEvent:spark.events.VideoEvent =
-            new spark.events.VideoEvent(event.type, event.bubbles, event.cancelable, event.playheadTime);
-        dispatchEvent(sparkVideoEvent);
-    }
-
-    /**
-     *  @private
-     */
-    private function videoPlayer_completeHandler(event:fl.video.VideoEvent):void
-    {
-        var sparkVideoEvent:spark.events.VideoEvent =
-            new spark.events.VideoEvent(event.type, event.bubbles, event.cancelable, event.playheadTime);
-        dispatchEvent(sparkVideoEvent);
-
-        if (loop)
-        {
-            seek(0);
-            play();
-        }
-    }
-
-    /**
-     *  @private
-     */
-    private function videoPlayer_metaDataReceivedHandler(event:fl.video.MetadataEvent):void
+        effectiveAutoPlayChanged(true);
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_dimensionChangeHandler(event:DimensionChangeEvent):void
     {
         invalidateSize();
-        var sparkVideoEvent:spark.events.VideoEvent =
-            new spark.events.VideoEvent(event.type, event.bubbles, event.cancelable, playheadTime, event.info);
-        dispatchEvent(sparkVideoEvent);
-    }
-
-    /**
-     *  @private
-     */
-    private function videoPlayer_playHeadUpdateHandler(event:fl.video.VideoEvent):void
-    {
-        var sparkVideoEvent:spark.events.VideoEvent =
-            new spark.events.VideoEvent(event.type, event.bubbles, event.cancelable, event.playheadTime);
-        dispatchEvent(sparkVideoEvent);
-    }
-
-    /**
-     *  @private
-     */
-    private function videoPlayer_readyHandler(event:fl.video.VideoEvent):void
-    {
-        // sometimes we don't get a metadata event, so let's check the size here and see
-        // if we need to invalidateSize()
-        if (measuredWidth != videoPlayer.videoWidth || measuredHeight != videoPlayer.videoHeight)
-            invalidateSize();
-
-        var sparkVideoEvent:spark.events.VideoEvent =
-            new spark.events.VideoEvent(event.type, event.bubbles, event.cancelable, event.playheadTime);
-        dispatchEvent(sparkVideoEvent);
-    }
-
-    /**
-     *  @private
-     */
-    private function videoPlayer_stateChangeHandler(event:fl.video.VideoEvent):void
-    {
-        switch (event.state)
-        {
-            case VideoState.STOPPED:
-            case VideoState.DISCONNECTED:
-            case VideoState.CONNECTION_ERROR:
-                dispatchEvent(new Event("playheadTimeChanged"));
-                dispatchEvent(new Event("totalTimeChanged"));
-                setPlaying(false);
-                break;
-            case VideoState.PLAYING:
-                setPlaying(true);
-                break;
-        }
-
-        dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_volumeChangeHandler(event:VolumeChangeEvent):void
+    {
+        dispatchEvent(new Event("volumeChanged"));
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_mutedChangeHandler(event:MutedChangeEvent):void
+    {
+        dispatchEvent(new Event("volumeChanged"));
     }
 }
-}
-
-import fl.video.flvplayback_internal;
-import fl.video.NCManagerDynamicStream;
-import fl.video.VideoError;
-import fl.video.SMILManager;
-import fl.video.ParseResults;
-
-use namespace flvplayback_internal;
-
-/**
- *  @private
- *  We only have this class to fix a bug when handling "?"
- *  in URLs.  Hopefully Strobe will fix this directly.
- */
-class FlexNCManager extends NCManagerDynamicStream
-{
-    public function FlexNCManager()
-    {
-        super();
-    }
-
-    /**
-     * @copy INCManager#connectToURL()
-     * @see INCManager#connectToURL()
-     *
-     */
-    override public function connectToURL(url:String):Boolean {
-        //ifdef DEBUG
-        //debugTrace("connectToURL(" + url + ")");
-        //endif
-
-        // init
-        initOtherInfo();
-        _contentPath = url;
-        if (_contentPath == null || _contentPath == "") {
-            throw new VideoError(VideoError.INVALID_SOURCE);
-        }
-
-        // parse URL to determine what to do with it
-        var parseResults:ParseResults = parseURL(_contentPath);
-        if (parseResults.streamName == null || parseResults.streamName == "") {
-            throw new VideoError(VideoError.INVALID_SOURCE, url);
-        }
-
-        // connect to either rtmp or http or download and parse smil
-        var canReuse:Boolean;
-        if (parseResults.isRTMP) {
-            canReuse = canReuseOldConnection(parseResults);
-            _isRTMP = true;
-            _protocol = parseResults.protocol;
-            _streamName = parseResults.streamName;
-            _serverName = parseResults.serverName;
-            _wrappedURL = parseResults.wrappedURL;
-            _portNumber = parseResults.portNumber;
-            _appName = parseResults.appName;
-            if ( _appName == null || _appName == "" ||
-                 _streamName == null || _streamName == "" ) {
-                throw new VideoError(VideoError.INVALID_SOURCE, url);
-            }
-            _autoSenseBW = (_streamName.indexOf(",") >= 0);
-            return (canReuse || connectRTMP());
-        } else {
-            var name:String = parseResults.streamName;
-            if ( name.indexOf("?") < 0 &&
-                (name.length < 4 || name.slice(-4).toLowerCase() != ".txt") &&
-                (name.length < 4 || name.slice(-4).toLowerCase() != ".xml") &&
-                (name.length < 5 || name.slice(-5).toLowerCase() != ".smil") ) {
-                canReuse = canReuseOldConnection(parseResults);
-                _isRTMP = false;
-                _streamName = name;
-                return (canReuse || connectHTTP());
-            }
-            // special flex case to deal with blah.flv?t=ojoj
-            else if ( name.indexOf("?") != -1 )
-            {
-                // common types of video files
-                var streamTypes:Array = ["mp4", "mov", "m4v", "m4a", "f4v", "3gp", "3g2", "flv"];
-                // if "?" then idx 0 should always be stream name, unless someone messed up URL
-                var preQueryString:String = name.split("?")[0];
-                // check extension and treat as vid file if exists
-                if (preQueryString.length >= 3 && streamTypes.indexOf(preQueryString.slice(-3).toLowerCase()) != -1)
-                {
-                    canReuse = canReuseOldConnection(parseResults);
-                    _isRTMP = false;
-                    _streamName = name;
-                    return (canReuse || connectHTTP());
-                }
-            }
-
-            if (name.indexOf("/fms/fpad") >= 0) {
-                try {
-                    return connectFPAD(name);
-                } catch (err:Error) {
-                    // just use SMILManager if there is any error
-                    //ifdef DEBUG
-                    //debugTrace("fpad error: " + err);
-                    //endif
-                }
-            }
-            _smilMgr = new SMILManager(this);
-            return _smilMgr.connectXML(name);
-        }
-    }
-}
+}


added an insert method

added an insert method

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

--- src/as/com/threerings/util/ArrayUtil.as
+++ src/as/com/threerings/util/ArrayUtil.as
@@ -145,6 +145,19 @@
     }

     /**
+     * Inserts the element into the array at the given index, increasing the index on all
+     * remaining elements by one.  This function modifies the array passed in, rather than creating
+     * a new one.
+     */
+    public static function insert (arr :Array, index :int, element :Object) :void
+    {
+        for (var ii :int = arr.length; ii > index; ii--) {
+            arr[ii] = arr[ii - 1];
+        }
+        arr[index] = element;
+    }
+
+    /**
      * Implementation of remove methods.
      */
     private static function removeImpl (


Added properties for text formatting to TextSprite

git-svn-id: 6aa7ccb0a2048310a30f08a72aaff4ca39d980ed@124 91848ab2-c4ae-4e4f-8e6a-6a52ea0dccc3

--- flare.util/flare/display/TextSprite.as
+++ flare.util/flare/display/TextSprite.as
@@ -1,15 +1,13 @@
 package flare.display
 {
 	import flash.display.Bitmap;
-	import flash.text.TextField;
 	import flash.display.BitmapData;
-	import flash.text.TextFormat;
-	import flash.text.TextFieldAutoSize;
-	import flash.filters.BlurFilter;
+	import flash.display.DisplayObject;
 	import flash.display.Shape;
 	import flash.geom.Rectangle;
-	import flash.display.DisplayObject;
-	import flare.display.DirtySprite;
+	import flash.text.TextField;
+	import flash.text.TextFieldAutoSize;
+	import flash.text.TextFormat;

 	/**
 	 * A Sprite representing a text label.
@@ -143,6 +141,78 @@
 		}

 		/**
+		 * The font to the text.
+		 */
+		public function get font():String { return String(_fmt.font); }
+		public function set font(f:String):void {
+			_fmt.font = f;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
+		 * The color of the text.
+		 */
+		public function get color():uint { return uint(_fmt.color); }
+		public function set color(c:uint):void {
+			_fmt.color = c;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
+		 * The size of the text.
+		 */
+		public function get size():Number { return Number(_fmt.size); }
+		public function set size(s:Number):void {
+			_fmt.size = s;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
+		 * The boldness of the text.
+		 */
+		public function get bold():Boolean { return Boolean(_fmt.bold); }
+		public function set bold(b:Boolean):void {
+			_fmt.bold = b;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
+		 * The italics of the text.
+		 */
+		public function get italic():Boolean { return Boolean(_fmt.italic); }
+		public function set italic(b:Boolean):void {
+			_fmt.italic = b;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
+		 * The underline of the text.
+		 */
+		public function get underline():Boolean { return Boolean(_fmt.underline); }
+		public function set underline(b:Boolean):void {
+			_fmt.underline = b;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
+		 * The kerning of the text.
+		 */
+		public function get kerning():Boolean { return Boolean(_fmt.kerning); }
+		public function set kerning(b:Boolean):void {
+			_fmt.kerning = b;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
+		 * The letter-spacing of the text.
+		 */
+		public function get letterSpacing():int { return int(_fmt.letterSpacing); }
+		public function set letterSpacing(s:int):void {
+			_fmt.letterSpacing = s;
+			_tf.setTextFormat(_fmt);
+		}
+
+		/**
 		 * The horizontal anchor for the text, one of LEFT, RIGHT, or CENTER.
 		 * This setting determines how the text is horizontally aligned with
 		 * respect to this TextSprite's (x,y) location.


Transferred from the Adobe Open Source Subversion Repository

Revision: 22904
Author:   chiedozi@adobe.com
Date:     2011-10-07T17:24:58.290926Z

Log Message:
-----------
TabbedViewNavigatorApplication now proxies IVisualElementContainer apis to its tabbedNavigator skinPart to allow support for states and deferredContent
When a ViewNavigatorApplication activates, it now sets the focus to the current view

QE notes:
Doc notes:
Bugs: SDK-30708,SDK-31783
Reviewer: Evtim
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as
@@ -16,7 +16,9 @@
 import flash.events.InvokeEvent;
 import flash.events.KeyboardEvent;

+import mx.core.IVisualElement;
 import mx.core.mx_internal;
+import mx.events.FlexEvent;

 import spark.components.supportClasses.ViewNavigatorApplicationBase;
 import spark.components.supportClasses.ViewNavigatorBase;
@@ -224,6 +226,9 @@
 		// and stage_resizeHandler.
 		if (tabbedNavigator && tabbedNavigator.activeView)
 		{
+            // Set the stage focus to the navigator's active view
+            tabbedNavigator.updateFocus();
+
 			if (!tabbedNavigator.activeView.isActive)
 				tabbedNavigator.activeView.setActive(true);
 		}
@@ -320,6 +325,28 @@

         if (savedState)
             tabbedNavigator.loadViewData(savedState);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: SkinnableContainer
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Since this class doesn't have and children and serves as  proxy for
+     *  TabbedViewNavigator, we consider our deferredContent created as
+     *  long as we have a valid tabbedNavigator skinPart.  This allows the
+     *  states includeIn and excludeFrom mechanism from working with this
+     *  component's provided MXML.
+     */
+    override public function get deferredContentCreated():Boolean
+    {
+        if (tabbedNavigator)
+            return true;
+
+        return false;
     }

     //--------------------------------------------------------------------------
@@ -342,17 +369,165 @@
                 tabbedNavigator.navigators = navigatorProperties.navigators;
             }

+            // We consider our content created when the tabbedNavigator
+            // skinPart is added.  This allows states to know when all deferred content
+            // has been created.
+            if (hasEventListener(FlexEvent.CONTENT_CREATION_COMPLETE))
+                dispatchEvent(new FlexEvent(FlexEvent.CONTENT_CREATION_COMPLETE));
+
             // Set the stage focus to the navigator
             systemManager.stage.focus = tabbedNavigator;
         }
     }
-
-    /**
-     *  @private
-     */
-    override protected function partRemoved(partName:String, instance:Object):void
-    {
-        super.partRemoved(partName, instance);
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: IVisualElementContainer
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  TabbedViewNavigatorApplication proxies the IVisualElementContainer
+     *  interface to its tabbedNavigator skinPart.
+     */
+
+    /**
+     *  @private
+     */
+    override public function get numElements():int
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.numElements;
+
+        return 0;
+    }
+
+    /**
+     *  @private
+     */
+    override public function getElementAt(index:int):IVisualElement
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.getElementAt(index);
+
+        return null;
+    }
+
+    //----------------------------------
+    //  Visual Element addition
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function addElement(element:IVisualElement):IVisualElement
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.addElement(element);
+
+        // TODO (chiedozi): Consider throwing an exception in this case
+        return null;
+    }
+
+    /**
+     *  @private
+     */
+    override public function addElementAt(element:IVisualElement, index:int):IVisualElement
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.addElementAt(element, index);
+
+        // TODO (chiedozi): Consider throwing an exception in this case
+        return null;
+    }
+
+    //----------------------------------
+    //  Visual Element removal
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function removeElement(element:IVisualElement):IVisualElement
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.removeElement(element);
+
+        // TODO (chiedozi): Consider throwing an exception in this case
+        return null;
+    }
+
+    /**
+     *  @private
+     */
+    override public function removeElementAt(index:int):IVisualElement
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.removeElementAt(index);
+
+        // TODO (chiedozi): Consider throwing an exception in this case
+        return null;
+    }
+
+    /**
+     *  @private
+     */
+    override public function removeAllElements():void
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.removeAllElements();
+    }
+
+    //----------------------------------
+    //  Visual Element index
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function getElementIndex(element:IVisualElement):int
+    {
+        if (tabbedNavigator)
+            return tabbedNavigator.getElementIndex(element);
+
+        throw ArgumentError(resourceManager.getString("components", "elementNotFoundInGroup", [element]));
+    }
+
+    /**
+     *  @private
+     */
+    override public function setElementIndex(element:IVisualElement, index:int):void
+    {
+        if (tabbedNavigator)
+            tabbedNavigator.setElementIndex(element, index);
+
+        throw ArgumentError(resourceManager.getString("components", "elementNotFoundInGroup", [element]));
+    }
+
+    //----------------------------------
+    //  Visual Element swapping
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function swapElements(element1:IVisualElement, element2:IVisualElement):void
+    {
+        if (tabbedNavigator)
+            tabbedNavigator.swapElements(element1, element2);
+
+        throw ArgumentError(resourceManager.getString("components", "elementNotFoundInGroup", [element1]));
+    }
+
+    /**
+     *  @private
+     */
+    override public function swapElementsAt(index1:int, index2:int):void
+    {
+        if (tabbedNavigator)
+            tabbedNavigator.swapElementsAt(index1, index2);
+
+        throw new RangeError(resourceManager.getString("components", "indexOutOfRange", [index1]));
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19890
Author:   chiedozi@adobe.com
Date:     2011-01-22T00:54:17.832168Z

Log Message:
-----------
PARB Changes for TabbedViewNavigator.

TabbedViewNavigator
The activeNavigator property has been renamed to selectedNavigator
The following properties and methods have been made mx_internal, thus don't need to be tested:
maintainNaigationStack
tabBarRenderer_clickHandler

TabbedViewNavigatorApplication
The navigator skinpart has been renamed to tabbedNavigator
The creationPolicy and destructionPolicy properties on ViewNavigatorBase have been removed.
The maintainNavigationStack and creationPolicy properties have been removed

QE notes:
Doc notes:
Bugs:
Reviewer: Ryan
Tests run:
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ScriptRunner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/.flexProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/.actionScriptProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as
@@ -60,14 +60,14 @@
     //--------------------------------------------------------------------------

     /**
-     * The navigator for the application
+     * The tabbed navigator for the application
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public var navigator:TabbedViewNavigator;
+    public var tabbedNavigator:TabbedViewNavigator;

     /**
@@ -102,10 +102,10 @@
      */
     override protected function createChildren():void
     {
-        navigator = new TabbedViewNavigator();
-        navigator.id = "navigator";
+        tabbedNavigator = new TabbedViewNavigator();
+        tabbedNavigator.id = "tabbedNavigator";

-        addChild(navigator);
+        addChild(tabbedNavigator);
     }

     /**
@@ -113,8 +113,8 @@
      */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        navigator.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
-        navigator.setLayoutBoundsPosition(0, 0);
+        tabbedNavigator.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+        tabbedNavigator.setLayoutBoundsPosition(0, 0);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/TextStyles.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/TextStyles.as
@@ -1,4 +1,24 @@
-
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Color of text in the component, including the component label.
+ *
+ *  @default 0x0B333C
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="color", type="uint", format="Color", inherit="yes")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 11247
Author:   klin@adobe.com
Date:     2009-10-28T21:59:11.963883Z

Log Message:
-----------
Fix for https://bugs.adobe.com/jira/browse/SDK-23184.

Updated a bunch of Style metadata ASDocs to describe different defaults between the Halo and Spark themes. Also, fixed a few typos along the way.

defaults.css - rearranged a few styles to be in alphabetical order
Button.as - removed extra emphasizedSkin style metadata
Panel.as - added spark theme to borderAlpha metadata

QE notes: None
Doc notes: None
Bugs: SDK-23184
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerNative.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/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.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/controls/colorPickerClasses/SwatchPanel.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/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpMenuIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/PaddingStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/GapStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerDynamicStream.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/FocusStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>

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

--- frameworks/projects/mx/src/mx/controls/menuClasses/MenuItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/menuClasses/MenuItemRenderer.as
@@ -59,7 +59,8 @@
 /**
  *  Text color of the menu item label.
  *
- *  @default 0x0B333C
+ *  The default value for the Halo theme is 0x0B333C.
+ *  The default value for the Spark theme is 0x000000.
  *
  *  @langversion 3.0
  *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 11088
Author:   hhillen@paciellogroup.com
Date:     2009-10-22T20:14:16.491190Z

Log Message:
-----------
Spark AccImpl Classes

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextAreaAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SpinnerAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonBarAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextInputAccImpl.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SkinnableTextBaseAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as</path>

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

--- frameworks/projects/spark/src/spark/accessibility/ButtonBaseAccImpl.as
+++ frameworks/projects/spark/src/spark/accessibility/ButtonBaseAccImpl.as
@@ -0,0 +1,271 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.accessibility
+{
+
+import flash.accessibility.Accessibility;
+import flash.events.Event;
+import flash.events.KeyboardEvent;
+import flash.ui.Keyboard;
+
+import mx.accessibility.AccImpl;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+import spark.components.supportClasses.ButtonBase;
+import spark.components.supportClasses.ToggleButtonBase;
+
+use namespace mx_internal;
+
+
+/**
+ *  ButtonAccImpl is a subclass of AccessibilityImplementation
+ *  which implements accessibility for the Button class.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class ButtonAccImpl extends AccImpl
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static const STATE_SYSTEM_PRESSED:uint = 0x00000008;
+
+    /**
+     *  @private
+     */
+    private static const EVENT_OBJECT_NAMECHANGE:uint = 0x800C;
+
+    /**
+     *  @private
+     */
+    private static const EVENT_OBJECT_STATECHANGE:uint = 0x800A;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Enables accessibility in the Button class.
+     *
+     *
This method is called by application startup code
+     *  that is autogenerated by the MXML compiler.
+     *  Afterwards, when instances of Button are initialized,
+     *  their accessibilityImplementation property
+     *  will be set to an instance of this class.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static function enableAccessibility():void
+    {
+        ButtonBase.createAccessibilityImplementation =
+            createAccessibilityImplementation;
+    }
+
+    /**
+     *  @private
+     *  Creates a Button's AccessibilityImplementation object.
+     *  This method is called from UIComponent's
+     *  initializeAccessibility() method.
+     */
+    mx_internal static function createAccessibilityImplementation(
+                                component:UIComponent):void
+    {
+        component.accessibilityImplementation =
+            new ButtonAccImpl(component);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param master The UIComponent instance that this AccImpl instance
+     *  is making accessible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function ButtonAccImpl(master:UIComponent)
+    {
+        super(master);
+
+        role = 0x2B; // ROLE_SYSTEM_PUSHBUTTON
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  eventsToHandle
+    //----------------------------------
+
+    /**
+     *  @private
+     *    Array of events that we should listen for from the master component.
+     */
+    override protected function get eventsToHandle():Array
+    {
+        return super.eventsToHandle.concat([ "click", "labelChanged" ]);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: AccessibilityImplementation
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  IAccessible method for returning the state of the Button.
+     *  States are predefined for all the components in MSAA.
+     *  Values are assigned to each state.
+     *  Depending upon the button being pressed or released,
+     *  a value is returned.
+     *
+     *  @param childID uint
+     *
+     *  @return State uint
+     */
+    override public function get_accState(childID:uint):uint
+    {
+        var accState:uint = getState(childID);
+
+        if (master is ToggleButtonBase && ToggleButtonBase(master).selected)
+            accState |= STATE_SYSTEM_PRESSED;
+
+        return accState;
+    }
+
+    /**
+     *  @private
+     *  IAccessible method for returning the default action
+     *  of the Button, which is Press.
+     *
+     *  @param childID uint
+     *
+     *  @return DefaultAction String
+     */
+    override public function get_accDefaultAction(childID:uint):String
+    {
+        return "Press";
+    }
+
+    /**
+     *  @private
+     *  IAccessible method for performing the default action
+     *  associated with Button, which is Press.
+     *
+     *  @param childID uint
+     */
+    override public function accDoDefaultAction(childID:uint):void
+    {
+        if (master.enabled)
+        {
+            var event:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN);
+            event.keyCode = Keyboard.SPACE;
+            master.dispatchEvent(event);
+
+            event = new KeyboardEvent(KeyboardEvent.KEY_UP);
+            event.keyCode = Keyboard.SPACE;
+            master.dispatchEvent(event);
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  method for returning the name of the Button
+     *  which is spoken out by the screen reader
+     *  The Button should return the label inside as the name of the Button.
+     *  The name returned here would take precedence over the name
+     *  specified in the accessibility panel.
+     *
+     *  @param childID uint
+     *
+     *  @return Name String
+     */
+    override protected function getName(childID:uint):String
+    {
+        var label:String = ButtonBase(master).label;
+
+        return label != null && label != "" ? label : "";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Override the generic event handler.
+     *  All AccImpl must implement this
+     *  to listen for events from its master component.
+     */
+    override protected function eventHandler(event:Event):void
+    {
+        // Let AccImpl class handle the events
+        // that all accessible UIComponents understand.
+        $eventHandler(event);
+
+        switch (event.type)
+        {
+            case "click":
+            {
+                Accessibility.sendEvent(master, 0, EVENT_OBJECT_STATECHANGE);
+                Accessibility.updateProperties();
+                break;
+            }
+
+            case "labelChanged":
+            {
+                Accessibility.sendEvent(master, 0, EVENT_OBJECT_NAMECHANGE);
+                Accessibility.updateProperties();
+                break;
+            }
+        }
+    }
+}
+
+}