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

Migrating applications to flex 2
Table of Contents

Advertisement

Arrays
Arrays no longer automatically update if you change the data. This means that you should no
longer databind to an Array unless you manually call the
element in the Array changes. Otherwise, the control to which the data is bound will not
reflect the changes. You can databind to a Collection.
Two convenience methods of the Array class have been removed. You can no longer use the
and
addItem()
removeItem()
respectively. Array was formerly a mixin, but is now used directly from the Flash package
without modification. For example:
var cards:Array;
// Old way.
cards.addItem({label: "Visa", data: CreditCardValidatorCardType.VISA});
// New way.
cards.push({label: "Visa", data: CreditCardValidatorCardType.VISA});
Arrays are commonly used as data providers in Flex applications.
setInterval() and clearInterval()
The
setInterval()
use them you must import that package. But the
methods are deprecated in favor of the new Timer class.
For an example that uses a timer in a Flex application, see
For information on using the Timer class, see the ActionScript 3.0 Language Reference.
Metadata
You must now separate metadata properties with commas. For example:
ActionScript 2.0:
[Style(name="horizontalAlign" enumeration="left,center,right"
inherit="no")]
ActionScript 3.0:
[Style(name="horizontalAlign", enumeration="left,center,right",
inherit="no")]
methods. You must instead use
and
clearInterval()
dispatchEvent()
push()
methods are now in the flash.util package, so to
setInterval()
"Using Timer" on page
each time an
and
,
pop()
and
clearInterval()
182.
Miscellaneous
37

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents