MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Bedienungsanleitung Seite 34

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 184
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 33
34 ActionScript 2.0 to 3.0
(hintString ? String:Number) is the non-assignment expression. The variable myVar is
dynamically typed to be String if
hintString is true, else its type will be Number. You can
use a non-assignment expression anywhere that you would use a type-assignment expression.
Global functions
Most global functions have changed packages. In addition, they are no longer implicitly
imported. This section describes some changes to the global functions.
Explicit imports
In most cases, you must import the classes to use global functions. For example, to use
functions in the System.* package, you now import flash.system.*. The global functions in
System.* were previously accessible in your
<mx:Script> blocks without explicit imports.
The following table lists common functions that you must now explicitly add an
import
statement to use:
For more information on what packages global functions are in, see the global functions entry
in ActionScript 3.0 Language Reference.
The
trace() function is an exception. It is in the flash.util package, but is implicitly
imported.
Function Package to import
ContextMenu import flash.ui.ContextMenu;
EventDispatcher import flash.events.EventDispatcher;
(was mx.events.EventDispatcher mix-in)
LocalConnection import flash.net.LocalConnection;
MovieClip import flash.display.MovieClip;
PopUpManager import mx.managers.PopUpManager;
XML import flash.xml.XMLNode;
Seitenansicht 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 183 184

Kommentare zu diesen Handbüchern

Keine Kommentare