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

Migrating applications to flex 2
Table of Contents

Advertisement

Function changes
Some global functions have been removed and replaced with new functions. The following
table shows removed global functions and their ActionScript 3.0 equivalents:
ActionScript 2.0
chr(num)
int(expr)
length(expr)
mbchr(num)
mblength(string)
mbord(char)
mbsubstring(string, index, count)
ord
random
subString(string, index, count)
getProperty(target, propertyName)
setProperty(target,propertyName,value)
object.addProperty(
prop:String,
getFunc:Function,
setFunc:Function)
Deprecated features
The following features are deprecated:
The
Object.registerClass()
objects, only on ActionScript 2.0 classes.
Prototype inheritance no longer works for the built-in objects.
Features such as __resolve no longer works the same way.
ASNative is no longer supported.
#initclip no longer supported.
_global may not be supported (use static variables of classes).
Most classes are sealed, not dynamic, and cannot have properties added to them.
Top-level functions such as
ActionScript 3.0
String.fromCharCode(num)
Math.round(expr)
expr.length
String.fromCharCode(num)
string.length
String(char).charCodeAt(0)
string.substr(index,count)
String(char).charCodeAt(0)
Math.random
string.substr(index,count)
target.propertyName
target.propertyName = value
Class definition should use:
function get prop() {
...
}
function set prop() {
...
}
method no longer works on ActionScript 1.0 prototype
are not supported or changed.
gotoAndPlay()
Global functions
35

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents