Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/core/SoundAsset.as
+++ frameworks/projects/framework/src/mx/core/SoundAsset.as
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
+import flash.media.Sound;
+
+/**
+ *  SoundAsset is a subclass of the flash.media.Sound class
+ *  which represents sounds that you embed in a Flex application.
+ *
+ *
The sound that you're embedding can be in an MP3 file.
+ *  You can also embed a sound symbol that is in a SWF file produced by Flash.
+ *  In both cases, the MXML compiler autogenerates a class that extends
+ *  SoundAsset to represent the embedded sound data.

+ *
+ *
You don't generally have to use the SoundAsset class directly
+ *  when you write a Flex application.
+ *  For example, you can embed an MP3 file and use it in a SoundEffect
+ *  simply by writing the following:

+ *
+ *

+ *  <mx:SoundEffect id="beep" source="@Embed(source='Beep.mp3')"/>

+ *
+ *
without having to understand that the MXML compiler has created
+ *  a subclass of SoundAsset for you.

+ *
+ *
However, it may be useful to understand what is happening
+ *  at the ActionScript level.
+ *  To embed a bitmap in ActionScript, you declare a variable
+ *  of type Class, and put [Embed] metadata on it.
+ *  For example, you embed an MP3 file like this:

+ *
+ *

+ *  [Bindable]
+ *  [Embed(source="Beep.mp3")]
+ *  private var beepClass:Class;

+ *
+ *
The MXML compiler sees the .mp3 extension, transcodes the MP3 data
+ *  into the sound format that the player uses, autogenerates
+ *  a subclass of the SoundAsset class, and sets your variable
+ *  to be a reference to this autogenerated class.
+ *  You can then use this class reference to create instances of the
+ *  SoundAsset using the new operator, and you can use
+ *  APIs of the Sound class on them:

+ *
+ *

+ *    var beepSound:SoundAsset = SoundAsset(new beepClass());
+ *    beepSound.play();

+ *
+ *
However, you rarely need to create SoundAsset instances yourself
+ *  because sound-related properties and styles can simply be set to a
+ *  sound-producing class, and components will create sound instances
+ *  as necessary.
+ *  For example, to play this sound with a SoundEffect, you can
+ *  set the SoundEffect's source property to
+ *  beepClass.
+ *  In MXML you could do this as follows:

+ *
+ *

+ *  <mx:SoundEffect id="beepEffect" source="{beepClass}"/>

+ */
+public class SoundAsset extends Sound implements IFlexAsset
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function SoundAsset()
+    {
+        super();
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19117
Author:   cframpto@adobe.com
Date:     2010-12-07T21:39:57.453177Z

Log Message:
-----------
Add protected createGridSelection() methods to DataGrid and Grid so GridSelection can be subclassed.  Fix metadata on Grid column.  Fix metadata and doc for miterLimit minValue for Stroke classes.

QE notes:
Doc notes:
Bugs: SDK-28734, SDK-28655
Reviewer: Hans (DG), Darrell
Tests run: cyclone which took 2 1/2 hours!
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/graphics/Stroke.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/Stroke.as
+++ frameworks/projects/framework/src/mx/graphics/Stroke.as
@@ -49,7 +49,7 @@
  *    caps="null|none|round|square"
  *    color="0x000000"
  *    joints="null|bevel|miter|round"
- *    miterLimit="0"
+ *    miterLimit="1"
  *    pixelHinting="false|true"
  *    scaleMode="normal|none|horizontal|vertical"
  *    weight="1 (in most cases)"
@@ -109,8 +109,8 @@
      *  The default value is null.
      *
      *  @param miterLimit Indicates the limit at which a miter is cut off.
-     *  Valid values range from 0 to 255.
-     *  The default value is 0.
+     *  Valid values range from 1 to 255.
+     *  The default value is 1.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -124,7 +124,7 @@
                            scaleMode:String = "normal",
                            caps:String = null,
                            joints:String = null,
-                           miterLimit:Number = 0)
+                           miterLimit:Number = 1)
     {
         super(color, weight, alpha, pixelHinting,
               scaleMode, caps, joints, miterLimit);


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 3028
Author:   hmuller@adobe.com
Date:     2008-08-28T18:57:45.553703Z

Log Message:
-----------
Added doc for the new "Group as Viewport" API.

Provisional fix for bug 16609, BasicLayout's contentWidth,Height
computation now uses actualSize.x,y.

Removed unused gapChanged, columnCountChanged, columnWidthChanged and
rowCountChanged, rowHeightChanged internal variables from
Horizontal,VerticalLayout.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -574,11 +574,26 @@
     [Bindable]
     [Inspectable(category="General")]

+	/**
+	 *  The X coordinate of the origin of the region this Group is
+	 *  scrolled to.
+	 *
+	 *  Setting this property causes the scrollRect to
+	 *  be set, if necessary, to:
+	 *

+	 *  new Rectangle(horizontalScrollPosition, verticalScrollPosition, width, height)
+	 *

+	 *
+	 *  @default 0
+	 */
     public function get horizontalScrollPosition():Number
     {
         return _horizontalScrollPosition;
     }

+    /**
+     *  @private
+     */
     public function set horizontalScrollPosition(value:Number):void
     {
         if (value == _horizontalScrollPosition)
@@ -598,12 +613,27 @@

     [Bindable]
     [Inspectable(category="General")]
-
+
+	/**
+	 *  The Y coordinate of the origin of the region this Group is
+	 *  scrolled to.
+	 *
+	 *  Setting this property causes the scrollRect to
+	 *  be set, if necessary, to:
+	 *

+	 *  new Rectangle(horizontalScrollPosition, verticalScrollPosition, width, height)
+	 *

+	 *
+	 *  @default 0
+	 */
     public function get verticalScrollPosition():Number
     {
         return _verticalScrollPosition;
     }

+    /**
+     *  @private
+     */
     public function set verticalScrollPosition(value:Number):void
     {
         if (value == _verticalScrollPosition)
@@ -624,6 +654,10 @@
     [Bindable]
     [Inspectable(category="General")]

+	/**
+	 * The positive extent of this Group's content, relative to the 0,0
+	 * origin, along the X axis.
+	 */
     public function get contentWidth():Number
     {
         return _contentWidth;
@@ -643,6 +677,10 @@
     [Bindable]
     [Inspectable(category="General")]

+	/**
+	 * The positive extent of this Group's content, relative to the 0,0
+	 * origin, along the Y axis.
+	 */
     public function get contentHeight():Number
     {
         return _contentHeight;
@@ -653,7 +691,16 @@
         _contentHeight = value;
     }

-
+	/**
+	 *  Sets this Group's contentWidth and contentHeight
+	 *  properties.
+	 *
+	 *  This method is is intended for layout class developers who should
+	 *  call it from measure() and updateDisplayList().
+	 *
+	 *  @param w The new value of contentWidth.
+	 *  @param h The new value of contentHeight.
+	 */
     public function setContentSize(w:Number, h:Number):void
     {
     	if ((w == _contentWidth) && (h == _contentHeight))


Application was not adding its own beads to its strand.

--- frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
+++ frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
@@ -578,8 +578,11 @@

             dispatchEvent('initialize');

-            if (model is IBead) addBead(model as IBead);
-            if (controller is IBead) addBead(controller as IBead);
+			for (var index:int in beads) {
+				addBead(beads[index]);
+			}
+
+			dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));

             initialView.applicationModel = model;
             addElement(initialView);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/managers/systemClasses/RemotePopUp.as
+++ frameworks/projects/framework/src/mx/managers/systemClasses/RemotePopUp.as
@@ -40,6 +40,11 @@
      * @param bridge If the form is trusted, the bridge handle of the source of the form.
      * If the form is untrusted, the bridge of the direct child of this application that parents
      * the source of the form.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function RemotePopUp(window:Object, bridge:Object)
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19344
Author:   egeorgie@adobe.com
Date:     2010-12-14T00:38:13.222484Z

Log Message:
-----------
PARB changes for density scaling

- authorDensity -> applicationDPI, type changed to int
- DensityUtil not visible in the documentation anymore [ExcludeClass]
- DensityUtil. screenDPIToDeviceDensity() -> classifyDPI(), returns int now
- DensityUtil. getDensityScale() -> getDPIScale(), takes int now
- DeviceDensity enum -> DPIClassification enum
- ISystemManager.densityScale property has been removed.
- New property to Application -> runtimeDPI.

QE notes: can start writing automated tests now
Doc notes:
Bugs:
Reviewer: Alex, Glenn, Jason SJ,
Tests run: checkintest
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/DensityUtil.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/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeviceDensity.as" copyfrom-rev="19256" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DPIClassification.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationAngledButtonSkin.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/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeviceDensity.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
@@ -14,7 +14,7 @@
 import flash.display.DisplayObject;
 import flash.display.Graphics;

-import mx.core.DeviceDensity;
+import mx.core.DPIClassification;

 import spark.components.Button;
 import spark.skins.mobile.supportClasses.MobileSkin;
@@ -54,13 +54,13 @@
         useChromeColor = true;

         // set the right assets and dimensions to use based on the screen density
-        switch (authorDensity)
+        switch (applicationDPI)
         {
-            case DeviceDensity.PPI_320:
-            {
-                trackWidth = 320;
-                trackHeight = 18;
-
+			case DPIClassification.DPI_320:
+			{
+				trackWidth = 320;
+				trackHeight = 18;
+
                 visibleTrackWidth = 280;
                 visibleTrackLeftOffset = 20;

@@ -68,7 +68,7 @@

                 break;
             }
-            case DeviceDensity.PPI_240:
+            case DPIClassification.DPI_240:
             {
                 trackWidth = 192;
                 trackHeight = 13;


Transferred from the Adobe Open Source Subversion Repository

Revision: 18747
Author:   rfrishbe@adobe.com
Date:     2010-11-19T21:49:23.290523Z

Log Message:
-----------
A few MobileSkin changes

1) Added new protected methods to MobileSkin (getElementPreferredWidth(), getElementPreferredHeight())
2) Renamed MobileSkin resizePart(), positionPart() to resizeElement, positionElement().  This matches MobileItemRenderer but still needs to be PARBed
3) Fixed up multi-line resize in TextAreaSkin

QE notes:
Doc notes:
Bugs: -
Reviewer: Evtim
Tests run: checkintests, mustella cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.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/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.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@1265817 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as
@@ -101,8 +101,8 @@
     override protected function layoutBorder(bgImg:DisplayObject, unscaledWidth:Number, unscaledHeight:Number):void
     {
         // extend 1px outside measured width to overlap highlight borders
-        resizePart(bgImg, unscaledWidth + layoutBorderSize, unscaledHeight);
-        positionPart(bgImg, 0, 0);
+        resizeElement(bgImg, unscaledWidth + layoutBorderSize, unscaledHeight);
+        positionElement(bgImg, 0, 0);
     }

     override protected function drawChromeColor(chromeColorGraphics:Graphics, unscaledWidth:Number, unscaledHeight:Number):void


Go back to hacking a hacky scale when snapshotting the video control.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@477 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/CameraSnapshotter.as
+++ src/as/com/threerings/flash/CameraSnapshotter.as
@@ -8,6 +8,8 @@
 import flash.display.Sprite;

 import flash.events.StatusEvent;
+
+import flash.geom.Matrix;

 import flash.media.Camera;
 import flash.media.Video;
@@ -117,7 +119,14 @@
             return; // throw exception?
         }

-        _bitmap.bitmapData.draw(_video);
+        // NOTE: we specify a matrix to scale the video, because no matter what size it really
+        // is, it will usually snapshot as if it were at the smallest size. STRANGE.
+        // Note that this stupid hack doesn't always work, but it mostly works, and it's better
+        // than leaving everything alone, which mostly didn't work. But then again,
+        // this code is specifically saying: "fuck up the scale", so if Adobe fixes their
+        // bug in the future, this will cause broken behavior.
+        _bitmap.bitmapData.draw(_video,
+            new Matrix(_camera.width / 160, 0, 0, _camera.height / 120));

         if (_video.parent != null) {
             removeChild(_video);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.fileSystemClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/olap/OLAPDimension.as
+++ frameworks/projects/advancedgrids/src/mx/olap/OLAPDimension.as
@@ -0,0 +1,495 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.olap
+{
+
+import flash.utils.Dictionary;
+
+import mx.collections.ArrayCollection;
+import mx.collections.ICollectionView;
+import mx.collections.IList;
+import mx.collections.IViewCursor;
+import mx.core.mx_internal;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="dimension", kind="property")]
+
+//--------------------------------------
+//  metadata
+//--------------------------------------
+
+[DefaultProperty("elements")]
+
+/**
+ *  The OLAPDimension class represents a dimension of an OLAP cube.
+ *
+ *  @mxml
+ *

+ *  The <mx:OLAPDimension> tag inherits all of the tag attributes
+ *  of its superclass, and adds the following tag attributes:
+ *

+ *

+ *  <mx:OLAPDimension
+ *    Properties
+ *    attributes=""
+ *    elements=""
+ *    hierarchies=""
+  *  />
+ *
+ *  @see mx.olap.IOLAPDimension
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class OLAPDimension extends OLAPElement implements IOLAPDimension
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor
+     *
+     *  @param name The name of the OLAP dimension that includes the OLAP schema hierarchy of the element.
+     *
+     *  @param displayName The name of the OLAP dimension, as a String, which can be used for display.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function OLAPDimension(name:String=null, displayName:String=null)
+    {
+        OLAPTrace.traceMsg("Creating dimension: " + name, OLAPTrace.TRACE_LEVEL_3);
+        super(name, displayName);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    //map of attributes using name as the key
+    private var attributeMap:Dictionary = new Dictionary(true);
+
+    //map of hierarchies using name as the key
+    private var _hierarchiesMap:Dictionary = new Dictionary(true);
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // attributes
+    //----------------------------------
+
+    private var _attributes:IList = new ArrayCollection;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get attributes():IList
+    {
+        return _attributes;
+    }
+
+    /**
+     *  @private
+     */
+    public function set attributes(value:IList):void
+    {
+        _attributes = value;
+        var n:int = value.length;
+        for (var attrIndex:int = 0; attrIndex < n; ++attrIndex)
+        {
+            var attr:OLAPAttribute = value.getItemAt(attrIndex) as OLAPAttribute;
+            attr.dimension = this;
+            attributeMap[attr.name] = attr;
+        }
+    }
+
+    //----------------------------------
+    // cube
+    //----------------------------------
+
+    private var _cube:IOLAPCube;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get cube():IOLAPCube
+    {
+        return _cube;
+    }
+
+    /**
+     *  @private
+     */
+    public function set cube(value:IOLAPCube):void
+    {
+        _cube = value;
+    }
+
+    //----------------------------------
+    // dataProvider
+    //----------------------------------
+
+    mx_internal function get dataProvider():ICollectionView
+    {
+        return OLAPCube(cube).dataProvider;
+    }
+
+    //----------------------------------
+    // defaultMember
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get defaultMember():IOLAPMember
+    {
+        // get the default hierarchy here
+        if ((hierarchies.length + attributes.length) > 1)
+        {
+            var message:String = ResourceManager.getInstance().getString(
+                        "olap", "multipleHierarchies");
+            throw Error(message);
+        }
+
+        return hierarchies[0].defaultMember;
+    }
+
+    //----------------------------------
+    // elements
+    //----------------------------------
+
+    /**
+     *  Processes the input Array and initializes the attributes
+     *  and hierarchies properties based on the elements of the Array.
+     *  Attributes are represented in the Array by instances of the OLAPAttribute class,
+     *  and hierarchies are represented by instances of the OLAPHierarchy class.
+     *
+     *
Use this property to define the attributes and hierarchies of a cube in a single Array.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set elements(value:Array):void
+    {
+        var attrs:ArrayCollection = new ArrayCollection();
+        var userHierarchies:ArrayCollection = new ArrayCollection();
+        for each (var element:Object in value)
+        {
+            if (element is OLAPAttribute)
+                attrs.addItem(element);
+            else if (element is OLAPHierarchy)
+                userHierarchies.addItem(element);
+            else
+                OLAPTrace.traceMsg("Invalid element specified for dimension elements");
+        }
+
+        attributes = attrs;
+        hierarchies = userHierarchies;
+    }
+
+    //----------------------------------
+    // hierarchies
+    //----------------------------------
+
+    private var _hierarchies:IList = new ArrayCollection;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get hierarchies():IList
+    {
+        return _hierarchies;
+    }
+
+    /**
+     *  @private
+     */
+    public function set hierarchies(value:IList):void
+    {
+        //limitation till we support multiple hierarchies.
+        if (value.length > 1)
+        {
+            var message:String = ResourceManager.getInstance().getString(
+                        "olap", "multipleHierarchiesNotSupported", [name]);
+            throw Error(message);
+        }
+
+        _hierarchies = value;
+        for (var i:int = 0; i < value.length; ++i)
+        {
+            var h:OLAPHierarchy = value.getItemAt(i) as OLAPHierarchy;
+            h.dimension = this;
+            _hierarchiesMap[h.name] = h;
+        }
+    }
+
+    //----------------------------------
+    // isMeasure
+    //----------------------------------
+
+    private var _isMeasureDimension:Boolean = false;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get isMeasure():Boolean
+    {
+        return _isMeasureDimension;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function setAsMeasure(value:Boolean):void
+    {
+        _isMeasureDimension = value;
+    }
+
+    //----------------------------------
+    // members
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get members():IList
+    {
+        var temp:Array = [];
+
+        for (var i:int = 0; i < hierarchies.length; ++i)
+            temp = temp.concat(hierarchies.getItemAt(i).members.toArray());
+
+        return new ArrayCollection(temp);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public function findHierarchy(name:String):IOLAPHierarchy
+    {
+        return _hierarchiesMap[name];
+    }
+
+    /**
+    *  @inheritDoc
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public function findAttribute(name:String):IOLAPAttribute
+    {
+        return attributeMap[name];
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function findMember(name:String):IOLAPMember
+    {
+        var member:IOLAPMember;
+        var i:int = 0;
+        var h:OLAPHierarchy;
+
+        for (i = 0; i < attributes.length; ++i)
+        {
+            h = attributes.getItemAt(i) as OLAPHierarchy;
+            member = h.findMember(name);
+            if (member)
+                break;
+        }
+
+        if (!member)
+        {
+            for (i = 0; i < hierarchies.length; ++i)
+            {
+                h = hierarchies.getItemAt(i) as OLAPHierarchy;
+                member = h.findMember(name);
+                if (member)
+                    break;
+            }
+        }
+
+        return member;
+    }
+
+    /**
+     *  @private
+     *  Creates a hierarchy of the dimension.
+     *
+     *  @param name The name of the hierarchy.
+     *
+     *  @return An OLAPHierarchy instance that represents the new hierarchy.
+     */
+    mx_internal function createHierarchy(name:String):OLAPHierarchy
+    {
+        var h:OLAPHierarchy = new OLAPHierarchy(name);
+        h.dimension = this;
+        _hierarchies.addItem(h);
+        _hierarchiesMap[h.name] = h;
+        return h;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function refresh():void
+    {
+        //if dimension is of measure type we have nothing to do.
+        if (isMeasure)
+            return;
+        var temp:Object;
+        var dataHandlers:Array  =[];
+
+        var i:int = 0;
+        var n:int = attributes.length;
+        for (i = 0; i < n; ++i)
+        {
+            temp = attributes.getItemAt(i);
+            dataHandlers.push(temp);
+        }
+
+        n = hierarchies.length;
+        for (i = 0; i < n; ++i)
+        {
+            temp = hierarchies.getItemAt(i);
+            temp.refresh();
+            dataHandlers.push(temp);
+        }
+
+        for (i = 0; i < n; ++i)
+        {
+            var h:OLAPHierarchy = hierarchies.getItemAt(i) as OLAPHierarchy;
+            var levels:IList = h.levels;
+            var m:int = levels.length;
+            for (var j:int = 0; j < m; ++j)
+            {
+                var level:OLAPLevel = levels[j];
+                //levels doesn't include allLevel
+                //if (level == h.allLevel)
+                //    continue;
+                var a:OLAPAttribute = findAttribute(level.name) as OLAPAttribute;
+                a.userHierarchy = level.hierarchy;
+                a.userHierarchyLevel = level;
+            }
+        }
+
+        // we need to refresh attributes here because we need the userHierarchy
+        // userLevels to be set before refresh can happen.
+        n = attributes.length;
+        for (i = 0; i < n; ++i)
+        {
+            temp = attributes.getItemAt(i);
+            temp.refresh();
+        }
+
+        var iterator:IViewCursor = dataProvider.createCursor();
+
+        while (!iterator.afterLast)
+        {
+            var currentData:Object = iterator.current;
+            for each (temp in dataHandlers)
+                temp.processData(currentData);
+            iterator.moveNext();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function addAttribute(name:String, dataField:String):IOLAPAttribute
+    {
+        var attrHierarchy:OLAPAttribute = attributeMap[name];
+        if (!attrHierarchy)
+        {
+            attrHierarchy = new OLAPAttribute(name);
+            attrHierarchy.dataField = dataField;
+            attrHierarchy.dimension = this;
+            attributeMap[name] = attrHierarchy;
+            _attributes.addItem(attrHierarchy);
+        }
+        return attrHierarchy;
+    }
+
+}
+
+}


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8518
Author:   jszeto@adobe.com
Date:     2009-07-10T23:36:38.604312Z

Log Message:
-----------
DropDownList bug fix

http://bugs.adobe.com/jira/browse/SDK-22006 - Spark DropDownList not showing label (or correct value) if value grabbed from a binding

Corrected the logic in DropDownList.updateLabelElement to check for null and undefined.
Changed the function name to match the new name of the skinPart.

QE Notes: None
Doc Notes: None
Bugs: SDK-22006
Reviewer: Deepa

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as

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

--- frameworks/projects/spark/src/spark/components/DropDownList.as
+++ frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -459,11 +459,11 @@
      *  Called whenever we need to update the text passed to the labelDisplay skin part
      */
     // TODO (jszeto): Make this protected and make the name more generic (passing data to skin)
-    mx_internal function updateLabelElement():void
+    mx_internal function updateLabelDisplay():void
     {
         if (labelDisplay)
         {
-            if (selectedItem)
+            if (selectedItem != null && selectedItem != undefined)
                 labelDisplay.text = LabelUtil.itemToLabel(selectedItem, labelField, labelFunction);
             else
                 labelDisplay.text = prompt;
@@ -482,7 +482,7 @@
     override protected function commitSelection(dispatchChangedEvents:Boolean = true):Boolean
     {
         var retVal:Boolean = super.commitSelection(dispatchChangedEvents);
-        updateLabelElement();
+        updateLabelDisplay();
         return retVal;
     }

@@ -496,7 +496,7 @@
         if (labelChanged)
         {
             labelChanged = false;
-            updateLabelElement();
+            updateLabelDisplay();
         }
     }


Protected DynamicModel from repetitive updates

git-svn-id: 02605e11d3a461bc7e12f3f3880edf4b0c8dcfd0@3975 3e7533ad-8678-4d30-8e38-00a379d3f0d0

--- src/laml/display/DynamicModel.as
+++ src/laml/display/DynamicModel.as
@@ -1,4 +1,5 @@
 package laml.display {
+	import flash.errors.IllegalOperationError;
 	import flash.events.Event;
 	import flash.events.EventDispatcher;
 	import flash.events.IEventDispatcher;
@@ -93,6 +94,11 @@

 		override flash_proxy function setProperty(name:*, value:*):void {
 			if(value is Function) {
+				// TODO: Need to support a collection of callbacks instead
+				// of clobbering with the most recent....
+				if(callbacks[name]) {
+					throw new IllegalOperationError("DynamicModel does not yet support multiple callbacks on: " + name);
+				}
 				callbacks[name] = value;
 			}
 			else if(value != valueContainer[name]) {


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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


初始化ByteArray时position为0

--- as3/com/netease/protobuf/stringToByteArray.as
+++ as3/com/netease/protobuf/stringToByteArray.as
@@ -11,8 +11,9 @@
 	import flash.utils.ByteArray
 	public function stringToByteArray(s:String):ByteArray {
 		const ba:ByteArray = new ByteArray
+		ba.length = s.length
 		for (var i:uint = 0; i < s.length; ++i) {
-			ba.writeByte(s.charCodeAt(i))
+			ba[i] = s.charCodeAt(i)
 		}
 		return ba
 	}


FLEX-33593 Remove mouse event listeners when removing items.

--- frameworks/projects/mx/src/mx/controls/MenuBar.as
+++ frameworks/projects/mx/src/mx/controls/MenuBar.as
@@ -1878,6 +1878,11 @@

         if (item)
         {
+			item.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
+			item.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+			item.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+			item.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
+
             removeChild(DisplayObject(item));
             menuBarItems.splice(index, 1);
             invalidateSize();
@@ -1897,6 +1902,12 @@
         while (menuBarItems.length > 0)
         {
             var item:IMenuBarItemRenderer = menuBarItems[0];
+
+			item.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
+			item.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+			item.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+			item.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
+
             removeChild(DisplayObject(item));
             menuBarItems.splice(0, 1);
         }


Flash: crop the bitmap

Flash: crop the bitmap

--- src/ogv.as
+++ src/ogv.as
@@ -155,8 +155,9 @@
                 bitmapData = new BitmapData(videoInfo.frameWidth, videoInfo.frameHeight, true, 0xff000000);

                 bitmap = new Bitmap(bitmapData);
-                bitmap.x = 0;
-                bitmap.y = 0;
+                // Offset the bitmap to 'crop' it conveniently
+                bitmap.x = -videoInfo.picX;
+                bitmap.y = -videoInfo.picY;
                 resizeForStage();
                 addChild(bitmap);
             };
@@ -169,8 +170,10 @@

         private function resizeForStage():void {
             if (bitmap) {
-                bitmap.scaleX = stage.stageWidth / videoInfo.frameWidth;
-                bitmap.scaleY = stage.stageHeight / videoInfo.frameHeight;
+                // Note the bitmap size is the frame size; it's offset
+                // to let us crop it within the player area.
+                bitmap.scaleX = stage.stageWidth / videoInfo.picWidth;
+                bitmap.scaleY = stage.stageHeight / videoInfo.picHeight;
             }
             if (posterLoader) {
                 posterLoader.width = stage.stageWidth;


FLVTag : add useful tag type getter for debug

--- src/org/mangui/hls/flv/FLVTag.as
+++ src/org/mangui/hls/flv/FLVTag.as
@@ -146,7 +146,28 @@
             return length;
         }
         ;
-
+        CONFIG::LOGGING {
+            public function get typeString() : String {
+                switch(type) {
+                    case AAC_HEADER:
+                        return "AAC_HEADER";
+                    case AAC_RAW :
+                        return "AAC_RAW";
+                    case AVC_HEADER:
+                        return "AVC_HEADER";
+                    case AVC_NALU:
+                        return "AVC_NALU";
+                    case MP3_RAW:
+                        return "MP3_RAW";
+                    case DISCONTINUITY:
+                        return "DISCONTINUITY";
+                    case METADATA:
+                        return "METADATA";
+                    default:
+                        return "";
+                }
+            }
+        }
         /** push a data pointer into the frame. **/
         public function push(array : ByteArray, start : int, length : int) : void {
             pointers.push(new TagData(array, start, length));


Test presence of FMTP field in SDP before extracting SPS/PPS

--- src/com/axis/rtspclient/FLVMux.as
+++ src/com/axis/rtspclient/FLVMux.as
@@ -35,9 +35,7 @@
       this.sdp = sdp;
       this.ns = ns;

-      createMetaDataTag();
-
-      if (sdp.getMediaBlock('video')) {
+      if (sdp.getMediaBlock('video') && sdp.getMediaBlock('video').hasOwnProperty('fmtp')) {
         /* Initial parameters must be taken from SDP file. Additional may be received as NAL */
         var sets:Array = sdp.getMediaBlock('video').fmtp['sprop-parameter-sets'].split(',');
         var sps:Base64Decoder = new Base64Decoder();


note in timer comment that flash on windows has AWFUL timer precision

15.6ms. Yeah. Nice.

--- src/ogv.as
+++ src/ogv.as
@@ -196,6 +196,9 @@
         private function getTimestamp():Number {
             // Is there a higher-resolution timer?
             // This gives only millisecond precision, which ain't great.
+            //
+            // Actually on Windows, it gives ~15ms precision, which is almost useless.
+            // On Mac we get those milliseconds for real at least.
             return flash.utils.getTimer();
         }


FLEX-35260 Now in the unit test we're also verifying areCoordinatesOverAHeaderView(). Currently fails (for point "b").

--- frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
+++ frameworks/projects/spark/tests/spark/components/gridClasses/GridHeaderViewLayout_FLEX_35260_Tests.as
@@ -89,6 +89,7 @@
         private var _keyRectangles:Array;
         private var _keyPoints:Array;

+        //@TODO add cases with horizontal scroll, and also with fixed columns
         public static var dimensions:Array = [/*x, y, width, header padding left, header padding top, [column widths] */
             [[10, 0, 300, 5, 0, [25, 150]]],
             [[0, 0, 300, 5, 0, [25, 150]]]
@@ -124,20 +125,7 @@
             _keyPoints = null;
         }

-        /*[Ignore]
-        [Test]
-        public function test_global_coordinates_over_header_view(globalPoint:Array, expectedHeaderIndex:int):void
-        {
-            //given
-            var pointOverAHeaderView:Boolean = expectedHeaderIndex != -1;
-
-            //when
-            var doesHeaderContainThisPoint:Boolean = _sut.areCoordinatesOverAHeaderView(new Point(globalPoint[0], globalPoint[1]));
-
-            //then
-            assertEquals(pointOverAHeaderView, doesHeaderContainThisPoint);
-        }
-
+        /*
         [Ignore]
         [Test]
         public function test_column_index(globalPoint:Array, expectedColumnIndex:int):void
@@ -196,14 +184,21 @@
             {
                 for (var i:int = 0; i < directions.length; i++)
                 {
+                    //given
+                    var pointToTest:Point = getAdjacentPoint(_keyPoints[pointName], directions[i]);
+
                     //when
-                    var adjacentPoint:Point = getAdjacentPoint(_keyPoints[pointName], directions[i]);
-                    var expectedHeaderIndex:int = getHeaderIndexAssumption(adjacentPoint);
-                    var actualHeaderIndex:int = getHeaderIndexAtGlobalPoint(adjacentPoint);
+                    var expectedHeaderIndex:int = getHeaderIndexAssumption(pointToTest);
+                    var actualHeaderIndex:int = getHeaderIndexAtGlobalPoint(pointToTest);
+                    const errorMessageHeaderIndex:String = getHeaderIndexErrorMessage(pointName, directions[i], pointToTest, expectedHeaderIndex, actualHeaderIndex);
+
+                    var shouldBeContainedInHeader:Boolean = getHeaderContainsPointAssumption(pointToTest);
+                    var actuallyContainedInHeader:Boolean = _sut.areCoordinatesOverAHeaderView(pointToTest);
+                    const errorMessageHeaderContainsPoint:String = getHeaderContainsPointErrorMessage(pointName, directions[i], pointToTest, shouldBeContainedInHeader, actuallyContainedInHeader);

                     //then
-                    const errorMessage:String = getHeaderIndexErrorMessage(pointName, directions[i], adjacentPoint, expectedHeaderIndex, actualHeaderIndex);
-                    assertEquals(errorMessage, expectedHeaderIndex, actualHeaderIndex);
+                    assertEquals(errorMessageHeaderIndex, expectedHeaderIndex, actualHeaderIndex);
+                    assertEquals(errorMessageHeaderContainsPoint, shouldBeContainedInHeader, actuallyContainedInHeader);
                 }
             }
         }
@@ -217,10 +212,24 @@
                     + "\n DEBUG INFO: headerRectangles=" + headerRectangles);
         }

+        private function getHeaderContainsPointErrorMessage(pointName:String, direction:Matrix, transformedPoint:Point, shouldBeContainedInHeader:Boolean, isActuallyContainedInHeader:Boolean):String
+        {
+            return "The point " + pointName + " transformed with Matrix " + direction + " (resulting in " + transformedPoint + ") should be "
+                    + (shouldBeContainedInHeader ? "within " : "outside ") + "header bounds"
+                    + " but was mistakenly found to be "
+                    + (isActuallyContainedInHeader ? "within" : "outside")
+                    + "\n DEBUG INFO: headerRectangle=" + headerRectangle;
+        }
+
         private function getHeaderIndexAtGlobalPoint(globalPoint:Point):int
         {
             var localPoint:Point = _sut.globalToLocal(globalPoint);
             return _sut.getHeaderIndexAt(localPoint.x, localPoint.y);
+        }
+
+        private function getHeaderContainsPointAssumption(point:Point):Boolean
+        {
+            return rectangleContainsPoint(headerRectangle, point);
         }

         private function getHeaderIndexAssumption(point:Point):int
@@ -290,10 +299,16 @@
             var keyRectangles:Array = [];

             keyRectangles["headerRectangles"] = generateHeaderRectangles(keyPoints, dimensions);
+            keyRectangles["headerRectangle"] = generateVisibleHeaderRectangle(keyPoints, dimensions);

             return keyRectangles;
         }

+        private function generateVisibleHeaderRectangle(keyPoints:Array, dimensions:Array):Rectangle
+        {
+            const topLeftCorner:Point = keyPoints["b"];
+            return new Rectangle(topLeftCorner.x, topLeftCorner.y, getHeaderWidthFromKeyPoints(keyPoints), getHeaderHeightFromKeyPoints(keyPoints));
+        }
         private function generateHeaderRectangles(keyPoints:Array, dimensions:Array):Array
         {
             var headerRectangles:Array = [];
@@ -319,6 +334,11 @@
             return _keyRectangles["headerRectangles"];
         }

+        private function get headerRectangle():Rectangle
+        {
+            return _keyRectangles["headerRectangle"] as Rectangle;
+        }
+
         private function getColumnWidthFromKeyPoints(keyPoints:Array, columnIndex:int):Number
         {
             //we're assuming columnIndex has a valid value
@@ -359,6 +379,11 @@
         private function getHeaderHeightFromKeyPoints(keyPoints:Array):Number
         {
             return Point(keyPoints["h"]).y - Point(keyPoints["e"]).y;
+        }
+
+        private function getHeaderWidthFromKeyPoints(keyPoints:Array):Number
+        {
+            return Point(keyPoints["e"]).x - Point(keyPoints["b"]).x;
         }

         private function getColumnWidths(dimensions:Array):Array


renamed local variable baseColor to diffuseColor in DiffuseShaderPart

--- src/aerys/minko/render/shader/part/DiffuseShaderPart.as
+++ src/aerys/minko/render/shader/part/DiffuseShaderPart.as
@@ -22,35 +22,40 @@

 		public function getDiffuse() : SFloat
 		{
-			var baseColor:SFloat
-			if (meshBindings.propertyExists("diffuseMap"))
+			var diffuseColor : SFloat	= null;
+
+			if (meshBindings.propertyExists('diffuseMap'))
 			{
 				var diffuseMap	: SFloat	= meshBindings.getTextureParameter(
-					"diffuseMap",
-					meshBindings.getConstant("diffuseFiltering", SamplerFiltering.LINEAR),
-					meshBindings.getConstant("diffuseMipMapping", SamplerMipMapping.LINEAR),
-					meshBindings.getConstant("diffuseWrapping", SamplerWrapping.REPEAT)
+					'diffuseMap',
+					meshBindings.getConstant('diffuseFiltering', SamplerFiltering.LINEAR),
+					meshBindings.getConstant('diffuseMipMapping', SamplerMipMapping.LINEAR),
+					meshBindings.getConstant('diffuseWrapping', SamplerWrapping.REPEAT)
 				);
-				baseColor = sampleTexture(diffuseMap,interpolate(vertexUV.xy));
+
+				diffuseColor = sampleTexture(diffuseMap,interpolate(vertexUV.xy));
 			}
-			else if (meshBindings.propertyExists("diffuseColor"))
+			else if (meshBindings.propertyExists('diffuseColor'))
 			{
-				baseColor = meshBindings.getParameter("diffuseColor", 4);
+				diffuseColor = meshBindings.getParameter('diffuseColor', 4);
 			}
 			else
 			{
 				throw new Error(
-					"Property 'diffuseColor' or 'diffuseMap' must be set."
+					'Property \'diffuseColor\' or \'diffuseMap\' must be set.'
 				);
 			}

 			// Apply HLSA modifiers
 			if (meshBindings.propertyExists('diffuseColorMatrix'))
 			{
-				baseColor = multiply4x4(baseColor, meshBindings.getParameter('diffuseColorMatrix', 16));
+				diffuseColor = multiply4x4(
+					diffuseColor,
+					meshBindings.getParameter('diffuseColorMatrix', 16)
+				);
 			}

-			return baseColor;
+			return diffuseColor;
 		}
 	}
 }


Hide skin when user is idle.

Hide skin when user is idle.

--- src/goplayer/SkinnedPlayerView.as
+++ src/goplayer/SkinnedPlayerView.as
@@ -1,13 +1,23 @@
 package goplayer
 {
+  import flash.display.Sprite
+  import flash.events.Event
+  import flash.events.MouseEvent
+  import flash.utils.getTimer
+
   public class SkinnedPlayerView extends Component
     implements PlayerVideoUpdateListener, SkinBackend
   {
+    private const IDLE_TIME_MS : uint = 2000
+
     private const missingSkinParts : Array = []
+    private const skinContainer : Sprite = new Sprite

     private var skin : Skin
     private var video : PlayerVideo
     private var player : Player
+
+    private var lastInteractionTime : uint = 0

     public function SkinnedPlayerView
       (skin : Skin, video : PlayerVideo, player : Player)
@@ -19,16 +29,35 @@
       skin.backend = this

       addChild(video)
-      addChild(skin.frontend)
+      skinContainer.addChild(skin.frontend)
+      addChild(skinContainer)

       video.addUpdateListener(this)
+
+      addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage)
     }
+
+    private function handleAddedToStage(event : Event) : void
+    {
+      stage.addEventListener(MouseEvent.MOUSE_MOVE, handleStageMouseMove)
+      stage.addEventListener(Event.MOUSE_LEAVE, handleStageMouseLeave)
+    }
+
+    private function handleStageMouseMove(event : MouseEvent) : void
+    { lastInteractionTime = getTimer() }
+
+    private function handleStageMouseLeave(event : Event) : void
+    { lastInteractionTime = 0 }

     public function handlePlayerVideoUpdated() : void
     {
       video.visible = !player.finished
+      skinContainer.visible = !userIdle
       skin.update()
     }
+
+    private function get userIdle() : Boolean
+    { return getTimer() - lastInteractionTime > IDLE_TIME_MS }

     // -----------------------------------------------------


maps IContext (self) into Injector

maps IContext (self) into Injector

--- src/robotlegs/bender/framework/context/impl/Context.as
+++ src/robotlegs/bender/framework/context/impl/Context.as
@@ -10,6 +10,7 @@
 	import org.hamcrest.Description;
 	import org.hamcrest.Matcher;
 	import org.swiftsuspenders.Injector;
+
 	import robotlegs.bender.framework.configManager.api.IConfigManager;
 	import robotlegs.bender.framework.configManager.impl.ConfigManager;
 	import robotlegs.bender.framework.context.api.IContext;
@@ -89,6 +90,7 @@
 		public function Context(... configs)
 		{
 			_injector.map(Injector).toValue(_injector);
+			_injector.map(IContext).toValue(this);
 			_logger = _logManager.getLogger(this);
 			_managedObject = _objectManager.addObject(this);
 			_configManager = new ConfigManager(this);


implement toString

implement toString

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

--- src/as/com/threerings/util/Integer.as
+++ src/as/com/threerings/util/Integer.as
@@ -56,6 +56,12 @@
         return value;
     }

+    // cannot use the override keyword on toString() because actionscript is stupid
+    public function toString () :String
+    {
+        return value.toString();
+    }
+
     /**
      * Compares to int values in an overflow safe manner.
      */


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.advancedDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.olapDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18468
Author:   hmuller@adobe.com
Date:     2010-11-05T16:37:07.571913Z

Log Message:
-----------
Removed GridLayout "hacks" that invalidated columnHeaderGroup during GridLayout/updateDisplayList().  Grid/partAdded() now resets (all IDataGridElements) columnHeaderGroup's nestLevel to force it to layout after the grid.

QE notes: Failing tests have been excluded
Doc notes:
Bugs: SDK-27862
Reviewer: Carol, Kevin
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IDataGridElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -39,6 +39,7 @@
 import spark.components.gridClasses.GridLayout;
 import spark.components.gridClasses.GridSelection;
 import spark.components.gridClasses.GridSelectionMode;
+import spark.components.gridClasses.IDataGridElement;
 import spark.components.gridClasses.IGridItemEditor;
 import spark.components.gridClasses.IGridItemRenderer;
 import spark.components.gridClasses.IGridItemRendererOwner;
@@ -1943,6 +1944,18 @@
     /**
      *  @private
      */
+    private function initializeDataGridElement(elt:IDataGridElement):void
+    {
+        if (!elt)
+            return;
+
+        elt.dataGrid = this;
+        elt.nestLevel = grid.nestLevel + 1;
+    }
+
+    /**
+     *  @private
+     */
     override protected function partAdded(partName:String, instance:Object):void
     {
         super.partAdded(partName, instance);
@@ -1987,6 +2000,8 @@
             grid.addEventListener(GridEvent.GRID_ROLL_OUT, grid_RollOutHandler);
             grid.addEventListener(GridCaretEvent.CARET_CHANGE, grid_caretChangeHandler);
             grid.addEventListener(FlexEvent.VALUE_COMMIT, grid_valueCommitHandler);
+            grid.addEventListener("invalidateSize", grid_invalidateSizeHandler);
+            grid.addEventListener("invalidateDisplayList", grid_invalidateDisplayListHandler);

             // Deferred operations (grid selection updates)

@@ -1994,12 +2009,12 @@
                 deferredGridOperation(grid);
             deferredGridOperations.length = 0;

-            // IDataGridElements: grid, columnHeaderGroup
-
-            if (columnHeaderGroup)
-                columnHeaderGroup.dataGrid = this;
+            // IDataGridElements: columnHeaderGroup...
+
+            initializeDataGridElement(columnHeaderGroup);

             // Create the data grid editor
+
             editor = createEditor();
             editor.initialize();
         }
@@ -2038,7 +2053,7 @@
         if (instance == columnHeaderGroup)
         {
             if (grid)
-                columnHeaderGroup.dataGrid = this;
+                initializeDataGridElement(columnHeaderGroup);

             columnHeaderGroup.addEventListener(GridEvent.GRID_CLICK, columnHeaderGroup_clickHandler);
             columnHeaderGroup.addEventListener(GridEvent.SEPARATOR_ROLL_OVER, separator_rollOverHandler);
@@ -2085,12 +2100,14 @@

             // Event Handlers

+            grid.removeEventListener("invalidateSize", grid_invalidateSizeHandler);
+            grid.removeEventListener("invalidateDisplayList", grid_invalidateDisplayListHandler);
             grid.removeEventListener(GridEvent.GRID_MOUSE_DOWN, grid_MouseDownHandler);
             grid.removeEventListener(GridEvent.GRID_MOUSE_UP, grid_MouseUpHandler);
             grid.removeEventListener(GridEvent.GRID_ROLL_OVER, grid_RollOverHandler);
             grid.removeEventListener(GridEvent.GRID_ROLL_OUT, grid_RollOutHandler);
             grid.removeEventListener(GridCaretEvent.CARET_CHANGE, grid_caretChangeHandler);
-            grid.removeEventListener(FlexEvent.VALUE_COMMIT, grid_valueCommitHandler);
+            grid.removeEventListener(FlexEvent.VALUE_COMMIT, grid_valueCommitHandler);

             // Cover Properties

@@ -3865,6 +3882,26 @@
             dispatchEvent(event);
     }

+    /**
+     *  @private
+     */
+    private function grid_invalidateDisplayListHandler(event:Event):void
+    {
+        // invalidate all IDataGridElements
+        if (columnHeaderGroup)
+            columnHeaderGroup.invalidateDisplayList();
+    }
+
+    /**
+     *  @private
+     */
+    private function grid_invalidateSizeHandler(event:Event):void
+    {
+        // invalidate all IDataGridElements
+        if (columnHeaderGroup)
+            columnHeaderGroup.invalidateSize();
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Header event handlers


Transferred from the Adobe Open Source Subversion Repository

Revision: 6695
Author:   gosmith@adobe.com
Date:     2009-05-06T20:50:19.055934Z

Log Message:
-----------
Fixed code for drawing debugging backgrounds in SimpleText, RichText, and RichEditableText.

In SimpleText and RichText, it shouldn't do graphics.clear(), and should draw at (drawX, drawY), in order to work properly when TextGraphicElements are sharing a single DisplayObject.

In RichEditableText I moved the static var that controls background-drawing from the subclass of TextContainerManager that actually does the drawing to the RichEditableText class itself, to be consistent with how you set it on SimpleText and RichText.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Ryan

Modified Paths:
--------------
<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/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -269,6 +269,16 @@
      */
     mx_internal static var debug:Boolean = false;

+    /**
+     *  @private
+     *  Used for debugging.
+     *  Set this to an RGB uint to draw an opaque background
+     *  so that you can see the bounds of the component.
+     *  If it is null, the background is black pixels at 0 alpha,
+     *  to be transparent but catch mouse events.
+     */
+    mx_internal static var backgroundColor:Object = null; // 0xDDDDDD;
+
     //--------------------------------------------------------------------------
     //
     //  Class properties


Transferred from the Adobe Open Source Subversion Repository

Revision: 17555
Author:   cframpto@adobe.com
Date:     2010-09-02T14:24:14.877787Z

Log Message:
-----------
If RET text is editable and multiline=false, let TLF's EditManager handle the ENTER key so that if the ENTER is pressed in the middle of a list the proper list handling is done - add a new list item or close off the list, depending on position in the list - and if not in a list, the paragraph is split.

Also fix selectionHightlighting metadata since it was in the same patch.

QE notes:
Doc notes:
Bugs: SDK-27623, SDK-25435
Reviewer: Alex
Tests run: checkintests, cyclone
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -485,17 +485,8 @@
             GlobalSettings.enableDefaultTabStops =
                 !Configuration.playerEnablesArgoFeatures;

-            staticConfiguration =
-                Configuration(TextContainerManager.defaultConfiguration).clone();
-            staticConfiguration.manageEnterKey = false; // default is true
-            staticConfiguration.manageTabKey = false;   // default is false
-
-            // See comment on staticConfiguration variable.
-            staticConfiguration.compatibilityVersion = 1.1;
-
             staticPlainTextImporter =
-                TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT,
-                    staticConfiguration);
+                TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT);

             // Throw import errors rather than return a null textFlow.
             // Alternatively, the error strings are in the Vector, importer.errors.
@@ -517,21 +508,7 @@
          *  @private
          */
         private static var classInitialized:Boolean = false;
-
-        /**
-         *  @private
-         *  Create a single Configuration used by all Text instances.
-         *  It tells the TextContainerManager that we don't want it
-         *  to handle the ENTER key, because we need the ENTER key to behave
-         *  differently based on the 'multiline' property.
-         *  It tells the TextContainerManager that we want TLF1.1 compatibility
-         *  for the selection length.  Pre TLF2, the selection length
-         *  was textFlow.length-1 and did not include the final paragraph terminator.
-         *  For TLF2, the selection length is textFlow.length which includes
-         *  the final paragraph terminator.
-         */
-        private static var staticConfiguration:Configuration;
-
+
         /**
          *  @private
          *  This TLF object composes TextLines from a text String.
@@ -1885,6 +1862,8 @@
          *  changed.
          */
         private var selectionFormatsChanged:Boolean = false;
+
+        [Inspectable(category="General", enumeration="always,whenActive,whenFocused", defaultValue="whenFocused")]

         /**
          *  Determines when the text selection is highlighted.
@@ -2874,7 +2853,7 @@
                 else if (!_textContainerManager.isDamaged())
                     _textContainerManager.drawBackgroundAndSetScrollRect(0,0);
             }
-
+
             _textContainerManager.updateContainer();

             lastUnscaledWidth = unscaledWidth;
@@ -3512,7 +3491,7 @@
          */
         mx_internal function createTextContainerManager():RichEditableTextContainerManager
         {
-            return new RichEditableTextContainerManager(this, staticConfiguration);
+            return new RichEditableTextContainerManager(this);
         }

         /**
@@ -4203,9 +4182,8 @@
             if (editingMode != EditingMode.READ_WRITE)
                 return;

-            // We always handle the 'enter' key since we would have to recreate
-            // the container manager to change the configuration if multiline
-            // changes.
+            // Handle the ENTER key here, if multiline text is not allowed or
+            // if there isn't enough room for more characters to be added.
             if (event.keyCode == Keyboard.ENTER)
             {
                 if (!multiline)
@@ -4220,17 +4198,12 @@
                 {
                     event.preventDefault();
                     return;
-                }
-
-                var editManager:IEditManager =
-                    EditManager(_textContainerManager.beginInteraction());
-
-                if (editManager.hasSelection())
-                    editManager.splitParagraph();
-
-                _textContainerManager.endInteraction();
-
-                event.preventDefault();
+                }
+
+                // Let the TLF EditManager handle the ENTER key.  If editing
+                // a list, depending on the position, it will either add a new
+                // list item or close off the list.  Otherwise it will split
+                // the paragraph.
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 16064
Author:   chaase@adobe.com
Date:     2010-05-12T15:37:49.345162Z

Log Message:
-----------
Initial checkin of "true autoReverse" feature. This feature adds no new API, but does add new behavior to the existing autoReverse property on Transition. Now, if autoReverse="true", any transition declared from/to the opposite states of the currently-requested state change can be used as a transition for this state change, played in reverse. This essentially means that you can author a single reverse for a forward direction and have the system play that transition in reverse for the opposite direction. Previously, you needed to author both directions, and take care to make them symmetric, in order to get them to play correctly when reversing in the middle. Note that if you author a *-to-* Transition (any to any), the new reversing behavior does nothing for you, because there is no way for the system to detect the forward (and thus the reverse) direction, so that transition will always play in the declared direction.
The main functionality needed to get this working was bolstering the currentSupport for playReversedFromEnd that already existed in Effect (along with the playReversed functionality in effect instances). There was also some timing engine details in Animation to make it work correctly, especially with startDelay.
Some work was done to make Fade work correctly when playing in reverse, though there is still a problem with some of the auto-fade functionality (fading items because of visible/parent changes between states) when the Fade effect has a startDelay.

QE notes: Tested on existing effects tests to make sure new behavior didn't break anything. But need new tests specifically around this new behavior.
Doc notes: Added new docs to Transition.autoReverse to describe the new behavior
Bugs: None
Reviewer: Corey
Tests run: checkintests, Mustella spark/effects, mx/effects
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/Transition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>

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

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -547,6 +547,15 @@
         _easer = value;
     }

+    //----------------------------------
+    //  playReversed
+    //----------------------------------
+
+    /**
+     * @private
+     * Storage for the playReversed property
+     */
+    private var _playReversed:Boolean;
     /**
      *  If true, play the animation in reverse.
      *  If the animation is currently playing in the opposite
@@ -562,7 +571,7 @@
      */
     public function get playReversed():Boolean
     {
-        return _invertValues;
+        return _playReversed;
     }
     /**
      *  @private
@@ -578,6 +587,7 @@
             }
         }
         _doReverse = value;
+        _playReversed = value;
     }

     //--------------------------------------------------------------------------
@@ -651,13 +661,7 @@
                 curAnimation.id--;
             }
         }
-        // If no more animations running or pending, stop the timer
-        if (timer && activeAnimations.length == 0 && delayedStartAnims.length == 0)
-        {
-            intervalTime = NaN;
-            timer.reset();
-            timer = null;
-        }
+        stopTimerIfDone();
     }

     /**
@@ -703,7 +707,10 @@
             // Keep starting animations unless our sorted lists return
             // animations that start past the current time
             if (animStartTime < Timeline.currentTime)
-                anim.start();
+                if (anim.playReversed)
+                    anim.end();
+                else
+                    anim.start();
             else
                 break;
         }
@@ -786,8 +793,16 @@

             if (currentTime >= duration && !_doSeek)
             {
-                end();
-                animationEnded = true;
+                if (!playReversed || startDelay == 0)
+                {
+                    end();
+                    animationEnded = true;
+                }
+                else
+                {
+                    stopAnimation();
+                    addToDelayedAnimations(startDelay);
+                }
             }
             else
             {
@@ -914,6 +929,19 @@
      */
     public function end():void
     {
+        // TODO (chaase): call removal utility instead of this code
+        // Make sure to remove any references on the delayed lists
+        if (startDelay > 0 && delayedStartAnims.length > 0)
+            for (var i:int = 0; i < delayedStartAnims.length; ++i)
+            {
+                if (this == delayedStartAnims[i])
+                {
+                    delete delayedStartTimes[this];
+                    delayedStartAnims.splice(i, 1);
+                    break;
+                }
+            }
+
         // Note that we are potentially sending out this event to effects
         // whose Animation is not yet running (for example, if we're autoReversing
         // a transition and then skipping past the first effect).
@@ -921,17 +949,37 @@
         // interpolators should be written to just send back the end value
         // instead of trying to calculate it for the end time.

-        if (!started)
-            sendAnimationEvent(EffectEvent.EFFECT_START);
-        if (repeatCount > 1 && repeatBehavior == "reverse" && (repeatCount % 2 == 0))
-            _invertValues = true;
-        calculateValue(duration);
-
-        sendUpdateEvent();
+        else
+        {
+            if (!started)
+                sendAnimationEvent(EffectEvent.EFFECT_START);
+            if (repeatCount > 1 && repeatBehavior == "reverse" && (repeatCount % 2 == 0))
+                _invertValues = true;
+            calculateValue(duration);
+
+            sendUpdateEvent();
+        }
         sendAnimationEvent(EffectEvent.EFFECT_END);

         // The rest of what we need to do is handled by stopAnimation()
-        stopAnimation();
+        if (isPlaying)
+            stopAnimation();
+        else
+            stopTimerIfDone();
+    }
+
+    /**
+     * @private
+     * If no more animations running or pending, stop the timer
+     */
+    private static function stopTimerIfDone():void
+    {
+        if (timer && activeAnimations.length == 0 && delayedStartAnims.length == 0)
+        {
+            intervalTime = NaN;
+            timer.reset();
+            timer = null;
+        }
     }

     private function addToDelayedAnimations(timeToDelay:Number):void
@@ -997,6 +1045,12 @@
                 var startTime:Number = keyframes[0].time;
                 keyframes.splice(0, 0, new Keyframe(0, null));
                 keyframes.splice(1, 0, new Keyframe(startTime-1, null));
+                if (playReversed)
+                {
+                    // Want to hold *next* value when playing backwards
+                    keyframes[0].value = keyframes[2].value;
+                    keyframes[1].value = keyframes[2].value;
+                }
             }
             for (j = 1; j < keyframes.length; ++j)
             {
@@ -1010,7 +1064,7 @@
         if (_doReverse)
             _invertValues = true;

-        if (startDelay > 0)
+        if (startDelay > 0 && !playReversed)
             addToDelayedAnimations(startDelay);
         else
             start();
@@ -1045,8 +1099,9 @@
         startTime = cycleStartTime = intervalTime - playheadTime;
         _doSeek = true;

-        if (!_isPlaying)
-        {
+        if (!_isPlaying || playReversed)
+        {
+            var isPlayingTmp:Boolean = _isPlaying;
             intervalTime = Timeline.currentTime;
             if (includeStartDelay && startDelay > 0)
             {
@@ -1065,6 +1120,9 @@
                     }
                     delete delayedStartTimes[this];
                     var postDelaySeekTime:Number = playheadTime - startDelay;
+                    // also subtract out duration if playing in reverse because
+                    if (playReversed)
+                        postDelaySeekTime -= duration;
                     if (postDelaySeekTime < 0)
                     {
                         animPendingTime = intervalTime + (startDelay - playheadTime);
@@ -1090,7 +1148,8 @@
                         // reduce seek time by startTime; we will go ahead and
                         // seek into the now-playing animation by that much
                         playheadTime -= startDelay;
-                        start();
+                        if (!isPlaying)
+                            start();
                         startTime = cycleStartTime = intervalTime - playheadTime;
                         doInterval();
                         _doSeek = false;
@@ -1098,9 +1157,12 @@
                     }
                 }
             }
-            // start/end values only valid after animation starts
-            sendAnimationEvent(EffectEvent.EFFECT_START);
-            setupInterpolation();
+            if (!isPlayingTmp)
+            {
+                // start/end values only valid after animation starts
+                sendAnimationEvent(EffectEvent.EFFECT_START);
+                setupInterpolation();
+            }
             startTime = cycleStartTime = intervalTime - playheadTime;
         }
         doInterval();
@@ -1278,19 +1340,20 @@

         // TODO (chaase): call removal utility instead of this code
         // Make sure to remove any references on the delayed lists
-        for (var i:int = 0; i < delayedStartAnims.length; ++i)
-        {
-            if (this == delayedStartAnims[i])
+        if (!playReversed)
+            for (var i:int = 0; i < delayedStartAnims.length; ++i)
             {
-                var animStartTime:int = int(delayedStartTimes[this]);
-                var overrun:int = Timeline.currentTime - animStartTime;
-                if (overrun > 0)
-                    actualStartTime = Math.min(overrun, duration);
-                delete delayedStartTimes[this];
-                delayedStartAnims.splice(i, 1);
-                break;
-            }
-        }
+                if (this == delayedStartAnims[i])
+                {
+                    var animStartTime:int = int(delayedStartTimes[this]);
+                    var overrun:int = Timeline.currentTime - animStartTime;
+                    if (overrun > 0)
+                        actualStartTime = Math.min(overrun, duration);
+                    delete delayedStartTimes[this];
+                    delayedStartAnims.splice(i, 1);
+                    break;
+                }
+            }
         sendAnimationEvent(EffectEvent.EFFECT_START);

         // start/end values may be changed by Animate (set dynamically),


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarAutomationImpl.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package spark.automation.delegates.components
 {


updated

updated

git-svn-id: 27326a786375daad9d33dc990c6f272e4c8f567c@1024 fda5f131-174c-0410-8613-e0905860106b

--- org.openwms/trunk/source/org.openwms.client.flex.app/src/main/flex/org/openwms/web/flex/client/view/AppBase.as
+++ org.openwms/trunk/source/org.openwms.client.flex.app/src/main/flex/org/openwms/web/flex/client/view/AppBase.as
@@ -52,6 +52,13 @@
     import org.openwms.web.flex.client.util.DisplayUtility;
     import org.openwms.web.flex.client.view.dialogs.LoginView;

+    /**
+     * An AppBase class is the main Flex Application of the CORE framework. It
+     * cares about all the essential stuff like security and Tide framework initialization
+     * and instantiates the main menu bar and the viw stack.
+     *
+     * @version $Revision$
+     */
     public class AppBase extends Application {

         [In]
@@ -93,13 +100,13 @@
         /**
          * Suppress warnings and add a constructor.
          */
-        public function AppBase() {
-        }
+        public function AppBase() { }

         /**
          * Called in pre-initialize phase of the application.
+         * Put your code here, to initialize 3rd party frameworks.
          *
-         * Put your code here, to initialize 3rd party frameworks.
+         * @param event
          */
         public function preInit(event : Event) : void {
             Spring.getInstance().initApplication();
@@ -108,7 +115,6 @@

         /**
          * Called in initialize phase of the application.
-         *
          * Put your code here, to initialize application specific structures.
          */
         public function init() : void {


get rid of dependencies on air in flex unit tests


fixed map sensor bug

fixed map sensor bug

--- flexEditor/src/org/arisgames/editor/components/NavigationMap.as
+++ flexEditor/src/org/arisgames/editor/components/NavigationMap.as
@@ -41,6 +41,7 @@
     {
         super();
         this.key = AppConstants.APPLICATION_ENVIRONMENT_GOOGLEMAP_KEY;
+		this.sensor = "false";
         addEventListener(MapEvent.MAP_PREINITIALIZE, onMapPreinitialize);
         addEventListener(MapEvent.MAP_READY, onMapReady);
 //        addEventListener(MapMouseEvent.DOUBLE_CLICK, processMapDoubleClick);


Transferred from the Adobe Open Source Subversion Repository

Revision: 9206
Author:   dloverin@adobe.com
Date:     2009-08-10T18:39:33.826984Z

Log Message:
-----------
Merge 3.4 changes 9109, 8949.

Also fixed a bug in the generated code for IFlexModuleFactory.allowInsecureDomain() and cleanup up SystemManager by removing unused variables rslSizes and lastSystemManager.

QE notes: None.
Doc notes: None.
Bugs: SDK-16050, SDK-22556
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<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/core/IFlexModuleFactory.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/modules/compiler/src/java/flex2/tools/CompcPreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>

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

--- frameworks/projects/framework/src/mx/core/IFlexModuleFactory.as
+++ frameworks/projects/framework/src/mx/core/IFlexModuleFactory.as
@@ -30,12 +30,43 @@
  */
 public interface IFlexModuleFactory
 {
+    import flash.utils.Dictionary;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The RSLs loaded by this IFlexModuleFactory before the application
+     *  starts. RSLs loaded by the application are not included in this list.
+     *
+     *  Information about preloadedRSLs is stored in a Dictionary. The key is
+     *  the RSL's LoaderInfo. The value is the url the RSL was loaded from.
+     */
+    function  get preloadedRSLs():Dictionary;
+
     //--------------------------------------------------------------------------
     //
     //  Methods
     //
     //--------------------------------------------------------------------------

+    /**
+     *  Calls Security.allowDomain() for the SWF associated with this IFlexModuleFactory
+     *  plus all the SWFs assocatiated with RSLs preloaded by this IFlexModuleFactory.
+     *
+     */
+    function allowDomain(... domains):void;
+
+    /**
+     *  Calls Security.allowInsecureDomain() for the SWF associated with this IFlexModuleFactory
+     *  plus all the SWFs assocatiated with RSLs preLoaded by this IFlexModuleFactory.
+     *
+     */
+    function allowInsecureDomain(... domains):void;
+
     /**
      *  A factory method that requests
      *  an instance of a definition known to the module.