Macromedia flash 8-flash samples Manuale Utente

Pagina di 48
23
7
CHAPTER 7
ActionScript
Several ActionScript samples are provided when you install Macromedia 
Flash 8. This chapter contains a brief overview of each sample.
This chapter contains the following sections:
Custom Flash Player context menu  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Filters with ActionScript  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Animation with ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Tween class, the TransitionManager class, and progress bars  . 25
ActionScript data types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Bitmap caching with ActionScript  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Drawing with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
ActionScript arrays example  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Interaction between the browser and Flash Player . . . . . . . . . . . . . . . . 28
Stage size control with ActionScript  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Text loading with ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Formatted text with ActionScript  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
FlashType sample. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Login sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
String processing with ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Image manipulation with the BitmapData class. . . . . . . . . . . . . . . . . . . .31
Text field manipulation with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . .31
Photo gallery with tree navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Photo gallery with thumbnails  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
File upload with the FileReference API . . . . . . . . . . . . . . . . . . . . . . . . . . 33
XML blog tracker  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
XML language picker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
XML menu  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34