Flex 2 changes between Beta 3 and Release

Sorry these aren’t coming out in a more official document but here are many of the changes we made between Beta 3 and the Released product. The formatting may not be perfect here because it’s from a different HTML doc that may not be blog friendly 🙂

New and modified features

This section lists new and modified features in:

Flex SDK changes

Flex SDK 2 changes include the following:

Functionality changes

Samples, etc.

  • New samples in GMC: Photoviewer, Hybridstore, Flexstore UI updates
  • HTML templates for Player detection & history management added to SDK in resources directory


  • Removed childrenCreationCompleteEffect. We no longer need this event because creationComplete will fire at the correct time when our container has a creationPolicy of queued or none.
  • Removed all references to modelChanged. It is now collectionChange
  • Popups didn’t work as renderers. Implemented owner/owns API change to support ownership.
  • The drawRoundRectComplex() API is being removed from the player. A new GraphicsUtil class is being added to the mx.utils package. It has a single method, drawRoundRectComplex(), with the same signature as the player API with the addition of a graphics parameter as the first argument.
  • Promoted more internal subcomponents from mx_internal or private Developers wanted more access to enough internal subcomponents.
    • Button: textField
    • ComboBase: textInput
    • MenuItemRenderer: icon, label, branchIcon
    • Panel: titleBar, titleTextField, statusTextField, controlBar
    • TabNavigator: tabBar
    • TileListItemRenderer: label, icon
    • ToolTip: textField
    • TreeItemRenderer: label, icon, disclosureIcon (which was previously named disclosure)
    • We also decided to rename the ‘text’ property of BaseListData to ‘label’ because it is produced by itemToLabel(). This change should affect only people who have implementated drop-in renderers.

  • Adding content coordinate APIs.
    The Flash player has two coordinate systems: local and global. Flex introduces a third: content. We were already using content coordinates for placing components inside absolute layout containers. For example, placing a Button at 0, 0 inside a Panel puts the button in the upper-left corner of the content area. This checkin formalizes the concept and provides functions for converting to/from content coordinates. Content coordinates also take scrolling into consideration. For example, if you have a scrolling container that is scrolled down 100 pixels, the content coordinates will be 100 pixels – any chrome height lower than local coordinates.
    New functions: contentToGlobal, globalToContent, contentToLocal and localToContent. These point conversion functions are similar to globalToLocal/localToGlobal, except they convert to/from content coordinates.
    New properties: contentMouseX, contentMouseY. These read-only properties return the mouse position in content coordinates.
  • ApplicationControlBar changes:
    • Floating mode has been changed to normal mode.
    • The metadataReceived event has been removed. The event is still dispatched but is not supported. Using this event in MXML returns a compilation error.
  • DataProvider APIs are no longer in the list classes. For example, you can no longer call myList.getItemAt(index). Instead, call myList.dataProvider.getItemAt(index).
  • IFocusManager now contains a getNextFocusManagerComponent method.
  • UIComponent – Added a new public property called visibleRegion:Rectangle, which describes the visible area of the component, including dropshadows.
  • Flex now supports type-selector inheritance.
  • The mx:Model tag now requireswell formed E4X XML.For example, a single root node is now required.For example,

    <mx:Model id="checkoutInfo">


  • The application background gradient now uses backgroundGradientColors and backgroundGradientAlphas for styling instead of fillColors/fillAlphas. If backgroundGradientColors are undefined (which is the default), they will be calculated based on backgroundColor. This means you no longer need to set fillColors (or backgroundGradientColors) when setting backgroundColor unless you require specific control over the gradient colors


  • *Style changed to *StyleName in charts
  • maxSize for axis renderers now correctly take into account the title
  • PieSeries, PieChart, and GradientEntry styles and properties now range 0-1 instead of 0-100
  • pieseries and gradient values now range 0-1 instead of 0-100
  • Axis.name is now Axis.displayName
  • axis renderer properties are now typed as IAxisRenderer


  • Added new style properties – explicit skin values for editable ComboBox: editableUpSkin, editableOverSkin, editableDownSkin and editableDisabledSkin along with an arrowButtonWidth style. This makes editable an explicit skin state, rather than implied.

Date Chooser, Date Field

  • Added new styles backgroundColor and backgroundAlpha to DateChooser.
  • Added new property formatString (consistent with DateFormatter) to DateField
  • Added two API’s monthSymbol, yearSymbol in Datechooser, DateField
  • Made DateField dateToString() and stringToDate() functions public again.


  • Add a new “tweenStart” event to Tween. This event bubbles up to TweenEffect and MaskEffect.
  • TweenEffectInstance.createTween goes from mx_internal to protected
  • In an override of the EffectInstance.play() method of a Tween effect, you now do the following to create the Tween object:


    // Create a Tween object. The tween begins playing immediately.var tween:Tween = createTween(this, startVal, endVal, duration, minFps);

    Beta 3:

    // Create a Tween object. The tween begins playing immediately.var tween:Tween = new Tween(this, startVal, endVal, duration, minFps);

    This lets the tween use the tweenStart, tweenEnd, tweenUpdate events, lets it play backwards, and initializes any easing functions.

  • Several properties in CompositeEffectInstance were changed from protected to mx_internal.
  • The changeEffect metadata effect trigger will be removed from Accordion.as and ViewStack.as. Users can use the showEffect and hideEffect triggers on the children of the ViewStack or Accordion as a replacement.
  • MaskEffectInstance.as
    • Added a new protected property called actualTargetBounds:Rectangle. This is used by the subclasses to figure out the size, start position and end position of the mask.
    • Added a new parameter (bounds:Rectangle) to the protected function defaultCreateMask and the public function createMaskFunction.


  • The “mouseDownOutside” and “mouseWheelOutside” events dispatched from a popped-up UIComponent are now FlexMouseEvents, not MouseEvents.
    All code involving these events now uses the event type constants MOUSE_DOWN_OUTSIDE and MOUSE_WHEEL_OUTSIDE in FlexMouseEvent. (MOUSE_WHEEL_OUTSIDE was previously called MOUSE_SCROLL_OUTSIDE, but no code was actully using it. It should be called MOUSE_WHEEL_OUTSIDE because the Player has a MOUSE_WHEEL event type.)
    The metadata for these events was wrongly on PopUpManager, moved it onto UIComponent where it belongs.
  • added new static property to EventPriority
    We need to add a new enum value to mx.core.EventPriority. This new enum value will be called CURSOR_MANAGEMENT and will have a value of 200. This will allow us to have a higher priority over the default.
    CursorManager now listens to the mouseMove events in the capture phase with a priority of 200.


  • Added four new styles to support FlashType, the whizzy font renderer formerly known as Saffron.
  • They are named fontAntiAliasType, fontGridFitType, fontSharpness, and fontThickness. All are inheriting styles, and their default values are defined on the global selector.
    • fontAntiAliasType sets the antiAliasType property of internal TextFields. The possible values are “normal” (flash.text.AntiAliasType.NORMAL) and “advanced” (flash.text.AntiAliasType.ADVANCED). The default is “advanced”, which enables the FlashType renderer if you are using an embedded FlashType font. With “normal” you get the kind of embedded font renderering that we’ve been seeing up to now. This style has no effect for system fonts. For more information, see the documentation of the TextField and AntiAliasType classes.
    • The other three styles are specific to FlashType rendering and therefore have meaning only when fontAntiAliasType is “advanced” and you are using an embedded FlashType font.
    • fontGridFitType sets the gridFitType property of internal TextFields. The possible values are “none” (flash.text.GridFitType.NONE), “pixel” (flash.text.GridFitType.PIXEL), and “subpixel” (flash.text.GridFitType.SUBPIXEL). The default is “pixel”. For more information, see the documentation of the TextField and GridFitType classes.
    • fontSharpness sets the sharpness property of internal TextFields. The possible values are Numbers from -400 to 400. The default is 0. For more information, see the documentation of the TextField class.
    • fontThickness sets the thickenss property of internal TextFields. The possible values are Numbers from -200 to 200. The default is 0. For more information, see the documentation of the TextField class.
  • Note that because these are CSS styles, you can use them flexibly in the same way that you use fontFamily, fontSize, etc. For example, a particular Text component could use subpixel-fitted FlashType rendering of New Century 14 at sharpness 50 and thickness -35 while all Buttons could use pixel-fitted FlashType rendering of Tahoma 10 at sharpness 0 and thickness 0. These styles apply to all the text in a TextField; you can’t apply them to just some characters and not others.


  • new style on Image component called “brokenImageBorderSkin” (skin, Class).
    Default value is mx.skins.halo.BrokenImageBorderSkin. It draws a border around
    the image control when it’s in the “broken image” state (useful for Zorn Design View
    and generally).


  • Significant enhancements to, and implementation changes in, Label. These changes don’t require any app revisions.
    • Removed the autoSize property. It was a misnomer, was inconsistent with other components, and was buggy in that it could cause an app to come up blank due to an infinite layout loop. To replace it, Label now respects the horizontalAlign style. For consistency, Label also respects the other relevant layout styles, namely verticalAlign, paddingLeft, paddingTop, paddingRight, and paddingBottom.
    • Moved the implementation of the ‘selectable’ property from Text into Label (its base class) so that you can have a selectable Label if you want one. But Label is still non-selectable by default, while Text is selectable by default.
    • Exposed the ‘truncateToFit’ property of Label so that if you don’t want truncation you can have clipping instead. And the truncation indicator (“…”) is now a localizable string so that you can use a Unicode ellipsis character if you are using a font that has it.


  • Changes to MenuEvent:
    • MenuEvent change has been renamed to itemClick
    • MenuEvent menuItemRollOut has been renamed to itemRollOut
    • MenuEvent menuItemRollOver has been renamed to itemRollOver
  • Added addChildAt() / removeChildAt() to IMenuDataDescriptor.


  • Change in measurement of Text when width isn’t specified. This may require some apps to specify a width or maxWidth for Text if they were relying on the old algorithm.
  • The textField property of Label, Text, TextInput, and TextArea is now protected rather than mx_internal.
  • Promote textWidth, textHeight, and getLineMetrics to public interface on text components.
  • TextInput and TextArea no longer dispatch a valueCommit event when the text property changes as the user types, cuts, and pastes (because this triggers premature validation).
  • The UITextFormat class has two new String properties, antiAliasType and gridFitType.


  • Added a method to the descriptor interfaces: Tree.hasChildren(item, model). This tests for the existance of children which is more strict than descriptor.isBranch


  • Video display now supports the following border styles:

    • backgroundAlpha="1.0"
    • backgroundColor="0x000000"
    • backgroundImage="undefined"
    • backgroundSize="undefined"
    • borderColor="undefined"
    • borderSides="left top right bottom"
    • borderSkin="ClassReference(‘mx.skins.halo.HaloBorder’)"
    • borderStyle="none"
    • borderThickness="1"

      The default background color is black.


  • The show-coach-warnings compiler option is now show-actionscript-warnings.
  • The show-dependency-warnings compiler option is now for internal use only.
  • The asc/mxmlc command-line option -es3 was renamed to -es.
  • The Flex compiler now enforces static type checking for operands when running in warning mode.

API changes

  • The CursorEvent class was removed.
  • The DefaultBindingProperty and DefaultTriggerEvent properties have been removed.
  • ControlBar: Removed the unused backgroundSkin style.
  • Button: Removed the cornerRadius style because it already includes SkinStyles.as.
  • ComboBox: Removed @private from the dropdownBorderColor style.
  • Menu: Removed the unused defaultIcon style and the inherited selectionDuration and useRollOver styles.
  • MenuBar: Removed the unused selectionDisabledColor, textRollOverColor, textSelectedColor, and useRollOver styles.
  • NumericStepper: Removed the obsolete trackSkin style and all code relating to the stepTrack.
  • TextInput: Removed the disabledColor style, which was already included from TextStyles.as.
  • Tree: Removed the unused defaultIcon style and the inherited selectionDuration style.
  • VideoDisplay: Removed @private from the metadataReceived event.
  • ListBase: Removed defaultIcon from the IS_ITEM_STYLE set.
  • SystemManager: Removed @private from the resize event.
  • The signature of ListBase.isItemSelected() changed from

    public function isItemSelected(item:IListItemRenderer):Boolean


    public function isItemSelected(data:Object):Boolean

Flex Data Services 2 changes

  • The default names of the Flex Data Services configuration files have changed. Notably, the top level Flex Data Services configuration file is named services-config.xml by default. The table below outlines each of the default file name changes from Beta 3 to GMC:
    Beta 3 GMC
    flex-enterprise-services.xml services-config.xml
    flex-remoting-service.xml remoting-config.xml
    flex-proxy-service.xml proxy-config.xml
    flex-messaging-service.xml messaging-config.xml
    flex-data-service.xml data-management-config.xml

  • RPC Services (WebService, RemoteObject and HTTPServices) – ThemakeObjectsBindable property is now honored by all RPC Services… anonymous Objects are wrapped in mx.utils.ObjectProxy instances and Arrays are wrapped in mx.utils.ArrayCollection instances.
  • An mx.rpc.events.InvokeEvent was added to RPC Services. This event is fired when a remote request is made from an RPCService.
  • The legacy <mx:RemoteObject> endpoint attribute was added back to the MXML API of RemoteObject. It allows the developer to compile a RemoteObject based application without a services configuration file. The endpoint is expected to be a fully qualified URL to a Flex Data Services 2-compatible channel endpoint and the request will always use the AMFChannel for URLs starting with http and SecureAMFChannel for URLs starting with https. The request will not send a channel-id so it is up to the user to ensure that it is appropriate to contact the the RemotingService destination via AMF.
  • ItemReference is now the return type for createItem and getItem. This requires no code changes but provides clients with a mechanism for detecting when the reference item is removed from another client. It also allows you to release a specific reference to an item retrieved via createItem or getItem in case you have more than one reference to the same item managed in a client.
  • A Flex Data Management Service change for assemblers that return references to lazy associations: In beta 3 your assembler had to return the complete state of all referenced items. Now, if your association tag is marked with lazy=”true”, you only need to return instances of the referenced objects where the id properties are populated. The rest of the state is not accessed. When the client fetches the value of the referenced item, your assembler’s get method is called to retrieve the referenced item. This also fixes a problem with the hibernate assembler in beta 3 where it would do a deep traversal of the entire object graph. Now, as long as your FDMS destination sets lazy="true" on the associations, Flex Data Management Service will only do the traversal it needs to fetch the ids of the referenced items.
  • TheDataService.metadata property was removed.
  • mx.rpc.AsyncToken.responder was updated to handle multiple responders and be consistent with mx.collections.ItemPendingError. Instead of setting the single responder property on an AsyncToken, you call addResponder to add a new IResponder implementation to the token, and accesses the responders property to get the Array of responders.
  • The enterprise_rb.swc file was broken up into rpc_rb.swc and fds_rb.swc.
  • All deprecated properties and methods were removed.
  • You can now specify a connect timeout value in services-config.xml <channel-definition/> properties like so:
    <channel-definition id="…" class="…">
    <endpoint uri="…" class="…"/>

    You can also set this on a channel directly in AS like:
    myChannel.connectTimeout = 2;

  • Performance update to support a fixed RTMP endpoint worker pool size. The default behavior is the same, which is to use a cached thread pool that grows as needed with no upper limit. To set an upper limit on the pool size, use the max-worker-threads tag, as the following example shows:

    <channel-definition id="qa-rtmp-ac" class="mx.messaging.channels.RTMPChannel">
    <endpoint uri="rtmp://" class="flex.messaging.endpoints.RTMPEndpoint"/>

Flex Builder 2 changes

There were no significant changes in Flex Builder functionality between Beta 3 and GMC.

Flash Player 9 Changes

  • flash.utils.getBaseClassName() is now getQualifiedSuperclassName()
  • The flash.text.TextField class has the following new methods:
    • public native function get useRichTextClipboard ():Boolean;
    • public native function set useRichTextClipboard(value:Boolean):void;

      In order for the text field from which the text is copied to copy the formats, and in order for the field to which the text is copied to receive the formats, useRichTextClipboard must be true in both places.

11 Responses to Flex 2 changes between Beta 3 and Release

  1. Pan Troglodytes says:

    For people asking questions and such, you’ll be much better off if you go here:http://groups.yahoo.com/group/flexcoders/

  2. mehul says:

    Does anybody knows why my flex 2 final release application crashes when a context menu item is selected ???i can give code if required???thanksmehul

  3. andrew k says:

    on the titlewindow control, borderColor now does the job of backgroundColoron the Text control, ‘leading’ is no longer a property – error.the Design Mode no longer previews my app, just gives a useless vague warning with no source lines.

  4. YangJie says:

    I noticed that in the part of “Flex Data Services 2 changes”, there was an item showed:[The enterprise_rb.swc file was broken up into rpc_rb.swc and fds_rb.swc.]but I could not find the file rpc_rb.swc in the Flex 2 installed directory.Could any one tell me where I can find this file.Thanks!

  5. mehul says:

    I have a datagrid made in beta 3 that was supporting array collection as dataprovider, i have not changed any code and ported my application to released version. The http service seems to be working but the datatrid is not showing the data…any idea?

  6. lobo says:

    event.call == event.tokenmenubar.change == itemClick

  7. Danny Tuppeny says:

    dataTip functions are now passed a HitData object, not an ChartItemEvent object, so you must do:// DataTip functionpublic function employeeDataTip(e:HitData):String{return “Name: ” + e.item.Name;}

  8. Pan Troglodytes says:

    Woops, just noticed #4 IS actually covered above in the “RPC Services” section.

  9. Pan Troglodytes says:

    4) HTTPRequest now returns results as ArrayCollections instead of Arrays.

  10. Jon Smith says:

    Flex 2 suxs

  11. Pan Troglodytes says:

    Here are a few more minor differences I noticed:1) You now receive a warning when you try to redefine a variable in two for loops:for (var i:uint = 0; i<10; i++);for (var i:uint = 1; i<5; i++);AS does not scoped variables like this, but the beta was a little more forgiving. You should only define the variable once. Either:var i:uintfor (i = 0; i<10; i++);for (i = 1; i<5; i++);OR less stylishly:for (var i:uint = 0; i<10; i++);for (i = 1; i<5; i++);2) [Bindable] only both getter/setter results in a warning. The beta didn’t ever complain about this.3) DateField not editable by default. You have to set editable=”true” now.