- feature: enabled resetting ComboBox index selection

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

--- src/reprise/controls/ComboBox.as
+++ src/reprise/controls/ComboBox.as
@@ -7,15 +7,13 @@

 package reprise.controls
 {
-	import flash.display.DisplayObject;
-	import flash.display.Sprite;
-	import flash.events.Event;
-	import flash.events.MouseEvent;
-
 	import reprise.ui.AbstractInput;
 	import reprise.ui.UIComponent;

-
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.events.MouseEvent;
+
 	public class ComboBox extends AbstractInput
 	{
 		/***************************************************************************
@@ -55,6 +53,12 @@
 			return m_list.options;
 		}

+		public function setSelectedIndex(index : int) : void
+		{
+			m_list.setSelectedIndex(index);
+			updateLabel();
+		}
+
 		public override function value():*
 		{
 			return m_list.value();
@@ -65,8 +69,7 @@
 			if (m_list.options.length)
 			{
 				m_list.setValue(value);
-				m_label.setLabel(m_list.selectedLabel());
-				removeCSSClass('placeholder');
+				updateLabel();
 			}
 		}

@@ -81,11 +84,7 @@
 		public function setPlaceholderAttribute(value : String):void
 		{
 			m_placeholder = value;
-			if (m_list.selectedIndex() == -1)
-			{
-				m_label.setLabel(value);
-				addCSSClass('placeholder');
-			}
+			updateLabel();
 		}

@@ -137,6 +136,20 @@
 			m_list.addEventListener(Event.CHANGE, list_change);
 		}

+		protected function updateLabel() : void
+		{
+			if (m_list.selectedIndex() == -1)
+			{
+				m_label.setLabel(m_placeholder);
+				addCSSClass('placeholder');
+			}
+			else
+			{
+				m_label.setLabel(m_list.selectedLabel());
+				removeCSSClass('placeholder');
+			}
+		}
+
 		protected function showList():void
 		{
 			removeEventListener(MouseEvent.MOUSE_DOWN, self_mouseDown);
@@ -167,8 +180,7 @@

 		protected function list_change(e:Event):void
 		{
-			m_label.setLabel(m_list.selectedLabel());
-			removeCSSClass('placeholder');
+			updateLabel();
 			hideList();
 			dispatchEvent(new Event(Event.CHANGE));
 		}


Bugfix for the use of window.isNaN() in ActionScript.

--- vm/src/as/header.as
+++ vm/src/as/header.as
@@ -18,7 +18,8 @@

 			var window : Object = {};
 			window.setTimeout = setTimeout;
-
+			window.isNaN = isNaN;
+
 			var JSON:Object;


tests

tests

--- src/com/kemsky/impl/filters/_.as
+++ src/com/kemsky/impl/filters/_.as
@@ -1,5 +1,11 @@
 package com.kemsky.impl.filters
 {
+    /**
+     * Loopback function, allows to use item itself as an argument to filter functions
+     * @param item current Stream item
+     * @return item passed as argument
+     * @see com.kemsky.impl.Stream#filter
+     */
     public function _(item:*):*
     {
         return item;


fix PTS/DTS parsing, allow negative values

--- src/com/mangui/HLS/muxing/PES.as
+++ src/com/mangui/HLS/muxing/PES.as
@@ -59,16 +59,17 @@
             var length:uint = data.readUnsignedByte();
             // Grab the timestamp from PTS data (spread out over 5 bytes):
             // XXXX---X -------- -------X -------- -------X
-            var _pts:uint = ((data.readUnsignedByte() & 14) << 29) +
-                ((data.readUnsignedShort() & 65534) << 14) +
-                ((data.readUnsignedShort() & 65534) >> 1);
+
+            var _pts:Number = ((data.readUnsignedByte() & 0x0e) << 29) +
+                ((data.readUnsignedShort() >> 1) << 15) +
+                 (data.readUnsignedShort() >> 1);
             length -= 5;
-            var _dts:uint = _pts;
+            var _dts:Number = _pts;
             if(flags == 3) {
                 // Grab the DTS (like PTS)
-                _dts = ((data.readUnsignedByte() & 14) << 29) +
-                    ((data.readUnsignedShort() & 65534) << 14) +
-                    ((data.readUnsignedShort() & 65534) >> 1);
+                _dts = ((data.readUnsignedByte() & 0x0e) << 29) +
+                ((data.readUnsignedShort() >> 1) << 15) +
+                 (data.readUnsignedShort() >> 1);
                 length -= 5;
             }
             pts = Math.round(_pts / PES.TIMESCALE);


Be sure to dispatch the right event when updating the display name

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

--- src/org/jivesoftware/xiff/data/im/RosterItemVO.as
+++ src/org/jivesoftware/xiff/data/im/RosterItemVO.as
@@ -122,6 +122,7 @@
 			var olddisplayname:String = displayName;
 			_displayName = name;
 			PropertyChangeEvent.createUpdateEvent(this, "displayName", olddisplayname, displayName);
+			dispatchEvent(new Event("changeDisplayName"));
 		}

 		[Bindable(event=changeDisplayName)]


Relax test case to not depend on enumeration order.

Tamarin has a different enumeration order between release / debug strangely enough.

--- src/avm2/tests/regress/correctness/pass/dic-3.as
+++ src/avm2/tests/regress/correctness/pass/dic-3.as
@@ -25,11 +25,8 @@
   var d:* = new Dictionary();
   var obj = {};
   d[obj] = 3.14;
-
-  for (var m in d) {
-    trace(obj === m);
-    trace(d[m]);
-  }
+  trace(obj in d);
+  trace(d[obj]);
 })();

 (function () {
@@ -39,12 +36,6 @@
   var fn1 = function () {};
   d[fn0] = 1.23;
   d[fn1] = 2.34;
-
-  for (var m in d) {
-    trace(fn0 === m);
-    trace(fn1 === m);
-    trace(d[m]);
-  }

   trace(fn0 in d);
   trace(fn1 in d);


fix iteration bug that causes unit counts to stop working

--- src/battlecode/client/viewer/render/DrawState.as
+++ src/battlecode/client/viewer/render/DrawState.as
@@ -132,7 +132,7 @@
             unitCounts = {};
             unitCounts[Team.A] = {};
             unitCounts[Team.B] = {};
-            for (var robotType:String in RobotType.values()) {
+            for each (var robotType:String in RobotType.values()) {
                 unitCounts[Team.A][robotType] = state.unitCounts[Team.A][robotType];
                 unitCounts[Team.B][robotType] = state.unitCounts[Team.B][robotType];
             }


Don't blow up when we see a stream:features, since that occurs when registering accounts on ignite

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

--- src/org/jivesoftware/xiff/core/XMPPConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPConnection.as
@@ -549,6 +549,9 @@
 					handlePresence( firstNode );
 					break;

+				case "stream:features":
+					break;
+
 				default:
 					// silently ignore lack of or unknown stanzas
 					// if the app designer wishes to handle raw data they


Change 20080529-hqm-D by hqm@badtzmaru.home on 2008-05-29 15:38:06 EDT
    in /Users/hqm/openlaszlo/trunk4/WEB-INF/lps/lfc
    for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc

Summary: revert to previous behavior of SOLO RAW POST content encoding

New Features:

Bugs Fixed: LPP-5935

Technical Reviewer: pbr
QA Reviewer: max
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

+ due to request from the user community, I'm going to revert the behavior
of RAW post in SOLO mode to the way it used to work.

The history of this decision is covered in the bug report.

Basically there is no good way to directly post an arbitrary text string
from Flash in SOLO mode.

The compromise solution used to be to use Flash's XML object to post an XML text node,
which was non-optimal because it encoded any XML escape chars, like & and
"

I decided to try posting URL-encoded data instead, but that doesn't really
have any advantages over regular query data, so I switched back to the
Flash XML solution. All this will be a moot point when we switch to swf9,
which lets you post arbitary data in the payload of a POST request.

Tests:

test/lfc/data/alldata.lzx

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

--- WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
+++ WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
@@ -504,15 +504,18 @@
             for ( header in headers) {
                 lvar.addRequestHeader(header, headers[header]);
             }
-
             var lzpostbody = loadobj.rawpostbody;
-            // Copy the postbody data onto the LoadVars, it will be POST'ed
-            var pdata = LzParam.parseQueryString(lzpostbody);
-            for ( var key in pdata) {
-                lvar[key] = pdata[key];
+            if (lzpostbody != null) {
+                var xmlraw = new XML();
+                var tnode = xmlraw.createTextNode(lzpostbody);
+                xmlraw.appendChild(tnode);
+                for ( header in headers) {
+                    xmlraw.addRequestHeader(header, headers[header]);
+                }
+                xmlraw.sendAndLoad(reqstr, loadobj);
+            } else {
+                lvar.sendAndLoad(reqstr , loadobj , "POST");
             }
-
-            lvar.sendAndLoad(reqstr , loadobj , "POST");
         } else {
             // For a GET request, all query args have been placed on
             // the lvar object already.


Move HLSSettings importing into conditional compilation block

HLSSettings is only used when LOGGING is true.

--- src/org/mangui/hls/demux/Nalu.as
+++ src/org/mangui/hls/demux/Nalu.as
@@ -3,27 +3,27 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  package org.mangui.hls.demux {

-    import org.mangui.hls.HLSSettings;
     import flash.utils.ByteArray;
     CONFIG::LOGGING {
+    import org.mangui.hls.HLSSettings;
     import org.mangui.hls.utils.Log;
     }

     /** Constants and utilities for the H264 video format. **/
     public class Nalu {
         /** H264 NAL unit names. **/
-        private static const NAMES : Array = ['Unspecified',                  // 0
-        'NDR',                          // 1
-        'Partition A',                  // 2
-        'Partition B',                  // 3
-        'Partition C',                  // 4
-        'IDR',                          // 5
-        'SEI',                          // 6
-        'SPS',                          // 7
-        'PPS',                          // 8
-        'AUD',                          // 9
-        'End of Sequence',              // 10
-        'End of Stream',                // 11
+        private static const NAMES : Array = ['Unspecified',                  // 0
+        'NDR',                          // 1
+        'Partition A',                  // 2
+        'Partition B',                  // 3
+        'Partition C',                  // 4
+        'IDR',                          // 5
+        'SEI',                          // 6
+        'SPS',                          // 7
+        'PPS',                          // 8
+        'AUD',                          // 9
+        'End of Sequence',              // 10
+        'End of Stream',                // 11
         'Filler Data'// 12
         ];


- change: Added getter for placeholder to ComboBox

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 16375
Author:   dloverin@adobe.com
Date:     2010-06-01T14:55:16.969621Z

Log Message:
-----------
SparkDownloadProgressBar fixes.

SparkDownloadProgressBar:
Reset _startTime in initProgressHandler() so the elapsedTime check  in showDisplayForInit() is relative to when init started, not the start of the download. This keeps the download progress bar from popping up just before the application loads.

DownloadProgressBar:
If an rsl size is zero then provide an average rsl size so we initially have a rough estimate of how much we have to download. Until an rsl actually starts to load its size will be zero. So initially the total download size is just the application size. Then as the rsls start to load the total download size continues to increase but the progress bar is already at 100%. Providing an rsl estimate gives the progress bar something to move forward to. For small applications the progress bar didn’t used to show up even when the 700 ms threshold had elapsed.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Glenn
Tests run: checkintests, Mustella DownloadProgressBar
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/SparkDownloadProgressBar.as</path>

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

--- frameworks/projects/framework/src/mx/preloaders/Preloader.as
+++ frameworks/projects/framework/src/mx/preloaders/Preloader.as
@@ -343,7 +343,14 @@
 		for (var i:int = 0; i < n; i++)
 		{
 			loaded += rslListLoader.getItem(i).loaded;
-			total += rslListLoader.getItem(i).total;
+
+            // If the rsl total is zero then provide an average rsl size
+            // to set rough expectations.
+            var rslTotal:int = rslListLoader.getItem(i).total;
+            if (rslTotal == 0)
+                rslTotal = 200000;
+
+            total += rslTotal;
 		}

 		return { loaded: loaded, total: total };


FLEX-35025 Now all ValidationResultEvents are passed through handleResults().

--- frameworks/projects/framework/src/mx/validators/Validator.as
+++ frameworks/projects/framework/src/mx/validators/Validator.as
@@ -919,11 +919,10 @@
         {
             // We assume if value is null and required is false that
             // validation was successful.
-            var resultEvent:ValidationResultEvent =
-                new ValidationResultEvent(ValidationResultEvent.VALID);
+            var resultEvent:ValidationResultEvent = handleResults(null);
             if (!suppressEvents && _enabled)
             {
-            	dispatchEvent(resultEvent);
+                dispatchEvent(resultEvent);
             }
             return resultEvent;
         }
@@ -1080,7 +1079,7 @@
     {
         var resultEvent:ValidationResultEvent;

-        if (errorResults.length > 0)
+        if (errorResults != null && errorResults.length > 0)
         {
             resultEvent =
                 new ValidationResultEvent(ValidationResultEvent.INVALID);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/events/ScrollEventDirection.as
+++ frameworks/projects/mx/src/mx/events/ScrollEventDirection.as
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.events
+{
+
+/**
+ *  Constants for the values of the direction property
+ *  of a ScrollEvent.
+ *
+ *  @see mx.events.ScrollEvent
+ */
+public final class ScrollEventDirection
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  The user scrolled horizontally.
+	 */
+	public static const HORIZONTAL:String = "horizontal";
+
+	/**
+	 *  The user scrolled vertically.
+	 */
+	public static const VERTICAL:String = "vertical";
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4357
Author:   egreenfi@adobe.com
Date:     2008-12-18T23:52:27.017290Z

Log Message:
-----------
UIComponent now implements ILayoutElement directly

ILayoutElement was moved to mx.core.ILayoutElement, as it is now a core interface required by UIComponent.

Further phases to follow:
1) IVlisualElement to extend ILayoutElement, pending resolution of a compiler bug.
2) remove LayoutElementUIC, pending UIMovieclip implementing ILayoutElement
3) remove LayoutElementFactory, once all IVisualElements implement ILayoutElement directly.
4) remove ITransformable, moving transform properties onto IVisualElement.

Reviewer: Evtim
QA: yes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.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/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.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/skins/spark/FxScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementFactory.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/components/FxVScrollBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/MatrixUtil.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.as" copyfrom-rev="4249" action="A">/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/layout/HorizontalLayout.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/layout/LayoutElementUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/VScrollBar.as
+++ frameworks/projects/spark/src/spark/components/VScrollBar.as
@@ -16,7 +16,7 @@
 import mx.core.ScrollUnit;
 import mx.events.PropertyChangeEvent;
 import mx.events.ResizeEvent;
-import mx.layout.ILayoutElement;
+import mx.core.ILayoutElement;
 import mx.layout.LayoutElementFactory;

 [IconFile("FxVScrollBar.png")]


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

--- frameworks/projects/spark/src/spark/components/VScrollBar.as
+++ frameworks/projects/spark/src/spark/components/VScrollBar.as
@@ -9,24 +9,24 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.components
+package spark.components
 {
-import mx.components.baseClasses.FxScrollBar;
+import spark.components.supportClasses.ScrollBar;
 import mx.core.ILayoutElement;
-import mx.core.IViewport;
-import mx.core.ScrollUnit;
+import spark.core.IViewport;
+import spark.core.ScrollUnit;
 import mx.events.PropertyChangeEvent;
 import mx.events.ResizeEvent;
-import mx.layout.LayoutElementFactory;
-
-[IconFile("FxVScrollBar.png")]
+import spark.layout.supportClasses.LayoutElementFactory;
+
+[IconFile("VScrollBar.png")]

 /**
- *  The FxVScrollBar (vertical ScrollBar) control lets you control
+ *  The VScrollBar (vertical ScrollBar) control lets you control
  *  the portion of data that is displayed when there is too much data
  *  to fit vertically in a display area.
  *
- *
Although you can use the FxVScrollBar control as a stand-alone control,
+ *
Although you can use the VScrollBar control as a stand-alone control,
  *  you usually combine it as part of another group of components to
  *  provide scrolling functionality.

  *
@@ -35,7 +35,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class FxVScrollBar extends FxScrollBar
+public class VScrollBar extends ScrollBar
 {
     include "../core/Version.as";

@@ -53,7 +53,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function FxVScrollBar()
+    public function VScrollBar()
     {
         super();
     }
@@ -88,7 +88,7 @@
             var vsp:Number = newViewport.verticalScrollPosition;
             // Special case: if contentHeight is 0, assume that it hasn't been
             // updated yet.  Making the maximum==vsp here avoids trouble later
-            // when FxRange constrains value
+            // when Range constrains value
             var cHeight:Number = newViewport.contentHeight;
             maximum = (cHeight == 0) ? vsp : cHeight - newViewport.height;
             pageSize = newViewport.height;
@@ -162,7 +162,7 @@
     }

     /**
-     *  Returns the position of the thumb button on an FxVScrollBar control,
+     *  Returns the position of the thumb button on an VScrollBar control,
      *  which is equal to the localY parameter.
      *
      *  @param localX The X position relative to the scrollbar control.
@@ -214,8 +214,8 @@
      *  @param increase Whether the page scroll is up (true) or
      *  down (false).
      *
-     *  @see mx.components.baseClasses.FxTrackBase#page()
-     *  @see mx.components.baseClasses.FxTrackBase#setValue()
+     *  @see mx.components.baseClasses.TrackBase#page()
+     *  @see mx.components.baseClasses.TrackBase#setValue()
      *  @see mx.core.IViewport
      *  @see mx.core.IViewport#verticalScrollPosition
      *  @see mx.core.IViewport#getVerticalScrollPositionDelta()
@@ -252,8 +252,8 @@
      *  @param increase Whether the line scoll is up (true) or
      *  down (false).
      *
-     *  @see mx.components.baseClasses.FxTrackBase#step()
-     *  @see mx.components.baseClasses.FxTrackBase#setValue()
+     *  @see mx.components.baseClasses.TrackBase#step()
+     *  @see mx.components.baseClasses.TrackBase#setValue()
      *  @see mx.core.IViewport
      *  @see mx.core.IViewport#verticalScrollPosition
      *  @see mx.core.IViewport#getVerticalScrollPositionDelta()
@@ -319,7 +319,7 @@
             var vsp:Number = viewport.verticalScrollPosition;
             // Special case: if contentHeight is 0, assume that it hasn't been
             // updated yet.  Making the maximum==vsp here avoids trouble later
-            // when FxRange constrains value
+            // when Range constrains value
             var cHeight:Number = viewport.contentHeight;
             maximum = (cHeight == 0) ? vsp : cHeight - viewport.height;
             pageSize = viewport.height;


Extracted the label field creation to its own function for easier overwritability

--- src/org/openPyro/controls/listClasses/DefaultListRenderer.as
+++ src/org/openPyro/controls/listClasses/DefaultListRenderer.as
@@ -32,16 +32,9 @@
 			super.createChildren();
 			this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler)
 			this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler)
-			_labelField = new TextField()
-			_labelField.selectable=false;

-			if(!_labelFormat){
-				_labelField.defaultTextFormat= new TextFormat("Arial",12)
-			}
-			else{
-				_labelField.defaultTextFormat = _labelFormat;
-			}
-			addChild(_labelField);
+			createLabelField();
+
 			if(_data && _baseListData && _baseListData.list){
 				_labelField.text = _baseListData.list.labelFunction(_data);
 			}
@@ -62,6 +55,19 @@
 			}
 			_highlightCursorSprite = new Sprite();
 			addChildAt(_highlightCursorSprite,0);
+		}
+
+		protected function createLabelField():void{
+			_labelField = new TextField()
+			_labelField.selectable=false;
+
+			if(!_labelFormat){
+				_labelField.defaultTextFormat= new TextFormat("Arial",12)
+			}
+			else{
+				_labelField.defaultTextFormat = _labelFormat;
+			}
+			addChild(_labelField);
 		}

 		protected var _baseListData:BaseListData;


Small fix

Small fix

--- Impetus.as
+++ Impetus.as
@@ -19,7 +19,7 @@
             }
         }

-        public function getSound(url:String)
+        public function getSound(url:String):ImpetusSound
         {
             var len:int = this.sounds.length;


Renamed alien to monster

Renamed alien to monster


Change 20070323-sallen-8 by sallen@sallen-new on 2007-03-23 12:38:56 PDT
    in /cygdrive/c/laszlo/svn/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: mouse events for input and selectable text

Bugs Fixed: LPP-3753 onmouseup and onmousedown not reported by LzGlobalMouse for inputtext and selectable text

Technical Reviewer: ptw@openlaszlo.org (reviewed code)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Details: in sending events the LFC has special logic to tell if the user clicks on an input text or selectable text field (since we don't get the movie clip that was clicked on from Flash, but we can find out what movie clip is the selection.  This logic is in LzModeManger.  To find the view associated with the movie clip, we rely on a property that the text views set on their corresponding movie clip. That used to be called 'view' but was changed to '__lzview' at some point for inputtext and seems to have gotten lost for test.  This change fixes that.

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

--- WEB-INF/lps/lfc/views/LzText6.as
+++ WEB-INF/lps/lfc/views/LzText6.as
@@ -3,7 +3,7 @@
  *****************************************************************************/

 //* A_LZ_COPYRIGHT_BEGIN ******************************************************
-//* Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.            *
+//* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.            *
 //* Use is subject to license terms.                                          *
 //* A_LZ_COPYRIGHT_END ********************************************************

@@ -55,6 +55,12 @@
     mc.createTextField( txtname, 1, 0, 0, 100, 12 );
     var textclip = mc[txtname];
     this.__LZtextclip = textclip;
+
+    // set a pointer back to this view from the TextField object
+    // this property matched the name in inputtext and is used to
+    // detect the field for sending mouse events to it
+    textclip.__lzview = this;
+
     textclip._visible = true;
     textclip.__control = this;
     //    textclip._quality = "BEST";


added missing function param

added missing function param

--- WeaveData/src/weave/data/AttributeColumnCache.as
+++ WeaveData/src/weave/data/AttributeColumnCache.as
@@ -11,73 +11,73 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
- * ***** END LICENSE BLOCK ***** */
-
-package weave.data
-{
-	import flash.utils.Dictionary;
-
-	import avmplus.getQualifiedClassName;
-
-	import weave.api.getLinkableDescendants;
-	import weave.api.getSessionState;
-	import weave.api.objectWasDisposed;
-	import weave.api.registerLinkableChild;
-	import weave.api.reportError;
-	import weave.api.data.ColumnMetadata;
-	import weave.api.data.DataType;
-	import weave.api.data.IAttributeColumn;
-	import weave.api.data.IAttributeColumnCache;
-	import weave.api.data.IDataSource;
-	import weave.api.data.IQualifiedKey;
-	import weave.compiler.Compiler;
-	import weave.data.AttributeColumns.DateColumn;
-	import weave.data.AttributeColumns.GeometryColumn;
-	import weave.data.AttributeColumns.NumberColumn;
-	import weave.data.AttributeColumns.StringColumn;
-	import weave.data.DataSources.CachedDataSource;
-	import weave.primitives.Dictionary2D;
-	import weave.primitives.GeneralizedGeometry;
-	import weave.utils.WeakReference;
+ * ***** END LICENSE BLOCK ***** */
+
+package weave.data
+{
+	import flash.utils.Dictionary;
+
+	import avmplus.getQualifiedClassName;
+
+	import weave.api.getLinkableDescendants;
+	import weave.api.getSessionState;
+	import weave.api.objectWasDisposed;
+	import weave.api.registerLinkableChild;
+	import weave.api.reportError;
+	import weave.api.data.ColumnMetadata;
+	import weave.api.data.DataType;
+	import weave.api.data.IAttributeColumn;
+	import weave.api.data.IAttributeColumnCache;
+	import weave.api.data.IDataSource;
+	import weave.api.data.IQualifiedKey;
+	import weave.compiler.Compiler;
+	import weave.data.AttributeColumns.DateColumn;
+	import weave.data.AttributeColumns.GeometryColumn;
+	import weave.data.AttributeColumns.NumberColumn;
+	import weave.data.AttributeColumns.StringColumn;
+	import weave.data.DataSources.CachedDataSource;
+	import weave.primitives.Dictionary2D;
+	import weave.primitives.GeneralizedGeometry;
+	import weave.utils.WeakReference;
 	import weave.utils.WeavePromise;
-
-	/**
-	 * @inheritDoc
-	 */
-	public class AttributeColumnCache implements IAttributeColumnCache
+
+	/**
+	 * @inheritDoc
+	 */
+	public class AttributeColumnCache implements IAttributeColumnCache
 	{
 		/**
 		 * @inheritDoc
-		 */
-		public function getColumn(dataSource:IDataSource, metadata:Object):IAttributeColumn
+		 */
+		public function getColumn(dataSource:IDataSource, metadata:Object):IAttributeColumn
 		{
 			// null means no column
 			if (dataSource == null || metadata == null)
 				return null;
-
+
 			// Get the column pointer associated with the hash value.
-			var hashCode:String = Compiler.stringify(metadata);
-			var weakRef:WeakReference = d2d_dataSource_metadataHash_weakRef.get(dataSource, hashCode) as WeakReference;
+			var hashCode:String = Compiler.stringify(metadata);
+			var weakRef:WeakReference = d2d_dataSource_metadataHash_weakRef.get(dataSource, hashCode) as WeakReference;
 			if (weakRef != null && weakRef.value != null)
 			{
 				if (WeaveAPI.SessionManager.objectWasDisposed(weakRef.value))
 					d2d_dataSource_metadataHash_weakRef.remove(dataSource, hashCode);
-				else
+				else
 					return weakRef.value as IAttributeColumn;
-			}
-
-			// If no column is associated with this hash value, request the
-			// column from its data source and save the column pointer.
+			}
+
+			// If no column is associated with this hash value, request the
+			// column from its data source and save the column pointer.
 			var column:IAttributeColumn = dataSource.getAttributeColumn(metadata);
-			d2d_dataSource_metadataHash_weakRef.set(dataSource, hashCode, new WeakReference(column));
-
-			return column;
+			d2d_dataSource_metadataHash_weakRef.set(dataSource, hashCode, new WeakReference(column));
+
+			return column;
 		}

 		private const d2d_dataSource_metadataHash_weakRef:Dictionary2D = new Dictionary2D(true, true);

 		// TEMPORARY SOLUTION for WeaveArchive to access this cache data
-		public var saveCache:Object = null;
+		public var saveCache:Object = null;

 		/**
 		 * Creates a cache dump and modifies the session state so data sources are non-functional.
@@ -87,7 +87,7 @@
 		{
 			var promise:WeavePromise = new WeavePromise(WeaveAPI.globalHashMap);
 			promise.setResult(null);
-			var dispose:Function = function():void { promise.dispose(); };
+			var dispose:Function = function(_:*):void { promise.dispose(); };
 			return promise
 				.then(function(_:*):* {
 					// request data from every column
@@ -253,4 +253,4 @@
 			}
 		}
 	}
-}
+}


Switch langauge back to English

Switch langauge back to English

--- Arguments/src/classes/Language.as
+++ Arguments/src/classes/Language.as
@@ -39,7 +39,7 @@
 		public static const GERMAN:String = "GER";
 		public static const ENGLISH:String = "EN-US";
 		public static const RUSSIAN:String = "RUS";
-		public static var language:String = RUSSIAN;
+		public static var language:String = ENGLISH;

 		public static var xml:XML;
 		private static var ready:Boolean=false;


remove stage events handling in Viewport made useless by drawing a transparent rectangle on top of the viewport

--- src/aerys/minko/render/Viewport.as
+++ src/aerys/minko/render/Viewport.as
@@ -1,15 +1,11 @@
 package aerys.minko.render
 {
 	import aerys.minko.ns.minko_render;
-	import aerys.minko.ns.minko_scene;
 	import aerys.minko.render.resource.Context3DResource;
-	import aerys.minko.scene.node.Scene;
-	import aerys.minko.type.Factory;
 	import aerys.minko.type.KeyboardManager;
 	import aerys.minko.type.MouseManager;
 	import aerys.minko.type.Signal;

-	import flash.display.BitmapData;
 	import flash.display.DisplayObject;
 	import flash.display.Graphics;
 	import flash.display.Shape;
@@ -18,12 +14,10 @@
 	import flash.display.Stage3D;
 	import flash.display.StageAlign;
 	import flash.display.StageScaleMode;
-	import flash.display3D.Context3D;
 	import flash.events.Event;
 	import flash.events.MouseEvent;
 	import flash.events.TouchEvent;
 	import flash.geom.Point;
-	import flash.utils.getTimer;

 	/**
 	 * The Viewport is the display area where a 3D scene can be rendered.
@@ -64,10 +58,7 @@
 			var positionOnStage	: Point	= localToGlobal(ZERO2);

 			if (_stage3d.x != positionOnStage.x || _stage3d.y != positionOnStage.y)
-			{
 				updateStage3D()
-//				updateBackBuffer();
-			}

 			return _backBuffer;
 		}
@@ -242,18 +233,6 @@

 			stage.addEventListener(Event.ADDED_TO_STAGE, displayObjectAddedToStageHandler);
 			stage.addEventListener(Event.REMOVED_FROM_STAGE, displayObjectRemovedFromStageHandler);
-			stage.addEventListener(MouseEvent.CLICK, stageEventHandler);
-			stage.addEventListener(MouseEvent.DOUBLE_CLICK, stageEventHandler);
-			stage.addEventListener(MouseEvent.MOUSE_DOWN, stageEventHandler);
-			stage.addEventListener(MouseEvent.MOUSE_MOVE, stageEventHandler);
-			stage.addEventListener(MouseEvent.MOUSE_OUT, stageEventHandler);
-			stage.addEventListener(MouseEvent.MOUSE_OVER, stageEventHandler);
-			stage.addEventListener(MouseEvent.MOUSE_WHEEL, stageEventHandler);
-			stage.addEventListener(MouseEvent.ROLL_OUT, stageEventHandler);
-			stage.addEventListener(MouseEvent.ROLL_OVER, stageEventHandler);
-			stage.addEventListener(TouchEvent.TOUCH_BEGIN, stageEventHandler);
-			stage.addEventListener(TouchEvent.TOUCH_END, stageEventHandler);
-			stage.addEventListener(TouchEvent.TOUCH_MOVE, stageEventHandler);

 			setupOnStage(stage);
 		}
@@ -266,18 +245,6 @@

 			stage.removeEventListener(Event.ADDED_TO_STAGE, displayObjectAddedToStageHandler);
 			stage.removeEventListener(Event.REMOVED_FROM_STAGE, displayObjectRemovedFromStageHandler);
-			stage.removeEventListener(MouseEvent.CLICK, stageEventHandler);
-			stage.removeEventListener(MouseEvent.DOUBLE_CLICK, stageEventHandler);
-			stage.removeEventListener(MouseEvent.MOUSE_DOWN, stageEventHandler);
-			stage.removeEventListener(MouseEvent.MOUSE_MOVE, stageEventHandler);
-			stage.removeEventListener(MouseEvent.MOUSE_OUT, stageEventHandler);
-			stage.removeEventListener(MouseEvent.MOUSE_OVER, stageEventHandler);
-			stage.removeEventListener(MouseEvent.MOUSE_WHEEL, stageEventHandler);
-			stage.removeEventListener(MouseEvent.ROLL_OUT, stageEventHandler);
-			stage.removeEventListener(MouseEvent.ROLL_OVER, stageEventHandler);
-			stage.removeEventListener(TouchEvent.TOUCH_BEGIN, stageEventHandler);
-			stage.removeEventListener(TouchEvent.TOUCH_END, stageEventHandler);
-			stage.removeEventListener(TouchEvent.TOUCH_MOVE, stageEventHandler);

 			if (_stage3d != null)
 				_stage3d.visible = false;
@@ -421,21 +388,6 @@
 				_stage3d.y = upperLeft.y;

 			updateMask();
-		}
-
-		private function stageEventHandler(event : Object) : void
-		{
-			if (!_alwaysOnTop || event.target == this)
-				return ;
-
-			var stageX	: Number	= event.stageX;
-			var stageY	: Number	= event.stageY;
-
-			if (stageX > _stage3d.x && stageX < _stage3d.x + _width
-				&& stageY > _stage3d.y && stageY < _stage3d.y + _height)
-			{
-				dispatchEvent(event.clone());
-			}
 		}

 		private function updateMask() : void


Transferred from the Adobe Open Source Subversion Repository

Revision: 5063
Author:   jvroom@adobe.com
Date:     2009-02-25T00:07:49.407457Z

Log Message:
-----------
Bugs: SDK-14811 - avoid errors when strings are sent to an HTTPService operation
      - Also changed how HTTPMultiService works when argumentNames is not set.  Now this works just
      like HTTPService when called with just one argument.  If you specify more than one argument
      and do not set argument names, an error is thrown.
      - code cleanups: add braces where needed, removed a temp variable
      - do not set contentType metadata since we do not have the complete list of content types
      - fixed problems with HTTPMultiService.contentType and requestFormat not being inherited
        properly.
QE: yes: verify SDK-14811 is fixed - it would be good to have a few more HTTPService test cases:
        * send(String) with contentType = CONTENT_TYPE_FORM
        * send(XML) with contentType = CONTENT_TYPE_FORM (verify it works like in 2.0.1?)
        * send(Object) with contentType = CONTENT_TYPE_FORM where there is one property which is
          an Array.
Reviewers: Pete, Mete
Doc: no
Checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/http/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/http/Operation.as
@@ -164,6 +164,21 @@
         super.useProxy = value;
     }

+    private var _contentTypeSet:Boolean = false;
+
+    override public function get contentType():String
+    {
+        if (_contentTypeSet)
+            return super.contentType;
+        return _multiService.contentType;
+    }
+
+    override public function set contentType(ct:String):void
+    {
+        _contentTypeSet = ct != null;
+        super.contentType = ct;
+    }
+
     //---------------------------------
     // Methods
     //---------------------------------
@@ -195,18 +210,24 @@

         var filter:SerializationFilter = getSerializationFilter();
         if (filter != null)
+        {
             params = filter.serializeParameters(this, args);
+        }
         else
         {
             params = args;
             if (!params || (params.length == 0 && this.request))
+            {
                 params = this.request;
+            }

             if (params is Array && argumentNames != null)
             {
                 args = params as Array;
                 if (args.length != argumentNames.length)
+                {
                     throw new ArgumentError("HTTPMultiService operation called with " + argumentNames.length + " argumentNames and " + args.length + " number of parameters.  When argumentNames is specified, it must match the number of arguments passed to the invocation");
+                }
                 else
                 {
                     // Special case for XML content type when only one parameter is provided.
@@ -225,18 +246,31 @@
                 }
             }
             // Also do the XML content type special case when no argument names is set
-            else if (args.length == 1 && contentType == CONTENT_TYPE_XML)
+            else if (args.length == 1)
+            {
                 params = args[0];
+            }
+            else
+            {
+                throw new ArgumentError("HTTPMultiService - you must set argumentNames to an array of parameter names if you use more than one parameter.");
+            }
         }
         return sendBody(params);
     }

+    private var _resultFormatSet:Boolean = false;
+
     override public function get resultFormat():String
     {
-        var rf:String = super.resultFormat;
-        if (rf == null)
-            return _multiService.resultFormat;
-        return rf;
+        if (_resultFormatSet)
+            return super.resultFormat;
+        return _multiService.resultFormat;
+    }
+
+    override public function set resultFormat(rf:String):void
+    {
+        _resultFormatSet = rf != null;
+        super.resultFormat = rf;
     }

     override protected function getSerializationFilter():SerializationFilter


Update InfiniShip.as

Update InfiniShip.as

--- as3/src/br/com/yuiti/lab/infiniship/InfiniShip.as
+++ as3/src/br/com/yuiti/lab/infiniship/InfiniShip.as
@@ -384,7 +384,7 @@

             // Marking the cockpit cells
             for (var i:Number = 0; i < countArray(cabinCell); ++i ) {
-                if ((mainseed & (1 << (countArray(shapeCell) + 1))) > 0) {
+                if ((mainseed & (1 << (countArray(shapeCell) + i))) > 0) {
                     shipCell[cabinCell[i]] = S_SOLID;
                 } else {
                     shipCell[cabinCell[i]] = S_CABIN;
@@ -456,4 +456,4 @@
             addChild(wrap);
         }
     }
-}+}


Fixed bug in grip

Fixed bug in grip


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5104
Author:   clucier@adobe.com
Date:     2009-02-27T14:51:34.248850Z

Log Message:
-----------
Default button support for Spark containers and editable text controls.
QE Notes:
Doc Notes:
Bugs: SDK-19420
Reviewer: Glenn, Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ContainerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultButtonSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -615,35 +615,31 @@

         if (isParent(DisplayObjectContainer(form), target))
         {
+            if (_defaultButton)
+            {
+                if (target is IButton && target != _defaultButton)
+                    _defaultButton.emphasized = false;
+                else
+                    _defaultButton.emphasized = true;
+            }
+
             // trace("FM " + this + " setting last focus " + target);
             _lastFocus = findFocusManagerComponent(InteractiveObject(target));

-			// handle default button here
-			// we can't check for Button because of cross-versioning so
-			// for now we just check for an emphasized property
-			if (_lastFocus is IButton)
-			{
-				var x:IButton = _lastFocus as IButton;
-				// if we have marked some other button as a default button
-				if (defButton)
-				{
-					// change it to be this button
-					defButton.emphasized = false;
-					defButton = x;
-					x.emphasized = true;
-				}
-			}
-			else
-			{
-				// restore the default button to be the original one
-				if (defButton && defButton != _defaultButton)
-				{
-					defButton.emphasized = false;
-					defButton = _defaultButton;
-					_defaultButton.emphasized = true;
-				}
-			}
-		}
+            // handle default button here
+            // we can't check for Button because of cross-versioning so
+            // for now we just check for an emphasized property
+            if (_lastFocus is IButton)
+            {
+                defButton = _lastFocus as IButton;
+            }
+            else
+            {
+                // restore the default button to be the original one
+                if (defButton && defButton != _defaultButton)
+                    defButton = _defaultButton;
+            }
+        }
     }

     /**
@@ -774,8 +770,6 @@
         form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
         form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
         form.addEventListener(KeyboardEvent.KEY_DOWN, defaultButtonKeyHandler);
-        // listen for default button in Capture phase. Some components like TextInput
-        // and Accordion stop the Enter key from propagating in the Bubble phase.
         form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);

         activated = true;
@@ -1868,7 +1862,7 @@
      *  Watch for TAB keys.
      */
     private function keyDownHandler(event:KeyboardEvent):void
-    {
+    {
         // trace("onKeyDown handled by " + this);
     	// trace("onKeyDown event = " + event);
 		// if the target is in a bridged application, let it handle the click.
@@ -1944,7 +1938,7 @@
      *  Watch for ENTER key.
      */
     private function defaultButtonKeyHandler(event:KeyboardEvent):void
-    {
+    {
         var sm:ISystemManager = form.systemManager;
         if (sm.isDisplayObjectInABridgedApplication(DisplayObject(event.target)))
             return;


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

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

 package spark.primitives
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2734
Author:   egeorgie@adobe.com
Date:     2008-08-04T21:16:49.645771Z

Log Message:
-----------
Fix Path actualSize to report correct size

Reviewed by Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -256,8 +256,8 @@
 		_fill.offsetY = 0;
 		_fill.repeat = repeat;
 		_fill.smooth = smooth;
-		var w:Number = width;
-		var h:Number = height;
+		var w:Number = unscaledWidth;
+		var h:Number = unscaledHeight;

 		if (!repeat)
 		{


weaveTraceImpl now waits one frame before attempting to open error log
panel

Change-Id: I13f0979ad6453ef33ab2489014e2d9cb494a1450

--- WeaveClient/src/weaveTraceImpl.as
+++ WeaveClient/src/weaveTraceImpl.as
@@ -5,9 +5,35 @@

 	public function weaveTraceImpl(...args):void
 	{
-		var elp:ErrorLogPanel = ErrorLogPanel.getInstance();
-		if (!elp.parent)
-			ErrorLogPanel.openErrorLog();
-		elp.console.consoleTrace.apply(null, args);
+		if (Internal.initialized)
+		{
+			var elp:ErrorLogPanel = ErrorLogPanel.getInstance();
+			if (!elp.parent)
+				ErrorLogPanel.openErrorLog();
+			elp.console.consoleTrace.apply(null, args);
+		}
+		else
+		{
+			Internal.backlog.push(args);
+		}
 	}
 }
+import weave.api.WeaveAPI;
+
+internal class Internal
+{
+	public static var initialized:Boolean = false;
+	public static var backlog:Array = [];
+	public static var startup:* = WeaveAPI.StageUtils.callLater(
+		null,
+		function():void
+		{
+			initialized = true;
+			for each (var params:Array in backlog)
+				weaveTraceImpl.apply(null, params);
+			backlog = null;
+		},
+		null,
+		WeaveAPI.TASK_PRIORITY_IMMEDIATE
+	);
+}


Use of native filter

Use of native filter

--- application/src/im/siver/logger/controllers/TraceController.as
+++ application/src/im/siver/logger/controllers/TraceController.as
@@ -60,30 +60,22 @@
          * Show a trace in an output window
          */
         private function filterChanged(event:Event):void {
-            _dataFilterd.removeAll();
-
             // Check if a filter term is given
             if (_panel.filter.words.length == 0) {
-                for (var i:int = 0; i < _data.length; i++) {
-                    _dataFilterd.addItem(_data[i]);
-                }
-                return;
-            }
-            for (var n:int = 0; n < _data.length; n++) {
-                if (checkFilter(_data[n])) {
-                    _dataFilterd.addItem(_data[n]);
-                }
+                _dataFilterd.filterFunction = null;
+                _dataFilterd.refresh();
+            } else {
+                _dataFilterd.filterFunction = checkFilter;
+                _dataFilterd.refresh();
             }
         }

         private function addItem(item:Object):void {
-            if (_panel.filter.words.length == 0) {
-                _dataFilterd.addItem(item);
-                return;
-            }
-            if (checkFilter(item)) {
-                _dataFilterd.addItem(item);
-            }
+            _dataFilterd.addItem(item);
+        }
+
+        private function simpleFilter(item:Object):Boolean {
+            return false;
         }

         /**


Use the same material for all wireframe

Use the same material for all wireframe


cleanup in item tags

cleanup in item tags

--- flexEditor/src/org/arisgames/editor/view/ItemTagsEditorView.as
+++ flexEditor/src/org/arisgames/editor/view/ItemTagsEditorView.as
@@ -86,6 +86,7 @@
 		public function handleTagClick(evt:MouseEvent):void
 		{
 			trace("ItemTagsEditorView: handleTagClick() called with Selected Index = '" + dg.selectedIndex + "'");
+			if(dg.selectedIndex < 0 || dg.selectedIndex > gameItemTags.length-1) return;
 			if((gameItemTags.getItemAt(dg.selectedIndex) as ItemTag).tagged == "x")
 				AppServices.getInstance().untagItem(GameModel.getInstance().game.gameId, item.itemId, (gameItemTags.getItemAt(dg.selectedIndex) as ItemTag).tag_id, new Responder(handleTagItemTag, handleFault));
 			else
@@ -103,12 +104,13 @@
 			else
 			{
 				trace("tagging of ItemTag went well in the database, so now update it from UI datamodel and UI.");
+				if(dg.selectedIndex < 0 || dg.selectedIndex > gameItemTags.length-1) return;
+/*
 				if((gameItemTags.getItemAt(dg.selectedIndex) as ItemTag).tagged == "x")
 					(gameItemTags.getItemAt(dg.selectedIndex) as ItemTag).tagged = "";
 				else
 					(gameItemTags.getItemAt(dg.selectedIndex) as ItemTag).tagged = "x";
-
-				gameItemTagsData.refresh();
+*/
 				this.reloadTheItemTags();
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4867
Author:   smgilson@adobe.com
Date:     2009-02-05T22:32:36.595425Z

Log Message:
-----------
Fix broken ASDoc comments

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/Linear.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
+++ frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
@@ -38,6 +38,7 @@
  * use this approach, simply by specifying the resultFormat you can use a pre-registered
  * SerializationFilter.  So for example, you might register a SerializationFilter for the
  * "json" type and can then use that filter by setting resultFormat="json".
+ * </p>
  * <p>
  * Note that HTTPService only provides methods which directly take the request body
  * and so does not use the "serializeParameters" method.


Transferred from the Adobe Open Source Subversion Repository

Revision: 12005
Author:   rfrishbe@adobe.com
Date:     2009-11-19T20:31:59.069383Z

Log Message:
-----------
Fixing a bunch of video player bugs:

- Fixing Binding events properties were using as they were still using the old events rather than the new ones
- Fixing issues around mute/volume.  Now the video component's definition of mute/volume is the same as Strobe (i.e.-when muted, volume is not neecessarily 0).  However, because of this, extra code had to be added in the VolumeBar and MuteButton to get the user-interaction correct so that when a user clicks on the slider, that automatically unmutes the video.
- Adding seekToFirstFrame, which needs to be PARBed, but gives us the old video component's behavior when autoPlay = false so that it connects to the server, loads up the first frame, and sizes the video.
- Fixing up DynamicStreamingVideoSource to have the host property typed as Object instead of a serverURI:String
- Now I'm exposing mediaPlayerState and videoObject on VideoDisplay and VideoPlayer
- Fixing a bug where someone clicks on the playPauseButton when no source is loaded and the "play button" changes to a "pause" when it should just stay as a "play" because the video didn't actually start playing.

QE notes: -
Doc notes: -
Bugs: SDK-24323, SDK-24285, SDK-24321, SDK-24313, SDK-22337
Reviewer: Kevin
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/VolumeBar.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/skins/spark/mediaClasses/normal/MuteButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin2.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -28,9 +28,12 @@
 import org.osmf.events.AudioEvent;
 import org.osmf.events.DimensionEvent;
 import org.osmf.events.LoadEvent;
+import org.osmf.events.MediaPlayerCapabilityChangeEvent;
 import org.osmf.events.MediaPlayerStateChangeEvent;
 import org.osmf.events.PlayingChangeEvent;
+import org.osmf.events.SeekEvent;
 import org.osmf.events.TimeEvent;
+import org.osmf.media.IMediaResource;
 import org.osmf.media.MediaPlayer;
 import org.osmf.media.MediaPlayerState;
 import org.osmf.media.URLResource;
@@ -219,6 +222,20 @@
      */
     private var initializedOnce:Boolean = false;

+    /**
+     *  @private
+     *  Keeps track of the muted property while loading up a
+     *  video because of seekToFirstFrame.
+     */
+    private var beforeLoadMuted:Boolean;
+
+    /**
+     *  @private
+     *  Keeps track whether we are loading up the
+     *  video because of seekToFirstFrame.
+     */
+    private var inLoadingState:Boolean;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -313,7 +330,7 @@
     //----------------------------------

     [Inspectable(Category="General", defaultValue="0")]
-    [Bindable("bytesDownloadedChange")]
+    [Bindable("bytesLoadedChange")]

     /**
      *  The number of bytes of data that have been downloaded into the application.
@@ -331,8 +348,6 @@
         return videoPlayer.bytesLoaded;
     }

-    // FIXME (rfrishbe): Need to add mediaPlayerState property?
-
     //----------------------------------
     //  bytesTotal
     //----------------------------------
@@ -361,7 +376,7 @@
     //----------------------------------

     [Inspectable(Category="General", defaultValue="0")]
-    [Bindable("playheadChange")]
+    [Bindable("currentTimeChange")]

     /**
      *  Current time of the playhead, measured in seconds,
@@ -438,6 +453,31 @@
     }

     //----------------------------------
+    //  mediaPlayerState
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="uninitialized")]
+    [Bindable("mediaPlayerStateChange")]
+
+    /**
+     *  The current state of the video.  See
+     *  org.osmf.media.MediaPlayerState for available values.
+     *
+     *  @default uninitialized
+     *
+     *  @see org.osmf.media.MediaPlayerState
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get mediaPlayerState():String
+    {
+        return videoPlayer.state;
+    }
+
+    //----------------------------------
     //  muted
     //----------------------------------

@@ -455,6 +495,11 @@
      */
     public function get muted():Boolean
     {
+        // if inLoadingState, we've got to
+        // fake the muted value
+        if (inLoadingState)
+            return beforeLoadMuted;
+
         return videoPlayer.muted;
     }

@@ -465,6 +510,13 @@
     {
         if (muted == value)
             return;
+
+        // if inLoadingState, don't change muted...just fake it
+        if (inLoadingState)
+        {
+            beforeLoadMuted = value;
+            return;
+        }

         videoPlayer.muted = value;
     }
@@ -611,6 +663,50 @@
     }

     //----------------------------------
+    //  seekToFirstFrame
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _seekToFirstFrame:Boolean = true;
+
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  If autoPlay = false, then
+     *  seekToFirstFrame controls whether the video
+     *  is loaded up at all when the source is set.  If seekToFirstFrame
+     *  is set to true, then the first frame of the video is
+     *  loaded up and the video will be sized correctly.  If
+     *  seekToFirstFrame is set to false, then no
+     *  connection to the source is made, the first frame will not be shown,
+     *  and the video's size will not be determined until someone tries to play
+     *  the video.
+     *
+     *
If autoPlay = true, then this flag is ignored.

+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get seekToFirstFrame():Boolean
+    {
+        return _seekToFirstFrame;
+    }
+
+    /**
+     * @private
+     */
+    public function set seekToFirstFrame(value:Boolean):void
+    {
+        _seekToFirstFrame = value;
+    }
+
+    //----------------------------------
     //  source
     //----------------------------------

@@ -661,57 +757,6 @@
         }

         dispatchEvent(new Event("sourceChanged"));
-    }
-
-    /**
-     *  @private
-     *  Sets up the source for use.
-     */
-    private function setUpSource():void
-    {
-        var videoElement:org.osmf.video.VideoElement;
-
-        // check for 2 cases: streaming video or progressive download
-        if (source is DynamicStreamingVideoSource)
-        {
-            // the streaming video case.
-            // build up a DynamicStreamingResource to pass in to OSMF
-            var streamingSource:DynamicStreamingVideoSource = source as DynamicStreamingVideoSource;
-            var dsr:DynamicStreamingResource;
-
-            dsr =  new DynamicStreamingResource(new FMSURL(streamingSource.serverURI), streamingSource.streamType);
-
-            var n:int = streamingSource.streamItems.length;
-            var item:DynamicStreamingVideoItem;
-            var dsi:DynamicStreamingItem;
-            var streamItems:Vector.<DynamicStreamingItem> = new Vector.<DynamicStreamingItem>(n);
-
-            for (var i:int = 0; i < n; i++)
-            {
-                item = streamingSource.streamItems[i];
-                dsi = new DynamicStreamingItem(item.streamName, item.bitrate);
-                streamItems[i] = dsi;
-            }
-            dsr.streamItems = streamItems;
-
-            dsr.initialIndex = streamingSource.initialIndex;
-
-            videoElement = new org.osmf.video.VideoElement(new DynamicStreamingNetLoader(), dsr);
-        }
-        else if (source is String)
-        {
-            var urlResource:URLResource = new URLResource(new URL(source as String));
-            videoElement = new org.osmf.video.VideoElement(new NetLoader(), urlResource);
-        }
-
-        // reset the visibilityPausedTheVideo flag
-        playTheVideoOnVisible = true;
-
-        // set up videoPlayer.autoPlay based on whether this.autoPlay is
-        // set and whether we are visible and the other typical conditions.
-        changePlayback(false, false);
-
-        videoPlayer.element = videoElement;
     }

     //----------------------------------
@@ -813,6 +858,8 @@
     //  videoObject
     //----------------------------------

+    [Inspectable(category="General", defaultValue="null")]
+
     /**
      *  The underlying flash player flash.media.Video object.
      *
@@ -851,9 +898,6 @@
      */
     public function get volume():Number
     {
-        if (muted)
-            return 0;
-
         return videoPlayer.volume;
     }

@@ -1160,6 +1204,106 @@
         addChild(videoSprite);
     }

+    /**
+     *  @private
+     *  Sets up the source for use.
+     */
+    private function setUpSource():void
+    {
+        var videoElement:org.osmf.video.VideoElement;
+
+        // check for 4 cases: streaming video, progressive download,
+        // an IMediaResource, or a VideoElement.
+        // The latter 2 are undocumented but allowed for flexibility until we
+        // can support OSMF better after they ship OSMF 1.0.  At that point, support
+        // for a source as an IMediaResource or a VideoElement may be removed.
+        if (source is DynamicStreamingVideoSource)
+        {
+            // the streaming video case.
+            // build up a DynamicStreamingResource to pass in to OSMF
+            var streamingSource:DynamicStreamingVideoSource = source as DynamicStreamingVideoSource;
+            var dsr:DynamicStreamingResource;
+
+            // check for two cases for host: String and URL.
+            // Technically, we only support URL, but we secretly allow
+            // them to send in an OSMF URL or FMSURL here to help resolve any ambiguity
+            // around serverName vs. streamName.
+            if (streamingSource.host is String)
+            {
+                dsr = new DynamicStreamingResource(new FMSURL(streamingSource.host as String),
+                    streamingSource.streamType);
+            }
+            else if (streamingSource.host is URL)
+            {
+                dsr = new DynamicStreamingResource(streamingSource.host as URL,
+                    streamingSource.streamType);
+            }
+
+            if (dsr)
+            {
+                var n:int = streamingSource.streamItems.length;
+                var item:DynamicStreamingVideoItem;
+                var dsi:DynamicStreamingItem;
+                var streamItems:Vector.<DynamicStreamingItem> = new Vector.<DynamicStreamingItem>(n);
+
+                for (var i:int = 0; i < n; i++)
+                {
+                    item = streamingSource.streamItems[i];
+                    dsi = new DynamicStreamingItem(item.streamName, item.bitrate);
+                    streamItems[i] = dsi;
+                }
+                dsr.streamItems = streamItems;
+
+                dsr.initialIndex = streamingSource.initialIndex;
+
+                videoElement = new org.osmf.video.VideoElement(new DynamicStreamingNetLoader(), dsr);
+            }
+        }
+        else if (source is String)
+        {
+            var urlResource:URLResource = new URLResource(new URL(source as String));
+            videoElement = new org.osmf.video.VideoElement(new NetLoader(), urlResource);
+        }
+        else if (source is IMediaResource)
+        {
+            videoElement = new org.osmf.video.VideoElement(new NetLoader(), source as IMediaResource);
+        }
+        else if (source is org.osmf.video.VideoElement)
+        {
+            videoElement = source as org.osmf.video.VideoElement;
+        }
+
+        // reset the visibilityPausedTheVideo flag
+        playTheVideoOnVisible = true;
+        // set up videoPlayer.autoPlay based on whether this.autoPlay is
+        // set and whether we are visible and the other typical conditions.
+        changePlayback(false, false);
+
+        // if we're not going to autoPlay but we need to seek
+        // to the first frame, then we have to do this on our own
+        // by using our load() method.
+        if (!autoPlay && seekToFirstFrame)
+            load();
+
+
+        videoPlayer.element = videoElement;
+    }
+
+    /**
+     *  @private
+     *  Our own internal load() method to handle the case
+     *  where autoPlay = false and seekToFirstFrame = true
+     *  so that we can load up the video, figure out its size,
+     *  and show the first frame
+     */
+    private function load():void
+    {
+        // wait until we can play(), pause(), and seek() before doing anything.
+        videoPlayer.addEventListener(MediaPlayerCapabilityChangeEvent.PLAYABLE_CHANGE, videoPlayer_mediaPlayerCapabilityChangeHandler);
+        videoPlayer.addEventListener(MediaPlayerCapabilityChangeEvent.PAUSABLE_CHANGE, videoPlayer_mediaPlayerCapabilityChangeHandler);
+        videoPlayer.addEventListener(MediaPlayerCapabilityChangeEvent.SEEKABLE_CHANGE, videoPlayer_mediaPlayerCapabilityChangeHandler);
+    }
+
     //--------------------------------------------------------------------------
     //
     //  pauseWhenHidden: Event handlers and Private Methods
@@ -1226,6 +1370,11 @@
      */
     private function changePlayback(causePause:Boolean, causePlay:Boolean):void
     {
+        // if we're in the loading state, then do not touch this at all.
+        // We will alawys load up the video and then not play.
+        if (inLoadingState)
+            return;
+
         // if we shouldn't be playing, we pause the video.
         // if we come back up and should be playing, we will
         // start playing the video again if the video wasn't paused
@@ -1455,5 +1604,57 @@
     {
         dispatchEvent(new Event("volumeChanged"));
     }
+
+    /**
+     *  @private
+     *  Event handler for mediaPlayerCapability changes.  We only use this
+     *  when trying to load up the video without playing it.
+     */
+    private function videoPlayer_mediaPlayerCapabilityChangeHandler(event:MediaPlayerCapabilityChangeEvent):void
+    {
+        // only come in here when we want to load the video without playing it.
+
+        // wait until we are playable, pausable, and seekable before doing anything:
+        if (videoPlayer.playable && videoPlayer.pausable && videoPlayer.seekable)
+        {
+            // now that we are loading up, let's remove the event listeners:
+            videoPlayer.removeEventListener(MediaPlayerCapabilityChangeEvent.PLAYABLE_CHANGE, videoPlayer_mediaPlayerCapabilityChangeHandler);
+            videoPlayer.removeEventListener(MediaPlayerCapabilityChangeEvent.PAUSABLE_CHANGE, videoPlayer_mediaPlayerCapabilityChangeHandler);
+            videoPlayer.removeEventListener(MediaPlayerCapabilityChangeEvent.SEEKABLE_CHANGE, videoPlayer_mediaPlayerCapabilityChangeHandler);
+
+            // if we are already playing() for some reason because someone called play(), then
+            // we don't need to do anything.
+            if (videoPlayer.playing)
+                return;
+
+            // going to call play(), pause(), seek().  These are asynchronous operations, but
+            // NetStream will "do the right thing" if I call play() and then pause().  However,
+            // seek is still asynchronous, so I need to keep the video muted until the
+            // seek is complete.
+            videoPlayer.addEventListener(SeekEvent.SEEK_END, videoPlayer_seekEndHandler);
+
+            beforeLoadMuted = videoPlayer.muted;
+            videoPlayer.muted = true;
+
+            inLoadingState = true;
+            videoPlayer.play();
+            videoPlayer.pause();
+            videoPlayer.seek(0);
+        }
+    }
+
+    /**
+     *  @private
+     *  Event handler for seekEnd events.  We only use this
+     *  when trying to load up the video without playing it.
+     *  This will be called after the video has loaded up and
+     *  we have finished seeking back to the first frame.
+     */
+    private function videoPlayer_seekEndHandler(event:SeekEvent):void
+    {
+        videoPlayer.removeEventListener(SeekEvent.SEEK_END, videoPlayer_seekEndHandler);
+        inLoadingState = false;
+        videoPlayer.muted = beforeLoadMuted;
+    }
 }
 }


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

--- frameworks/projects/automation_air/src/mx/automation/air/AirDragManagerAutomationHandler.as
+++ frameworks/projects/automation_air/src/mx/automation/air/AirDragManagerAutomationHandler.as
@@ -0,0 +1,299 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.automation.air
+{
+	import flash.desktop.Clipboard;
+	import flash.desktop.NativeDragOptions;
+	import flash.display.DisplayObject;
+	import flash.events.EventDispatcher;
+	import flash.events.IEventDispatcher;
+	import flash.events.NativeDragEvent;
+
+	import mx.automation.IAutomationObject;
+	import mx.automation.events.AutomationDragEvent;
+	import mx.core.DragSource;
+	import mx.managers.ISystemManager;
+
+	[Mixin]
+
+	public class AirDragManagerAutomationHandler
+	{
+		private static var sm:ISystemManager;
+		private static  var dragStartHappened:Boolean = false;
+		private static var _lastClipBoardObject:Clipboard;
+		private static var _lastFormat:String;
+		private static var dragOptions:NativeDragOptions;
+		private static var lastDragStartObj:IAutomationObject ;
+		private static var _lastDragSource:DragSource;
+
+		public function AirDragManagerAutomationHandler()
+		{
+		}
+
+		public static function init(root:DisplayObject):void
+		{
+			sm = root as ISystemManager;
+		}
+
+
+
+		public static function getlastDragStartObj():IAutomationObject
+		{
+			return lastDragStartObj;
+		}
+
+		public static function getLastDragStartFormat():String
+		{
+			return _lastFormat;
+		}
+
+		public static function storeAIRDragSourceDetails(dragSource:DragSource):void
+		{
+			dragOptions = new NativeDragOptions();
+			dragOptions.allowCopy = true;
+			dragOptions.allowMove = true;
+			dragOptions.allowLink = false;
+
+			_lastClipBoardObject = null;
+			dragStartHappened = true;
+
+			_lastDragSource = dragSource;
+		}
+
+
+		private static function formClipboard(dragSource:DragSource):Clipboard
+		{
+			var clipboardObj:Clipboard = new Clipboard();
+
+			var formatsArr:Array = dragSource.formats;
+			if (formatsArr)
+			{
+				//var dataArray:Array = new Array();
+				var count: int  = formatsArr.length;
+				var index:int  = 0;
+				while (index < count)
+				{
+					// get the data object
+					//var currentDataObject:Object = dragSource.dataForFormat(formatsArr[index]);
+					//clipboardObj.setData(formatsArr[index],currentDataObject,false);
+					// The above commented part was throwing an RTE if currentDataObject is null.
+					// http://bugs.adobe.com/jira/browse/FLEXENT-1069
+					// So we are using setDataHandler() method of ClipBoard instead of setData()
+					// in the same way how NativeDragManager constructs a clipboard object in doDrag()
+					var dataFetcher:DragDataFormatFetcher = new DragDataFormatFetcher();
+					dataFetcher.dragSource = dragSource;
+					dataFetcher.format = formatsArr[index];
+					clipboardObj.setDataHandler(formatsArr[index],dataFetcher.getDragSourceData,false);
+					index++;
+				}
+			}
+			return clipboardObj;
+		}
+
+		public static function replayAIRDragStartEvent(realTarget:EventDispatcher , dragEvent:AutomationDragEvent, draggedItems:IAutomationObject):void
+		{
+			lastDragStartObj = realTarget as IAutomationObject;
+			//dragStartHappened = false;
+			if (dragStartHappened == false)
+			{
+				_lastClipBoardObject = new Clipboard();
+				_lastClipBoardObject.setData("items",new Object(),false);
+				if (!dragOptions)
+					dragOptions = new NativeDragOptions();
+				dragOptions.allowCopy = true;
+				dragOptions.allowMove = true;
+				dragOptions.allowLink = false;
+
+				// we need to crete a native drag enter event and then a drag drop event and dispatch on our component.
+				var dragStartEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_START);
+				dragStartEvent.clipboard = _lastClipBoardObject;
+				dragStartEvent.allowedActions = dragOptions;
+				dragStartEvent.dropAction = dragEvent.action;
+				dragStartEvent.localX = dragEvent.localX;
+				dragStartEvent.localY = dragEvent.localY;
+				dragStartEvent.buttonDown = true;
+				if (dragStartEvent.isDefaultPrevented())
+					trace  ('here-x');
+				realTarget.dispatchEvent(dragStartEvent);
+			}
+		}
+
+		public static function replayAIRDragDropEvent(realTarget:EventDispatcher , dragEvent:AutomationDragEvent/*,dragSource:DragSource*/):void
+		{
+			// we should have 	dragStartHappened as true,_lastClipBoardObject and dragOptions as non null values.
+			// in the case marhshalled application drag start and drag drop can be in different application domain.
+			if (!dragStartHappened)
+			{
+				// we need to get the details from the application where the current dragStart happened.
+			}
+			else
+			{
+				_lastClipBoardObject = formClipboard(_lastDragSource);
+				if (_lastClipBoardObject && dragOptions)
+				{
+					// we need to crete a native drag enter event and then a drag drop event and dispatch on our component.
+					var dragEnterEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_ENTER);
+					dragEnterEvent.clipboard = _lastClipBoardObject;
+					dragEnterEvent.allowedActions = dragOptions;
+					dragEnterEvent.dropAction = dragEvent.action;
+					dragEnterEvent.localX = dragEvent.localX;
+					dragEnterEvent.localY = dragEvent.localY;
+					dragEnterEvent.buttonDown = true;
+					realTarget.dispatchEvent(dragEnterEvent);
+
+					var dragDropEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_DROP);
+					dragDropEvent.clipboard = _lastClipBoardObject;
+					dragDropEvent.allowedActions = dragOptions;
+					dragDropEvent.dropAction = dragEvent.action;
+					dragDropEvent.localX = dragEvent.localX;
+					dragDropEvent.localY = dragEvent.localY;
+					realTarget.dispatchEvent(dragDropEvent);
+
+					// we need to dispatch the dragComplete on the dragStart object.
+					if (lastDragStartObj as IEventDispatcher)
+					{
+						var dragCompleteEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_COMPLETE);
+						dragCompleteEvent.clipboard = _lastClipBoardObject;
+						dragCompleteEvent.allowedActions = dragOptions;
+						dragCompleteEvent.dropAction = dragEvent.action;
+						dragCompleteEvent.localX = dragEvent.localX;
+						dragCompleteEvent.localY = dragEvent.localY;
+						(lastDragStartObj as IEventDispatcher).dispatchEvent(dragCompleteEvent);
+					}
+
+
+				}
+			}
+
+			dragStartHappened = false;
+
+			_lastDragSource = null;
+
+		}
+
+
+		public static function replayAIRDragDropMarshalledEvent(realTarget:Object , dragEvent:Object/*,dragSource:DragSource*/):void
+		{
+			// we should have 	dragStartHappened as true,_lastClipBoardObject and dragOptions as non null values.
+			// in the case marhshalled application drag start and drag drop can be in different application domain.
+			if (dragStartHappened == false)
+			{
+				// we need to get the details from the application where the current dragStart happened.
+			}
+			else
+			{
+				_lastClipBoardObject = formClipboard(_lastDragSource);
+				if (_lastClipBoardObject && dragOptions)
+				{
+					// we need to crete a native drag enter event and then a drag drop event and dispatch on our component.
+					var dragEnterEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_ENTER);
+					dragEnterEvent.clipboard = _lastClipBoardObject;
+					dragEnterEvent.allowedActions = dragOptions;
+					dragEnterEvent.dropAction = dragEvent["action"];
+					dragEnterEvent.localX = dragEvent["localX"];
+					dragEnterEvent.localY = dragEvent["localY"];
+					dragEnterEvent.buttonDown = true;
+					realTarget.dispatchEvent(dragEnterEvent);
+
+					var dragDropEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_DROP);
+					dragDropEvent.clipboard = _lastClipBoardObject;
+					dragDropEvent.allowedActions = dragOptions;
+					dragDropEvent.dropAction = dragEvent["action"];
+					dragDropEvent.localX = dragEvent["localX"];
+					dragDropEvent.localY = dragEvent["localY"];
+					realTarget.dispatchEvent(dragDropEvent);
+
+					// we need to dispatch the dragComplete on the dragStart object.
+					if (lastDragStartObj as IEventDispatcher)
+					{
+						var dragCompleteEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_COMPLETE);
+						dragCompleteEvent.clipboard = _lastClipBoardObject;
+						dragCompleteEvent.allowedActions = dragOptions;
+						dragCompleteEvent.dropAction = dragEvent["action"];
+						dragCompleteEvent.localX = dragEvent["localX"];
+						dragCompleteEvent.localY = dragEvent["localY"];
+						(lastDragStartObj as IEventDispatcher).dispatchEvent(dragCompleteEvent);
+					}
+
+
+				}
+			}
+
+			dragStartHappened = false;
+			_lastDragSource = null;
+
+		}
+
+		public static function replayAIRDragCancelEvent(realTarget:EventDispatcher,dragEvent:AutomationDragEvent ):void
+		{
+			_lastClipBoardObject = formClipboard(_lastDragSource);
+			var dragCancelEvent:NativeDragEvent = new NativeDragEvent(NativeDragEvent.NATIVE_DRAG_COMPLETE);
+			dragCancelEvent.clipboard = _lastClipBoardObject;
+			dragCancelEvent.allowedActions = dragOptions;
+			dragCancelEvent.dropAction = dragEvent.action;
+			dragCancelEvent.localX = dragEvent.localX;
+			dragCancelEvent.localY = dragEvent.localY;
+			(lastDragStartObj as IEventDispatcher).dispatchEvent(dragCancelEvent);
+
+			dragStartHappened = false;
+			_lastDragSource = null;
+
+		}
+		public static function  get lastClipBoardObject():Clipboard
+		{
+			return lastClipBoardObject;
+		}
+	}
+}
+import mx.core.DragSource;
+
+
+class DragDataFormatFetcher
+{
+
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function DragDataFormatFetcher()
+	{
+		super();
+	}
+
+	/**
+	 *  @private
+	 */
+	public var dragSource:DragSource;
+
+	/**
+	 *  @private
+	 */
+	public var format:String;
+
+	/**
+	 *  @private
+	 */
+	public function getDragSourceData():Object
+	{
+		if (dragSource)
+			return dragSource.dataForFormat(format);
+		else
+			return null;
+	}
+}


Added WeaveAPI.JS_var_weave

Added WeaveAPI.JS_var_weave

--- WeaveAPI/src/weave/api/WeaveAPI.as
+++ WeaveAPI/src/weave/api/WeaveAPI.as
@@ -168,6 +168,13 @@
 		}

 		/**
+		 * This is a JavaScript statement that sets a variable called "weave" equal to the embedded SWF object.
+		 */
+		public static const JS_var_weave:String = ExternalInterface.objectID
+			? 'var weave = document.getElementById("' + ExternalInterface.objectID + '");'
+			: 'var weave = document.body.firstChild;';
+
+		/**
 		 * avmplus.describeTypeJSON(o:*, flags:uint):Object
 		 */
 		private static const describeTypeJSON:Function = DescribeType.getJSONFunction();
@@ -206,21 +213,11 @@
 				var prev:Boolean = ExternalInterface.marshallExceptions;
 				ExternalInterface.marshallExceptions = false;
 				ExternalInterface.call(
-					<![CDATA[
-						function(objectID)
-						{
-							var weave = objectID ? document.getElementById(objectID) : document.body.firstChild;
-							if (window && window.weaveReady)
-							{
-								window.weaveReady(weave);
-							}
-							else if (weaveReady)
-							{
-								weaveReady(weave);
-							}
-						}
-					]]>,
-					[ExternalInterface.objectID]
+					'function(){' +
+						JS_var_weave +
+						'if (window && window.weaveReady) { window.weaveReady(weave); }' +
+						'else if (weaveReady) { weaveReady(weave); }' +
+					'}'
 				);
 				ExternalInterface.marshallExceptions = prev;


Remove unused variables in the lights out script.

--- Game/Resources/elevatorScene/Scripts/LightsOutScript.as
+++ Game/Resources/elevatorScene/Scripts/LightsOutScript.as
@@ -1,6 +1,4 @@
 class LightsOutScript {
-    Hub @hub;
-    Entity @self;
     Entity @board;
     Entity @rightController;
     array<Entity@> buttons(25);
@@ -10,8 +8,6 @@
     bool isPressed = false;

     LightsOutScript(Entity @entity){
-        @hub = Managers();
-        @self = @entity;
         @board = GetEntityByGUID(1511530025);
         @rightController = GetEntityByGUID(1508919758);


Fixed antiAliasing getter to call updateBackBuffer() instead of updateStage3D() Set visibility of stage when setupOnStage() is called

--- src/aerys/minko/render/Viewport.as
+++ src/aerys/minko/render/Viewport.as
@@ -189,7 +189,7 @@
 		public function set antiAliasing(value : uint) : void
 		{
 			_antiAliasing = value;
-			updateStage3D();
+			updateBackBuffer();
 		}

 		/**
@@ -266,10 +266,8 @@
 				_stage3d.addEventListener(Event.CONTEXT3D_CREATE, context3dCreatedHandler);
 				_stage3d.requestContext3D();
 			}
-			else
-			{
-				_stage3d.visible = visible;
-			}
+
+			_stage3d.visible = visible;

 			stage.scaleMode = StageScaleMode.NO_SCALE;
 			stage.align = StageAlign.TOP_LEFT;


OOPS: restored messages inadvertently removed from a few asserts.

--- as3/src/asunit/framework/Assert.as
+++ as3/src/asunit/framework/Assert.as
@@ -177,7 +177,7 @@
                 actual = args[0];
             }
             else if(args.length == 2) {
-                message = args[0];
+                message = args[0] + " ";
                 actual = args[1];
             }
             else {
@@ -185,7 +185,7 @@
             }

 			if(actual == null) {
-				throw new AssertionFailedError("expected not null but was:<" + actual + ">");
+				throw new AssertionFailedError(message + "expected not null but was:<" + actual + ">");
 			}
         }
         /**
@@ -227,7 +227,7 @@
                 actual = args[1];
             }
             else if(args.length == 3) {
-                message = args[0];
+                message = args[0] + " ";
                 expected = args[1];
                 actual = args[2];
             }
@@ -236,7 +236,7 @@
             }

             if(expected !== actual) {
-				throw new AssertionFailedError("expected same as:<" + expected + "> but was:<" + actual + ">");
+				throw new AssertionFailedError(message + "expected same as:<" + expected + "> but was:<" + actual + ">");
             }
         }
          /**
@@ -254,7 +254,7 @@
                 actual = args[1];
             }
             else if(args.length == 3) {
-                message = args[0];
+                message = args[0] + " ";
                 expected = args[1];
                 actual = args[2];
             }
@@ -263,7 +263,7 @@
             }

             if(expected === actual) {
-				throw new AssertionFailedError("expected not same but both were:<" + actual + ">");
+				throw new AssertionFailedError(message + "expected not same but both were:<" + actual + ">");
 			}
         }


A couple of example usage fixes.

A couple of example usage fixes.

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

--- src/as/com/threerings/util/Enum.as
+++ src/as/com/threerings/util/Enum.as
@@ -31,8 +31,8 @@
  *
  * public final class Foo extends Enum
  * {
- *     public static const ONE = new Foo("ONE");
- *     public static const TWO = new Foo("TWO");
+ *     public static const ONE :Foo = new Foo("ONE");
+ *     public static const TWO :Foo = new Foo("TWO");
  *     finishedEnumerating(Foo);
  *
  *     // {at}private
@@ -43,7 +43,7 @@
  *
  *     public static function valueOf (name :String) :Foo
  *     {
- *         return Enum.valueOf(Foo, name);
+ *         return Enum.valueOf(Foo, name) as Foo;
  *     }
  *
  *     public static function values () :Array


add input callback for throwing light cubes with spaces

--- assets/scripts/input/play_state.as
+++ assets/scripts/input/play_state.as
@@ -1,3 +1,5 @@
+#include "../../assets/scripts/entities/light_cube.as"
+
 void move_forward_begin() {
 	auto player = get_entity(player_id);
 	auto player_state = player.get_state_component();
@@ -77,3 +79,15 @@
 		player_state.change_state("stand");
 	}
 }
+
+void throw_light_begin() {
+	auto player = get_entity(player_id);
+	glm::vec3 direction = player.get_character_physics_component().direction();
+	glm::vec3 position = player.position();
+	light_cube lc(position + direction * 2.f, player.rotation());
+	lc.impl().get_physics_component().apply_central_impulse((direction + glm::vec3(0.f, 0.2f, 0.f)) * 5.f);
+}
+
+void throw_light_end() {
+
+}


- change: Extended interface of UIObject by adding more accessor methods for child elements

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

--- src/reprise/ui/UIObject.as
+++ src/reprise/ui/UIObject.as
@@ -153,6 +153,37 @@
 				child.setRootElement(rootElement);
 			}
 		}
+
+		/**
+		 * Returns a live list of the element's children
+		 *
+		 * @returns A live list of the element's children
+		 */
+		public function children() : Array
+		{
+			return m_children;
+		}
+
+		/**
+		 * Returns the child element uniquely identified by the given name
+		 *
+		 * Note that this name is really only useful internally, as it's naming schema is not
+		 * guaranteed. One external use for the name is to locate an object based on it's path,
+		 * which can be got by calling element#toString.
+		 *
+		 * @return The child element identified by the given or null if none such element exists
+		 */
+		public function elementForName(name : String) : UIObject
+		{
+			for each (var child : UIObject in m_children)
+			{
+				if (child.name == name)
+				{
+					return child;
+				}
+			}
+			return null;
+		}

 		public override function addChild(child : DisplayObject) : DisplayObject
 		{


added caption callback support

added caption callback support

--- src/SoundManager2_SMSound_AS3.as
+++ src/SoundManager2_SMSound_AS3.as
@@ -157,6 +157,7 @@
             this.ns.bufferTime = this.bufferTime; // set to 0.1 or higher. 0 is reported to cause playback issues with static files.
             this.st = new SoundTransform();
             this.cc.onMetaData = this.metaDataHandler;
+  		      this.cc.setCaption = this.captionHandler;
             this.ns.client = this.cc;
             this.ns.receiveAudio(true);
             this.addNetstreamEvents();
@@ -259,6 +260,30 @@
         this.cc.onMetaData = function(infoObject: Object) : void {}
       }
     }
+
+    public function captionHandler(infoObject: Object) : void {
+      if (sm.debugEnabled) {
+        var data:String = new String();
+        for (var prop:* in infoObject) {
+          data += prop+': '+infoObject[prop]+' \n';
+        }
+        //writeDebug('Caption: '+data);
+      }
+      if (!this.loaded) {
+        // writeDebug('not loaded yet: '+this.ns.bytesLoaded+', '+this.ns.bytesTotal+', '+infoObject.duration*1000);
+        // TODO: investigate loaded/total values
+        // ExternalInterface.call(baseJSObject + "['" + this.sID + "']._whileloading", this.ns.bytesLoaded, this.ns.bytesTotal, infoObject.duration*1000);
+        //ExternalInterface.call(baseJSObject + "['" + this.sID + "']._whileloading", this.bytesLoaded, this.bytesTotal, (infoObject.duration || this.duration))
+      }
+      // null this out for the duration of this object's existence.
+      // it may be called multiple times.
+      //this.cc.setCaption = function(infoObject: Object) : void {}
+
+	    //writeDebug('Caption\n'+infoObject['dynamicMetadata']);
+	    //writeDebug('firing _oncaption for '+this.sID);
+      ExternalInterface.call(this.sm.baseJSObject + "['" + this.sID + "']._oncaption", infoObject['dynamicMetadata']);
+
+	  }

     public function getWaveformData() : void {
       // http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/SoundMixer.html#computeSpectrum()


doPost should be public if doGet is

doPost should be public if doGet is

--- src/flails/request/HTTPClient.as
+++ src/flails/request/HTTPClient.as
@@ -142,7 +142,7 @@
       loader.load(request);
     }

-    private function doPost(url:String):void {
+    public function doPost(url:String):void {
       addHeader("Content-Type", "application/x-www-form-urlencoded");

       request.method = "POST";