begin refactoring ExporterController

begin refactoring ExporterController

--- exporter/src/main/as/flump/export/ExporterController.as
+++ exporter/src/main/as/flump/export/ExporterController.as
@@ -46,21 +46,82 @@
     public function ExporterController (win :ExporterWindow) {
         Log.setLevel("", Log.INFO);
         _win = win;
-        _errors = _win.errors;
-        _libraries = _win.libraries;
-
-        function updatePreviewAndExport (..._) :void {
-            _win.export.enabled = _exportChooser.dir != null && _libraries.selectionLength > 0 &&
-                _libraries.selectedItems.some(function (status :DocStatus, ..._) :Boolean {
-                    return status.isValid;
-            });
-
-            var status :DocStatus = _libraries.selectedItem as DocStatus;
-            _win.preview.enabled = status != null && status.isValid;
-
-            if (_exportChooser.dir == null) return;
-            _conf.exportDir = _confFile == null ? _exportChooser.dir.nativePath : _confFile.parent.getRelativePath(_exportChooser.dir, /*useDotDot=*/true);
-        }
+        _errorsGrid = _win.errors;
+        _librariesGrid = _win.libraries;
+
+
+
+        if (_settings.data.hasOwnProperty(CONF_FILE_KEY)) {
+            _confFile = new File(_settings.data[CONF_FILE_KEY]);
+            openConf();
+        }
+
+        var curSelection :DocStatus = null;
+        _librariesGrid.addEventListener(GridSelectionEvent.SELECTION_CHANGE, function (..._) :void {
+            log.info("Changed", "selected", _librariesGrid.selectedIndices);
+            updatePreviewAndExport();
+
+            if (curSelection != null) {
+                curSelection.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, updatePreviewAndExport);
+            }
+            var newSelection :DocStatus = _librariesGrid.selectedItem as DocStatus;
+            if (newSelection != null) {
+                newSelection.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, updatePreviewAndExport);
+            }
+            curSelection = newSelection;
+        });
+        _win.reload.addEventListener(MouseEvent.CLICK, F.callback(reloadNow));
+        _win.export.addEventListener(MouseEvent.CLICK, function (..._) :void {
+            for each (var status :DocStatus in _librariesGrid.selectedItems) {
+                exportFlashDocument(status);
+            }
+        });
+        _win.preview.addEventListener(MouseEvent.CLICK, function (..._) :void {
+            showPreviewWindow(_librariesGrid.selectedItem.lib);
+        });
+        _importChooser = new DirChooser(null, _win.importRoot, _win.browseImport);
+        _importChooser.changed.add(setImport);
+        _exportChooser = new DirChooser(null, _win.exportRoot, _win.browseExport);
+        _exportChooser.changed.add(reloadNow);
+
+        _importChooser.changed.add(F.callback(updateWindowTitle, true));
+        _exportChooser.changed.add(F.callback(updateWindowTitle, true));
+
+        var editFormats :EditFormatsWindow;
+        _win.editFormats.addEventListener(MouseEvent.CLICK, function (..._) :void {
+            if (editFormats == null || editFormats.closed) {
+                editFormats = new EditFormatsWindow();
+                editFormats.open();
+            } else editFormats.orderToFront();
+
+            var dataProvider :ArrayList = new ArrayList(_conf.exports);
+            dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, updateFromConf);
+
+            editFormats.exports.dataProvider = dataProvider;
+            editFormats.buttonAdd.addEventListener(MouseEvent.CLICK, function (..._) :void {
+                var export :ExportConf = new ExportConf();
+                export.name = "format" + (_conf.exports.length+1);
+                if (_conf.exports.length > 0) {
+                    export.format = _conf.exports[0].format;
+                }
+                dataProvider.addItem(export);
+            });
+            editFormats.exports.addEventListener(GridSelectionEvent.SELECTION_CHANGE, function (..._) :void {
+                editFormats.buttonRemove.enabled = (editFormats.exports.selectedItem != null);
+            });
+            editFormats.buttonRemove.addEventListener(MouseEvent.CLICK, function (..._) :void {
+                for each (var export :ExportConf in editFormats.exports.selectedItems) {
+                    dataProvider.removeItem(export);
+                }
+            });
+        });
+
+        updateFromConf();
+        updateWindowTitle(false);
+        _win.addEventListener(Event.CLOSE, function (..._) :void { NA.exit(0); });
+    }
+
+    protected function setupMenus () :void {

         var fileMenuItem :NativeMenuItem;
         if (NativeApplication.supportsMenu) {
@@ -74,14 +135,6 @@
             fileMenuItem = _win.nativeWindow.menu.addSubmenu(new NativeMenu(), "File");
         }

-        function open (file :File) :void {
-            _confFile = file;
-            saveConfFilePath();
-            openConf();
-            updateFromConf();
-            updateWindowTitle(false);
-        };
-
         // Add save and save as by index to work with the existing items on Mac
         // Mac menus have an existing "Close" item, so everything we add should go ahead of that
         var newMenuItem :NativeMenuItem = fileMenuItem.submenu.addItemAt(new NativeMenuItem("New Project"), 0);
@@ -92,6 +145,7 @@
             setImport(null);
             updateFromConf();
         });
+
         var openMenuItem :NativeMenuItem =
             fileMenuItem.submenu.addItemAt(new NativeMenuItem("Open Project..."), 1);
         openMenuItem.keyEquivalent = "o";
@@ -151,119 +205,71 @@
             else saveConf();
         });

-        function updateWindowTitle (modified :Boolean) :void {
-            var name :String = (_confFile != null) ? _confFile.name.replace(/\.flump$/i, "") : "Untitled Project";
-            if (modified) name += "*";
-            _win.title = name;
-        };
-
-        function reloadNow () :void {
-            setImport(_importChooser.dir);
-            updatePreviewAndExport();
-        }
-
-        function openConf () :void {
-            try {
-                _conf = FlumpConf.fromJSON(JSONFormat.readJSON(_confFile));
-                var dir :String = _confFile.parent.resolvePath(_conf.importDir).nativePath;
-                setImport(new File(dir));
-            } catch (e :Error) {
-                log.warning("Unable to parse conf", e);
-                _errors.dataProvider.addItem(new ParseError(_confFile.nativePath,
-                    ParseError.CRIT, "Unable to read configuration"));
-                _confFile = null;
-            }
-        };
-
         const saveAsMenuItem :NativeMenuItem =
             fileMenuItem.submenu.addItemAt(new NativeMenuItem("Save Project As..."), 4);
         saveAsMenuItem.keyEquivalent = "S";
         saveAsMenuItem.addEventListener(Event.SELECT, saveAs);
-
-        if (_settings.data.hasOwnProperty(CONF_FILE_KEY)) {
-            _confFile = new File(_settings.data[CONF_FILE_KEY]);
-            openConf();
-        }
-
-        var curSelection :DocStatus = null;
-        _libraries.addEventListener(GridSelectionEvent.SELECTION_CHANGE, function (..._) :void {
-            log.info("Changed", "selected", _libraries.selectedIndices);
-            updatePreviewAndExport();
-
-            if (curSelection != null) {
-                curSelection.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, updatePreviewAndExport);
-            }
-            var newSelection :DocStatus = _libraries.selectedItem as DocStatus;
-            if (newSelection != null) {
-                newSelection.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, updatePreviewAndExport);
-            }
-            curSelection = newSelection;
-        });
-        _win.reload.addEventListener(MouseEvent.CLICK, F.callback(reloadNow));
-        _win.export.addEventListener(MouseEvent.CLICK, function (..._) :void {
-            for each (var status :DocStatus in _libraries.selectedItems) {
-                exportFlashDocument(status);
-            }
-        });
-        _win.preview.addEventListener(MouseEvent.CLICK, function (..._) :void {
-            showPreviewWindow(_libraries.selectedItem.lib);
-        });
-        _importChooser = new DirChooser(null, _win.importRoot, _win.browseImport);
-        _importChooser.changed.add(setImport);
-        _exportChooser = new DirChooser(null, _win.exportRoot, _win.browseExport);
-        _exportChooser.changed.add(reloadNow);
-
-        _importChooser.changed.add(F.callback(updateWindowTitle, true));
-        _exportChooser.changed.add(F.callback(updateWindowTitle, true));
-
-        function updateFromConf (..._) :void {
-            if (_confFile != null) {
-                _importChooser.dir = (_conf.importDir != null) ? _confFile.parent.resolvePath(_conf.importDir) : null;
-                _exportChooser.dir = (_conf.exportDir != null) ? _confFile.parent.resolvePath(_conf.exportDir) : null;
-            } else {
-                _importChooser.dir = null;
-                _exportChooser.dir = null;
-            }
-
-            var formatNames :Array = [];
-            for each (var export :ExportConf in _conf.exports) formatNames.push(export.description);
-            _win.formatOverview.text = formatNames.join(", ");
-
-            updateWindowTitle(true);
-        };
-
-        var editFormats :EditFormatsWindow;
-        _win.editFormats.addEventListener(MouseEvent.CLICK, function (..._) :void {
-            if (editFormats == null || editFormats.closed) {
-                editFormats = new EditFormatsWindow();
-                editFormats.open();
-            } else editFormats.orderToFront();
-
-            var dataProvider :ArrayList = new ArrayList(_conf.exports);
-            dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, updateFromConf);
-
-            editFormats.exports.dataProvider = dataProvider;
-            editFormats.buttonAdd.addEventListener(MouseEvent.CLICK, function (..._) :void {
-                var export :ExportConf = new ExportConf();
-                export.name = "format" + (_conf.exports.length+1);
-                if (_conf.exports.length > 0) {
-                    export.format = _conf.exports[0].format;
-                }
-                dataProvider.addItem(export);
-            });
-            editFormats.exports.addEventListener(GridSelectionEvent.SELECTION_CHANGE, function (..._) :void {
-                editFormats.buttonRemove.enabled = (editFormats.exports.selectedItem != null);
-            });
-            editFormats.buttonRemove.addEventListener(MouseEvent.CLICK, function (..._) :void {
-                for each (var export :ExportConf in editFormats.exports.selectedItems) {
-                    dataProvider.removeItem(export);
-                }
-            });
-        });
-
+    }
+
+    protected function updateWindowTitle (modified :Boolean) :void {
+        var name :String = (_confFile != null) ? _confFile.name.replace(/\.flump$/i, "") : "Untitled Project";
+        if (modified) name += "*";
+        _win.title = name;
+    }
+
+    protected function openConf () :void {
+        try {
+            _conf = FlumpConf.fromJSON(JSONFormat.readJSON(_confFile));
+            var dir :String = _confFile.parent.resolvePath(_conf.importDir).nativePath;
+            setImport(new File(dir));
+        } catch (e :Error) {
+            log.warning("Unable to parse conf", e);
+            _errorsGrid.dataProvider.addItem(new ParseError(_confFile.nativePath,
+                ParseError.CRIT, "Unable to read configuration"));
+            _confFile = null;
+        }
+    }
+
+    protected function open (file :File) :void {
+        _confFile = file;
+        saveConfFilePath();
+        openConf();
         updateFromConf();
         updateWindowTitle(false);
-        _win.addEventListener(Event.CLOSE, function (..._) :void { NA.exit(0); });
+    }
+
+    protected function reloadNow () :void {
+        setImport(_importChooser.dir);
+        updatePreviewAndExport();
+    }
+
+    protected function updateFromConf (..._) :void {
+        if (_confFile != null) {
+            _importChooser.dir = (_conf.importDir != null) ? _confFile.parent.resolvePath(_conf.importDir) : null;
+            _exportChooser.dir = (_conf.exportDir != null) ? _confFile.parent.resolvePath(_conf.exportDir) : null;
+        } else {
+            _importChooser.dir = null;
+            _exportChooser.dir = null;
+        }
+
+        var formatNames :Array = [];
+        for each (var export :ExportConf in _conf.exports) formatNames.push(export.description);
+        _win.formatOverview.text = formatNames.join(", ");
+
+        updateWindowTitle(true);
+    }
+
+    protected function updatePreviewAndExport (..._) :void {
+        _win.export.enabled = _exportChooser.dir != null && _librariesGrid.selectionLength > 0 &&
+            _librariesGrid.selectedItems.some(function (status :DocStatus, ..._) :Boolean {
+                return status.isValid;
+            });
+
+        var status :DocStatus = _librariesGrid.selectedItem as DocStatus;
+        _win.preview.enabled = status != null && status.isValid;
+
+        if (_exportChooser.dir == null) return;
+        _conf.exportDir = _confFile == null ? _exportChooser.dir.nativePath : _confFile.parent.getRelativePath(_exportChooser.dir, /*useDotDot=*/true);
     }

     protected function get publisher () :Publisher {
@@ -278,8 +284,8 @@
     }

     protected function setImport (root :File) :void {
-        _libraries.dataProvider.removeAll();
-        _errors.dataProvider.removeAll();
+        _librariesGrid.dataProvider.removeAll();
+        _errorsGrid.dataProvider.removeAll();
         if (root == null) return;
         _rootLen = root.nativePath.length + 1;
         if (_docFinder != null) _docFinder.shutdownNow();
@@ -332,7 +338,7 @@
             for each (var file :File in files) {
                 if (Files.hasExtension(file, "xfl")) {
                     if (ignoreXflAtBase) {
-                        _errors.dataProvider.addItem(new ParseError(base.nativePath,
+                        _errorsGrid.dataProvider.addItem(new ParseError(base.nativePath,
                             ParseError.CRIT, "The import directory can't be an XFL directory, did you mean " +
                             base.parent.nativePath + "?"));
                     } else addFlashDocument(file);
@@ -379,12 +385,12 @@
         }

         const status :DocStatus = new DocStatus(name, _rootLen, Ternary.UNKNOWN, Ternary.UNKNOWN, null);
-        _libraries.dataProvider.addItem(status);
+        _librariesGrid.dataProvider.addItem(status);

         load.succeeded.add(function (lib :XflLibrary) :void {
             status.lib = lib;
             status.updateModified(Ternary.of(publisher == null || publisher.modified(lib)));
-            for each (var err :ParseError in lib.getErrors()) _errors.dataProvider.addItem(err);
+            for each (var err :ParseError in lib.getErrors()) _errorsGrid.dataProvider.addItem(err);
             status.updateValid(Ternary.of(lib.valid));
         });
         load.failed.add(function (error :Error) :void {
@@ -398,13 +404,14 @@

     protected var _docFinder :Executor;
     protected var _win :ExporterWindow;
-    protected var _libraries :DataGrid;
-    protected var _errors :DataGrid;
+    protected var _librariesGrid :DataGrid;
+    protected var _errorsGrid :DataGrid;
     protected var _exportChooser :DirChooser;
     protected var _importChooser :DirChooser;
     protected var _authoredResolution :DropDownList;
     protected var _conf :FlumpConf = new FlumpConf();
     protected var _confFile :File;
+
     protected const _settings :SharedObject = SharedObject.getLocal("flump/Exporter");

     private static const log :Log = Log.getLog(ExporterController);


Transferred from the Adobe Open Source Subversion Repository

Revision: 13965
Author:   build@adobe.com
Date:     2010-02-03T20:37:12.428300Z

Log Message:
-----------
Version update to 4.5.0

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/build.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Version.as</path>

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

--- frameworks/projects/airframework/src/mx/core/Version.as
+++ frameworks/projects/airframework/src/mx/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.0.0.0";
+mx_internal static const VERSION:String = "4.5.0.13964";


Transferred from the Adobe Open Source Subversion Repository

Revision: 11189
Author:   clucier@adobe.com
Date:     2009-10-27T19:33:04.160990Z

Log Message:
-----------
Adding better support for deferred instantiation and states. State overrides can now correctly override targets that are instantiated after a state change.  Moving the commitment of the initial state to earlier (during commit properties), this should avoid the secondary layout pass that used to occur after applicationComplete.  Removed creationComplete handler in UIComponent as it is no longer needed.  Fixing an issue in Group that was causing blendMode to be stuck as 'layered' when setting alpha to 0 then resetting it to a non zero value.

QE notes: None
Doc notes: None
Bugs: SDK-23105, SDK-23470, SDK-23790
Reviewer: Deepa, Glenn
Tests run: Full Cyclone, Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/OverrideBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetEventHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/RemoveChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/states/AddChild.as
+++ frameworks/projects/framework/src/mx/states/AddChild.as
@@ -85,7 +85,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
- public class AddChild extends OverrideBase implements IOverride
+ public class AddChild extends OverrideBase
 {
     include "../core/Version.as";

@@ -387,7 +387,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function initialize():void
+    override public function initialize():void
     {
         if (creationPolicy == ContainerCreationPolicy.AUTO)
             createInstance();
@@ -401,16 +401,30 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function apply(parent:UIComponent):void
-    {
-        var obj:* = relativeTo = getOverrideContext(relativeTo, parent);
-
+    override public function apply(parent:UIComponent):void
+    {
+        var obj:* = getOverrideContext(relativeTo, parent);
+
+        parentContext = parent;
         added = false;
-
+
         // Early exit if child is null or not a valid container.
         if (!target || !(obj is DisplayObjectContainer))
+        {
+            if (relativeTo != null && !applied)
+            {
+                // Our destination context is unavailable so we attempt to register
+                // a listener on our parent document to detect when/if it becomes
+                // valid.
+                addContextListener(relativeTo);
+            }
+            applied = true;
             return;
-
+        }
+
+        applied = true;
+        relativeTo = obj;
+
         // Can't reparent. Must remove before adding.
         if (target.parent)
         {
@@ -477,12 +491,23 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function remove(parent:UIComponent):void
+    override public function remove(parent:UIComponent):void
     {
         var obj:* = getOverrideContext(relativeTo, parent);
-
+
         if (!added || !(obj is DisplayObjectContainer))
+        {
+            if (obj == null)
+            {
+                // It seems our override is no longer active, but we were never
+                // able to successfully apply ourselves, so remove our context
+                // listener if applicable.
+                removeContextListener();
+                applied = false;
+                parentContext = null;
+            }
             return;
+        }

         switch (position)
         {
@@ -518,7 +543,10 @@
             }
         }

+        // Clear our flags and override context.
         added = false;
+        applied = false;
+        parentContext = null;
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/containers/VDividedBox.as
+++ frameworks/projects/mx/src/mx/containers/VDividedBox.as
@@ -75,6 +75,11 @@
  *
  *  @see mx.containers.DividedBox
  *  @see mx.containers.HDividedBox
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class VDividedBox extends DividedBox
 {
@@ -88,6 +93,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function VDividedBox()
 	{


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

--- frameworks/projects/rpc/src/mx/rpc/xml/SimpleContent.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/SimpleContent.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.rpc.xml
+{
+
+[ExcludeClass]
+
+/**
+ * This internal utility class is used by XMLDecoder. The class is basically
+ * a dynamic version any simple type such as Number, String, Boolean so
+ * that other properties can be attached to it as annotations.
+ *
+ * @private
+ */
+internal dynamic class SimpleContent
+{
+    // FIXME: Should this be in a custom namespace?
+    public var value:*;
+
+    public function SimpleContent(val:*)
+    {
+        super();
+        value = val;
+    }
+
+    public function toString():String
+    {
+        var object:Object = value as Object;
+        return object == null ? null : object.toString();
+    }
+
+    public function valueOf():Object
+    {
+        return value as Object;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4035
Author:   jszeto@adobe.com
Date:     2008-11-06T23:38:55.516366Z

Log Message:
-----------
RadialGradient and GradientEntry bug fixes

SDK-17745 - MXML application with multiple identical gradient fills doesn't render correctly

RadialGradient now takes into account the x/y position of the graphic element's bounds.

SDK-17652 - AI import; non-default angle and location of gradients are not retained on import of .ai or .fxg.

RadialGradient now rotates as expected. Previously, we set rotation using the Matrix.createGradientBox function. But this only rotate the gradients themselves and not the shape of the gradient as defined by scaleX and scaleY. Instead, we need to translate the center of the gradient to 0,0, rotate it, and then translate it back to the original location.

SDK-17654 - GradientEntry ratio behavior is inconsistent between MXML and ActionScript

Changed the default value for the ratio parameter in the GradientEntry constructor from -1 to NaN. GradientEntry was probably written before we had support for NaN in the language.

Added a couple of comments and removed some dead code.

QE Notes: Please test rotation on RadialGradient and graphic elements with top/left or x/y defined and a RadialGradient fill.
Doc Notes: Change default value of ratio parameter for GradientEntry constructor.
Bugs: SDK-17745, SDK-17652, SDK-17654
Reviewer:

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

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -277,7 +277,7 @@

         if (blendModeChanged)
         {
-            blendModeChanged = true;
+            blendModeChanged = false;
             super.blendMode = _blendMode;
             needsDisplayObjectAssignment = true;
         }
@@ -779,7 +779,7 @@
             childDO = GraphicElement(item).displayObject;
         }

-        if (childDO && childDO.parent && childDO.parent == this)
+        if (childDO && childDO.parent == this)
             super.removeChild(childDO);

         invalidateSize();


Transferred from the Adobe Open Source Subversion Repository

Revision: 4899
Author:   jimurphy@adobe.com
Date:     2009-02-09T15:58:02.302090Z

Log Message:
-----------
Merge i10 revisions 4865,4870-4871,4877,4880-4882,4890-4891 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/StyleInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/XMLBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/src/java/macromedia/asc/embedding/LintEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/VisualChildInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/Initializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextBlockComposer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/InitializedPropertyDeclaration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EventInitializer.java</path>
<path kind="dir" action="M">/flex/sdk/trunk</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/modules/compiler/src/java/flex2/compiler/mxml/rep/init/NamedInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/TextParser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ArrayElementInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/XMLListBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EffectInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/As3Compiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.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/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -195,32 +195,93 @@
     {
         var container:DisplayObjectContainer =
             DisplayObjectContainer(displayObject);
+
+		// When you databind to a text formatting style on a TextBox,
+		// as in <TextBox fontFamily="{fontCombo.selectedItem}"/>
+		// the databinding can cause the style to be set to null.
+		// Setting null values for properties in an FTE FontDescription
+		// or ElementFormat throw an error, so the following code does
+		// null-checking on the problematic properties.
+
+        var s:String;

         var fontDescription:FontDescription = new FontDescription();
-        fontDescription.cffHinting = getStyle("cffHinting");
-        fontDescription.fontLookup = getStyle("fontLookup");
-        fontDescription.fontName = getStyle("fontFamily");
-        fontDescription.fontPosture = getStyle("fontStyle");
-        fontDescription.fontWeight = getStyle("fontWeight");
-        fontDescription.renderingMode = getStyle("renderingMode");
+
+        s = getStyle("cffHinting");
+        if (s != null)
+        	fontDescription.cffHinting = s;
+
+        s = getStyle("fontLookup");
+        if (s != null)
+        	fontDescription.fontLookup = s;
+
+        s = getStyle("fontFamily");
+        if (s != null)
+        	fontDescription.fontName = s;
+
+        s = getStyle("fontStyle");
+        if (s != null)
+        	fontDescription.fontPosture = s;
+
+        s = getStyle("fontWeight");
+        if (s != null)
+        	fontDescription.fontWeight = s;
+
+        s = getStyle("renderingMode");
+        if (s != null)
+        	fontDescription.renderingMode = s;

         var elementFormat:ElementFormat = new ElementFormat();
-        elementFormat.alignmentBaseline = getStyle("alignmentBaseline");
+
+		s = getStyle("alignmentBaseline");
+		if (s != null)
+			elementFormat.alignmentBaseline = s;
+
         elementFormat.alpha = getStyle("textAlpha");
+
         elementFormat.baselineShift = getStyle("baselineShift");
-        elementFormat.breakOpportunity = getStyle("breakOpportunity");
+
+        s = getStyle("breakOpportunity");
+        if (s != null)
+        	elementFormat.breakOpportunity = s;
+
         elementFormat.color = getStyle("color");
-        elementFormat.digitCase = getStyle("digitCase");
-        elementFormat.digitWidth = getStyle("digitWidth");
-        elementFormat.dominantBaseline = getStyle("dominantBaseline");
+
+        s = getStyle("digitCase");
+        if (s != null)
+        	elementFormat.digitCase = s;
+
+        s = getStyle("digitWidth");
+        if (s != null)
+        	elementFormat.digitWidth = s;
+
+        s = getStyle("dominantBaseline");
+        if (s != null)
+        	elementFormat.dominantBaseline = s;
+
         elementFormat.fontDescription = fontDescription;
+
         elementFormat.fontSize = getStyle("fontSize");
+
         setKerning(elementFormat);
-        elementFormat.ligatureLevel = getStyle("ligatureLevel");
-        elementFormat.locale = getStyle("locale");
-        elementFormat.textRotation = getStyle("textRotation");
+
+        s = getStyle("ligatureLevel");
+        if (s != null)
+        	elementFormat.ligatureLevel = s;
+
+        s = getStyle("locale");
+        if (s != null)
+        	elementFormat.locale = s;
+
+        s = getStyle("textRotation");
+        if (s != null)
+        	elementFormat.textRotation = s;
+
         setTracking(elementFormat);
-        elementFormat.typographicCase = getStyle("typographicCase");
+
+        s = getStyle("typographicCase");
+        if (s != null)
+        	elementFormat.typographicCase = s;

         textBlockComposer.removeTextLines(container);

@@ -266,7 +327,9 @@
         else if (kerning === false)
             kerning = Kerning.OFF;

-        elementFormat.kerning = String(kerning);
+        var s:String = String(kerning);
+        if (s != null)
+           elementFormat.kerning = s;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/core/ITextFieldInterface.as
+++ frameworks/projects/framework/src/mx/core/ITextFieldInterface.as
@@ -12,216 +12,406 @@
 /**
  *  The ITextField interface defines the basic set of APIs
  *  for flash.display.TextField
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */

     /**
      *  @copy flash.text.TextField#alwaysShowSelection
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get alwaysShowSelection():Boolean;
     function set alwaysShowSelection(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#antiAliasType
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get antiAliasType():String;
     function set antiAliasType(antiAliasType:String):void;

     /**
      *  @copy flash.text.TextField#autoSize
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get autoSize():String;
     function set autoSize(value:String):void;

     /**
      *  @copy flash.text.TextField#background
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get background():Boolean;
     function set background(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#backgroundColor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get backgroundColor():uint;
     function set backgroundColor(value:uint):void;

     /**
      *  @copy flash.text.TextField#border
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get border():Boolean;
     function set border(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#borderColor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get borderColor():uint;
     function set borderColor(value:uint):void;

     /**
      *  @copy flash.text.TextField#bottomScrollV
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get bottomScrollV():int;

     /**
      *  @copy flash.text.TextField#caretIndex
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get caretIndex():int;

     /**
      *  @copy flash.text.TextField#condenseWhite
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get condenseWhite():Boolean;
     function set condenseWhite(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#defaultTextFormat
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get defaultTextFormat():TextFormat;
     function set defaultTextFormat(format:TextFormat):void;

     /**
      *  @copy flash.text.TextField#embedFonts
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get embedFonts():Boolean;
     function set embedFonts(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#gridFitType
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get gridFitType():String;
     function set gridFitType(gridFitType:String):void;

     /**
      *  @copy flash.text.TextField#htmlText
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get htmlText():String;
     function set htmlText(value:String):void;

     /**
      *  @copy flash.text.TextField#length
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get length():int;

     /**
      *  @copy flash.text.TextField#maxChars
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get maxChars():int;
     function set maxChars(value:int):void;

     /**
      *  @copy flash.text.TextField#maxScrollH
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get maxScrollH():int;

     /**
      *  @copy flash.text.TextField#maxScrollV
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get maxScrollV():int;

     /**
      *  @copy flash.text.TextField#mouseWheelEnabled
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get mouseWheelEnabled():Boolean;
     function set mouseWheelEnabled(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#multiline
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get multiline():Boolean;
     function set multiline(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#numLines
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get numLines():int;

     /**
      *  @copy flash.text.TextField#displayAsPassword
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get displayAsPassword():Boolean;
     function set displayAsPassword(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#restrict
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get restrict():String;
     function set restrict(value:String):void;

     /**
      *  @copy flash.text.TextField#scrollH
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get scrollH():int;
     function set scrollH(value:int):void;

     /**
      *  @copy flash.text.TextField#scrollV
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get scrollV():int;
     function set scrollV(value:int):void;

     /**
      *  @copy flash.text.TextField#selectable
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get selectable():Boolean;
     function set selectable(value:Boolean):void;

     /**
      *  @copy flash.text.TextField#selectionBeginIndex
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get selectionBeginIndex():int;

     /**
      *  @copy flash.text.TextField#selectionEndIndex
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get selectionEndIndex():int;

     /**
      *  @copy flash.text.TextField#sharpness
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get sharpness():Number;
     function set sharpness(value:Number):void;

     /**
      *  @copy flash.text.TextField#styleSheet
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get styleSheet():StyleSheet;
     function set styleSheet(value:StyleSheet):void;

     /**
      *  @copy flash.text.TextField#text
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get text():String;
     function set text(value:String):void;

     /**
      *  @copy flash.text.TextField#textColor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get textColor():uint;
     function set textColor(value:uint):void;

     /**
      *  @copy flash.text.TextField#textHeight
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get textHeight():Number;

     /**
      *  @copy flash.text.TextField#textWidth
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get textWidth():Number;

     /**
      *  @copy flash.text.TextField#thickness
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get thickness():Number;
     function set thickness(value:Number):void;

     /**
      *  @copy flash.text.TextField#type
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get type():String;
     function set type(value:String):void;

     /**
      *  @copy flash.text.TextField#wordWrap
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get wordWrap():Boolean;
     function set wordWrap(value:Boolean):void;
@@ -229,81 +419,161 @@

     /**
      *  @copy flash.text.TextField#appendText()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function appendText(newText:String):void;

     /**
      *  @copy flash.text.TextField#getCharBoundaries()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getCharBoundaries(charIndex:int):Rectangle;

     /**
      *  @copy flash.text.TextField#getCharIndexAtPoint()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getCharIndexAtPoint(x:Number, y:Number):int;

     /**
      *  @copy flash.text.TextField#getFirstCharInParagraph()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getFirstCharInParagraph(charIndex:int):int;

     /**
      *  @copy flash.text.TextField#getLineIndexAtPoint()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getLineIndexAtPoint(x:Number, y:Number):int;

     /**
      *  @copy flash.text.TextField#getLineIndexOfChar()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getLineIndexOfChar(charIndex:int):int;

     /**
      *  @copy flash.text.TextField#getLineLength()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getLineLength(lineIndex:int):int;

     /**
      *  @copy flash.text.TextField#getLineMetrics()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getLineMetrics(lineIndex:int):TextLineMetrics;

     /**
      *  @copy flash.text.TextField#getLineOffset()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getLineOffset(lineIndex:int):int;

     /**
      *  @copy flash.text.TextField#getLineText()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getLineText(lineIndex:int):String;

     /**
      *  @copy flash.text.TextField#getParagraphLength()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getParagraphLength(charIndex:int):int;

     /**
      *  @copy flash.text.TextField#getTextFormat()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getTextFormat(beginIndex:int=-1, endIndex:int=-1):TextFormat;

     /**
      *  @copy flash.text.TextField#replaceSelectedText()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function replaceSelectedText(value:String):void;

     /**
      *  @copy flash.text.TextField#replaceText()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function replaceText(beginIndex:int, endIndex:int, newText:String):void;

     /**
      *  @copy flash.text.TextField#setSelection()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function setSelection(beginIndex:int, endIndex:int):void;

     /**
      *  @copy flash.text.TextField#setTextFormat()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function setTextFormat(format:TextFormat,
                         beginIndex:int=-1,
@@ -311,11 +581,21 @@

     /**
      *  @copy flash.text.TextField#getImageReference()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function getImageReference(id:String):DisplayObject;

     /**
      *  @copy flash.text.TextField#useRichTextClipboard
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function set useRichTextClipboard(value:Boolean):void;
     function get useRichTextClipboard():Boolean;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3571
Author:   smgilson@adobe.com
Date:     2008-10-10T18:07:09.278449Z

Log Message:
-----------
Update SWFLoader ASDoc comment to remove &emdash and data type declaration. ASDoc adds that automatically.

Doc the new types in IndexChangedEvent.as

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

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

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

--- frameworks/projects/framework/src/mx/events/IndexChangedEvent.as
+++ frameworks/projects/framework/src/mx/events/IndexChangedEvent.as
@@ -145,6 +145,31 @@
      *  The IndexChangedEvent.SELECTION_CHANGED constant defines the value of the
      *  type property of the event object for a selectionChanged event,
      *  which indicates that the current selection has changed.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
inputType	Indicates whether this event
+     *         was caused by a mouse or keyboard interaction.

+     *
newIndex	The zero-based index of the
+     *       selected item.

+     *
oldIndex	The zero-based index of the
+     *       previously selected item.

+     *
relatedObject	null

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *
TriggerEvent	The event that
+     *        triggered this event.

+     *
Type	IndexChangedEvent.HEADER_SHIFT

+     *

      *
      *  @eventType selectionChanged
      */
@@ -154,8 +179,33 @@
      *  The IndexChangedEvent.SELECTION_CHANGING constant defines the value of the
      *  type property of the event object for a selectionChanging event,
      *  which indicates that the current selection is about to change.
-     *
-     *  @eventType selectionChanging
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
inputType	Indicates whether this event
+     *         was caused by a mouse or keyboard interaction.

+     *
newIndex	The zero-based index of the
+     *       selected item after the change.

+     *
oldIndex	The zero-based index of the
+     *       selected item before the change.

+     *
relatedObject	null

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *
TriggerEvent	The event that
+     *        triggered this event.

+     *
Type	IndexChangedEvent.HEADER_SHIFT

+     *

+     *
+      *  @eventType selectionChanging
      */
     public static const SELECTION_CHANGING:String = "selectionChanging";


Transferred from the Adobe Open Source Subversion Repository

Revision: 2957
Author:   aharui@adobe.com
Date:     2008-08-22T09:01:31.559126Z

Log Message:
-----------
Changes from API Review

Highlights:

MarshalEvent -> SandboxRootRequest
MarshalMouseEvent -> SandboxRootMouseEvent
MarshalDragEvet -> SandboxRootDragEvent
SandboxBridgeEvent -> SWFBridgeEvent
SandboxBridgeRequest -> SWFBridgeRequest

Checkintests passed.  Mustella for Marshall Plan will certainly fail until tests updated to new APIs
Probably ok to merge to trunk.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/FocusDirection.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/PopUpRequest.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxBridgeEvent.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SizeRequest.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/FocusRequestDirection.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/MarshalEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxRootDragEvent.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/MarshalMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollThumb.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxRootRequest.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxRootMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InvalidateRequestData.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxBridgeRequest.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/MarshalDragEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/ModalWindowRequest.as</path>

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

--- frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as
+++ frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.events
+{
+
+import flash.events.Event;
+
+/**
+ *  This is an event sent between sandboxes to notify listeners
+ *  about mouse activity in another sandbox.
+ *
+ *  For security reasons, some fields of a MouseEvent are not sent
+ *  in a SandboxRootMouseEvent.
+ */
+public class SandboxRootMouseEvent extends Event
+{
+	include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Mouse was clicked somewhere outside your sandbox.
+	 */
+    public static const CLICK_SOMEWHERE:String = "clickSomewhere";
+
+	/**
+	 *  Mouse was double-clicked somewhere outside your sandbox.
+	 */
+    public static const DOUBLE_CLICK_SOMEWHERE:String = "coubleClickSomewhere";
+
+	/**
+	 *  Mouse button was pressed down somewhere outside your sandbox.
+	 */
+    public static const MOUSE_DOWN_SOMEWHERE:String = "mouseDownSomewhere";
+
+	/**
+	 *  Mouse was moved somewhere outside your sandbox.
+	 */
+    public static const MOUSE_MOVE_SOMEWHERE:String = "mouseMoveSomewhere";
+
+	/**
+	 *  Mouse button was released somewhere outside your sandbox.
+	 */
+    public static const MOUSE_UP_SOMEWHERE:String = "mouseUpSomewhere";
+
+	/**
+	 *  Mouse wheel was spun somewhere outside your sandbox.
+	 */
+    public static const MOUSE_WHEEL_SOMEWHERE:String = "mouseWheelSomewhere";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+     *  Documentation is not currently available.
+     */
+    public static function marshal(event:Event):SandboxRootMouseEvent
+	{
+		var eventObj:Object = event;
+
+		return new SandboxRootMouseEvent(eventObj.type, eventObj.bubbles,
+                                     eventObj.cancelable,
+							         eventObj.ctrlKey, eventObj.altKey,
+							         eventObj.shiftKey, eventObj.buttonDown);
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function SandboxRootMouseEvent(type:String, bubbles:Boolean = false,
+                                      cancelable:Boolean = false,
+									  ctrlKey:Boolean = false,
+                                      altKey:Boolean = false,
+                                      shiftKey:Boolean = false,
+									  buttonDown:Boolean = false)
+	{
+		super(type, bubbles, cancelable);
+
+		this.ctrlKey = ctrlKey;
+		this.altKey = altKey;
+		this.shiftKey = shiftKey;
+		this.buttonDown = buttonDown;
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  altKey
+    //----------------------------------
+
+	/**
+	 *  @see flash.events.MouseEvent#altkey
+	 */
+	public var altKey:Boolean;
+
+    //----------------------------------
+    //  buttonDown
+    //----------------------------------
+
+	/**
+	 *  @see flash.events.MouseEvent#buttonDown
+	 */
+	public var buttonDown:Boolean;
+
+    //----------------------------------
+    //  ctrlKey
+    //----------------------------------
+
+	/**
+	 *  @see flash.events.MouseEvent#ctrlKey
+	 */
+	public var ctrlKey:Boolean;
+
+    //----------------------------------
+    //  shiftKey
+    //----------------------------------
+
+	/**
+	 *  @see flash.events.MouseEvent#shiftKey
+	 */
+	public var shiftKey:Boolean;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+     *  @private
+     */
+    override public function clone():Event
+	{
+		return new SandboxRootMouseEvent(type, bubbles, cancelable,
+                                     ctrlKey, altKey, shiftKey, buttonDown);
+	}
+}
+
+}


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

--- frameworks/projects/mx/src/mx/controls/videoClasses/NCManager.as
+++ frameworks/projects/mx/src/mx/controls/videoClasses/NCManager.as
@@ -0,0 +1,1122 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.videoClasses
+{
+
+import flash.events.Event;
+import flash.events.NetStatusEvent;
+import flash.events.TimerEvent;
+import flash.net.NetConnection;
+import flash.net.ObjectEncoding;
+import flash.net.Responder;
+import flash.utils.Timer;
+import mx.managers.ISystemManager;
+import mx.managers.SystemManager;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+
+[ExcludeClass]
+
+[ResourceBundle("controls")]
+
+/**
+ *  @private
+ *  Creates NetConnection for VideoPlayer, a
+ *  helper class for that user facing class.
+ */
+public class NCManager implements INCManager
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Default connection timeout in milliseconds.
+     *
+     *  @see #timeout
+     */
+    public static const DEFAULT_TIMEOUT:Number = 60000;
+
+    /**
+     *  @private
+     */
+    private static const DEFAULT_NC_TIMEOUT:uint = 1500;       // .5 seconds
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  List of connections tried by connectRTMP, in order tried.
+     */
+    private static var RTMP_CONN:Array =
+	[
+        { protocol: "rtmp:/", port: "1935" },
+		{ protocol: "rtmp:/", port:"443" },
+		{ protocol: "rtmpt:/", port:"80" },
+		{ protocol: "rtmps:/", port:"443" }
+    ];
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Constructor.
+     */
+    public function NCManager()
+    {
+		super();
+
+        initNCInfo();
+        initOtherInfo();
+
+        // intervals
+        owner = null;
+        _netConnection = null;
+        ncConnected = false;
+
+        // actually calls setter
+        timeout = DEFAULT_TIMEOUT;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *
fallbackServerName is exposed in two ways:

+     *
+     *
User can supply second <meta base> in smil and that base
+     * attr will be taken as the fallbackServerName (note that only
+     * the server name will be taken from this and not the application
+     * name or anything else).

+     *
+     *
The second way is the user can directly set this by
+     * accessing the ncMgr property in FLVPlayback or VideoPlayer and
+     * set fallbackServerName property directly.

+     */
+    public var fallbackServerName:String;
+
+    /**
+     *  @private
+     *  Reference to the VideoPlayer instance associated with this INCManager.
+     */
+    private var owner:VideoPlayer;
+
+    /**
+     *  @private
+     *  The path to the content.
+     */
+    private var contentPath:String;
+
+    /**
+     *  @private
+     */
+	private var protocol:String;
+
+    /**
+     *  @private
+     *  The host name portion of the URL.
+     */
+    private var serverName:String;
+
+    /**
+     *  @private
+     *  The port number portion of the URL.
+     */
+    private var portNumber:String;
+
+    /**
+     *  @private
+     */
+	private var wrappedURL:String;
+
+    /**
+     *  @private
+     */
+    private var appName:String;
+
+    /**
+     *  @private
+     *  Multiple streams for multiple bandwidths.
+     */
+    private var streams:Array;
+
+    /**
+     *  @private
+     *  Whether the protocol is RTMP.
+     *   -1: undefined
+     *    0: no
+     *    1: yes
+     */
+    private var _isRTMP:int = -1;
+
+    /**
+     *  @private
+     *  Timer for connection timeout.
+     */
+    private var connectionTimer:Timer;
+
+    /**
+     *  @private
+     */
+    private var autoSenseBW:Boolean;
+
+    /**
+     *  @private
+     *  Bandwidth detection stuff.
+     */
+    public var payload:uint;
+
+    /**
+     *  @private
+     *  Value of the NetConnection instance's uri property.  This is saved upon
+     *  connection and reused for reconnecting.
+     */
+    private var ncURI:String;
+
+    /**
+     *  @private
+     */
+	private var ncConnected:Boolean;
+
+    /**
+     *  @private
+     *  Info on multiple connections we try.
+     */
+    public var tryNC:Array;
+
+    /**
+     *  @private
+     */
+    private var tryNCTimer:Timer;
+
+
+    /**
+     *  @private
+     *  Counter that tracks the next type to try in RTMP_CONN.
+     */
+    private var connTypeCounter:uint;
+
+	/**
+	 *  @private
+	 *  Used for accessing localized Error messages.
+	 */
+	private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    //  Public Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  timeout
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for timeout property.
+     */
+    private var _timeout:uint;
+
+    /*
+     *  @see INCManager#timeout
+     */
+    public function get timeout():uint
+	{
+        return _timeout;
+    }
+
+    public function set timeout(t:uint):void
+	{
+        _timeout = t;
+        connectionTimer = new Timer(_timeout, 1);
+        connectionTimer.addEventListener(TimerEvent.TIMER, onFCSConnectTimeOut);
+    }
+
+    //----------------------------------
+    //  bitrate
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for bitrate property.
+     */
+    private var _bitrate:Number;
+
+    /**
+     *  For RTMP streams, returns value calculated from autodetection,
+     *  not value set via bitrate.
+     *
+     *  @see INCManager#bitrate
+     */
+    public function get bitrate():Number
+	{
+        return _bitrate;
+    }
+
+    /**
+     *  This value is only used with progressive download (HTTP), with
+     *  RTMP streaming uses autodetection.
+     *
+     *  @see INCManager#bitrate
+     */
+    public function set bitrate(b:Number):void
+	{
+        if (_isRTMP == 0)
+            _bitrate = b;
+    }
+
+    //----------------------------------
+    //  videoPlayer
+    //----------------------------------
+
+    /**
+     *  @see INCManager#videoPlayer
+     */
+    public function get videoPlayer():VideoPlayer
+	{
+        return owner;
+    }
+
+	/**
+	 *  @private
+	 */
+    public function set videoPlayer(value:VideoPlayer):void
+	{
+        owner = value;
+    }
+
+    //----------------------------------
+    //  netConnection
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _netConnection:NetConnection;
+
+    /**
+     *  @see INCManagernetConnection
+     */
+    public function get netConnection():NetConnection
+	{
+        return _netConnection;
+    }
+
+    //----------------------------------
+    //  streamName
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for streamName property.
+     */
+    private var _streamName:String;
+
+    /**
+     *  @see INCManager#streamName
+     */
+    public function get streamName():String
+	{
+        return _streamName;
+    }
+
+    //----------------------------------
+    //  streamLength
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for streamLength property.
+     */
+    private var _streamLength:Number;
+
+    /**
+     *  @see INCManager#streamLength
+     */
+    public function get streamLength():Number
+	{
+        return _streamLength;
+    }
+
+    //----------------------------------
+    //  streamWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for streamWidth property.
+     */
+    private var _streamWidth:Number;
+
+    /**
+     *  @see INCManager#streamWidth
+     */
+    public function get streamWidth():Number
+	{
+        return _streamWidth;
+    }
+
+    //----------------------------------
+    //  streamHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for streamHeight property.
+     */
+    private var _streamHeight:Number;
+
+    /**
+     *  @see INCManager#streamHeight
+     */
+    public function get streamHeight():Number
+	{
+        return _streamHeight;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Public methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @see INCManager#isRTMP
+     */
+    public function isRTMP():Boolean
+    {
+        return _isRTMP != 0;
+    }
+
+    /**
+     *  @see INCManager#connectToURL()
+     */
+    public function connectToURL(url:String):Boolean
+    {
+        initOtherInfo();
+
+        contentPath = url;
+        if (!contentPath || contentPath == "")
+            throw new VideoError(VideoError.INVALID_CONTENT_PATH);
+
+        // parse URL to determine what to do with it
+        var parseResults:Object = parseURL(contentPath);
+
+        if (!parseResults.streamName || parseResults.streamName == "")
+            throw new VideoError(VideoError.INVALID_CONTENT_PATH, url);
+
+        // connect to either rtmp or http or download and parse smil
+        if (parseResults.isRTMP)
+        {
+			var canReuseRTMP:Boolean = canReuseOldConnection(parseResults);
+			_isRTMP = 1;
+			protocol = parseResults.protocol;
+			_streamName = parseResults.streamName;
+			serverName = parseResults.serverName;
+			wrappedURL = parseResults.wrappedURL;
+			portNumber = parseResults.portNumber;
+			appName = parseResults.appName;
+			if ( !appName || appName == "" ||
+			     !_streamName || _streamName == "" )
+				throw new VideoError(VideoError.INVALID_CONTENT_PATH, url);
+			autoSenseBW = (_streamName.indexOf(",") >= 0);
+			return (canReuseRTMP || connectRTMP());
+        }
+		else
+		{
+			var canReuseHTTP:Boolean = canReuseOldConnection(parseResults);
+			_isRTMP = 0;
+			_streamName = parseResults.streamName;
+			return (canReuseHTTP || connectHTTP());
+		}
+    }
+
+	/**
+	 *  @see INCManager#connectAgain()
+	 */
+	public function connectAgain():Boolean
+	{
+		var slashIndex:Number = appName.indexOf("/");
+		if (slashIndex < 0)
+		{
+			// return the appName and streamName back to original form
+			// so we can start this process all over again with the
+			// fallback server if necessary
+			slashIndex = _streamName.indexOf("/");
+			if (slashIndex >= 0)
+			{
+				appName += "/";
+				appName += _streamName.slice(0, slashIndex);
+				_streamName = _streamName.slice(slashIndex + 1);
+			}
+			return false;
+		}
+
+		var newStreamName:String = appName.slice(slashIndex + 1);
+		newStreamName += "/";
+		newStreamName += _streamName;
+		_streamName = newStreamName;
+		appName = appName.slice(0, slashIndex);
+		close();
+		payload = 0;
+		connTypeCounter = 0;
+		cleanConns();
+		connectRTMP();
+		return true;
+	}
+
+    /**
+     * INCManager#reconnect
+     */
+    public function reconnect():void
+    {
+        if (!_isRTMP)
+		{
+			var message:String = resourceManager.getString(
+				"controls", "invalidCall");
+            throw new Error(message);
+		}
+
+        _netConnection.addEventListener(NetStatusEvent.NET_STATUS, reconnectOnStatus);
+        _netConnection.client = new NCManagerReconnectClient(this);
+        _netConnection.connect(ncURI, false);
+    }
+
+    /**
+     *  @see INCManager#close
+     */
+    public function close():void
+    {
+        if (_netConnection)
+        {
+            _netConnection.close();
+            ncConnected = false;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Initialization.
+     */
+    private function initNCInfo():void
+    {
+        _isRTMP = -1;
+        serverName = null;
+        wrappedURL = null;
+        portNumber = null;
+        appName = null;
+    }
+
+    private function initOtherInfo():void
+    {
+        contentPath = null;
+        _streamName = null;
+        _streamLength = -1;
+        _streamWidth = -1;
+        _streamHeight = -1;
+        streams = null;
+        autoSenseBW = false;
+
+        payload = 0;
+        connTypeCounter = 0;
+        cleanConns();
+    }
+
+    /**
+     *  matches bitrate with stream
+     *
+     *  @private
+     */
+    private function bitrateMatch():void
+    {
+        var whichStream:Number;
+        var checkBitrate:Number = _bitrate;
+
+        if (isNaN(checkBitrate))
+            checkBitrate = 0;
+
+        for (var j:uint = 0; j < streams.length; j++)
+            if (isNaN(streams[j].bitrate) || checkBitrate >= streams[j].bitrate)
+            {
+                whichStream = j;
+                break;
+            }
+
+        if (isNaN(whichStream))
+            throw new VideoError(VideoError.NO_BITRATE_MATCH);
+
+        if (_streamName)
+            _streamName += streams[whichStream].src;
+        else
+            _streamName = streams[whichStream].src;
+
+        _streamLength = streams[whichStream].dur;
+    }
+
+    /**
+     *
Parses URL to determine if it is http or rtmp.  If it is rtmp,
+     *  breaks it into pieces to extract server URL and port, application
+     *  name and stream name.  If .flv is at the end of an rtmp URL, it
+     *  will be stripped off.

+     *
+     *  @private
+     */
+    private function parseURL(url:String):Object
+    {
+        var parseResults:Object = {};
+
+		// get protocol
+		var startIndex:uint = 0;
+		var endIndex:int = url.indexOf(":/", startIndex);
+		if (endIndex >= 0)
+		{
+			endIndex += 2;
+			parseResults.protocol = url.slice(startIndex, endIndex);
+			parseResults.isRelative = false;
+		}
+		else
+			parseResults.isRelative = true;
+
+		if ( parseResults.protocol != null &&
+			     ( parseResults.protocol == "rtmp:/" ||
+			       parseResults.protocol == "rtmpt:/" ||
+			       parseResults.protocol == "rtmps:/" ||
+			       parseResults.protocol == "rtmpe:/" ||
+			       parseResults.protocol == "rmpte:/" ) )
+		{
+			parseResults.isRTMP = true;
+
+			startIndex = endIndex;
+
+			if (url.charAt(startIndex) == '/')
+			{
+				startIndex++;
+				// get server (and maybe port)
+				var colonIndex:Number = url.indexOf(":", startIndex);
+				var slashIndex:Number = url.indexOf("/", startIndex);
+				if (slashIndex < 0)
+				{
+					if (colonIndex < 0)
+						parseResults.serverName = url.slice(startIndex);
+					else
+					{
+						endIndex = colonIndex;
+						parseResults.portNumber = url.slice(startIndex, endIndex);
+						startIndex = endIndex + 1;
+						parseResults.serverName = url.slice(startIndex);
+					}
+					return parseResults;
+				}
+				if (colonIndex >= 0 && colonIndex < slashIndex)
+				{
+					endIndex = colonIndex;
+					parseResults.serverName = url.slice(startIndex, endIndex);
+					startIndex = endIndex + 1;
+					endIndex = slashIndex;
+					parseResults.portNumber = url.slice(startIndex, endIndex);
+				}
+				else
+				{
+					endIndex = slashIndex;
+					parseResults.serverName = url.slice(startIndex, endIndex);
+				}
+				startIndex = endIndex + 1;
+			}
+
+			// handle wrapped RTMP servers bit recursively, if it is there
+			if (url.charAt(startIndex) == '?')
+			{
+				var subURL:String = url.slice(startIndex + 1);
+				var subParseResults:Object = parseURL(subURL);
+				if (!subParseResults.protocol || !subParseResults.isRTMP)
+					throw new VideoError(VideoError.INVALID_CONTENT_PATH, url);
+				parseResults.wrappedURL = "?";
+				parseResults.wrappedURL += subParseResults.protocol;
+				if (subParseResults.serverName != null)
+				{
+					parseResults.wrappedURL += "/";
+					parseResults.wrappedURL +=  subParseResults.server;
+				}
+				if (subParseResults.wrappedURL != null)
+				{
+					parseResults.wrappedURL += "/?";
+					parseResults.wrappedURL +=  subParseResults.wrappedURL;
+				}
+				parseResults.appName = subParseResults.appName;
+				parseResults.streamName = subParseResults.streamName;
+				return parseResults;
+			}
+
+			// get application name
+			endIndex = url.indexOf("/", startIndex);
+			if (endIndex < 0)
+			{
+				parseResults.appName = url.slice(startIndex);
+				return parseResults;
+			}
+			parseResults.appName = url.slice(startIndex, endIndex);
+			startIndex = endIndex + 1;
+
+			// check for instance name to be added to application name
+			endIndex = url.indexOf("/", startIndex);
+			if (endIndex < 0)
+			{
+				parseResults.streamName = url.slice(startIndex);
+				// strip off .flv and .flv2 if included
+				if (parseResults.streamName.slice(-5).toLowerCase() == ".flv2")
+					parseResults.streamName = parseResults.streamName.slice(0, -5);
+				else if (parseResults.streamName.slice(-4).toLowerCase() == ".flv")
+					parseResults.streamName = parseResults.streamName.slice(0, -4);
+				return parseResults;
+			}
+			parseResults.appName += "/";
+			parseResults.appName += url.slice(startIndex, endIndex);
+			startIndex = endIndex + 1;
+
+			// get flv name
+			parseResults.streamName = url.slice(startIndex);
+			// strip off .flv and .flv2 if included
+			if (parseResults.streamName.slice(-5).toLowerCase() == ".flv2")
+				parseResults.streamName = parseResults.streamName.slice(0, -5);
+			else if (parseResults.streamName.slice(-4).toLowerCase() == ".flv")
+				parseResults.streamName = parseResults.streamName.slice(0, -4);
+
+		}
+		else
+		{
+			// is http, just return the full url received as streamName
+			parseResults.isRTMP = false;
+			parseResults.streamName = url;
+		}
+
+		return parseResults;
+    }
+
+    /**
+     *  @private
+     *
Handles creating NetConnection instance for
+     *  progressive download of FLV via http.

+     */
+    private function connectHTTP():Boolean
+    {
+        _netConnection = new NetConnection();
+        _netConnection.objectEncoding = ObjectEncoding.AMF0;
+        _netConnection.connect(null);
+        ncConnected = true;
+        return true;
+    }
+
+    /**
+     *  @private
+     *
Top level function for creating NetConnection
+     *  instance for streaming playback of FLV via rtmp.  Actually
+     *  tries to create several different connections using different
+     *  protocols and ports in a pipeline, so multiple connection
+     *  attempts may be occurring simultaneously, and will use the
+     *  first one that connects successfully.

+     */
+    private function connectRTMP():Boolean
+    {
+        // setup timeout
+        connectionTimer.reset();
+        connectionTimer.start();
+
+        tryNC = [];
+
+        tryNCTimer = new Timer(DEFAULT_NC_TIMEOUT);
+        tryNCTimer.addEventListener(TimerEvent.TIMER, nextConnect);
+
+        for (var i:uint = 0; i < RTMP_CONN.length; i++)
+        {
+            tryNC[i] = new NetConnection();
+            tryNC[i].objectEncoding = ObjectEncoding.AMF0;
+            tryNC[i].client = new NCManagerConnectClient(tryNC[i], this, i);
+            tryNC[i].addEventListener(NetStatusEvent.NET_STATUS, connectOnStatus);
+        }
+
+        nextConnect(null);
+        return false;
+    }
+
+    /**
+     *  @private
+     *
Does work of trying to open rtmp connections.  Called either
+     *  by connectRTMP or Timer set up in
+     *  that method.

+     *
+     *
For creating rtmp connections.

+     *
+     *  @see #connectRTMP()
+     */
+    private function nextConnect(event:Event):void
+    {
+        tryNCTimer.reset();
+
+		var tempProtocol:String;
+		var port:String;
+		if (connTypeCounter == 0)
+		{
+			tempProtocol = protocol;
+			if (portNumber)
+				port = portNumber;
+			else
+				for (var i:Number = 0; i < RTMP_CONN.length; i++)
+					if (protocol == RTMP_CONN[i].protocol)
+					{
+						port = RTMP_CONN[i].port;
+						break;
+					}
+		}
+		else
+		{
+			tempProtocol = RTMP_CONN[connTypeCounter].protocol;
+			port = RTMP_CONN[connTypeCounter].port;
+		}
+		var connectionURL:String = tempProtocol + ((!serverName) ? "" :
+			"/" + serverName + ":" + port + "/") + ((!wrappedURL) ? "" :
+			wrappedURL + "/") + appName;
+
+        tryNC[connTypeCounter].client.pending = true;
+        tryNC[connTypeCounter].connect(connectionURL, autoSenseBW);
+
+        if (connTypeCounter < RTMP_CONN.length - 1)
+        {
+            connTypeCounter++;
+            tryNCTimer.start();
+        }
+    }
+
+    /**
+     *  @private
+     *
Stops all timers, closes all unneeded connections, and other
+     *  cleanup related to the connectRTMP strategy of
+     *  pipelining connection attempts to different protocols and
+     *  ports.

+     *
+     *
For creating rtmp connections.

+     *
+     *  @see #connectRTMP()
+     */
+    private function cleanConns():void
+    {
+        if (tryNCTimer != null)
+        {
+            tryNCTimer.reset();
+            tryNCTimer = null;
+        }
+
+        if (tryNC)
+        {
+            for (var i:uint = 0; i < tryNC.length; i++)
+            {
+                if (tryNC[i])
+                {
+                    tryNC[i].removeEventListener(NetStatusEvent.NET_STATUS, connectOnStatus);
+                    if (tryNC[i].client.pending)
+                        tryNC[i].addEventListener(NetStatusEvent.NET_STATUS, disconnectOnStatus);
+                    else
+                        tryNC[i].close();
+                }
+                tryNC[i] = null;
+            }
+            tryNC = null;
+        }
+    }
+
+    /**
+     *  @private
+     *
Starts another pipelined connection attempt with
+     *  connectRTMP with the fallback server.

+     *
+     *
For creating rtmp connections.

+     *
+     *  @see #connectRTMP()
+     */
+    private function tryFallBack():void
+    {
+        if (serverName == fallbackServerName || !fallbackServerName)
+        {
+            //it's not connected
+            _netConnection = null;
+            ncConnected = false;
+            owner.ncConnected();
+        }
+        else
+        {
+        	connTypeCounter = 0;
+            cleanConns();
+            serverName = fallbackServerName;
+            connectRTMP();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Callbacks and event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  dispatches reconnect event, called by
+     *  NetConnection.onBWDone
+     */
+    public function onReconnected():void
+    {
+    	_netConnection.removeEventListener(NetStatusEvent.NET_STATUS, connectOnStatus);
+    	ncConnected = true;
+        owner.ncReconnected();
+    }
+
+    /**
+     *  @private
+     *
Starts another pipelined connection attempt with
+     *  connectRTMP with the fallback server.

+     *
+     *
For creating rtmp connections.

+     *
+     *  @see #connectRTMP()
+     */
+    public function onConnected(p_nc:NetConnection, p_bw:Number):void
+    {
+        // avoid timeout
+        connectionTimer.reset();
+
+        // ditch these now unneeded functions and listeners
+        // Don't need to assign the client to null
+        // since it will anyways get reassigned on
+        // reconnection.
+        // p_nc.client = null;
+        p_nc.removeEventListener(NetStatusEvent.NET_STATUS, connectOnStatus);
+
+        // store pointers to the successful connection and uri
+        _netConnection = p_nc;
+        ncURI = _netConnection.uri;
+        ncConnected = true;
+
+        if (autoSenseBW)
+        {
+            _bitrate = p_bw * 1024;
+
+            if (streams)
+                bitrateMatch();
+            else
+            {
+                var sSplit:Array = _streamName.split(",");
+
+                // remove leading and trailing whitespace from string
+                for (var i:uint = 0; i < sSplit.length; i+=2)
+                {
+                    var sName:String = sSplit[i].replace(/^\s*(\S.*\S)\s*$/, "$1");
+                    if (i + 1 < sSplit.length)
+                    {
+                        // If we have less bw than the next threshold or if
+                        // there isn't another threshold (last string)
+                        if (p_bw <= Number(sSplit[i+1]))
+                        {
+                            _streamName = sName;
+                            break;
+                        }
+                    }
+                    else
+                    {
+                        _streamName = sName;
+                        break;
+                    }
+                } // for
+		        // strip off .flv and .flv2 if included
+		        if (_streamName.slice(-5).toLowerCase() == ".flv2")
+		            _streamName = _streamName.slice(0, -5);
+		        else if (_streamName.slice(-4).toLowerCase() == ".flv")
+		            _streamName = _streamName.slice(0, -4);
+            }
+        }
+
+
+        // if we need to get the stream length from the server, do it here
+		// Donot call getStreamLength when main.asc is not present
+		// since getStreamLength is defined in main.asc
+        if ((!owner.isLive && _streamLength == -1) && owner.autoBandWidthDetection)
+        {
+            var res:Responder = new Responder(getStreamLengthResult,
+                    getStreamLengthStatus);
+            _netConnection.call("getStreamLength", res, _streamName);
+        }
+        else
+            owner.ncConnected();
+    }
+
+    /**
+     *  @private
+     *  netStatus event listener when connecting
+     */
+    public function connectOnStatus(event:NetStatusEvent):void
+    {
+        var stuff:Object;
+		var target:NetConnection = NetConnection(event.target);
+
+        target.client.pending = false;
+
+        if (event.info.code == "NetConnection.Connect.Success")
+        {
+            _netConnection = tryNC[target.client.connIndex];
+			// Force call to onConnected when main.asc is not present
+			// which would call this function through onBWDone
+			if (!owner.autoBandWidthDetection)
+				onConnected(_netConnection, 0);
+            tryNC[target.client.connIndex] = null;
+            cleanConns();
+        }
+        else if (((event.info.code == "NetConnection.Connect.Failed")
+                    || (event.info.code == "NetConnection.Connect.Rejected"))
+                    && (target.client.connIndex == (RTMP_CONN.length - 1)))
+			// Try rearranging the app URL, then the fallbackServer
+			if (!connectAgain())
+				tryFallBack();
+    }
+
+    /**
+     *  @private
+     *  netStatus event listener when reconnecting
+     */
+    public function reconnectOnStatus(event:NetStatusEvent):void
+    {
+        if ((event.info.code == "NetConnection.Connect.Failed")
+                || (event.info.code == "NetConnection.Connect.Rejected"))
+        {
+            // Try the fallbackServer
+            _netConnection = null;
+            ncConnected = false;
+            owner.ncReconnected();
+        }
+    }
+
+    /**
+     *  @private
+     *  netStatus event listener for disconnecting extra
+     *  NetConnections that were opened in parallel
+     */
+    public function disconnectOnStatus(event:NetStatusEvent):void
+    {
+        if (event.info.code == "NetConnection.Connect.Success")
+        {
+            event.target.removeEventListener(NetStatusEvent.NET_STATUS,
+                    disconnectOnStatus);
+            NetConnection(event.target).close();
+        }
+    }
+
+    /**
+     *  @private
+     *  Responder function to receive streamLength result from
+     *  server after making rpc
+     */
+    private function getStreamLengthResult(length:Number):void
+    {
+		if (length > 0)
+	        _streamLength = length;
+        owner.ncConnected();
+    }
+
+    /**
+     *  @private
+     *  Responder function to receive status messages for rpc to
+     *  get streamLength
+     */
+    private function getStreamLengthStatus(item:Object):void
+    {
+    }
+
+    /**
+     *  @private
+     *
Called by timer to timeout all connection attempts.

+     *
+     *
For creating rtmp connections.

+     *
+     *  @see #connectRTMP()
+     */
+    private function onFCSConnectTimeOut(event:Event):void
+    {
+        cleanConns();
+        _netConnection = null;
+        ncConnected = false;
+        if (!connectAgain())
+        	owner.ncConnected();
+    }
+
+    /**
+     *  @private
+     *
Compares connection info with previous NetConnection,
+     *  will reuse existing connection if possible.
+     */
+    private function canReuseOldConnection(parseResults:Object):Boolean
+    {
+        // no reuse if no prior connection
+        if (_netConnection == null || !ncConnected)
+            return false;
+
+        // http connection
+        if (!parseResults.isRTMP)
+        {
+            // can reuse if prev connection was http
+            if (!_isRTMP)
+                return true;
+            // cannot reuse if was rtmp--close
+            owner.close();
+            _netConnection = null;
+            ncConnected = false;
+            initNCInfo();
+            return false;
+        }
+
+        // rtmp connection
+        if (_isRTMP)
+        {
+            if (parseResults.serverName == serverName && parseResults.appName == appName &&
+			     parseResults.protocol == protocol && parseResults.portNumber == portNumber &&
+			     parseResults.wrappedURL == wrappedURL)
+                return true;
+            // cannot reuse this rtmp--close
+            owner.close();
+            _netConnection = null;
+            ncConnected = false;
+        }
+
+        initNCInfo();
+        return false;
+    }
+
+} // class mx.controls.videoClasses.NCManager
+}