MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manuel d'utilisateur Page 35

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 184
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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() {
...
}
Vue de la page 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 183 184

Commentaires sur ces manuels

Pas de commentaire