Transferred from the Adobe Open Source Subversion Repository

Revision: 19944
Author:   chiedozi@adobe.com
Date:     2011-01-25T23:14:49.240243Z

Log Message:
-----------
Fixed an issue where percentWidth and percentHeight weren't properly restored on ViewNavigators after the actionBar or tabBar was hidden

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

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/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as
@@ -591,6 +591,8 @@
                                 height:component.height,
                                 explicitWidth:component.explicitWidth,
                                 explicitHeight:component.explicitHeight,
+                                percentWidth:component.percentWidth,
+                                percentHeight:component.percentHeight,
                                 visible: component.visible,
                                 includeInLayout: component.includeInLayout,
                                 cacheAsBitmap: component.cacheAsBitmap };


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.effects.supportClasses
 {
 import flash.display.BitmapData;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as
@@ -122,10 +122,7 @@
 	//----------------------------------

 	/**
-	 *  The current position of the effect, in milliseconds.
-	 *  This value is between 0 and the value of the
-	 *  duration property.
-	 *  Use the seek() method to change the position of the effect.
+	 *  @inheritDoc
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion Flash 9
@@ -139,6 +136,18 @@
 		else
 			return 0;
 	}
+
+    /**
+     * @private
+     */
+    override public function set playheadTime(value:Number):void
+    {
+        if (tween)
+            tween.seek(value);
+        else
+            _seekTime = value;
+    }
+

   	//----------------------------------
 	//  tween
@@ -209,25 +218,6 @@

 		super.playReversed = !playReversed;
 	}
-
-	/**
-  	 *  Advances the effect to the specified position.
-  	 *
-  	 *  @param playheadTime The position, in milliseconds, between 0
-	 *  and the value of the duration property.
-  	 *
-  	 *  @langversion 3.0
-  	 *  @playerversion Flash 9
-  	 *  @playerversion AIR 1.1
-  	 *  @productversion Flex 3
-  	 */
-    override public function seek(playheadTime:Number):void
-	{
-		if (tween)
-			tween.seek(playheadTime);
-		else
-			_seekTime = playheadTime;
-	}

 	/**
 	 *  Interrupts an effect that is currently playing,


Added asdoc comment to Async class

Added asdoc comment to Async class

--- as3/src/asunit4/async/Async.as
+++ as3/src/asunit4/async/Async.as
@@ -38,6 +38,10 @@
          *
          * In the previous example, test execution will be halted until the
          * +handler+ method is called.
+         *
+         * It's worth noting that AsUnit does not store any state related
+         * to the playback of your test harness in global variables.
+         *
          */
 		public function Async() {
 			pending = [];


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/VideoDisplay.as
+++ frameworks/projects/mx/src/mx/controls/VideoDisplay.as
@@ -0,0 +1,1827 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.ProgressEvent;
+import flash.media.Camera;
+import mx.controls.videoClasses.VideoPlayer;
+import mx.core.EdgeMetrics;
+import mx.core.IBorder;
+import mx.core.IFlexDisplayObject;
+import mx.core.IUIComponent;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.events.CuePointEvent;
+import mx.events.FlexEvent;
+import mx.events.MetadataEvent;
+import mx.events.VideoEvent;
+import mx.styles.ISimpleStyleClient;
+import mx.utils.LoaderUtil;
+
+use namespace mx_internal;
+
+include "../styles/metadata/BorderStyles.as"
+
+/**
+ *  Dispatched when the NetConnection object is closed, whether by timing
+ *  out or by calling the close() method.
+ *  You use this event when working with Flash Media Server.
+ *
+ *  @eventType mx.events.VideoEvent.CLOSE
+ */
+[Event(name="close", type="mx.events.VideoEvent")]
+
+/**
+ *  Dispatched when the playhead reaches the end of the FLV file.
+ *
+ *  @eventType mx.events.VideoEvent.COMPLETE
+ */
+[Event(name="complete", type="mx.events.VideoEvent")]
+
+/**
+ *  Dispatched when the value of a cue point's time property
+ *  is equal to the current playhead location.
+ *
+ *  @eventType mx.events.CuePointEvent.CUE_POINT
+ */
+[Event(name="cuePoint", type="mx.events.CuePointEvent")]
+
+/**
+ *  Dispatched the first time metadata in the FLV file is reached.
+ *
+ *  @eventType mx.events.MetadataEvent.METADATA_RECEIVED
+ */
+[Event(name="metadataReceived", type="mx.events.MetadataEvent")]
+
+/**
+ *  Dispatched continuosly while the video is playing.
+ *  The interval between events, in milliseconds, is specified by the
+ *  playheadUpdateInterval property, which defaults to 250 ms.
+ *  This event is not dispatched when the video is in a paused or stopped
+ *  state.
+ *
+ *  @eventType mx.events.VideoEvent.PLAYHEAD_UPDATE
+ */
+[Event(name="playheadUpdate", type="mx.events.VideoEvent")]
+
+/**
+ *  Dispatched continuously until the FLV file has downloaded completely.
+ *
+ *
You can use this event to check the number of bytes loaded
+ *  or the number of bytes in the buffer.
+ *  This event starts getting dispatched when the load() or
+ *  play() method is called first and ends when all bytes are
+ *  loaded or if there is a network error.

+ *
+ *  @eventType flash.events.ProgressEvent.PROGRESS
+ */
+[Event(name="progress", type="flash.events.ProgressEvent")]
+
+/**
+ *  Dispatched when the FLV file is loaded and ready to play.
+ *
+ *
This event is dispatched the first time the VideoDisplay control
+ *  enters a responsive state after a new FLV file is loaded by the
+ *  load() or play() method.
+ *  It is dispatched only once for each FLV file loaded.

+ *
+ *  @eventType mx.events.VideoEvent.READY
+ */
+[Event(name="ready", type="mx.events.VideoEvent")]
+
+/**
+ *  Dispatched when the control autorewinds.
+ *
+ *  @see #autoRewind
+ *
+ *  @eventType mx.events.VideoEvent.REWIND
+ */
+[Event(name="rewind", type="mx.events.VideoEvent")]
+
+/**
+ *  Dispatched when the state of the control changes.
+ *
+ *
You can use this event to track when playback enters and leaves
+ *  the unresponsive state (for example, in the middle of connecting,
+ *  resizing, or rewinding), during which time calls to the
+ *  play(), pause(), and stop() methods
+ *  and writes to the playHeadTime property are queued, and then
+ *  executed when the player enters the responsive state.

+ *
+ *  @eventType mx.events.VideoEvent.STATE_CHANGE
+ */
+[Event(name="stateChange", type="mx.events.VideoEvent")]
+
+[IconFile("VideoDisplay.png")]
+
+/**
+ *  The VideoDisplay control lets you play an FLV file in a Flex application.
+ *  It supports progressive download over HTTP, streaming from the Flash Media
+ *  Server, and streaming from a Camera object.
+ *
+ *  @mxml
+ *
+ *
The <mx:VideoDisplay> tag inherits all the tag
+ *  attributes of its superclass, and adds the following tag attributes:

+ *
+ *

+ *  <mx:VideoDisplay
+ *    Properties
+ *    autoBandWidthDetection="false|true"
+ *    autoPlay="true|false"
+ *    autoRewind="true|false"
+ *    bufferTime="0.1"
+ *    cuePointManagerClass=""
+ *    cuePoints=""
+ *    idleTimeout="300000"
+ *    live="false|true"
+ *    maintainAspectRatio="true|false"
+ *    playheadTime=""
+ *    playheadUpdateInterval="250"
+ *    progressInterval="250"
+ *    source=""
+ *    totalTime=""
+ *    volume="0.75"
+ *
+ *    Styles
+ *    backgroundAlpha="1.0"
+ *    backgroundColor="0x000000"
+ *    backgroundImage="undefined"
+ *    backgroundSize="undefined"
+ *    borderColor="undefined"
+ *    borderSides="left top right bottom"
+ *    borderSkin="ClassReference('mx.skins.halo.HaloBorder')"
+ *    borderStyle="none"
+ *    borderThickness="1"
+ *    cornerRadius="0"
+ *    dropShadowColor="0x000000"
+ *    dropShadowEnabled="false|true"
+ *    shadowDirection="center"
+ *    shadowDistance="2"
+ *
+ *    Events
+ *    close="No default"
+ *    complete="No default"
+ *    cuePoint="No default"
+ *    playheadUpdate="No default"
+ *    progress="No default"
+ *    ready="No default"
+ *    rewind="No default"
+ *    stateChange="No default"
+ *
+ *  />
+ *

+ *
+ *  @includeExample examples/VideoDisplayExample.mxml
+ *
+ */
+public class VideoDisplay extends UIComponent
+{
+    include "../core/Version.as";
+
+    /**
+     *  @private
+     *  Internal VideoPlayer instance.
+     */
+    mx_internal var videoPlayer:VideoPlayer = null;
+
+    /**
+     *  @private
+     *  Internal CuePointManager instance associated with the VideoPlayer.
+     */
+    private var _cuePointManager:Object = null;
+
+    /**
+     *  @private
+     *  Flag indicating whether the value of source changed.  Checked in
+     *  play()
+     */
+    private var sourceChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  Flag indicating whether close has been called. Checked in
+     *  play()
+     */
+    private var closeCalled:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var makeVideoVisibleOnLayout:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The default width if none is specified and no width information is
+     *  available from the video.
+     */
+    private static const DEFAULT_WIDTH:Number = 10;
+
+    /**
+     *  @private
+     *  The default height if none is specified and no height information is
+     *  available from the video.
+     */
+    private static const DEFAULT_HEIGHT:Number = 10;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function VideoDisplay()
+    {
+        super();
+
+        addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The border object for the control.
+     */
+    protected var border:IFlexDisplayObject;
+
+    /**
+     *  @private
+     */
+    private var asCuePointIndexResetPending:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var creationCompleted:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  autoBandWidthDetection
+    //----------------------------------
+
+    private var _autoBandWidthDetection:Boolean = false;
+
+    [Bindable("autoBandWidthDetection")]
+    [Inspectable(defaultValue="false")]
+
+    /**
+     *  Specifies whether the VideoDisplay control should use the built-in
+     *  automatic bandwidth detection feature.
+     *
+     *  When false, you do not require a main.asc file
+     *  on Flash Media Server (FMS) 2 to connect to FMS.
+     *  When true, you need to implement a main.asc
+     *  and store it in the directory structure of FMS.
+     *  The main.asc file must define the following functions:
+     *
+     *

+     *

+     *  application.onConnect = function(p_client, p_autoSenseBW)
+     *  {
+     *    //Add security code here.
+     *    this.acceptConnection(p_client);
+     *    if (p_autoSenseBW)
+     *      this.calculateClientBw(p_client);
+     *    else
+     *      p_client.call("onBWDone");
+     *  }

+     *
+     *

+     *  application.calculateClientBw = function(p_client)
+     *  {
+     *    // Add code to set the clients BandWidth.
+     *    // Use p_client.getStats() which returns bytes_in
+     *    // and bytes_Out and check your bandWidth using
+     *    // p_client.call("onBWCheck", result, p_client.payload).
+     *    p_client.call("onBWDone");
+     *  }
+     *

+     *

+     *
+     *

+     *  Client.prototype.getStreamLength = function(p_streamName)
+     *  {
+     *    return Stream.length(p_streamName);
+     *  }

+     *

+     *

+     *
+     *  For more information on writing main.asc, see the FMS documentation.
+     *
+     *  @default false
+     */
+    public function get autoBandWidthDetection():Boolean
+    {
+        return _autoBandWidthDetection;
+    }
+
+    /**
+     *  @private
+     */
+    public function set autoBandWidthDetection(value:Boolean):void
+    {
+        if (_autoBandWidthDetection != value)
+        {
+            _autoBandWidthDetection = value;
+
+            if (videoPlayer)
+                videoPlayer.autoBandWidthDetection = value;
+
+            dispatchEvent(new Event("autoBandWidthDetectionChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  autoRewind
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for autoRewind property.
+     */
+    private var _autoRewind:Boolean = true;
+
+    [Bindable("autoRewindChanged")]
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  Specifies whether the FLV file should be rewound to the first frame
+     *  when play stops, either by calling the stop() method or by
+     *  reaching the end of the stream.
+     *
+     *  This property has no effect for live streaming video.
+     *
+     *  @default true
+     */
+    public function get autoRewind():Boolean
+    {
+        return _autoRewind;
+    }
+
+    /**
+     *  @private
+     */
+    public function set autoRewind(value:Boolean):void
+    {
+        if (_autoRewind != value)
+        {
+            _autoRewind = value;
+
+            if (videoPlayer)
+                videoPlayer.autoRewind = value;
+
+            dispatchEvent(new Event("autoRewindChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  borderMetrics
+    //----------------------------------
+
+    /**
+     *  Returns an EdgeMetrics object that has four properties:
+     *  left, top, right,
+     *  and bottom.
+     *  The value of each property is equal to the thickness of one side
+     *  of the border around the control, in pixels.
+     */
+    public function get borderMetrics():EdgeMetrics
+    {
+        return (border && border is IBorder) ?
+                IBorder(border).borderMetrics : EdgeMetrics.EMPTY;
+    }
+
+    //----------------------------------
+    //  bufferTime
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for bufferTime property.
+     */
+    private var _bufferTime:Number = 0.1;
+
+    [Bindable("bufferTimeChanged")]
+    [Inspectable(category="General", defaultValue="0.1")]
+
+    /**
+     *  Number of seconds of video to buffer in memory before starting to play
+     *  the video file.
+     *  For slow connections streaming over RTMP, it is important to increase
+     *  this property from the default.
+     *
+     *  @default 0.1
+     */
+    public function get bufferTime():Number
+    {
+        return _bufferTime;
+    }
+
+    /**
+     *  @private
+     */
+    public function set bufferTime(value:Number):void
+    {
+        if (_bufferTime != value)
+        {
+            _bufferTime = value;
+
+            if (videoPlayer)
+                videoPlayer.bufferTime = value;
+
+            dispatchEvent(new Event("bufferTimeChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  autoPlay
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for autoPlay property.
+     */
+    private var _autoPlay:Boolean = true;
+
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  Specifies whether the video should start playing immediately when the
+     *  source property is set.
+     *  If true, the video file immediately begins to buffer and
+     *  play.
+     *
+     *
Even if autoPlay is set to false, Flex
+     *  starts loading the video after the initialize() method is
+     *  called.
+     *  For Flash Media Server, this means creating the stream and loading
+     *  the first frame to display (and loading more if
+     *  autoSize or aspectRatio is set to
+     *  true).
+     *  In the case of an HTTP download, Flex starts downloading the stream
+     *  and shows the first frame.

+     *
+     *  @default true
+     */
+    public function get autoPlay():Boolean
+    {
+        return _autoPlay;
+    }
+
+    /**
+     *  @private
+     */
+    public function set autoPlay(value:Boolean):void
+    {
+        _autoPlay = value;
+    }
+
+    //----------------------------------
+    //  bytesLoaded
+    //----------------------------------
+
+    [Bindable("complete")]
+    [Bindable("progress")]
+
+    /**
+     *  Number of bytes already loaded that are available for playing.
+     *  The value is only useful for media loaded using HTTP.
+     *
+     *
Contains -1 when there
+     *  is no input stream, when the stream is from Flash Media Server,
+     *  or if the information is not yet available.

+     */
+    public function get bytesLoaded():int
+    {
+        if (videoPlayer)
+            return videoPlayer.bytesLoaded;
+        return -1;
+    }
+
+    //----------------------------------
+    //  bytesTotal
+    //----------------------------------
+
+    [Bindable("complete")]
+    [Bindable("progress")]
+
+    /**
+     *  Total number of bytes to load.
+     *  The value is only useful for media loaded using HTTP.
+     *
+     *
Contains -1 when there
+     *  is no input stream, when the stream is from Flash Media Server,
+     *  or if the information is not yet available.

+     */
+    public function get bytesTotal():int
+    {
+        if (videoPlayer)
+            return videoPlayer.bytesTotal;
+        return -1;
+    }
+
+    //----------------------------------
+    //  cuePointManager
+    //----------------------------------
+
+    /**
+     *  The instance of the CuePointManager class associated with
+     *  the VideoPlayer control.
+     *  You can use this object to control cue points, or use the
+     *  cuePoints property.
+     *
+     *
You use cue points to trigger cuePoint events when the
+     *  playback of your video reaches a specified location.
+     *  To set cue points, you use methods of the CuePointManager class.

+     *
+     *
Cue points embedded in the FLV are not available via cuePoints or
+     * cuePointManager.  In order to retrieve them, you can access the
+     * metadata property or the metadataReceived event.

+     *
+     *  @see mx.controls.videoClasses.CuePointManager
+     */
+    public function get cuePointManager():Object
+    {
+        return _cuePointManager;
+    }
+
+    //----------------------------------
+    //  cuePointManagerClass
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for cuePointManagerClass property.
+     */
+    private var _cuePointManagerClass:Class = null;
+
+    /**
+     *  Cue point manager to use.
+     *  Set this to mx.controls.videoClasses.CuePointManager to enable cue
+     *  point management.
+     *
+     *  @see mx.controls.videoClasses.CuePointManager
+     */
+    public function get cuePointManagerClass():Class
+    {
+        return _cuePointManagerClass;
+    }
+
+    /**
+     *  @private
+     */
+    public function set cuePointManagerClass(value:Class):void
+    {
+        _cuePointManagerClass = value;
+    }
+
+    //----------------------------------
+    // cuePoints
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for cuePoints property.
+     */
+    private var _cuePoints:Array = null;
+
+    [Bindable("cuePointsChanged")]
+    [Inspectable(defaultValue="null")]
+
+    /**
+     *  The Array of cue points associated with the control.
+     *  You can use this property to control cue points, or use the
+     *  cuePointManager property.
+     *
+     *
You use cue points to trigger cuePoint events when the
+     *  playback of your video reaches a specified location.
+     *  To set cue points, you pass an Array to the cuePoints
+     *  property.

+     *
+     *
Cue points embedded in the FLV are not available via cuePoints or
+     * cuePointManager.  In order to retrieve them, you can access the
+     * metadata property or the metadataReceived event.

+     *
+     *
Each element of the Array contains two fields:

+     *

+     *
The name field
+     *      contains an arbitrary name of the cue point.

+     *
The time field
+     *      contains the playhead location, in seconds, of the VideoDisplay
+     *      control with which the cue point is associated.

+     *

+     */
+    public function get cuePoints():Array
+    {
+        if (!_cuePointManager)
+            return _cuePoints;
+        else
+            return _cuePointManager.getCuePoints();
+    }
+
+    /**
+     *  @private
+     */
+    public function set cuePoints(value:Array):void
+    {
+        _cuePoints = value;
+
+        if (_cuePointManager)
+            setCuePoints(value);
+    }
+
+    //----------------------------------
+    //  idleTimeout
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for idleTimeout property.
+     */
+    private var _idleTimeout:int = -1;
+
+    [Inspectable(defaultValue="300000")]
+
+    /**
+     *  Specifies the amount of time, in milliseconds, that the connection is
+     *  idle (playing is paused or stopped) before the connection to the Flash
+     *  Media Server is stopped.
+     *  This property has no effect on the HTTP download of FLV files.
+     *
+     *  If this property is set when the stream is already idle,
+     *  it restarts the idle timeout with a new value.
+     *
+     *  @default 300000 (five minutes)
+     */
+    public function get idleTimeout():int
+    {
+        if (videoPlayer)
+            return videoPlayer.idleTimeout;
+        else
+            return (_idleTimeout == -1)
+                ? VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL
+                : _idleTimeout;
+    }
+
+    /**
+     *  @private
+     */
+    public function set idleTimeout(value:int):void
+    {
+        if (_idleTimeout != value)
+        {
+            _idleTimeout = value;
+
+            if (videoPlayer)
+                videoPlayer.idleTimeout = value;
+        }
+    }
+
+    //----------------------------------
+    //  live
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for live property.
+     */
+    private var _live:Boolean = false;
+
+    [Inspectable(category="General", defaultValue="false")]
+
+    /**
+     *  Specifies whether the control is streaming a live feed.
+     *  Set this property to true when streaming a
+     *  live feed from Flash Media Server.
+     *
+     *  @default false
+     */
+    public function get live():Boolean
+    {
+        return _live;
+    }
+
+    /**
+     *  @private
+     */
+    public function set live(value:Boolean):void
+    {
+        _live = value;
+    }
+
+    //----------------------------------
+    //  maintainAspectRatio
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for maintainAspectRatio property.
+     */
+    private var _maintainAspectRatio:Boolean = true;
+
+    [Bindable("maintainAspectRatioChanged")]
+    [Inspectable(defaultValue="true")]
+
+    /**
+     *  Specifies whether the control should maintain the original aspect ratio
+     *  while resizing the video.
+     *
+     *  @default true
+     */
+    public function get maintainAspectRatio():Boolean
+    {
+        return _maintainAspectRatio;
+    }
+
+    /**
+     *  @private
+     */
+    public function set maintainAspectRatio(value:Boolean):void
+    {
+        if (_maintainAspectRatio != value)
+        {
+            _maintainAspectRatio = value;
+
+            invalidateSize();
+            invalidateDisplayList();
+
+            dispatchEvent(new Event("maintainAspectRatioChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  metadata
+    //----------------------------------
+
+    [Bindable("metadataReceived")]
+
+    /**
+     * An object that contains a metadata information packet that is received from a call to
+     * the NetSteam.onMetaData() callback method, if available.
+     * Ready when the metadataReceived event is dispatched.
+     *
+     *
If the FLV file is encoded with the Flash 8 encoder, the metadata
+     * property contains the following information. Older FLV files contain
+     * only the height, width, and duration values.

+     *
+     *

+     *
Parameter	Description

+     *
canSeekToEnd	A Boolean value that is true if the FLV file is encoded with a keyframe on the last frame that allows seeking to the end of a progressive download movie clip. It is false if the FLV file is not encoded with a keyframe on the last frame.

+     *
cuePoints	An Array of objects, one for each cue point embedded in the FLV file. Value is undefined if the FLV file does not contain any cue points. Each object has the following properties:
+     *
+     *

+     *
type—A String that specifies the type of cue point as either "navigation" or "event".

+     *
name—A String that is the name of the cue point.

+     *
time—A Number that is the time of the cue point in seconds with a precision of three decimal places (milliseconds).

+     *
parameters—An optional Object that has name-value pairs that are designated by the user when creating the cue points.

+     *

+     *

+     *
audiocodecid	A Number that indicates the audio codec (code/decode technique) that was used.

+     *
audiodelay	 A Number that represents time 0 in the source file from which the FLV file was encoded.
+     *
Video content is delayed for the short period of time that is required to synchronize the audio. For example, if the audiodelay value is .038, the video that started at time 0 in the source file starts at time .038 in the FLV file.

+     *
Note that the VideoDisplay class compensates for this delay in its time settings. This means that you can continue to use the time settings that you used in your the source file.

+

+     *
audiodatarate	A Number that is the kilobytes per second of audio.

+     *
videocodecid	A Number that is the codec version that was used to encode the video.

+     *
framerate	A Number that is the frame rate of the FLV file.

+     *
videodatarate	A Number that is the video data rate of the FLV file.

+     *
height	A Number that is the height of the FLV file.

+     *
width	A Number that is the width of the FLV file.

+     *
duration	A Number that specifies the duration of the FLV file in seconds.

+     *

+     */
+    public function get metadata():Object
+    {
+        return videoPlayer != null ? videoPlayer.metadata : null;
+    }
+
+    //----------------------------------
+    //  ncManagerClass
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for ncManagerClass property.
+     */
+    private var _ncManagerClass:Class = null;
+
+    /**
+     *  @private
+     *  Name of the INCManager implementation class to use to
+     *  download the video. The default value is "mx.controls.videoClasses.NCManager".
+     */
+    private function get ncManagerClass():Class
+    {
+        return _ncManagerClass != null
+            ? _ncManagerClass : VideoPlayer.DEFAULT_INCMANAGER;
+    }
+
+    /**
+     *  @private
+     */
+    private function set ncManagerClass(value:Class):void
+    {
+        _ncManagerClass = value;
+    }
+
+    //----------------------------------
+    //  playheadTime
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for playheadTime property.
+     */
+    private var _playheadTime:Number = NaN;
+
+    [Bindable("change")]
+    [Bindable("playheadTimeChanged")]
+    [Bindable("playheadUpdate")]
+    [Inspectable(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.

+     *
+     *
If player is in an unresponsive state, it queues the request.

+     *
+     *
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 NaN
+     */
+    public function get playheadTime():Number
+    {
+        return videoPlayer != null ? videoPlayer.playheadTime : _playheadTime;
+    }
+
+    /**
+     *  @private
+     */
+    public function set playheadTime(value:Number):void
+    {
+        _playheadTime = value;
+        asCuePointIndexResetPending = true;
+        if (videoPlayer)
+        {
+            videoPlayer.playheadTime = value;
+            dispatchEvent(new Event("playheadTimeChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  playheadUpdateInterval
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for playheadUpdateInterval property.
+     */
+    private var _playheadUpdateInterval:int = -1;
+
+    [Inspectable(defaultValue="250")]
+
+    /**
+     *  Specifies the amount of time, in milliseconds,
+     *  between each playheadUpdate event.
+     *
+     *
If you set this property when the video is playing,
+     *  the timer restarts at 0, and the next playheadUpdate
+     *  event occurs after the new time interval.

+     *
+     *  @default 250
+     */
+    public function get playheadUpdateInterval():int
+    {
+        if (videoPlayer)
+            return videoPlayer.playheadUpdateInterval;
+        else
+            return (_playheadUpdateInterval == -1)
+                ? VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL
+                : _playheadUpdateInterval;
+    }
+
+    /**
+     *  @private
+     */
+    public function set playheadUpdateInterval(value:int):void
+    {
+        if (_playheadUpdateInterval != value)
+        {
+            _playheadUpdateInterval = value;
+
+            if (videoPlayer)
+                videoPlayer.playheadUpdateInterval = value;
+        }
+    }
+
+    //----------------------------------
+    //  playing
+    //----------------------------------
+
+    [Bindable("stateChange")]
+
+    /**
+     *  If true, the media is currently playing.
+     */
+    public function get playing():Boolean
+    {
+        return videoPlayer != null
+            && videoPlayer.state == VideoPlayer.PLAYING;
+    }
+
+    //----------------------------------
+    //  progressInterval
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for progressInterval property.
+     */
+    private var _progressInterval:int = -1;
+
+    [Inspectable(defaultValue="250")]
+
+    /**
+     *  Specifies the amount of time, in milliseconds,
+     *  between each progress event.
+     *  The progress event occurs continuously
+     *  until the video file downloads completely.
+     *
+     *
If you set this property when the video is downloading,
+     *  the timer restarts at 0, and the next progress
+     *  event occurs after the new time interval.

+     *
+     *  @default 250
+     */
+    public function get progressInterval():int
+    {
+        if (videoPlayer)
+            return videoPlayer.progressInterval;
+        else
+            return (_progressInterval == -1)
+                ? VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL
+                : _progressInterval;
+    }
+
+    /**
+     *  @private
+     */
+    public function set progressInterval(value:int):void
+    {
+        if (_progressInterval != value)
+        {
+            _progressInterval = value;
+
+            if (videoPlayer)
+                videoPlayer.progressInterval = value;
+        }
+    }
+
+    //----------------------------------
+    //  state
+    //----------------------------------
+
+    [Bindable("stateChange")]
+
+    /**
+     *  The current state of the VideoDisplay control.
+     *  You set this property by calls to the load(),
+     *  play(), stop(), and pause()
+     *  methods, and setting the playHeadTime property.
+     *
+     *
This property can have the following values defined in the
+     *  VideoEvent class:
+     *  VideoEvent.BUFFERING,
+     *  VideoEvent.CONNECTION_ERROR,
+     *  VideoEvent.DISCONNECTED,
+     *  VideoEvent.EXEC_QUEUED_CMD,
+     *  VideoEvent.LOADING, VideoEvent.PAUSED,
+     *  VideoEvent.PLAYING, VideoEvent.RESIZING,
+     *  VideoEvent.REWINDING, VideoEvent.SEEKING,
+     *  and VideoEvent.STOPPED.

+     *
+     *  @default VideoEvent.DISCONNECTED
+     *
+     *  @see mx.events.VideoEvent
+     */
+    public function get state():String
+    {
+        return videoPlayer ? videoPlayer.state : VideoPlayer.DISCONNECTED;
+    }
+
+    //----------------------------------
+    //  stateResponsive
+    //----------------------------------
+
+    [Bindable("stateChange")]
+
+    /**
+     *  Specifies whether the VideoDisplay control is in a responsive state,
+     *  true, or in the unresponsive state, false.
+     *  The control enters the unresponsive state when video is being loaded
+     *  or is rewinding.
+     *
+     *
The control is also in a responsive state when the
+     *  state property is:
+     *  VideoEvent.CONNECTION_ERROR,
+     *  VideoEvent.EXEC_QUEUED_CMD,
+     *  VideoEvent.RESIZING, or
+     *  VideoEvent.SEEKING.

+     *
+     *
If the control is unresponsive, calls to the
+     *  play(), load(), stop(),
+     *  and pause() methods are queued,
+     *  and then executed when the control changes to the responsive state.

+     */
+    public function get stateResponsive():Boolean
+    {
+        return videoPlayer ? videoPlayer.stateResponsive : true;
+    }
+
+    //----------------------------------
+    //  totalTime
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for totalTime property.
+     */
+    private var _totalTime:Number = NaN;
+
+    [Bindable("complete")]
+    [Bindable("totalTimeUpdated")]
+    [Bindable("metadataReceived")]
+    [Inspectable(defaultValue="NaN")]
+
+    /**
+     *  Total length of the media, in seconds.
+     *  For FLV 1.0 video files, you manually set this property.
+     *  For FLV 1.1 and later, the control calculates this value automatically.
+     */
+    public function get totalTime():Number
+    {
+        if (!isNaN(_totalTime))
+            // totalTime was set manually, return the same value.
+            return _totalTime;
+        else
+            return videoPlayer != null ? videoPlayer.totalTime : NaN;
+    }
+
+    /**
+     *  @private
+     */
+    public function set totalTime(value:Number):void
+    {
+        if (_totalTime != value)
+        {
+            _totalTime = value;
+
+            dispatchEvent(new Event("totalTimeUpdated"));
+        }
+    }
+
+    //----------------------------------
+    //  source
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for source property.
+     */
+    private var _source:String = null;
+
+    [Bindable("sourceChanged")]
+    [Inspectable(category="General", defaultValue="null")]
+
+    /**
+     *  Relative path and filename of the FLV file to stream.
+     */
+    public function get source():String
+    {
+        return _source;
+    }
+
+    /**
+     *  @private
+     */
+    public function set source(value:String):void
+    {
+        if (_source != value)
+        {
+            _source = value;
+
+            sourceChanged = true;
+
+            dispatchEvent(new Event("sourceChanged"));
+
+            if (_autoPlay && creationCompleted)
+                autoPlaying();
+        }
+    }
+
+    //----------------------------------
+    //  videoHeight
+    //----------------------------------
+
+    [Bindable("resize")]
+
+    /**
+     *  Height of the loaded FLV file.
+     *  -1 if no FLV file loaded yet.
+     */
+    public function get videoHeight():int
+    {
+        return videoPlayer ? videoPlayer.videoHeight : -1;
+    }
+
+    //----------------------------------
+    //  videoWidth
+    //----------------------------------
+
+    [Bindable("resize")]
+
+    /**
+     *  Width of the loaded FLV file.
+     *  -1 if no FLV file loaded yet.
+     */
+    public function get videoWidth():int
+    {
+        return videoPlayer ? videoPlayer.videoWidth : -1;
+    }
+
+    //----------------------------------
+    //  volume
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for volume property.
+     */
+    private var _volume:Number = 0.75;
+
+    [Bindable("volumeChanged")]
+    [Inspectable(category="General", defaultValue="0.75")]
+
+    /**
+     *  The volume level, specified as an value between 0 and 1.
+     *
+     *  @default 0.75
+     */
+    public function get volume():Number
+    {
+        return videoPlayer ? videoPlayer.volume : _volume;
+    }
+
+    /**
+     *  @private
+     */
+    public function set volume(value:Number):void
+    {
+        if (_volume != value)
+        {
+            _volume = value;
+
+            if (videoPlayer)
+                videoPlayer.volume = value;
+
+            dispatchEvent(new Event("volumeChanged"));
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        createBorder();
+        createVideoPlayer();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var vw:Number = videoPlayer.videoWidth;
+        var vh:Number = videoPlayer.videoHeight;
+
+        measuredWidth = Math.max(vw, DEFAULT_WIDTH);
+        measuredHeight = Math.max(vh, DEFAULT_HEIGHT);
+
+        // Determine whether 'width' and 'height' have been set.
+        var bExplicitWidth:Boolean = !isNaN(explicitWidth);
+        var bExplicitHeight:Boolean = !isNaN(explicitHeight);
+
+        // If only one has been set, calculate the other based on aspect ratio.
+        if (_maintainAspectRatio && (bExplicitWidth || bExplicitHeight))
+        {
+            if (bExplicitWidth && !bExplicitHeight && vw > 0)
+                measuredHeight = explicitWidth * vh / vw;
+            else if (bExplicitHeight && !bExplicitWidth && vh > 0)
+                measuredWidth = explicitHeight * vw / vh;
+        }
+
+        measuredMinWidth = DEFAULT_WIDTH;
+        measuredMinHeight = DEFAULT_HEIGHT;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        layoutChrome(unscaledWidth, unscaledHeight);
+
+        if (!videoPlayer)
+            return;
+
+        var bm:EdgeMetrics = borderMetrics;
+
+        var x:Number = bm.left;
+        var y:Number = bm.top;
+
+        // Allocated size.
+        var w:Number = unscaledWidth - bm.left - bm.right;
+        var h:Number = unscaledHeight - bm.top - bm.bottom;
+
+        // Video size.
+        var vw:Number = videoPlayer.videoWidth;
+        var vh:Number = videoPlayer.videoHeight;
+
+        if (_maintainAspectRatio && vw > 0 && vh > 0)
+        {
+            // 'maintainAspectRatio' is true but explicit width and height have
+            // also been set.  Try to fit the video in the available space,
+            // while maintaining the aspect ratio.
+
+            var rw:Number = w / vw;
+            var rh:Number = h / vh;
+
+            if (rw < rh)
+            {
+                // Adjust height.
+                h = w * vh / vw;
+                y = (unscaledHeight - h) / 2;
+            }
+            else if (rh < rw)
+            {
+                // Adjust width.
+                w = h * vw / vh;
+                x = (unscaledWidth - w) / 2;
+            }
+        }
+
+        videoPlayer.x = x;
+        videoPlayer.y = y;
+
+        videoPlayer.setSize(w, h);
+
+        if (makeVideoVisibleOnLayout)
+        {
+            makeVideoVisibleOnLayout = false;
+            videoPlayer.visible = true;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Public methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Specifies whether to play a video stream from a camera.
+     *  The video is displayed within the boundaries of the
+     *  control in the application window.
+     *
+     *  @param camera A Camera object that
+     *  is capturing video data.
+     */
+    public function attachCamera(camera:Camera):void
+    {
+        if (!videoPlayer)
+            createVideoPlayer();
+
+        videoPlayer.attachCamera(camera);
+        videoPlayer.visible = true;
+    }
+
+    /**
+     *  Forces the close of an input stream and connection to Flash Media
+     *  Server.
+     *  Calling this method dispatches the close event.
+     *  Typically calling this method directly is not necessary
+     *  because the connection is automatically closed when the idle period
+     *  times out, as defined by the idleTimeout property.
+     */
+    public function close():void
+    {
+        if (!videoPlayer)
+            return;
+
+        videoPlayer.close();
+        closeCalled = true;
+    }
+
+    /**
+     *  Loads the media file without playing it.
+     *
+     *
This method is similar to the play() method,
+     *  but it causes the file to be loaded without
+     *  playing.  Autoresizing will occur if appropriate.
+     *  After the load and autoresize, the state of the control is set to
+     *  VideoEvent.PAUSED.

+     */
+    public function load():void
+    {
+        if (!videoPlayer)
+            createVideoPlayer();
+
+        if (sourceChanged)
+        {
+            sourceChanged = false;
+
+            videoPlayer.load(getActualURL(_source), false,
+                isNaN(_totalTime) ? -1 : _totalTime);
+        }
+    }
+
+    /**
+     *  Pauses playback without moving the playhead.
+     *  If playback is already is paused or is stopped, this method has no
+     *  effect.
+     *
+     *
To start playback again, call the play() method.

+     *
+     *
If the control is in an unresponsive state, the request is queued.

+     */
+    public function pause():void
+    {
+        if (!videoPlayer)
+            return;
+
+        videoPlayer.pause();
+    }
+
+    /**
+     *  Plays the media file.
+     *  If the file has not been loaded, it loads it.
+     *  You can call this method while playback is paused, stopped, or while
+     *  the control is playing.
+     *
+     *
If the control is in an unresponsive state, the request is
+     *  queued.

+     */
+    public function play():void
+    {
+        if (!videoPlayer)
+            createVideoPlayer();
+
+        if (videoPlayer.playheadTime >= 0)
+            asCuePointIndexResetPending = true;
+
+        if (sourceChanged || closeCalled)
+        {
+            sourceChanged = false;
+            closeCalled = false;
+
+            videoPlayer.play(getActualURL(_source), _live,
+                isNaN(_totalTime) ? -1 : _totalTime);
+        }
+        else
+            // Don't pass source, to avoid reconnect.
+            videoPlayer.play(null, _live,
+                isNaN(_totalTime) ? -1 : _totalTime);
+    }
+
+    /**
+     *  Stops playback.
+     *  If the autoRewind property is set to
+     *  true, rewind to the first frame.
+     *
+     *
To start playback again, call the play() method.

+     *
+     *
If playback is already stopped, this method has no effect.
+     *  If the control is in an unresponsive state, the request is queued.

+     */
+    public function stop():void
+    {
+        if (!videoPlayer)
+            return;
+
+        videoPlayer.stop();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Protected methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Responds to size changes by setting the positions and sizes of
+     *  the borders.
+     *
+     *
The VideoDisplay.layoutChrome() method sets the
+     *  position and size of the VideoDisplay's border.
+     *  In every subclass of VideoDisplay, the subclass's
+     *  layoutChrome() method should call the
+     *  super.layoutChrome() method, so that the border is
+     *  positioned properly.

+     *
+     *  @param unscaledWidth Specifies the width of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleX property of the component.
+     *
+     *  @param unscaledHeight Specifies the height of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleY property of the component.
+     */
+    protected function layoutChrome(unscaledWidth:Number,
+                                    unscaledHeight:Number):void
+    {
+        // Border covers the whole thing.
+        if (border)
+        {
+            border.move(0, 0);
+            border.setActualSize(unscaledWidth, unscaledHeight);
+        }
+    }
+
+    /**
+     *  Creates the border for this component.
+     *  Normally the border is determined by the
+     *  borderStyle and borderSkin styles.
+     *  It must set the border property to the instance of the border.
+     */
+    protected function createBorder():void
+    {
+        if (!border && isBorderNeeded())
+        {
+            var borderClass:Class = getStyle("borderSkin");
+
+            border = new borderClass();
+
+            if (border is IUIComponent)
+                IUIComponent(border).enabled = enabled;
+            if (border is ISimpleStyleClient)
+                ISimpleStyleClient(border).styleName = this;
+
+            // Add the border behind all the children.
+            addChildAt(DisplayObject(border), 0);
+
+            invalidateDisplayList();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private methods
+    //
+    //--------------------------------------------------------------------------
+
+    private function getActualURL(url:String):String
+    {
+        // make relative paths relative to the SWF loading it, not the top-level SWF
+        if (!(url.indexOf(":") > -1 || url.indexOf("/") == 0 || url.indexOf("\\") == 0))
+        {
+            var rootURL:String;
+            if (root)
+                rootURL = LoaderUtil.normalizeURL(root.loaderInfo);
+            else if (systemManager)
+                rootURL = LoaderUtil.normalizeURL(DisplayObject(systemManager).loaderInfo);
+
+            if (rootURL)
+            {
+                var lastIndex:int = Math.max(rootURL.lastIndexOf("\\"), rootURL.lastIndexOf("/"));
+                if (lastIndex != -1)
+                    url = rootURL.substr(0, lastIndex + 1) + url;
+            }
+        }
+        return url;
+    }
+
+    /**
+     *  Returns TRUE if a border is needed for this component based
+     *  on the borderStyle and whether or not there is a background
+     *  for the component.
+     */
+    private function isBorderNeeded():Boolean
+    {
+        //trace("isBorderNeeded",this,"ms",getStyle("mouseShield"),"borderStyle",getStyle("borderStyle"));
+
+        var v:Object = getStyle("borderStyle");
+        if (v)
+        {
+            // If borderStyle is "none", then only create a border if the mouseShield style is true
+            // (meaning that there is a mouse event listener on this view). We don't create a border
+            // if our parent's mouseShieldChildren style is true.
+            if ((v != "none") || (v == "none" && getStyle("mouseShield")))
+            {
+                return true;
+            }
+        }
+
+        v = getStyle("backgroundColor");
+        if (v !== null && v !== "")
+            return true;
+
+        v = getStyle("backgroundImage");
+        return v != null && v != "";
+    }
+
+    /**
+     *  @private
+     */
+    private function createVideoPlayer():void
+    {
+        videoPlayer = new VideoPlayer(10, 10, _ncManagerClass);
+        addChild(videoPlayer);
+
+        videoPlayer.visible = false;
+
+        videoPlayer.autoBandWidthDetection = _autoBandWidthDetection;
+        videoPlayer.autoRewind = _autoRewind;
+        videoPlayer.bufferTime = _bufferTime;
+        videoPlayer.volume = _volume;
+
+        if (_idleTimeout != -1)
+            videoPlayer.idleTimeout = _idleTimeout;
+
+        if (_playheadUpdateInterval != -1)
+            videoPlayer.playheadUpdateInterval = _playheadUpdateInterval;
+
+        if (_progressInterval != -1)
+            videoPlayer.progressInterval = _progressInterval;
+
+        videoPlayer.addEventListener(VideoEvent.PLAYHEAD_UPDATE,
+                                     videoPlayer_playheadUpdateHandler);
+
+        videoPlayer.addEventListener(VideoEvent.COMPLETE,
+                                     videoPlayer_completeHandler);
+
+        videoPlayer.addEventListener(MetadataEvent.CUE_POINT,
+                                     videoPlayer_cuePointHandler);
+
+        videoPlayer.addEventListener(MetadataEvent.METADATA_RECEIVED,
+                                     videoPlayer_metadataHandler);
+
+        videoPlayer.addEventListener(ProgressEvent.PROGRESS,
+                                     videoPlayer_progressHandler);
+
+        videoPlayer.addEventListener(VideoEvent.READY,
+                                     videoPlayer_readyHandler);
+
+        videoPlayer.addEventListener(VideoEvent.REWIND,
+                                     videoPlayer_rewindHandler);
+
+        videoPlayer.addEventListener(VideoEvent.STATE_CHANGE,
+                                     videoPlayer_stateChangeHandler);
+
+        if (cuePointManagerClass)
+        {
+            _cuePointManager = new cuePointManagerClass(videoPlayer);
+            _cuePointManager.videoDisplay = this;
+        }
+
+        if (_cuePoints)
+            setCuePoints(_cuePoints);
+    }
+
+    /**
+     *  @private
+     */
+    private function autoPlaying():void
+    {
+        if (_source)
+        {
+            // Start playing or loading.
+            if (_autoPlay)
+                play();
+            else
+                load();
+
+            // Seek to playheadTime now if specified.
+            if (!isNaN(_playheadTime))
+            {
+                asCuePointIndexResetPending = Boolean(_playheadTime >= 0);
+                videoPlayer.seek(_playheadTime);
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function resizeVideo():void
+    {
+        var vw:Number = videoPlayer.videoWidth;
+        var vh:Number = videoPlayer.videoHeight;
+
+        if ((vw > 0 && vh > 0)
+                && (measuredWidth != vw || measuredHeight != vh))
+        {
+            // The video width and height have now become available.  Do the
+            // sizing and layout once again.
+            invalidateSize();
+            invalidateDisplayList();
+
+            // Make video visible in updateDisplayList()
+            makeVideoVisibleOnLayout = true;
+        }
+    }
+
+
+    /**
+     *  @private
+     *  Creates and populates an array of cue points.
+     *
+     *  @param cuePoints Array of cue points.
+     */
+    private function setCuePoints(cuePoints:Array):void
+    {
+        if (_cuePointManager)
+            _cuePointManager.setCuePoints(cuePoints);
+        _cuePoints = null;
+
+        dispatchEvent(new Event("cuePointsChanged"));
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Handler for "creationComplete" of this object.
+     */
+    private function creationCompleteHandler(event:FlexEvent):void
+    {
+        removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
+        creationCompleted = true;
+        autoPlaying();
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_playheadUpdateHandler(event:VideoEvent):void
+    {
+        dispatchEvent(event.clone());
+
+        if (_cuePointManager)
+        {
+            if (asCuePointIndexResetPending && videoPlayer.state != VideoPlayer.SEEKING)
+            {
+                asCuePointIndexResetPending = false;
+                _cuePointManager.resetCuePointIndex(event.playheadTime);
+            }
+            _cuePointManager.dispatchCuePoints();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_completeHandler(event:VideoEvent):void
+    {
+        dispatchEvent(event.clone());
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_cuePointHandler(event:MetadataEvent):void
+    {
+        var info:Object = event.info;
+
+        var cuePointEvent:CuePointEvent = new CuePointEvent(CuePointEvent.CUE_POINT);
+
+        cuePointEvent.cuePointName = info.name;
+        cuePointEvent.cuePointTime = info.time;
+        cuePointEvent.cuePointType = info.type;
+
+        dispatchEvent(cuePointEvent);
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_metadataHandler(event:MetadataEvent):void
+    {
+        resizeVideo();
+        dispatchEvent(event.clone());
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_progressHandler(event:ProgressEvent):void
+    {
+        dispatchEvent(event.clone());
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_readyHandler(event:VideoEvent):void
+    {
+        resizeVideo();
+        dispatchEvent(event.clone());
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_rewindHandler(event:VideoEvent):void
+    {
+        dispatchEvent(event.clone());
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_stateChangeHandler(event:VideoEvent):void
+    {
+        // In some cases, the video width and height are updated only once the
+        // video has started playing.
+        if (videoPlayer.state == VideoPlayer.PLAYING)
+            resizeVideo();
+
+        dispatchEvent(event.clone());
+    }
+}
+}
+


Transferred from the Adobe Open Source Subversion Repository

Revision: 5119
Author:   smgilson@adobe.com
Date:     2009-03-01T15:19:39.936226Z

Log Message:
-----------
Clean up some ASDoc tags from the addition of the @productversion/@playerversion tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/NCManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/Base64Encoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/StringValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IInteractiveObjectInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ContainerRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.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/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.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/flex4/src/mx/skins/spark/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.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/videoClasses/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/Schema.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/HexEncoder.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/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.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/framework/src/mx/effects/effectClasses/SoundEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISpriteInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/HaloRectBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as</path>

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 2506
Author:   jimurphy@adobe.com
Date:     2008-07-16T13:25:03.893431Z

Log Message:
-----------
Merged 3.0.x revisions [2417,2458,2504] -> trunk
-I also manually updated modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java to implement flex2.linker.LinkerConfiguration due to a name change in trunk
-removed player 9 stuff

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.project" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.project</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/DependencyChecker.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/IResourceManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.actionScriptProperties" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/air-config.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/mac/Install Flash Player 10 UB.dmg</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/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.settings/org.eclipse.core.resources.prefs" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.settings/org.eclipse.core.resources.prefs</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/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.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/controls/SWFLoader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.flexLibProperties" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.flexLibProperties</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/lnx/install_flash_player_9_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/LibrariesNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DependencyNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.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="D">/flex/sdk/trunk/in/player/win/Install Flash Player 9 Plugin.exe</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/mac/Install Flash Player 9 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/MarshalMouseEvent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/resources/LocaleSorter.as" copyfrom-rev="2504" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/LocaleSorter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/win/Install Flash Player 9 ActiveX.exe</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework" copyfrom-rev="2504" action="A">/flex/sdk/trunk/development/eclipse/flex/airframework</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</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/scrollClasses/ScrollThumb.as</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DefNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/LibraryNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/ScriptNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/src/java/macromedia/asc/util/ContextStatics.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DepNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.settings" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.settings</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/10/lnx/Flash Player.app.zip</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/libs/player/9</path>

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

--- frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
+++ frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
@@ -1083,11 +1083,26 @@
      */
     public function logout(agent:MessageAgent=null):AsyncToken
     {
+        _credentials = null;
         if (agent == null)
         {
             if ((_authAgent != null) && (_authAgent.state == AuthenticationAgent.LOGGING_OUT_STATE
                                          || _authAgent.state == AuthenticationAgent.LOGGING_IN_STATE))
                 throw new IllegalOperationError("ChannelSet is in the process of logging in or logging out.");
+
+            // Clear out current credentials on the client.
+            var n:int = _messageAgents.length;
+            var i:int = 0;
+            for (; i < n; i++)
+            {
+                _messageAgents[i].internalSetCredentials(null);
+            }
+            n = _channels.length;
+            for (i = 0; i < n; i++)
+            {
+                if (_channels[i] != null)
+                    _channels[i].internalSetCredentials(null);
+            }

             var msg:CommandMessage = new CommandMessage();
             msg.operation = CommandMessage.LOGOUT_OPERATION;
@@ -1105,13 +1120,12 @@
             return token;
         }
         else // Legacy logout logic.
-        {
-            _credentials = null;
-            var n:int = _channels.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                if (_channels[i] != null)
-                    _channels[i].logout(agent);
+        {
+            var n2:int = _channels.length;
+            for (var i2:int = 0; i2 < n2; i2++)
+            {
+                if (_channels[i2] != null)
+                    _channels[i2].logout(agent);
             }
             return null; // Legacy service logout() impls don't expect a token.
         }
@@ -1238,23 +1252,23 @@
         var handlingLogin:Boolean = (command.operation == CommandMessage.LOGIN_OPERATION);
         var creds:String = (handlingLogin) ? String(command.body) : null;

-        // First, sync everything with the current credentials.
-        _credentials = creds;
-        var n:int = _messageAgents.length;
-        var i:int = 0;
-        for (; i < n; i++)
-        {
-            _messageAgents[i].internalSetCredentials(creds);
-        }
-        n = _channels.length;
-        for (i = 0; i < n; i++)
-        {
-            if (_channels[i] != null)
-                _channels[i].internalSetCredentials(creds);
-        }
-
         if (handlingLogin)
         {
+            // First, sync everything with the current credentials.
+            _credentials = creds;
+            var n:int = _messageAgents.length;
+            var i:int = 0;
+            for (; i < n; i++)
+            {
+                _messageAgents[i].internalSetCredentials(creds);
+            }
+            n = _channels.length;
+            for (i = 0; i < n; i++)
+            {
+                if (_channels[i] != null)
+                    _channels[i].internalSetCredentials(creds);
+            }
+
             agent.state = AuthenticationAgent.LOGGED_IN_STATE;
             // Flip the currently connected channel to authenticated; this percolates
             // back up through the ChannelSet and agent's authenticated properties.


Transferred from the Adobe Open Source Subversion Repository

Revision: 18691
Author:   hmuller@adobe.com
Date:     2010-11-18T04:51:00.108928Z

Log Message:
-----------
Column-resizing now works relatively intuitively for RTL layouts.

API changes:
- Added DataGrid,Grid/invalidateCell()

- Added GridItemRenderer/get columnIndex()

- Renamed the following protected Grid methods:
grid_RollOverHandler() => grid_rollOverHandler()
grid_RollOutHandler() => grid_rollOutHandler()
grid_MouseUpHandler() => grid_mouseUpHandler()
grid_MouseDownHandler() => grid_mouseDownHandler()

QE notes: One failing mustella test excluded
Doc notes:
Bugs: SDK-28539, SDK-28322, SDK-28571
Reviewer: Carol, Kevin
Tests run: checkin, mustella
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/GridMark/.actionScriptProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -3196,6 +3196,39 @@
             super.invalidateDisplayList();
             dispatchChangeEvent("invalidateDisplayList");
         }
+    }
+
+    /**
+     *  If the specified cell is visible, it will be redisplayed.  If variableRowHeight=true
+     *  then doing so may cause the height of the corresponding row to change.
+     *
+     *
If columnIndex is -1, then the entire row is invalidated.  Similarly if rowIndex is -1,
+     *  the entire column is invalidated.

+     *
+     *
This method should be called when there is a change to any aspect of
+     *  the dataProvider item at rowIndex that might have some impact on the way the
+     *  specified cell is displayed. Calling this method is similar to calling
+     *  dataProvider.itemUpdated(), which advises the Grid that all rows
+     *  displaying the specified item should be redisplayed.  Using this method can
+     *  be relatively efficient, since it narrows the scope of the change to a single cell.

+     *
+     *  @param rowIndex The 0-based row index of the cell that changed, or -1.
+     *  @param column Index The 0-based column index of the cell that changed or -1.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    public function invalidateCell(rowIndex:int, columnIndex:int):void
+    {
+        if (!dataProvider || (rowIndex < 0) || (rowIndex >= dataProvider.length))
+            return;
+
+        // Provisional implementation: invalidate the entire row
+        const column:GridColumn = getGridColumn(columnIndex);
+        const dataField:String = (column) ? column.dataField : null;
+        dataProvider.itemUpdated(dataProvider.getItemAt(rowIndex), dataField);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5110
Author:   dsubrama@adobe.com
Date:     2009-02-27T18:33:07.234761Z

Log Message:
-----------
Bugfixes:

SDK-15413: Fix ASDoc for DateChooser.displayedYear. Also removed legacy @helpid, @tiptext ASDoc directives.

SDK-18682: Ensure selectedItem and selectedItems show up in code hints for List-based components.

SDK-19485: requiresSelection and allowMultipleSelection are legit properties on List now. Multiple selection support is coming in a subsequent checkin, but now list doesn't RTE when those two props are set.

QA: Yes, tests for requiresSelection should be added to the Spark List testsuite.
Checkintests: Yes, pass
Reviewer: Ryan

Modified Paths:
--------------
<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/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.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/flex4/src/mx/components/baseClasses/FxListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -142,19 +142,16 @@
     //
     //--------------------------------------------------------------------------

-    /*
-     *  TODO: description of how single selection properties
-     *  work when multiple selection is enabled. multiple selection
-     *  doesn't support selectionChanging event. etc.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    /**
-     *  true if the list supports multiple selection.
-     *
+    //----------------------------------
+    //  allowMultipleSelection
+    //----------------------------------
+
+    private var _allowMultipleSelection:Boolean = false;
+
+    /**
+     *  Boolean flag controlling whether multiple selection
+     *  is enabled or not.
+     *
      *  @default false
      *
      *  @langversion 3.0
@@ -162,7 +159,21 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var allowMultipleSelection:Boolean = false;
+    public function get allowMultipleSelection():Boolean
+    {
+        return _allowMultipleSelection;
+    }
+
+    /**
+     *  @private
+     */
+    public function set allowMultipleSelection(value:Boolean):void
+    {
+    	if (value == _allowMultipleSelection)
+    		return
+
+    	_allowMultipleSelection = true;
+    }

     //----------------------------------
     //  selectedIndex
@@ -192,13 +203,13 @@
      *  @productversion Flex 4
      */
     override public function get selectedIndex():int
-    {
+    {
         if (!allowMultipleSelection)
             return super.selectedIndex;

         if (_selectedIndices && _selectedIndices.length > 0)
             return _selectedIndices[0];
-
+
         return NO_SELECTION;
     }

@@ -373,7 +384,7 @@
      */
     override public function isItemIndexSelected(index:int):Boolean
     {
-        if (allowMultipleSelection)
+        if (allowMultipleSelection && (selectedIndices != null))
             return selectedIndices.indexOf(index) != -1;

         return index == selectedIndex;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19246
Author:   mcho@adobe.com
Date:     2010-12-10T00:02:55.132015Z

Log Message:
-----------
Convert mobile theme ListSkin from MXML to AS

QE notes:
Doc notes:
Bugs:
Reviewer: Ryan & Jason SJ
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/src/views/MobileSkinsHomeView.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/src/views/ListView.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -81,7 +81,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="borderAlpha", type="Number", inherit="no", theme="spark", minValue="0.0", maxValue="1.0")]
+[Style(name="borderAlpha", type="Number", inherit="no", theme="spark, mobile", minValue="0.0", maxValue="1.0")]

 /**
  *  The color of the border for this component.
@@ -93,7 +93,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="borderColor", type="uint", format="Color", inherit="no", theme="spark")]
+[Style(name="borderColor", type="uint", format="Color", inherit="no", theme="spark, mobile")]

 /**
  *  Controls the visibility of the border for this component.


Transferred from the Adobe Open Source Subversion Repository

Revision: 20204
Author:   aharui@adobe.com
Date:     2011-02-08T20:27:58.972959Z

Log Message:
-----------
remove preventDefault() from mouseDown handlers.  Folks will have to add that behavior if they want it.

QE notes: none
Doc notes:  none
Bugs: SDK-29422
Reviewer: Ryan
Tests run: checkintests mustella cyclone full run
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -1767,9 +1767,6 @@
         if (event.isDefaultPrevented())
             return;

-        // we are about to handle it
-        event.preventDefault();
-
         // Handle the fixup of selection
         var newIndex:int
         if (event.currentTarget is IItemRenderer)