[FWR-LmjOd2zc] RecorderJSInterface: event names and internal fields became private

--- src/main/flashwavrecorder/RecorderJSInterface.as
+++ src/main/flashwavrecorder/RecorderJSInterface.as
@@ -14,41 +14,42 @@

   public class RecorderJSInterface {

-    public static const READY:String = "ready";
-
-    public static const NO_MICROPHONE_FOUND:String = "no_microphone_found";
-    public static const MICROPHONE_USER_REQUEST:String = "microphone_user_request";
-    public static const MICROPHONE_CONNECTED:String = "microphone_connected";
-    public static const MICROPHONE_NOT_CONNECTED:String = "microphone_not_connected";
-    public static const MICROPHONE_ACTIVITY:String = "microphone_activity";
-    public static const MICROPHONE_LEVEL:String = "microphone_level";
-    public static const MICROPHONE_SAMPLES:String = "microphone_samples";
-
-    public static const RECORDING:String = "recording";
-    public static const RECORDING_STOPPED:String = "recording_stopped";
-
-    public static const OBSERVING_LEVEL:String = "observing_level";
-    public static const OBSERVING_LEVEL_STOPPED:String = "observing_level_stopped";
-
-    public static const OBSERVING_SAMPLES:String = "observing_level";
-    public static const OBSERVING_SAMPLES_STOPPED:String = "observing_level_stopped";
-
-    public static const PLAYING:String = "playing";
-    public static const STOPPED:String = "stopped";
-
-    public static const SAVE_PRESSED:String = "save_pressed";
-    public static const SAVING:String = "saving";
-    public static const SAVED:String = "saved";
-    public static const SAVE_FAILED:String = "save_failed";
-    public static const SAVE_PROGRESS:String = "save_progress";
-
-    public static const EVENT_HANDLER:String = "fwr_event_handler";
-
+    private static const READY:String = "ready";
+
+    private static const NO_MICROPHONE_FOUND:String = "no_microphone_found";
+    private static const MICROPHONE_USER_REQUEST:String = "microphone_user_request";
+    private static const MICROPHONE_CONNECTED:String = "microphone_connected";
+    private static const MICROPHONE_NOT_CONNECTED:String = "microphone_not_connected";
+    private static const MICROPHONE_ACTIVITY:String = "microphone_activity";
+    private static const MICROPHONE_LEVEL:String = "microphone_level";
+    private static const MICROPHONE_SAMPLES:String = "microphone_samples";
+
+    private static const RECORDING:String = "recording";
+    private static const RECORDING_STOPPED:String = "recording_stopped";
+
+    private static const OBSERVING_LEVEL:String = "observing_level";
+    private static const OBSERVING_LEVEL_STOPPED:String = "observing_level_stopped";
+
+    private static const OBSERVING_SAMPLES:String = "observing_level";
+    private static const OBSERVING_SAMPLES_STOPPED:String = "observing_level_stopped";
+
+    private static const PLAYING:String = "playing";
+    private static const STOPPED:String = "stopped";
+
+    private static const SAVE_PRESSED:String = "save_pressed";
+    private static const SAVING:String = "saving";
+    private static const SAVED:String = "saved";
+    private static const SAVE_FAILED:String = "save_failed";
+    private static const SAVE_PROGRESS:String = "save_progress";
+
+    private static const EVENT_HANDLER:String = "fwr_event_handler";
+
+    public var saveButton:DisplayObject;
+
     private var _recorder:MicrophoneRecorder;
-    public var uploadUrl:String;
-    public var uploadFormData:Array;
-    public var uploadFieldName:String;
-    public var saveButton:DisplayObject;
+    private var _uploadUrl:String;
+    private var _uploadFormData:Array;
+    private var _uploadFieldName:String;

     public function RecorderJSInterface() {
       _recorder = new MicrophoneRecorder();
@@ -68,8 +69,8 @@
         ExternalInterface.addCallback("init", init);
         ExternalInterface.addCallback("permit", requestMicrophoneAccess);
         ExternalInterface.addCallback("configure", configureMicrophone);
-        ExternalInterface.addCallback("show", show);
-        ExternalInterface.addCallback("hide", hide);
+        ExternalInterface.addCallback("show", showButton);
+        ExternalInterface.addCallback("hide", hideButton);
         ExternalInterface.addCallback("update", updateUploadForm);
         ExternalInterface.addCallback("setUseEchoSuppression", setUseEchoSuppression);
         ExternalInterface.addCallback("setLoopBack", setLoopBack);
@@ -83,46 +84,47 @@
     }

     public function ready(width:int, height:int):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.READY, width, height);
+      ExternalInterface.call(EVENT_HANDLER, READY, width, height);
       if (!_recorder.mic.isMuted()) {
         onMicrophoneStatus(new StatusEvent(StatusEvent.STATUS, false, false, "Microphone.Unmuted", "status"));
       }
     }

-    public function show():void {
+    public function showButton():void {
       if(saveButton) {
         saveButton.visible = true;
       }
     }
-    public function hide():void {
+    public function hideButton():void {
       if(saveButton) {
         saveButton.visible = false;
       }
     }

     private function playbackStarted(event:Event):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, MicrophoneRecorder.PLAYBACK_STARTED, _recorder.currentSoundName, _recorder.latency);
+      ExternalInterface.call(EVENT_HANDLER, MicrophoneRecorder.PLAYBACK_STARTED, _recorder.currentSoundName, _recorder.latency);
     }

     private function playComplete(event:Event):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.STOPPED, _recorder.currentSoundName);
+      ExternalInterface.call(EVENT_HANDLER, STOPPED, _recorder.currentSoundName);
     }

     private function microphoneActivity(event:Event):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_ACTIVITY, _recorder.mic.getActivityLevel());
+      ExternalInterface.call(EVENT_HANDLER, MICROPHONE_ACTIVITY, _recorder.mic.getActivityLevel());
     }

     private function microphoneLevel(event:MicrophoneLevelEvent):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_LEVEL, event.levelValue);
+      ExternalInterface.call(EVENT_HANDLER, MICROPHONE_LEVEL, event.levelValue);
     }

     private function microphoneSamples(event:MicrophoneSamplesEvent):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_SAMPLES, event.samples);
+      ExternalInterface.call(EVENT_HANDLER, MICROPHONE_SAMPLES, event.samples);
     }

     public function init(url:String=null, fieldName:String=null, formData:Array=null):void {
-      uploadUrl = url;
-      uploadFieldName = fieldName;
+      // TODO: Init with config object instead of list of args.
+      _uploadUrl = url;
+      _uploadFieldName = fieldName;
       updateUploadForm(formData);
     }

@@ -136,9 +138,9 @@

     private function announceMicrophoneInaccessibility():void {
       if (isMicrophoneConnected()) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_USER_REQUEST);
-      } else {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.NO_MICROPHONE_FOUND);
+        ExternalInterface.call(EVENT_HANDLER, MICROPHONE_USER_REQUEST);
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, NO_MICROPHONE_FOUND);
       }
     }

@@ -151,13 +153,14 @@
       _recorder.mic.setLoopBack(false);
       if(event.code == "Microphone.Unmuted") {
         configureMicrophone();
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_CONNECTED, _recorder.mic);
-      } else {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_NOT_CONNECTED);
+        ExternalInterface.call(EVENT_HANDLER, MICROPHONE_CONNECTED, _recorder.mic);
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, MICROPHONE_NOT_CONNECTED);
       }
     }

     public function configureMicrophone(rate:int=22, gain:int=100, silenceLevel:Number=0, silenceTimeout:int=4000):void {
+      // TODO: configure microphone with configuration object instead of list of args
       _recorder.mic.setRate(rate);
       _recorder.mic.setGain(gain);
       _recorder.mic.setSilenceLevel(silenceLevel, silenceTimeout);
@@ -177,10 +180,10 @@
       if (isMicrophoneAccessible()) {
         if(_recorder.recording) {
           _recorder.stop();
-          ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, _recorder.currentSoundName, _recorder.duration());
+          ExternalInterface.call(EVENT_HANDLER, RECORDING_STOPPED, _recorder.currentSoundName, _recorder.duration());
         } else {
           _recorder.record(name, filename);
-          ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.RECORDING, _recorder.currentSoundName);
+          ExternalInterface.call(EVENT_HANDLER, RECORDING, _recorder.currentSoundName);
         }
         return _recorder.recording;
       } else {
@@ -192,10 +195,10 @@
     public function playBack(name:String):Boolean {
       if(_recorder.playing) {
         _recorder.stop();
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.STOPPED, _recorder.currentSoundName);
+        ExternalInterface.call(EVENT_HANDLER, STOPPED, _recorder.currentSoundName);
       } else {
         _recorder.playBack(name);
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.PLAYING, _recorder.currentSoundName);
+        ExternalInterface.call(EVENT_HANDLER, PLAYING, _recorder.currentSoundName);
       }

       return _recorder.playing;
@@ -204,11 +207,11 @@
     public function playBackFrom(name:String, time:Number):Boolean {
       if(_recorder.playing) {
         _recorder.stop();
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.STOPPED, _recorder.currentSoundName);
+        ExternalInterface.call(EVENT_HANDLER, STOPPED, _recorder.currentSoundName);
       }
       _recorder.playBackFrom(name, time);
       if (_recorder.playing) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.PLAYING, _recorder.currentSoundName);
+        ExternalInterface.call(EVENT_HANDLER, PLAYING, _recorder.currentSoundName);
       }
       return _recorder.playing;
     }
@@ -216,15 +219,15 @@
     public function pausePlayBack(name:String):void {
       if(_recorder.playing) {
         _recorder.pause(name);
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.STOPPED, _recorder.currentSoundName);
+        ExternalInterface.call(EVENT_HANDLER, STOPPED, _recorder.currentSoundName);
       }
     }

     public function stopPlayBack():void {
       if(_recorder.recording) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, _recorder.currentSoundName, _recorder.duration());
-      } else {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.STOPPED, _recorder.currentSoundName);
+        ExternalInterface.call(EVENT_HANDLER, RECORDING_STOPPED, _recorder.currentSoundName, _recorder.duration());
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, STOPPED, _recorder.currentSoundName);
       }
       _recorder.stop();
     }
@@ -254,7 +257,7 @@
     public function observeLevel():Boolean {
       var succeed:Boolean = enableEventObservation(_recorder.levelObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.OBSERVING_LEVEL);
+        ExternalInterface.call(EVENT_HANDLER, OBSERVING_LEVEL);
       }
       return succeed;
     }
@@ -262,7 +265,7 @@
     public function stopObservingLevel():Boolean {
       var succeed:Boolean = disableEventObservation(_recorder.levelObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.OBSERVING_LEVEL_STOPPED);
+        ExternalInterface.call(EVENT_HANDLER, OBSERVING_LEVEL_STOPPED);
       }
       return succeed;
     }
@@ -270,7 +273,7 @@
     public function observeSamples():Boolean {
       var succeed:Boolean = enableEventObservation(_recorder.samplesObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.OBSERVING_SAMPLES);
+        ExternalInterface.call(EVENT_HANDLER, OBSERVING_SAMPLES);
       }
       return succeed;
     }
@@ -278,7 +281,7 @@
     public function stopObservingSamples():Boolean {
       var succeed:Boolean = disableEventObservation(_recorder.samplesObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.OBSERVING_SAMPLES_STOPPED);
+        ExternalInterface.call(EVENT_HANDLER, OBSERVING_SAMPLES_STOPPED);
       }
       return succeed;
     }
@@ -305,22 +308,22 @@
 //  Saving recording ---------------------------------------------------------------------------------------------------

     public function updateUploadForm(formData:Array=null):void {
-      uploadFormData = [];
+      _uploadFormData = [];
       if(formData) {
         for(var i:int=0; i<formData.length; i++) {
           var data:Object = formData[i];
-          uploadFormData.push(MultiPartFormUtil.nameValuePair(data.name, data.value));
+          _uploadFormData.push(MultiPartFormUtil.nameValuePair(data.name, data.value));
         }
       }
     }

     public function save():Boolean {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.SAVE_PRESSED, _recorder.currentSoundName);
+      ExternalInterface.call(EVENT_HANDLER, SAVE_PRESSED, _recorder.currentSoundName);
       try {
         _save(_recorder.currentSoundName, _recorder.currentSoundFilename);
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.SAVING, _recorder.currentSoundName);
+        ExternalInterface.call(EVENT_HANDLER, SAVING, _recorder.currentSoundName);
       } catch(e:Error) {
-        ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, _recorder.currentSoundName, e.message);
+        ExternalInterface.call(EVENT_HANDLER, SAVE_FAILED, _recorder.currentSoundName, e.message);
         return false;
       }
       return true;
@@ -330,11 +333,11 @@

       MultiPartFormUtil.boundary();

-      uploadFormData.push(MultiPartFormUtil.fileField(uploadFieldName, _recorder.convertToWav(name), filename, "audio/wav"));
-      var request:URLRequest = MultiPartFormUtil.request(uploadFormData);
-      uploadFormData.pop();
-
-      request.url = uploadUrl;
+      _uploadFormData.push(MultiPartFormUtil.fileField(_uploadFieldName, _recorder.convertToWav(name), filename, "audio/wav"));
+      var request:URLRequest = MultiPartFormUtil.request(_uploadFormData);
+      _uploadFormData.pop();
+
+      request.url = _uploadUrl;

       var loader:URLLoader = new URLLoader();
       loader.addEventListener(Event.COMPLETE, onSaveComplete);
@@ -346,19 +349,19 @@

     private function onSaveComplete(event:Event):void {
       var loader:URLLoader = URLLoader(event.target);
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.SAVED, _recorder.currentSoundName, loader.data);
+      ExternalInterface.call(EVENT_HANDLER, SAVED, _recorder.currentSoundName, loader.data);
     }

     private function onIOError(event:Event):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, _recorder.currentSoundName, IOErrorEvent(event).text);
+      ExternalInterface.call(EVENT_HANDLER, SAVE_FAILED, _recorder.currentSoundName, IOErrorEvent(event).text);
     }

     private function onSecurityError(event:Event):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, _recorder.currentSoundName, SecurityErrorEvent(event).text);
+      ExternalInterface.call(EVENT_HANDLER, SAVE_FAILED, _recorder.currentSoundName, SecurityErrorEvent(event).text);
     }

     private function onProgress(event:Event):void {
-      ExternalInterface.call(RecorderJSInterface.EVENT_HANDLER, RecorderJSInterface.SAVE_PROGRESS, _recorder.currentSoundName, ProgressEvent(event).bytesLoaded, ProgressEvent(event).bytesTotal);
+      ExternalInterface.call(EVENT_HANDLER, SAVE_PROGRESS, _recorder.currentSoundName, ProgressEvent(event).bytesLoaded, ProgressEvent(event).bytesTotal);
     }
   }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 17330
Author:   chiedozi@adobe.com
Date:     2010-08-16T17:36:59.538425Z

Log Message:
-----------
Removed the sections functionality from ViewNavigator and refactored that logic into TabbedViewNavigator.  Updated dependent performance tests and components.
Introduced MobileApplicationBase and TabbedMobileApplication do support the tabbed use case for mobile.
Deleted SliderSkin from the framework.  All mobile skins now extend MobileSkin.

QE notes:
Doc notes:
Bugs:
Reviewer: Glenn and Ryan
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/ViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as" copyfrom-rev="17260" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ScriptRunner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ComponentCatalog.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedMobileApplicationSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewHistoryData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/IPersistenceManager.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/IViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SliderSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/MobileApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
@@ -1,64 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package spark.components
 {
-import flash.desktop.NativeApplication;
-import flash.display.StageOrientation;
-import flash.events.Event;
 import flash.events.KeyboardEvent;
 import flash.events.StageOrientationEvent;
 import flash.net.registerClassAlias;
-import flash.system.Capabilities;
 import flash.ui.Keyboard;

 import mx.core.IVisualElement;
 import mx.core.mx_internal;
-import mx.events.FlexEvent;
 import mx.utils.BitFlagUtil;

+import spark.components.supportClasses.MobileApplicationBase;
+import spark.components.supportClasses.NavigationStack;
 import spark.components.supportClasses.ViewHistoryData;
-import spark.components.supportClasses.ViewNavigatorSection;
-import spark.core.managers.IPersistenceManager;
-import spark.core.managers.PersistenceManager;
-import spark.events.ElementExistenceEvent;
 import spark.layouts.supportClasses.LayoutBase;

 use namespace mx_internal;

-[DefaultProperty("sections")]
-
-[Exclude(name="controlBarContent", kind="property")]
-[Exclude(name="controlBarGroup", kind="property")]
-[Exclude(name="controlBarLayout", kind="property")]
-[Exclude(name="controlBarVisible", kind="property")]
-[Exclude(name="layout", kind="property")]
-[Exclude(name="preloaderChromeColor", kind="property")]
-[Exclude(name="rollOverColor", kind="style")]
-[Exclude(name="backgroundAlpha", kind="style")]
-
-//--------------------------------------
-//  Events
-//--------------------------------------
+[DefaultProperty("navigationStack")]

 /**
- *  @inheritDoc
+ *
  */
-[Event(name="applicationPersist", type="mx.events.FlexEvent")]
-
-/**
- *  @inheritDoc
- */
-[Event(name="applicationPersisting", type="mx.events.FlexEvent")]
-
-/**
- *  @inheritDoc
- */
-[Event(name="applicationRestore", type="mx.events.FlexEvent")]
-
-/**
- *  @inheritDoc
- */
-[Event(name="applicationRestoring", type="mx.events.FlexEvent")]
-
-public class MobileApplication extends Application
+public class MobileApplication extends MobileApplicationBase
 {
     //--------------------------------------------------------------------------
     //
@@ -109,7 +83,17 @@
     /**
      *  @private
      */
-    private static const SECTIONS_PROPERTY_FLAG:uint = 1 << 7;
+    private static const NAVIGATION_STACK_PROPERTY_FLAG:uint = 1 << 7;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    public function MobileApplication()
+    {
+        super();
+    }

     //--------------------------------------------------------------------------
     //
@@ -118,32 +102,52 @@
     //--------------------------------------------------------------------------

     [SkinPart(required="false")]
+    /**
+     *
+     */
     public var navigator:ViewNavigator;

     //--------------------------------------------------------------------------
     //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-    public function MobileApplication()
-    {
-        super();
-    }
-
-    //--------------------------------------------------------------------------
-    //
     //  Variables
     //
     //--------------------------------------------------------------------------

     private var navigatorProperties:Object = {};

+    /**
+     *  @private
+     */
+    // TODO (chiedozi): WHy glenn said to make this private
+    private function get navigationStack():NavigationStack
+    {
+        if (navigator)
+            return navigator.navigationStack;
+        else
+            return navigatorProperties.navigationStack;
+    }
+    /**
+     *  @private
+     */
+    private function set navigationStack(value:NavigationStack):void
+    {
+        if (navigator)
+        {
+            navigator.navigationStack = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                NAVIGATION_STACK_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.navigationStack = value;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------

+    // TODO (Chiedozi): why this way
     //----------------------------------
     //  firstViewData
     //----------------------------------
@@ -170,36 +174,6 @@
     }

     //----------------------------------
-    //  sessionCachingEnabled
-    //----------------------------------
-
-    private var _sessionCachingEnabled:Boolean = false;
-
-    public function get sessionCachingEnabled():Boolean
-    {
-        return _sessionCachingEnabled;
-    }
-    public function set sessionCachingEnabled(value:Boolean):void
-    {
-        _sessionCachingEnabled = value;
-    }
-
-    //----------------------------------
-    //  persistenceManager
-    //----------------------------------
-    private var _persistenceManager:IPersistenceManager;
-
-    public function get persistenceManager():IPersistenceManager
-    {
-        return _persistenceManager;
-    }
-
-    public function set persistenceManager(value:IPersistenceManager):void
-    {
-        _persistenceManager = value;
-    }
-
-    //----------------------------------
     //  firstView
     //----------------------------------
     /**
@@ -224,38 +198,6 @@
     {
         _firstView = value;
     }
-
-    //----------------------------------
-    //  sections
-    //----------------------------------
-
-    [ArrayElementType("spark.components.supportClasses.ViewNavigatorSection")]
-    /**
-     *  Returns the stacks vector of the current navigator.
-     */
-    public function get sections():Vector.<ViewNavigatorSection>
-    {
-        if (navigator)
-            return navigator.sections;
-        else
-            return navigatorProperties.sections;
-    }
-
-    /**
-     *  @private
-     */
-    public function set sections(value:Vector.<ViewNavigatorSection>):void
-    {
-        if (navigator)
-        {
-            navigator.sections = (value == null) ? value : value.concat();
-            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                SECTIONS_PROPERTY_FLAG, value != null);
-        }
-        else
-            navigatorProperties.sections = (value == null) ? value : value.concat();
-    }
-

     //--------------------------------------------------------------------------
     //
@@ -391,7 +333,6 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-
     public function get navigationLayout():LayoutBase
     {
         if (navigator)
@@ -521,241 +462,134 @@

     //--------------------------------------------------------------------------
     //
-    //  Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *
+    //  Overridden Methods: MobileApplicationBase
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
      */
-    protected function deviceKeyDownHandler(event:KeyboardEvent):void
-    {
-        var key:uint = event.keyCode;
-
-        // We want to prevent the default down behavior for back key if navigator
-        // is at root
-        if (key == Keyboard.BACK && navigator.selectedSectionLength > 1)
-            event.preventDefault();
-    }
-
-    /**
-     *
-     */
-    protected function deviceKeyUpHandler(event:KeyboardEvent):void
-    {
-        var key:uint = event.keyCode;
-
-        if (key == Keyboard.BACK && navigator.selectedSectionLength > 1)
-            navigator.popView();
-    }
-
-    public function get landscapeOrientation():Boolean
-    {
-        return systemManager.stage.deviceOrientation == StageOrientation.ROTATED_LEFT ||
-            systemManager.stage.deviceOrientation == StageOrientation.ROTATED_RIGHT;
-    }
-
-    protected function persistViewData(event:Event = null):void
-    {
-        if (sessionCachingEnabled)
-            persistenceManager.setProperty("sectionData", sections);
-    }
-
-    protected function orientationChangeHandler(event:StageOrientationEvent):void
-    {
+    // TODO (chiedozi): Should these be refactored into the base class?
+    override protected function backKeyHandler():void
+    {
+        super.backKeyHandler();
+
+        navigator.backKeyHandler();
+    }
+
+    /**
+     *
+     */
+    override public function canCancelDefaultBackKeyBehavior():Boolean
+    {
+        return  navigator && navigator.canCancelDefaultBackKeyBehavior();
+    }
+
+    override protected function orientationChangeHandler(event:StageOrientationEvent):void
+    {
+        super.orientationChangeHandler(event);
+
         if (navigator)
             navigator.landscapeOrientation = landscapeOrientation;
     }

-    protected function applicationActivateHandler(event:Event):void
-    {
-    }
-
-    protected function applicationDeactivateHandler(event:Event):void
-    {
-        // Deactivate the current view
-        if (navigator && navigator.activeView)
-            navigator.activeView.active = false;
-
-        // This method called on Android when app run in background
-        if (sessionCachingEnabled)
-        {
-            // Dispatch event for saving persistence data
-            var eventDispatched:Boolean = true;
-            if (hasEventListener(FlexEvent.APPLICATION_PERSISTING))
-                eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_PERSISTING, false, true));
-
-            if (eventDispatched)
-            {
-                // Save version number of application
-                var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
-                var ns:Namespace = appDescriptor.namespace();
+    override protected function persistApplicationState():void
+    {
+        super.persistApplicationState();
+
+        if (navigator)
+        {
+            // TODO (chiedozi): Fold into navigator
+            if (navigator.activeView)
+               navigator.persistCurrentView();
+
+            persistenceManager.setProperty("navigationStack", navigationStack);
+        }
+    }
+
+    override protected function registerPeristenceClassAliases():void
+    {
+        super.registerPeristenceClassAliases();
+
+        // Register aliases for custom classes that will be written to
+        // persistence store by navigator
+        registerClassAlias("ViewHistoryData", ViewHistoryData);
+        registerClassAlias("NavigationStack", NavigationStack);
+    }
+
+    override protected function restoreApplicationState():void
+    {
+        super.restoreApplicationState();
+
+        if (persistenceManager.enabled)
+        {
+            var savedNavigationStack:NavigationStack =
+                persistenceManager.getProperty("navigationStack") as NavigationStack;
+
+            if (savedNavigationStack)
+            {
+                navigationStack = savedNavigationStack;
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == navigator)
+        {
+            var newNavigatorProperties:uint = 0;

-                persistenceManager.setProperty("applicationVersion", appDescriptor.ns::versionNumber.toString());
-                persistenceManager.setProperty("timestamp", new Date().getMilliseconds());
-                persistenceManager.setProperty("selectedSection", navigator.selectedIndex);
-                persistenceManager.setProperty("sectionData", sections);
-
-                if (navigator && navigator.activeView)
-                    navigator.persistCurrentView();
-
-                persistenceManager.flush();
-
-                if (hasEventListener(FlexEvent.APPLICATION_PERSIST))
-                    eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_PERSIST));
-            }
-        }
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden methods: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    override public function initialize():void
-    {
-        super.initialize();
-
-        // Add device key listeners
-        NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, applicationActivateHandler);
-
-        // We need to listen to different events on desktop and mobile because
-        // on desktop, the deactivate event is dispatched whenever the window loses
-        // focus.  This could cause persistence to run when the developer doesn't
-        // expect it to on desktop.
-        var os:String = Capabilities.os;
-        if (os.indexOf("Windows") != -1 || os.indexOf("Mac OS") != -1)
-            NativeApplication.nativeApplication.addEventListener(Event.EXITING, applicationDeactivateHandler);
-        else
-            NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
-
-        systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
-        systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler);
-        systemManager.stage.addEventListener(KeyboardEvent.KEY_UP, deviceKeyUpHandler);
-
-        // Initialize objects related to session-persistence
-        if (sessionCachingEnabled)
-        {
-            // Register aliases for custom classes that will be written to
-            // persistence store by navigator
-            registerClassAlias("ViewHistoryData", ViewHistoryData);
-            registerClassAlias("ViewNavigatorSection", ViewNavigatorSection);
-
-            // Create persistence store
-            // Note: The shared object has to be loaded AFTER the class aliases are created
-            persistenceManager = new PersistenceManager();
-            persistenceManager.initialize();
-
-            // Dispatch event for loading persistence data
-            var eventDispatched:Boolean = true;
-            if (hasEventListener(FlexEvent.APPLICATION_RESTORING))
-                eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_RESTORING, false, true));
-
-            if (eventDispatched)
-            {
-                // Load saved sections
-                var savedSections:Vector.<ViewNavigatorSection>;
-                savedSections = persistenceManager.getProperty("sectionData") as Vector.<ViewNavigatorSection>;
-
-                if (savedSections != null)
-                    sections = savedSections;
-
-                if (persistenceManager.enabled)
-                {
-                    var selectedSection:Number = persistenceManager.getProperty("selectedSection") as Number;
-
-                    if (selectedSection && selectedSection > 0 && selectedSection < savedSections.length)
-                        navigator.selectedIndex = selectedSection;
-
-                    if (navigator.tabBar)
-                        navigator.tabBar.selectedIndex = navigator.selectedIndex;
-                }
-
-                // Clear previously persisted data
-                persistenceManager.clear();
-
-                if (hasEventListener(FlexEvent.APPLICATION_RESTORE))
-                    eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_RESTORE));
-            }
-        }
-
-        // If the sections property is not set by this point, MobileApplication will
-        // create a default section to be used by the navigator, and initialize it
-        // with the firstView and firstViewData defined by the application
-        if (sections == null || sections.length == 0)
-        {
-            // Create the empty screen stack and initialize it with the
-            // desired firstView and its data
-            var section:ViewNavigatorSection = new ViewNavigatorSection();
-            section.firstView = firstView;
-            section.firstViewData = firstViewData;
-
-            // Set the stacks of the navigator
-            var newSections:Vector.<ViewNavigatorSection> = Vector.<ViewNavigatorSection>([section]);
-            sections = newSections;
-        }
-    }
-
-    override protected function partAdded(partName:String, instance:Object):void
-    {
-        super.partAdded(partName, instance);
-
-        if (instance == navigator)
-        {
-            var newNavigatorProperties:uint = 0;
-
-            if (navigatorProperties.sections != undefined)
-            {
-                navigator.sections = navigatorProperties.sections;
-                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                                                SECTIONS_PROPERTY_FLAG, true);
-            }
-
-            if (navigatorProperties.actionContent != undefined)
+            if (navigatorProperties.actionContent !== undefined)
             {
                 navigator.actionContent = navigatorProperties.actionContent;
                 newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
                                                 ACTION_CONTENT_PROPERTY_FLAG, true);
             }

-            if (navigatorProperties.actionLayout != undefined)
+            if (navigatorProperties.actionLayout !== undefined)
             {
                 navigator.actionLayout = navigatorProperties.actionLayout;
                 newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
                     ACTION_LAYOUT_PROPERTY_FLAG, true);
             }

-
-            if (navigatorProperties.navigationContent != undefined)
+            if (navigatorProperties.navigationContent !== undefined)
             {
                 navigator.navigationContent = navigatorProperties.navigationContent;
                 newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
                     NAVIGATION_CONTENT_PROPERTY_FLAG, true);
             }

-            if (navigatorProperties.navigationLayout != undefined)
+            if (navigatorProperties.navigationLayout !== undefined)
             {
                 navigator.navigationLayout = navigatorProperties.navigationLayout;
                 newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
                     NAVIGATION_LAYOUT_PROPERTY_FLAG, true);
             }

-            if (navigatorProperties.title != undefined)
+            if (navigatorProperties.title !== undefined)
             {
                 navigator.title = navigatorProperties.title;
                 newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
                     TITLE_PROPERTY_FLAG, true);
             }

-            if (navigatorProperties.titleContent != undefined)
+            if (navigatorProperties.titleContent !== undefined)
             {
                 navigator.titleContent = navigatorProperties.titleContent;
                 newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
                     TITLE_CONTENT_PROPERTY_FLAG, true);
             }

-            if (navigatorProperties.titleLayout != undefined)
+            if (navigatorProperties.titleLayout !== undefined)
             {
                 navigator.titleLayout = navigatorProperties.titleLayout;
                 newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
@@ -763,13 +597,16 @@
             }

             navigatorProperties = newNavigatorProperties;
+            navigator.firstView = firstView;
+            navigator.firstViewData = firstViewData;
+            navigator.navigationStack = navigationStack;  // TODO (chiedozi): Do other way
             navigator.landscapeOrientation = landscapeOrientation;

             // Set the stage focus to the navigator
             systemManager.stage.focus = navigator;
         }
     }
-
+
     override protected function partRemoved(partName:String, instance:Object):void
     {
         super.partRemoved(partName, instance);
@@ -777,10 +614,7 @@
         if (instance == navigator)
         {
             var newNavigatorProperties:Object = {};
-
-            if (BitFlagUtil.isSet(navigatorProperties as uint, SECTIONS_PROPERTY_FLAG))
-                newNavigatorProperties.sections = navigator.sections;
-
+
             if (BitFlagUtil.isSet(navigatorProperties as uint, ACTION_CONTENT_PROPERTY_FLAG))
                 newNavigatorProperties.actionContent = navigator.actionContent;

@@ -801,7 +635,10 @@

             if (BitFlagUtil.isSet(navigatorProperties as uint, TITLE_LAYOUT_PROPERTY_FLAG))
                 newNavigatorProperties.titleLayout = navigator.titleLayout;
-
+
+            // Always want to save the navigation stack
+            // TODO (chiedozi): I'm nto doing this right...
+            newNavigatorProperties.navigationStack = navigator.navigationStack;
             navigatorProperties = newNavigatorProperties;
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8455
Author:   chaase@adobe.com
Date:     2009-07-08T17:14:01.590461Z

Log Message:
-----------
Fixed various effects bugs. Includes:
- fix when setting transform center on effect to (0, 0, 0)
- fix for transform effects running within a Sequence (they now run independently, instead of combining into a signle instance as they do in a Parallel effect)
- fix for asdoc error in AnimateTransform3D for applyLocalProjection
- fix in Resize where we were not setting up propertyChanges correctly for the targets affected by the effect
- fixes in AnimateTransformInstance to handle scaling in Z correctly and handling translation 'by' effects correctly

Bugs: sdk-21877, sdk-21610, sdk21584, sdk-21786
Doc Notes: fixed AnimateTransform3D.applyLocalProjection docs
QE Notes: may affect Sequence tests with transform effects (since it now actually works), but no failures in current mx/effects/Sequence tests. 11 failures overall in Mustella, some known, the rest Matt will exclude and investigate.
Reviewer: Jason (plus Ely for AdvancedLayoutFeatures changes)
Tests: checkintests, Mustella spark/effects, mx/effects/Sequence

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
@@ -462,10 +462,13 @@
                     for (j = 0; j < animProp.keyframes.length; ++j)
                     {
                         var kf:Keyframe = animProp.keyframes[j];
-                        if (animProp.property == "translationX")
-                            kf.value += transformCenter.x;
-                        else
-                            kf.value += transformCenter.y;
+                        if (isValidValue(kf.value))
+                        {
+                            if (animProp.property == "translationX")
+                                kf.value += transformCenter.x;
+                            else
+                                kf.value += transformCenter.y;
+                        }
                     }
                 }
             }
@@ -651,7 +654,7 @@
                 currentValues.scaleX : target["scaleX"];
             scale.y = !isNaN(currentValues.scaleY) ?
                 currentValues.scaleY : target["scaleY"];
-            scale.z = !isNaN(currentValues.scaleY) ?
+            scale.z = !isNaN(currentValues.scaleZ) ?
                 currentValues.scaleZ : target["scaleZ"];
             tmpScale = scale;
         }


Avoid crash in ResultUtils

Avoid crash in ResultUtils

--- WeaveUISpark/src/weave/utils/ResultUtils.as
+++ WeaveUISpark/src/weave/utils/ResultUtils.as
@@ -99,8 +99,10 @@
 		}

 		public static function resultAsNumberColumn( keys:Object , column:Object,columName:String = ""):NumberColumn{
-			var numColumn:NumberColumn = new NumberColumn();
-			var keyVec:Vector.<IQualifiedKey> = Vector.<IQualifiedKey>(keys);
+			var numColumn:NumberColumn = new NumberColumn(<attribute title="{columnName}"/>);
+			var keyVec:Vector.<IQualifiedKey> = Vector.<IQualifiedKey>(keys);
+			if (column is Number)
+				column = [column];
 			var dataVec:Vector.<Number> = Vector.<Number>(column);
 			numColumn.setRecords(keyVec, dataVec);
 			return numColumn;


intersection() now requires 2 or more parameters. Updated documentation.

--- WeaveData/src/weave/utils/VectorUtils.as
+++ WeaveData/src/weave/utils/VectorUtils.as
@@ -36,9 +36,9 @@
 		private static var _lookupId:int = 0;

 		/**
-		 * Computes the union of the items in a list of Arrays.
+		 * Computes the union of the items in a list of Arrays. Can also be used to get a list of unique items in an Array.
 		 * @param arrays A list of Arrays.
-		 * @return The union of all the items in the Arrays in the order they appear.
+		 * @return The union of all the unique items in the Arrays in the order they appear.
 		 */
 		public static function union(...arrays):Array
 		{
@@ -60,27 +60,23 @@

 		/**
-		 * Computes the intersection of the items in a list of Arrays.
+		 * Computes the intersection of the items in a list of two or more Arrays.
 		 * @param arrays A list of Arrays.
-		 * @return The intersection of the items in both Arrays, in the order that they appear in the first Array.
-		 */
-		public static function intersection(...arrays):Array
-		{
-			if (arrays.length == 0)
-				return arrays;
-			if (arrays.length == 1)
-				return arrays[0]
+		 * @return The intersection of the items appearing in all Arrays, in the order that they appear in the first Array.
+		 */
+		public static function intersection(firstArray:*, secondArray:*, ...moreArrays):Array
+		{
+			moreArrays.unshift(secondArray);

 			var result:Array = [];
 			var item:*;
-			var firstArray:* = arrays.shift();
-			var lastArray:* = arrays.pop();
+			var lastArray:* = moreArrays.pop();

 			_lookupId++;
 			for each (item in lastArray)
 				_lookup[item] = _lookupId;

-			for each (var array:* in arrays)
+			for each (var array:* in moreArrays)
 			{
 				for each (item in array)
 					if (_lookup[item] === _lookupId)


working with CFF fonts

working with CFF fonts

--- crossUserMicrophone/src/main/flex/Main.as
+++ crossUserMicrophone/src/main/flex/Main.as
@@ -90,6 +90,8 @@
             b64.insertNewLines = false;
             b64.encodeBytes(event.data);
             ExternalInterface.call("onFlashSoundRecorded", b64.toString());
+
+            _textField.text = "saved recorded sound.";
         }

     }


修复 Varint 大于 127 时组包错误的问题

修复 Varint 大于 127 时组包错误的问题

--- as3/com/netease/protobuf/VarintWriter.as
+++ as3/com/netease/protobuf/VarintWriter.as
@@ -8,21 +8,25 @@
 // as listed at <url: http://www.opensource.org/licenses/bsd-license.php >.

 package com.netease.protobuf {
-	import flash.utils.*
+	import flash.utils.*;
 	public final class VarintWriter extends ByteArray {
 		private var bitsLeft:uint = 0
 		public function end():void {
 			if (length == 1) {
 				this[0] &= 0x7F
 			} else {
-				for (var i:uint = length; i > 0; i--) {
-					const byte:uint = this[i - 1]
+				for (var i:uint = length; i > 0;) {
+					const l:uint = i - 1
+					const byte:uint = this[l]
 					if (byte != 0x80) {
-						this[i - 1] = 0x7F & byte
+						this[l] = byte & 0x7F
 						length = i
 						return
 					}
+					i = l
 				}
+				this[0] = 0
+				length = 1
 			}
 		}
 		public function write(number:uint, bits:uint):void {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7163
Author:   aharui@adobe.com
Date:     2009-05-21T02:19:55.813792Z

Log Message:
-----------
Initial checkin of frame 1 cleanup.  In an RSL linkage, more classes will now come from the RSL because they are no longer needed in frame 1, and the size of the application SWF will be smaller.

QE Notes: None
Doc Notes: Maybe.  All new classes should be undocumented, but it might be worth checking that and any changes to interfaces
Bugs:
Reviewer: darrell
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/MarshalPopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ResourceModuleRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IMarshalSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/ToolTipManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/MustellaResultsParser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/DragManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IActiveWindowManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/PopUpManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/messaging/config/LoaderConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManagerChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/CursorManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/framework/src/mx/managers/marshalClasses/PopUpManagerMarshalMixin.as
+++ frameworks/projects/framework/src/mx/managers/marshalClasses/PopUpManagerMarshalMixin.as
@@ -0,0 +1,729 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 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.managers.marshalClasses
+{
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+import flash.geom.Rectangle;
+import flash.geom.Point;
+
+import mx.core.FlexGlobals;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
+import mx.core.ISWFLoader;
+import mx.core.IUIComponent;
+import mx.core.mx_internal;
+import mx.events.DynamicEvent;
+import mx.events.InterManagerRequest;
+import mx.events.MoveEvent;
+import mx.events.Request;
+import mx.events.SandboxMouseEvent;
+import mx.events.SWFBridgeRequest;
+import mx.managers.IActiveWindowManager;
+import mx.managers.IFocusManagerContainer;
+import mx.managers.IMarshalSystemManager;
+import mx.managers.ISystemManager;
+import mx.managers.PopUpManagerImpl;
+import mx.managers.PopUpData;
+import mx.managers.SystemManager;
+import mx.managers.SystemManagerGlobals;
+import mx.managers.SystemManagerProxy;
+import mx.styles.IStyleClient;
+import mx.utils.NameUtil;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+[Mixin]
+
+/**
+ *  @private
+ *  A SystemManager has various types of children,
+ *  such as the Application, popups,
+ *  tooltips, and custom cursors.
+ *  You can access the just the custom cursors through
+ *  the cursors property,
+ *  the tooltips via toolTips, and
+ *  the popups via popUpChildren.  Each one returns
+ *  a SystemChildrenList which implements IChildList.  The SystemManager's
+ *  IChildList methods return the set of children that aren't popups, tooltips
+ *  or cursors.  To get the list of all children regardless of type, you
+ *  use the rawChildrenList property which returns this SystemRawChildrenList.
+ */
+public class PopUpManagerMarshalMixin
+{
+    include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class Method
+	//
+	//--------------------------------------------------------------------------
+
+	public static function init(fbs:IFlexModuleFactory):void
+	{
+		if (!PopUpManagerImpl.mixins)
+			PopUpManagerImpl.mixins = [];
+        if (PopUpManagerImpl.mixins.indexOf(PopUpManagerMarshalMixin) == -1)
+        {
+		    PopUpManagerImpl.mixins.push(PopUpManagerMarshalMixin);
+		    PopUpManagerImpl.popUpInfoClass = MarshalPopUpData;
+        }
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function PopUpManagerMarshalMixin(owner:PopUpManagerImpl = null)
+	{
+		super();
+
+        if (!owner)
+            return;
+
+		this.popUpManager = owner;
+		sm = ISystemManager(SystemManagerGlobals.topLevelSystemManagers[0]);
+		popUpManager.addEventListener("initialize", initializeHandler);
+		popUpManager.addEventListener("addPopUp", addPopUpHandler);
+		popUpManager.addEventListener("addPlaceHolder", addPlaceHolderHandler);
+		popUpManager.addEventListener("addedPopUp", addedPopUpHandler);
+		popUpManager.addEventListener("topLevelSystemManager", topLevelSystemManagerHandler);
+		popUpManager.addEventListener("isTopLevelRoot", isTopLevelRootHandler);
+		popUpManager.addEventListener("bringToFront", bringToFrontHandler);
+		popUpManager.addEventListener("createModalWindow", createModalWindowHandler);
+		popUpManager.addEventListener("updateModalMask", updateModalMaskHandler);
+		popUpManager.addEventListener("createdModalWindow", createdModalWindowHandler);
+		popUpManager.addEventListener("showModalWindow", showModalWindowHandler);
+		popUpManager.addEventListener("blurTarget", blurTargetHandler);
+		popUpManager.addEventListener("hideModalWindow", hideModalWindowHandler);
+		popUpManager.addEventListener("addMouseOutEventListeners", addMouseOutEventListenersHandler);
+		popUpManager.addEventListener("removeMouseOutEventListeners", removeMouseOutEventListenersHandler);
+		popUpManager.addEventListener("popUpRemoved", popUpRemovedHandler);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var popUpManager:PopUpManagerImpl;
+
+    private var sm:ISystemManager;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+
+	public function initializeHandler(event:Event):void
+	{
+        sm.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, createModalWindowRequestHandler, false, 0, true);
+        sm.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, showModalWindowRequest, false, 0, true);
+        sm.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, hideModalWindowRequest, false, 0, true);
+	}
+
+
+	public function addPopUpHandler(event:Request):void
+	{
+		var sm:ISystemManager = event.value.sm as ISystemManager;
+		var parent:DisplayObjectContainer = event.value.parent as DisplayObjectContainer;
+        if (!sm)
+        {
+            // check if parent is our sandbox root
+            sm = ISystemManager(SystemManagerGlobals.topLevelSystemManagers[0]);
+            if (sm.getSandboxRoot() != parent)
+            {
+                //trace("error: popup root was not SystemManager");
+                return; // and maybe a nice error message
+            }
+        }
+
+		// if using a bridge, then create a System Manager Proxy to host
+		// the popup. The System Manager Proxy is the display object
+		// added to the top-level system manager's children, not
+		// the popup itself.
+		var sbRoot:DisplayObject = sm.getSandboxRoot();
+		var request:SWFBridgeRequest = null;
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+		if (mp.useSWFBridge())
+		{
+			if (sbRoot != sm)
+			{
+				var smp:SystemManagerProxy = new SystemManagerProxy(sm);
+				request = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_REQUEST, false, false,
+				                                    mp.swfBridgeGroup.parentBridge,
+													{ window: DisplayObject(smp),
+														parent: parent,
+														modal: event.value.modal,
+														childList: event.value.childList});
+				sbRoot.dispatchEvent(request);
+				event.value = smp;
+				event.preventDefault();
+			}
+		}
+	}
+
+	public function addPlaceHolderHandler(event:DynamicEvent):void
+	{
+		var sm:ISystemManager = event.sm as ISystemManager;
+		var window:IFlexDisplayObject = event.window as IFlexDisplayObject
+		var sbRoot:DisplayObject = sm.getSandboxRoot();
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+
+		// add a placeholder for an untrusted popup if this system manager
+		// is hosting the popup.
+		if (!sm.isTopLevelRoot() && sbRoot && DisplayObject(sm) == sbRoot)
+		{
+			var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, null, { window: DisplayObject(window)});
+			request.requestor = mp.swfBridgeGroup.parentBridge;
+			request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(window));
+			sm.dispatchEvent(request);
+		}
+	}
+
+	public function addedPopUpHandler(event:DynamicEvent):void
+	{
+		var smp:ISystemManager = ISystemManager(event.systemManager);
+
+		var awm:IActiveWindowManager =
+			IActiveWindowManager(smp.getImplementation("mx.managers::IActiveWindowManager"));
+
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(smp.getImplementation("mx.managers::IMarshalSystemManager"));
+
+        if (!(smp is SystemManagerProxy) && mp.useSWFBridge())
+         	// We want the top-level root to activate the window.
+         	mp.dispatchActivatedWindowEvent(DisplayObject(event.window));
+        else
+            awm.activate(IFocusManagerContainer(event.window));
+	}
+
+	public function topLevelSystemManagerHandler(event:Request):void
+	{
+		var parent:DisplayObjectContainer = event.value as DisplayObjectContainer;
+		var localRoot:DisplayObjectContainer;
+
+		if (parent.parent is SystemManagerProxy)
+			localRoot = DisplayObjectContainer(SystemManagerProxy(parent.parent).systemManager);
+		else if (parent is IUIComponent && IUIComponent(parent).systemManager is SystemManagerProxy)
+			localRoot = DisplayObjectContainer(SystemManagerProxy(IUIComponent(parent).systemManager).systemManager);
+
+		if (localRoot)
+		{
+			event.value = localRoot;
+			event.preventDefault();
+		}
+	}
+
+
+	public function isTopLevelRootHandler(event:Request):void
+	{
+        // Only need to calc the visible rect when the sandbox root is an untrusted application.
+        // Otherwise the alert will float over the entire application.
+        if (sm != sm.getSandboxRoot())
+        {
+            var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
+                                                        "isTopLevelRoot");
+            sm.getSandboxRoot().dispatchEvent(request);
+            event.value = Boolean(request.value);
+			event.preventDefault();
+        }
+	}
+
+	public function bringToFrontHandler(event:DynamicEvent):void
+	{
+		var o:PopUpData = event.popUpData;
+		var popUp:IFlexDisplayObject = event.popUp;
+        const sm:ISystemManager = ISystemManager(popUp.parent);
+        if (sm is SystemManagerProxy)
+        {
+            // Since the proxy is parented to the SystemManager we need to
+            // be it to the front, not the pop up.
+            var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
+                                    false, false,
+                                    "bringToFront",
+                                    {topMost: o.topMost, popUp: sm});
+            sm.getSandboxRoot().dispatchEvent(request);
+            event.preventDefault();
+        }
+	}
+
+	public function createModalWindowHandler(event:DynamicEvent):void
+	{
+		var o:MarshalPopUpData = event.popUpData;
+		var popUp:IFlexDisplayObject = event.popUp;
+		var popupStyleClient:IStyleClient = popUp as IStyleClient;
+
+        // set alpha of the popup and get it out of the focus loop
+        if (!isNaN(o.modalTransparency))
+            o.modalWindow.alpha = o.modalTransparency;
+		o.modalTransparency = o.modalWindow.alpha;
+
+        if (!isNaN(o.modalTransparencyColor))
+            event.color = o.modalTransparencyColor;
+        o.modalTransparencyColor = event.color;
+
+		event.preventDefault();
+    }
+
+	public function updateModalMaskHandler(event:DynamicEvent):void
+	{
+		var o:MarshalPopUpData = event.popUpData;
+        if (o.exclude)
+        {
+            o.modalMask = new Sprite();
+            updateModalMask(sm, o.modalWindow,
+                            o.useExclude ? o.exclude : null,
+                            o.excludeRect, o.modalMask);
+            o.modalWindow.mask = o.modalMask;
+            event.childrenList.addChild(o.modalMask);
+
+            // update the modal window mask when the size or position of the area
+            // we are excluding changes.
+            o.exclude.addEventListener(Event.RESIZE, o.resizeHandler);
+            o.exclude.addEventListener(MoveEvent.MOVE, o.resizeHandler);
+        }
+    }
+
+    public function createdModalWindowHandler(event:DynamicEvent):void
+    {
+		var o:MarshalPopUpData = event.popUpData;
+		var popUp:IFlexDisplayObject = event.popUp;
+		var popupStyleClient:IStyleClient = popUp as IStyleClient;
+
+        var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+
+        if (mp.useSWFBridge())
+        {
+            if (popupStyleClient)
+            {
+                o.modalTransparencyDuration = popupStyleClient.getStyle("modalTransparencyDuration");
+                o.modalTransparencyBlur = popupStyleClient.getStyle("modalTransparencyBlur");
+            }
+
+            dispatchModalWindowRequest(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, sm, sm.getSandboxRoot(), o, event.visibleFlag);
+        }
+	}
+
+    /**
+     *  @private
+     *
+     *  Update a mask to exclude the area of the exclude parameter from the area
+     *  of the modal window parameter.
+     *
+     *  @param sm The system manager that hosts the modal window
+     *  @param modalWindow The base area of the mask
+     *  @param exclude The area to exlude from the mask, may be null.
+     *  @param excludeRect An optionally rectangle that is included in the area
+     *  to exclude. The rectangle is in global coordinates.
+     *  @param mask A non-null sprite. The mask is rewritten for each call.
+     *
+     */
+    mx_internal static function updateModalMask(sm:ISystemManager,
+                                     modalWindow:DisplayObject,
+                                     exclude:IUIComponent,
+                                     excludeRect:Rectangle,
+                                     mask:Sprite):void
+    {
+        var modalBounds:Rectangle = modalWindow.getBounds(DisplayObject(sm));
+        var excludeBounds:Rectangle;
+        var pt:Point;
+
+        if (exclude is ISWFLoader)
+        {
+            excludeBounds = ISWFLoader(exclude).getVisibleApplicationRect();
+            pt = new Point(excludeBounds.x, excludeBounds.y);
+            pt = DisplayObject(sm).globalToLocal(pt);
+            excludeBounds.x = pt.x;
+            excludeBounds.y = pt.y;
+        }
+        else if (!exclude)
+            excludeBounds = modalBounds.clone();    // don't exclude anything extra
+        else
+            excludeBounds = DisplayObject(exclude).getBounds(DisplayObject(sm));
+
+        // apply excludeRect to the result
+        if (excludeRect)
+        {
+            pt = new Point(excludeRect.x, excludeRect.y);
+            pt = DisplayObject(sm).globalToLocal(pt);
+            var rect:Rectangle = new Rectangle(pt.x, pt.y, excludeRect.width, excludeRect.height);
+            excludeBounds = excludeBounds.intersection(rect);
+        }
+
+        mask.graphics.clear();
+        mask.graphics.beginFill(0x000000);
+
+        // Fill the mask in three logical rows
+        // 1. Above the exclude bounds
+        if (excludeBounds.y > modalBounds.y)
+            mask.graphics.drawRect(modalBounds.x, modalBounds.y,
+                                   modalBounds.width, excludeBounds.y - modalBounds.y);
+
+        // 2. Left and right of the exclude bounds
+        if (modalBounds.x < excludeBounds.x)
+            mask.graphics.drawRect(modalBounds.x, excludeBounds.y,
+                                   excludeBounds.x - modalBounds.x, excludeBounds.height);
+
+        if ((modalBounds.x + modalBounds.width) > (excludeBounds.x + excludeBounds.width))
+            mask.graphics.drawRect(excludeBounds.x + excludeBounds.width,
+                                   excludeBounds.y,
+                                   modalBounds.x + modalBounds.width - excludeBounds.x - excludeBounds.width,
+                                   excludeBounds.height);
+
+        // 3. Below the exclude bounds
+        if ((excludeBounds.y + excludeBounds.height) < (modalBounds.y + modalBounds.height))
+            mask.graphics.drawRect(modalBounds.x, excludeBounds.y + excludeBounds.height,
+                                   modalBounds.width,
+                                   modalBounds.y + modalBounds.height - excludeBounds.y - excludeBounds.height);
+        mask.graphics.endFill();
+
+    }
+
+    private function dispatchModalWindowRequest(type:String,
+                                                sm:ISystemManager,
+                                                sbRoot:DisplayObject,
+                                                o:MarshalPopUpData,
+                                                visibleFlag:Boolean):void
+    {
+        // if our first target is a sandbox root that is the top level root,
+        // then we don't need to send a modal request.
+        if (!o.isRemoteModalWindow && sm != sbRoot)
+        {
+            var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
+                                                        "isTopLevelRoot");
+            sbRoot.dispatchEvent(request);
+            if (Boolean(request.value))
+                return;
+        }
+
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+
+        var modalRequest:SWFBridgeRequest = new SWFBridgeRequest(type, false, false, null,
+												{ skip: !o.isRemoteModalWindow && sm != sbRoot,
+												  useExclude: o.useExclude,
+												  show: visibleFlag,
+												  remove: false,
+												  transparencyDuration: o.modalTransparencyDuration,
+												  transparency: o.modalTransparency,
+												  transparencyColor: o.modalTransparencyColor,
+												  transparencyBlur: o.modalTransparencyBlur});
+        var bridge:IEventDispatcher = mp.swfBridgeGroup.parentBridge;;
+        modalRequest.requestor = bridge;
+        bridge.dispatchEvent(modalRequest);
+    }
+
+	public function showModalWindowHandler(event:DynamicEvent):void
+	{
+		event.preventDefault();
+
+		var o:MarshalPopUpData = event.popUpData;
+		var popUp:IFlexDisplayObject = o.owner as IFlexDisplayObject;
+        var sm:ISystemManager = event.systemManager;
+
+        if (!isNaN(o.modalTransparencyDuration))
+            event.duration = o.modalTransparencyDuration;
+        o.modalTransparencyDuration = event.duration;
+
+        if (!isNaN(o.modalTransparency))
+            event.alpha = o.modalTransparency;
+        o.modalTransparency = event.alpha;
+
+        if (!isNaN(o.modalTransparencyBlur))
+            event.blurAmount = o.modalTransparencyBlur;
+    	o.modalTransparencyBlur = event.blurAmount;
+
+		if (!isNaN(o.modalTransparencyColor))
+	        event.transparencyColor = o.modalTransparencyColor;
+    	o.modalTransparencyColor = event.transparencyColor;
+
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+
+        if (sm is SystemManagerProxy)
+            sm = SystemManagerProxy(sm).systemManager;
+        if (event.sendRequest && mp.useSWFBridge())
+            dispatchModalWindowRequest(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, sm, sm.getSandboxRoot(), o, true);
+	}
+
+
+	public function blurTargetHandler(event:Request):void
+	{
+		var o:PopUpData = event.value.popUpData;
+		var popUp:IFlexDisplayObject = o.owner as IFlexDisplayObject;
+        const sm:ISystemManager = ISystemManager(popUp.parent);
+
+		var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        var applicationRequest:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
+                                                           false, false,
+                                                           "application",
+                                                           sbRoot);
+        sbRoot.dispatchEvent(applicationRequest);
+        event.value = applicationRequest.value;
+		event.preventDefault();
+	}
+
+	public function hideModalWindowHandler(event:DynamicEvent):void
+	{
+		var o:MarshalPopUpData = event.popUpData;
+		var destroy:Boolean = event.destroy;
+
+        if (destroy && o.exclude)
+        {
+            o.exclude.removeEventListener(Event.RESIZE, o.resizeHandler);
+            o.exclude.removeEventListener(MoveEvent.MOVE, o.resizeHandler);
+        }
+
+        var sm:ISystemManager = ISystemManager(FlexGlobals.topLevelApplication.systemManager);
+
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+
+        if (mp.useSWFBridge())
+        {
+            var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+            // if our first target is a sandbox root that is the top level root,
+            // then we don't need to send a modal request.
+            if (!o.isRemoteModalWindow && sm != sbRoot)
+            {
+                var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
+                                                            "isTopLevelRoot");
+                sbRoot.dispatchEvent(request);
+                if (Boolean(request.value))
+                    return;
+            }
+
+            var modalRequest:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, false, false, null,
+														{ skip: !o.isRemoteModalWindow && sm != sbRoot,
+															show: false,
+															remove: destroy});
+            var bridge:IEventDispatcher = mp.swfBridgeGroup.parentBridge;
+            var target:IEventDispatcher;
+            modalRequest.requestor = bridge;
+
+            bridge.dispatchEvent(modalRequest);
+        }
+	}
+
+    /**
+     *  @private
+     *
+     *  Create a modal window and optionally show it.
+     */
+    private function createModalWindowRequestHandler(event:Event):void
+    {
+        var request:SWFBridgeRequest;
+
+        if (event is SWFBridgeRequest)
+            request = SWFBridgeRequest(event);
+        else
+            request = SWFBridgeRequest.marshal(event);
+
+        var sm:ISystemManager = popUpManager.getTopLevelSystemManager(DisplayObject(FlexGlobals.topLevelApplication));
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        // process the message
+        var popUpData:MarshalPopUpData = MarshalPopUpData(PopUpManagerImpl.createPopUpData());
+        popUpData.isRemoteModalWindow = true;
+        popUpData.systemManager = sm;
+        popUpData.modalTransparency = request.data.transparency;
+
+        // disable blur because we can mask the application and blur is not
+        // working if we blur the modalWindow.
+        popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
+        popUpData.modalTransparencyColor = request.data.transparencyColor;
+        popUpData.modalTransparencyDuration = request.data.transparencyDuration;
+
+        // Get the SWFLoader to exclude.
+        // The requestor may be a real SWFLoader or a sandbox bridge that
+        // requires a look up to get the SWFLoader.
+        popUpData.exclude = mp.swfBridgeGroup.getChildBridgeProvider(request.requestor) as IUIComponent;
+        popUpData.useExclude = request.data.useExclude;
+        popUpData.excludeRect = Rectangle(request.data.excludeRect);
+
+        popUpManager.popupInfo.push(popUpData);
+
+        popUpManager.createModalWindow(null, popUpData, sm.popUpChildren, request.data.show, sm, sbRoot);
+    }
+
+    /**
+     *  @private
+     *
+     *  Show a modal window.
+     */
+    private function showModalWindowRequest(event:Event):void
+    {
+        var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
+
+        if (event is SWFBridgeRequest)
+            request = SWFBridgeRequest(event);
+        else
+            request = SWFBridgeRequest.marshal(event);
+
+        var sm:ISystemManager = popUpManager.getTopLevelSystemManager(DisplayObject(FlexGlobals.topLevelApplication));
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        // the highest popUpData in the list is the most recent modal window.
+        // sanity check that the popupdata is really a modal window with a null
+        // parent and popup window.
+        var popUpData:MarshalPopUpData = findHighestRemoteModalPopupInfo();
+        popUpData.excludeRect = Rectangle(request.data);
+        popUpData.modalTransparency = request.data.transparency;
+
+        // disable blur because we can mask the application and blur is not
+        // working if we blur the modalWindow.
+        popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
+        popUpData.modalTransparencyColor = request.data.transparencyColor;
+        popUpData.modalTransparencyDuration = request.data.transparencyDuration;
+
+        if (popUpData.owner || popUpData.parent)
+            throw new Error();              // not popUpData for a modal window
+
+        popUpManager.showModalWindow(popUpData, sm);
+    }
+
+    /**
+     *  @private
+     *
+     *  Hide a modal window and optionally remove it.
+     */
+    private function hideModalWindowRequest(event:Event):void
+    {
+        var request:SWFBridgeRequest;
+
+        // If the event is redispatched from the SystemManger it will be
+        // marshalled. If the PopUpManager dispatches the event using
+        // the sandbox root it will come here directly.
+        if (event is SWFBridgeRequest)
+            request = SWFBridgeRequest(event);
+        else
+            request = SWFBridgeRequest.marshal(event);
+
+        var sm:ISystemManager = popUpManager.getTopLevelSystemManager(DisplayObject(FlexGlobals.topLevelApplication));
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        // the highest popUpData in the list is the most recent modal window.
+        // sanity check that the popupdata is really a modal window with a null
+        // parent and popup window.
+        var popUpData:MarshalPopUpData = findHighestRemoteModalPopupInfo();
+        if (!popUpData || popUpData.owner || popUpData.parent)
+            throw new Error();              // not popUpData for a modal window
+
+        popUpManager.hideModalWindow(popUpData, request.data.remove);
+
+        // handle removing popup window
+        if (request.data.remove)
+        {
+            popUpManager.popupInfo.splice(popUpManager.popupInfo.indexOf(popUpData), 1);
+			var awm:IActiveWindowManager =
+				IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
+            awm.numModalWindows--;
+        }
+    }
+
+    private function popUpRemovedHandler(event:DynamicEvent):void
+    {
+
+		var o:PopUpData = event.popUpData;
+		var popUp:IFlexDisplayObject = o.owner as IFlexDisplayObject;
+		var sm:ISystemManager = o.systemManager;
+		var mp:IMarshalSystemManager =
+			IMarshalSystemManager(sm.getImplementation("mx.managers::IMarshalSystemManager"));
+
+		// remove the focus manager from a bridged system manager, if any
+		if (sm is SystemManagerProxy)
+		{
+
+			var parentBridge:IEventDispatcher = mp.swfBridgeGroup.parentBridge;
+			var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, false, false,
+  					                            parentBridge,
+        										{ window: DisplayObject(sm),
+        										  parent:	o.parent,
+        										  modal: o.modalWindow != null});
+			sm.getSandboxRoot().dispatchEvent(request);
+		}
+		else if (mp.useSWFBridge())
+		{
+			// Must be locally hosted popup.
+			// We need to remove the placeholder at the top level root
+			request = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false, null,
+															{ window: DisplayObject(popUp)});
+			request.requestor = mp.swfBridgeGroup.parentBridge;
+			request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(popUp));
+			sm.dispatchEvent(request);
+		}
+	}
+
+    public function addMouseOutEventListenersHandler(event:DynamicEvent):void
+	{
+		var o:MarshalPopUpData = event.popUpData;
+		var sbRoot:DisplayObject = o.systemManager.getSandboxRoot();
+
+        sbRoot.addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
+        sbRoot.addEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
+	}
+
+    public function removeMouseOutEventListenersHandler(event:DynamicEvent):void
+	{
+		var o:MarshalPopUpData = event.popUpData;
+		var sbRoot:DisplayObject = o.systemManager.getSandboxRoot();
+
+        sbRoot.removeEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
+        sbRoot.removeEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
+	}
+
+    /**
+     *  @private
+     *  Returns the PopUpData for the highest remote modal window on display.
+     */
+    private function findHighestRemoteModalPopupInfo():MarshalPopUpData
+    {
+        const n:int = popUpManager.popupInfo.length - 1;
+        for (var i:int = n; i >= 0; i--)
+        {
+            var o:MarshalPopUpData = popUpManager.popupInfo[i];
+            if (o.isRemoteModalWindow)
+                return o;
+        }
+        return null;
+    }
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 16262
Author:   dloverin@adobe.com
Date:     2010-05-20T18:44:39.210129Z

Log Message:
-----------
Move mx components out of framework.swc into mx.swc

The new mx.swc library lives in the libs/mx directory.

QE notes: Of the 5 failures I saw: 1 was intermittent and 4 are not a bug.
Managers/StyleManager/AdvancedCSS/descendantSelectors/AdvancedCSS_descendantSelectors_Style descendantSelector_combining_nested_style
    This failure was intermittent.

mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ApplicationControlBar_FromTo
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ApplicationControlBar_By
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ControlBar_FromTo
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ControlBar_By
    These failures are due to my code changes but I believe the old behavior was incorrect. When a control bar is the last child in a Panel it should appear at the bottom of the Panel. In the test case an ApplicationControlBar/ContorlBar is added to an empty Panel, making it the last child in the Panel. So it should appear at the bottom of the Panel instead of inside the Panel.

Doc notes: new library, mx.swc
Bugs:
Reviewer: Alex
Tests run:
Is noteworthy for integration: Yes

Modified Paths:
--------------
740 paths were modified

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

--- frameworks/projects/mx/src/MxClasses.as
+++ frameworks/projects/mx/src/MxClasses.as
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 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
+{
+
+/**
+ *  @private
+ *  This class is used to link additional classes into framework.swc
+ *  beyond those that are found by dependecy analysis starting
+ *  from the classes specified in manifest.xml.
+ *  For example, Button does not have a reference to ButtonSkin,
+ *  but ButtonSkin needs to be in framework.swc along with Button.
+ */
+internal class MxClasses
+{
+	// Maintain alphabetical order
+	import mx.controls.Alert; Alert;
+	import mx.controls.videoClasses.CuePointManager; CuePointManager;
+	import mx.effects.easing.Cubic; Cubic;
+	import mx.effects.easing.Linear; Linear;
+	import mx.effects.easing.Quadratic; Quadratic;
+	import mx.effects.easing.Quartic; Quartic;
+	import mx.effects.easing.Quintic; Quintic;
+	import mx.effects.easing.Sine; Sine;
+
+	import mx.modules.Module; Module;
+	import mx.modules.ModuleLoader; ModuleLoader;
+	import mx.skins.halo.AccordionHeaderSkin; AccordionHeaderSkin;
+	import mx.skins.halo.ActivatorSkin; ActivatorSkin;
+	import mx.skins.halo.ApplicationBackground; ApplicationBackground;
+	import mx.skins.halo.ButtonBarButtonSkin; ButtonBarButtonSkin;
+	import mx.skins.halo.ButtonSkin; ButtonSkin;
+	import mx.skins.halo.CheckBoxIcon; CheckBoxIcon;
+	import mx.skins.halo.ColorPickerSkin; ColorPickerSkin;
+	import mx.skins.halo.ComboBoxArrowSkin; ComboBoxArrowSkin;
+	import mx.skins.halo.DataGridColumnResizeSkin; DataGridColumnResizeSkin;
+	import mx.skins.halo.DataGridHeaderBackgroundSkin; DataGridHeaderBackgroundSkin;
+	import mx.skins.halo.DataGridHeaderSeparator; DataGridHeaderSeparator;
+	import mx.skins.halo.DataGridSortArrow; DataGridSortArrow;
+	import mx.skins.halo.DateChooserIndicator; DateChooserIndicator;
+	import mx.skins.halo.DateChooserMonthArrowSkin; DateChooserMonthArrowSkin;
+	import mx.skins.halo.DateChooserYearArrowSkin; DateChooserYearArrowSkin;
+	import mx.skins.halo.HaloBorder; HaloBorder;
+	import mx.skins.halo.HaloColors; HaloColors;
+	import mx.skins.halo.SliderHighlightSkin; SliderHighlightSkin;
+	import mx.skins.halo.SliderThumbSkin; SliderThumbSkin;
+	import mx.skins.halo.SliderTrackSkin; SliderTrackSkin;
+	import mx.skins.halo.LinkButtonSkin; LinkButtonSkin;
+	import mx.skins.halo.LinkSeparator; LinkSeparator;
+	import mx.skins.halo.ListDropIndicator; ListDropIndicator;
+	import mx.skins.halo.MenuBarBackgroundSkin; MenuBarBackgroundSkin;
+	import mx.skins.halo.NumericStepperDownSkin; NumericStepperDownSkin;
+	import mx.skins.halo.NumericStepperUpSkin; NumericStepperUpSkin;
+	import mx.skins.halo.PanelSkin; PanelSkin;
+	import mx.skins.halo.PopUpButtonSkin; PopUpButtonSkin;
+	import mx.skins.halo.PopUpIcon; PopUpIcon;
+	import mx.skins.halo.PopUpMenuIcon; PopUpMenuIcon;
+	import mx.skins.halo.ProgressBarSkin; ProgressBarSkin;
+	import mx.skins.halo.ProgressIndeterminateSkin; ProgressIndeterminateSkin;
+	import mx.skins.halo.ProgressMaskSkin; ProgressMaskSkin;
+	import mx.skins.halo.ProgressTrackSkin; ProgressTrackSkin;
+	import mx.skins.halo.RadioButtonIcon; RadioButtonIcon;
+	import mx.skins.halo.ScrollArrowSkin; ScrollArrowSkin;
+	import mx.skins.halo.ScrollThumbSkin; ScrollThumbSkin;
+	import mx.skins.halo.ScrollTrackSkin; ScrollTrackSkin;
+	import mx.skins.halo.TabSkin; TabSkin;
+	import mx.skins.halo.TitleBackground; TitleBackground;
+	import mx.skins.halo.WindowBackground; WindowBackground;
+
+}
+
+}
+


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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