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

Migrating applications to flex 2
Table of Contents

Advertisement

newstring2.prop = 1;
trace(newstring2.prop);
ActionScript 3.0:
newstring = new String("hello");
String.prototype.sayHi = function() {
trace("hi!");
}
newstring.sayHi();
newstring2 = "hello";
newstring2.prop = 1;
String.prototype.prop = 1;
trace(newstring2.prop);
Working with keys
The Key class is now the Keyboard class.
doLater() method
The
method on UIComponent has been removed. You now use
doLater()
The
method takes a similar number of arguments. You no longer specify the
callLater()
object on which the function to be called later is defined. In addition, because of stricter
typing, you must remove quotes from around the function if you used them; the type is
function and cannot be coerced from type String. For example:
Flex 1.5:
doLater(this, "moveText");
Flex 2:
callLater(moveText);
The
method still takes an optional
callLater()
ActionScript 3.0 Language Reference.
LocalConnection
The
LocalConnection.allowDomain()
LocalConnection calls to this LocalConnection instance. In previous versions of ActionScript,
the
method was a callback method that you implemented. In ActionScript
allowDomain()
3.0,
allowDomain()
method work in much the same way as the
allowDomain()
method.
40
ActionScript 2.0 to 3.0
// prints '1'
// Warning, String is sealed...
// Output: 1
method specifies one or more domains that can send
is a built-in method of LocalConnection that you call. This makes the
argument. For more information, see
args
Security.allowDomain()
.
callLater()

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents