Added errors for play/pause etc

Added errors for play/pause etc

--- src/com/axis/httpclient/HTTPClient.as
+++ src/com/axis/httpclient/HTTPClient.as
@@ -1,5 +1,6 @@
 package com.axis.httpclient {
   import com.axis.ClientEvent;
+  import com.axis.ErrorManager;
   import com.axis.IClient;
   import com.axis.Logger;

@@ -16,6 +17,7 @@
     private var nc:NetConnection;
     private var ns:NetStream;
     public var ended:Boolean = false;
+    private var currentState:String = "stopped";

     public function HTTPClient(video:Video, urlParsed:Object) {
       this.urlParsed = urlParsed;
@@ -42,15 +44,25 @@
     public function stop():Boolean {
       ns.dispose();
       nc.close();
+      this.currentState = "stopped";
       return true;
     }

     public function pause():Boolean {
+      if (this.currentState !== 'playing') {
+        ErrorManager.dispatchError(800);
+        return false;
+      }
       ns.pause();
+      this.currentState = "paused";
       return true;
     }

     public function resume():Boolean {
+      if (this.currentState !== 'paused') {
+        ErrorManager.dispatchError(801);
+        return false;
+      }
       ns.resume();
       return true;
     }
@@ -64,12 +76,14 @@
     private function onConnectionStatus(event:NetStatusEvent):void {
       if ('NetConnection.Connect.Closed' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.STOPPED));
+        this.currentState = "stopped";
       }
     }

     private function onNetStatus(event:NetStatusEvent):void {
       if ('NetStream.Play.Start' === event.info.code || 'NetStream.Unpause.Notify' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.START_PLAY));
+        this.currentState = "playing";
         return;
       }

@@ -80,11 +94,13 @@

       if (!ended && 'NetStream.Buffer.Empty' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.PAUSED, { 'reason': 'buffering' }));
+        this.currentState = "paused";
         return;
       }

       if ('NetStream.Pause.Notify' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.PAUSED, { 'reason': 'user' }));
+        this.currentState = "paused";
         return;
       }
     }


Generating chained-locator expressions.

Generating chained-locator expressions.

--- flash/org/windmill/WMExplorer.as
+++ flash/org/windmill/WMExplorer.as
@@ -62,10 +62,11 @@
       spr.graphics.drawRect(0, 0, targ.width, targ.height);
     }

+    // Generates a chained-locator expression for the clicked-on item
     public static function select(e:MouseEvent):void {
       var item:* = e.target;
-      WMLogger.log(item.toString());
       var expr:String = '';
+      // Look for these items, in this priority
       var locatorPriority:Array = [
         'automationId',
         'id',
@@ -76,7 +77,7 @@
         for each (var lookup:String in locatorPriority) {
           // If we find one of the lookuup keys, prepend
           // on the locator expression
-          if (lookup in item) {
+          if (lookup in item && item[lookup]) {
             expr = lookup + ':' + item[lookup] + '/' + expr;
             break;
           }
@@ -86,10 +87,13 @@
       if (expr.length) {
         // Strip off trailing slash
         expr = expr.replace(/\/$/, '');
-        WMLogger.log(expr);
+        var res:* = ExternalInterface.call('wm_explorerSelect', expr);
+        if (!res) {
+          WMLogger.log(expr + ' (Windmill Flash bridge not found.)');
+        }
       }
       else {
-        WMLogger.log('Nothing found.');
+        throw new Error('Could not find any usable attributes for locator.');
       }
     }


fix typo

fix typo

--- src/aerys/minko/type/math/Vector4.as
+++ src/aerys/minko/type/math/Vector4.as
@@ -204,7 +204,7 @@
 		{
             var sourceVector : Vector3D = source._vector;

-			return set(sourceVector.x, sourceVector.y, sourceVector.z, sourceVector..w);
+			return set(sourceVector.x, sourceVector.y, sourceVector.z, sourceVector.w);
 		}

 		public function incrementBy(vector : Vector4) : Vector4


Removed dead import.

Removed dead import.

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

--- src/as/com/threerings/io/Streamer.as
+++ src/as/com/threerings/io/Streamer.as
@@ -12,7 +12,6 @@
 import com.threerings.io.streamers.IntegerStreamer;
 import com.threerings.io.streamers.LongStreamer;
 import com.threerings.io.streamers.NumberStreamer;
-import com.threerings.io.streamers.ObjectArrayStreamer;
 import com.threerings.io.streamers.ShortStreamer;
 import com.threerings.io.streamers.StringStreamer;


- bugfix: BitmapElement tried to set values on the displayed Bitmap without checking if said Bitmap has already been initialized.

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@768 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/controls/BitmapElement.as
+++ src/reprise/controls/BitmapElement.as
@@ -81,6 +81,10 @@

 		override protected function applyInFlowChildPositions() : void
 		{
+			if (!m_image)
+			{
+				return;
+			}
 			if (!m_imageDisplayed)
 			{
 				m_imageDisplayed = true;


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

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/TextStyles.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/TextStyles.as
@@ -0,0 +1,274 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Color of text in the component, including the component label.
+ *
+ *  @default 0x0B333C
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="color", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Color of text in the component if it is disabled.
+ *
+ *  @default 0xAAB3B3
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="disabledColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Sets the antiAliasType property of internal TextFields. The possible values are
+ *  "normal" (flash.text.AntiAliasType.NORMAL)
+ *  and "advanced" (flash.text.AntiAliasType.ADVANCED).
+ *
+ *
The default value is "advanced", which enables
+ *  advanced anti-aliasing if you are using an
+ *  embedded advanced anti-aliasing font.
+ *  Set to "normal" to disable advanced anti-aliasing.

+ *
+ *
This style has no effect for system fonts.

+ *
+ *
This style applies to all the text in a TextField subcontrol;
+ *  you can't apply it to some characters and not others.

+
+ *  @default "advanced"
+ *
+ *  @see flash.text.TextField
+ *  @see flash.text.AntiAliasType
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontAntiAliasType", type="String", enumeration="normal,advanced", inherit="yes")]
+
+/**
+ *  Name of the font to use.
+ *  Unlike in a full CSS implementation,
+ *  comma-separated lists are not supported.
+ *  You can use any font family name.
+ *  If you specify a generic font name,
+ *  it is converted to an appropriate device font.
+ *
+ *  @default "Verdana"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontFamily", type="String", inherit="yes")]
+
+/**
+ *  Sets the gridFitType property of internal TextFields that represent text in Flex controls.
+ *  The possible values are "none" (flash.text.GridFitType.NONE),
+ *  "pixel" (flash.text.GridFitType.PIXEL),
+ *  and "subpixel" (flash.text.GridFitType.SUBPIXEL).
+ *
+ *
This property only applies when you are using an embedded advanced anti-aliasing font
+ *  and the fontAntiAliasType property
+ *  is set to "advanced".

+ *
+ *
This style has no effect for system fonts.

+ *
+ *
This style applies to all the text in a TextField subcontrol;
+ *  you can't apply it to some characters and not others.

+ *
+ *  @default "pixel"
+ *
+ *  @see flash.text.TextField
+ *  @see flash.text.GridFitType
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontGridFitType", type="String", enumeration="none,pixel,subpixel", inherit="yes")]
+
+/**
+ *  Sets the sharpness property of internal TextFields that represent text in Flex controls.
+ *  This property specifies the sharpness of the glyph edges. The possible values are Numbers
+ *  from -400 through 400.
+ *
+ *
This property only applies when you are using an embedded advanced anti-aliasing font
+ *  and the fontAntiAliasType property
+ *  is set to "advanced".

+ *
+ *
This style has no effect for system fonts.

+ *
+ *
This style applies to all the text in a TextField subcontrol;
+ *  you can't apply it to some characters and not others.

+ *
+ *  @default 0
+ *
+ *  @see flash.text.TextField
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontSharpness", type="Number", inherit="yes")]
+
+/**
+ *  Height of the text, in pixels.
+ *
+ *  The default value is 10 for all controls except the ColorPicker control.
+ *  For the ColorPicker control, the default value is 11.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontSize", type="Number", format="Length", inherit="yes")]
+
+/**
+ *  Determines whether the text is italic font.
+ *  Recognized values are "normal" and "italic".
+ *
+ *  @default "normal"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontStyle", type="String", enumeration="normal,italic", inherit="yes")]
+
+/**
+ *  Sets the thickness property of internal TextFields that represent text in Flex controls.
+ *  This property specifies the thickness of the glyph edges.
+ *  The possible values are Numbers from -200 to 200.
+ *
+ *
This property only applies when you are using an embedded advanced anti-aliasing font
+ *  and the fontAntiAliasType property
+ *  is set to "advanced".

+ *
+ *
This style has no effect on system fonts.

+ *
+ *
This style applies to all the text in a TextField subcontrol;
+ *  you can't apply it to some characters and not others.

+ *
+ *  @default 0
+ *
+ *  @see flash.text.TextField
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontThickness", type="Number", inherit="yes")]
+
+/**
+ *  Determines whether the text is boldface.
+ *  Recognized values are "normal" and "bold".
+ *  For Button controls, the default is "bold".
+ *
+ *  @default "normal"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="fontWeight", type="String", enumeration="normal,bold", inherit="yes")]
+
+/**
+ *  A Boolean value that indicates whether kerning
+ *  is enabled (true) or disabled (false).
+ *  Kerning adjusts the gap between certain character pairs
+ *  to improve readability, and should be used only when necessary,
+ *  such as with headings in large fonts.
+ *  Kerning is supported for embedded advanced anti-aliasing fonts only.
+ *  Certain fonts, such as Verdana, and monospaced fonts,
+ *  such as Courier New, do not support kerning.
+ *
+ *  @default false
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="kerning", type="Boolean", inherit="yes")]
+
+/**
+ *  The number of additional pixels to appear between each character.
+ *  A positive value increases the character spacing beyond the normal spacing,
+ *  while a negative value decreases it.
+ *
+ *  @default 0
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="letterSpacing", type="Number", inherit="yes")]
+
+/**
+ *  Alignment of text within a container.
+ *  Possible values are "left", "right",
+ *  or "center".
+ *
+ *
The default value for most controls is left.
+ *  For the Button, LinkButton, and AccordionHeader components,
+ *  the default value is "center".
+ *  For these components, this property is only recognized when the
+ *  labelPlacement property is set to "left" or
+ *  "right".
+ *  If labelPlacement is set to "top" or
+ *  "bottom", the text and any icon are centered.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="textAlign", type="String", enumeration="left,center,right", inherit="yes")]
+
+/**
+ *  Determines whether the text is underlined.
+ *  Possible values are "none" and "underline".
+ *
+ *  @default "none"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="textDecoration", type="String", enumeration="none,underline", inherit="yes")]
+
+/**
+ *  Offset of first line of text from the left side of the container, in pixels.
+ *
+ *  @default 0
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="textIndent", type="Number", format="Length", inherit="yes")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 10606
Author:   egeorgie@adobe.com
Date:     2009-09-25T23:01:50.455888Z

Log Message:
-----------
White space cleanup.

Doc notes: None
Bugs: None
Reviewer: Evtim
Tests run: build
Is noteworthy for integration: Nope

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/Block.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/DescribeTypeCache.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/sparkTest/src/testWheel.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -629,7 +629,7 @@
     public function addAllAt(addList:IList, index:int):void
     {
         var length:int = addList.length;
-        for(var i:int=0; i < length; i++)
+        for (var i:int=0; i < length; i++)
         {
             this.addItemAt(addList.getItemAt(i), i+index);
         }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


fixed FirstPersonCamera.strafe() and FirstPersonCamera.walk()

--- src/aerys/minko/scene/node/camera/FirstPersonCamera.as
+++ src/aerys/minko/scene/node/camera/FirstPersonCamera.as
@@ -71,9 +71,9 @@
 		{
 			if (_ghostMode)
 			{
-				position.x += Math.sin(_rotation.y) * Math.cos(-_rotation.x) * distance;
-				position.y += Math.cos(_rotation.x) * distance;
-				position.z += Math.cos(_rotation.y) * Math.cos(-_rotation.x) * distance;
+				position.x += Math.cos(_rotation.y) * Math.cos(-_rotation.x) * distance;
+				position.y += Math.sin(_rotation.x) * distance;
+				position.z += Math.sin(_rotation.y) * Math.cos(-_rotation.x) * distance;
 			}
 			else
 			{
@@ -84,8 +84,8 @@

 		public function strafe(distance : Number) : void
 		{
-			position.x += Math.cos(_rotation.y + Math.PI / 2) * distance;
-			position.z += Math.sin(_rotation.y + Math.PI / 2) * distance;
+			position.x += Math.cos(_rotation.y + Math.PI / 2) * -distance;
+			position.z += Math.sin(_rotation.y + Math.PI / 2) * -distance;
 		}
 	}
 }


TSDemuxer: don't push video tags if keyframe not found yet this should reduce the nb of video artifacts on level switch with streams with fragments not starting with keyframes related to https://github.com/mangui/flashls/issues/347

--- src/org/mangui/hls/demux/TSDemuxer.as
+++ src/org/mangui/hls/demux/TSDemuxer.as
@@ -102,6 +102,7 @@

         /** Transmux the M2TS file into an FLV file. **/
         public function TSDemuxer(callback_audioselect : Function, callback_progress : Function, callback_complete : Function, callback_videometadata : Function, audioOnly : Boolean) {
+            _avcc = null;
             _curAudioPES = null;
             _curVideoPES = null;
             _curId3PES = null;
@@ -131,7 +132,6 @@
                 _readPosition = 0;
                 _totalBytes = 0;
                 _dataOffset = 0;
-                _avcc = null;
                 _timer.addEventListener(TimerEvent.TIMER, _parseTimer);
             }
             _dataVector.push(data);
@@ -461,7 +461,15 @@
                             /* push current data into video tag, if any */
                             _curVideoTag.push(_curNalUnit, 0, _curNalUnit.length);
                         }
-                        _tags.push(_curVideoTag);
+                        // only push current tag if AVC HEADER has been pushed already
+                        if(_avcc) {
+                            _tags.push(_curVideoTag);
+                        }
+                        CONFIG::LOGGING {
+                            if(!_avcc) {
+                                Log.warn("TS: discarding video tag, as AVC HEADER not found yet, fragment not starting with I-Frame ?");
+                            }
+                        }
                     }
                     _curNalUnit = new ByteArray();
                     _curVideoTag = new FLVTag(FLVTag.AVC_NALU, pes.pts, pes.dts, false);


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

--- frameworks/projects/mx/src/mx/controls/HSlider.as
+++ frameworks/projects/mx/src/mx/controls/HSlider.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-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: 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@1269221 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/core/Application.as
+++ frameworks/projects/mx/src/mx/core/Application.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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
 {


show the standard hand cursor when hovering over any CommandButton

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

--- src/as/com/threerings/flex/CommandButton.as
+++ src/as/com/threerings/flex/CommandButton.as
@@ -39,6 +39,7 @@
     public function CommandButton (cmd :String = null, arg :Object = null)
     {
         setCommand(cmd, arg);
+        buttonMode = true;
     }

     /**


Removed initial render() call in constructor

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

--- flare.vis/flare/vis/data/DataSprite.as
+++ flare.vis/flare/vis/data/DataSprite.as
@@ -220,7 +220,6 @@
 		public function DataSprite() {
 			super();
 			_prop.self = this;
-			render();
 		}

 		/** @inheritDoc */


Transferred from the Adobe Open Source Subversion Repository

Revision: 19234
Author:   jasonsj@adobe.com
Date:     2010-12-09T19:58:57.680529Z

Log Message:
-----------
Added ASDoc to indicate incompatibility of StyleableTextField with effects

QE notes:
Doc notes:
Bugs:
SDK-28359 StyleableTextField RTEs when used with spark transform effects
Reviewer: none
Tests run: none
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -154,6 +154,10 @@

     public var actionGroup:Group;

+    /**
+     *  Wraps a StyleableTextField in a UIComponent to be compatible with
+     *  ViewTransition effects.
+     */
     public var titleDisplay:TitleDisplayComponent;

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


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

--- frameworks/projects/mx/src/mx/effects/effectClasses/WipeDownInstance.as
+++ frameworks/projects/mx/src/mx/effects/effectClasses/WipeDownInstance.as
@@ -21,6 +21,11 @@
  *  you do not create one yourself.
  *
  *  @see mx.effects.WipeDown
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class WipeDownInstance extends MaskEffectInstance
 {
@@ -36,6 +41,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function WipeDownInstance(target:Object)
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 20208
Author:   smgilson@adobe.com
Date:     2011-02-08T21:40:02.122057Z

Log Message:
-----------
Several ASDoc bug fixes

QE notes:
Doc notes:
Bugs: FLEXDOCS-1342, FLEXDOCS-1330, FLEXDOCS-1323
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/ScrollerExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/skins/spark/windowChrome/MacTitleBarSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeferredInstanceFromClass.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeferredInstanceFromFunction.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as
+++ frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as
@@ -53,7 +53,7 @@
         /**
          *  Constructor.
          *
-         *  @langversion 4.0
+         *  @langversion 3.0
          *  @playerversion Flash 10
          *  @playerversion AIR 1.1
          *  @productversion Flex 4


Guard treemap size calculations from incorrect negative values.

The treemap size property must be a positive value including zero. Any
negative values are mapped to zero when calculating a values AREA.

--- flare/src/flare/vis/operator/layout/TreeMapLayout.as
+++ flare/src/flare/vis/operator/layout/TreeMapLayout.as
@@ -94,6 +94,9 @@
 	        root.visitTreeDepthFirst(function(n:NodeSprite):void {
 	        	if (n.childDegree == 0) {
 	        		var sz:Number = _size.getValue(_t.$(n));
+              // Guard against possible negative values for area calculations.
+              if (sz < 0)
+                sz = 0;
 	        		n.props[AREA] = sz;
 	        		var p:NodeSprite = n.parentNode;
 	        		for (; p != null; p=p.parentNode)


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

--- frameworks/projects/rpc/src/mx/messaging/Producer.as
+++ frameworks/projects/rpc/src/mx/messaging/Producer.as
@@ -0,0 +1,154 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.messaging
+{
+
+import flash.errors.IllegalOperationError;
+import flash.events.TimerEvent;
+import flash.utils.Timer;
+import mx.core.mx_internal;
+import mx.logging.Log;
+import mx.events.PropertyChangeEvent;
+import mx.messaging.errors.InvalidDestinationError;
+import mx.messaging.errors.MessagingError;
+import mx.messaging.events.ChannelEvent;
+import mx.messaging.events.ChannelFaultEvent;
+import mx.messaging.events.MessageEvent;
+import mx.messaging.events.MessageFaultEvent;
+import mx.messaging.messages.AbstractMessage;
+import mx.messaging.messages.AcknowledgeMessage;
+import mx.messaging.messages.AsyncMessage;
+import mx.messaging.messages.CommandMessage;
+import mx.messaging.messages.ErrorMessage;
+import mx.messaging.messages.IMessage;
+
+use namespace mx_internal;
+
+/**
+ *  A Producer sends messages to a destination.
+ *  Producers dispatch a MessageAckEvent or MessageFaultEvent
+ *  for each message they send depending upon whether the outbound message
+ *  was sent and processed successfully or not.
+ *  @mxml
+ *

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

+ *

+ *   <mx:Producer
+ *    Properties
+ *    defaultHeaders="No default."
+ *  />
+ *

+ */
+public class Producer extends AbstractProducer
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructs a Producer.
+     *
+     *  @example
+     *

+     *   function sendMessage():void
+     *   {
+     *       var producer:Producer = new Producer();
+     *       producer.destination = "NASDAQ";
+     *       var msg:AsyncMessage = new AsyncMessage();
+     *       msg.headers.operation = "UPDATE";
+     *       msg.body = {"SYMBOL":50.00};
+     *       producer.send(msg);
+     *   }
+     *

+     */
+	public function Producer()
+	{
+		super();
+	    _log = Log.getLogger("mx.messaging.Producer");
+		_agentType = "producer";
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  subtopic
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _subtopic:String = "";
+
+    [Bindable(event="propertyChange")]
+
+    /**
+     *  Provides access to the subtopic for the remote destination that the MessageAgent uses.
+     */
+    public function get subtopic():String
+    {
+        return _subtopic;
+    }
+
+    /**
+     *  @private
+     */
+    public function set subtopic(value:String):void
+    {
+        if (_subtopic != value)
+        {
+            var event:PropertyChangeEvent;
+            if (value == null)
+                value = "";
+
+            event = PropertyChangeEvent.createUpdateEvent(this, "subtopic", _subtopic, value);
+            _subtopic = value;
+
+            dispatchEvent(event);
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Protected Methods
+    //
+    //--------------------------------------------------------------------------
+
+    override protected function internalSend(message:IMessage, waitForClientId:Boolean = true):void
+    {
+        if (subtopic.length > 0)
+            message.headers[AsyncMessage.SUBTOPIC_HEADER] = subtopic;
+
+        super.internalSend(message, waitForClientId);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Private Methods
+    //
+    //--------------------------------------------------------------------------
+
+}
+
+}


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

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

 package mx.messaging
 {


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

--- frameworks/projects/rpc/src/mx/rpc/soap/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/Operation.as
@@ -0,0 +1,1001 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.rpc.soap
+{
+
+import flash.events.Event;
+import flash.xml.XMLNode;
+
+import mx.core.mx_internal;
+import mx.logging.Log;
+import mx.logging.ILogger;
+import mx.messaging.ChannelSet;
+import mx.messaging.events.MessageEvent;
+import mx.messaging.messages.IMessage;
+import mx.messaging.messages.SOAPMessage;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+import mx.rpc.AbstractOperation;
+import mx.rpc.AbstractService;
+import mx.rpc.AsyncToken;
+import mx.rpc.Fault;
+import mx.rpc.events.FaultEvent;
+import mx.rpc.events.HeaderEvent;
+import mx.rpc.events.ResultEvent;
+import mx.rpc.soap.AbstractWebService;
+import mx.rpc.wsdl.WSDLOperation;
+import mx.rpc.xml.SchemaConstants;
+import mx.utils.ObjectProxy;
+import mx.utils.XMLUtil;
+
+use namespace mx_internal;
+
+/**
+ * Dispatched when an Operation invocation returns with SOAP headers in the
+ * response. A HeaderEvent is dispatched for each SOAP header.
+ * @eventType mx.rpc.events.HeaderEvent.HEADER
+ */
+[Event(name="header", type="mx.rpc.events.HeaderEvent")]
+
+[ResourceBundle("rpc")]
+
+/**
+ * An Operation used specifically by WebServices. An Operation is an individual
+ * method on a service. An Operation can be called either by invoking the
+ * function of the same name on the service or by accessing the Operation as a
+ * property on the service and calling the send() method.
+ */
+public class Operation extends AbstractOperation
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates a new Operation. This is usually done directly by the MXML
+     * compiler or automatically by the WebService when an unknown operation
+     * has been accessed. It is not recommended that a developer use this
+     * constructor directly.
+     */
+    public function Operation(webService:AbstractService = null, name:String = null)
+    {
+        super(webService, name);
+
+        _resultFormat = "object";
+        _headerFormat = "e4x";
+        _headers = [];
+        log = Log.getLogger("mx.rpc.soap.Operation");
+
+        if (webService)
+        {
+            this.webService = AbstractWebService(webService);
+            log.info("Creating SOAP Operation for {0}", name);
+        }
+
+        // No explicit timeout value by default.  The user can set this, and
+        // thus engage a timer for this # of milliseconds on each call. If the
+        // timer fires before the call returns, a fault will be generated.
+        timeout = -1;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  decoder
+    //----------------------------------
+
+    /**
+     * The ISOAPDecoder implementation used by this Operation to decode a SOAP
+     * encoded response into ActionScript.
+     *
+     * @private
+     */
+    public function get decoder():ISOAPDecoder
+    {
+        if (_decoder == null)
+        {
+            _decoder = new SOAPDecoder();
+            _decoder.makeObjectsBindable = makeObjectsBindable;
+            _decoder.ignoreWhitespace = ignoreWhitespace;
+        }
+
+        if (_decoder.wsdlOperation == null)
+            _decoder.wsdlOperation = wsdlOperation;
+
+        return _decoder;
+    }
+
+    /**
+     * @private
+     */
+    public function set decoder(value:ISOAPDecoder):void
+    {
+        _decoder = value;
+    }
+
+
+    //----------------------------------
+    //  encoder
+    //----------------------------------
+
+    /**
+     * The ISOAPEncoder implementation used by this Operation to encode
+     * ActionScript input arguments as a SOAP encoded request.
+     *
+     * @private
+     */
+    public function get encoder():ISOAPEncoder
+    {
+        if (_encoder == null)
+        {
+            _encoder = new SOAPEncoder();
+            _encoder.ignoreWhitespace = ignoreWhitespace;
+        }
+
+        if (_encoder.wsdlOperation == null)
+            _encoder.wsdlOperation = wsdlOperation;
+
+        // Tell the encoder to use the xmlSpecialCharsFilter function specified
+        // on the Operation (or Service). If null, encoder will default to its
+        // own implementation.
+        _encoder.xmlSpecialCharsFilter = xmlSpecialCharsFilter;
+
+        return _encoder;
+    }
+
+    /**
+     * @private
+     */
+    public function set encoder(value:ISOAPEncoder):void
+    {
+        _encoder = value;
+    }
+
+
+    //----------------------------------
+    //  endpointURI
+    //----------------------------------
+
+    /**
+     * The location of the WebService for this Operation. Normally, the WSDL
+     * specifies the location of the services, but you can set this property to
+     * override that location for the individual Operation.
+     */
+    public function get endpointURI():String
+    {
+        return _endpointURI ? _endpointURI : webService.endpointURI;
+    }
+
+    public function set endpointURI(uri:String):void
+    {
+        _endpointURI = uri;
+    }
+
+    //----------------------------------
+    //  forcePartArrays
+    //----------------------------------
+
+    [Inspectable(defaultValue="false", category="General")]
+    /**
+     * Determines whether or not a single or empty return value for an output
+     * message part that is defined as an array should be returned as an array
+     * containing one (or zero, respectively) elements. This is applicable for
+     * document/literal "wrapped" web services, where one or more of the elements
+     * that represent individual message parts in the "wrapper" sequence could
+     * have the maxOccurs attribute set with a value greater than 1. This is a
+     * hint that the corresponding part should be treated as an array even if
+     * the response contains zero or one values for that part. Setting
+     * forcePartArrays to true will always create an array for parts defined in
+     * this manner, regardless of the number of values returned. Leaving
+     * forcePartArrays as false will only create arrays if two or more elements
+     * are returned.
+     */
+    public function get forcePartArrays():Boolean
+    {
+        return _forcePartArrays;
+    }
+
+    public function set forcePartArrays(value:Boolean):void
+    {
+        _forcePartArrays = value;
+    }
+
+    //----------------------------------
+    //  headerFormat
+    //----------------------------------
+
+    [Inspectable(enumeration="object,e4x,xml,E4X,XML", defaultValue="e4x", category="General")]
+    /**
+     * Determines how the SOAP encoded headers are decoded. A value of
+     * object specifies that each header XML node will be decoded
+     * into a SOAPHeader object, and its content property will be
+     * an object structure as specified in the WSDL document. A value of
+     * xml specifies that the XML will be left as XMLNodes. A
+     * value of e4x specifies that the XML will be accessible
+     * using ECMAScript for XML (E4X) expressions.
+     */
+    public function get headerFormat():String
+    {
+        if (_headerFormat == null)
+            _headerFormat = "e4x";
+
+        return _headerFormat;
+    }
+
+    public function set headerFormat(hf:String):void
+    {
+        if (hf != null)
+            hf = hf.toLowerCase();
+
+        _headerFormat = hf;
+    }
+
+    //----------------------------------
+    //  headers
+    //----------------------------------
+
+    /**
+     * Accessor to an Array of SOAPHeaders that are to be sent on
+     * each invocation of the operation.
+     */
+    public function get headers():Array
+    {
+        return _headers;
+    }
+
+
+    //----------------------------------
+    //  httpHeaders
+    //----------------------------------
+
+    private var _httpHeaders:Object;
+
+    [Inspectable(defaultValue="undefined", category="General")]
+    /**
+     * Custom HTTP headers to be sent to the SOAP endpoint. If multiple
+     * headers need to be sent with the same name the value should be specified
+     * as an Array.
+     */
+    public function get httpHeaders():Object
+    {
+        if (_httpHeaders != null)
+            return _httpHeaders;
+
+        return AbstractWebService(service).httpHeaders;
+    }
+
+    public function set httpHeaders(value:Object):void
+    {
+        _httpHeaders = value;
+    }
+
+
+    //----------------------------------
+    //  ignoreWhitespace
+    //----------------------------------
+
+    [Inspectable(defaultValue="true", category="General")]
+    /**
+     * Determines whether whitespace is ignored when processing XML for a SOAP
+     * encoded request or response. The default is true
+     * and thus whitespace is not preserved. If an XML Schema type definition
+     * specifies a whiteSpace restriction set to
+     * preserve then ignoreWhitespace must first be set to false.
+     * Conversely, if a type whiteSpace restriction is set to
+     * replace or collapse then that setting will
+     * be honored even if ignoreWhitespace is set to false.
+     */
+    public function get ignoreWhitespace():Boolean
+    {
+        return _ignoreWhitespace;
+    }
+
+    public function set ignoreWhitespace(value:Boolean):void
+    {
+        _ignoreWhitespace = value;
+
+        if (_decoder != null)
+            _decoder.ignoreWhitespace = _ignoreWhitespace;
+
+        if (_encoder != null)
+            _encoder.ignoreWhitespace = _ignoreWhitespace;
+    }
+
+
+    //----------------------------------
+    //  makeObjectsBindable
+    //----------------------------------
+
+    [Inspectable(defaultValue="true", category="General")]
+    /**
+     * When this value is true, anonymous objects returned are forced to
+     * bindable objects.
+     */
+    override public function get makeObjectsBindable():Boolean
+    {
+        if (_makeObjectsBindableSet)
+        {
+            return _makeObjectsBindable;
+        }
+        return AbstractWebService(service).makeObjectsBindable;
+    }
+
+    override public function set makeObjectsBindable(value:Boolean):void
+    {
+        _makeObjectsBindable = value;
+        _makeObjectsBindableSet = true;
+
+        if (_decoder != null)
+            _decoder.makeObjectsBindable = value;
+    }
+
+
+    //----------------------------------
+    //  multiplePartsFormat
+    //----------------------------------
+
+    [Inspectable(enumeration="object,array", defaultValue="object", category="General")]
+    /**
+     * Determines the type of the default result object for calls to web services
+     * that define multiple parts in the output message. A value of "object"
+     * specifies that the lastResult object will be an Object with named properties
+     * corresponding to the individual output parts. A value of "array" would
+     * make the lastResult an array, where part values are pushed in the order
+     * they occur in the body of the SOAP message. The default value for document-
+     * literal operations is "object". The default for rpc operations is "array".
+     * The multiplePartsFormat property is applicable only when
+     * resultFormat is "object" and ignored otherwise.
+     */
+    public function get multiplePartsFormat():String
+    {
+        if (_multiplePartsFormat == null)
+        {
+            // To keep Flex 2.0.1 HF 2+ behavior, we need to determine the
+            // default value based on the style of the operation.
+            if (_wsdlOperation != null && _wsdlOperation.style == "rpc")
+                _multiplePartsFormat = "array";
+            else
+                _multiplePartsFormat = "object";
+        }
+
+        return _multiplePartsFormat;
+    }
+
+    public function set multiplePartsFormat(value:String):void
+    {
+        if (value != null)
+            value = value.toLowerCase();
+
+        _multiplePartsFormat = value;
+    }
+
+    //----------------------------------
+    //  request
+    //----------------------------------
+
+    /**
+     * The request of the Operation is an object structure or an XML structure.
+     * If you specify XML, the XML is sent as is. If you pass an object, it is
+     * encoded into a SOAP XML structure.
+     */
+    public function get request():Object
+    {
+        return this.arguments;
+    }
+
+    public function set request(r:Object):void
+    {
+        this.arguments = r;
+    }
+
+
+    //----------------------------------
+    //  resultFormat
+    //----------------------------------
+
+    [Inspectable(enumeration="object,e4x,xml,E4X,XML", defaultValue="object", category="General")]
+    /**
+     * Determines how the Operation result is decoded. A value of
+     * object specifies that the XML will be decoded into an
+     * object structure as specified in the WSDL document. A value of
+     * xml specifies that the XML will be left as XMLNodes. A
+     * value of e4x specifies that the XML will be accessible
+     * using ECMAScript for XML (E4X) expressions.
+     */
+    public function get resultFormat():String
+    {
+        if (_resultFormat == null)
+            _resultFormat = "object";
+
+        return _resultFormat;
+    }
+
+    public function set resultFormat(rf:String):void
+    {
+        if (rf != null)
+            rf = rf.toLowerCase();
+
+        _resultFormat = rf;
+    }
+
+
+    //----------------------------------
+    //  resultHeaders
+    //----------------------------------
+
+    [Bindable("resultForBinding")]
+    /**
+     * The headers that were returned as part of the last execution of this
+     * operation. They match up with the lastResult property and
+     * are the same as the collection of headers that are dispatched
+     * individually as HeaderEvents.
+     */
+    public function get resultHeaders():Array
+    {
+        return _responseHeaders;
+    }
+
+
+    //----------------------------------
+    //  xmlSpecialCharsFilter
+    //----------------------------------
+
+    private var _xmlSpecialCharsFilter:Function;
+
+    public function get xmlSpecialCharsFilter():Function
+    {
+        if (_xmlSpecialCharsFilter != null)
+            return _xmlSpecialCharsFilter;
+
+        return AbstractWebService(service).xmlSpecialCharsFilter;
+    }
+
+    public function set xmlSpecialCharsFilter(func:Function):void
+    {
+        _xmlSpecialCharsFilter = func;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Internal Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    mx_internal var handleAxisSession:Boolean;
+
+    /**
+     * @private
+     */
+    mx_internal function get wsdlOperation():WSDLOperation
+    {
+        return _wsdlOperation;
+    }
+
+    /**
+     * @private
+     */
+    mx_internal function set wsdlOperation(value:WSDLOperation):void
+    {
+        _wsdlOperation = value;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Adds a header that is applied only to this Operation. The header can be
+     * provided in a pre-encoded form as an XML instance, or as a SOAPHeader
+     * instance which leaves the encoding up to the internal SOAP encoder.
+     * @param header The SOAP header to add to this Operation.
+     */
+    public function addHeader(header:Object):void
+    {
+        _headers.push(header);
+    }
+
+    /**
+     * Adds a header that is applied only to this Operation.
+     * @param qnameLocal the localname for the header QName
+     * @param qnameNamespace the namespace for header QName
+     * @param headerName Name of the header.
+     * @param headerValue Value of the header.
+     */
+    public function addSimpleHeader(qnameLocal:String, qnameNamespace:String,
+            headerName:String, headerValue:String):void
+    {
+        var obj:Object = {};
+        obj[headerName] = headerValue;
+        addHeader(new SOAPHeader(new QName(qnameNamespace, qnameLocal), obj));
+    }
+
+    /**
+     * @inheritDoc
+     */
+    override public function cancel(id:String = null):AsyncToken
+    {
+
+        if (hasPendingInvocations())
+        {
+            if (null == id)
+            {
+                // remove the last pending call
+                return pendingInvocations.pop().token;
+            }
+            // check if id is one of the pending calls
+            for (var i:int = pendingInvocations.length-1; i >= 0; i--)
+            {
+                if (pendingInvocations[i].token.message != null &&
+                    pendingInvocations[i].token.message.messageId == id)
+                {
+                    var pc:OperationPendingCall = pendingInvocations.splice(i,1)[0];
+                    return pc.token;
+                }
+            }
+        }
+        //if the call is not pending, use super
+        return super.cancel(id);
+    }
+
+    /**
+     * Clears the headers for this individual Operation.
+     */
+    public function clearHeaders():void
+    {
+        _headers.length = 0;
+    }
+
+    /**
+     * Returns a header if a match is found based on QName localName and URI.
+     * @param qname QName of the SOAPHeader.
+     * @param headerName Name of a header in the SOAPHeader content (Optional)
+     */
+    public function getHeader(qname:QName, headerName:String = null):SOAPHeader
+    {
+        var length:uint = _headers.length;
+        for (var i:uint = 0; i < length; i++)
+        {
+            var header:SOAPHeader = SOAPHeader(_headers[i]);
+            if (XMLUtil.qnamesEqual(header.qname, qname))
+            {
+                if (headerName)
+                {
+                    if (header.content && header.content[headerName])
+                    {
+                        return header;
+                    }
+                }
+                else
+                {
+                    return header;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Removes the header with the given QName from all operations.
+     * @param qname QName of the SOAPHeader.
+     * @param headerName Name of a header in the SOAPHeader content (Optional)
+     */
+    public function removeHeader(qname:QName, headerName:String = null):void
+    {
+        var length:uint = _headers.length;
+        for (var i:uint = 0; i < length; i++)
+        {
+            var header:SOAPHeader = SOAPHeader(_headers[i]);
+            if (XMLUtil.qnamesEqual(header.qname, qname))
+            {
+                if (headerName)
+                {
+                    if (header.content && header.content[headerName])
+                    {
+                        _headers.splice(i, 1);
+                        return; // Got it
+                    }
+                }
+                else
+                {
+                    _headers.splice(i, 1);
+                    return; // Got it
+                }
+            }
+        }
+    }
+
+    /**
+     * [DOCS] use superclass description
+     * @private
+     */
+    override public function send(...args:Array):AsyncToken
+    {
+        var argsToPass:Object = null;
+        if (args && args.length > 0)
+        {
+            if ((args.length == 1) && (args[0] is XMLNode || args[0] is XML))
+            {
+                // special case: handle xml node as single argument and drop
+                // into literal mode.
+                argsToPass = args[0];
+            }
+            else
+            {
+                argsToPass = args;
+            }
+        }
+        //Syntactically pre-registered
+        else if (this.arguments)
+        {
+            argsToPass = this.arguments;
+        }
+
+        var combinedHeaders:Array = [];
+
+        if (_headers)
+        {
+            combinedHeaders = combinedHeaders.concat(_headers);
+        }
+
+        if (webService.headers)
+        {
+            combinedHeaders = combinedHeaders.concat(webService.headers);
+        }
+
+        //create an empty message and a token to hold it
+        var message:SOAPMessage = new SOAPMessage();
+        var token:AsyncToken = new AsyncToken(message);
+
+        var pc:OperationPendingCall = new OperationPendingCall(argsToPass, combinedHeaders, token);
+
+        if (webService.ready)
+        {
+            invokePendingCall(pc);
+        }
+        else // if (!webService.wsdlFault)
+        {
+            log.debug("Queueing SOAP operation {0}", name);
+            if (!pendingInvocations)
+            {
+                pendingInvocations = [];
+            }
+            pendingInvocations.push(pc);
+        }
+        // FIXME: Handle WSDL error case
+        /*
+        else
+        {
+            var errMsg:String = "Cannot invoke method " + name + " as WSDL did not load successfully";
+            dispatchRpcEvent(createFaultEvent("Client.InvalidWSDL", errMsg));
+        }
+        */
+
+        return pc.token;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Internal Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    mx_internal function hasPendingInvocations():Boolean
+    {
+        return pendingInvocations != null && pendingInvocations.length > 0;
+    }
+
+    /**
+     * @private
+     */
+    mx_internal function invokeAllPending():void
+    {
+        if (hasPendingInvocations())
+        {
+            for (var i:int = 0; i < pendingInvocations.length; ++i)
+            {
+                invokePendingCall(pendingInvocations[i]);
+            }
+            pendingInvocations = null;
+        }
+    }
+
+    /**
+     * We now SOAP encode the pending call and send the request.
+     *
+     * @private
+     */
+    mx_internal function invokePendingCall(pc:OperationPendingCall):void
+    {
+        log.debug("Invoking SOAP operation {0}", name);
+
+        startTime = new Date();
+
+        var message:SOAPMessage = SOAPMessage(pc.token.message);
+        var soap:XML;
+
+        if (wsdlOperation == null)
+        {
+            log.debug("No operation found {0}", name);
+            dispatchRpcEvent(createFaultEvent("Client.NoSuchMethod", "Couldn't find method '" + name + "' in service."));
+            return;
+        }
+
+        try
+        {
+            soap = encoder.encodeRequest(pc.args, pc.headers);
+        }
+        catch(fault:Fault)
+        {
+            dispatchRpcEvent(FaultEvent.createEvent(fault));
+            return;
+        }
+        catch(error:Error)
+        {
+            var errorMsg:String = error.message ? error.message : "";
+            var fault2:Fault = new Fault("EncodingError", errorMsg);
+            var faultEvent:FaultEvent = FaultEvent.createEvent(fault2);
+            dispatchRpcEvent(faultEvent);
+            return;
+        }
+
+        message.httpHeaders = httpHeaders;
+        if (message.getSOAPAction() == null)
+            message.setSOAPAction(wsdlOperation.soapAction);
+        message.body = soap.toXMLString();
+        message.url = endpointURI;
+        invoke(message, pc.token);
+    }
+
+    /**
+     * We decode the SOAP encoded response and update the result and response
+     * headers (if any).
+     *
+     * @private
+     */
+    override mx_internal function processResult(message:IMessage, token:AsyncToken):Boolean
+    {
+        var body:Object = message.body;
+        var dispatchResultEvent:Boolean = true;
+
+        try
+        {
+            var stringResult:String = String(body);
+            decoder.resultFormat = resultFormat;
+            decoder.headerFormat = headerFormat;
+            decoder.multiplePartsFormat = multiplePartsFormat;
+            decoder.forcePartArrays = forcePartArrays;
+
+            var soapResult:SOAPResult = decoder.decodeResponse(stringResult);
+
+            // Reset result
+            _result = null;
+
+            // Expose headers for the bindable property "resultHeaders" as
+            // well as RPC fault and result events...
+            _responseHeaders = soapResult.headers;
+
+            // Process headers for both result and fault
+            dispatchResultEvent = processHeaders(_responseHeaders, token, message);
+
+            // Handle faults
+            if (soapResult.isFault)
+            {
+                var faults:Array = soapResult.result as Array;
+                for each (var soapFault:Fault in faults)
+                {
+                    dispatchRpcEvent(FaultEvent.createEvent(soapFault, token, message));
+                }
+                dispatchResultEvent = false;
+            }
+
+            if (dispatchResultEvent)
+                _result = soapResult.result;
+        }
+        catch(fault:Fault)
+        {
+            dispatchRpcEvent(FaultEvent.createEvent(fault, token, message));
+            return false;
+        }
+        catch(error:Error)
+        {
+            var errorMsg:String = error.message != null ? error.message : "";
+            var fault2:Fault = new Fault("DecodingError", errorMsg);
+            var faultEvent:FaultEvent = FaultEvent.createEvent(fault2, token, message);
+            dispatchRpcEvent(faultEvent);
+            return false;
+        }
+
+        return dispatchResultEvent;
+    }
+
+    /**
+     * Checks SOAP response headers and enforces any mustUnderstand attributes
+     * by checking that a listener exists for the "header" event. If we're
+     * honoring Axis sessions then we also look out for for the sessionID
+     * header and add it to the Operation's corresponding service for
+     * subsequent invocations. Finally, the header is dispatched as a
+     * HeaderEvent. If no problems are encountered the method simply returns
+     * true.
+     *
+     * @private
+     */
+    protected function processHeaders(responseHeaders:Array, token:AsyncToken, message:IMessage):Boolean
+    {
+        if (responseHeaders != null)
+        {
+            for (var i:uint = 0; i < responseHeaders.length; i++)
+            {
+                var header:Object = responseHeaders[i];
+                var mustUnderstand:Boolean;
+                var headerQName:QName;
+                var headerContent:Object;
+
+                if (header is XML)
+                {
+                    var headerXML:XML = header as XML;
+
+                    mustUnderstand = headerXML.@mustUnderstand == "1" ? true : false;
+                    headerQName = headerXML.name();
+
+                    if (headerXML.hasComplexContent())
+                        headerContent = headerXML.elements();
+                    else
+                        headerContent = headerXML.text();
+
+                }
+                else if (header is SOAPHeader)
+                {
+                    mustUnderstand = header.mustUnderstand;
+                    headerQName = header.qname;
+                    headerContent = header.content;
+                }
+
+                // If header was either XML or SOAPHeader, headerQName would
+                // be set by now.
+                if (headerQName != null)
+                {
+                    if (mustUnderstand == true)
+                    {
+                        if (!hasEventListener(HeaderEvent.HEADER) && !service.hasEventListener(HeaderEvent.HEADER))
+                        {
+    						var msg:String = resourceManager.getString(
+    							"rpc", "noListenerForHeader",
+    							[ headerQName ]);
+                            var fault:Fault = new Fault("Client.MustUnderstand", msg);
+                            var faultEvent:FaultEvent = FaultEvent.createEvent(fault, token, message);
+                            dispatchRpcEvent(faultEvent);
+                            return false;
+                        }
+                    }
+
+                    if (handleAxisSession)
+                    {
+                        // pass the session id on to any request made on this proxy
+                        if (headerQName != null && headerQName.localName == "sessionID" &&
+                            headerQName.uri == "http://xml.apache.org/axis/session")
+                        {
+                            var newHeader:SOAPHeader = new SOAPHeader(headerQName, headerContent);
+                            webService.addHeader(newHeader);
+                        }
+                    }
+
+                    var headerEvent:HeaderEvent = HeaderEvent.createEvent(header, token, message);
+                    dispatchRpcEvent(headerEvent);
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * @private
+     */
+    override mx_internal function setService(value:AbstractService):void
+    {
+        super.setService(value);
+        webService = AbstractWebService(value);
+    }
+
+    /**
+     * @private
+     */
+    protected function createFaultEvent(faultCode:String = null, faultString:String = null, faultDetail:String = null):FaultEvent
+    {
+        var fault:Fault = new Fault(faultCode, faultString, faultDetail);
+        var faultEvent:FaultEvent = FaultEvent.createEvent(fault);
+        return faultEvent;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    // Backing variables for public getter/setters
+    private var _endpointURI:String;
+    private var _forcePartArrays:Boolean = false; // Flex 2.0.1 HF2+ behavior is false
+    private var _headerFormat:String;
+    private var _headers:Array;
+    private var _resultFormat:String;
+    private var _makeObjectsBindableSet:Boolean;
+    private var _multiplePartsFormat:String;
+
+    // Internal properties
+    //any vars here with underscores minimally have a getter or setter
+    private var _decoder:ISOAPDecoder;
+    private var _encoder:ISOAPEncoder;
+    private var _ignoreWhitespace:Boolean = true;
+    private var log:ILogger;
+    private var pendingInvocations:Array;
+    private var startTime:Date;
+    private var timeout:int;
+    private var webService:AbstractWebService;
+
+    /**
+     * @private
+     */
+    protected var _wsdlOperation:mx.rpc.wsdl.WSDLOperation;
+}
+}
+
+import mx.rpc.AsyncToken;
+
+/**
+ * @private
+ */
+class OperationPendingCall
+{
+    public var args:*;
+    public var headers:Array;
+    public var token:AsyncToken;
+
+    public function OperationPendingCall(args:*, headers:Array, token:AsyncToken)
+    {
+        super();
+        this.args = args;
+        this.headers = headers;
+        this.token = token;
+    }
+}


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

--- frameworks/projects/charts/src/mx/styles/metadata/IconColorStyles.as
+++ frameworks/projects/charts/src/mx/styles/metadata/IconColorStyles.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: 16893
Author:   ealimam@adobe.com
Date:     2010-07-12T23:35:50.176580Z

Log Message:
-----------
(Button Skin) FMX-64: Changing button label not reflected on Button display

Implemented an event handler for the "contentChange" event. We now update the text whenever the button's label gets changed.

Reviewed by: Glenn Ruehle

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as
@@ -3,6 +3,7 @@

 	import flash.display.DisplayObject;
 	import flash.display.GradientType;
+	import flash.events.Event;
 	import flash.events.EventDispatcher;
 	import flash.geom.Matrix;
 	import flash.text.TextField;
@@ -14,7 +15,7 @@
 	import spark.components.Button;

 	public class ButtonSkin extends UIComponent
-	{
+	{
 		public function ButtonSkin()
 		{
 			super();
@@ -66,9 +67,23 @@

 				addChild(textField);
 				addChild(textFieldShadow);
+
+				hostComponent.addEventListener("contentChange", handleContentChange);
 			}

 			applyFXG();
+		}
+
+		protected function handleContentChange(event:Event):void {
+			updateLabel();
+		}
+
+		private function updateLabel():void {
+			if(hostComponent != null) {
+				textField.text = hostComponent.label;
+				textFieldShadow.text = hostComponent.label;
+				invalidateSize();
+			}
 		}

 		override public function styleChanged(styleProp:String):void {
@@ -131,10 +146,7 @@

 		override protected function commitProperties():void
 		{
-			if(hostComponent != null) {
-				textField.text = hostComponent.label;
-				textFieldShadow.text = hostComponent.label;
-			}
+			updateLabel();
 		}

 		override protected function measure():void


Changed ResourceLoader so that it doesn't expect all resources using the "attach://"-protocol to succeed immediately.

This is required because embedded MovieClips have to be loaded with Loader.loadBytes, which takes a frame to complete.

--- src/reprise/external/ResourceLoader.as
+++ src/reprise/external/ResourceLoader.as
@@ -99,6 +99,10 @@
 		* attach:// protocol are executed beforehand. Afterwards the super-
 		* implementation is called. If the ResourceLoader is already running, this
 		* method does nothing.
+		 *
+		 * Note that eagerly loading resources using the attach:// protocol might lead to temporarily
+		 * exceeding the maxParallelExecutionCount. This is a deliberate consequence of loading attached
+		 * assets as early as possible.
 		*/
 		override public function execute(...args):void
 		{
@@ -113,9 +117,6 @@
 				if (cmd is IResource && IResource(cmd).url().indexOf("attach://") == 0)
 				{
 					cmd.execute();
-					m_numResourcesLoaded++;
-					m_numBytesLoaded += IResource(cmd).bytesTotal();
-					m_pendingCommands.splice(i, 1);
 				}
 			}
 			super.execute();


Transferred from the Adobe Open Source Subversion Repository

Revision: 11951
Author:   hhillen@paciellogroup.com
Date:     2009-11-18T20:35:52.215971Z

Log Message:
-----------
Accessibility implementation support for the spark ToggleButton, DropDownListBase and ComboBox components.
QE notes: none
Doc notes: none
Bugs: n/a
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ToggleButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListAccImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as</path>

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

--- frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as
+++ frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as
@@ -0,0 +1,270 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.accessibility
+{
+
+    import flash.accessibility.Accessibility;
+    import flash.events.Event;
+
+    import mx.core.UIComponent;
+    import mx.core.mx_internal;
+    import mx.accessibility.AccImpl;
+    import spark.components.DropDownListBase;
+
+    use namespace mx_internal;
+
+    /**
+     *  DropDownListBaseAccImpl is a subclass of AccessibilityImplementation
+     *  which implements accessibility for the DropDownListBase class.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public class DropDownListBaseAccImpl extends ListBaseAccImpl
+    {
+        include "../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class constants
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        private static const ROLE_SYSTEM_LISTITEM:uint = 0x22;
+
+        /**
+         *  @private
+         */
+        private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
+
+        /**
+         *  @private
+         */
+        private static const STATE_SYSTEM_SELECTABLE:uint = 0x00200000;
+
+        /**
+         *  @private
+         */
+        private static const STATE_SYSTEM_SELECTED:uint = 0x00000002;
+
+        /**
+         *  @private
+         */
+        private static const STATE_SYSTEM_EXPANDED:uint = 0x00000200;
+
+        /**
+         *  @private
+         */
+        private static const STATE_SYSTEM_COLLAPSED:uint = 0x00000400;
+
+        /**
+         *  @private
+         */
+        private static const EVENT_SYSTEM_STATECHANGE:uint = 0x800a;
+
+        /**
+         *  @private
+         */
+        private static const EVENT_SYSTEM_VALUECHANGE:uint = 0x800e;
+
+        /**
+         *  @private
+         */
+        private static const EVENT_OBJECT_FOCUS:uint = 0x8005;
+
+        //-------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Enables accessibility in the DropDownListBase class.
+         *
+         *
This method is called by application startup code
+         *  that is autogenerated by the MXML compiler.
+         *  Afterwards, when instances of DropDownListBase are initialized,
+         *  their accessibilityImplementation property
+         *  will be set to an instance of this class.

+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public static function enableAccessibility():void
+        {
+            DropDownListBase.createAccessibilityImplementation =
+                createAccessibilityImplementation;
+        }
+
+        /**
+         *  @private
+         *  Creates a DropDownListBase AccessibilityImplementation object.
+         *  This method is called from UIComponent's
+         *  initializeAccessibility() method.
+         */
+        mx_internal static function createAccessibilityImplementation(
+            component:UIComponent):void
+        {
+            component.accessibilityImplementation =
+                new DropDownListBaseAccImpl(component);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         *
+         *  @param master The UIComponent instance that this AccImpl instance
+         *  is making accessible.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function DropDownListBaseAccImpl(master:UIComponent)
+        {
+            super(master);
+
+            role = 0x2E; // ROLE_SYSTEM_COMBOBOX
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden properties: AccImpl
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  eventsToHandle
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Array of events that we should listen for from the master component.
+         */
+        override protected function get eventsToHandle():Array
+        {
+            return super.eventsToHandle.concat(["open", "close"]);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden methods: AccessibilityImplementation
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         *  IAccessible method for returning the value of the DropDownListBase
+         *  (which would be the text of the item selected).
+         *  The DropDownListBase should return the content of the selected item as the value.
+         *
+         *  @param childID uint
+         *
+         *  @return Value String
+         */
+        override public function get_accValue(childID:uint):String
+        {
+            if (childID == 0)
+                return getName(DropDownListBase(master).selectedIndex + 1);
+            return null;
+        }
+
+        /**
+         *  @private
+         */
+        override public function get_accState(childID:uint):uint
+        {
+            var accState:uint = super.get_accState(childID);
+
+            if (childID == 0)
+            {
+                if (DropDownListBase(master).isDropDownOpen)
+                    accState |= STATE_SYSTEM_EXPANDED;
+                else
+                    accState |= STATE_SYSTEM_COLLAPSED;
+            }
+
+            return accState;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden event handlers: AccImpl
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         *  Override the generic event handler.
+         *  All AccImpl must implement this
+         *  to listen for events from its master component.
+         */
+        override protected function eventHandler(event:Event):void
+        {
+            switch (event.type)
+            {
+                case "open":
+                {
+                    Accessibility.sendEvent(master, 0, EVENT_SYSTEM_STATECHANGE);
+
+                    var index:uint = DropDownListBase(master).selectedIndex;
+                    if (index >= 0)
+                    {
+                        Accessibility.sendEvent(master, index + 1,
+                            EVENT_OBJECT_FOCUS);
+                    }
+                    break;
+                }
+                case "close":
+                {
+                    Accessibility.sendEvent(master, 0, EVENT_SYSTEM_STATECHANGE);
+                    Accessibility.sendEvent(master, 0, EVENT_OBJECT_FOCUS);
+                    break;
+                }
+                case "change":
+                {
+                    if (!(DropDownListBase(master).isDropDownOpen))
+                    {
+                        Accessibility.sendEvent(master, 0,
+                            EVENT_SYSTEM_VALUECHANGE, true);
+                        break;
+                    }
+                }
+                case "caretChange":
+                {
+                    if (!(DropDownListBase(master).isDropDownOpen))
+                        break;
+                }
+                default:
+                {
+                    super.eventHandler(event);
+                    break;
+                }
+            }
+        }
+
+    }
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5374
Author:   jszeto@adobe.com
Date:     2009-03-18T00:05:20.474374Z

Log Message:
-----------
Add scaleGrid support to Group

Group now has basic scaleGrid support.

Requirements:
- The group can not have any displayObject child elements. This includes GraphicElements that require their own displayObject.
- Every scaleGrid property must be set. If they aren't, then the scale9Grid is not set.
- Every scaleGrid property must be valid. All values must fit in the dimensions of the Group.
- ResizeMode is automatically set to scale
- Change the width and height of the Group to scale the dimensions. ScaleX and scaleY will be ignored.

QE Notes: Add scaleGrid tests for Group
Doc Notes: Need to document the scaleGrid properties
Bugs: n/a
Reviewer: Glenn

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as

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


Tweaked name text sizing

Tweaked name text sizing

--- src/Displays/DModule.as
+++ src/Displays/DModule.as
@@ -85,6 +85,7 @@
 			for each (var displayPort:DPort in displayPorts)
 				displayPort.updatePosition(baseX, baseY);

+			nameText.size = U.state.zoom >= 0.5 ? U.FONT_SIZE : U.FONT_SIZE * 2;
 			nameText.x = x;
 			nameText.y = y + (height - nameText.height) / 2;
 		}
@@ -94,7 +95,7 @@
 			for each (var displayPort:DPort in displayPorts)
 				displayPort.draw();

-			if (U.state.zoom >= 0.5) {
+			if (U.state.zoom >= 0.25) {
 				nameText.text = getName();
 				nameText.draw();
 			}


FragmentLoader : reset _levelNext on seek() so that level switching happens faster

--- src/org/mangui/hls/loader/FragmentLoader.as
+++ src/org/mangui/hls/loader/FragmentLoader.as
@@ -323,6 +323,7 @@
             _fragmentFirstLoaded = false;
             _fragPrevious = null;
             _fragSkipping = false;
+            _levelNext = -1;
             _timer.start();
         }


- change: Removed some cruft from CSSDeclaration

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@669 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/css/CSSDeclaration.as
+++ src/reprise/css/CSSDeclaration.as
@@ -63,10 +63,10 @@
 		};
 		protected static const g_textStyleNames : Object = {};

-		protected static var m_inheritableProperties : Object = {};
-		protected static var m_defaultValues : Object	= {};
-		protected static var m_propertyToParserTable : Object	= {};
-		protected static var g_defaultPropertiesRegistered : Boolean;
+		protected static const g_inheritableProperties : Object = {};
+		protected static const g_propertyToParserTable : Object	= {};
+		protected static const g_defaultPropertiesRegistered : Boolean =
+			registerDefaultProperties();

 		protected var m_properties : Object;
 		protected var m_hasDefaultValues : Boolean;
@@ -81,12 +81,6 @@
 		***************************************************************************/
 		public function CSSDeclaration()
 		{
-			if (!CSSDeclaration.g_defaultPropertiesRegistered)
-			{
-				CSSDeclaration.g_defaultPropertiesRegistered =
-					CSSDeclaration.registerDefaultProperties();
-			}
-
 			m_properties = {};
 		}

@@ -106,14 +100,6 @@
 			var properties : Object = collection.KNOWN_PROPERTIES;

 			registerPropertyCollectionObject(properties, collection);
-
-			if (collection.defaultValues)
-			{
-				for (var key : String in collection.defaultValues)
-				{
-					m_defaultValues[key] = collection.defaultValues[key];
-				}
-			}
 		}

 		private static function registerPropertyCollectionObject(
@@ -123,10 +109,10 @@
 				for (var prop : String in properties)
 				{
 					var definition : Object = properties[prop];
-					m_propertyToParserTable[prop] = definition['parser'];
+					g_propertyToParserTable[prop] = definition['parser'];
 					if (definition['inheritable'])
 					{
-						m_inheritableProperties[prop] = true;
+						g_inheritableProperties[prop] = true;
 					}
 					if (definition['transition'])
 					{
@@ -144,7 +130,7 @@
 		reprise static function parserForProperty(key : String) : Function
 		{
 			// get the name of the associated class
-			var parser : Function = CSSDeclaration.m_propertyToParserTable[key];
+			var parser : Function = g_propertyToParserTable[key];
 			if (parser == null)
 			{
 				parser = DefaultParser.parseAnything;
@@ -207,7 +193,7 @@
 				ourProp = m_properties[key];

 				// well, inheritable styles only is the deal
-				if (inheritableStylesOnly && !m_inheritableProperties[key] &&
+				if (inheritableStylesOnly && !g_inheritableProperties[key] &&
 					!(ourProp && ourProp.inheritsValue()))
 				{
 					continue;
@@ -216,7 +202,7 @@
 				otherProp = props[key];

 				// well, inheritable styles only is the deal
-				if (weakly && ourProp && !ourProp.isAuto() && !otherProp.important())
+				if (weakly && ourProp && !otherProp.important())
 				{
 					continue;
 				}
@@ -235,18 +221,6 @@
 		public function inheritCSSDeclaration(parentDeclaration:CSSDeclaration) : void
 		{
 			mergeCSSDeclaration(parentDeclaration, true);
-		}
-
-		public function addDefaultValues() : void
-		{
-			for (var key : String in m_defaultValues)
-			{
-				if (m_properties[key])
-				{
-					continue;
-				}
-				m_properties[key] = CSSProperty(m_defaultValues[key]);
-			}
 		}

 		public function compare(otherDeclaration:CSSDeclaration) : Boolean
@@ -406,15 +380,15 @@

 		protected static function registerDefaultProperties() : Boolean
 		{
-			CSSDeclaration.registerPropertyCollection(Background);
-			CSSDeclaration.registerPropertyCollection(Border);
-			CSSDeclaration.registerPropertyCollection(DisplayPosition);
-			CSSDeclaration.registerPropertyCollection(Font);
-			CSSDeclaration.registerPropertyCollection(Margin);
-			CSSDeclaration.registerPropertyCollection(Padding);
-			CSSDeclaration.registerPropertyCollection(ScrollbarProperties);
-			CSSDeclaration.registerPropertyCollection(Filters);
-			CSSDeclaration.registerPropertyCollection(Transition);
+			registerPropertyCollection(Background);
+			registerPropertyCollection(Border);
+			registerPropertyCollection(DisplayPosition);
+			registerPropertyCollection(Font);
+			registerPropertyCollection(Margin);
+			registerPropertyCollection(Padding);
+			registerPropertyCollection(ScrollbarProperties);
+			registerPropertyCollection(Filters);
+			registerPropertyCollection(Transition);
 			return true;
 		}
 	}