Transferred from the Adobe Open Source Subversion Repository

Revision: 4958
Author:   rfrishbe@adobe.com
Date:     2009-02-13T23:07:46.243121Z

Log Message:
-----------
Change the initialization sequence of FxComponent and Group.  Basically now children (including the skin) should get created at createChildren() time and follow the correct lifecycle pattern.  Unfortunately, this change got mingled in with all my PARB changes, so I'm submitting a bunch of PARB changes for Group, DataGroup, FxContainer, and FxDataContainer, outlined below:

1.     New event classes/names for Group/FxContainer and DataGroup ("elementAdd" and "elementRemove" event of type ElementExistenceEvent for Group/FxContainer and "rendererAdd" and "rendererRemove" event of type RendererExistenceEvent for DataGroup). It was just one event class of ItemExistenceChangedEvent before.
2.     LayoutBase.clipContent->clipAndEnableScrolling (same with IViewport.clipContent and GroupBase.clipContent)
3.     GroupBase.getLayoutELementAt()->getElementAt()
4.     GroupBase.numLayoutElements -> numElements.
5.     LayoutBase.virtualLayout -> useVirtualLayout
6.     ScrollUnit constants are now changed to be uints instead of typed as ScrollUnit.  This means the signature for getHorizontalScrollPositionDelta(unit:ScrollUnit):Number has changed to getHorizontalScrollPositionDelta(scrollUnit:uint):Number (and ditto for getVerticalScrollPositionDelta())
7.  DataGroup.getRendererForItemAt() -> getElementAt()
8.  DataGroup.getItemIndexForRenderer() -> getElementIndex()

Other changes:
 - Change IVisualElement interface so that it's smaller now.  It also extends ILayoutElement now.  The properties removed from IVisualElement are: rotation, rotationX, rotationY, rotationZ, transformX, transformY, offsets, x, y, z, scaleX, scaleY, scaleZ, explicitWidth, explicitMinWidth, explicitMaxWidth, explicitHeight, explicitMinHeight, explicitMaxHeight)
-  Fix in DataGroup so we don’t remove/add elements if we’re gonna do it later anyways.  I also need to do some other work in here around cleaning up of renderers.
- AddItems fix around handling IVisualElementContainers more effeciently
- get mxmlContent now returns a copy of the Array rather than the one we're using internally
- Had to update mustella since there was special case logic for dealing with getLayoutElementAt().  I added this logic for getElementAt(), which replaces that method.

QE Notes: Thanks for changing all the tests and working on the cyclone
Doc Notes: Made some ASDoc changes to some core classes to move the comments into the interfaces.  I did update the comments a bit as well.
Bugs: SDK-18115, SDK-19004
Reviewer: Jason, Glenn, Hans for initialization sequence change and Hans for all PARB changes
tests: checkintests, all mustella tests

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as" copyfrom-rev="4812" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/TileLayout.as
+++ frameworks/projects/spark/src/spark/layouts/TileLayout.as
@@ -570,7 +570,7 @@
     // of updateDisplayList().
     private var _tileWidthCached:Number = NaN;
     private var _tileHeightCached:Number = NaN;
-    private var _numLayoutElementsCached:int = -1;
+    private var _numElementsCached:int = -1;

     //--------------------------------------------------------------------------
     //
@@ -849,15 +849,15 @@
         var rowHeight:Number = 0;

         var layoutTarget:GroupBase = target;
-        var count:int = layoutTarget.numLayoutElements;
+        var count:int = layoutTarget.numElements;
         // Remember the number of includeInLayout elements
-        _numLayoutElementsCached = count;
+        _numElementsCached = count;
         for (var i:int = 0; i < count; i++)
         {
-            var el:ILayoutElement = layoutTarget.getLayoutElementAt(i);
+            var el:ILayoutElement = layoutTarget.getElementAt(i);
             if (!el || !el.includeInLayout)
             {
-                _numLayoutElementsCached--;
+                _numElementsCached--;
                 continue;
             }

@@ -879,20 +879,20 @@
      */
     private function calculateElementCount():int
     {
-        if (-1 != _numLayoutElementsCached)
-            return _numLayoutElementsCached;
+        if (-1 != _numElementsCached)
+            return _numElementsCached;

         var layoutTarget:GroupBase = target;
-        var count:int = layoutTarget.numLayoutElements;
-        _numLayoutElementsCached = count;
+        var count:int = layoutTarget.numElements;
+        _numElementsCached = count;
         for (var i:int = 0; i < count; i++)
         {
-            var el:ILayoutElement = layoutTarget.getLayoutElementAt(i);
+            var el:ILayoutElement = layoutTarget.getElementAt(i);
             if (!el || !el.includeInLayout)
-                _numLayoutElementsCached--;
-        }
-
-        return _numLayoutElementsCached;
+                _numElementsCached--;
+        }
+
+        return _numElementsCached;
     }

     /**
@@ -1074,10 +1074,10 @@
             yMinorDelta = 0;
         }

-        var count:int = layoutTarget.numLayoutElements;
+        var count:int = layoutTarget.numElements;
         for (var i:int = 0; i < count; i++)
         {
-            var el:ILayoutElement = layoutTarget.getLayoutElementAt(i);
+            var el:ILayoutElement = layoutTarget.getElementAt(i);
             if (!el || !el.includeInLayout)
                 continue;

@@ -1116,7 +1116,7 @@

         // Reset the cache
         _tileWidthCached = _tileHeightCached = NaN;
-        _numLayoutElementsCached = -1;
+        _numElementsCached = -1;

         // If actual values have chnaged, notify listeners
         dispatchEventsForActualValueChanges();


Transferred from the Adobe Open Source Subversion Repository

Revision: 6003
Author:   egeorgie@adobe.com
Date:     2009-04-07T22:44:37.670097Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-19154 layoutBounds for group that has a path with a larger stroke weight is incorrect

Fix: Modify BasicLayout to use the new ILayoutElement APIs getLayoutBoundsXAtSize, getLayoutBoundsYAtSize.

QE Notes: None
Doc Notes: None
Bugs: SDK-19154
Reviewer: Ely
tests: checkintests, mustella (group, layout)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.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/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/Ellipse.as
+++ frameworks/projects/spark/src/spark/primitives/Ellipse.as
@@ -119,6 +119,72 @@
     }

     /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function getBoundsXAtSize(width:Number, height:Number, postTransform:Boolean = true):Number
+    {
+        var strokeExtents:Point = getStrokeExtents(postTransform);
+        var m:Matrix = postTransform ? computeMatrix() : null;
+        if (!m)
+            return strokeExtents.x * -0.5 + this.x;
+
+        if (!isNaN(width))
+            width -= strokeExtents.x;
+        if (!isNaN(height))
+            height -= strokeExtents.y;
+
+        // Calculate the width and height pre-transform:
+        var newSize:Point = MatrixUtil.fitBounds(width, height, m,
+                                                 preferredWidthPreTransform(),
+                                                 preferredHeightPreTransform(),
+                                                 minWidth, minHeight,
+                                                 maxWidth, maxHeight);
+        if (!newSize)
+            newSize = new Point(minWidth, minHeight);
+
+        return strokeExtents.x * -0.5 +
+            MatrixUtil.getEllipseBoundingBox(newSize.x / 2, newSize.y / 2, newSize.x / 2, newSize.y / 2, m).x;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function getBoundsYAtSize(width:Number, height:Number, postTransform:Boolean = true):Number
+    {
+        var strokeExtents:Point = getStrokeExtents(postTransform);
+        var m:Matrix = postTransform ? computeMatrix() : null;
+        if (!m)
+            return strokeExtents.y * -0.5 + this.y;
+
+        if (!isNaN(width))
+            width -= strokeExtents.x;
+        if (!isNaN(height))
+            height -= strokeExtents.y;
+
+        // Calculate the width and height pre-transform:
+        var newSize:Point = MatrixUtil.fitBounds(width, height, m,
+                                                 preferredWidthPreTransform(),
+                                                 preferredHeightPreTransform(),
+                                                 minWidth, minHeight,
+                                                 maxWidth, maxHeight);
+        if (!newSize)
+            newSize = new Point(minWidth, minHeight);
+
+        return strokeExtents.y * -0.5 +
+            MatrixUtil.getEllipseBoundingBox(newSize.x / 2, newSize.y / 2, newSize.x / 2, newSize.y / 2, m).y;
+    }
+
+    /**
      *  @private
      */
     override public function getLayoutBoundsX(postTransform:Boolean = true):Number


Transferred from the Adobe Open Source Subversion Repository

Revision: 8436
Author:   gosmith@adobe.com
Date:     2009-07-07T22:42:39.058014Z

Log Message:
-----------
Integrated TLF build 463.

This integration required trivial framework changes due to one renamed API (TextFilter -> TextConverter) that was missed in the earlier implementation of the PARB changes.

Note: Build 461, which was integrated yesterday, had the Marshall Plan changes for TLF.

Build 463
---------

* Fix 2361762 SelectionManager and EditManager keyDownHandlers should check if isDefaultPrevented and if yes, do nothing

* Fix 2365787 Selecting text with shift-down breaks on last line when its an empty paragraph

Build 462
---------

* Fix 2366203 HTML import/export uses <image> tag instead of <img> (inconsistent with TextField)

* Fix 2363394 [SDK-21904] Spark TextArea exports different TextFlow depending on whether it received focus or not.

* Fix 2342917 [SDK-21362] Erratic scrollbar sizing in TextFlow when using uneven lines and dragging the scroll thumb

* PARB - Renamed TextFilter to TextConverter

* PARB - IEditManager.as/EditManager.as - replaced float:String parameter with option:Object.  Updated comments.

* Fix 2366728 EditManager.applyFormatToElement ignores targetElement and always applies changes to the TextFlow

Build 461
---------

* Marshall plan and security sandbox bug fixes were added in Build 461 - TLF now works in a security sandbox and can support flex's marshall plan

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swf</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/tlf.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextFlowUtil.as</path>

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

--- frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
@@ -15,7 +15,7 @@
 import flashx.textLayout.conversion.ConversionType;
 import flashx.textLayout.conversion.ITextExporter;
 import flashx.textLayout.conversion.ITextImporter;
-import flashx.textLayout.conversion.TextFilter;
+import flashx.textLayout.conversion.TextConverter;
 import flashx.textLayout.elements.Configuration;
 import flashx.textLayout.elements.TextFlow;
 import flashx.textLayout.formats.FormatValue;
@@ -113,8 +113,8 @@
         format = new TextLayoutFormat(config.textFlowInitialFormat);
 		format.whiteSpaceCollapse = "collapse";
 		config.textFlowInitialFormat = format;
-        collapsingTextLayoutImporter = TextFilter.getImporter(
-            TextFilter.TEXT_LAYOUT_FORMAT, config);
+        collapsingTextLayoutImporter = TextConverter.getImporter(
+			TextConverter.TEXT_LAYOUT_FORMAT, config);
         collapsingTextLayoutImporter.throwOnError = true;

         // Create an importer for TEXT_LAYOUT_FORMAT
@@ -126,13 +126,13 @@
 		format = new TextLayoutFormat(config.textFlowInitialFormat);
         format.whiteSpaceCollapse = "preserve";
         config.textFlowInitialFormat = format;
-        preservingTextLayoutImporter = TextFilter.getImporter(
-            TextFilter.TEXT_LAYOUT_FORMAT, config);
+        preservingTextLayoutImporter = TextConverter.getImporter(
+            TextConverter.TEXT_LAYOUT_FORMAT, config);
         preservingTextLayoutImporter.throwOnError = true;

         // Create an exporter for TEXT_LAYOUT_FORMAT.
-        textLayoutExporter = TextFilter.getExporter(
-            TextFilter.TEXT_LAYOUT_FORMAT);
+        textLayoutExporter = TextConverter.getExporter(
+            TextConverter.TEXT_LAYOUT_FORMAT);

         // Build a list of the formats which are marked "inherit"
         // a Configuration's textFlowInitialFormat.


Infrastructure for more efficient manifest loading.

--- HLSPlugin/src/com/kaltura/hls/manifest/HLSManifestParser.as
+++ HLSPlugin/src/com/kaltura/hls/manifest/HLSManifestParser.as
@@ -38,7 +38,6 @@
 		public var subtitles:Vector.<SubTitleParser> = new Vector.<SubTitleParser>();
 		public var keys:Vector.<HLSManifestEncryptionKey> = new Vector.<HLSManifestEncryptionKey>();
 		public var goodManifest:Boolean = true;
-		public var timestamp:int;

 		public var manifestLoaders:Vector.<URLLoader> = new Vector.<URLLoader>();
 		public var manifestParsers:Vector.<HLSManifestParser> = new Vector.<HLSManifestParser>();
@@ -47,7 +46,11 @@
 		public var continuityEra:int = 0;

 		private var _subtitlesLoading:int = 0;
-
+
+		public var lastReloadRequestTime:int = -1;
+		public var timestamp:int = -1;
+		public var quality:int = -1;
+
 		public function get estimatedWindowDuration():Number
 		{
 			return segments.length * targetDuration;
@@ -434,6 +437,8 @@

 		public function reload(manifest:HLSManifestParser):void
 		{
+			lastReloadRequestTime = getTimer();
+
 			fullUrl = manifest.fullUrl;
 			var manifestLoader:URLLoader = new URLLoader(new URLRequest(fullUrl));
 			trace("REQUESTING " + fullUrl);


Made nometa Actor's dispatch() method protected to match mvcs Actor.

--- src/org/robotlegs/nometa/Actor.as
+++ src/org/robotlegs/nometa/Actor.as
@@ -44,9 +44,9 @@
 		 *
 		 * @param event The Event to dispatch on the IContext's IEventDispatcher
 		 */
-		public function dispatch(event:Event):void
+		protected function dispatch(event:Event):void
 		{
 			eventDispatcher.dispatchEvent(event);
 		}
 	}
-}+}


Add ability to access components by name as well as by ID via the manager.

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

--- src/as/com/threerings/cast/CharacterManager.as
+++ src/as/com/threerings/cast/CharacterManager.as
@@ -84,6 +84,11 @@
     public function getComponent (compId :int) :CharacterComponent
     {
         return _crepo.getComponent(compId);
+    }
+
+    public function getComponentByName (cclass :String, cname :String) :CharacterComponent
+    {
+        return _crepo.getComponentByName(cclass, cname);
     }

     public function getActionFrames (descrip :CharacterDescriptor, action :String) :ActionFrames


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/easing/Power.as
+++ frameworks/projects/spark/src/spark/effects/easing/Power.as
@@ -8,7 +8,7 @@
 //  in accordance with the terms of the license agreement accompanying it.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package mx.effects.interpolation
+package spark.effects.easing
 {
 /**
  * Provides easing functionality using a polynomial expression, where the


[CEXP-257] MicrophoneWrapper: obtaining microphone instance in constructor.

--- src/main/flashwavrecorder/MicrophoneWrapper.as
+++ src/main/flashwavrecorder/MicrophoneWrapper.as
@@ -7,50 +7,47 @@
     private var microphone:Microphone;

     public function MicrophoneWrapper() {
+      microphone = Microphone.getMicrophone();
     }

     public function addEventListener(typeName:String, handler:Function):void {
-      getMicrophone().addEventListener(typeName, handler);
+      microphone.addEventListener(typeName, handler);
     }

     public function removeEventListener(typeName:String, handler:Function):void {
-      getMicrophone().removeEventListener(typeName, handler);
+      microphone.removeEventListener(typeName, handler);
     }

     public function getRate():Number {
-      return getMicrophone().rate;
+      return microphone.rate;
     }

     public function setRate(rate:Number):void {
-      getMicrophone().rate = rate;
+      microphone.rate = rate;
     }

     public function setGain(gain:Number):void {
-      getMicrophone().gain = gain;
+      microphone.gain = gain;
     }

     public function getActivityLevel():Number {
-      return getMicrophone().activityLevel;
+      return microphone.activityLevel;
     }

     public function isMuted():Boolean {
-      return getMicrophone().muted;
+      return microphone.muted;
     }

     public function setLoopBack(loopBack:Boolean):void {
-      getMicrophone().setLoopBack(loopBack);
+      microphone.setLoopBack(loopBack);
     }

     public function setSilenceLevel(silenceLevel:Number, silenceTimeout:int):void {
-      getMicrophone().setSilenceLevel(silenceLevel, silenceTimeout);
+      microphone.setSilenceLevel(silenceLevel, silenceTimeout);
     }

     public function setUseEchoSuppression(useEchoSuppression:Boolean):void {
-      getMicrophone().setUseEchoSuppression(useEchoSuppression);
-    }
-
-    private function getMicrophone():Microphone {
-      return microphone ||= Microphone.getMicrophone();
+      microphone.setUseEchoSuppression(useEchoSuppression);
     }

   }


- removed double invocation of applyInFlowChildPositions from Scrollbar::validateAfterChildren

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

--- src/reprise/controls/Scrollbar.as
+++ src/reprise/controls/Scrollbar.as
@@ -10,12 +10,6 @@
 ////////////////////////////////////////////////////////////////////////////////

 package reprise.controls {
-	import reprise.core.ccInternal;
-	import reprise.events.DisplayEvent;
-	import reprise.events.MouseEventConstants;
-	import reprise.ui.UIComponent;
-	import reprise.utils.ProxyFunction;
-
 	import flash.events.Event;
 	import flash.events.MouseEvent;
 	import flash.geom.Rectangle;
@@ -23,6 +17,12 @@
 	import flash.utils.clearInterval;
 	import flash.utils.setInterval;
 	import flash.utils.setTimeout;
+
+	import reprise.core.ccInternal;
+	import reprise.events.DisplayEvent;
+	import reprise.events.MouseEventConstants;
+	import reprise.ui.UIComponent;
+	import reprise.utils.ProxyFunction;

 	use namespace ccInternal;

@@ -295,7 +295,6 @@
 				specHeight - m_scrollUpBtn.outerHeight - m_scrollDownBtn.outerHeight;
 			m_scrollTrack.setStyle('outerHeight', trackHeight + 'px');
 			m_scrollTrack.forceRedraw();
-			applyInFlowChildPositions();

 			super.validateAfterChildren();


Clean up.

Clean up.

--- src/com/esri/viewer/WidgetTemplate.as
+++ src/com/esri/viewer/WidgetTemplate.as
@@ -507,7 +507,7 @@
     }

     private function resize_moveHandler(event:MouseEvent):void
-    {
+    {
         // clear constraints
         var widget:UIComponent = parent as UIComponent;
         widget.left = widget.right = widget.top = widget.bottom = undefined;


Don't return from the update method if puzzle is solved. We only do light configurations and they need to be done when the puzzle is done anyway.


Transferred from the Adobe Open Source Subversion Repository

Revision: 1968
Author:   jimurphy@adobe.com
Date:     2008-06-05T15:31:56.961691Z

Log Message:
-----------
Merge 3.0.x revisions [1940,1954] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -446,7 +446,7 @@
  *  />
  *  </pre>
  *
- *  @productversion Apollo 1.0
+ *  @playerversion AIR 1.1
  */
 public class WindowedApplication extends Application implements IWindow
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.charts.chartClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12127
Author:   hmuller@adobe.com
Date:     2009-11-23T23:58:00.001192Z

Log Message:
-----------
Additional min/max Inspectable metadata, mostly for the filter classes.

QE notes:
Doc notes:
Bugs: sdk-24365
Reviewer: Chet, Jason, Ryan
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as
+++ frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as
@@ -22,6 +22,8 @@
     //----------------------------------

     private var _blurX:Number = 4.0;
+
+    [Inspectable(minValue="0.0", maxValue="255.0")]

     /**
      *  The amount of horizontal blur. Valid values are 0 to 255. A blur of 1
@@ -53,6 +55,8 @@
     //----------------------------------

     private var _blurY:Number = 4.0;
+
+    [Inspectable(minValue="0.0", maxValue="255.0")]

     /**
      *  The amount of vertical blur. Valid values are 0 to 255. A blur of 1
@@ -116,6 +120,8 @@

     private var _quality:int = BitmapFilterQuality.LOW;

+    [Inspectable(minValue="1", maxValue="15")]
+
     /**
      *  The number of times to apply the filter. The default value is
      *  BitmapFilterQuality.LOW, which is equivalent to applying the filter
@@ -155,6 +161,8 @@

     private var _strength:Number = 1;

+    [Inspectable(minValue="0.0", maxValue="255.0")]
+
     /**
      *  The strength of the imprint or spread. The higher the value, the more
      *  color is imprinted and the stronger the contrast between the glow and


Transferred from the Adobe Open Source Subversion Repository

Revision: 22006
Author:   jasonsj@adobe.com
Date:     2011-08-15T23:49:37.068379Z

Log Message:
-----------
SDK-31052 erase the CalloutSkin drop shadow when backgroundAlpha < 1
SDK-31028 New contentBackgroundAppearance style and CalloutContentBackgroundAppearance to remove content background shadow and/or color in Callout.

QE notes: ViewNavigatorCalloutSkin has been removed. Instead, set contentBackgroundAppearance=none on the Callout. It's no longer necessary to set contentBackgroundAlpha=1 on ViewNavigators inside a Callout.
Doc notes:
Bugs:
SDK-31052 Drop shadow appears beneath arrow when Callout has a backgroundAlpha less than 1
SDK-31028 Callout skinning/styling should account for arbitrary use of a ViewNavigator child
Reviewer: betravis
Tests run: checkintests, mustella-mobile
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorCalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as
+++ frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as
@@ -27,5 +27,6 @@
     import spark.components.supportClasses.StyleableStageText; StyleableStageText;
     import spark.components.supportClasses.StyleableTextField; StyleableTextField;
     import spark.components.ActionBarDefaultButtonAppearance; ActionBarDefaultButtonAppearance;
+    import spark.components.CalloutContentBackgroundAppearance; CalloutContentBackgroundAppearance;
 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.events
 {


Switched HighlightText to use htmlText rather than homebrew garbage

--- src/UI/HighlightText.as
+++ src/UI/HighlightText.as
@@ -17,47 +17,22 @@
 			generate();
 		}

-		private var DEBUG_HIGHLIGHT_TEXTS:Vector.<FlxText>;
-
 		public function generate():void {
 			var formatChunks:Array = formatString.split(FORMAT_MARK);
 			if (formatChunks.length != colorStrings.length + 1)
 				throw new Error("Format chunk count (" + formatChunks.length + ") doesn't match color string count (" + colorStrings.length + ") + 1!");

-			var highlightTexts:Vector.<FlxText> = new Vector.<FlxText>;
 			var curStr:String = "";
 			for (var i:int = 0; i < colorStrings.length; i++) {
 				var colorText:ColorText = colorStrings[i];
-				curStr += formatChunks[i] + colorText.text;
-				super.text = curStr;
-
-				var highlightText:FlxText = new FlxText( -1, -1, width, colorText.text).setFormat(font, size, colorText.color);
-				highlightText.x = x + endWidth - highlightText.textWidth;
-				highlightText.y = y + height - highlightText.height;
-				if (highlightText.y != y)
-					highlightText.x -= 1; //hack
-				highlightTexts.push(highlightText);
+				curStr += formatChunks[i] + "" + colorText.text +"";
 			}
-			super.text = curStr + formatChunks[formatChunks.length - 1];
-
-			for each (highlightText in highlightTexts) {
-				//replicating 'stamp()'
-				_flashPoint.x = highlightText.x - x;
-				if ('right' == alignment)
-					_flashPoint.x += width - textWidth - 4; //-4 = hack
-				_flashPoint.y = highlightText.y - y;
-				_flashRect2.width = highlightText.framePixels.width;
-				_flashRect2.height = highlightText.framePixels.height;
-				framePixels.copyPixels(highlightText.framePixels,_flashRect2,_flashPoint,null,null,true);
-				_flashRect2.width = _pixels.width;
-				_flashRect2.height = _pixels.height;
-			}
-
-			DEBUG_HIGHLIGHT_TEXTS = highlightTexts;
+			_textField.htmlText = curStr + formatChunks[formatChunks.length - 1];
+			_regen = true;
+			calcFrame();
 		}

 		override public function setFormat(Font:String = null, Size:Number = 8, Color:uint = 0xffffff, Align:String = 'left', ShadowColor:uint = 0):FlxText {
-			Align = ALLOWED_ALIGNMENTS.indexOf(Align) != -1 ? Align : 'left';
 			super.setFormat(Font, Size, Color, Align, ShadowColor);
 			generate();
 			return this;
@@ -74,13 +49,12 @@
 		}

-		override public function set color(Color:uint):void {
+		override public function set color(Color:uint):void { ///?????
 			super.color = Color;
 			generate();
 		}

 		override public function set alignment(Alignment:String):void {
-			Alignment = ALLOWED_ALIGNMENTS.indexOf(Alignment) != -1 ? Alignment : 'left';
 			super.alignment = Alignment;
 			generate();
 		}
@@ -91,7 +65,6 @@
 		}

 		public static const FORMAT_MARK:String = "{}";
-		private const ALLOWED_ALIGNMENTS:Array = ["left", "right"];
 	}

 }


Re-arranged objects in file

Re-arranged objects in file

--- DroneAnarchy/Resources/Scripts/GameObjects.as
+++ DroneAnarchy/Resources/Scripts/GameObjects.as
@@ -21,6 +21,191 @@
 const int DRONE_COLLISION_LAYER = 3;
 const int FLOOR_COLLISION_LAYER = 5;
 const int SCORE_ADDITION_RATE = 1;
+
+
+
+///Bullet Base Class
+abstract class BulletObjectBase : ScriptObject
+{
+	float termTime_;
+	float termTimeCounter_;
+	BulletObjectType bulletObjectType_;
+	float damagePoint_;
+
+
+	void DelayedStart()
+	{
+		SubscribeToEvent(node, "NodeCollision", "HandleNodeCollision");
+		Initialise();
+	}
+
+	void Initialise(){}
+
+
+	void FixedUpdate(float timestep)
+	{
+		termTimeCounter_ += timestep;
+
+		if(termTimeCounter_ >= termTime_)
+		{
+			Destroy();
+		}
+	}
+
+
+	void HandleNodeCollision(StringHash eventType, VariantMap& eventData)
+	{
+		Node@ otherNode = eventData["OtherNode"].GetPtr();
+		DroneObjectBase@ droneObj = cast<DroneObjectBase>(otherNode.scriptObject);
+
+
+		if(droneObj !is null)
+		{
+			droneObj.OnHit(damagePoint_);
+		}
+
+		Destroy();
+	}
+
+	void Destroy()
+	{
+		node.Remove();
+	}
+
+}
+
+///Low Level Bullet Object
+class LowLevelBullet : BulletObjectBase
+{
+	LowLevelBullet()
+	{
+		bulletObjectType_ = BOT_LOW;
+		termTime_ = 1;
+		termTimeCounter_ = 0;
+		damagePoint_ = 1;
+	}
+
+	void Initialise()
+	{
+		BillboardSet@ bbSet = node.CreateComponent("BillboardSet");
+		bbSet.numBillboards = 1;
+		bbSet.material = cache.GetResource("Material", "Resources/Materials/bullet_particle.xml");
+
+		ParticleEmitter@ pEmitter = node.CreateComponent("ParticleEmitter");
+		pEmitter.effect = cache.GetResource("ParticleEffect", "Resources/Particles/bullet_particle.xml");
+		pEmitter.enabled = true;
+
+
+		RigidBody@ objBody = node.CreateComponent("RigidBody");
+		objBody.mass = 1.0f;
+		objBody.trigger = true;
+		objBody.useGravity = false;
+		objBody.ccdRadius = 0.05;
+		objBody.ccdMotionThreshold = 0.15f;
+		objBody.SetCollisionLayerAndMask(BULLET_COLLISION_LAYER, DRONE_COLLISION_LAYER | FLOOR_COLLISION_LAYER);
+
+		CollisionShape@ objShape = node.CreateComponent("CollisionShape");
+		objShape.SetSphere(0.3f);
+		objBody.linearVelocity = node.rotation * Vector3(0,0,70);
+	}
+
+}
+
+
+
+///Weapon Base Class
+abstract class WeaponObjectBase
+{
+	Node@ refNode_;
+
+	WeaponObjectBase(Node@ refNode)
+	{
+		refNode_ = refNode;
+	}
+	void Fire(){}
+}
+
+
+///Ordinary Weapon
+class OrdinaryWeapon : WeaponObjectBase
+{
+	void Fire()
+	{
+		SpawnBullet(true);
+		SpawnBullet(false);
+		VariantMap eventData;
+		eventData["SoundNode"] = refNode_;
+		eventData["SoundName"] = "Resources/Sounds/boom1.wav";
+		SendEvent("SoundGenerated", eventData);
+	}
+
+	OrdinaryWeapon(Node@ refNode)
+	{
+		super(refNode);
+	}
+
+	void SpawnBullet(bool first)
+	{
+		Node@ bulletNode = refNode_.scene.CreateChild();
+		bulletNode.worldPosition = refNode_.worldPosition;
+		bulletNode.rotation = refNode_.worldRotation;
+
+		float xOffSet = 0.3f * (first ? 1 : -1);
+		bulletNode.Translate(Vector3(xOffSet,-0.2,0));
+
+		bulletNode.CreateScriptObject(scriptFile, "LowLevelBullet");
+	}
+}
+
+
+
+
+///Explosion Object Base
+abstract class ExplosionObjectBase : ScriptObject
+{
+	float duration_;
+
+	void DelayedStart()
+	{
+		Initialise();
+	}
+
+	void Initialise(){}
+}
+
+///Explosion Object
+class SimpleExplosion : ExplosionObjectBase
+{
+
+	SimpleExplosion()
+	{
+		duration_ = 0.78f;
+	}
+
+	void FixedUpdate(float timestep)
+	{
+		duration_ -= timestep;
+		if(duration_ < 0.0f)
+		{
+			node.Remove();
+		}
+	}
+
+	void Initialise()
+	{
+		ParticleEmitter@ pEmitter = node.CreateComponent("ParticleEmitter");
+		pEmitter.effect = cache.GetResource("ParticleEffect", "Resources/Particles/explosion.xml");
+		pEmitter.enabled = true;
+
+		VariantMap eventData;
+		eventData["SoundNode"] = node;
+		eventData["SoundName"] = "Resources/Sounds/explosion.ogg";
+		SendEvent("SoundGenerated", eventData);
+	}
+
+
+}
+

 ///Player Object

@@ -283,184 +468,3 @@

 }
-
-
-///Bullet Base Class
-abstract class BulletObjectBase : ScriptObject
-{
-	float termTime_;
-	float termTimeCounter_;
-	BulletObjectType bulletObjectType_;
-	float damagePoint_;
-
-
-	void DelayedStart()
-	{
-		SubscribeToEvent(node, "NodeCollision", "HandleNodeCollision");
-		Initialise();
-	}
-
-	void Initialise(){}
-
-
-	void FixedUpdate(float timestep)
-	{
-		termTimeCounter_ += timestep;
-
-		if(termTimeCounter_ >= termTime_)
-		{
-			Destroy();
-		}
-	}
-
-
-	void HandleNodeCollision(StringHash eventType, VariantMap& eventData)
-	{
-		Node@ otherNode = eventData["OtherNode"].GetPtr();
-		DroneObjectBase@ droneObj = cast<DroneObjectBase>(otherNode.scriptObject);
-
-
-		if(droneObj !is null)
-		{
-			droneObj.OnHit(damagePoint_);
-		}
-
-		Destroy();
-	}
-
-	void Destroy()
-	{
-		node.Remove();
-	}
-
-}
-
-///Low Level Bullet Object
-class LowLevelBullet : BulletObjectBase
-{
-	LowLevelBullet()
-	{
-		bulletObjectType_ = BOT_LOW;
-		termTime_ = 1;
-		termTimeCounter_ = 0;
-		damagePoint_ = 1;
-	}
-
-	void Initialise()
-	{
-		BillboardSet@ bbSet = node.CreateComponent("BillboardSet");
-		bbSet.numBillboards = 1;
-		bbSet.material = cache.GetResource("Material", "Resources/Materials/bullet_particle.xml");
-
-		ParticleEmitter@ pEmitter = node.CreateComponent("ParticleEmitter");
-		pEmitter.effect = cache.GetResource("ParticleEffect", "Resources/Particles/bullet_particle.xml");
-		pEmitter.enabled = true;
-
-
-		RigidBody@ objBody = node.CreateComponent("RigidBody");
-		objBody.mass = 1.0f;
-		objBody.trigger = true;
-		objBody.useGravity = false;
-		objBody.ccdRadius = 0.05;
-		objBody.ccdMotionThreshold = 0.15f;
-		objBody.SetCollisionLayerAndMask(BULLET_COLLISION_LAYER, DRONE_COLLISION_LAYER | FLOOR_COLLISION_LAYER);
-
-		CollisionShape@ objShape = node.CreateComponent("CollisionShape");
-		objShape.SetSphere(0.3f);
-		objBody.linearVelocity = node.rotation * Vector3(0,0,70);
-	}
-
-}
-
-///Explosion Object Base
-abstract class ExplosionObjectBase : ScriptObject
-{
-	float duration_;
-
-	void DelayedStart()
-	{
-		Initialise();
-	}
-
-	void Initialise(){}
-}
-
-///Explosion Object
-class SimpleExplosion : ExplosionObjectBase
-{
-
-	SimpleExplosion()
-	{
-		duration_ = 0.78f;
-	}
-
-	void FixedUpdate(float timestep)
-	{
-		duration_ -= timestep;
-		if(duration_ < 0.0f)
-		{
-			node.Remove();
-		}
-	}
-
-	void Initialise()
-	{
-		ParticleEmitter@ pEmitter = node.CreateComponent("ParticleEmitter");
-		pEmitter.effect = cache.GetResource("ParticleEffect", "Resources/Particles/explosion.xml");
-		pEmitter.enabled = true;
-
-		VariantMap eventData;
-		eventData["SoundNode"] = node;
-		eventData["SoundName"] = "Resources/Sounds/explosion.ogg";
-		SendEvent("SoundGenerated", eventData);
-	}
-
-
-}
-
-
-
-///Weapon Base Class
-abstract class WeaponObjectBase
-{
-	Node@ refNode_;
-
-	WeaponObjectBase(Node@ refNode)
-	{
-		refNode_ = refNode;
-	}
-	void Fire(){}
-}
-
-
-///Ordinary Weapon
-class OrdinaryWeapon : WeaponObjectBase
-{
-	void Fire()
-	{
-		SpawnBullet(true);
-		SpawnBullet(false);
-		VariantMap eventData;
-		eventData["SoundNode"] = refNode_;
-		eventData["SoundName"] = "Resources/Sounds/boom1.wav";
-		SendEvent("SoundGenerated", eventData);
-	}
-
-	OrdinaryWeapon(Node@ refNode)
-	{
-		super(refNode);
-	}
-
-	void SpawnBullet(bool first)
-	{
-		Node@ bulletNode = refNode_.scene.CreateChild();
-		bulletNode.worldPosition = refNode_.worldPosition;
-		bulletNode.rotation = refNode_.worldRotation;
-
-		float xOffSet = 0.3f * (first ? 1 : -1);
-		bulletNode.Translate(Vector3(xOffSet,-0.2,0));
-
-		bulletNode.CreateScriptObject(scriptFile, "LowLevelBullet");
-	}
-}
-


Granting room permissions and requesting room affiliations changed to admin namespace instead of owner to match spec.

Standardized extension variable naming.

git-svn-id: c197267f952b24206666de142881703007ca05d5@11794 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/igniterealtime/xiff/conference/Room.as
+++ src/org/igniterealtime/xiff/conference/Room.as
@@ -305,8 +305,7 @@

 			for each ( var banJID:UnescapedJID in jids )
 			{
-				adminExt.addItem( Room.AFFILIATION_OUTCAST, null, null, banJID.escaped,
-								  null, null );
+				adminExt.addItem( Room.AFFILIATION_OUTCAST, null, null, banJID.escaped, null, null );
 			}

 			iq.addExtension( adminExt );
@@ -327,13 +326,13 @@
 		public function cancelConfiguration():void
 		{
 			var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET );
-			var owner:MUCOwnerExtension = new MUCOwnerExtension();
+			var ownerExt:MUCOwnerExtension = new MUCOwnerExtension();
 			var form:FormExtension = new FormExtension();

 			form.type = FormExtension.TYPE_CANCEL;

-			owner.addExtension( form );
-			iq.addExtension( owner );
+			ownerExt.addExtension( form );
+			iq.addExtension( ownerExt );
 			_connection.send( iq );
 		}

@@ -368,7 +367,7 @@
 		public function configure( fieldmap:Object ):void
 		{
 			var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET );
-			var owner:MUCOwnerExtension = new MUCOwnerExtension();
+			var ownerExt:MUCOwnerExtension = new MUCOwnerExtension();
 			var form:FormExtension;

 			if ( fieldmap is FormExtension )
@@ -382,10 +381,10 @@
 				form.setFields( fieldmap );
 			}
 			form.type = FormExtension.TYPE_SUBMIT;
-			owner.addExtension( form );
+			ownerExt.addExtension( form );

 			iq.callback = finish_configure;
-			iq.addExtension( owner );
+			iq.addExtension( ownerExt );

 			_connection.send( iq );
 		}
@@ -407,11 +406,11 @@
 		public function decline( jid:UnescapedJID, reason:String ):void
 		{
 			var message:Message = new Message( roomJID.escaped )
-			var muc:MUCUserExtension = new MUCUserExtension();
-
-			muc.decline( jid.escaped, undefined, reason );
-
-			message.addExtension( muc );
+			var userExt:MUCUserExtension = new MUCUserExtension();
+
+			userExt.decline( jid.escaped, undefined, reason );
+
+			message.addExtension( userExt );
 			_connection.send( message );
 		}

@@ -426,7 +425,7 @@
 		public function destroy( reason:String, alternateJID:UnescapedJID = null, callback:Function = null ):void
 		{
 			var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET );
-			var owner:MUCOwnerExtension = new MUCOwnerExtension();
+			var ownerExt:MUCOwnerExtension = new MUCOwnerExtension();
 			var jid:EscapedJID;
 			if (alternateJID != null)
 			{
@@ -434,9 +433,9 @@
 			}

 			iq.callback = callback;
-			owner.destroy( reason, jid );
-
-			iq.addExtension( owner );
+			ownerExt.destroy( reason, jid );
+
+			iq.addExtension( ownerExt );
 			_connection.send( iq );
 		}

@@ -470,8 +469,8 @@
 				return;
 			}

-			var owner:MUCOwnerExtension = iq.getAllExtensionsByNS( MUCOwnerExtension.NS )[ 0 ];
-			var form:FormExtension = owner.getAllExtensionsByNS( FormExtension.NS )[ 0 ];
+			var ownerExt:MUCOwnerExtension = iq.getAllExtensionsByNS( MUCOwnerExtension.NS )[ 0 ];
+			var form:FormExtension = ownerExt.getAllExtensionsByNS( FormExtension.NS )[ 0 ];

 			if ( form.type == FormExtension.TYPE_REQUEST )
 			{
@@ -516,16 +515,16 @@
 		public function grant( affiliation:String, jids:Array ):void
 		{
 			var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET );
-			var owner:MUCOwnerExtension = new MUCOwnerExtension();
+			var adminExt:MUCAdminExtension = new MUCAdminExtension();

 			iq.callback = finish_admin;

 			for each ( var jid:UnescapedJID in jids )
 			{
-				owner.addItem( affiliation, null, null, jid.escaped, null, null );
-			}
-
-			iq.addExtension( owner );
+				adminExt.addItem( affiliation, null, null, jid.escaped, null, null );
+			}
+
+			iq.addExtension( adminExt );
 			_connection.send( iq );
 		}

@@ -545,11 +544,11 @@
 		public function invite( jid:UnescapedJID, reason:String ):void
 		{
 			var message:Message = new Message( roomJID.escaped );
-			var muc:MUCUserExtension = new MUCUserExtension();
-
-			muc.invite( jid.escaped, undefined, reason );
-
-			message.addExtension( muc );
+			var userExt:MUCUserExtension = new MUCUserExtension();
+
+			userExt.invite( jid.escaped, undefined, reason );
+
+			message.addExtension( userExt );
 			_connection.send( message );
 		}

@@ -675,11 +674,10 @@
 		{
 			if ( isActive )
 			{
-				var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET, XMPPStanza.generateID( "kick_occupant_" ));
-				var ext:MUCAdminExtension = new MUCAdminExtension( iq.getNode());
-				//ext.addItem(null, MUC.ROLE_NONE, null, null, null, reason);
-				ext.addItem( null, MUC.ROLE_NONE, occupantNick, null, null, reason );
-				iq.addExtension( ext );
+				var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET, XMPPStanza.generateID( "kick_occupant_" ) );
+				var adminExt:MUCAdminExtension = new MUCAdminExtension( iq.getNode() );
+				adminExt.addItem( null, MUC.ROLE_NONE, occupantNick, null, null, reason );
+				iq.addExtension( adminExt );
 				_connection.send( iq );
 			}
 		}
@@ -730,8 +728,8 @@
 			finish_admin( iq );
 			if ( iq.type == IQ.TYPE_RESULT )
 			{
-				var owner:MUCOwnerExtension = iq.getAllExtensionsByNS( MUCOwnerExtension.NS )[ 0 ];
-				var items:Array = owner.getAllItems();
+				var adminExt:MUCAdminExtension = iq.getAllExtensionsByNS( MUCAdminExtension.NS )[ 0 ];
+				var items:Array = adminExt.getAllItems();
 				// trace("Affiliates: " + items);
 				var event:RoomEvent = new RoomEvent( RoomEvent.AFFILIATIONS );
 				event.data = items;
@@ -762,15 +760,18 @@
 		 */
 		private function handleEvent( eventObj:Object ):void
 		{
+			var userExt:MUCUserExtension;
+
 			switch ( eventObj.type )
 			{
 				case "message":
 					var message:Message = eventObj.data;
+					var userExts:Array = message.getAllExtensionsByNS( MUCUserExtension.NS );
+					var roomEvent:RoomEvent;

 					// Check to see that the message is from this room
 					if ( isThisRoom( message.from.unescaped ))
 					{
-						var roomEvent:RoomEvent;
 						if ( message.type == Message.TYPE_GROUPCHAT )
 						{
 							// Check for a subject change
@@ -785,8 +786,7 @@
 							{
 								//silently ignore "room is not anonymous" message, identified by status code 100
 								//Clients should display that information in their UI based on the appropriate room property
-								var userexts:Array = message.getAllExtensionsByNS( MUCUserExtension.NS );
-								if ( !userexts || userexts.length == 0 || !( userexts[ 0 ].hasStatusCode( 100 )))
+								if ( !userExts || userExts.length == 0 || !( userExts[ 0 ].hasStatusCode( 100 )))
 								{
 									roomEvent = new RoomEvent( RoomEvent.GROUP_MESSAGE );
 									roomEvent.nickname = message.from.resource;
@@ -821,16 +821,15 @@
 					}
 					else
 					{
-						// Could be an decline to a previous invite
-						var mucExtensions:Array = message.getAllExtensionsByNS( MUCUserExtension.NS );
-						if ( mucExtensions != null && mucExtensions.length > 0 )
+						// Could be a decline to a previous invite
+						if ( userExts != null && userExts.length > 0 )
 						{
-							var muc:MUCUserExtension = mucExtensions[ 0 ];
-							if ( muc && muc.type == MUCUserExtension.TYPE_DECLINE )
+							userExt = userExts[ 0 ];
+							if ( userExt && userExt.type == MUCUserExtension.TYPE_DECLINE )
 							{
 								roomEvent = new RoomEvent( RoomEvent.DECLINED );
-								roomEvent.from = muc.reason;
-								roomEvent.reason = muc.reason;
+								roomEvent.from = userExt.reason;
+								roomEvent.reason = userExt.reason;
 								roomEvent.data = message;
 								dispatchEvent( roomEvent );
 							}
@@ -888,8 +887,8 @@
 								pendingNickname = null;
 							}

-							var user:MUCUserExtension = presence.getAllExtensionsByNS( MUCUserExtension.NS )[ 0 ];
-							for each ( var status:MUCStatus in user.statuses )
+							userExt = presence.getAllExtensionsByNS( MUCUserExtension.NS )[ 0 ];
+							for each ( var status:MUCStatus in userExt.statuses )
 							{
 								switch ( status.code )
 								{
@@ -915,7 +914,7 @@
 							{
 								//trace("Room: becoming inactive: " + presence.getNode());
 								setActive( false );
-								if ( user.type == MUCUserExtension.TYPE_DESTROY )
+								if ( userExt.type == MUCUserExtension.TYPE_DESTROY )
 								{
 									roomEvent = new RoomEvent( RoomEvent.ROOM_DESTROYED );
 								}
@@ -972,13 +971,13 @@
 				// so the application can decide to block configuration messages

 				var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET );
-				var owner:MUCOwnerExtension = new MUCOwnerExtension();
+				var ownerExt:MUCOwnerExtension = new MUCOwnerExtension();
 				var form:FormExtension = new FormExtension();

 				form.type = FormExtension.TYPE_SUBMIT;

-				owner.addExtension( form );
-				iq.addExtension( owner );
+				ownerExt.addExtension( form );
+				iq.addExtension( ownerExt );
 				_connection.send( iq );
 			}
 		}
@@ -1020,8 +1019,8 @@
 				{
 					removeItemAt( getItemIndex( occupant ));

-					var user:MUCUserExtension = aPresence.getAllExtensionsByNS( MUCUserExtension.NS )[ 0 ];
-					for each ( var status:MUCStatus in user.statuses )
+					var userExt:MUCUserExtension = aPresence.getAllExtensionsByNS( MUCUserExtension.NS )[ 0 ];
+					for each ( var status:MUCStatus in userExt.statuses )
 					{
 						switch ( status.code )
 						{
@@ -1092,13 +1091,13 @@
 		public function requestAffiliations( affiliation:String ):void
 		{
 			var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_GET );
-			var owner:MUCOwnerExtension = new MUCOwnerExtension();
+			var adminExt:MUCAdminExtension = new MUCAdminExtension();

 			iq.callback = finish_requestAffiliates;

-			owner.addItem( affiliation );
-
-			iq.addExtension( owner );
+			adminExt.addItem( affiliation );
+
+			iq.addExtension( adminExt );
 			_connection.send( iq );
 		}

@@ -1117,10 +1116,10 @@
 		public function requestConfiguration():void
 		{
 			var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_GET );
-			var owner:MUCOwnerExtension = new MUCOwnerExtension();
+			var ownerExt:MUCOwnerExtension = new MUCOwnerExtension();

 			iq.callback = finish_requestConfiguration;
-			iq.addExtension( owner );
+			iq.addExtension( ownerExt );

 			_connection.send( iq );
 		}
@@ -1203,9 +1202,9 @@
 			if ( isActive )
 			{
 				var iq:IQ = new IQ( roomJID.escaped, IQ.TYPE_SET, XMPPStanza.generateID( "voice_" ) );
-				var ext:MUCAdminExtension = new MUCAdminExtension( iq.getNode() );
-				ext.addItem( null, voice ? MUC.ROLE_PARTICIPANT : MUC.ROLE_VISITOR, occupantNick );
-				iq.addExtension( ext );
+				var adminExt:MUCAdminExtension = new MUCAdminExtension( iq.getNode() );
+				adminExt.addItem( null, voice ? MUC.ROLE_PARTICIPANT : MUC.ROLE_VISITOR, occupantNick );
+				iq.addExtension( adminExt );
 				_connection.send( iq );
 			}
 		}


added support for user entering 0xFFFFFF number format

--- WeaveUI/src/weave/editors/DynamicEditor.as
+++ WeaveUI/src/weave/editors/DynamicEditor.as
@@ -357,6 +357,15 @@
 		}
 		catch (e:Error)
 		{
+			if (value is String)
+			{
+				var number:Number = StandardLib.asNumber(value);
+				if (isFinite(number))
+				{
+					lv.setSessionState(number);
+					return;
+				}
+			}
 			// do nothing because user input was invalid
 			host.errorString = lang("Invalid JSON");
 			return;


Update Recorder to dispatch only RecorderEvents

--- src/flash/Recorder.as
+++ src/flash/Recorder.as
@@ -17,11 +17,15 @@
     import flash.media.Microphone;

 	import Base64;
+	import RecorderEvent;

 	public class Recorder extends Sprite {

 		private var muted:Boolean = true;
 		private var recording:Boolean = false;
+		private var time:int = 0;
+		private var duration:int = 0;
+
 		private var mic:Microphone;
 		private var wavEncoder:WaveEncoder = new WaveEncoder();
 		private var micRecorder:MicRecorder = new MicRecorder(wavEncoder);
@@ -33,13 +37,28 @@
 			Security.showSettings("2");
 		}

+		private function addEventListeners():void {
+			addEventListener(Event.ENTER_FRAME, onEnterFrame);
+			mic.addEventListener(StatusEvent.STATUS, onMicStatus, false, 0, true);
+			micRecorder.addEventListener(RecordingEvent.RECORDING, onRecording);
+			micRecorder.addEventListener(Event.COMPLETE, onComplete);
+		}
+
 		// Methods
 		public function isMuted():Boolean {
 			return muted;
 		}

-		public function getActivityLevel():Number {
+		public function getActivityLevel():int {
 			return mic.activityLevel;
+		}
+
+		public function getTime():int {
+			return this.time;
+		}
+
+		public function getDuration():int {
+			return this.duration;
 		}

 		public function getDataURL():String {
@@ -62,23 +81,30 @@
 		}

 		// Event Handlers
+		private function onEnterFrame(e:Event):void {
+			var data:Object = {muted: this.muted, recording: this.recording, volume: mic.activityLevel};
+			if (this.time) data.time = this.time;
+			dispatchEvent(new RecorderEvent(RecorderEvent.STATUS, data, true));
+		}
+
 		private function onRecording(e:RecordingEvent):void {
-			dispatchEvent(new Event('Recorder.recording', true));
+			var data:Object = {time: e.time, volume: mic.activityLevel};
+			dispatchEvent(new RecorderEvent(RecorderEvent.RECORDING, data, true));
 		}

 		private function onComplete(e:Event):void {
-			dispatchEvent(new Event('Recorder.complete', true));
+			var data:Object = {};
+			dispatchEvent(new RecorderEvent(RecorderEvent.COMPLETE, data, true));
 		}

 		private function onMicStatus(e:StatusEvent):void {
 			if (e.code == "Microphone.Unmuted"){
 				muted = false;
 				mic.removeEventListener(StatusEvent.STATUS, onMicStatus);
-				dispatchEvent(new Event('Recorder.enabled', true));
+				dispatchEvent(new RecorderEvent(RecorderEvent.ENABLED, true));
 			} else if (e.code == "Microphone.Muted") {
-				muted = true;
 				mic.removeEventListener(StatusEvent.STATUS, onMicStatus);
-				dispatchEvent(new Event('Recorder.disabled', true));
+				dispatchEvent(new RecorderEvent(RecorderEvent.DISABLED, true));
 			}
 		}

@@ -98,12 +124,6 @@
 			mic.setUseEchoSuppression(true);
 		}

-		private function addEventListeners():void {
-			mic.addEventListener(StatusEvent.STATUS, onMicStatus, false, 0, true);
-			micRecorder.addEventListener(RecordingEvent.RECORDING, onRecording);
-			micRecorder.addEventListener(Event.COMPLETE, onComplete);
-		}
-
 	}

 }


Print error if trying to package an AIR app for macOS on Windows (or for Windows on macOS)

--- src/ASConfigC.as
+++ src/ASConfigC.as
@@ -225,6 +225,18 @@
 						if(typeof airPlatformValue === "string")
 						{
 							this._airPlatform = airPlatformValue as String;
+							if(this._airPlatform === AIRPlatformType.MAC &&
+								process.platform !== "darwin")
+							{
+								console.error("Error: Adobe AIR applications for macOS cannot be packaged on this platorm.");
+								process.exit(1);
+							}
+							else if(this._airPlatform === AIRPlatformType.WINDOWS &&
+								process.platform !== "win32")
+							{
+								console.error("Error: Adobe AIR applications for Windows cannot be packaged on this platform.");
+								process.exit(1);
+							}
 						}
 						else
 						{


StreamBuffer.as : don't trigger timer too often

--- src/org/mangui/hls/stream/StreamBuffer.as
+++ src/org/mangui/hls/stream/StreamBuffer.as
@@ -119,6 +119,9 @@
                     // remember position of first tag injected after seek. it will be used for playlist sliding computation
                     _first_start_position = start_position;
                 }
+                /* if in seeking mode, force timer start here, this could help reducing the seek time by 100ms
+                 */
+                _timer.start();
             }
             // update buffer min/max table indexed with continuity counter
             if (_buffer_pts[continuity] == undefined) {
@@ -126,7 +129,6 @@
             } else {
                 (_buffer_pts[continuity] as BufferPTS).max = max_pts;
             }
-            _timer.start();
         }

         /** Return current media position **/
@@ -185,10 +187,10 @@
                     tags.push(flvdata.tag);
                 }
                 if (tags.length) {
-                    (_hls.stream as HLSNetStream).appendTags(tags);
                     CONFIG::LOGGING {
                         Log.debug2("appending " + tags.length + " tags, max duration:" + duration);
                     }
+                    (_hls.stream as HLSNetStream).appendTags(tags);
                 }
             }
         }


Change 20081209-maxcarlson-K by maxcarlson@Bank.lan on 2008-12-09 05:03:02 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: swf9: prevent duplicate onkeydown events

Bugs Fixed: LPP-7432 - onkeydown event keep firing

Technical Reviewer: andre.bargull@udo.edu
QA Reviewer: promanik

Details: Cache last value of onkeydown to prevent duplicate events from being sent

Tests: See LPP-7432

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@12035 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
@@ -14,13 +14,22 @@
     function __keyboardEvent ( e, t ){
         var delta = {};
         var s, k = e.keyCode;
+        var keyisdown = t == 'onkeydown';
         s = String.fromCharCode(k).toLowerCase();
-        delta[s] = (t == "onkeydown");
+        if (keyisdown) {
+            // prevent duplicate onkeydown events - see LPP-7432
+            if (k == __lastkeydown) return;
+            __lastkeydown = k;
+        } else {
+            __lastkeydown = null;
+        }
+        delta[s] = keyisdown;
         if (this.__callback) this.__scope[this.__callback](delta, k, t);
     }

     var __callback = null;
     var __scope = null;
+    var __lastkeydown = null;

     function setCallback (scope, funcname) {
         this.__scope = scope;


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

--- frameworks/projects/charts/src/mx/charts/CategoryAxis.as
+++ frameworks/projects/charts/src/mx/charts/CategoryAxis.as
@@ -0,0 +1,1043 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts
+{
+
+import flash.events.Event;
+
+import mx.charts.chartClasses.AxisBase;
+import mx.charts.chartClasses.AxisLabelSet;
+import mx.charts.chartClasses.IAxis;
+import mx.collections.ArrayCollection;
+import mx.collections.CursorBookmark;
+import mx.collections.ICollectionView;
+import mx.collections.IViewCursor;
+import mx.collections.XMLListCollection;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+use namespace mx_internal;
+
+/**
+ *  The CategoryAxis class lets charts represent data
+ *  grouped by a set of discrete values along an axis.
+ *  You typically use the CategoryAxis class to define
+ *  a set of labels that appear along an axis of a chart.
+ *  For example, charts that render data according to City,
+ *  Year, Business unit, and so on.
+ *
+ *
You are not required to explicitly set the dataProvider property
+ *  on a CategoryAxis. A CategoryAxis used in a chart inherits its
+ *  dataProvider property from the containing chart.

+ *
+ *
While you can use the same data provider to provide data
+ *  to the chart and categories to the CategoryAxis, a CategoryAxis
+ *  can optimize rendering if its data provider is relatively static.
+ *  If possible, ensure that the categories are relatively static
+ *  and that changing data is stored in separate data providers.

+ *
+ *
The dataProvider property can accept
+ *  either an array of strings or an array of records (Objects)
+ *  with a property that specifies the category name.
+ *  If you specify a categoryField property,
+ *  the CategoryAxis assumes that the data provider is an array of Objects.
+ *  If the value of the categoryField property is null,
+ *  the CategoryAxis assumes that the data provider is an array of Strings.

+ *
+ *  @mxml
+ *
+ *
The <mx:CategoryAxis> tag inherits all the properties
+ *  of its parent classes and adds the following properties:

+ *
+ *

+ *  <mx:CategoryAxis
+ *    Properties
+ *    categoryField="null"
+ *    dataFunction="No default"
+ *    dataProvider="No default"
+ *    labelFunction="No default"
+ *    padding="Default depends on chart type"
+ *    ticksBetweenLabels="true"
+ *  />
+ *

+ *
+ *  @includeExample examples/HLOCChartExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class CategoryAxis extends AxisBase implements IAxis
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function CategoryAxis()
+    {
+        super();
+
+        workingDataProvider = new ArrayCollection();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var _cursor:IViewCursor;
+
+    /**
+     *  @private
+     */
+    private var _catMap:Object;
+
+    /**
+     *  @private
+     */
+    private var _categoryValues:Array /* of Object */;
+
+    /**
+     *  @private
+     */
+    private var _labelsMatchToCategoryValuesByIndex:Array /* of AxisLabel */;
+
+    /**
+     *  @private
+     */
+    private var _cachedMinorTicks:Array /* of Number */ = null;
+
+    /**
+     *  @private
+     */
+    private var _cachedTicks:Array /* of Number */ = null;
+
+    /**
+     *  @private
+     */
+    private var _labelSet:AxisLabelSet;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  chartDataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the chartDataProvider property.
+     */
+    private var _chartDataProvider:Object;
+
+    /**
+     *  @private
+     */
+    override public function set chartDataProvider(value:Object):void
+    {
+		if(_chartDataProvider != value)
+		{
+        	_chartDataProvider = value;
+
+	        if (!_userDataProvider)
+    	        workingDataProvider = _chartDataProvider;
+		}
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baseline
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get baseline():Number
+    {
+        return -_padding;
+    }
+
+    //----------------------------------
+    //  categoryField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the categoryField property.
+     */
+    private var _categoryField:String = "";
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Specifies the field of the data provider
+     *  containing the text for the labels.
+     *  If this property is null, CategoryAxis assumes
+     *  that the dataProvider contains an array of Strings.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get categoryField():String
+    {
+        return _categoryField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set categoryField(value:String):void
+    {
+        _categoryField = value;
+
+        collectionChangeHandler();
+    }
+
+    //---------------------------------
+    // dataFunction
+    //---------------------------------
+
+    [Bindable]
+    [Inspectable(category="General")]
+
+    /**
+     *  @private
+     * Storage for dataFunction property
+     */
+     private var _dataFunction:Function = null;
+
+    /**
+     * Specifies a method that returns the value that should be used as
+     * categoryValue for current item.If this property is set, the return
+     * value of the custom data function takes precedence over
+     * categoryField
+     *
+     *
The custom dataFunction has the following signature:
+     *
+     *

+     * function_name (axis:CategoryAxis, item:Object):Object { ... }
+     *

+     *
+     * axis is the current axis that uses this dataFunction
+     * item is the item in the dataProvider that is considered.
+     * This function returns an object.
+     *

+     *
+     *
An example usage of a customized dataFunction is to return a value
+     * from a dataProvider that has items with nested fields

+     *
+     * @example
+     *

+     * public function myFunction(axis:CategoryAxis,item:Object):Object {
+     *      return(item.Country.State);
+     * }
+     *

+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get dataFunction():Function
+    {
+        return _dataFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataFunction(value:Function):void
+    {
+        _dataFunction = value;
+        collectionChangeHandler();
+    }
+
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dataProvider property.
+     */
+    private var _dataProvider:ICollectionView;
+
+    /**
+     *  @private
+     */
+    private var _userDataProvider:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Specifies the data source containing the label names.
+     *  The dataProvider can be an Array of Strings, an Array of Objects,
+     *  or any object that implements the IList or ICollectionView interface.
+     *  If the dataProvider is an Array of Strings,
+     *  ensure that the categoryField property
+     *  is set to null.
+     *  If the dataProvider is an Array of Objects,
+     *  set the categoryField property
+     *  to the name of the field that contains the label text.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get dataProvider():Object
+    {
+        return _dataProvider;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataProvider(value:Object):void
+    {
+        _userDataProvider = value;
+
+        if (_userDataProvider != null)
+            workingDataProvider = _userDataProvider;
+        else
+            workingDataProvider = _chartDataProvider;
+    }
+
+    //----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the labelFunction property.
+     */
+    private var _labelFunction:Function = null;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Specifies a function that defines the labels that are generated
+     *  for each item in the CategoryAxis's dataProvider.
+     *  If no labelFunction is provided,
+     *  the axis labels default to the value of the category itself.
+     *
+     *
The labelFunction method for a CategoryAxis
+     *  has the following signature:

+     *

+     *  function function_name(categoryValue:Object, previousCategoryValue:Object, axis:CategoryAxis, categoryItem:Object):String { ... }
+     *

+     *
+     *
Where:

+     *

+     *
categoryValue is the value of the category to be represented.

+     *
previousCategoryValue is the value of the previous category on the axis.

+     *
axis is the CategoryAxis being rendered.

+     *
categoryItem is the item from the dataProvider
+     *     that is being represented.

+     *

+     *
+     *
Flex displays the returned String as the axis label.

+     *
+     *
If the categoryField property is not set, the value
+     *  will be the same as the categoryValue property.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get labelFunction():Function
+    {
+        return _labelFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelFunction(value:Function):void
+    {
+        _labelFunction = value;
+
+        invalidateCategories();
+    }
+
+    //----------------------------------
+    //  minorTicks (private)
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private function get minorTicks():Array /* of Number */
+    {
+        if (!_cachedMinorTicks)
+        {
+            _cachedMinorTicks = [];
+
+            var n:int;
+            var min:Number;
+            var max:Number;
+            var alen:Number;
+            var i:Number;
+
+            if (_ticksBetweenLabels == false)
+            {
+                n = _categoryValues.length;
+                min = -_padding;
+                max = n - 1 + _padding;
+                alen = max - min;
+
+                var start:Number = min <= -0.5 ? 0 : 1;
+                var end:Number = max >= n - 0.5 ? n : n - 1
+
+                for (i = start; i <= end; i++) // <= to draw final tick
+                {
+                    _cachedMinorTicks.push((i - 0.5 - min) / alen);
+                }
+            }
+            else
+            {
+                n = _categoryValues.length;
+                min = -_padding;
+                max = n - 1 + _padding;
+                alen = max - min;
+
+                for (i = 0; i < n; i++) // <= to draw final tick
+                {
+                    _cachedMinorTicks.push((i - min) / alen);
+                }
+            }
+        }
+
+        return _cachedMinorTicks;
+    }
+
+    //----------------------------------
+    //  padding
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the padding property.
+     */
+    private var _padding:Number = 0.5;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Specifies the padding added to either side of the axis
+     *  when rendering data on the screen.
+     *  Set to 0 to map the first category to the
+     *  very beginning of the axis and the last category to the end.
+     *  Set to 0.5 to leave padding of half the width
+     *  of a category on the axis between the beginning of the axis
+     *  and the first category and between the last category
+     *  and the end of the axis.
+     *
+     *
This is useful for chart types that render beyond the bounds
+     *  of the category, such as columns and bars.
+     *  However, when used as the horizontalAxis in a LineChart or AreaChart,
+     *  it is reset to 0.

+     *
+     *  @default 0.5
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get padding():Number
+    {
+        return _padding;
+    }
+
+    /**
+     *  @private
+     */
+    public function set padding(value:Number):void
+    {
+        _padding = value;
+
+        invalidateCategories();
+
+        dispatchEvent(new Event("mappingChange"));
+        dispatchEvent(new Event("axisChange"));
+    }
+
+    //----------------------------------
+    //  ticksBetweenLabels
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the tickBetweenLabels property.
+     */
+    private var _ticksBetweenLabels:Boolean = true;
+
+    [Inspectable]
+
+    /**
+     *  Specifies the location of major tick marks on the axis,
+     *  relative to the category labels.
+     *  If true, tick marks (and any associated grid lines)
+     *  appear between the categories.
+     *  If false, tick marks appear in the middle of the category,
+     *  aligned with the label.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get ticksBetweenLabels():Boolean
+    {
+        return _ticksBetweenLabels;
+    }
+
+    /**
+     *  @private
+     */
+    public function set ticksBetweenLabels(value:Boolean):void
+    {
+        _ticksBetweenLabels = value;
+    }
+
+    //----------------------------------
+    //  workingDataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private function set workingDataProvider(value:Object):void
+    {
+        if (_dataProvider != null)
+        {
+            _dataProvider.removeEventListener(
+                CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
+        }
+
+        if (value is Array)
+        {
+            value = new ArrayCollection(value as Array);
+        }
+        else if (value is ICollectionView)
+        {
+        }
+        else if (value is XMLList)
+        {
+            value = new XMLListCollection(XMLList(value));
+        }
+        else if (value != null)
+        {
+            value = new ArrayCollection([ value ]);
+        }
+        else
+        {
+            value = new ArrayCollection();
+        }
+
+        _dataProvider = ICollectionView(value);
+
+        _cursor = value.createCursor();
+
+        if (_dataProvider)
+        {
+            // weak listeners to collections and dataproviders
+            _dataProvider.addEventListener(
+                CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);
+        }
+
+        collectionChangeHandler();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#mapCache()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function mapCache(cache:Array /* of ChartItem */, field:String,
+                             convertedField:String,
+                             indexValues:Boolean = false):void
+    {
+        update();
+
+        var n:int = cache.length;
+
+        // Find the first non null item in the cache so we can determine type.
+        // Since these initial values are null,
+        // we can safely skip assigning values for them.
+        for (var i:int = 0; i < n; i++)
+        {
+            if (cache[i][field] != null)
+                break;
+        }
+        if (i == n)
+            return;
+
+        var value:Object = cache[i][field]
+        if (value is XML ||
+                 value is XMLList)
+        {
+            for (; i < n; i++)
+            {
+                cache[i][convertedField] = _catMap[cache[i][field].toString()];
+            }
+        }
+        else if ((value is Number || value is int || value is uint) &&
+                 indexValues == true)
+        {
+            for (i = 0; i < n; i++)
+            {
+                var v:Object = cache[i];
+                v[convertedField] = v[field];
+            }
+        }
+        else
+        {
+            for (; i < n; i++)
+            {
+                cache[i][convertedField] = _catMap[cache[i][field]];
+            }
+        }
+
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#filterCache()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function filterCache(cache:Array /* of ChartItem */, field:String,
+                                filteredField:String):void
+    {
+        update();
+
+        // Our bounds are the categories, plus/minus padding,
+        // plus a little fudge factor to account for floating point errors.
+        var computedMaximum:Number = _categoryValues.length - 1 +
+                                     _padding + 0.000001;
+        var computedMinimum:Number = -_padding - 0.000001;
+
+        var n:int = cache.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var v:Number =  cache[i][field];
+            cache[i][filteredField] = v >= computedMinimum &&
+                                      v < computedMaximum ?
+                                      v :
+                                      NaN;
+        }
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#transformCache()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function transformCache(cache:Array /* of ChartItem */, field:String,
+                                   convertedField:String):void
+    {
+        update();
+
+        var min:Number = -_padding;
+        var max:Number = _categoryValues.length - 1 + _padding;
+        var alen:Number = max - min;
+
+        var n:int = cache.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            cache[i][convertedField] = (cache[i][field] - min) / alen;
+        }
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#invertTransform()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function invertTransform(value:Number):Object
+    {
+        update();
+
+        var min:Number = -_padding;
+        var max:Number = _categoryValues.length - 1 + _padding;
+        var alen:Number = max - min;
+
+        return _categoryValues[Math.round((value * alen) + min)];
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#formatForScreen()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function formatForScreen(value:Object):String
+    {
+        if (value is Number && value < _categoryValues.length)
+        {
+            var catValue:Object = _categoryValues[Math.round(Number(value))];
+            return catValue == null ? value.toString() : catValue.toString();
+        }
+
+        return value.toString();
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#getLabelEstimate()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getLabelEstimate():AxisLabelSet
+    {
+        update();
+
+        return _labelSet;
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#preferDropLabels()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function preferDropLabels():Boolean
+    {
+        return false;
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#getLabels()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getLabels(minimumAxisLength:Number):AxisLabelSet
+    {
+        update();
+
+        return _labelSet;
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#reduceLabels()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function reduceLabels(intervalStart:AxisLabel,intervalEnd:AxisLabel):AxisLabelSet
+    {
+        var skipCount:int = _catMap[intervalEnd.value] - _catMap[intervalStart.value] + 1;
+
+        if (skipCount <= 0)
+            return null;
+
+        var newLabels:Array /* of AxisLabel */ = [];
+        var newTicks:Array /* of Number */ = [];
+
+        var min:Number = -_padding;
+        var max:Number = _categoryValues.length - 1 + _padding;
+        var alen:Number = (max-min);
+
+		var n:int  = _categoryValues.length;
+		for (var i:int = 0; i < n; i += skipCount)
+        {
+            newLabels.push(_labelsMatchToCategoryValuesByIndex[i]);
+            newTicks.push(_labelsMatchToCategoryValuesByIndex[i].position);
+        }
+
+        var axisLabelSet:AxisLabelSet = new AxisLabelSet();
+        axisLabelSet.labels = newLabels;
+        axisLabelSet.minorTicks = minorTicks;
+        axisLabelSet.ticks = generateTicks();
+        return axisLabelSet;
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#update()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function update():void
+    {
+        if (!_labelSet)
+        {
+            var prop:Object;
+
+            _catMap = {};
+            _categoryValues = [];
+            _labelsMatchToCategoryValuesByIndex = [];
+
+            var categoryItems:Array = [];
+            var i:int;
+
+            if (_dataFunction != null)
+            {
+                _cursor.seek(CursorBookmark.FIRST);
+                i = 0;
+                while (!_cursor.afterLast)
+                {
+                    categoryItems[i] = _cursor.current;
+                    prop = dataFunction(this,categoryItems[i]);
+                    if (prop)
+                      _catMap[prop.toString()] = i;
+                    _categoryValues[i] = prop;
+                    i++;
+                    _cursor.moveNext()
+                }
+            }
+
+            else if (_categoryField == "")
+            {
+                _cursor.seek(CursorBookmark.FIRST);
+                i = 0;
+                while (!_cursor.afterLast)
+                {
+                    prop = _cursor.current;
+                    if (prop != null)
+                        _catMap[prop.toString()] = i;
+                    _categoryValues[i] = categoryItems[i] = prop;
+                    _cursor.moveNext();
+                    i++;
+                }
+            }
+            else
+            {
+                _cursor.seek(CursorBookmark.FIRST);
+                i = 0;
+                while (!_cursor.afterLast)
+                {
+                    categoryItems[i] = _cursor.current;
+                    if (categoryItems[i] && _categoryField in categoryItems[i])
+                    {
+                        prop = categoryItems[i][_categoryField];
+                        if (prop != null)
+                            _catMap[prop.toString()] = i;
+                        _categoryValues[i] = prop;
+                    }
+                    else
+                    {
+                        _categoryValues[i] = null;
+                    }
+                    i++;
+                    _cursor.moveNext()
+                }
+            }
+
+            var axisLabels:Array /* of AxisLabel */ = [];
+
+            var min:Number = -_padding;
+            var max:Number = _categoryValues.length - 1 + _padding;
+            var alen:Number = max - min;
+            var label:AxisLabel;
+
+            var n:int = _categoryValues.length;
+            if (_labelFunction != null)
+            {
+                var previousValue:Object = null;
+                for (i = 0; i < n; i++)
+                {
+                    if (_categoryValues[i] == null)
+                        continue;
+
+                    label = new AxisLabel((i - min) / alen, _categoryValues[i],
+                        _labelFunction(_categoryValues[i], previousValue,
+                        this, categoryItems[i]));
+                    _labelsMatchToCategoryValuesByIndex[i] = label;
+                    axisLabels.push(label);
+
+                    previousValue = _categoryValues[i];
+                }
+            }
+            else
+            {
+                for (i = 0; i < n; i++)
+                {
+                    if (!_categoryValues[i])
+                        continue;
+
+                    label = new AxisLabel((i - min) / alen, _categoryValues[i],
+                        _categoryValues[i].toString());
+                    _labelsMatchToCategoryValuesByIndex[i] = label;
+                    axisLabels.push(label);
+                }
+            }
+
+            _labelSet = new AxisLabelSet();
+            _labelSet.labels = axisLabels;
+            _labelSet.accurate = true;
+            _labelSet.minorTicks = minorTicks;
+            _labelSet.ticks = generateTicks();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function generateTicks():Array /* of Number */
+    {
+        if (!_cachedTicks)
+        {
+            _cachedTicks = [];
+
+            var n:int;
+            var min:Number;
+            var max:Number;
+            var alen:Number;
+            var i:Number;
+
+            if (_ticksBetweenLabels == false)
+            {
+                n = _categoryValues.length;
+                min = -_padding;
+                max = n - 1 + _padding;
+                alen = max - min;
+
+                for (i = 0; i < n; i++) // <= to draw final tick
+                {
+                    _cachedTicks.push((i - min) / alen);
+                }
+            }
+            else
+            {
+                _cachedMinorTicks = [];
+
+                n = _categoryValues.length;
+                min = -_padding;
+                max = n - 1 + _padding;
+                alen = max - min;
+
+                var start:Number = _padding < 0.5 ? 0.5 : -0.5;
+                var end:Number = _padding < 0.5 ? n - 1.5 : n - 0.5;
+
+                for (i = start; i <= end; i += 1)
+                {
+                    _cachedTicks.push((i - min) / alen);
+                }
+            }
+        }
+
+        return _cachedTicks;
+    }
+
+    /**
+     *  @private
+     */
+    private function invalidateCategories():void
+    {
+        _labelSet = null;
+        _cachedMinorTicks = null;
+        _cachedTicks = null;
+
+        dispatchEvent(new Event("mappingChange"));
+        dispatchEvent(new Event("axisChange"));
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function getCategoryValues():Array /* of Object */
+    {
+        return _categoryValues;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function collectionChangeHandler(event:CollectionEvent = null):void
+    {
+        if (event && event.kind == CollectionEventKind.RESET)
+            _cursor = _dataProvider.createCursor();
+
+        invalidateCategories();
+    }
+
+}
+
+}