4
File Object .......................................................................................................................................................................................41
File object constructors .......................................................................................................................................................41
File class properties...............................................................................................................................................................41
File class functions.................................................................................................................................................................42
File object properties............................................................................................................................................................43
File object functions..............................................................................................................................................................45
Folder Object ................................................................................................................................................................................50
Folder object constructors..................................................................................................................................................50
Folder class properties .........................................................................................................................................................50
Folder class functions ...........................................................................................................................................................51
Folder object properties......................................................................................................................................................52
Folder object functions........................................................................................................................................................53
4 User Interface Tools .................................................................................................................. 56
ScriptUI Programming Model..................................................................................................................................................57
Creating a window ...............................................................................................................................................................57
Container elements...............................................................................................................................................................57
Window layout .......................................................................................................................................................................58
Adding elements to containers ........................................................................................................................................59
Removing elements ..............................................................................................................................................................60
Types of Controls .........................................................................................................................................................................61
Containers.................................................................................................................................................................................61
User interface controls.........................................................................................................................................................61
Displaying icons......................................................................................................................................................................65
Prompts and alerts ...............................................................................................................................................................65
Modal dialogs .........................................................................................................................................................................65
Size and Location Objects.........................................................................................................................................................67
Size and location object types ..........................................................................................................................................68
Drawing Objects...........................................................................................................................................................................68
Resource Specifications ............................................................................................................................................................69
Using resource strings..........................................................................................................................................................70
Defining Behavior with Event Callbacks and Listeners...................................................................................................71
Defining event handler callback functions...................................................................................................................71
Simulating user events.........................................................................................................................................................72
Registering event listeners for windows or controls.................................................................................................72
How registered event-handlers are called....................................................................................................................73
Communicating with the Flash Application.......................................................................................................................75
Automatic Layout ........................................................................................................................................................................77
Default layout behavior.......................................................................................................................................................77
Automatic layout properties..............................................................................................................................................78
Custom layout manager example....................................................................................................................................85
The AutoLayoutManager algorithm ...............................................................................................................................86
Automatic layout restrictions............................................................................................................................................87
Localization in ScriptUI Objects ..............................................................................................................................................87
Variable values in localized strings..................................................................................................................................88
Enabling automatic localization.......................................................................................................................................88
ScriptUI Object Reference ........................................................................................................................................................89
Global ScriptUI Object ................................................................................................................................................................89
ScriptUI global properties...................................................................................................................................................89
ScriptUI global functions.....................................................................................................................................................90
Global Window Object ...............................................................................................................................................................91