Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual page 12

Migrating applications to flex 2
Table of Contents

Advertisement

Application and container initialization
The
event is now dispatched later in the startup and component creation life
initialize
cycle. In particular, it is now dispatched after the object's children have been created. If your
event handler assumes that the object's children have already been created, you can use the
event. If your event handler requires that the object's children have been
initialize
processed by the LayoutManager class, use the
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()">
Alpha and scale properties
The
,
scaleX
scaleY
This is also true for the
properties.
Zoom.zoomTo
Event.currentTarget
Use the
currentTarget
Event object now has two properties:
that originally dispatched the event, and the latter is the object to which your event handler is
attached. The two are often the same, but they may differ if the event has bubbled up from a
child object.
In most cases, you will want to change the
because the object that was previously the target is now most likely the current target; for
example:
switch (event.currentTarget.className) { ... }
For more information, see
Uninitialized values
Remove checks against the
(no-type) "type". Other types can no longer store the
to other types, it will be coerced into
undefined
method to check if a variable is
isNaN()
If you do not initialize a variable at all, the initial value is different than in Flex 1.x. For more
information, see
"Initializing variables" on page
12
Getting Started
, and
properties now range from 0.0 to 1.0, rather than 1 to 100.
alpha
,
Fade.alphaFrom
property rather than the
target
"Using the target property" on page
value. In Flex 2,
undefined
NaN
creationComplete
,
Fade.alphaTo
Zoom.zoomFrom
property of the Event object. The
target
and
currentTarget
property to the
target
113.
undefined
undefined
,
,
, or
null
NaN
0
.
29.
event; for example:
, and
. The former is the object
property,
currentTarget
is only for use with the *
value. If you assign
. You can use the
false

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents