MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Uživatelský manuál Strana 35

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 184
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 34
Global functions 35
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:
Deprecated features
The following features are deprecated:
The Object.registerClass() method no longer works on ActionScript 1.0 prototype
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 gotoAndPlay() are not supported or changed.
ActionScript 2.0 ActionScript 3.0
chr(num) String.fromCharCode(num)
int(expr) Math.round(expr)
length(expr) expr.length
mbchr(num) String.fromCharCode(num)
mblength(string) string.length
mbord(char) String(char).charCodeAt(0)
mbsubstring(string, index, count) string.substr(index,count)
ord String(char).charCodeAt(0)
random Math.random
subString(string, index, count) string.substr(index,count)
getProperty(target, propertyName) target.propertyName
setProperty(target,propertyName,value) target.propertyName = value
object.addProperty(
prop:String,
getFunc:Function,
setFunc:Function)
Class definition should use:
function get prop() {
...
}
function set prop() {
...
}
Zobrazit stránku 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 183 184

Komentáře k této Příručce

Žádné komentáře